-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathaws-sdk-2.270.1.min.js
1 lines (1 loc) · 216 KB
/
aws-sdk-2.270.1.min.js
1
_xamzrequire=function s(o,a,u){function c(t,e){if(!a[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var i=a[t]={exports:{}};o[t][0].call(i.exports,function(e){return c(o[t][1][e]||e)},i,i.exports,s,o,a,u)}return a[t].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({38:[function(e,t,r){var n={util:e("./util")};({}).toString(),(t.exports=n).util.update(n,{VERSION:"2.270.1",Signers:{},Protocol:{Json:e("./protocol/json"),Query:e("./protocol/query"),Rest:e("./protocol/rest"),RestJson:e("./protocol/rest_json"),RestXml:e("./protocol/rest_xml")},XML:{Builder:e("./xml/builder"),Parser:null},JSON:{Builder:e("./json/builder"),Parser:e("./json/parser")},Model:{Api:e("./model/api"),Operation:e("./model/operation"),Shape:e("./model/shape"),Paginator:e("./model/paginator"),ResourceWaiter:e("./model/resource_waiter")},apiLoader:e("./api_loader")}),e("./service"),e("./config"),e("./http"),e("./sequential_executor"),e("./event_listeners"),e("./request"),e("./response"),e("./resource_waiter"),e("./signers/request_signer"),e("./param_validator"),n.events=new n.SequentialExecutor},{"./api_loader":27,"./config":37,"./event_listeners":58,"./http":59,"./json/builder":61,"./json/parser":62,"./model/api":63,"./model/operation":65,"./model/paginator":66,"./model/resource_waiter":67,"./model/shape":68,"./param_validator":69,"./protocol/json":71,"./protocol/query":72,"./protocol/rest":73,"./protocol/rest_json":74,"./protocol/rest_xml":75,"./request":80,"./resource_waiter":81,"./response":82,"./sequential_executor":84,"./service":85,"./signers/request_signer":104,"./util":112,"./xml/builder":114}],114:[function(e,t,r){var y=e("../util"),g=e("./xml-node").XmlNode,v=e("./xml-text").XmlText;function n(){}function b(e,t,r){switch(r.type){case"structure":return f=e,d=t,m=r,void y.arrayEach(m.memberNames,function(e){var t=m.members[e];if("body"===t.location){var r=d[e],n=t.name;if(null!=r)if(t.isXmlAttribute)f.addAttribute(n,r);else if(t.flattened)b(f,r,t);else{var i=new g(n);f.addChildNode(i),S(i,t),b(i,r,t)}}});case"map":return u=e,c=t,h=(l=r).key.name||"key",p=l.value.name||"value",void y.each(c,function(e,t){var r=new g(l.flattened?l.name:"entry");u.addChildNode(r);var n=new g(h),i=new g(p);r.addChildNode(n),r.addChildNode(i),b(n,e,l.key),b(i,t,l.value)});case"list":return s=e,o=t,void((a=r).flattened?y.arrayEach(o,function(e){var t=a.member.name||a.name,r=new g(t);s.addChildNode(r),b(r,e,a.member)}):y.arrayEach(o,function(e){var t=a.member.name||"member",r=new g(t);s.addChildNode(r),b(r,e,a.member)}));default:return n=t,i=r,void e.addChildNode(new v(i.toWireFormat(n)))}var n,i,s,o,a,u,c,l,h,p,f,d,m}function S(e,t,r){var n,i="xmlns";t.xmlNamespaceUri?(n=t.xmlNamespaceUri,t.xmlNamespacePrefix&&(i+=":"+t.xmlNamespacePrefix)):r&&t.api.xmlNamespaceUri&&(n=t.api.xmlNamespaceUri),n&&e.addAttribute(i,n)}n.prototype.toXML=function(e,t,r,n){var i=new g(r);return S(i,t,!0),b(i,e,t),0<i.children.length||n?i.toString():""},t.exports=n},{"../util":112,"./xml-node":117,"./xml-text":118}],118:[function(e,t,r){var n=e("./escape-element").escapeElement;function i(e){this.value=e}i.prototype.toString=function(){return n(""+this.value)},t.exports={XmlText:i}},{"./escape-element":116}],116:[function(e,t,r){t.exports={escapeElement:function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}}},{}],117:[function(e,t,r){var a=e("./escape-attribute").escapeAttribute;function n(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}n.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},n.prototype.addChildNode=function(e){return this.children.push(e),this},n.prototype.removeAttribute=function(e){return delete this.attributes[e],this},n.prototype.toString=function(){for(var e=Boolean(this.children.length),t="<"+this.name,r=this.attributes,n=0,i=Object.keys(r);n<i.length;n++){var s=i[n],o=r[s];null!=o&&(t+=" "+s+'="'+a(""+o)+'"')}return t+(e?">"+this.children.map(function(e){return e.toString()}).join("")+"</"+this.name+">":"/>")},t.exports={XmlNode:n}},{"./escape-attribute":115}],115:[function(e,t,r){t.exports={escapeAttribute:function(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}}},{}],104:[function(e,t,r){var n=e("../core"),i=n.util.inherit;n.Signers.RequestSigner=i({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),n.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return n.Signers.V2;case"v3":return n.Signers.V3;case"v4":return n.Signers.V4;case"s3":return n.Signers.S3;case"v3https":return n.Signers.V3Https}throw new Error("Unknown signing version "+e)},e("./v2"),e("./v3"),e("./v3https"),e("./v4"),e("./s3"),e("./presign")},{"../core":38,"./presign":103,"./s3":105,"./v2":106,"./v3":107,"./v3https":108,"./v4":109}],109:[function(e,t,r){var s=e("../core"),n=e("./v4_credentials"),i=s.util.inherit,o="presigned-expires";s.Signers.V4=i(s.Signers.RequestSigner,{constructor:function(e,t,r){s.Signers.RequestSigner.call(this,e),this.serviceName=t,r=r||{},this.signatureCache="boolean"!=typeof r.signatureCache||r.signatureCache,this.operation=r.operation},algorithm:"AWS4-HMAC-SHA256",addAuthorization:function(e,t){var r=s.util.date.iso8601(t).replace(/[:\-]|\.\d{3}/g,"");this.isPresigned()?this.updateForPresigned(e,r):this.addHeaders(e,r),this.request.headers.Authorization=this.authorization(e,r)},addHeaders:function(e,t){this.request.headers["X-Amz-Date"]=t,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken)},updateForPresigned:function(e,t){var r=this.credentialString(t),n={"X-Amz-Date":t,"X-Amz-Algorithm":this.algorithm,"X-Amz-Credential":e.accessKeyId+"/"+r,"X-Amz-Expires":this.request.headers[o],"X-Amz-SignedHeaders":this.signedHeaders()};e.sessionToken&&(n["X-Amz-Security-Token"]=e.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"]),s.util.each.call(this,this.request.headers,function(e,t){if(e!==o&&this.isSignableHeader(e)){var r=e.toLowerCase();0===r.indexOf("x-amz-meta-")?n[r]=t:0===r.indexOf("x-amz-")&&(n[e]=t)}});var i=0<=this.request.path.indexOf("?")?"&":"?";this.request.path+=i+s.util.queryParamsToString(n)},authorization:function(e,t){var r=[],n=this.credentialString(t);return r.push(this.algorithm+" Credential="+e.accessKeyId+"/"+n),r.push("SignedHeaders="+this.signedHeaders()),r.push("Signature="+this.signature(e,t)),r.join(", ")},signature:function(e,t){var r=n.getSigningKey(e,t.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return s.util.crypto.hmac(r,this.stringToSign(t),"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 e=[],t=this.request.pathname();return"s3"!==this.serviceName&&(t=s.util.uriEscapePath(t)),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")},canonicalHeaders:function(){var r=[];s.util.each.call(this,this.request.headers,function(e,t){r.push([e,t])}),r.sort(function(e,t){return e[0].toLowerCase()<t[0].toLowerCase()?-1:1});var n=[];return s.util.arrayEach.call(this,r,function(e){var t=e[0].toLowerCase();if(this.isSignableHeader(t)){var r=e[1];if(null==r||"function"!=typeof r.toString)throw s.util.error(new Error("Header "+t+" contains invalid value"),{code:"InvalidHeader"});n.push(t+":"+this.canonicalHeaderValues(r.toString()))}}),n.join("\n")},canonicalHeaderValues:function(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")},signedHeaders:function(){var t=[];return s.util.each.call(this,this.request.headers,function(e){e=e.toLowerCase(),this.isSignableHeader(e)&&t.push(e)}),t.sort().join(";")},credentialString:function(e){return n.createScope(e.substr(0,8),this.request.region,this.serviceName)},hexEncodedHash:function(e){return s.util.crypto.sha256(e,"hex")},hexEncodedBodyHash:function(){var e=this.request;return this.isPresigned()&&"s3"===this.serviceName&&!e.body?"UNSIGNED-PAYLOAD":e.headers["X-Amz-Content-Sha256"]?e.headers["X-Amz-Content-Sha256"]:this.hexEncodedHash(this.request.body||"")},unsignableHeaders:["authorization","content-type","content-length","user-agent",o,"expect","x-amzn-trace-id"],isSignableHeader:function(e){return 0===e.toLowerCase().indexOf("x-amz-")||this.unsignableHeaders.indexOf(e)<0},isPresigned:function(){return!!this.request.headers[o]}}),t.exports=s.Signers.V4},{"../core":38,"./v4_credentials":110}],110:[function(e,t,r){var l=e("../core"),h={},p=[],f="aws4_request";t.exports={createScope:function(e,t,r){return[e.substr(0,8),t,r,f].join("/")},getSigningKey:function(e,t,r,n,i){var s=[l.util.crypto.hmac(e.secretAccessKey,e.accessKeyId,"base64"),t,r,n].join("_");if((i=!1!==i)&&s in h)return h[s];var o=l.util.crypto.hmac("AWS4"+e.secretAccessKey,t,"buffer"),a=l.util.crypto.hmac(o,r,"buffer"),u=l.util.crypto.hmac(a,n,"buffer"),c=l.util.crypto.hmac(u,f,"buffer");return i&&(h[s]=c,p.push(s),50<p.length&&delete h[p.shift()]),c},emptyCache:function(){h={},p=[]}}},{"../core":38}],108:[function(e,t,r){var n=e("../core"),i=n.util.inherit;e("./v3"),n.Signers.V3Https=i(n.Signers.V3,{authorization:function(e){return"AWS3-HTTPS AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,Signature="+this.signature(e)},stringToSign:function(){return this.request.headers["X-Amz-Date"]}}),t.exports=n.Signers.V3Https},{"../core":38,"./v3":107}],107:[function(e,t,r){var n=e("../core"),i=n.util.inherit;n.Signers.V3=i(n.Signers.RequestSigner,{addAuthorization:function(e,t){var r=n.util.date.rfc822(t);this.request.headers["X-Amz-Date"]=r,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken),this.request.headers["X-Amzn-Authorization"]=this.authorization(e,r)},authorization:function(e){return"AWS3 AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,SignedHeaders="+this.signedHeaders()+",Signature="+this.signature(e)},signedHeaders:function(){var t=[];return n.util.arrayEach(this.headersToSign(),function(e){t.push(e.toLowerCase())}),t.sort().join(";")},canonicalHeaders:function(){var t=this.request.headers,r=[];return n.util.arrayEach(this.headersToSign(),function(e){r.push(e.toLowerCase().trim()+":"+String(t[e]).trim())}),r.sort().join("\n")+"\n"},headersToSign:function(){var t=[];return n.util.each(this.request.headers,function(e){("Host"===e||"Content-Encoding"===e||e.match(/^X-Amz/i))&&t.push(e)}),t},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push("/"),e.push(""),e.push(this.canonicalHeaders()),e.push(this.request.body),n.util.crypto.sha256(e.join("\n"))}}),t.exports=n.Signers.V3},{"../core":38}],106:[function(e,t,r){var n=e("../core"),i=n.util.inherit;n.Signers.V2=i(n.Signers.RequestSigner,{addAuthorization:function(e,t){t||(t=n.util.date.getDate());var r=this.request;r.params.Timestamp=n.util.date.iso8601(t),r.params.SignatureVersion="2",r.params.SignatureMethod="HmacSHA256",r.params.AWSAccessKeyId=e.accessKeyId,e.sessionToken&&(r.params.SecurityToken=e.sessionToken),delete r.params.Signature,r.params.Signature=this.signature(e),r.body=n.util.queryParamsToString(r.params),r.headers["Content-Length"]=r.body.length},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push(this.request.endpoint.host.toLowerCase()),e.push(this.request.pathname()),e.push(n.util.queryParamsToString(this.request.params)),e.join("\n")}}),t.exports=n.Signers.V2},{"../core":38}],105:[function(e,t,r){var o=e("../core"),n=o.util.inherit;o.Signers.S3=n(o.Signers.RequestSigner,{subResources:{acl:1,accelerate:1,analytics:1,cors:1,lifecycle:1,delete:1,inventory:1,location:1,logging:1,metrics:1,notification:1,partNumber:1,policy:1,requestPayment:1,replication:1,restore:1,tagging:1,torrent:1,uploadId:1,uploads:1,versionId:1,versioning:1,versions:1,website:1},responseHeaders:{"response-content-type":1,"response-content-language":1,"response-expires":1,"response-cache-control":1,"response-content-disposition":1,"response-content-encoding":1},addAuthorization:function(e,t){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=o.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var r=this.sign(e.secretAccessKey,this.stringToSign()),n="AWS "+e.accessKeyId+":"+r;this.request.headers.Authorization=n},stringToSign:function(){var e=this.request,t=[];t.push(e.method),t.push(e.headers["Content-MD5"]||""),t.push(e.headers["Content-Type"]||""),t.push(e.headers["presigned-expires"]||"");var r=this.canonicalizedAmzHeaders();return r&&t.push(r),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var t=[];o.util.each(this.request.headers,function(e){e.match(/^x-amz-/i)&&t.push(e)}),t.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:1});var r=[];return o.util.arrayEach.call(this,t,function(e){r.push(e.toLowerCase()+":"+String(this.request.headers[e]))}),r.join("\n")},canonicalizedResource:function(){var e=this.request,t=e.path.split("?"),r=t[0],n=t[1],i="";if(e.virtualHostedBucket&&(i+="/"+e.virtualHostedBucket),i+=r,n){var s=[];o.util.arrayEach.call(this,n.split("&"),function(e){var t=e.split("=")[0],r=e.split("=")[1];if(this.subResources[t]||this.responseHeaders[t]){var n={name:t};void 0!==r&&(this.subResources[t]?n.value=r:n.value=decodeURIComponent(r)),s.push(n)}}),s.sort(function(e,t){return e.name<t.name?-1:1}),s.length&&(n=[],o.util.arrayEach(s,function(e){void 0===e.value?n.push(e.name):n.push(e.name+"="+e.value)}),i+="?"+n.join("&"))}return i},sign:function(e,t){return o.util.crypto.hmac(e,t,"base64","sha1")}}),t.exports=o.Signers.S3},{"../core":38}],103:[function(e,t,r){var o=e("../core"),n=o.util.inherit,a="presigned-expires";function i(e){var t=e.httpRequest.headers[a],r=e.service.getSignerClass(e);if(delete e.httpRequest.headers["User-Agent"],delete e.httpRequest.headers["X-Amz-User-Agent"],r===o.Signers.V4){if(604800<t){throw o.util.error(new Error,{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV4 signing.",retryable:!1})}e.httpRequest.headers[a]=t}else{if(r!==o.Signers.S3)throw o.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});var n=e.service?e.service.getSkewCorrectedDate():o.util.date.getDate();e.httpRequest.headers[a]=parseInt(o.util.date.unixTimestamp(n)+t,10).toString()}}function s(e){var t=e.httpRequest.endpoint,r=o.util.urlParse(e.httpRequest.path),n={};r.search&&(n=o.util.queryStringParse(r.search.substr(1)));var i=e.httpRequest.headers.Authorization.split(" ");if("AWS"===i[0])i=i[1].split(":"),n.AWSAccessKeyId=i[0],n.Signature=i[1],o.util.each(e.httpRequest.headers,function(e,t){e===a&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete n[e],e=e.toLowerCase()),n[e]=t}),delete e.httpRequest.headers[a],delete n.Authorization,delete n.Host;else if("AWS4-HMAC-SHA256"===i[0]){i.shift();var s=i.join(" ").match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];n["X-Amz-Signature"]=s,delete n.Expires}t.pathname=r.pathname,t.search=o.util.queryParamsToString(n)}o.Signers.Presign=n({sign:function(e,t,r){if(e.httpRequest.headers[a]=t||3600,e.on("build",i),e.on("sign",s),e.removeListener("afterBuild",o.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",o.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!r){if(e.build(),e.response.error)throw e.response.error;return o.util.urlFormat(e.httpRequest.endpoint)}e.build(function(){this.response.error?r(this.response.error):r(null,o.util.urlFormat(e.httpRequest.endpoint))})}}),t.exports=o.Signers.Presign},{"../core":38}],85:[function(e,t,r){var s=e("./core"),o=e("./model/api"),n=e("./region_config"),a=s.util.inherit,i=0;s.Service=a({constructor:function(e){if(!this.loadServiceClass)throw s.util.error(new Error,"Service must be constructed with `new' operator");var t=this.loadServiceClass(e||{});if(t){var r=s.util.copy(e),n=new t(e);return Object.defineProperty(n,"_originalConfig",{get:function(){return r},enumerable:!1,configurable:!0}),n._clientId=++i,n}this.initialize(e)},initialize:function(e){var t=s.config[this.serviceIdentifier];this.config=new s.Config(s.config),t&&this.config.update(t,!0),e&&this.config.update(e,!0),this.validateService(),this.config.endpoint||n(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint)},validateService:function(){},loadServiceClass:function(e){var t=e;if(s.util.isEmpty(this.api)){if(t.apiConfig)return s.Service.defineServiceApi(this.constructor,t.apiConfig);if(this.constructor.services){(t=new s.Config(s.config)).update(e,!0);var r=t.apiVersions[this.constructor.serviceIdentifier];return r=r||t.apiVersion,this.getLatestServiceClass(r)}return null}return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&s.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||0===this.constructor.services.length)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(e?s.util.isType(e,Date)&&(e=s.util.date.iso8601(e).split("T")[0]):e="latest",Object.hasOwnProperty(this.constructor.services,e))return e;for(var t=Object.keys(this.constructor.services).sort(),r=null,n=t.length-1;0<=n;n--)if("*"!==t[n][t[n].length-1]&&(r=t[n]),t[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,r,t){if("function"==typeof r&&(t=r,r=null),r=r||{},this.config.params){var n=this.api.operations[e];n&&(r=s.util.copy(r),s.util.each(this.config.params,function(e,t){n.input.members[e]&&(void 0!==r[e]&&null!==r[e]||(r[e]=t))}))}var i=new s.Request(this,e,r);return this.addAllRequestListeners(i),t&&i.send(t),i},makeUnauthenticatedRequest:function(e,t,r){"function"==typeof t&&(r=t,t={});var n=this.makeRequest(e,t).toUnauthenticated();return r?n.send(r):n},waitFor:function(e,t,r){return new s.ResourceWaiter(this,e).wait(t,r)},addAllRequestListeners:function(e){for(var t=[s.events,s.EventListeners.Core,this.serviceInterface(),s.EventListeners.CorePost],r=0;r<t.length;r++)t[r]&&e.addListeners(t[r]);this.config.paramValidation||e.removeListener("validate",s.EventListeners.Core.VALIDATE_PARAMETERS),this.config.logger&&e.addListeners(s.EventListeners.Logger),this.setupRequestListeners(e),"function"==typeof this.constructor.prototype.customRequestHandler&&this.constructor.prototype.customRequestHandler(e),Object.prototype.hasOwnProperty.call(this,"customRequestHandler")&&"function"==typeof this.customRequestHandler&&this.customRequestHandler(e)},setupRequestListeners:function(){},getSignerClass:function(e){var t,r=null,n="";e&&(n=(r=(e.service.api.operations||{})[e.operation]||null)?r.authtype:"");return t=this.config.signatureVersion?this.config.signatureVersion:"v4"===n||"v4-unsigned-body"===n?"v4":this.api.signatureVersion,s.Signers.RequestSigner.getVersion(t)},serviceInterface:function(){switch(this.api.protocol){case"ec2":case"query":return s.EventListeners.Query;case"json":return s.EventListeners.Json;case"rest-json":return s.EventListeners.RestJson;case"rest-xml":return s.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 s.util.calculateRetryDelay(e,this.config.retryDelayOptions)},retryableError:function(e){return!!this.timeoutError(e)||(!!this.networkingError(e)||(!!this.expiredCredentialsError(e)||(!!this.throttledError(e)||500<=e.statusCode)))},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 3e4<=Math.abs(this.getSkewCorrectedDate().getTime()-e)},throttledError:function(e){switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":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 s.Endpoint(e,this.config)},paginationConfig:function(e,t){var r=this.api.operations[e].paginator;if(!r){if(t){var n=new Error;throw s.util.error(n,"No pagination configuration for "+e)}return null}return r}}),s.util.update(s.Service,{defineMethods:function(e){s.util.each(e.prototype.api.operations,function(r){e.prototype[r]||("none"===e.prototype.api.operations[r].authtype?e.prototype[r]=function(e,t){return this.makeUnauthenticatedRequest(r,e,t)}:e.prototype[r]=function(e,t){return this.makeRequest(r,e,t)})})},defineService:function(e,t,r){s.Service._serviceMap[e]=!0,Array.isArray(t)||(r=t,t=[]);var n=a(s.Service,r||{});if("string"==typeof e){s.Service.addVersions(n,t);var i=n.serviceIdentifier||e;n.serviceIdentifier=i}else n.prototype.api=e,s.Service.defineMethods(n);return n},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var r=0;r<t.length;r++)void 0===e.services[t[r]]&&(e.services[t[r]]=null);e.apiVersions=Object.keys(e.services).sort()},defineServiceApi:function(t,r,e){var n=a(t,{serviceIdentifier:t.serviceIdentifier});function i(e){e.isApi?n.prototype.api=e:n.prototype.api=new o(e)}if("string"==typeof r){if(e)i(e);else try{i(s.apiLoader(t.serviceIdentifier,r))}catch(e){throw s.util.error(e,{message:"Could not find API configuration "+t.serviceIdentifier+"-"+r})}Object.prototype.hasOwnProperty.call(t.services,r)||(t.apiVersions=t.apiVersions.concat(r).sort()),t.services[r]=n}else i(r);return s.Service.defineMethods(n),n},hasService:function(e){return Object.prototype.hasOwnProperty.call(s.Service._serviceMap,e)},_serviceMap:{}}),t.exports=s.Service},{"./core":38,"./model/api":63,"./region_config":78}],78:[function(e,t,r){var c=e("./util"),l=e("./region_config_data.json");function h(r,e){c.each(e,function(e,t){"globalEndpoint"!==e&&(void 0!==r.config[e]&&null!==r.config[e]||(r.config[e]=t))})}t.exports=function(e){for(var t,r,n,i,s=(r=(t=e).config.region,n=function(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}(r),i=t.api.endpointPrefix,[[r,i],[n,i],[r,"*"],[n,"*"],["*",i],["*","*"]].map(function(e){return e[0]&&e[1]?e.join("/"):null})),o=0;o<s.length;o++){var a=s[o];if(a&&Object.prototype.hasOwnProperty.call(l.rules,a)){var u=l.rules[a];return"string"==typeof u&&(u=l.patterns[u]),e.config.useDualstack&&c.isDualstackAvailable(e)&&((u=c.copy(u)).endpoint="{service}.dualstack.{region}.amazonaws.com"),e.isGlobalEndpoint=!!u.globalEndpoint,u.signatureVersion||(u.signatureVersion="v4"),void h(e,u)}}}},{"./region_config_data.json":79,"./util":112}],79:[function(e,t,r){t.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"}}}},{}],82:[function(e,t,r){var a=e("./core"),n=a.util.inherit,i=e("jmespath");a.Response=n({constructor:function(e){this.request=e,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new a.HttpResponse,e&&(this.maxRetries=e.service.numRetries(),this.maxRedirects=e.service.config.maxRedirects)},nextPage:function(e){var t,r=this.request.service,n=this.request.operation;try{t=r.paginationConfig(n,!0)}catch(e){this.error=e}if(!this.hasNextPage()){if(e)e(this.error,null);else if(this.error)throw this.error;return null}var i=a.util.copy(this.request.params);if(this.nextPageTokens){var s=t.inputToken;"string"==typeof s&&(s=[s]);for(var o=0;o<s.length;o++)i[s[o]]=this.nextPageTokens[o];return r.makeRequest(this.request.operation,i,e)}return e?e(null,null):null},hasNextPage:function(){return this.cacheNextPageTokens(),!!this.nextPageTokens||void 0===this.nextPageTokens&&void 0},cacheNextPageTokens:function(){if(Object.prototype.hasOwnProperty.call(this,"nextPageTokens"))return this.nextPageTokens;this.nextPageTokens=void 0;var e=this.request.service.paginationConfig(this.request.operation);if(!e)return this.nextPageTokens;if(this.nextPageTokens=null,e.moreResults&&!i.search(this.data,e.moreResults))return this.nextPageTokens;var t=e.outputToken;return"string"==typeof t&&(t=[t]),a.util.arrayEach.call(this,t,function(e){var t=i.search(this.data,e);t&&(this.nextPageTokens=this.nextPageTokens||[],this.nextPageTokens.push(t))}),this.nextPageTokens}})},{"./core":38,jmespath:8}],81:[function(e,t,r){var n=e("./core"),i=n.util.inherit,o=e("jmespath");function s(r){var n=r.request._waiter,e=n.config.acceptors,i=!1,s="retry";e.forEach(function(e){if(!i){var t=n.matchers[e.matcher];t&&t(r,e.expected,e.argument)&&(i=!0,s=e.state)}}),!i&&r.error&&(s="failure"),"success"===s?n.setSuccess(r):n.setError(r,"retry"===s)}n.ResourceWaiter=i({constructor:function(e,t){this.service=e,this.state=t,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(e,t,r){try{var n=o.search(e.data,r)}catch(e){return!1}return o.strictDeepEqual(n,t)},pathAll:function(e,t,r){try{var n=o.search(e.data,r)}catch(e){return!1}Array.isArray(n)||(n=[n]);var i=n.length;if(!i)return!1;for(var s=0;s<i;s++)if(!o.strictDeepEqual(n[s],t))return!1;return!0},pathAny:function(e,t,r){try{var n=o.search(e.data,r)}catch(e){return!1}Array.isArray(n)||(n=[n]);for(var i=n.length,s=0;s<i;s++)if(o.strictDeepEqual(n[s],t))return!0;return!1},status:function(e,t){var r=e.httpResponse.statusCode;return"number"==typeof r&&r===t},error:function(e,t){return"string"==typeof t&&e.error?t===e.error.code:t===!!e.error}},listeners:(new n.SequentialExecutor).addNamedListeners(function(e){e("RETRY_CHECK","retry",function(e){var t=e.request._waiter;e.error&&"ResourceNotReady"===e.error.code&&(e.error.retryDelay=1e3*(t.config.delay||0))}),e("CHECK_OUTPUT","extractData",s),e("CHECK_ERROR","extractError",s)}),wait:function(e,t){"function"==typeof e&&(t=e,e=void 0),e&&e.$waiter&&("number"==typeof(e=n.util.copy(e)).$waiter.delay&&(this.config.delay=e.$waiter.delay),"number"==typeof e.$waiter.maxAttempts&&(this.config.maxAttempts=e.$waiter.maxAttempts),delete e.$waiter);var r=this.service.makeRequest(this.config.operation,e);return r._waiter=this,r.response.maxRetries=this.config.maxAttempts,r.addListeners(this.listeners),t&&r.send(t),r},setSuccess:function(e){e.error=null,e.data=e.data||{},e.request.removeAllListeners("extractData")},setError:function(e,t){e.data=null,e.error=n.util.error(e.error||new Error,{code:"ResourceNotReady",message:"Resource is not in the state "+this.state,retryable:t})},loadWaiterConfig:function(e){if(!this.service.api.waiters[e])throw new n.util.error(new Error,{code:"StateNotFoundError",message:"State "+e+" not found."});this.config=n.util.copy(this.service.api.waiters[e])}})},{"./core":38,jmespath:8}],80:[function(r,e,t){(function(t){var p=r("./core"),o=r("./state_machine"),e=p.util.inherit,a=p.util.domain,u=r("jmespath"),i={success:1,error:1,complete:1};var c=new o;c.setupStates=function(){var e=function(e,r){var n=this;n._haltHandlersOnError=!1,n.emit(n._asm.currentState,function(e){if(e)if(t=n,Object.prototype.hasOwnProperty.call(i,t._asm.currentState)){if(!(a&&n.domain instanceof a.Domain))throw e;e.domainEmitter=n,e.domain=n.domain,e.domainThrown=!1,n.domain.emit("error",e)}else n.response.error=e,r(e);else r(n.response.error);var t})};this.addState("validate","build","error",e),this.addState("build","afterBuild","restart",e),this.addState("afterBuild","sign","restart",e),this.addState("sign","send","retry",e),this.addState("retry","afterRetry","afterRetry",e),this.addState("afterRetry","sign","error",e),this.addState("send","validateResponse","retry",e),this.addState("validateResponse","extractData","extractError",e),this.addState("extractError","extractData","retry",e),this.addState("extractData","success","retry",e),this.addState("restart","build","error",e),this.addState("success","complete","complete",e),this.addState("error","complete","complete",e),this.addState("complete",null,null,e)},c.setupStates(),p.Request=e({constructor:function(e,t,r){var n=e.endpoint,i=e.config.region,s=e.config.customUserAgent;e.isGlobalEndpoint&&(i="us-east-1"),this.domain=a&&a.active,this.service=e,this.operation=t,this.params=r||{},this.httpRequest=new p.HttpRequest(n,i),this.httpRequest.appendToUserAgent(s),this.startTime=e.getSkewCorrectedDate(),this.response=new p.Response(this),this._asm=new o(c.states,"validate"),this._haltHandlersOnError=!1,p.SequentialExecutor.call(this),this.emit=this.emitEvent},send:function(t){return t&&(this.httpRequest.appendToUserAgent("callback"),this.on("complete",function(e){t.call(e,e.error,e.data)})),this.runTo(),this.response},build:function(e){return this.runTo("send",e)},runTo:function(e,t){return this._asm.runTo(e,t,this),this},abort:function(){return this.removeAllListeners("validateResponse"),this.removeAllListeners("extractError"),this.on("validateResponse",function(e){e.error=p.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1})}),this.httpRequest.stream&&!this.httpRequest.stream.didCallback&&(this.httpRequest.stream.abort(),this.httpRequest._abortCallback?this.httpRequest._abortCallback():this.removeAllListeners("send")),this},eachPage:function(n){n=p.util.fn.makeAsync(n,3),this.on("complete",function t(r){n.call(r,r.error,r.data,function(e){!1!==e&&(r.hasNextPage()?r.nextPage().on("complete",t).send():n.call(r,null,null,p.util.fn.noop))})}).send()},eachItem:function(s){var o=this;this.eachPage(function(e,t){if(e)return s(e,null);if(null===t)return s(null,null);var r=o.service.paginationConfig(o.operation).resultKey;Array.isArray(r)&&(r=r[0]);var n=u.search(t,r),i=!0;return p.util.arrayEach(n,function(e){if(!1===(i=s(null,e)))return p.util.abort}),i})},isPageable:function(){return!!this.service.paginationConfig(this.operation)},createReadStream:function(){var c=p.util.stream,l=this,h=null;return 2===p.HttpClient.streamsApiVersion?(h=new c.PassThrough,t.nextTick(function(){l.send()})):((h=new c.Stream).readable=!0,h.sent=!1,h.on("newListener",function(e){h.sent||"data"!==e||(h.sent=!0,t.nextTick(function(){l.send()}))})),this.on("error",function(e){h.emit("error",e)}),this.on("httpHeaders",function(e,t,r){if(e<300){l.removeListener("httpData",p.EventListeners.Core.HTTP_DATA),l.removeListener("httpError",p.EventListeners.Core.HTTP_ERROR),l.on("httpError",function(e){r.error=e,r.error.retryable=!1});var n,i=!1;if("HEAD"!==l.httpRequest.method&&(n=parseInt(t["content-length"],10)),void 0!==n&&!isNaN(n)&&0<=n){i=!0;var s=0}var o=function(){i&&s!==n?h.emit("error",p.util.error(new Error("Stream content length mismatch. Received "+s+" of "+n+" bytes."),{code:"StreamContentLengthMismatch"})):2===p.HttpClient.streamsApiVersion?h.end():h.emit("end")},a=r.httpResponse.createUnbufferedStream();if(2===p.HttpClient.streamsApiVersion)if(i){var u=new c.PassThrough;u._write=function(e){return e&&e.length&&(s+=e.length),c.PassThrough.prototype._write.apply(this,arguments)},u.on("end",o),h.on("error",function(e){i=!1,a.unpipe(u),u.emit("end"),u.end()}),a.pipe(u).pipe(h,{end:!1})}else a.pipe(h);else i&&a.on("data",function(e){e&&e.length&&(s+=e.length)}),a.on("data",function(e){h.emit("data",e)}),a.on("end",o);a.on("error",function(e){i=!1,h.emit("error",e)})}}),h},emitEvent:function(e,t,r){"function"==typeof t&&(r=t,t=null),r||(r=function(){}),t||(t=this.eventParameters(e,this.response)),p.SequentialExecutor.prototype.emit.call(this,e,t,function(e){e&&(this.response.error=e),r.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,t){return t||"function"!=typeof e||(t=e,e=null),(new p.Signers.Presign).sign(this.toGet(),e,t)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this.removeListener("validate",p.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",p.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}}),p.Request.addPromisesToClass=function(t){this.prototype.promise=function(){var e=this;return this.httpRequest.appendToUserAgent("promise"),new t(function(t,r){e.on("complete",function(e){e.error?r(e.error):t(Object.defineProperty(e.data||{},"$response",{value:e}))}),e.runTo()})}},p.Request.deletePromisesFromClass=function(){delete this.prototype.promise},p.util.addPromises(p.Request),p.util.mixin(p.Request,p.SequentialExecutor)}).call(this,r("_process"))},{"./core":38,"./state_machine":111,_process:9,jmespath:8}],111:[function(e,t,r){function n(e,t){this.currentState=t||null,this.states=e||{}}n.prototype.runTo=function(t,r,n,e){"function"==typeof t&&(e=n,n=r,r=t,t=null);var i=this,s=i.states[i.currentState];s.fn.call(n||i,e,function(e){if(e){if(!s.fail)return r?r.call(n,e):null;i.currentState=s.fail}else{if(!s.accept)return r?r.call(n):null;i.currentState=s.accept}if(i.currentState===t)return r?r.call(n,e):null;i.runTo(t,r,n,e)})},n.prototype.addState=function(e,t,r,n){return"function"==typeof t?(n=t,r=t=null):"function"==typeof r&&(n=r,r=null),this.currentState||(this.currentState=e),this.states[e]={accept:t,fail:r,fn:n},this},t.exports=n},{}],69:[function(e,t,r){var u=e("./core");u.ParamValidator=u.util.inherit({constructor:function(e){!0!==e&&void 0!==e||(e={min:!0}),this.validation=e},validate:function(e,t,r){if(this.errors=[],this.validateMember(e,t||{},r||"params"),1<this.errors.length){var n=this.errors.join("\n* ");throw n="There were "+this.errors.length+" validation errors:\n* "+n,u.util.error(new Error(n),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(e,t){this.errors.push(u.util.error(new Error(t),{code:e}))},validateStructure:function(e,t,r){var n;this.validateType(t,r,["object"],"structure");for(var i=0;e.required&&i<e.required.length;i++){var s=t[n=e.required[i]];null==s&&this.fail("MissingRequiredParameter","Missing required key '"+n+"' in "+r)}for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var o=t[n],a=e.members[n];if(void 0!==a){var u=[r,n].join(".");this.validateMember(a,o,u)}else this.fail("UnexpectedParameter","Unexpected key '"+n+"' found in "+r)}return!0},validateMember:function(e,t,r){switch(e.type){case"structure":return this.validateStructure(e,t,r);case"list":return this.validateList(e,t,r);case"map":return this.validateMap(e,t,r);default:return this.validateScalar(e,t,r)}},validateList:function(e,t,r){if(this.validateType(t,r,[Array])){this.validateRange(e,t.length,r,"list member count");for(var n=0;n<t.length;n++)this.validateMember(e.member,t[n],r+"["+n+"]")}},validateMap:function(e,t,r){if(this.validateType(t,r,["object"],"map")){var n=0;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(this.validateMember(e.key,i,r+"[key='"+i+"']"),this.validateMember(e.value,t[i],r+"['"+i+"']"),n++);this.validateRange(e,n,r,"map member count")}},validateScalar:function(e,t,r){switch(e.type){case null:case void 0:case"string":return this.validateString(e,t,r);case"base64":case"binary":return this.validatePayload(t,r);case"integer":case"float":return this.validateNumber(e,t,r);case"boolean":return this.validateType(t,r,["boolean"]);case"timestamp":return this.validateType(t,r,[Date,/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/,"number"],"Date object, ISO-8601 string, or a UNIX timestamp");default:return this.fail("UnkownType","Unhandled type "+e.type+" for "+r)}},validateString:function(e,t,r){var n=["string"];e.isJsonValue&&(n=n.concat(["number","object","boolean"])),null!==t&&this.validateType(t,r,n)&&(this.validateEnum(e,t,r),this.validateRange(e,t.length,r,"string length"),this.validatePattern(e,t,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,n){this.validation.min&&void 0!==e.min&&t<e.min&&this.fail("MinRangeError","Expected "+n+" >= "+e.min+", but found "+t+" for "+r),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+n+" <= "+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(e,t,r,n){if(null==e)return!1;for(var i=!1,s=0;s<r.length;s++){if("string"==typeof r[s]){if(typeof e===r[s])return!0}else if(r[s]instanceof RegExp){if((e||"").toString().match(r[s]))return!0}else{if(e instanceof r[s])return!0;if(u.util.isType(e,r[s]))return!0;n||i||(r=r.slice()),r[s]=u.util.typeName(r[s])}i=!0}var o=n;o||(o=r.join(", ").replace(/,([^,]+)$/,", or$1"));var a=o.match(/^[aeiou]/i)?"n":"";return this.fail("InvalidParameterType","Expected "+t+" to be a"+a+" "+o),!1},validateNumber:function(e,t,r){if(null!=t){if("string"==typeof t){var n=parseFloat(t);n.toString()===t&&(t=n)}this.validateType(t,r,["number"])&&this.validateRange(e,t,r,"numeric value")}},validatePayload:function(e,t){if(null!=e&&"string"!=typeof e&&(!e||"number"!=typeof e.byteLength)){if(u.util.isNode()){var r=u.util.stream.Stream;if(u.util.Buffer.isBuffer(e)||e instanceof r)return}var n=["Buffer","Stream","File","Blob","ArrayBuffer","DataView"];if(e)for(var i=0;i<n.length;i++){if(u.util.isType(e,n[i]))return;if(u.util.typeName(e.constructor)===n[i])return}this.fail("InvalidParameterType","Expected "+t+" to be a string, Buffer, Stream, Blob, or typed array object")}}})},{"./core":38}],63:[function(e,t,r){var n=e("./collection"),i=e("./operation"),s=e("./shape"),o=e("./paginator"),a=e("./resource_waiter"),u=e("../util"),c=u.property,l=u.memoizedProperty;t.exports=function(t,r){t=t||{},(r=r||{}).api=this,t.metadata=t.metadata||{},c(this,"isApi",!0,!1),c(this,"apiVersion",t.metadata.apiVersion),c(this,"endpointPrefix",t.metadata.endpointPrefix),c(this,"signingName",t.metadata.signingName),c(this,"globalEndpoint",t.metadata.globalEndpoint),c(this,"signatureVersion",t.metadata.signatureVersion),c(this,"jsonVersion",t.metadata.jsonVersion),c(this,"targetPrefix",t.metadata.targetPrefix),c(this,"protocol",t.metadata.protocol),c(this,"timestampFormat",t.metadata.timestampFormat),c(this,"xmlNamespaceUri",t.metadata.xmlNamespace),c(this,"abbreviation",t.metadata.serviceAbbreviation),c(this,"fullName",t.metadata.serviceFullName),l(this,"className",function(){var e=t.metadata.serviceAbbreviation||t.metadata.serviceFullName;return e?("ElasticLoadBalancing"===(e=e.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g,""))&&(e="ELB"),e):null}),c(this,"operations",new n(t.operations,r,function(e,t){return new i(e,t,r)},u.string.lowerFirst)),c(this,"shapes",new n(t.shapes,r,function(e,t){return s.create(t,r)})),c(this,"paginators",new n(t.paginators,r,function(e,t){return new o(e,t,r)})),c(this,"waiters",new n(t.waiters,r,function(e,t){return new a(e,t,r)},u.string.lowerFirst)),r.documentation&&(c(this,"documentation",t.documentation),c(this,"documentationUrl",t.documentationUrl))}},{"../util":112,"./collection":64,"./operation":65,"./paginator":66,"./resource_waiter":67,"./shape":68}],67:[function(e,t,r){var i=e("../util"),s=i.property;t.exports=function(e,r,t){t=t||{},s(this,"name",e),s(this,"api",t.api,!1),r.operation&&s(this,"operation",i.string.lowerFirst(r.operation));var n=this;["type","description","delay","maxAttempts","acceptors"].forEach(function(e){var t=r[e];t&&s(n,e,t)})}},{"../util":112}],66:[function(e,t,r){var n=e("../util").property;t.exports=function(e,t){n(this,"inputToken",t.input_token),n(this,"limitKey",t.limit_key),n(this,"moreResults",t.more_results),n(this,"outputToken",t.output_token),n(this,"resultKey",t.result_key)}},{"../util":112}],65:[function(e,t,r){var s=e("./shape"),n=e("../util"),o=n.property,a=n.memoizedProperty;t.exports=function(e,r,n){var i=this;n=n||{},o(this,"name",r.name||e),o(this,"api",n.api,!1),r.http=r.http||{},o(this,"httpMethod",r.http.method||"POST"),o(this,"httpPath",r.http.requestUri||"/"),o(this,"authtype",r.authtype||""),a(this,"input",function(){return r.input?s.create(r.input,n):new s.create({type:"structure"},n)}),a(this,"output",function(){return r.output?s.create(r.output,n):new s.create({type:"structure"},n)}),a(this,"errors",function(){var e=[];if(!r.errors)return null;for(var t=0;t<r.errors.length;t++)e.push(s.create(r.errors[t],n));return e}),a(this,"paginator",function(){return n.api.paginators[e]}),n.documentation&&(o(this,"documentation",r.documentation),o(this,"documentationUrl",r.documentationUrl)),a(this,"idempotentMembers",function(){var e=[],t=i.input,r=t.members;if(!t.members)return e;for(var n in r)r.hasOwnProperty(n)&&!0===r[n].isIdempotent&&e.push(n);return e}),a(this,"hasEventOutput",function(){return function(e){var t=e.members,r=e.payload;if(!e.members)return!1;if(r){var n=t[r];return n.isEventStream}for(var i in t)if(!t.hasOwnProperty(i)&&!0===t[i].isEventStream)return!0;return!1}(i.output)})}},{"../util":112,"./shape":68}],59:[function(e,t,r){var n=e("./core"),i=n.util.inherit;n.Endpoint=i({constructor:function(e,t){if(n.util.hideProperties(this,["slashes","auth","hash","search","query"]),null==e)throw new Error("Invalid endpoint: "+e);if("string"!=typeof e)return n.util.copy(e);e.match(/^http/)||(e=((t&&void 0!==t.sslEnabled?t.sslEnabled:n.config.sslEnabled)?"https":"http")+"://"+e);n.util.update(this,n.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),n.HttpRequest=i({constructor:function(e,t){e=new n.Endpoint(e),this.method="POST",this.path=e.path||"/",this.headers={},this.body="",this.endpoint=e,this.region=t,this._userAgent="",this.setUserAgent()},setUserAgent:function(){this._userAgent=this.headers[this.getUserAgentHeaderName()]=n.util.userAgent()},getUserAgentHeaderName:function(){return(n.util.isBrowser()?"X-Amz-":"")+"User-Agent"},appendToUserAgent:function(e){"string"==typeof e&&e&&(this._userAgent+=" "+e),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=n.util.queryStringParse(e),n.util.queryParamsToString(e)):""}}),n.HttpResponse=i({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}}),n.HttpClient=i({}),n.HttpClient.getInstance=function(){return void 0===this.singleton&&(this.singleton=new this),this.singleton}},{"./core":38}],58:[function(c,e,t){var l=c("./core"),r=c("./sequential_executor");l.EventListeners={Core:{}},l.EventListeners={Core:(new r).addNamedListeners(function(e,t){t("VALIDATE_CREDENTIALS","validate",function(t,r){if(!t.service.api.signatureVersion)return r();t.service.config.getCredentials(function(e){e&&(t.response.error=l.util.error(e,{code:"CredentialsError",message:"Missing credentials in config"})),r()})}),e("VALIDATE_REGION","validate",function(e){e.service.config.region||e.service.isGlobalEndpoint||(e.response.error=l.util.error(new Error,{code:"ConfigError",message:"Missing region in config"}))}),e("BUILD_IDEMPOTENCY_TOKENS","validate",function(e){if(e.service.api.operations){var t=e.service.api.operations[e.operation];if(t){var r=t.idempotentMembers;if(r.length){for(var n=l.util.copy(e.params),i=0,s=r.length;i<s;i++)n[r[i]]||(n[r[i]]=l.util.uuid.v4());e.params=n}}}}),e("VALIDATE_PARAMETERS","validate",function(e){if(e.service.api.operations){var t=e.service.api.operations[e.operation].input,r=e.service.config.paramValidation;new l.ParamValidator(r).validate(t,e.params)}}),t("COMPUTE_SHA256","afterBuild",function(r,n){if(r.haltHandlersOnError(),r.service.api.operations){var e=r.service.api.operations[r.operation],t=e?e.authtype:"";if(!r.service.api.signatureVersion&&!t)return n();if(r.service.getSignerClass(r)===l.Signers.V4){var i=r.httpRequest.body||"";if(0<=t.indexOf("unsigned-body"))return r.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",n();l.util.computeSha256(i,function(e,t){e?n(e):(r.httpRequest.headers["X-Amz-Content-Sha256"]=t,n())})}else n()}}),e("SET_CONTENT_LENGTH","afterBuild",function(e){var t=function(e){if(!e.service.api.operations)return"";var t=e.service.api.operations[e.operation];return t?t.authtype:""}(e);if(void 0===e.httpRequest.headers["Content-Length"])try{var r=l.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=r}catch(e){if(-1===t.indexOf("unsigned-body"))throw e;return}}),e("SET_HTTP_HOST","afterBuild",function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host}),e("RESTART","restart",function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new l.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount<this.service.config.maxRetries?this.response.retryCount++:this.response.error=null)}),t("SIGN","sign",function(i,s){var o=i.service,a=(i.service.api.operations||{})[i.operation],e=a?a.authtype:"";if(!o.api.signatureVersion&&!e)return s();o.config.getCredentials(function(e,t){if(e)return i.response.error=e,s();try{var r=o.getSkewCorrectedDate(),n=new(o.getSignerClass(i))(i.httpRequest,o.api.signingName||o.api.endpointPrefix,{signatureCache:o.config.signatureCache,operation:a});n.setServiceClientId(o._clientId),delete i.httpRequest.headers.Authorization,delete i.httpRequest.headers.Date,delete i.httpRequest.headers["X-Amz-Date"],n.addAuthorization(t,r),i.signedAt=r}catch(e){i.response.error=e}s()})}),e("VALIDATE_RESPONSE","validateResponse",function(e){this.service.successfulResponse(e,this)?(e.data={},e.error=null):(e.data=null,e.error=l.util.error(new Error,{code:"UnknownError",message:"An unknown error occurred."}))}),t("SEND","send",function(o,a){function i(n){o.httpResponse.stream=n;var e=o.request.httpRequest.stream,i=o.request.service,t=i.api,r=o.request.operation,s=t.operations[r]||{};n.on("headers",function(e,t,r){if(o.request.emit("httpHeaders",[e,t,o,r]),!o.httpResponse.streaming)if(2===l.HttpClient.streamsApiVersion){if(s.hasEventOutput&&i.successfulResponse(o))return o.request.emit("httpDone"),void a();n.on("readable",function(){var e=n.read();null!==e&&o.request.emit("httpData",[e,o])})}else n.on("data",function(e){o.request.emit("httpData",[e,o])})}),n.on("end",function(){if(!e||!e.didCallback){if(2===l.HttpClient.streamsApiVersion&&s.hasEventOutput&&i.successfulResponse(o))return;o.request.emit("httpDone"),a()}})}function s(e){if("RequestAbortedError"!==e.code){var t="TimeoutError"===e.code?e.code:"NetworkingError";e=l.util.error(e,{code:t,region:o.request.httpRequest.region,hostname:o.request.httpRequest.endpoint.hostname,retryable:!0})}o.error=e,o.request.emit("httpError",[o.error,o],function(){a()})}function t(){var e,t=l.HttpClient.getInstance(),r=o.request.service.config.httpOptions||{};try{var n=t.handleRequest(o.request.httpRequest,r,i,s);(e=n).on("sendProgress",function(e){o.request.emit("httpUploadProgress",[e,o])}),e.on("receiveProgress",function(e){o.request.emit("httpDownloadProgress",[e,o])})}catch(e){s(e)}}o.httpResponse._abortCallback=a,o.error=null,o.data=null,600<=(o.request.service.getSkewCorrectedDate()-this.signedAt)/1e3?this.emit("sign",[this],function(e){e?a(e):t()}):t()}),e("HTTP_HEADERS","httpHeaders",function(e,t,r,n){r.httpResponse.statusCode=e,r.httpResponse.statusMessage=n,r.httpResponse.headers=t,r.httpResponse.body=new l.util.Buffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0;var i=t.date||t.Date,s=r.request.service;if(i){var o=Date.parse(i);s.config.correctClockSkew&&s.isClockSkewed(o)&&s.applyClockOffset(o)}}),e("HTTP_DATA","httpData",function(e,t){if(e){if(l.util.isNode()){t.httpResponse.numBytes+=e.length;var r=t.httpResponse.headers["content-length"],n={loaded:t.httpResponse.numBytes,total:r};t.request.emit("httpDownloadProgress",[n,t])}t.httpResponse.buffers.push(new l.util.Buffer(e))}}),e("HTTP_DONE","httpDone",function(e){if(e.httpResponse.buffers&&0<e.httpResponse.buffers.length){var t=l.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers}),e("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)))}),e("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}}),e("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)}),e("CLOCK_SKEWED","retry",function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&(e.error.retryable=!0)}),e("REDIRECT","retry",function(e){e.error&&300<=e.error.statusCode&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new l.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,e.error.redirect=!0,e.error.retryable=!0)}),e("RETRY_CHECK","retry",function(e){e.error&&(e.error.redirect&&e.redirectCount<e.maxRedirects?e.error.retryDelay=0:e.retryCount<e.maxRetries&&(e.error.retryDelay=this.service.retryDelays(e.retryCount)||0))}),t("RESET_RETRY_STATE","afterRetry",function(e,t){var r,n=!1;e.error&&(r=e.error.retryDelay||0,e.error.retryable&&e.retryCount<e.maxRetries?(e.retryCount++,n=!0):e.error.redirect&&e.redirectCount<e.maxRedirects&&(e.redirectCount++,n=!0)),n?(e.error=null,setTimeout(t,r)):t()})}),CorePost:(new r).addNamedListeners(function(e){e("EXTRACT_REQUEST_ID","extractData",l.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",l.util.extractRequestId),e("ENOTFOUND_ERROR","httpError",function(e){if("NetworkingError"===e.code&&"ENOTFOUND"===e.errno){var t="Inaccessible host: `"+e.hostname+"'. This service may not be available in the `"+e.region+"' region.";this.response.error=l.util.error(new Error(t),{code:"UnknownEndpoint",region:e.region,hostname:e.hostname,retryable:!0,originalError:e})}})}),Logger:(new r).addNamedListeners(function(e){e("LOG_REQUEST","complete",function(o){var a=o.request,u=a.service.config.logger;if(u){var e=function(){var e=(o.request.service.getSkewCorrectedDate().getTime()-a.startTime.getTime())/1e3,t=!!u.isTTY,r=o.httpResponse.statusCode,n=a.params;a.service.api.operations&&a.service.api.operations[a.operation]&&a.service.api.operations[a.operation].input&&(n=function r(n,e){if(!e)return e;switch(n.type){case"structure":var i={};return l.util.each(e,function(e,t){Object.prototype.hasOwnProperty.call(n.members,e)?i[e]=r(n.members[e],t):i[e]=t}),i;case"list":var s=[];return l.util.arrayEach(e,function(e,t){s.push(r(n.member,e))}),s;case"map":var o={};return l.util.each(e,function(e,t){o[e]=r(n.value,t)}),o;default:return n.isSensitive?"***SensitiveInformation***":e}}(a.service.api.operations[a.operation].input,a.params));var i=c("util").inspect(n,!0,null),s="";return t&&(s+="[33m"),s+="[AWS "+a.service.serviceIdentifier+" "+r,s+=" "+e.toString()+"s "+o.retryCount+" retries]",t&&(s+="[0;1m"),s+=" "+l.util.string.lowerFirst(a.operation),s+="("+i+")",t&&(s+="[0m"),s}();"function"==typeof u.log?u.log(e):"function"==typeof u.write&&u.write(e+"\n")}})}),Json:(new r).addNamedListeners(function(e){var t=c("./protocol/json");e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),Rest:(new r).addNamedListeners(function(e){var t=c("./protocol/rest");e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),RestJson:(new r).addNamedListeners(function(e){var t=c("./protocol/rest_json");e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),RestXml:(new r).addNamedListeners(function(e){var t=c("./protocol/rest_xml");e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),Query:(new r).addNamedListeners(function(e){var t=c("./protocol/query");e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})}},{"./core":38,"./protocol/json":71,"./protocol/query":72,"./protocol/rest":73,"./protocol/rest_json":74,"./protocol/rest_xml":75,"./sequential_executor":84,util:20}],84:[function(e,t,r){var u=e("./core");u.SequentialExecutor=u.util.inherit({constructor:function(){this._events={}},listeners:function(e){return this._events[e]?this._events[e].slice(0):[]},on:function(e,t){return this._events[e]?this._events[e].push(t):this._events[e]=[t],this},onAsync:function(e,t){return t._isAsync=!0,this.on(e,t)},removeListener:function(e,t){var r=this._events[e];if(r){for(var n=r.length,i=-1,s=0;s<n;++s)r[s]===t&&(i=s);-1<i&&r.splice(i,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,r){r||(r=function(){});var n=this.listeners(e),i=n.length;return this.callListeners(n,t,r),0<i},callListeners:function(t,r,n,e){var i=this,s=e||null;function o(e){if(e&&(s=u.util.error(s||new Error,e),i._haltHandlersOnError))return n.call(i,s);i.callListeners(t,r,n,s)}for(;0<t.length;){var a=t.shift();if(a._isAsync)return void a.apply(i,r.concat([o]));try{a.apply(i,r)}catch(e){s=u.util.error(s||new Error,e)}if(s&&i._haltHandlersOnError)return void n.call(i,s)}n.call(i,s)},addListeners:function(e){var r=this;return e._events&&(e=e._events),u.util.each(e,function(t,e){"function"==typeof e&&(e=[e]),u.util.arrayEach(e,function(e){r.on(t,e)})}),r},addNamedListener:function(e,t,r){return this[e]=r,this.addListener(t,r),this},addNamedAsyncListener:function(e,t,r){return r._isAsync=!0,this.addNamedListener(e,t,r)},addNamedListeners:function(e){var t=this;return e(function(){t.addNamedListener.apply(t,arguments)},function(){t.addNamedAsyncListener.apply(t,arguments)}),this}}),u.SequentialExecutor.prototype.addListener=u.SequentialExecutor.prototype.on,t.exports=u.SequentialExecutor},{"./core":38}],75:[function(e,t,r){var c=e("../core"),l=e("../util"),h=e("./rest");t.exports={buildRequest:function(e){h.buildRequest(e),["GET","HEAD"].indexOf(e.httpRequest.method)<0&&function(e){var t=e.service.api.operations[e.operation].input,r=new c.XML.Builder,n=e.params,i=t.payload;if(i){var s=t.members[i];if(void 0===(n=n[i]))return;if("structure"===s.type){var o=s.name;e.httpRequest.body=r.toXML(n,s,o,!0)}else e.httpRequest.body=n}else e.httpRequest.body=r.toXML(n,t,t.name||t.shape||l.string.upperFirst(e.operation)+"Request")}(e)},extractError:function(t){var r;h.extractError(t);try{r=(new c.XML.Parser).parse(t.httpResponse.body.toString())}catch(e){r={Code:t.httpResponse.statusCode,Message:t.httpResponse.statusMessage}}r.Errors&&(r=r.Errors),r.Error&&(r=r.Error),r.Code?t.error=l.error(new Error,{code:r.Code,message:r.Message}):t.error=l.error(new Error,{code:t.httpResponse.statusCode,message:null})},extractData:function(e){var t;h.extractData(e);var r=e.request,n=e.httpResponse.body,i=r.service.api.operations[r.operation],s=i.output,o=(i.hasEventOutput,s.payload);if(o){var a=s.members[o];a.isEventStream?(t=new c.XML.Parser,e.data[o]=l.createEventStream(2===c.HttpClient.streamsApiVersion?e.httpResponse.stream:e.httpResponse.body,t,a)):"structure"===a.type?(t=new c.XML.Parser,e.data[o]=t.parse(n.toString(),a)):"binary"===a.type||a.isStreaming?e.data[o]=n:e.data[o]=a.toType(n)}else if(0<n.length){var u=(t=new c.XML.Parser).parse(n.toString(),s);l.update(e.data,u)}}}},{"../core":38,"../util":112,"./rest":73}],74:[function(e,t,r){var u=e("../util"),c=e("./rest"),l=e("./json"),s=e("../json/builder"),h=e("../json/parser");function o(e,t){e.service.api.operations[e.operation].input;if(!e.httpRequest.headers["Content-Type"]){var r=t?"binary/octet-stream":"application/json";e.httpRequest.headers["Content-Type"]=r}}t.exports={buildRequest:function(e){c.buildRequest(e),["GET","HEAD","DELETE"].indexOf(e.httpRequest.method)<0&&function(e){var t=new s,r=e.service.api.operations[e.operation].input;if(r.payload){var n,i=r.members[r.payload];if(void 0===(n=e.params[r.payload]))return;"structure"===i.type?(e.httpRequest.body=t.build(n,i),o(e)):(e.httpRequest.body=n,("binary"===i.type||i.isStreaming)&&o(e,!0))}else e.httpRequest.body=t.build(e.params,r),o(e)}(e)},extractError:function(e){l.extractError(e)},extractData:function(e){c.extractData(e);var t=e.request,r=t.service.api.operations[t.operation],n=t.service.api.operations[t.operation].output||{};if(r.hasEventOutput,n.payload){var i=n.members[n.payload],s=e.httpResponse.body;if(i.isEventStream)o=new h,e.data[payload]=u.createEventStream(2===AWS.HttpClient.streamsApiVersion?e.httpResponse.stream:s,o,i);else if("structure"===i.type||"list"===i.type){var o=new h;e.data[n.payload]=o.parse(s,i)}else"binary"===i.type||i.isStreaming?e.data[n.payload]=s:e.data[n.payload]=i.toType(s)}else{var a=e.data;l.extractData(e),e.data=u.merge(a,e.data)}}}},{"../json/builder":61,"../json/parser":62,"../util":112,"./json":71,"./rest":73}],73:[function(e,t,r){var c=e("../util");function u(e,t,r,i){var s=[e,t].join("/");s=s.replace(/\/+/g,"/");var o={},a=!1;if(c.each(r.members,function(e,t){var r=i[e];if(null!=r)if("uri"===t.location){var n=new RegExp("\\{"+t.name+"(\\+)?\\}");s=s.replace(n,function(e,t){return(t?c.uriEscapePath:c.uriEscape)(String(r))})}else"querystring"===t.location&&(a=!0,"list"===t.type?o[t.name]=r.map(function(e){return c.uriEscape(String(e))}):"map"===t.type?c.each(r,function(e,t){Array.isArray(t)?o[e]=t.map(function(e){return c.uriEscape(String(e))}):o[e]=c.uriEscape(String(t))}):o[t.name]=c.uriEscape(String(r)))}),a){s+=0<=s.indexOf("?")?"&":"?";var n=[];c.arrayEach(Object.keys(o).sort(),function(e){Array.isArray(o[e])||(o[e]=[o[e]]);for(var t=0;t<o[e].length;t++)n.push(c.uriEscape(String(e))+"="+o[e][t])}),s+=n.join("&")}return s}t.exports={buildRequest:function(e){var t,r,n,i,s,o,a;(t=e).httpRequest.method=t.service.api.operations[t.operation].httpMethod,n=(r=e).service.api.operations[r.operation],i=n.input,s=u(r.httpRequest.endpoint.path,n.httpPath,i,r.params),r.httpRequest.path=s,a=(o=e).service.api.operations[o.operation],c.each(a.input.members,function(e,r){var t=o.params[e];null!=t&&("headers"===r.location&&"map"===r.type?c.each(t,function(e,t){o.httpRequest.headers[r.name+e]=t}):"header"===r.location&&(t=r.toWireFormat(t).toString(),r.isJsonValue&&(t=c.base64.encode(t)),o.httpRequest.headers[r.name]=t))})},extractError:function(){},extractData:function(e){var t=e.request,o={},a=e.httpResponse,r=t.service.api.operations[t.operation].output,u={};c.each(a.headers,function(e,t){u[e.toLowerCase()]=t}),c.each(r.members,function(n,e){var t=(e.name||n).toLowerCase();if("headers"===e.location&&"map"===e.type){o[n]={};var r=e.isLocationName?e.name:"",i=new RegExp("^"+r+"(.+)","i");c.each(a.headers,function(e,t){var r=e.match(i);null!==r&&(o[n][r[1]]=t)})}else if("header"===e.location){if(void 0!==u[t]){var s=e.isJsonValue?c.base64.decode(u[t]):u[t];o[n]=e.toType(s)}}else"statusCode"===e.location&&(o[n]=parseInt(a.statusCode,10))}),e.data=o},generateURI:u}},{"../util":112}],72:[function(e,t,r){var u=e("../core"),c=e("../util"),n=e("../query/query_param_serializer"),l=e("../model/shape");t.exports={buildRequest:function(e){var t=e.service.api.operations[e.operation],r=e.httpRequest;r.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",r.params={Version:e.service.api.apiVersion,Action:t.name},(new n).serialize(e.params,t.input,function(e,t){r.params[e]=t}),r.body=c.queryParamsToString(r.params)},extractError:function(t){var r,e=t.httpResponse.body.toString();if(e.match("<UnknownOperationException"))r={Code:"UnknownOperation",Message:"Unknown operation "+t.request.operation};else try{r=(new u.XML.Parser).parse(e)}catch(e){r={Code:t.httpResponse.statusCode,Message:t.httpResponse.statusMessage}}r.requestId&&!t.requestId&&(t.requestId=r.requestId),r.Errors&&(r=r.Errors),r.Error&&(r=r.Error),r.Code?t.error=c.error(new Error,{code:r.Code,message:r.Message}):t.error=c.error(new Error,{code:t.httpResponse.statusCode,message:null})},extractData:function(e){var t=e.request,r=t.service.api.operations[t.operation].output||{},n=r;if(n.resultWrapper){var i=l.create({type:"structure"});i.members[n.resultWrapper]=r,i.memberNames=[n.resultWrapper],c.property(r,"name",r.resultWrapper),r=i}var s=new u.XML.Parser;if(r&&r.members&&!r.members._XAMZRequestId){var o=l.create({type:"string"},{api:{protocol:"query"}},"requestId");r.members._XAMZRequestId=o}var a=s.parse(e.httpResponse.body.toString(),r);e.requestId=a._XAMZRequestId||a.requestId,a._XAMZRequestId&&delete a._XAMZRequestId,n.resultWrapper&&a[n.resultWrapper]&&(c.update(a,a[n.resultWrapper]),delete a[n.resultWrapper]),e.data=a}}},{"../core":38,"../model/shape":68,"../query/query_param_serializer":76,"../util":112}],76:[function(e,t,r){var c=e("../util");function n(){}function l(e){return e.isQueryName||"ec2"!==e.api.protocol?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function h(i,s,e,o){c.each(e.members,function(e,t){var r=s[e];if(null!=r){var n=l(t);p(n=i?i+"."+n:n,r,t,o)}})}function p(e,t,r,n){var s,i,o,a,u;null!=t&&("structure"===r.type?h(e,t,r,n):"list"===r.type?function(i,e,s,o){var a=s.member||{};0!==e.length?c.arrayEach(e,function(e,t){var r="."+(t+1);if("ec2"===s.api.protocol)r+="";else if(s.flattened){if(a.name){var n=i.split(".");n.pop(),n.push(l(a)),i=n.join(".")}}else r="."+(a.name?a.name:"member")+r;p(i+r,e,a,o)}):o.call(this,i,null)}(e,t,r,n):"map"===r.type?(s=e,i=t,o=r,a=n,u=1,c.each(i,function(e,t){var r=(o.flattened?".":".entry.")+u+++".",n=r+(o.key.name||"key"),i=r+(o.value.name||"value");p(s+n,e,o.key,a),p(s+i,t,o.value,a)})):n(e,r.toWireFormat(t).toString()))}n.prototype.serialize=function(e,t,r){h("",e,t,r)},t.exports=n},{"../util":112}],68:[function(e,t,r){var o=e("./collection"),n=e("../util");function a(e,t,r){null!=r&&n.property.apply(this,arguments)}function u(e,t){e.constructor.prototype[t]||n.memoizedProperty.apply(this,arguments)}function c(e,t,r){t=t||{},a(this,"shape",e.shape),a(this,"api",t.api,!1),a(this,"type",e.type),a(this,"enum",e.enum),a(this,"min",e.min),a(this,"max",e.max),a(this,"pattern",e.pattern),a(this,"location",e.location||this.location||"body"),a(this,"name",this.name||e.xmlName||e.queryName||e.locationName||r),a(this,"isStreaming",e.streaming||this.isStreaming||!1),a(this,"isComposite",e.isComposite||!1),a(this,"isShape",!0,!1),a(this,"isQueryName",Boolean(e.queryName),!1),a(this,"isLocationName",Boolean(e.locationName),!1),a(this,"isIdempotent",!0===e.idempotencyToken),a(this,"isJsonValue",!0===e.jsonvalue),a(this,"isSensitive",!0===e.sensitive||e.prototype&&!0===e.prototype.sensitive),a(this,"isEventStream",Boolean(e.eventstream),!1),a(this,"isEvent",Boolean(e.event),!1),a(this,"isEventPayload",Boolean(e.eventpayload),!1),a(this,"isEventHeader",Boolean(e.eventheader),!1),t.documentation&&(a(this,"documentation",e.documentation),a(this,"documentationUrl",e.documentationUrl)),e.xmlAttribute&&a(this,"isXmlAttribute",e.xmlAttribute||!1),a(this,"defaultValue",null),this.toWireFormat=function(e){return null==e?"":e},this.toType=function(e){return e}}function l(e){c.apply(this,arguments),a(this,"isComposite",!0),e.flattened&&a(this,"flattened",e.flattened||!1)}function i(r,n){var s=this,i=null,e=!this.isShape;l.apply(this,arguments),e&&(a(this,"defaultValue",function(){return{}}),a(this,"members",{}),a(this,"memberNames",[]),a(this,"required",[]),a(this,"isRequired",function(){return!1})),r.members&&(a(this,"members",new o(r.members,n,function(e,t){return c.create(t,n,e)})),u(this,"memberNames",function(){return r.xmlOrder||Object.keys(r.members)}),r.event&&(u(this,"eventPayloadMemberName",function(){for(var e=s.members,t=s.memberNames,r=0,n=t.length;r<n;r++)if(e[t[r]].isEventPayload)return t[r]}),u(this,"eventHeaderMemberNames",function(){for(var e=s.members,t=s.memberNames,r=[],n=0,i=t.length;n<i;n++)e[t[n]].isEventHeader&&r.push(t[n]);return r}))),r.required&&(a(this,"required",r.required),a(this,"isRequired",function(e){if(!i){i={};for(var t=0;t<r.required.length;t++)i[r.required[t]]=!0}return i[e]},!1,!0)),a(this,"resultWrapper",r.resultWrapper||null),r.payload&&a(this,"payload",r.payload),"string"==typeof r.xmlNamespace?a(this,"xmlNamespaceUri",r.xmlNamespace):"object"==typeof r.xmlNamespace&&(a(this,"xmlNamespacePrefix",r.xmlNamespace.prefix),a(this,"xmlNamespaceUri",r.xmlNamespace.uri))}function s(e,t){var r=this,n=!this.isShape;if(l.apply(this,arguments),n&&a(this,"defaultValue",function(){return[]}),e.member&&u(this,"member",function(){return c.create(e.member,t)}),this.flattened){var i=this.name;u(this,"name",function(){return r.member.name||i})}}function h(e,t){var r=!this.isShape;l.apply(this,arguments),r&&(a(this,"defaultValue",function(){return{}}),a(this,"key",c.create({type:"string"},t)),a(this,"value",c.create({type:"string"},t))),e.key&&u(this,"key",function(){return c.create(e.key,t)}),e.value&&u(this,"value",function(){return c.create(e.value,t)})}function p(){c.apply(this,arguments);var t=["rest-xml","query","ec2"];this.toType=function(e){return e=this.api&&-1<t.indexOf(this.api.protocol)?e||"":e,this.isJsonValue?JSON.parse(e):e&&"function"==typeof e.toString?e.toString():e},this.toWireFormat=function(e){return this.isJsonValue?JSON.stringify(e):e}}function f(){c.apply(this,arguments),this.toType=n.base64.decode,this.toWireFormat=n.base64.encode}function d(){f.apply(this,arguments)}function m(){c.apply(this,arguments),this.toType=function(e){return"boolean"==typeof e?e:null==e?null:"true"===e}}c.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},c.types={structure:i,list:s,map:h,boolean:m,timestamp:function(e){var t=this;if(c.apply(this,arguments),"header"===this.location)a(this,"timestampFormat","rfc822");else if(e.timestampFormat)a(this,"timestampFormat",e.timestampFormat);else if(!this.timestampFormat&&this.api)if(this.api.timestampFormat)a(this,"timestampFormat",this.api.timestampFormat);else switch(this.api.protocol){case"json":case"rest-json":a(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":a(this,"timestampFormat","iso8601")}this.toType=function(e){return null==e?null:"function"==typeof e.toUTCString?e:"string"==typeof e||"number"==typeof e?n.date.parseTimestamp(e):null},this.toWireFormat=function(e){return n.date.format(e,t.timestampFormat)}},float:function(){c.apply(this,arguments),this.toType=function(e){return null==e?null:parseFloat(e)},this.toWireFormat=this.toType},integer:function(){c.apply(this,arguments),this.toType=function(e){return null==e?null:parseInt(e,10)},this.toWireFormat=this.toType},string:p,base64:d,binary:f},c.resolve=function(e,t){if(e.shape){var r=t.api.shapes[e.shape];if(!r)throw new Error("Cannot find shape reference: "+e.shape);return r}return null},c.create=function(e,t,r){if(e.isShape)return e;var n=c.resolve(e,t);if(n){var i=Object.keys(e);t.documentation||(i=i.filter(function(e){return!e.match(/documentation/)}));var s=function(){n.constructor.call(this,e,t,r)};return s.prototype=n,new s}e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var o=e.type;if(c.normalizedTypes[e.type]&&(e.type=c.normalizedTypes[e.type]),c.types[e.type])return new c.types[e.type](e,t,r);throw new Error("Unrecognized shape type: "+o)},c.shapes={StructureShape:i,ListShape:s,MapShape:h,StringShape:p,BooleanShape:m,Base64Shape:d},t.exports=c},{"../util":112,"./collection":64}],64:[function(e,t,r){var i=e("../util").memoizedProperty;function s(e,t,r,n){i(this,n(e),function(){return r(e,t)})}t.exports=function(e,t,r,n){for(var i in n=n||String,e)Object.prototype.hasOwnProperty.call(e,i)&&s.call(this,i,e[i],r,n)}},{"../util":112}],71:[function(e,t,r){var i=e("../util"),a=e("../json/builder"),s=e("../json/parser");t.exports={buildRequest:function(e){var t=e.httpRequest,r=e.service.api,n=r.targetPrefix+"."+r.operations[e.operation].name,i=r.jsonVersion||"1.0",s=r.operations[e.operation].input,o=new a;1===i&&(i="1.0"),t.body=o.build(e.params||{},s),t.headers["Content-Type"]="application/x-amz-json-"+i,t.headers["X-Amz-Target"]=n},extractError:function(e){var t={},r=e.httpResponse;if(t.code=r.headers["x-amzn-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),0<r.body.length)try{var n=JSON.parse(r.body.toString());(n.__type||n.code)&&(t.code=(n.__type||n.code).split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=n.message||n.Message||null}catch(n){t.statusCode=r.statusCode,t.message=r.statusMessage}else t.statusCode=r.statusCode,t.message=r.statusCode.toString();e.error=i.error(new Error,t)},extractData:function(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var r=e.request.service.api.operations[e.request.operation].output||{},n=new s;e.data=n.parse(t,r)}}}},{"../json/builder":61,"../json/parser":62,"../util":112}],62:[function(e,t,r){var o=e("../util");function n(){}function a(e,t){var r;if(t&&void 0!==e)switch(t.type){case"structure":return function(i,e){if(null==i)return;var s={},t=e.members;return o.each(t,function(e,t){var r=t.isLocationName?t.name:e;if(Object.prototype.hasOwnProperty.call(i,r)){var n=a(i[r],t);void 0!==n&&(s[e]=n)}}),s}(e,t);case"map":return function(e,n){if(null==e)return;var i={};return o.each(e,function(e,t){var r=a(t,n.value);i[e]=void 0===r?null:r}),i}(e,t);case"list":return function(e,r){if(null==e)return;var n=[];return o.arrayEach(e,function(e){var t=a(e,r.member);void 0===t?n.push(null):n.push(t)}),n}(e,t);default:return r=e,t.toType(r)}}n.prototype.parse=function(e,t){return a(JSON.parse(e),t)},t.exports=n},{"../util":112}],61:[function(e,t,r){var p=e("../util");function n(){}function f(e,t){var r,n,i,s,o,a,u,c,l,h;if(t&&null!=e)switch(t.type){case"structure":return c=e,l=t,h={},p.each(c,function(e,t){var r=l.members[e];if(r){if("body"!==r.location)return;var n=r.isLocationName?r.name:e,i=f(t,r);void 0!==i&&(h[n]=i)}}),h;case"map":return o=e,a=t,u={},p.each(o,function(e,t){var r=f(t,a.value);void 0!==r&&(u[e]=r)}),u;case"list":return n=e,i=t,s=[],p.arrayEach(n,function(e){var t=f(e,i.member);void 0!==t&&s.push(t)}),s;default:return r=e,t.toWireFormat(r)}}n.prototype.build=function(e,t){return JSON.stringify(f(e,t))},t.exports=n},{"../util":112}],112:[function(s,e,t){(function(t,r){var u,l={environment:"nodejs",engine:function(){if(l.isBrowser()&&"undefined"!=typeof navigator)return navigator.userAgent;var e=t.platform+"/"+t.version;return t.env.AWS_EXECUTION_ENV&&(e+=" exec-env/"+t.env.AWS_EXECUTION_ENV),e},userAgent:function(){var e=l.environment,t="aws-sdk-"+e+"/"+s("./core").VERSION;return"nodejs"===e&&(t+=" "+l.engine()),t},isBrowser:function(){return t&&t.browser},isNode:function(){return!l.isBrowser()},uriEscape:function(e){var t=encodeURIComponent(e);return t=(t=t.replace(/[^A-Za-z0-9_.~\-%]+/g,escape)).replace(/[*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},uriEscapePath:function(e){var t=[];return l.arrayEach(e.split("/"),function(e){t.push(l.uriEscape(e))}),t.join("/")},urlParse:function(e){return l.url.parse(e)},urlFormat:function(e){return l.url.format(e)},queryStringParse:function(e){return l.querystring.parse(e)},queryParamsToString:function(s){var o=[],a=l.uriEscape,e=Object.keys(s).sort();return l.arrayEach(e,function(e){var t=s[e],r=a(e),n=r+"=";if(Array.isArray(t)){var i=[];l.arrayEach(t,function(e){i.push(a(e))}),n=r+"="+i.sort().join("&"+r+"=")}else null!=t&&(n=r+"="+a(t));o.push(n)}),o.join("&")},readFileSync:function(e){return l.isBrowser()?null:s("fs").readFileSync(e,"utf-8")},base64:{encode:function(e){if("number"==typeof e)throw l.error(new Error("Cannot base64 encode number "+e));return null==e?e:("function"==typeof l.Buffer.from&&l.Buffer.from!==Uint8Array.from?l.Buffer.from(e):new l.Buffer(e)).toString("base64")},decode:function(e){if("number"==typeof e)throw l.error(new Error("Cannot base64 decode number "+e));return null==e?e:"function"==typeof l.Buffer.from&&l.Buffer.from!==Uint8Array.from?l.Buffer.from(e,"base64"):new l.Buffer(e,"base64")}},buffer:{toStream:function(r){l.Buffer.isBuffer(r)||(r=new l.Buffer(r));var n=new l.stream.Readable,i=0;return n._read=function(e){if(i>=r.length)return n.push(null);var t=i+e;t>r.length&&(t=r.length),n.push(r.slice(i,t)),i=t},n},concat:function(e){var t,r,n=0,i=0;for(r=0;r<e.length;r++)n+=e[r].length;for(t=new l.Buffer(n),r=0;r<e.length;r++)e[r].copy(t,i),i+=e[r].length;return t}},string:{byteLength:function(e){if(null==e)return 0;if("string"==typeof e&&(e=new l.Buffer(e)),"number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.length)return e.length;if("number"==typeof e.size)return e.size;if("string"==typeof e.path)return s("fs").lstatSync(e.path).size;throw l.error(new Error("Cannot determine length of "+e),{object:e})},upperFirst:function(e){return e[0].toUpperCase()+e.substr(1)},lowerFirst:function(e){return e[0].toLowerCase()+e.substr(1)}},ini:{parse:function(e){var n,i={};return l.arrayEach(e.split(/\r?\n/),function(e){var t=(e=e.split(/(^|\s)[;#]/)[0]).match(/^\s*\[([^\[\]]+)\]\s*$/);if(t)n=t[1];else if(n){var r=e.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/);r&&(i[n]=i[n]||{},i[n][r[1]]=r[2])}}),i}},fn:{noop:function(){},makeAsync:function(t,e){return e&&e<=t.length?t:function(){var e=Array.prototype.slice.call(arguments,0);e.pop()(t.apply(null,e))}}},date:{getDate:function(){return u||(u=s("./core")),u.config.systemClockOffset?new Date((new Date).getTime()+u.config.systemClockOffset):new Date},iso8601:function(e){return void 0===e&&(e=l.date.getDate()),e.toISOString().replace(/\.\d{3}Z$/,"Z")},rfc822:function(e){return void 0===e&&(e=l.date.getDate()),e.toUTCString()},unixTimestamp:function(e){return void 0===e&&(e=l.date.getDate()),e.getTime()/1e3},from:function(e){return"number"==typeof e?new Date(1e3*e):new Date(e)},format:function(e,t){return t||(t="iso8601"),l.date[t](l.date.from(e))},parseTimestamp:function(e){if("number"==typeof e)return new Date(1e3*e);if(e.match(/^\d+$/))return new Date(1e3*e);if(e.match(/^\d{4}/))return new Date(e);if(e.match(/^\w{3},/))return new Date(e);throw l.error(new Error("unhandled timestamp format: "+e),{code:"TimestampParserError"})}},crypto:{crc32Table:[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],crc32:function(e){var t=l.crypto.crc32Table,r=-1;"string"==typeof e&&(e=new l.Buffer(e));for(var n=0;n<e.length;n++){r=r>>>8^t[255&(r^e.readUInt8(n))]}return(-1^r)>>>0},hmac:function(e,t,r,n){return r||(r="binary"),"buffer"===r&&(r=void 0),n||(n="sha256"),"string"==typeof t&&(t=new l.Buffer(t)),l.crypto.lib.createHmac(n,e).update(t).digest(r)},md5:function(e,t,r){return l.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return l.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,n){var i=l.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof t&&(t=new l.Buffer(t));var s=l.arraySliceFn(t),o=l.Buffer.isBuffer(t);if(l.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(o=!0),n&&"object"==typeof t&&"function"==typeof t.on&&!o)t.on("data",function(e){i.update(e)}),t.on("error",function(e){n(e)}),t.on("end",function(){n(null,i.digest(r))});else{if(!n||!s||o||"undefined"==typeof FileReader){l.isBrowser()&&"object"==typeof t&&!o&&(t=new l.Buffer(new Uint8Array(t)));var a=i.update(t).digest(r);return n&&n(null,a),a}var u=0,c=new FileReader;c.onerror=function(){n(new Error("Failed to read data."))},c.onload=function(){var e=new l.Buffer(new Uint8Array(c.result));i.update(e),u+=e.length,c._continueReading()},c._continueReading=function(){if(u>=t.size)n(null,i.digest(r));else{var e=u+524288;e>t.size&&(e=t.size),c.readAsArrayBuffer(s.call(t,u,e))}},c._continueReading()}},toHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push(("0"+e.charCodeAt(r).toString(16)).substr(-2,2));return t.join("")},createHash:function(e){return l.crypto.lib.createHash(e)}},abort:{},each:function(e,t){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))if(t.call(this,r,e[r])===l.abort)break}},arrayEach:function(e,t){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))if(t.call(this,e[r],parseInt(r,10))===l.abort)break}},update:function(r,e){return l.each(e,function(e,t){r[e]=t}),r},merge:function(e,t){return l.update(l.copy(e),t)},copy:function(e){if(null==e)return e;var t={};for(var r in e)t[r]=e[r];return t},isEmpty:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},arraySliceFn:function(e){var t=e.slice||e.webkitSlice||e.mozSlice;return"function"==typeof t?t:null},isType:function(e,t){return"function"==typeof t&&(t=l.typeName(t)),Object.prototype.toString.call(e)==="[object "+t+"]"},typeName:function(e){if(Object.prototype.hasOwnProperty.call(e,"name"))return e.name;var t=e.toString(),r=t.match(/^\s*function (.+)\(/);return r?r[1]:t},error:function(e,t){var r=null;return"string"==typeof e.message&&""!==e.message&&("string"==typeof t||t&&t.message)&&((r=l.copy(e)).message=e.message),e.message=e.message||null,"string"==typeof t?e.message=t:"object"==typeof t&&null!==t&&(l.update(e,t),t.message&&(e.message=t.message),(t.code||t.name)&&(e.code=t.code||t.name),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.time=new Date,r&&(e.originalError=r),e},inherit:function(e,t){var r=null;if(void 0===t)t=e,e=Object,r={};else{var n=function(){};n.prototype=e.prototype,r=new n}return t.constructor===Object&&(t.constructor=function(){if(e!==Object)return e.apply(this,arguments)}),t.constructor.prototype=r,l.update(t.constructor.prototype,t),t.constructor.__super__=e,t.constructor},mixin:function(){for(var e=arguments[0],t=1;t<arguments.length;t++)for(var r in arguments[t].prototype){var n=arguments[t].prototype[r];"constructor"!==r&&(e.prototype[r]=n)}return e},hideProperties:function(t,e){"function"==typeof Object.defineProperty&&l.arrayEach(e,function(e){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0})})},property:function(e,t,r,n,i){var s={configurable:!0,enumerable:void 0===n||n};"function"!=typeof r||i?(s.value=r,s.writable=!0):s.get=r,Object.defineProperty(e,t,s)},memoizedProperty:function(e,t,r,n){var i=null;l.property(e,t,function(){return null===i&&(i=r()),i},n)},hoistPayloadMember:function(r){var e=r.request,t=e.operation,n=e.service.api.operations[t],i=n.output;if(i.payload&&!n.hasEventOutput){var s=i.members[i.payload],o=r.data[i.payload];"structure"===s.type&&l.each(o,function(e,t){l.property(r.data,e,t,!1)})}},computeSha256:function(e,r){if(l.isNode()){var t=l.stream.Stream,n=s("fs");if(e instanceof t){if("string"!=typeof e.path)return r(new Error("Non-file stream objects are not supported with SigV4"));var i={};"number"==typeof e.start&&(i.start=e.start),"number"==typeof e.end&&(i.end=e.end),e=n.createReadStream(e.path,i)}}l.crypto.sha256(e,"hex",function(e,t){e?r(e):r(null,t)})},isClockSkewed:function(e){if(e)return l.property(u.config,"isClockSkewed",3e5<=Math.abs((new Date).getTime()-e),!1),u.config.isClockSkewed},applyClockOffset:function(e){e&&(u.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){if(void 0===t&&u&&u.config&&(t=u.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t)var r=!0;Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++){var i=e[n];r?i.deletePromisesFromClass&&i.deletePromisesFromClass():i.addPromisesToClass&&i.addPromisesToClass(t)}},promisifyMethod:function(t,r){return function(){var e=this;return new r(function(r,n){e[t](function(e,t){e?n(e):r(t)})})}},isDualstackAvailable:function(e){if(!e)return!1;var t=s("../apis/metadata.json");return"string"!=typeof e&&(e=e.serviceIdentifier),!("string"!=typeof e||!t.hasOwnProperty(e))&&!!t[e].dualstackAvailable},calculateRetryDelay:function(e,t){t||(t={});var r=t.customBackoff||null;if("function"==typeof r)return r(e);var n="number"==typeof t.base?t.base:100;return Math.random()*(Math.pow(2,e)*n)},handleRequestWithRetries:function(e,n,s){n||(n={});var t=u.HttpClient.getInstance(),r=n.httpOptions||{},i=0,o=function(e){var t=n.maxRetries||0;if(e&&"TimeoutError"===e.code&&(e.retryable=!0),e&&e.retryable&&i<t){i++;var r=l.calculateRetryDelay(i,n.retryDelayOptions);setTimeout(a,r+(e.retryAfter||0))}else s(e)},a=function(){var i="";t.handleRequest(e,r,function(n){n.on("data",function(e){i+=e.toString()}),n.on("end",function(){var e=n.statusCode;if(e<300)s(null,i);else{var t=1e3*parseInt(n.headers["retry-after"],10)||0,r=l.error(new Error,{retryable:500<=e||429===e});t&&r.retryable&&(r.retryAfter=t),o(r)}})},o)};u.util.defer(a)},uuid:{v4:function(){return s("uuid").v4()}},convertPayloadToString:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r].output||{};n.payload&&e.data[n.payload]&&(e.data[n.payload]=e.data[n.payload].toString())},defer:function(e){"object"==typeof t&&"function"==typeof t.nextTick?t.nextTick(e):"function"==typeof r?r(e):setTimeout(e,0)},defaultProfile:"default",configOptInEnv:"AWS_SDK_LOAD_CONFIG",sharedCredentialsFileEnv:"AWS_SHARED_CREDENTIALS_FILE",sharedConfigFileEnv:"AWS_CONFIG_FILE",imdsDisabledEnv:"AWS_EC2_METADATA_DISABLED"};e.exports=l}).call(this,s("_process"),s("timers").setImmediate)},{"../apis/metadata.json":26,"./core":38,_process:9,fs:2,timers:17,uuid:21}],37:[function(e,t,r){var n,s=e("./core");e("./credentials"),e("./credentials/credential_provider_chain"),s.Config=s.util.inherit({constructor:function(r){void 0===r&&(r={}),r=this.extractCredentials(r),s.util.each.call(this,this.keys,function(e,t){this.set(e,r[e],t)})},getCredentials:function(t){var e,r=this;function n(e){t(e,e?null:r.credentials)}function i(e,t){return new s.util.error(t||new Error,{code:"CredentialsError",message:e,name:"CredentialsError"})}r.credentials?"function"==typeof r.credentials.get?r.credentials.get(function(e){e&&(e=i("Could not load credentials from "+r.credentials.constructor.name,e)),n(e)}):(e=null,r.credentials.accessKeyId&&r.credentials.secretAccessKey||(e=i("Missing credentials")),n(e)):r.credentialProvider?r.credentialProvider.resolve(function(e,t){e&&(e=i("Could not load credentials from any providers",e)),r.credentials=t,n(e)}):n(i("No credentials to load"))},update:function(e,r){r=r||!1,e=this.extractCredentials(e),s.util.each.call(this,e,function(e,t){(r||Object.prototype.hasOwnProperty.call(this.keys,e)||s.Service.hasService(e))&&this.set(e,t)})},loadFromPath:function(e){this.clear();var r=JSON.parse(s.util.readFileSync(e)),t=new s.FileSystemCredentials(e),n=new s.CredentialProviderChain;return n.providers.unshift(t),n.resolve(function(e,t){if(e)throw e;r.credentials=t}),this.constructor(r),this},clear:function(){s.util.each.call(this,this.keys,function(e){delete this[e]}),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(e,t,r){void 0===t?(void 0===r&&(r=this.keys[e]),this[e]="function"==typeof r?r.call(this):r):"httpOptions"===e&&this[e]?this[e]=s.util.merge(this[e],t):this[e]=t},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},extractCredentials:function(e){return e.accessKeyId&&e.secretAccessKey&&((e=s.util.copy(e)).credentials=new s.Credentials(e)),e},setPromisesDependency:function(e){null===(n=e)&&"function"==typeof Promise&&(n=Promise);var t=[s.Request,s.Credentials,s.CredentialProviderChain];s.S3&&s.S3.ManagedUpload&&t.push(s.S3.ManagedUpload),s.util.addPromises(t,n)},getPromisesDependency:function(){return n}}),s.config=new s.Config},{"./core":38,"./credentials":39,"./credentials/credential_provider_chain":41}],41:[function(e,t,r){var n=e("../core");n.CredentialProviderChain=n.util.inherit(n.Credentials,{constructor:function(e){this.providers=e||n.CredentialProviderChain.defaultProviders.slice(0)},resolve:function(i){if(0===this.providers.length)return i(new Error("No providers")),this;var s=0,o=this.providers.slice(0);return function t(e,r){if(!e&&r||s===o.length)i(e,r);else{var n=o[s++];(r="function"==typeof n?n.call():n).get?r.get(function(e){t(e,e?null:r)}):t(null,r)}}(),this}}),n.CredentialProviderChain.defaultProviders=[],n.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=n.util.promisifyMethod("resolve",e)},n.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},n.util.addPromises(n.CredentialProviderChain)},{"../core":38}],39:[function(e,t,r){var n=e("./core");n.Credentials=n.util.inherit({constructor:function(){if(n.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,1===arguments.length&&"object"==typeof arguments[0]){var e=arguments[0].credentials||arguments[0];this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,this.sessionToken=e.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var e=n.util.date.getDate().getTime(),t=new Date(e+1e3*this.expiryWindow);return!!(this.expireTime&&t>this.expireTime)||(this.expired||!this.accessKeyId||!this.secretAccessKey)},get:function(t){var r=this;this.needsRefresh()?this.refresh(function(e){e||(r.expired=!1),t&&t(e)}):t&&t()},refresh:function(e){this.expired=!1,e()}}),n.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=n.util.promisifyMethod("get",e),this.prototype.refreshPromise=n.util.promisifyMethod("refresh",e)},n.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},n.util.addPromises(n.Credentials)},{"./core":38}],27:[function(e,t,r){function n(e,t){if(!n.services.hasOwnProperty(e))throw new Error("InvalidService: Failed to load api for "+e);return n.services[e][t]}n.services={},t.exports=n},{}],26:[function(e,t,r){t.exports={acm:{name:"ACM",cors:!0},apigateway:{name:"APIGateway",cors:!0},applicationautoscaling:{prefix:"application-autoscaling",name:"ApplicationAutoScaling",cors:!0},appstream:{name:"AppStream"},autoscaling:{name:"AutoScaling",cors:!0},batch:{name:"Batch"},budgets:{name:"Budgets"},clouddirectory:{name:"CloudDirectory",versions:["2016-05-10*"]},cloudformation:{name:"CloudFormation",cors:!0},cloudfront:{name:"CloudFront",versions:["2013-05-12*","2013-11-11*","2014-05-31*","2014-10-21*","2014-11-06*","2015-04-17*","2015-07-27*","2015-09-17*","2016-01-13*","2016-01-28*","2016-08-01*","2016-08-20*","2016-09-07*","2016-09-29*","2016-11-25*","2017-03-25*"],cors:!0},cloudhsm:{name:"CloudHSM",cors:!0},cloudsearch:{name:"CloudSearch"},cloudsearchdomain:{name:"CloudSearchDomain"},cloudtrail:{name:"CloudTrail",cors:!0},cloudwatch:{prefix:"monitoring",name:"CloudWatch",cors:!0},cloudwatchevents:{prefix:"events",name:"CloudWatchEvents",versions:["2014-02-03*"],cors:!0},cloudwatchlogs:{prefix:"logs",name:"CloudWatchLogs",cors:!0},codebuild:{name:"CodeBuild",cors:!0},codecommit:{name:"CodeCommit",cors:!0},codedeploy:{name:"CodeDeploy",cors:!0},codepipeline:{name:"CodePipeline",cors:!0},cognitoidentity:{prefix:"cognito-identity",name:"CognitoIdentity",cors:!0},cognitoidentityserviceprovider:{prefix:"cognito-idp",name:"CognitoIdentityServiceProvider",cors:!0},cognitosync:{prefix:"cognito-sync",name:"CognitoSync",cors:!0},configservice:{prefix:"config",name:"ConfigService",cors:!0},cur:{name:"CUR",cors:!0},datapipeline:{name:"DataPipeline"},devicefarm:{name:"DeviceFarm",cors:!0},directconnect:{name:"DirectConnect",cors:!0},directoryservice:{prefix:"ds",name:"DirectoryService"},discovery:{name:"Discovery"},dms:{name:"DMS"},dynamodb:{name:"DynamoDB",cors:!0},dynamodbstreams:{prefix:"streams.dynamodb",name:"DynamoDBStreams",cors:!0},ec2:{name:"EC2",versions:["2013-06-15*","2013-10-15*","2014-02-01*","2014-05-01*","2014-06-15*","2014-09-01*","2014-10-01*","2015-03-01*","2015-04-15*","2015-10-01*","2016-04-01*","2016-09-15*"],cors:!0},ecr:{name:"ECR",cors:!0},ecs:{name:"ECS",cors:!0},efs:{prefix:"elasticfilesystem",name:"EFS",cors:!0},elasticache:{name:"ElastiCache",versions:["2012-11-15*","2014-03-24*","2014-07-15*","2014-09-30*"],cors:!0},elasticbeanstalk:{name:"ElasticBeanstalk",cors:!0},elb:{prefix:"elasticloadbalancing",name:"ELB",cors:!0},elbv2:{prefix:"elasticloadbalancingv2",name:"ELBv2",cors:!0},emr:{prefix:"elasticmapreduce",name:"EMR",cors:!0},es:{name:"ES"},elastictranscoder:{name:"ElasticTranscoder",cors:!0},firehose:{name:"Firehose",cors:!0},gamelift:{name:"GameLift",cors:!0},glacier:{name:"Glacier"},health:{name:"Health"},iam:{name:"IAM"},importexport:{name:"ImportExport"},inspector:{name:"Inspector",versions:["2015-08-18*"],cors:!0},iot:{name:"Iot",cors:!0},iotdata:{prefix:"iot-data",name:"IotData",cors:!0},kinesis:{name:"Kinesis",cors:!0},kinesisanalytics:{name:"KinesisAnalytics"},kms:{name:"KMS",cors:!0},lambda:{name:"Lambda",cors:!0},lexruntime:{prefix:"runtime.lex",name:"LexRuntime",cors:!0},lightsail:{name:"Lightsail"},machinelearning:{name:"MachineLearning",cors:!0},marketplacecommerceanalytics:{name:"MarketplaceCommerceAnalytics",cors:!0},marketplacemetering:{prefix:"meteringmarketplace",name:"MarketplaceMetering"},mturk:{prefix:"mturk-requester",name:"MTurk",cors:!0},mobileanalytics:{name:"MobileAnalytics",cors:!0},opsworks:{name:"OpsWorks",cors:!0},opsworkscm:{name:"OpsWorksCM"},organizations:{name:"Organizations"},pinpoint:{name:"Pinpoint"},polly:{name:"Polly",cors:!0},rds:{name:"RDS",versions:["2014-09-01*"],cors:!0},redshift:{name:"Redshift",cors:!0},rekognition:{name:"Rekognition",cors:!0},resourcegroupstaggingapi:{name:"ResourceGroupsTaggingAPI"},route53:{name:"Route53",cors:!0},route53domains:{name:"Route53Domains",cors:!0},s3:{name:"S3",dualstackAvailable:!0,cors:!0},servicecatalog:{name:"ServiceCatalog",cors:!0},ses:{prefix:"email",name:"SES",cors:!0},shield:{name:"Shield"},simpledb:{prefix:"sdb",name:"SimpleDB"},sms:{name:"SMS"},snowball:{name:"Snowball"},sns:{name:"SNS",cors:!0},sqs:{name:"SQS",cors:!0},ssm:{name:"SSM",cors:!0},storagegateway:{name:"StorageGateway",cors:!0},stepfunctions:{prefix:"states",name:"StepFunctions"},sts:{name:"STS",cors:!0},support:{name:"Support"},swf:{name:"SWF"},xray:{name:"XRay"},waf:{name:"WAF",cors:!0},wafregional:{prefix:"waf-regional",name:"WAFRegional"},workdocs:{name:"WorkDocs",cors:!0},workspaces:{name:"WorkSpaces"},codestar:{name:"CodeStar"},lexmodelbuildingservice:{prefix:"lex-models",name:"LexModelBuildingService",cors:!0},marketplaceentitlementservice:{prefix:"entitlement.marketplace",name:"MarketplaceEntitlementService"},athena:{name:"Athena"},greengrass:{name:"Greengrass"},dax:{name:"DAX"},migrationhub:{prefix:"AWSMigrationHub",name:"MigrationHub"},cloudhsmv2:{name:"CloudHSMV2"},glue:{name:"Glue"},mobile:{name:"Mobile"},pricing:{name:"Pricing"},costexplorer:{prefix:"ce",name:"CostExplorer"},mediaconvert:{name:"MediaConvert"},medialive:{name:"MediaLive"},mediapackage:{name:"MediaPackage"},mediastore:{name:"MediaStore"},mediastoredata:{prefix:"mediastore-data",name:"MediaStoreData"},appsync:{name:"AppSync"},guardduty:{name:"GuardDuty"},mq:{name:"MQ"},comprehend:{name:"Comprehend"},iotjobsdataplane:{prefix:"iot-jobs-data",name:"IoTJobsDataPlane"},kinesisvideoarchivedmedia:{prefix:"kinesis-video-archived-media",name:"KinesisVideoArchivedMedia"},kinesisvideomedia:{prefix:"kinesis-video-media",name:"KinesisVideoMedia"},kinesisvideo:{name:"KinesisVideo"},sagemakerruntime:{prefix:"runtime.sagemaker",name:"SageMakerRuntime"},sagemaker:{name:"SageMaker"},translate:{name:"Translate"},resourcegroups:{prefix:"resource-groups",name:"ResourceGroups"},alexaforbusiness:{name:"AlexaForBusiness"},cloud9:{name:"Cloud9"},serverlessapplicationrepository:{prefix:"serverlessrepo",name:"ServerlessApplicationRepository"},servicediscovery:{name:"ServiceDiscovery"},workmail:{name:"WorkMail"},autoscalingplans:{prefix:"autoscaling-plans",name:"AutoScalingPlans"},transcribeservice:{prefix:"transcribe",name:"TranscribeService"},connect:{name:"Connect"},acmpca:{prefix:"acm-pca",name:"ACMPCA"},fms:{name:"FMS"},secretsmanager:{name:"SecretsManager",cors:!0},iotanalytics:{name:"IoTAnalytics"},iot1clickdevicesservice:{prefix:"iot1click-devices",name:"IoT1ClickDevicesService"},iot1clickprojects:{prefix:"iot1click-projects",name:"IoT1ClickProjects"},pi:{name:"PI"},neptune:{name:"Neptune"},mediatailor:{name:"MediaTailor"},eks:{name:"EKS"},macie:{name:"Macie"}}},{}],21:[function(e,t,r){var n=e("./v1"),i=e("./v4"),s=i;s.v1=n,s.v4=i,t.exports=s},{"./v1":24,"./v4":25}],25:[function(e,t,r){var o=e("./lib/rng"),a=e("./lib/bytesToUuid");t.exports=function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var s=0;s<16;++s)t[n+s]=i[s];return t||a(i)}},{"./lib/bytesToUuid":22,"./lib/rng":23}],24:[function(e,t,r){var n=e("./lib/rng"),f=e("./lib/bytesToUuid"),i=n(),d=[1|i[0],i[1],i[2],i[3],i[4],i[5]],m=16383&(i[6]<<8|i[7]),y=0,g=0;t.exports=function(e,t,r){var n=t&&r||0,i=t||[],s=void 0!==(e=e||{}).clockseq?e.clockseq:m,o=void 0!==e.msecs?e.msecs:(new Date).getTime(),a=void 0!==e.nsecs?e.nsecs:g+1,u=o-y+(a-g)/1e4;if(u<0&&void 0===e.clockseq&&(s=s+1&16383),(u<0||y<o)&&void 0===e.nsecs&&(a=0),1e4<=a)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");y=o,m=s;var c=(1e4*(268435455&(o+=122192928e5))+(g=a))%4294967296;i[n++]=c>>>24&255,i[n++]=c>>>16&255,i[n++]=c>>>8&255,i[n++]=255&c;var l=o/4294967296*1e4&268435455;i[n++]=l>>>8&255,i[n++]=255&l,i[n++]=l>>>24&15|16,i[n++]=l>>>16&255,i[n++]=s>>>8|128,i[n++]=255&s;for(var h=e.node||d,p=0;p<6;++p)i[n+p]=h[p];return t||f(i)}},{"./lib/bytesToUuid":22,"./lib/rng":23}],23:[function(e,s,t){(function(e){var t,r=e.crypto||e.msCrypto;if(r&&r.getRandomValues){var n=new Uint8Array(16);t=function(){return r.getRandomValues(n),n}}if(!t){var i=new Array(16);t=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}s.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],22:[function(e,t,r){for(var i=[],n=0;n<256;++n)i[n]=(n+256).toString(16).substr(1);t.exports=function(e,t){var r=t||0,n=i;return n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]}},{}],20:[function(p,e,A){(function(n,i){var a=/%[sdj%]/g;A.format=function(e){if(!S(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,s=String(e).replace(a,function(e){if("%%"===e)return"%";if(i<=r)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r<i;o=n[++r])v(o)||!l(o)?s+=" "+o:s+=" "+u(o);return s},A.deprecate=function(e,t){if(w(i.process))return function(){return A.deprecate(e,t).apply(this,arguments)};if(!0===n.noDeprecation)return e;var r=!1;return function(){if(!r){if(n.throwDeprecation)throw new Error(t);n.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}};var e,s={};function u(e,t){var r={seen:[],stylize:c};return 3<=arguments.length&&(r.depth=arguments[2]),4<=arguments.length&&(r.colors=arguments[3]),g(t)?r.showHidden=t:t&&A._extend(r,t),w(r.showHidden)&&(r.showHidden=!1),w(r.depth)&&(r.depth=2),w(r.colors)&&(r.colors=!1),w(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),f(r,e,r.depth)}function o(e,t){var r=u.styles[t];return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function c(e,t){return e}function f(t,r,n){if(t.customInspect&&r&&C(r.inspect)&&r.inspect!==A.inspect&&(!r.constructor||r.constructor.prototype!==r)){var e=r.inspect(n,t);return S(e)||(e=f(t,e,n)),e}var i=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(S(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(g(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(t,r);if(i)return i;var s,o=Object.keys(r),a=(s={},o.forEach(function(e,t){s[e]=!0}),s);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),x(r)&&(0<=o.indexOf("message")||0<=o.indexOf("description")))return d(r);if(0===o.length){if(C(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(x(r))return d(r)}var c,l="",h=!1,p=["{","}"];(y(r)&&(h=!0,p=["[","]"]),C(r))&&(l=" [Function"+(r.name?": "+r.name:"")+"]");return _(r)&&(l=" "+RegExp.prototype.toString.call(r)),E(r)&&(l=" "+Date.prototype.toUTCString.call(r)),x(r)&&(l=" "+d(r)),0!==o.length||h&&0!=r.length?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=h?function(t,r,n,i,e){for(var s=[],o=0,a=r.length;o<a;++o)T(r,String(o))?s.push(m(t,r,n,i,String(o),!0)):s.push("");return e.forEach(function(e){e.match(/^\d+$/)||s.push(m(t,r,n,i,e,!0))}),s}(t,r,n,a,o):o.map(function(e){return m(t,r,n,a,e,h)}),t.seen.pop(),function(e,t,r){if(60<e.reduce(function(e,t){return 0,0<=t.indexOf("\n")&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0))return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,p)):p[0]+l+p[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function m(e,t,r,n,i,s){var o,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),T(n,i)||(o="["+i+"]"),a||(e.seen.indexOf(u.value)<0?-1<(a=v(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")&&(a=s?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),w(o)){if(s&&i.match(/^\d+$/))return a;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function y(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function b(e){return"number"==typeof e}function S(e){return"string"==typeof e}function w(e){return void 0===e}function _(e){return l(e)&&"[object RegExp]"===t(e)}function l(e){return"object"==typeof e&&null!==e}function E(e){return l(e)&&"[object Date]"===t(e)}function x(e){return l(e)&&("[object Error]"===t(e)||e instanceof Error)}function C(e){return"function"==typeof e}function t(e){return Object.prototype.toString.call(e)}function r(e){return e<10?"0"+e.toString(10):e.toString(10)}A.debuglog=function(t){if(w(e)&&(e=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(e)){var r=n.pid;s[t]=function(){var e=A.format.apply(A,arguments);console.error("%s %d: %s",t,r,e)}}else s[t]=function(){};return s[t]},(A.inspect=u).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]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},A.isArray=y,A.isBoolean=g,A.isNull=v,A.isNullOrUndefined=function(e){return null==e},A.isNumber=b,A.isString=S,A.isSymbol=function(e){return"symbol"==typeof e},A.isUndefined=w,A.isRegExp=_,A.isObject=l,A.isDate=E,A.isError=x,A.isFunction=C,A.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},A.isBuffer=p("./support/isBuffer");var h=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}A.log=function(){var e,t;console.log("%s - %s",(e=new Date,t=[r(e.getHours()),r(e.getMinutes()),r(e.getSeconds())].join(":"),[e.getDate(),h[e.getMonth()],t].join(" ")),A.format.apply(A,arguments))},A.inherits=p("inherits"),A._extend=function(e,t){if(!t||!l(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":19,_process:9,inherits:6}],19:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],17:[function(u,e,c){(function(e,t){var n=u("process/browser.js").nextTick,r=Function.prototype.apply,i=Array.prototype.slice,s={},o=0;function a(e,t){this._id=e,this._clearFn=t}c.setTimeout=function(){return new a(r.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new a(r.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(e){e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},c.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},c._unrefActive=c.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},c.setImmediate="function"==typeof e?e:function(e){var t=o++,r=!(arguments.length<2)&&i.call(arguments,1);return s[t]=!0,n(function(){s[t]&&(r?e.apply(null,r):e.call(null),c.clearImmediate(t))}),t},c.clearImmediate="function"==typeof t?t:function(e){delete s[e]}}).call(this,u("timers").setImmediate,u("timers").clearImmediate)},{"process/browser.js":9,timers:17}],9:[function(e,t,r){var n,i,s=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var c,l=[],h=!1,p=-1;function f(){h&&c&&(h=!1,c.length?l=c.concat(l):p=-1,l.length&&d())}function d(){if(!h){var e=u(f);h=!0;for(var t=l.length;t;){for(c=l,l=[];++p<t;)c&&c[p].run();p=-1,t=l.length}c=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function y(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new m(e,t)),1!==l.length||h||u(d)},m.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=y,s.addListener=y,s.once=y,s.off=y,s.removeListener=y,s.removeAllListeners=y,s.emit=y,s.prependListener=y,s.prependOnceListener=y,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],8:[function(e,t,r){!function(e){"use strict";function A(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function R(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function k(e,t){if(e===t)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(t))return!1;if(!0===A(e)){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!1===k(e[r],t[r]))return!1;return!0}if(!0===R(e)){var n={};for(var i in e)if(hasOwnProperty.call(e,i)){if(!1===k(e[i],t[i]))return!1;n[i]=!0}for(var s in t)if(hasOwnProperty.call(t,s)&&!0!==n[s])return!1;return!0}return!1}function I(e){if(""===e||!1===e||null===e)return!0;if(A(e)&&0===e.length)return!0;if(R(e)){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1}var o;o="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var c=0,s=1,l=2,a=3,t=4,r=6,u=8,h=9,p="UnquotedIdentifier",f="QuotedIdentifier",d="Rbracket",m="Rparen",y="Comma",g="Colon",v="Rbrace",b="Number",q="Current",P="Expref",L="Pipe",N="GTE",O="LTE",U="Flatten",S="Star",w="Filter",_="Dot",E="Lbrace",x="Lbracket",C="Lparen",T="Literal",M={".":_,"*":S,",":y,":":g,"{":E,"}":v,"]":d,"(":C,")":m,"@":q},j={"<":!0,">":!0,"=":!0,"!":!0},D={" ":!0,"\t":!0,"\n":!0};function B(e){return"0"<=e&&e<="9"||"-"===e}function n(){}n.prototype={tokenize:function(e){var t,r,n,i,s=[];for(this._current=0;this._current<e.length;)if("a"<=(i=e[this._current])&&i<="z"||"A"<=i&&i<="Z"||"_"===i)t=this._current,r=this._consumeUnquotedIdentifier(e),s.push({type:p,value:r,start:t});else if(void 0!==M[e[this._current]])s.push({type:M[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(B(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:f,value:r,start:t});else if("'"===e[this._current])t=this._current,r=this._consumeRawStringLiteral(e),s.push({type:T,value:r,start:t});else if("`"===e[this._current]){t=this._current;var o=this._consumeLiteral(e);s.push({type:T,value:o,start:t})}else if(void 0!==j[e[this._current]])s.push(this._consumeOperator(e));else if(void 0!==D[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:P,value:"&",start:t});else{if("|"!==e[this._current]){var a=new Error("Unknown character:"+e[this._current]);throw a.name="LexerError",a}t=this._current,this._current++,"|"===e[this._current]?(this._current++,s.push({type:"Or",value:"||",start:t})):s.push({type:L,value:"|",start:t})}return s},_consumeUnquotedIdentifier:function(e){var t,r=this._current;for(this._current++;this._current<e.length&&("a"<=(t=e[this._current])&&t<="z"||"A"<=t&&t<="Z"||"0"<=t&&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;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&'"'!==e[n+1]?n++:n+=2,this._current=n}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var r=e.length;"'"!==e[this._current]&&this._current<r;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&"'"!==e[n+1]?n++:n+=2,this._current=n}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var r=e.length;B(e[this._current])&&this._current<r;)this._current++;var n=parseInt(e.slice(t,this._current));return{type:b,value:n,start:t}},_consumeLBracket:function(e){var t=this._current;return this._current++,"?"===e[this._current]?(this._current++,{type:w,value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:U,value:"[]",start:t}):{type:x,value:"[",start:t}},_consumeOperator:function(e){var t=this._current,r=e[t];return this._current++,"!"===r?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===r?"="===e[this._current]?(this._current++,{type:O,value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===r?"="===e[this._current]?(this._current++,{type:N,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<n;){var i=this._current;"\\"!==e[i]||"\\"!==e[i+1]&&"`"!==e[i+1]?i++:i+=2,this._current=i}var s=o(e.slice(r,this._current));return s=s.replace("\\`","`"),t=this._looksLikeJSON(s)?JSON.parse(s):JSON.parse('"'+s+'"'),this._current++,t},_looksLikeJSON:function(e){if(""===e)return!1;if(0<='[{"'.indexOf(e[0]))return!0;if(0<=["true","false","null"].indexOf(e))return!0;if(!(0<="-0123456789".indexOf(e[0])))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var F={};function H(){}function z(e){this.runtime=e}function V(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[c]}]},avg:{_func:this._functionAvg,_signature:[{types:[u]}]},ceil:{_func:this._functionCeil,_signature:[{types:[c]}]},contains:{_func:this._functionContains,_signature:[{types:[l,a]},{types:[s]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[l]},{types:[l]}]},floor:{_func:this._functionFloor,_signature:[{types:[c]}]},length:{_func:this._functionLength,_signature:[{types:[l,a,t]}]},map:{_func:this._functionMap,_signature:[{types:[r]},{types:[a]}]},max:{_func:this._functionMax,_signature:[{types:[u,h]}]},merge:{_func:this._functionMerge,_signature:[{types:[t],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[a]},{types:[r]}]},sum:{_func:this._functionSum,_signature:[{types:[u]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[l]},{types:[l]}]},min:{_func:this._functionMin,_signature:[{types:[u,h]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[a]},{types:[r]}]},type:{_func:this._functionType,_signature:[{types:[s]}]},keys:{_func:this._functionKeys,_signature:[{types:[t]}]},values:{_func:this._functionValues,_signature:[{types:[t]}]},sort:{_func:this._functionSort,_signature:[{types:[h,u]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[a]},{types:[r]}]},join:{_func:this._functionJoin,_signature:[{types:[l]},{types:[h]}]},reverse:{_func:this._functionReverse,_signature:[{types:[l,a]}]},to_array:{_func:this._functionToArray,_signature:[{types:[s]}]},to_string:{_func:this._functionToString,_signature:[{types:[s]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[s]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[s],variadic:!0}]}}}F.EOF=0,F[p]=0,F[f]=0,F[d]=0,F[m]=0,F[y]=0,F[v]=0,F[b]=0,F[q]=0,F[P]=0,F[L]=1,F.Or=2,F.And=3,F.EQ=5,F.GT=5,F.LT=5,F.GTE=5,F.LTE=5,F.NE=5,F[U]=9,F[S]=20,F[w]=21,F.Dot=40,F.Not=45,F[E]=50,F[x]=55,F[C]=60,H.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 n).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<F[n];)this._advance(),r=this.led(n,r),n=this._lookahead(0);return r},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){var t,r;switch(e.type){case T:return{type:"Literal",value:e.value};case p:return{type:"Field",name:e.value};case f:var n={type:"Field",name:e.value};if(this._lookahead(0)===C)throw new Error("Quoted identifier not allowed for function names.");return n;case"Not":return{type:"NotExpression",children:[t=this.expression(F.Not)]};case S:return t=null,{type:"ValueProjection",children:[{type:"Identity"},t=this._lookahead(0)===d?{type:"Identity"}:this._parseProjectionRHS(F.Star)]};case w:return this.led(e.type,{type:"Identity"});case E:return this._parseMultiselectHash();case U:return{type:"Projection",children:[{type:U,children:[{type:"Identity"}]},t=this._parseProjectionRHS(F.Flatten)]};case x:return this._lookahead(0)===b||this._lookahead(0)===g?(t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t)):this._lookahead(0)===S&&this._lookahead(1)===d?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(F.Star)]}):this._parseMultiselectList();case q:return{type:q};case P:return{type:"ExpressionReference",children:[r=this.expression(F.Expref)]};case C:for(var i=[];this._lookahead(0)!==m;)this._lookahead(0)===q?(r={type:q},this._advance()):r=this.expression(0),i.push(r);return this._match(m),i[0];default:this._errorToken(e)}},led:function(e,t){var r;switch(e){case _:var n=F.Dot;return this._lookahead(0)!==S?{type:"Subexpression",children:[t,r=this._parseDotRHS(n)]}:(this._advance(),{type:"ValueProjection",children:[t,r=this._parseProjectionRHS(n)]});case L:return r=this.expression(F.Pipe),{type:L,children:[t,r]};case"Or":return{type:"OrExpression",children:[t,r=this.expression(F.Or)]};case"And":return{type:"AndExpression",children:[t,r=this.expression(F.And)]};case C:for(var i,s=t.name,o=[];this._lookahead(0)!==m;)this._lookahead(0)===q?(i={type:q},this._advance()):i=this.expression(0),this._lookahead(0)===y&&this._match(y),o.push(i);return this._match(m),{type:"Function",name:s,children:o};case w:var a=this.expression(0);return this._match(d),{type:"FilterProjection",children:[t,r=this._lookahead(0)===U?{type:"Identity"}:this._parseProjectionRHS(F.Filter),a]};case U:return{type:"Projection",children:[{type:U,children:[t]},this._parseProjectionRHS(F.Flatten)]};case"EQ":case"NE":case"GT":case N:case"LT":case O:return this._parseComparator(t,e);case x:var u=this._lookaheadToken(0);return u.type===b||u.type===g?(r=this._parseIndexExpression(),this._projectIfSlice(t,r)):(this._match(S),this._match(d),{type:"Projection",children:[t,r=this._parseProjectionRHS(F.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),r=new Error("Expected "+e+", got: "+t.type);throw r.name="ParserError",r}this._advance()},_errorToken:function(e){var t=new Error("Invalid token ("+e.type+'): "'+e.value+'"');throw t.name="ParserError",t},_parseIndexExpression:function(){if(this._lookahead(0)===g||this._lookahead(1)===g)return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(d),e},_projectIfSlice:function(e,t){var r={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[r,this._parseProjectionRHS(F.Star)]}:r},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,r=this._lookahead(0);r!==d&&t<3;){if(r===g)t++,this._advance();else{if(r!==b){var n=this._lookahead(0),i=new Error("Syntax error, unexpected token: "+n.value+"("+n.type+")");throw i.name="Parsererror",i}e[t]=this._lookaheadToken(0).value,this._advance()}r=this._lookahead(0)}return this._match(d),{type:"Slice",children:e}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(F[t])]}},_parseDotRHS:function(e){var t=this._lookahead(0);return 0<=[p,f,S].indexOf(t)?this.expression(e):t===x?(this._match(x),this._parseMultiselectList()):t===E?(this._match(E),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(F[this._lookahead(0)]<10)t={type:"Identity"};else if(this._lookahead(0)===x)t=this.expression(e);else if(this._lookahead(0)===w)t=this.expression(e);else{if(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(_),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];this._lookahead(0)!==d;){var t=this.expression(0);if(e.push(t),this._lookahead(0)===y&&(this._match(y),this._lookahead(0)===d))throw new Error("Unexpected token Rbracket")}return this._match(d),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,r,n=[],i=[p,f];;){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(g),r={type:"KeyValuePair",name:t,value:this.expression(0)},n.push(r),this._lookahead(0)===y)this._match(y);else if(this._lookahead(0)===v){this._match(v);break}}return{type:"MultiSelectHash",children:n}}},z.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,t){var r,n,i,s,o,a,u,c,l;switch(e.type){case"Field":return null===t?null:R(t)?void 0===(a=t[e.name])?null:a:null;case"Subexpression":for(i=this.visit(e.children[0],t),l=1;l<e.children.length;l++)if(null===(i=this.visit(e.children[1],i)))return null;return i;case"IndexExpression":return u=this.visit(e.children[0],t),this.visit(e.children[1],u);case"Index":if(!A(t))return null;var h=e.value;return h<0&&(h=t.length+h),void 0===(i=t[h])&&(i=null),i;case"Slice":if(!A(t))return null;var p=e.children.slice(0),f=this.computeSliceParams(t.length,p),d=f[0],m=f[1],y=f[2];if(i=[],0<y)for(l=d;l<m;l+=y)i.push(t[l]);else for(l=d;m<l;l+=y)i.push(t[l]);return i;case"Projection":var g=this.visit(e.children[0],t);if(!A(g))return null;for(c=[],l=0;l<g.length;l++)null!==(n=this.visit(e.children[1],g[l]))&&c.push(n);return c;case"ValueProjection":if(!R(g=this.visit(e.children[0],t)))return null;c=[];var v=function(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;n++)r.push(e[t[n]]);return r}(g);for(l=0;l<v.length;l++)null!==(n=this.visit(e.children[1],v[l]))&&c.push(n);return c;case"FilterProjection":if(!A(g=this.visit(e.children[0],t)))return null;var b=[],S=[];for(l=0;l<g.length;l++)I(r=this.visit(e.children[2],g[l]))||b.push(g[l]);for(var w=0;w<b.length;w++)null!==(n=this.visit(e.children[1],b[w]))&&S.push(n);return S;case"Comparator":switch(s=this.visit(e.children[0],t),o=this.visit(e.children[1],t),e.name){case"EQ":i=k(s,o);break;case"NE":i=!k(s,o);break;case"GT":i=o<s;break;case N:i=o<=s;break;case"LT":i=s<o;break;case O:i=s<=o;break;default:throw new Error("Unknown comparator: "+e.name)}return i;case U:var _=this.visit(e.children[0],t);if(!A(_))return null;var E=[];for(l=0;l<_.length;l++)A(n=_[l])?E.push.apply(E,n):E.push(n);return E;case"Identity":return t;case"MultiSelectList":if(null===t)return null;for(c=[],l=0;l<e.children.length;l++)c.push(this.visit(e.children[l],t));return c;case"MultiSelectHash":if(null===t)return null;var x;for(c={},l=0;l<e.children.length;l++)c[(x=e.children[l]).name]=this.visit(x.value,t);return c;case"OrExpression":return I(r=this.visit(e.children[0],t))&&(r=this.visit(e.children[1],t)),r;case"AndExpression":return!0===I(s=this.visit(e.children[0],t))?s:this.visit(e.children[1],t);case"NotExpression":return I(s=this.visit(e.children[0],t));case"Literal":return e.value;case L:return u=this.visit(e.children[0],t),this.visit(e.children[1],u);case q:return t;case"Function":var C=[];for(l=0;l<e.children.length;l++)C.push(this.visit(e.children[l],t));return this.runtime.callFunction(e.name,C);case"ExpressionReference":var T=e.children[0];return T.jmespathType=P,T;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var r=t[0],n=t[1],i=t[2],s=[null,null,null];if(null===i)i=1;else if(0===i){var o=new Error("Invalid slice, step cannot be 0");throw o.name="RuntimeError",o}var a=i<0;return r=null===r?a?e-1:0:this.capSliceRange(e,r,i),n=null===n?a?-1:e:this.capSliceRange(e,n,i),s[0]=r,s[1]=n,s[2]=i,s},capSliceRange:function(e,t,r){return t<0?(t+=e)<0&&(t=r<0?-1:0):e<=t&&(t=r<0?e-1:e),t}},V.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,o;if(r[r.length-1].variadic){if(t.length<r.length)throw n=1===r.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+r.length+n+" but received "+t.length)}else if(t.length!==r.length)throw n=1===r.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+r.length+n+" but received "+t.length);for(var a=0;a<r.length;a++){o=!1,i=r[a].types,s=this._getTypeName(t[a]);for(var u=0;u<i.length;u++)if(this._typeMatches(s,i[u],t[a])){o=!0;break}if(!o)throw new Error("TypeError: "+e+"() expected argument "+(a+1)+" to be type "+i+" but received type "+s+" instead.")}},_typeMatches:function(e,t,r){if(t===s)return!0;if(t!==h&&t!==u&&t!==a)return e===t;if(t===a)return e===a;if(e===a){var n;t===u?n=c:t===h&&(n=l);for(var i=0;i<r.length;i++)if(!this._typeMatches(this._getTypeName(r[i]),n,r[i]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return l;case"[object Number]":return c;case"[object Array]":return a;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return e.jmespathType===P?r:t}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],r=e[1];return-1!==t.indexOf(r,t.length-r.length)},_functionReverse:function(e){if(this._getTypeName(e[0])===l){for(var t=e[0],r="",n=t.length-1;0<=n;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<r.length;n++)t+=r[n];return t/r.length},_functionContains:function(e){return 0<=e[0].indexOf(e[1])},_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;s<i.length;s++)t.push(r.visit(n,i[s]));return t},_functionMerge:function(e){for(var t={},r=0;r<e.length;r++){var n=e[r];for(var i in n)t[i]=n[i]}return t},_functionMax:function(e){if(0<e[0].length){if(this._getTypeName(e[0][0])===c)return Math.max.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)r.localeCompare(t[n])<0&&(r=t[n]);return r}return null},_functionMin:function(e){if(0<e[0].length){if(this._getTypeName(e[0][0])===c)return Math.min.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)t[n].localeCompare(r)<0&&(r=t[n]);return r}return null},_functionSum:function(e){for(var t=0,r=e[0],n=0;n<r.length;n++)t+=r[n];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case c:return"number";case l:return"string";case a:return"array";case t:return"object";case 5:return"boolean";case r:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],r=Object.keys(t),n=[],i=0;i<r.length;i++)n.push(t[r[i]]);return n},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return this._getTypeName(e[0])===a?e[0]:[e[0]]},_functionToString:function(e){return this._getTypeName(e[0])===l?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,r=this._getTypeName(e[0]);return r===c?e[0]:r!==l||(t=+e[0],isNaN(t))?null:t},_functionNotNull:function(e){for(var t=0;t<e.length;t++)if(7!==this._getTypeName(e[t]))return e[t];return null},_functionSort:function(e){var t=e[0].slice(0);return t.sort(),t},_functionSortBy:function(e){var t=e[0].slice(0);if(0===t.length)return t;var i=this._interpreter,s=e[1],o=this._getTypeName(i.visit(s,t[0]));if([c,l].indexOf(o)<0)throw new Error("TypeError");for(var a=this,r=[],n=0;n<t.length;n++)r.push([n,t[n]]);r.sort(function(e,t){var r=i.visit(s,e[1]),n=i.visit(s,t[1]);if(a._getTypeName(r)!==o)throw new Error("TypeError: expected "+o+", received "+a._getTypeName(r));if(a._getTypeName(n)!==o)throw new Error("TypeError: expected "+o+", received "+a._getTypeName(n));return n<r?1:r<n?-1:e[0]-t[0]});for(var u=0;u<r.length;u++)t[u]=r[u][1];return t},_functionMaxBy:function(e){for(var t,r,n=e[1],i=e[0],s=this.createKeyFunction(n,[c,l]),o=-1/0,a=0;a<i.length;a++)o<(r=s(i[a]))&&(o=r,t=i[a]);return t},_functionMinBy:function(e){for(var t,r,n=e[1],i=e[0],s=this.createKeyFunction(n,[c,l]),o=1/0,a=0;a<i.length;a++)(r=s(i[a]))<o&&(o=r,t=i[a]);return t},createKeyFunction:function(n,i){var s=this,o=this._interpreter;return function(e){var t=o.visit(n,e);if(i.indexOf(s._getTypeName(t))<0){var r="TypeError: expected one of "+i+", received "+s._getTypeName(t);throw new Error(r)}return t}}},e.tokenize=function(e){return(new n).tokenize(e)},e.compile=function(e){return(new H).parse(e)},e.search=function(e,t){var r=new H,n=new V,i=new z(n);n._interpreter=i;var s=r.parse(t);return i.search(s,e)},e.strictDeepEqual=k}(void 0===r?this.jmespath={}:r)},{}],6:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],2:[function(e,t,r){},{}]},{},[]),_xamzrequire=function s(o,a,u){function c(r,e){if(!a[r]){if(!o[r]){var t="function"==typeof _xamzrequire&&_xamzrequire;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=a[r]={exports:{}};o[r][0].call(i.exports,function(e){var t=o[r][1][e];return c(t||e)},i,i.exports,s,o,a,u)}return a[r].exports}for(var l="function"==typeof _xamzrequire&&_xamzrequire,e=0;e<u.length;e++)c(u[e]);return c}({28:[function(e,t,r){e("./browser_loader");var n=e("./core");"undefined"!=typeof window&&(window.AWS=n),void 0!==t&&(t.exports=n),"undefined"!=typeof self&&(self.AWS=n)},{"./browser_loader":35,"./core":38}],35:[function(n,i,e){(function(e){var t=n("./util");t.crypto.lib=n("./browserCryptoLib"),t.Buffer=n("buffer/").Buffer,t.url=n("url/"),t.querystring=n("querystring/"),t.environment="js",t.createEventStream=n("./event-stream/buffered-create-event-stream").createEventStream;var r=n("./core");i.exports=r,n("./credentials"),n("./credentials/credential_provider_chain"),n("./credentials/temporary_credentials"),n("./credentials/web_identity_credentials"),n("./credentials/cognito_identity_credentials"),n("./credentials/saml_credentials"),r.XML.Parser=n("./xml/browser_parser"),n("./http/xhr"),void 0===e&&(e={browser:!0})}).call(this,n("_process"))},{"./browserCryptoLib":29,"./core":38,"./credentials":39,"./credentials/cognito_identity_credentials":40,"./credentials/credential_provider_chain":41,"./credentials/saml_credentials":42,"./credentials/temporary_credentials":43,"./credentials/web_identity_credentials":44,"./event-stream/buffered-create-event-stream":51,"./http/xhr":60,"./util":112,"./xml/browser_parser":113,_process:9,"buffer/":3,"querystring/":16,"url/":18}],113:[function(e,t,r){var u=e("../util"),i=e("../model/shape");function n(){}function c(e,t){for(var r=e.getElementsByTagName(t),n=0,i=r.length;n<i;n++)if(r[n].parentNode===e)return r[n]}function l(e,t){switch(t||(t={}),t.type){case"structure":return s(e,t);case"map":return function(e,t){var r={},n=t.key.name||"key",i=t.value.name||"value",s=t.flattened?t.name:"entry",o=e.firstElementChild;for(;o;){if(o.nodeName===s){var a=c(o,n).textContent,u=c(o,i);r[a]=l(u,t.value)}o=o.nextElementSibling}return r}(e,t);case"list":return function(e,t){var r=[],n=t.flattened?t.name:t.member.name||"member",i=e.firstElementChild;for(;i;)i.nodeName===n&&r.push(l(i,t.member)),i=i.nextElementSibling;return r}(e,t);case void 0:case null:return function(e){if(null==e)return"";if(!e.firstElementChild)return null===e.parentNode.parentNode?{}:0===e.childNodes.length?"":e.textContent;var t={type:"structure",members:{}},r=e.firstElementChild;for(;r;){var n=r.nodeName;Object.prototype.hasOwnProperty.call(t.members,n)?t.members[n].type="list":t.members[n]={name:n},r=r.nextElementSibling}return s(e,t)}(e);default:return function(e,t){if(e.getAttribute){var r=e.getAttribute("encoding");"base64"===r&&(t=new i.create({type:r}))}var n=e.textContent;""===n&&(n=null);return"function"==typeof t.toType?t.toType(n):n}(e,t)}}function s(i,e){var s={};return null===i||u.each(e.members,function(e,t){if(t.isXmlAttribute){if(Object.prototype.hasOwnProperty.call(i.attributes,t.name)){var r=i.attributes[t.name].value;s[e]=l({textContent:r},t)}}else{var n=t.flattened?i:c(i,t.name);n?s[e]=l(n,t):t.flattened||"list"!==t.type||(s[e]=t.defaultValue)}}),s}n.prototype.parse=function(e,t){if(""===e.replace(/^\s+/,""))return{};var r,n;try{if(window.DOMParser){try{r=(new DOMParser).parseFromString(e,"text/xml")}catch(e){throw u.error(new Error("Parse error in document"),{originalError:e,code:"XMLParserError",retryable:!0})}if(null===r.documentElement)throw u.error(new Error("Cannot parse empty document."),{code:"XMLParserError",retryable:!0});var i=r.getElementsByTagName("parsererror")[0];if(i&&(i.parentNode===r||"body"===i.parentNode.nodeName||i.parentNode.parentNode===r||"body"===i.parentNode.parentNode.nodeName)){var s=i.getElementsByTagName("div")[0]||i;throw u.error(new Error(s.textContent||"Parser error in document"),{code:"XMLParserError",retryable:!0})}}else{if(!window.ActiveXObject)throw new Error("Cannot load XML parser");if((r=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,!r.loadXML(e))throw u.error(new Error("Parse error in document"),{code:"XMLParserError",retryable:!0})}}catch(e){n=e}if(r&&r.documentElement&&!n){var o=l(r.documentElement,t),a=c(r.documentElement,"ResponseMetadata");return a&&(o.ResponseMetadata=l(a,{})),o}if(n)throw u.error(n||new Error,{code:"XMLParserError",retryable:!0});return{}},t.exports=n},{"../model/shape":68,"../util":112}],60:[function(e,t,r){var l=e("../core"),h=e("events").EventEmitter;e("../http"),l.XHRClient=l.util.inherit({handleRequest:function(t,e,r,n){var i=this,s=t.endpoint,o=new h,a=s.protocol+"//"+s.hostname;80!==s.port&&443!==s.port&&(a+=":"+s.port),a+=t.path;var u=new XMLHttpRequest,c=!1;(t.stream=u).addEventListener("readystatechange",function(){try{if(0===u.status)return}catch(e){return}this.readyState>=this.HEADERS_RECEIVED&&!c&&(o.statusCode=u.status,o.headers=i.parseHeaders(u.getAllResponseHeaders()),o.emit("headers",o.statusCode,o.headers,u.statusText),c=!0),this.readyState===this.DONE&&i.finishRequest(u,o)},!1),u.upload.addEventListener("progress",function(e){o.emit("sendProgress",e)}),u.addEventListener("progress",function(e){o.emit("receiveProgress",e)},!1),u.addEventListener("timeout",function(){n(l.util.error(new Error("Timeout"),{code:"TimeoutError"}))},!1),u.addEventListener("error",function(){n(l.util.error(new Error("Network Failure"),{code:"NetworkingError"}))},!1),u.addEventListener("abort",function(){n(l.util.error(new Error("Request aborted"),{code:"RequestAbortedError"}))},!1),r(o),u.open(t.method,a,!1!==e.xhrAsync),l.util.each(t.headers,function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&u.setRequestHeader(e,t)}),e.timeout&&!1!==e.xhrAsync&&(u.timeout=e.timeout),e.xhrWithCredentials&&(u.withCredentials=!0);try{u.responseType="arraybuffer"}catch(e){}try{t.body?u.send(t.body):u.send()}catch(e){if(!t.body||"object"!=typeof t.body.buffer)throw e;u.send(t.body.buffer)}return o},parseHeaders:function(e){var n={};return l.util.arrayEach(e.split(/\r?\n/),function(e){var t=e.split(":",1)[0],r=e.substring(t.length+2);0<t.length&&(n[t.toLowerCase()]=r)}),n},finishRequest:function(e,t){var r;if("arraybuffer"===e.responseType&&e.response){var n=e.response;r=new l.util.Buffer(n.byteLength);for(var i=new Uint8Array(n),s=0;s<r.length;++s)r[s]=i[s]}try{r||"string"!=typeof e.responseText||(r=new l.util.Buffer(e.responseText))}catch(e){}r&&t.emit("data",r),t.emit("end")}}),l.HttpClient.prototype=l.XHRClient.prototype,l.HttpClient.streamsApiVersion=1},{"../core":38,"../http":59,events:4}],51:[function(e,t,r){var o=e("../event-stream/event-message-chunker").eventMessageChunker,a=e("./parse-event").parseEvent;t.exports={createEventStream:function(e,t,r){for(var n=o(e),i=[],s=0;s<n.length;s++)i.push(a(t,n[s],r));return i}}},{"../event-stream/event-message-chunker":52,"./parse-event":54}],54:[function(e,t,r){var v=e("./parse-message").parseMessage;t.exports={parseEvent:function(e,t,r){var n,i,s,o,a=v(t),u=a.headers[":message-type"];if(u){if("error"===u.value)throw i=(n=a).headers[":error-code"],s=n.headers[":error-message"],(o=new Error(s.value||s)).code=o.name=i.value||i,o;if("event"!==u.value)return}var c=a.headers[":event-type"],l=r.members[c.value];if(l){var h={},p=l.eventPayloadMemberName;if(p){var f=l.members[p];"binary"===f.type?h[p]=a.body:h[p]=e.parse(a.body.toString(),f)}for(var d=l.eventHeaderMemberNames,m=0;m<d.length;m++){var y=d[m];a.headers[y]&&(h[y]=l.members[y].toType(a.headers[y].value))}var g={};return g[c.value]=h,g}}}},{"./parse-message":55}],55:[function(e,t,r){var u=e("./int64").Int64,n=e("./split-message").splitMessage,c="boolean",l="byte",h="short",p="integer",f="long",d="binary",m="string",y="timestamp",g="uuid";t.exports={parseMessage:function(e){var t=n(e);return{headers:function(e){for(var t={},r=0;r<e.length;){var n=e.readUInt8(r++),i=e.slice(r,r+n).toString();switch(r+=n,e.readUInt8(r++)){case 0:t[i]={type:c,value:!0};break;case 1:t[i]={type:c,value:!1};break;case 2:t[i]={type:l,value:e.readInt8(r++)};break;case 3:t[i]={type:h,value:e.readInt16BE(r)},r+=2;break;case 4:t[i]={type:p,value:e.readInt32BE(r)},r+=4;break;case 5:t[i]={type:f,value:new u(e.slice(r,r+8))},r+=8;break;case 6:var s=e.readUInt16BE(r);r+=2,t[i]={type:d,value:e.slice(r,r+s)},r+=s;break;case 7:var o=e.readUInt16BE(r);r+=2,t[i]={type:m,value:e.slice(r,r+o).toString()},r+=o;break;case 8:t[i]={type:y,value:new Date(new u(e.slice(r,r+8)).valueOf())},r+=8;break;case 9:var a=e.slice(r,r+16).toString("hex");r+=16,t[i]={type:g,value:a.substr(0,8)+"-"+a.substr(8,4)+"-"+a.substr(12,4)+"-"+a.substr(16,4)+"-"+a.substr(20)};break;default:throw new Error("Unrecognized header type tag")}}return t}(t.headers),body:t.body}}}},{"./int64":53,"./split-message":56}],56:[function(e,t,r){var i=e("../core").util,s=e("./to-buffer").toBuffer;t.exports={splitMessage:function(e){if(i.Buffer.isBuffer(e)||(e=s(e)),e.length<16)throw new Error("Provided message too short to accommodate event stream message overhead");if(e.length!==e.readUInt32BE(0))throw new Error("Reported message length does not match received message length");var t=e.readUInt32BE(8);if(t!==i.crypto.crc32(e.slice(0,8)))throw new Error("The prelude checksum specified in the message ("+t+") does not match the calculated CRC32 checksum.");var r=e.readUInt32BE(e.length-4);if(r!==i.crypto.crc32(e.slice(0,e.length-4)))throw new Error("The message checksum did not match the expected value of "+r);var n=12+e.readUInt32BE(4);return{headers:e.slice(12,n),body:e.slice(n,e.length-4)}}}},{"../core":38,"./to-buffer":57}],53:[function(e,t,r){var n=e("../core").util,i=e("./to-buffer").toBuffer;function s(e){if(8!==e.length)throw new Error("Int64 buffers must be exactly 8 bytes");n.Buffer.isBuffer(e)||(e=i(e)),this.bytes=e}function o(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;-1<t&&(e[t]++,0===e[t]);t--);}s.fromNumber=function(e){if(0x8000000000000000<e||e<-0x8000000000000000)throw new Error(e+" is too large (or, if negative, too small) to represent as an Int64");for(var t=new Uint8Array(8),r=7,n=Math.abs(Math.round(e));-1<r&&0<n;r--,n/=256)t[r]=n;return e<0&&o(t),new s(t)},s.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&o(e),parseInt(e.toString("hex"),16)*(t?-1:1)},s.prototype.toString=function(){return String(this.valueOf())},t.exports={Int64:s}},{"../core":38,"./to-buffer":57}],57:[function(e,t,r){var n=e("../core").util.Buffer;t.exports={toBuffer:function(e,t){return"function"==typeof n.from&&n.from!==Uint8Array.from?n.from(e,t):new n(e,t)}}},{"../core":38}],52:[function(e,t,r){t.exports={eventMessageChunker:function(e){for(var t=[],r=0;r<e.length;){var n=e.readInt32BE(r),i=e.slice(r,n+r);r+=n,t.push(i)}return t}}},{}],44:[function(e,t,r){var n=e("../core");n.WebIdentityCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null,this._clientConfig=n.util.copy(t||{})},refresh:function(r){var n=this;n.createClients(),r||(r=function(e){if(e)throw e}),n.service.assumeRoleWithWebIdentity(function(e,t){n.data=null,e||(n.data=t,n.service.credentialsFrom(t,n)),r(e)})},createClients:function(){if(!this.service){var e=n.util.merge({},this._clientConfig);e.params=this.params,this.service=new n.STS(e)}}})},{"../core":38}],43:[function(e,t,r){var n=e("../core");n.TemporaryCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.loadMasterCredentials(t),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(r){var n=this;n.createClients(),r||(r=function(e){if(e)throw e}),n.masterCredentials.get(function(){n.service.config.credentials=n.masterCredentials,(n.params.RoleArn?n.service.assumeRole:n.service.getSessionToken).call(n.service,function(e,t){e||n.service.credentialsFrom(t,n),r(e)})})},loadMasterCredentials:function(e){for(this.masterCredentials=e||n.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials;"function"!=typeof this.masterCredentials.get&&(this.masterCredentials=new n.Credentials(this.masterCredentials))},createClients:function(){this.service=this.service||new n.STS({params:this.params})}})},{"../core":38}],42:[function(e,t,r){var n=e("../core");n.SAMLCredentials=n.util.inherit(n.Credentials,{constructor:function(e){n.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(r){var n=this;n.createClients(),r||(r=function(e){if(e)throw e}),n.service.assumeRoleWithSAML(function(e,t){e||n.service.credentialsFrom(t,n),r(e)})},createClients:function(){this.service=this.service||new n.STS({params:this.params})}})},{"../core":38}],40:[function(e,t,r){var n=e("../core");n.CognitoIdentityCredentials=n.util.inherit(n.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this._identityId=null,this._clientConfig=n.util.copy(t||{}),this.loadCachedId();var r=this;Object.defineProperty(this,"identityId",{get:function(){return r.loadCachedId(),r._identityId||r.params.IdentityId},set:function(e){r._identityId=e}})},refresh:function(t){var r=this;r.createClients(),r.data=null,r._identityId=null,r.getId(function(e){e?(r.clearIdOnNotAuthorized(e),t(e)):r.params.RoleArn?r.getCredentialsFromSTS(t):r.getCredentialsForIdentity(t)})},clearCachedId:function(){this._identityId=null,delete this.params.IdentityId;var e=this.params.IdentityPoolId,t=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+e+t],delete this.storage[this.localStorageKey.providers+e+t]},clearIdOnNotAuthorized:function(e){"NotAuthorizedException"==e.code&&this.clearCachedId()},getId:function(r){var n=this;if("string"==typeof n.params.IdentityId)return r(null,n.params.IdentityId);n.cognito.getId(function(e,t){!e&&t.IdentityId?(n.params.IdentityId=t.IdentityId,r(null,t.IdentityId)):r(e)})},loadCredentials:function(e,t){e&&t&&(t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration)},getCredentialsForIdentity:function(r){var n=this;n.cognito.getCredentialsForIdentity(function(e,t){e?n.clearIdOnNotAuthorized(e):(n.cacheId(t),n.data=t,n.loadCredentials(n.data,n)),r(e)})},getCredentialsFromSTS:function(r){var n=this;n.cognito.getOpenIdToken(function(e,t){e?(n.clearIdOnNotAuthorized(e),r(e)):(n.cacheId(t),n.params.WebIdentityToken=t.Token,n.webIdentityCredentials.refresh(function(e){e||(n.data=n.webIdentityCredentials.data,n.sts.credentialsFrom(n.data,n)),r(e)}))})},loadCachedId:function(){var e=this;if(n.util.isBrowser()&&!e.params.IdentityId){var t=e.getStorage("id");if(t&&e.params.Logins){var r=Object.keys(e.params.Logins);0!==(e.getStorage("providers")||"").split(",").filter(function(e){return-1!==r.indexOf(e)}).length&&(e.params.IdentityId=t)}else t&&(e.params.IdentityId=t)}},createClients:function(){var e=this._clientConfig;if(this.webIdentityCredentials=this.webIdentityCredentials||new n.WebIdentityCredentials(this.params,e),!this.cognito){var t=n.util.merge({},e);t.params=this.params,this.cognito=new n.CognitoIdentity(t)}this.sts=this.sts||new n.STS(e)},cacheId:function(e){this._identityId=e.IdentityId,this.params.IdentityId=this._identityId,n.util.isBrowser()&&(this.setStorage("id",e.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(e){return this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(e,t){try{this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]=t}catch(e){}},storage:function(){try{var e=n.util.isBrowser()&&null!==window.localStorage&&"object"==typeof window.localStorage?window.localStorage:{};return e["aws.test-storage"]="foobar",delete e["aws.test-storage"],e}catch(e){return{}}}()})},{"../core":38}],29:[function(e,t,r){var n=e("./browserHmac"),i=e("./browserMd5"),s=e("./browserSha1"),o=e("./browserSha256");t.exports={createHash:function(e){if("md5"===(e=e.toLowerCase()))return new i;if("sha256"===e)return new o;if("sha1"===e)return new s;throw new Error("Hash algorithm "+e+" is not supported in the browser SDK")},createHmac:function(e,t){if("md5"===(e=e.toLowerCase()))return new n(i,t);if("sha256"===e)return new n(o,t);if("sha1"===e)return new n(s,t);throw new Error("HMAC algorithm "+e+" is not supported in the browser SDK")},createSign:function(){throw new Error("createSign is not implemented in the browser")}}},{"./browserHmac":31,"./browserMd5":32,"./browserSha1":33,"./browserSha256":34}],34:[function(e,t,r){var o=e("buffer/").Buffer,n=e("./browserHashUtils"),y=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]),i=Math.pow(2,53)-1;function s(){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}t.exports=s,s.BLOCK_SIZE=64,s.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(n.isEmptyData(e))return this;var t=0,r=(e=n.convertToBuffer(e)).byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>i)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;0<r;)this.buffer[this.bufferLength++]=e[t++],r--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},s.prototype.digest=function(e){if(!this.finished){var t=8*this.bytesHashed,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),56<=n%64){for(var i=this.bufferLength;i<64;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<56;i++)r.setUint8(i,0);r.setUint32(56,Math.floor(t/4294967296),!0),r.setUint32(60,t),this.hashBuffer(),this.finished=!0}var s=new o(32);for(i=0;i<8;i++)s[4*i]=this.state[i]>>>24&255,s[4*i+1]=this.state[i]>>>16&255,s[4*i+2]=this.state[i]>>>8&255,s[4*i+3]=this.state[i]>>>0&255;return e?s.toString(e):s},s.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],u=t[6],c=t[7],l=0;l<64;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var h=this.temp[l-2],p=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,f=((h=this.temp[l-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[l]=(p+this.temp[l-7]|0)+(f+this.temp[l-16]|0)}var d=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&u)|0)+(c+(y[l]+this.temp[l]|0)|0)|0,m=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&n^r&i^n&i)|0;c=u,u=a,a=o,o=s+d|0,s=i,i=n,n=r,r=d+m|0}t[0]+=r,t[1]+=n,t[2]+=i,t[3]+=s,t[4]+=o,t[5]+=a,t[6]+=u,t[7]+=c}},{"./browserHashUtils":30,"buffer/":3}],33:[function(e,t,r){var i=e("buffer/").Buffer,n=e("./browserHashUtils");new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),Math.pow(2,53);function s(){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}t.exports=s,s.BLOCK_SIZE=64,s.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(n.isEmptyData(e))return this;var t=(e=n.convertToBuffer(e)).length;this.totalLength+=8*t;for(var r=0;r<t;r++)this.write(e[r]);return this},s.prototype.write=function(e){this.block[this.offset]|=(255&e)<<this.shift,this.shift?this.shift-=8:(this.offset++,this.shift=24),16===this.offset&&this.processBlock()},s.prototype.digest=function(e){this.write(128),(14<this.offset||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(0xffffffffff<this.totalLength?this.totalLength/1099511627776:0),this.write(4294967295<this.totalLength?this.totalLength/4294967296:0);for(var t=24;0<=t;t-=8)this.write(this.totalLength>>t);var r=new i(20),n=new DataView(r.buffer);return n.setUint32(0,this.h0,!1),n.setUint32(4,this.h1,!1),n.setUint32(8,this.h2,!1),n.setUint32(12,this.h3,!1),n.setUint32(16,this.h4,!1),e?r.toString(e):r},s.prototype.processBlock=function(){for(var e=16;e<80;e++){var t=this.block[e-3]^this.block[e-8]^this.block[e-14]^this.block[e-16];this.block[e]=t<<1|t>>>31}var r,n,i=this.h0,s=this.h1,o=this.h2,a=this.h3,u=this.h4;for(e=0;e<80;e++){e<20?(r=a^s&(o^a),n=1518500249):e<40?(r=s^o^a,n=1859775393):e<60?(r=s&o|a&(s|o),n=2400959708):(r=s^o^a,n=3395469782);var c=(i<<5|i>>>27)+r+u+n+(0|this.block[e]);u=a,a=o,o=s<<30|s>>>2,s=i,i=c}for(this.h0=this.h0+i|0,this.h1=this.h1+s|0,this.h2=this.h2+o|0,this.h3=this.h3+a|0,this.h4=this.h4+u|0,e=this.offset=0;e<16;e++)this.block[e]=0}},{"./browserHashUtils":30,"buffer/":3}],32:[function(e,t,r){var i=e("./browserHashUtils"),a=e("buffer/").Buffer;function n(){this.state=[1732584193,4023233417,2562383102,271733878],this.buffer=new DataView(new ArrayBuffer(64)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}function u(e,t,r,n,i,s){return((t=(t+e&4294967295)+(n+s&4294967295)&4294967295)<<i|t>>>32-i)+r&4294967295}function o(e,t,r,n,i,s,o){return u(t&r|~t&n,e,t,i,s,o)}function c(e,t,r,n,i,s,o){return u(t&n|r&~n,e,t,i,s,o)}function l(e,t,r,n,i,s,o){return u(t^r^n,e,t,i,s,o)}function h(e,t,r,n,i,s,o){return u(r^(t|~n),e,t,i,s,o)}t.exports=n,n.BLOCK_SIZE=64,n.prototype.update=function(e){if(i.isEmptyData(e))return this;if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=i.convertToBuffer(e),r=0,n=t.byteLength;for(this.bytesHashed+=n;0<n;)this.buffer.setUint8(this.bufferLength++,t[r++]),n--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},n.prototype.digest=function(e){if(!this.finished){var t=this.buffer,r=this.bufferLength,n=8*this.bytesHashed;if(t.setUint8(this.bufferLength++,128),56<=r%64){for(var i=this.bufferLength;i<64;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<56;i++)t.setUint8(i,0);t.setUint32(56,n>>>0,!0),t.setUint32(60,Math.floor(n/4294967296),!0),this.hashBuffer(),this.finished=!0}var s=new DataView(new ArrayBuffer(16));for(i=0;i<4;i++)s.setUint32(4*i,this.state[i],!0);var o=new a(s.buffer,s.byteOffset,s.byteLength);return e?o.toString(e):o},n.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],s=t[3];n=h(n=h(n=h(n=h(n=l(n=l(n=l(n=l(n=c(n=c(n=c(n=c(n=o(n=o(n=o(n=o(n,i=o(i,s=o(s,r=o(r,n,i,s,e.getUint32(0,!0),7,3614090360),n,i,e.getUint32(4,!0),12,3905402710),r,n,e.getUint32(8,!0),17,606105819),s,r,e.getUint32(12,!0),22,3250441966),i=o(i,s=o(s,r=o(r,n,i,s,e.getUint32(16,!0),7,4118548399),n,i,e.getUint32(20,!0),12,1200080426),r,n,e.getUint32(24,!0),17,2821735955),s,r,e.getUint32(28,!0),22,4249261313),i=o(i,s=o(s,r=o(r,n,i,s,e.getUint32(32,!0),7,1770035416),n,i,e.getUint32(36,!0),12,2336552879),r,n,e.getUint32(40,!0),17,4294925233),s,r,e.getUint32(44,!0),22,2304563134),i=o(i,s=o(s,r=o(r,n,i,s,e.getUint32(48,!0),7,1804603682),n,i,e.getUint32(52,!0),12,4254626195),r,n,e.getUint32(56,!0),17,2792965006),s,r,e.getUint32(60,!0),22,1236535329),i=c(i,s=c(s,r=c(r,n,i,s,e.getUint32(4,!0),5,4129170786),n,i,e.getUint32(24,!0),9,3225465664),r,n,e.getUint32(44,!0),14,643717713),s,r,e.getUint32(0,!0),20,3921069994),i=c(i,s=c(s,r=c(r,n,i,s,e.getUint32(20,!0),5,3593408605),n,i,e.getUint32(40,!0),9,38016083),r,n,e.getUint32(60,!0),14,3634488961),s,r,e.getUint32(16,!0),20,3889429448),i=c(i,s=c(s,r=c(r,n,i,s,e.getUint32(36,!0),5,568446438),n,i,e.getUint32(56,!0),9,3275163606),r,n,e.getUint32(12,!0),14,4107603335),s,r,e.getUint32(32,!0),20,1163531501),i=c(i,s=c(s,r=c(r,n,i,s,e.getUint32(52,!0),5,2850285829),n,i,e.getUint32(8,!0),9,4243563512),r,n,e.getUint32(28,!0),14,1735328473),s,r,e.getUint32(48,!0),20,2368359562),i=l(i,s=l(s,r=l(r,n,i,s,e.getUint32(20,!0),4,4294588738),n,i,e.getUint32(32,!0),11,2272392833),r,n,e.getUint32(44,!0),16,1839030562),s,r,e.getUint32(56,!0),23,4259657740),i=l(i,s=l(s,r=l(r,n,i,s,e.getUint32(4,!0),4,2763975236),n,i,e.getUint32(16,!0),11,1272893353),r,n,e.getUint32(28,!0),16,4139469664),s,r,e.getUint32(40,!0),23,3200236656),i=l(i,s=l(s,r=l(r,n,i,s,e.getUint32(52,!0),4,681279174),n,i,e.getUint32(0,!0),11,3936430074),r,n,e.getUint32(12,!0),16,3572445317),s,r,e.getUint32(24,!0),23,76029189),i=l(i,s=l(s,r=l(r,n,i,s,e.getUint32(36,!0),4,3654602809),n,i,e.getUint32(48,!0),11,3873151461),r,n,e.getUint32(60,!0),16,530742520),s,r,e.getUint32(8,!0),23,3299628645),i=h(i,s=h(s,r=h(r,n,i,s,e.getUint32(0,!0),6,4096336452),n,i,e.getUint32(28,!0),10,1126891415),r,n,e.getUint32(56,!0),15,2878612391),s,r,e.getUint32(20,!0),21,4237533241),i=h(i,s=h(s,r=h(r,n,i,s,e.getUint32(48,!0),6,1700485571),n,i,e.getUint32(12,!0),10,2399980690),r,n,e.getUint32(40,!0),15,4293915773),s,r,e.getUint32(4,!0),21,2240044497),i=h(i,s=h(s,r=h(r,n,i,s,e.getUint32(32,!0),6,1873313359),n,i,e.getUint32(60,!0),10,4264355552),r,n,e.getUint32(24,!0),15,2734768916),s,r,e.getUint32(52,!0),21,1309151649),i=h(i,s=h(s,r=h(r,n,i,s,e.getUint32(16,!0),6,4149444226),n,i,e.getUint32(44,!0),10,3174756917),r,n,e.getUint32(8,!0),15,718787259),s,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=n+t[1]&4294967295,t[2]=i+t[2]&4294967295,t[3]=s+t[3]&4294967295}},{"./browserHashUtils":30,"buffer/":3}],31:[function(e,t,r){var s=e("./browserHashUtils");function n(e,t){this.hash=new e,this.outer=new e;var r=function(e,t){var r=s.convertToBuffer(t);if(r.byteLength>e.BLOCK_SIZE){var n=new e;n.update(r),r=n.digest()}var i=new Uint8Array(e.BLOCK_SIZE);return i.set(r),i}(e,t),n=new Uint8Array(e.BLOCK_SIZE);n.set(r);for(var i=0;i<e.BLOCK_SIZE;i++)r[i]^=54,n[i]^=92;this.hash.update(r),this.outer.update(n);for(i=0;i<r.byteLength;i++)r[i]=0}t.exports=n,n.prototype.update=function(e){if(s.isEmptyData(e)||this.error)return this;try{this.hash.update(s.convertToBuffer(e))}catch(e){this.error=e}return this},n.prototype.digest=function(e){return this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest(e)}},{"./browserHashUtils":30}],30:[function(e,t,r){var n=e("buffer/").Buffer;"undefined"!=typeof ArrayBuffer&&void 0===ArrayBuffer.isView&&(ArrayBuffer.isView=function(e){return-1<i.indexOf(Object.prototype.toString.call(e))});var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"];t.exports={isEmptyData:function(e){return"string"==typeof e?0===e.length:0===e.byteLength},convertToBuffer:function(e){return"string"==typeof e&&(e=new n(e,"utf8")),ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}},{"buffer/":3}],18:[function(e,t,r){var q=e("punycode");function v(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=s,r.resolve=function(e,t){return s(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?s(e,!1,!0).resolveObject(t):t},r.format=function(e){H(e)&&(e=s(e));return e instanceof v?e.format():v.prototype.format.call(e)},r.Url=v;var P=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,i=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),L=["'"].concat(i),N=["%","/","?",";","#"].concat(L),O=["/","?","#"],U=/^[a-z0-9A-Z_-]{0,63}$/,M=/^([a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},D={javascript:!0,"javascript:":!0},B={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},F=e("querystring");function s(e,t,r){if(e&&a(e)&&e instanceof v)return e;var n=new v;return n.parse(e,t,r),n}function H(e){return"string"==typeof e}function a(e){return"object"==typeof e&&null!==e}function b(e){return null===e}v.prototype.parse=function(e,t,r){if(!H(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e;n=n.trim();var i=P.exec(n);if(i){var s=(i=i[0]).toLowerCase();this.protocol=s,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var o="//"===n.substr(0,2);!o||i&&D[i]||(n=n.substr(2),this.slashes=!0)}if(!D[i]&&(o||i&&!B[i])){for(var a,u,c=-1,l=0;l<O.length;l++){-1!==(h=n.indexOf(O[l]))&&(-1===c||h<c)&&(c=h)}-1!==(u=-1===c?n.lastIndexOf("@"):n.lastIndexOf("@",c))&&(a=n.slice(0,u),n=n.slice(u+1),this.auth=decodeURIComponent(a)),c=-1;for(l=0;l<N.length;l++){var h;-1!==(h=n.indexOf(N[l]))&&(-1===c||h<c)&&(c=h)}-1===c&&(c=n.length),this.host=n.slice(0,c),n=n.slice(c),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var f=this.hostname.split(/\./),d=(l=0,f.length);l<d;l++){var m=f[l];if(m&&!m.match(U)){for(var y="",g=0,v=m.length;g<v;g++)127<m.charCodeAt(g)?y+="x":y+=m[g];if(!y.match(U)){var b=f.slice(0,l),S=f.slice(l+1),w=m.match(M);w&&(b.push(w[1]),S.unshift(w[2])),S.length&&(n="/"+S.join(".")+n),this.hostname=b.join(".");break}}}if(255<this.hostname.length?this.hostname="":this.hostname=this.hostname.toLowerCase(),!p){var _=this.hostname.split("."),E=[];for(l=0;l<_.length;++l){var x=_[l];E.push(x.match(/[^A-Za-z0-9_-]/)?"xn--"+q.encode(x):x)}this.hostname=E.join(".")}var C=this.port?":"+this.port:"",T=this.hostname||"";this.host=T+C,this.href+=this.host,p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!j[s])for(l=0,d=L.length;l<d;l++){var A=L[l],R=encodeURIComponent(A);R===A&&(R=escape(A)),n=n.split(A).join(R)}var k=n.indexOf("#");-1!==k&&(this.hash=n.substr(k),n=n.slice(0,k));var I=n.indexOf("?");if(-1!==I?(this.search=n.substr(I),this.query=n.substr(I+1),t&&(this.query=F.parse(this.query)),n=n.slice(0,I)):t&&(this.search="",this.query={}),n&&(this.pathname=n),B[s]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){C=this.pathname||"",x=this.search||"";this.path=C+x}return this.href=this.format(),this},v.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,s="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&a(this.query)&&Object.keys(this.query).length&&(s=F.stringify(this.query));var o=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||B[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),o&&"?"!==o.charAt(0)&&(o="?"+o),t+i+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(o=o.replace("#","%23"))+n},v.prototype.resolve=function(e){return this.resolveObject(s(e,!1,!0)).format()},v.prototype.resolveObject=function(t){if(H(t)){var e=new v;e.parse(t,!1,!0),t=e}var r=new v;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(r[e]=t[e])}),B[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(t.protocol&&t.protocol!==r.protocol){if(!B[t.protocol])return Object.keys(t).forEach(function(e){r[e]=t[e]}),r.href=r.format(),r;if(r.protocol=t.protocol,t.host||D[t.protocol])r.pathname=t.pathname;else{for(var n=(t.pathname||"").split("/");n.length&&!(t.host=n.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==n[0]&&n.unshift(""),n.length<2&&n.unshift(""),r.pathname=n.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var i=r.pathname||"",s=r.search||"";r.path=i+s}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var o=r.pathname&&"/"===r.pathname.charAt(0),a=t.host||t.pathname&&"/"===t.pathname.charAt(0),u=a||o||r.host&&t.pathname,c=u,l=r.pathname&&r.pathname.split("/")||[],h=(n=t.pathname&&t.pathname.split("/")||[],r.protocol&&!B[r.protocol]);if(h&&(r.hostname="",r.port=null,r.host&&(""===l[0]?l[0]=r.host:l.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===n[0]?n[0]=t.host:n.unshift(t.host)),t.host=null),u=u&&(""===n[0]||""===l[0])),a)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,l=n;else if(n.length)l||(l=[]),l.pop(),l=l.concat(n),r.search=t.search,r.query=t.query;else if(null!=t.search){if(h)r.hostname=r.host=l.shift(),(y=!!(r.host&&0<r.host.indexOf("@"))&&r.host.split("@"))&&(r.auth=y.shift(),r.host=r.hostname=y.shift());return r.search=t.search,r.query=t.query,b(r.pathname)&&b(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!l.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var p=l.slice(-1)[0],f=(r.host||t.host)&&("."===p||".."===p)||""===p,d=0,m=l.length;0<=m;m--)"."==(p=l[m])?l.splice(m,1):".."===p?(l.splice(m,1),d++):d&&(l.splice(m,1),d--);if(!u&&!c)for(;d--;d)l.unshift("..");!u||""===l[0]||l[0]&&"/"===l[0].charAt(0)||l.unshift(""),f&&"/"!==l.join("/").substr(-1)&&l.push("");var y,g=""===l[0]||l[0]&&"/"===l[0].charAt(0);h&&(r.hostname=r.host=g?"":l.length?l.shift():"",(y=!!(r.host&&0<r.host.indexOf("@"))&&r.host.split("@"))&&(r.auth=y.shift(),r.host=r.hostname=y.shift()));return(u=u||r.host&&l.length)&&!g&&l.unshift(""),l.length?r.pathname=l.join("/"):(r.pathname=null,r.path=null),b(r.pathname)&&b(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},v.prototype.parseHost=function(){var e=this.host,t=n.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:10,querystring:13}],16:[function(e,t,r){arguments[4][13][0].apply(r,arguments)},{"./decode":14,"./encode":15,dup:13}],15:[function(e,t,r){"use strict";var s=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(r,n,i,e){return n=n||"&",i=i||"=",null===r&&(r=void 0),"object"==typeof r?Object.keys(r).map(function(e){var t=encodeURIComponent(s(e))+i;return Array.isArray(r[e])?r[e].map(function(e){return t+encodeURIComponent(s(e))}).join(n):t+encodeURIComponent(s(r[e]))}).join(n):e?encodeURIComponent(s(e))+i+encodeURIComponent(s(r)):""}},{}],14:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var s=/\+/g;e=e.split(t);var o=1e3;n&&"number"==typeof n.maxKeys&&(o=n.maxKeys);var a,u,c=e.length;0<o&&o<c&&(c=o);for(var l=0;l<c;++l){var h,p,f,d,m=e[l].replace(s,"%20"),y=m.indexOf(r);0<=y?(h=m.substr(0,y),p=m.substr(y+1)):(h=m,p=""),f=decodeURIComponent(h),d=decodeURIComponent(p),a=i,u=f,Object.prototype.hasOwnProperty.call(a,u)?Array.isArray(i[f])?i[f].push(d):i[f]=[i[f],d]:i[f]=d}return i}},{}],13:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":11,"./encode":12}],12:[function(e,t,r){"use strict";var s=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(r,n,i,e){return n=n||"&",i=i||"=",null===r&&(r=void 0),"object"==typeof r?a(u(r),function(e){var t=encodeURIComponent(s(e))+i;return o(r[e])?a(r[e],function(e){return t+encodeURIComponent(s(e))}).join(n):t+encodeURIComponent(s(r[e]))}).join(n):e?encodeURIComponent(s(e))+i+encodeURIComponent(s(r)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var u=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],11:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var s=/\+/g;e=e.split(t);var o=1e3;n&&"number"==typeof n.maxKeys&&(o=n.maxKeys);var a,u,c=e.length;0<o&&o<c&&(c=o);for(var l=0;l<c;++l){var h,p,f,d,m=e[l].replace(s,"%20"),y=m.indexOf(r);0<=y?(h=m.substr(0,y),p=m.substr(y+1)):(h=m,p=""),f=decodeURIComponent(h),d=decodeURIComponent(p),a=i,u=f,Object.prototype.hasOwnProperty.call(a,u)?g(i[f])?i[f].push(d):i[f]=[i[f],d]:i[f]=d}return i};var g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],10:[function(e,P,L){(function(q){!function(e){var t="object"==typeof L&&L&&!L.nodeType&&L,r="object"==typeof P&&P&&!P.nodeType&&P,n="object"==typeof q&&q;n.global!==n&&n.window!==n&&n.self!==n||(e=n);var i,s,g=2147483647,v=36,b=1,S=26,o=38,a=700,w=72,_=128,E="-",u=/^xn--/,c=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=v-b,x=Math.floor,C=String.fromCharCode;function T(e){throw RangeError(h[e])}function f(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function d(e,t){var r=e.split("@"),n="";return 1<r.length&&(n=r[0]+"@",e=r[1]),n+f((e=e.replace(l,".")).split("."),t).join(".")}function A(e){for(var t,r,n=[],i=0,s=e.length;i<s;)55296<=(t=e.charCodeAt(i++))&&t<=56319&&i<s?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function R(e){return f(e,function(e){var t="";return 65535<e&&(t+=C((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=C(e)}).join("")}function k(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function I(e,t,r){var n=0;for(e=r?x(e/a):e>>1,e+=x(e/t);p*S>>1<e;n+=v)e=x(e/p);return x(n+(p+1)*e/(e+o))}function m(e){var t,r,n,i,s,o,a,u,c,l,h,p=[],f=e.length,d=0,m=_,y=w;for((r=e.lastIndexOf(E))<0&&(r=0),n=0;n<r;++n)128<=e.charCodeAt(n)&&T("not-basic"),p.push(e.charCodeAt(n));for(i=0<r?r+1:0;i<f;){for(s=d,o=1,a=v;f<=i&&T("invalid-input"),h=e.charCodeAt(i++),(v<=(u=h-48<10?h-22:h-65<26?h-65:h-97<26?h-97:v)||u>x((g-d)/o))&&T("overflow"),d+=u*o,!(u<(c=a<=y?b:y+S<=a?S:a-y));a+=v)o>x(g/(l=v-c))&&T("overflow"),o*=l;y=I(d-s,t=p.length+1,0==s),x(d/t)>g-m&&T("overflow"),m+=x(d/t),d%=t,p.splice(d++,0,m)}return R(p)}function y(e){var t,r,n,i,s,o,a,u,c,l,h,p,f,d,m,y=[];for(p=(e=A(e)).length,t=_,s=w,o=r=0;o<p;++o)(h=e[o])<128&&y.push(C(h));for(n=i=y.length,i&&y.push(E);n<p;){for(a=g,o=0;o<p;++o)t<=(h=e[o])&&h<a&&(a=h);for(a-t>x((g-r)/(f=n+1))&&T("overflow"),r+=(a-t)*f,t=a,o=0;o<p;++o)if((h=e[o])<t&&++r>g&&T("overflow"),h==t){for(u=r,c=v;!(u<(l=c<=s?b:s+S<=c?S:c-s));c+=v)m=u-l,d=v-l,y.push(C(k(l+m%d,0))),u=x(m/d);y.push(C(k(u,0))),s=I(r,f,n==i),r=0,++n}++r,++t}return y.join("")}if(i={version:"1.3.2",ucs2:{decode:A,encode:R},decode:m,encode:y,toASCII:function(e){return d(e,function(e){return c.test(e)?"xn--"+y(e):e})},toUnicode:function(e){return d(e,function(e){return u.test(e)?m(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return i});else if(t&&r)if(P.exports==t)r.exports=i;else for(s in i)i.hasOwnProperty(s)&&(t[s]=i[s]);else e.punycode=i}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function u(e){return"function"==typeof e}function c(e){return"object"==typeof e&&null!==e}function l(e){return void 0===e}((t.exports=n).EventEmitter=n).prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,i,s,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||c(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var a=new Error('Uncaught, unspecified "error" event. ('+t+")");throw a.context=t,a}if(l(r=this._events[e]))return!1;if(u(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),r.apply(this,i)}else if(c(r))for(i=Array.prototype.slice.call(arguments,1),n=(o=r.slice()).length,s=0;s<n;s++)o[s].apply(this,i);return!0},n.prototype.on=n.prototype.addListener=function(e,t){var r;if(!u(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,u(t.listener)?t.listener:t),this._events[e]?c(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,c(this._events[e])&&!this._events[e].warned&&(r=l(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&0<r&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.once=function(e,t){if(!u(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var r,n,i,s;if(!u(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(r=this._events[e]).length,n=-1,r===t||u(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(c(r)){for(s=i;0<s--;)if(r[s]===t||r[s].listener&&r[s].listener===t){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(u(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?u(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(u(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],3:[function(t,e,j){(function(e){"use strict";var n=t("base64-js"),s=t("ieee754"),o=t("isarray");function r(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(r()<t)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=h.prototype:(null===e&&(e=new h(t)),e.length=t),e}function h(e,t,r){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return i(this,e,t,r)}function i(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);h.TYPED_ARRAY_SUPPORT?(e=t).__proto__=h.prototype:e=l(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!h.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|f(t,r),i=(e=a(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(h.isBuffer(t)){var r=0|p(t.length);return 0===(e=a(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?a(e,0):l(e,t);if("Buffer"===t.type&&o(t.data))return l(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function c(e,t){if(u(t),e=a(e,t<0?0:0|p(t)),!h.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function l(e,t){var r=t.length<0?0:0|p(t.length);e=a(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function f(e,t){if(h.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return O(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(n)return O(e).length;t=(""+t).toLowerCase(),n=!0}}function d(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=h.from(t,n)),h.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var s,o=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a/=o=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(s=r;s<a;s++)if(c(e,s)===c(t,-1===l?0:s-l)){if(-1===l&&(l=s),s-l+1===u)return l*o}else-1!==l&&(s-=s-l),l=-1}else for(a<r+u&&(r=a-u),s=r;0<=s;s--){for(var h=!0,p=0;p<u;p++)if(c(e,s+p)!==c(t,p)){h=!1;break}if(h)return s}return-1}function g(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?i<(n=Number(n))&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");s/2<n&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(t.substr(2*o,2),16);if(isNaN(a))return o;e[r+o]=a}return o}function v(e,t,r,n){return M(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function b(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s,o,a,u,c=e[i],l=null,h=239<c?4:223<c?3:191<c?2:1;if(i+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(s=e[i+1]))&&127<(u=(31&c)<<6|63&s)&&(l=u);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&2047<(u=(15&c)<<12|(63&s)<<6|63&o)&&(u<55296||57343<u)&&(l=u);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&65535<(u=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)&&u<1114112&&(l=u)}null===l?(l=65533,h=1):65535<l&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(e){var t=e.length;if(t<=w)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=w));return r}(n)}j.Buffer=h,j.SlowBuffer=function(e){+e!=e&&(e=0);return h.alloc(+e)},j.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),j.kMaxLength=r(),h.poolSize=8192,h._augment=function(e){return e.__proto__=h.prototype,e},h.from=function(e,t,r){return i(null,e,t,r)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(e,t,r){return n=null,s=t,o=r,u(i=e),i<=0?a(n,i):void 0!==s?"string"==typeof o?a(n,i).fill(s,o):a(n,i).fill(s):a(n,i);var n,i,s,o},h.allocUnsafe=function(e){return c(null,e)},h.allocUnsafeSlow=function(e){return c(null,e)},h.isBuffer=function(e){return!(null==e||!e._isBuffer)},h.compare=function(e,t){if(!h.isBuffer(e)||!h.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},h.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return h.alloc(0);var r;if(void 0===t)for(r=t=0;r<e.length;++r)t+=e[r].length;var n=h.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(!h.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},h.byteLength=f,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)d(this,t,t+1);return this},h.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)d(this,t,t+3),d(this,t+1,t+2);return this},h.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);return this},h.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return _(this,t,r);case"latin1":case"binary":return E(this,t,r);case"base64":return b(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},h.prototype.equals=function(e){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===h.compare(this,e)},h.prototype.inspect=function(){var e="",t=j.INSPECT_MAX_BYTES;return 0<this.length&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},h.prototype.compare=function(e,t,r,n,i){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(i<=n&&r<=t)return 0;if(i<=n)return-1;if(r<=t)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),a=Math.min(s,o),u=this.slice(n,i),c=e.slice(t,r),l=0;l<a;++l)if(u[l]!==c[l]){s=u[l],o=c[l];break}return s<o?-1:o<s?1:0},h.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},h.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},h.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},h.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||i<r)&&(r=i),0<e.length&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s,o,a,u,c,l,h,p,f,d=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return p=t,f=r,M(O(e,(h=this).length-p),h,p,f);case"ascii":return v(this,e,t,r);case"latin1":case"binary":return v(this,e,t,r);case"base64":return u=this,c=t,l=r,M(U(e),u,c,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o=t,a=r,M(function(e,t){for(var r,n,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}(e,(s=this).length-o),s,o,a);default:if(d)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function _(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function E(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function x(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||n<r)&&(r=n);for(var i="",s=t;s<r;++s)i+=N(e[s]);return i}function C(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function T(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,r,n,i,s){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<t||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-r,2);i<s;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function k(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-r,4);i<s;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function I(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function q(e,t,r,n,i){return i||I(e,0,r,4),s.write(e,t,r,n,23,4),r+4}function P(e,t,r,n,i){return i||I(e,0,r,8),s.write(e,t,r,n,52,8),r+8}h.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),t<e&&(t=e),h.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=h.prototype;else{var i=t-e;r=new h(i,void 0);for(var s=0;s<i;++s)r[s]=this[s+e]}return r},h.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},h.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=this[e+--t],i=1;0<t&&(i*=256);)n+=this[e+--t]*i;return n},h.prototype.readUInt8=function(e,t){return t||T(e,1,this.length),this[e]},h.prototype.readUInt16LE=function(e,t){return t||T(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUInt16BE=function(e,t){return t||T(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUInt32LE=function(e,t){return t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUInt32BE=function(e,t){return t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return(i*=128)<=n&&(n-=Math.pow(2,8*t)),n},h.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||T(e,t,this.length);for(var n=t,i=1,s=this[e+--n];0<n&&(i*=256);)s+=this[e+--n]*i;return(i*=128)<=s&&(s-=Math.pow(2,8*t)),s},h.prototype.readInt8=function(e,t){return t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){t||T(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(e,t){t||T(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(e,t){return t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,t){return t||T(e,4,this.length),s.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return t||T(e,4,this.length),s.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return t||T(e,8,this.length),s.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return t||T(e,8,this.length),s.read(this,e,!1,52,8)},h.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||A(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},h.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||A(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,s=1;for(this[t+i]=255&e;0<=--i&&(s*=256);)this[t+i]=e/s&255;return t+r},h.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||A(this,e,t,1,255,0),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},h.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||A(this,e,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},h.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||A(this,e,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},h.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||A(this,e,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):k(this,e,t,!0),t+4},h.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||A(this,e,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},h.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);A(this,e,t,r,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<r&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},h.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);A(this,e,t,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;0<=--s&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},h.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||A(this,e,t,1,127,-128),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},h.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||A(this,e,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},h.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||A(this,e,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},h.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||A(this,e,t,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):k(this,e,t,!0),t+4},h.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},h.prototype.writeFloatLE=function(e,t,r){return q(this,e,t,!0,r)},h.prototype.writeFloatBE=function(e,t,r){return q(this,e,t,!1,r)},h.prototype.writeDoubleLE=function(e,t,r){return P(this,e,t,!0,r)},h.prototype.writeDoubleBE=function(e,t,r){return P(this,e,t,!1,r)},h.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),0<n&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,s=n-r;if(this===e&&r<t&&t<n)for(i=s-1;0<=i;--i)e[i+t]=this[i+r];else if(s<1e3||!h.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+s),t);return s},h.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!h.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var o=h.isBuffer(e)?e:O(new h(e,n).toString()),a=o.length;for(s=0;s<r-t;++s)this[s+t]=o[s%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function O(e,t){var r;t=t||1/0;for(var n=e.length,i=null,s=[],o=0;o<n;++o){if(55295<(r=e.charCodeAt(o))&&r<57344){if(!i){if(56319<r){-1<(t-=3)&&s.push(239,191,189);continue}if(o+1===n){-1<(t-=3)&&s.push(239,191,189);continue}i=r;continue}if(r<56320){-1<(t-=3)&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&-1<(t-=3)&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function U(e){return n.toByteArray(function(e){var t;if((e=(t=e,t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function M(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:5,isarray:7}],7:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],5:[function(e,t,r){r.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,h=r?i-1:0,p=r?-1:1,f=e[t+h];for(h+=p,s=f&(1<<-l)-1,f>>=-l,l+=a;0<l;s=256*s+e[t+h],h+=p,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=n;0<l;o=256*o+e[t+h],h+=p,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),s-=c}return(f?-1:1)*o*Math.pow(2,s-n)},r.write=function(e,t,r,n,i,s){var o,a,u,c=8*s-i-1,l=(1<<c)-1,h=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),2<=(t+=1<=o+h?p/u:p*Math.pow(2,1-h))*u&&(o++,u/=2),l<=o+h?(a=0,o=l):1<=o+h?(a=(t*u-1)*Math.pow(2,i),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));8<=i;e[r+f]=255&a,f+=d,a/=256,i-=8);for(o=o<<i|a,c+=i;0<c;e[r+f]=255&o,f+=d,o/=256,c-=8);e[r+f-d]|=128*m}},{}],1:[function(e,t,r){"use strict";r.byteLength=function(e){var t=f(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){for(var t,r=f(e),n=r[0],i=r[1],s=new p((c=n,l=i,3*(c+l)/4-l)),o=0,a=0<i?n-4:n,u=0;u<a;u+=4)t=h[e.charCodeAt(u)]<<18|h[e.charCodeAt(u+1)]<<12|h[e.charCodeAt(u+2)]<<6|h[e.charCodeAt(u+3)],s[o++]=t>>16&255,s[o++]=t>>8&255,s[o++]=255&t;var c,l;2===i&&(t=h[e.charCodeAt(u)]<<2|h[e.charCodeAt(u+1)]>>4,s[o++]=255&t);1===i&&(t=h[e.charCodeAt(u)]<<10|h[e.charCodeAt(u+1)]<<4|h[e.charCodeAt(u+2)]>>2,s[o++]=t>>8&255,s[o++]=255&t);return s},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,i=[],s=0,o=r-n;s<o;s+=16383)i.push(u(e,s,o<s+16383?o:s+16383));1===n?(t=e[r-1],i.push(a[t>>2]+a[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"="));return i.join("")};for(var a=[],h=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=n.length;i<s;++i)a[i]=n[i],h[n.charCodeAt(i)]=i;function f(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var n,i,s=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(a[(i=n)>>18&63]+a[i>>12&63]+a[i>>6&63]+a[63&i]);return s.join("")}h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63},{}]},{},[28]),AWS.apiLoader.services.polly={},AWS.Polly=AWS.Service.defineService("polly",["2016-06-10"]),_xamzrequire=function s(o,a,u){function c(r,e){if(!a[r]){if(!o[r]){var t="function"==typeof _xamzrequire&&_xamzrequire;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=a[r]={exports:{}};o[r][0].call(i.exports,function(e){var t=o[r][1][e];return c(t||e)},i,i.exports,s,o,a,u)}return a[r].exports}for(var l="function"==typeof _xamzrequire&&_xamzrequire,e=0;e<u.length;e++)c(u[e]);return c}({96:[function(e,t,r){e("../polly/presigner")},{"../polly/presigner":70}],70:[function(e,t,r){var n=e("../core"),i=n.Protocol.Rest;n.Polly.Presigner=n.util.inherit({constructor:function(e){e=e||{},this.options=e,this.service=e.service,this.bindServiceObject(e),this._operations={}},bindServiceObject:function(e){if(e=e||{},this.service){var t=n.util.copy(this.service.config);this.service=new this.service.constructor.__super__(t),this.service.config.params=n.util.merge(this.service.config.params||{},e.params)}else this.service=new n.Polly(e)},modifyInputMembers:function(e){var r=n.util.copy(e);return r.members=n.util.copy(e.members),n.util.each(e.members,function(e,t){r.members[e]=n.util.copy(t),t.location&&"body"!==t.location||(r.members[e].location="querystring",r.members[e].locationName=e)}),r},convertPostToGet:function(e){e.httpRequest.method="GET";var t=e.service.api.operations[e.operation],r=this._operations[e.operation];r||(this._operations[e.operation]=r=this.modifyInputMembers(t.input));var n=i.generateURI(e.httpRequest.endpoint.path,t.httpPath,r,e.params);e.httpRequest.path=n,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},getSynthesizeSpeechUrl:function(e,t,r){var n=this,i=this.service.makeRequest("synthesizeSpeech",e);return i.removeAllListeners("build"),i.on("build",function(e){n.convertPostToGet(e)}),i.presign(t,r)}})},{"../core":38}]},{},[96]),AWS.apiLoader.services.polly["2016-06-10"]={version:"2.0",metadata:{apiVersion:"2016-06-10",endpointPrefix:"polly",protocol:"rest-json",serviceFullName:"Amazon Polly",serviceId:"Polly",signatureVersion:"v4",uid:"polly-2016-06-10"},operations:{DeleteLexicon:{http:{method:"DELETE",requestUri:"/v1/lexicons/{LexiconName}",responseCode:200},input:{type:"structure",required:["Name"],members:{Name:{shape:"S2",location:"uri",locationName:"LexiconName"}}},output:{type:"structure",members:{}}},DescribeVoices:{http:{method:"GET",requestUri:"/v1/voices",responseCode:200},input:{type:"structure",members:{LanguageCode:{location:"querystring",locationName:"LanguageCode"},NextToken:{location:"querystring",locationName:"NextToken"}}},output:{type:"structure",members:{Voices:{type:"list",member:{type:"structure",members:{Gender:{},Id:{},LanguageCode:{},LanguageName:{},Name:{}}}},NextToken:{}}}},GetLexicon:{http:{method:"GET",requestUri:"/v1/lexicons/{LexiconName}",responseCode:200},input:{type:"structure",required:["Name"],members:{Name:{shape:"S2",location:"uri",locationName:"LexiconName"}}},output:{type:"structure",members:{Lexicon:{type:"structure",members:{Content:{},Name:{shape:"S2"}}},LexiconAttributes:{shape:"Si"}}}},ListLexicons:{http:{method:"GET",requestUri:"/v1/lexicons",responseCode:200},input:{type:"structure",members:{NextToken:{location:"querystring",locationName:"NextToken"}}},output:{type:"structure",members:{Lexicons:{type:"list",member:{type:"structure",members:{Name:{shape:"S2"},Attributes:{shape:"Si"}}}},NextToken:{}}}},PutLexicon:{http:{method:"PUT",requestUri:"/v1/lexicons/{LexiconName}",responseCode:200},input:{type:"structure",required:["Name","Content"],members:{Name:{shape:"S2",location:"uri",locationName:"LexiconName"},Content:{}}},output:{type:"structure",members:{}}},SynthesizeSpeech:{http:{requestUri:"/v1/speech",responseCode:200},input:{type:"structure",required:["OutputFormat","Text","VoiceId"],members:{LexiconNames:{type:"list",member:{shape:"S2"}},OutputFormat:{},SampleRate:{},SpeechMarkTypes:{type:"list",member:{}},Text:{},TextType:{},VoiceId:{}}},output:{type:"structure",members:{AudioStream:{type:"blob",streaming:!0},ContentType:{location:"header",locationName:"Content-Type"},RequestCharacters:{location:"header",locationName:"x-amzn-RequestCharacters",type:"integer"}},payload:"AudioStream"}}},shapes:{S2:{type:"string",sensitive:!0},Si:{type:"structure",members:{Alphabet:{},LanguageCode:{},LastModified:{type:"timestamp"},LexiconArn:{},LexemesCount:{type:"integer"},Size:{type:"integer"}}}},paginators:{}},AWS.apiLoader.services.rekognition={},AWS.Rekognition=AWS.Service.defineService("rekognition",["2016-06-27"]),AWS.apiLoader.services.rekognition["2016-06-27"]={version:"2.0",metadata:{apiVersion:"2016-06-27",endpointPrefix:"rekognition",jsonVersion:"1.1",protocol:"json",serviceFullName:"Amazon Rekognition",serviceId:"Rekognition",signatureVersion:"v4",targetPrefix:"RekognitionService",uid:"rekognition-2016-06-27"},operations:{CompareFaces:{input:{type:"structure",required:["SourceImage","TargetImage"],members:{SourceImage:{shape:"S2"},TargetImage:{shape:"S2"},SimilarityThreshold:{type:"float"}}},output:{type:"structure",members:{SourceImageFace:{type:"structure",members:{BoundingBox:{shape:"Sb"},Confidence:{type:"float"}}},FaceMatches:{type:"list",member:{type:"structure",members:{Similarity:{type:"float"},Face:{shape:"Sf"}}}},UnmatchedFaces:{type:"list",member:{shape:"Sf"}},SourceImageOrientationCorrection:{},TargetImageOrientationCorrection:{}}}},CreateCollection:{input:{type:"structure",required:["CollectionId"],members:{CollectionId:{}}},output:{type:"structure",members:{StatusCode:{type:"integer"},CollectionArn:{},FaceModelVersion:{}}}},CreateStreamProcessor:{input:{type:"structure",required:["Input","Output","Name","Settings","RoleArn"],members:{Input:{shape:"Su"},Output:{shape:"Sx"},Name:{},Settings:{shape:"S11"},RoleArn:{}}},output:{type:"structure",members:{StreamProcessorArn:{}}}},DeleteCollection:{input:{type:"structure",required:["CollectionId"],members:{CollectionId:{}}},output:{type:"structure",members:{StatusCode:{type:"integer"}}}},DeleteFaces:{input:{type:"structure",required:["CollectionId","FaceIds"],members:{CollectionId:{},FaceIds:{shape:"S19"}}},output:{type:"structure",members:{DeletedFaces:{shape:"S19"}}}},DeleteStreamProcessor:{input:{type:"structure",required:["Name"],members:{Name:{}}},output:{type:"structure",members:{}}},DescribeStreamProcessor:{input:{type:"structure",required:["Name"],members:{Name:{}}},output:{type:"structure",members:{Name:{},StreamProcessorArn:{},Status:{},StatusMessage:{},CreationTimestamp:{type:"timestamp"},LastUpdateTimestamp:{type:"timestamp"},Input:{shape:"Su"},Output:{shape:"Sx"},RoleArn:{},Settings:{shape:"S11"}}}},DetectFaces:{input:{type:"structure",required:["Image"],members:{Image:{shape:"S2"},Attributes:{shape:"S1j"}}},output:{type:"structure",members:{FaceDetails:{type:"list",member:{shape:"S1n"}},OrientationCorrection:{}}}},DetectLabels:{input:{type:"structure",required:["Image"],members:{Image:{shape:"S2"},MaxLabels:{type:"integer"},MinConfidence:{type:"float"}}},output:{type:"structure",members:{Labels:{type:"list",member:{shape:"S25"}},OrientationCorrection:{}}}},DetectModerationLabels:{input:{type:"structure",required:["Image"],members:{Image:{shape:"S2"},MinConfidence:{type:"float"}}},output:{type:"structure",members:{ModerationLabels:{type:"list",member:{shape:"S29"}}}}},DetectText:{input:{type:"structure",required:["Image"],members:{Image:{shape:"S2"}}},output:{type:"structure",members:{TextDetections:{type:"list",member:{type:"structure",members:{DetectedText:{},Type:{},Id:{type:"integer"},ParentId:{type:"integer"},Confidence:{type:"float"},Geometry:{type:"structure",members:{BoundingBox:{shape:"Sb"},Polygon:{type:"list",member:{type:"structure",members:{X:{type:"float"},Y:{type:"float"}}}}}}}}}}}},GetCelebrityInfo:{input:{type:"structure",required:["Id"],members:{Id:{}}},output:{type:"structure",members:{Urls:{shape:"S2l"},Name:{}}}},GetCelebrityRecognition:{input:{type:"structure",required:["JobId"],members:{JobId:{},MaxResults:{type:"integer"},NextToken:{},SortBy:{}}},output:{type:"structure",members:{JobStatus:{},StatusMessage:{},VideoMetadata:{shape:"S2v"},NextToken:{},Celebrities:{type:"list",member:{type:"structure",members:{Timestamp:{type:"long"},Celebrity:{type:"structure",members:{Urls:{shape:"S2l"},Name:{},Id:{},Confidence:{type:"float"},BoundingBox:{shape:"Sb"},Face:{shape:"S1n"}}}}}}}}},GetContentModeration:{input:{type:"structure",required:["JobId"],members:{JobId:{},MaxResults:{type:"integer"},NextToken:{},SortBy:{}}},output:{type:"structure",members:{JobStatus:{},StatusMessage:{},VideoMetadata:{shape:"S2v"},ModerationLabels:{type:"list",member:{type:"structure",members:{Timestamp:{type:"long"},ModerationLabel:{shape:"S29"}}}},NextToken:{}}}},GetFaceDetection:{input:{type:"structure",required:["JobId"],members:{JobId:{},MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{JobStatus:{},StatusMessage:{},VideoMetadata:{shape:"S2v"},NextToken:{},Faces:{type:"list",member:{type:"structure",members:{Timestamp:{type:"long"},Face:{shape:"S1n"}}}}}}},GetFaceSearch:{input:{type:"structure",required:["JobId"],members:{JobId:{},MaxResults:{type:"integer"},NextToken:{},SortBy:{}}},output:{type:"structure",members:{JobStatus:{},StatusMessage:{},NextToken:{},VideoMetadata:{shape:"S2v"},Persons:{type:"list",member:{type:"structure",members:{Timestamp:{type:"long"},Person:{shape:"S3f"},FaceMatches:{shape:"S3h"}}}}}}},GetLabelDetection:{input:{type:"structure",required:["JobId"],members:{JobId:{},MaxResults:{type:"integer"},NextToken:{},SortBy:{}}},output:{type:"structure",members:{JobStatus:{},StatusMessage:{},VideoMetadata:{shape:"S2v"},NextToken:{},Labels:{type:"list",member:{type:"structure",members:{Timestamp:{type:"long"},Label:{shape:"S25"}}}}}}},GetPersonTracking:{input:{type:"structure",required:["JobId"],members:{JobId:{},MaxResults:{type:"integer"},NextToken:{},SortBy:{}}},output:{type:"structure",members:{JobStatus:{},StatusMessage:{},VideoMetadata:{shape:"S2v"},NextToken:{},Persons:{type:"list",member:{type:"structure",members:{Timestamp:{type:"long"},Person:{shape:"S3f"}}}}}}},IndexFaces:{input:{type:"structure",required:["CollectionId","Image"],members:{CollectionId:{},Image:{shape:"S2"},ExternalImageId:{},DetectionAttributes:{shape:"S1j"}}},output:{type:"structure",members:{FaceRecords:{type:"list",member:{type:"structure",members:{Face:{shape:"S3j"},FaceDetail:{shape:"S1n"}}}},OrientationCorrection:{},FaceModelVersion:{}}}},ListCollections:{input:{type:"structure",members:{NextToken:{},MaxResults:{type:"integer"}}},output:{type:"structure",members:{CollectionIds:{type:"list",member:{}},NextToken:{},FaceModelVersions:{type:"list",member:{}}}}},ListFaces:{input:{type:"structure",required:["CollectionId"],members:{CollectionId:{},NextToken:{},MaxResults:{type:"integer"}}},output:{type:"structure",members:{Faces:{type:"list",member:{shape:"S3j"}},NextToken:{},FaceModelVersion:{}}}},ListStreamProcessors:{input:{type:"structure",members:{NextToken:{},MaxResults:{type:"integer"}}},output:{type:"structure",members:{NextToken:{},StreamProcessors:{type:"list",member:{type:"structure",members:{Name:{},Status:{}}}}}}},RecognizeCelebrities:{input:{type:"structure",required:["Image"],members:{Image:{shape:"S2"}}},output:{type:"structure",members:{CelebrityFaces:{type:"list",member:{type:"structure",members:{Urls:{shape:"S2l"},Name:{},Id:{},Face:{shape:"Sf"},MatchConfidence:{type:"float"}}}},UnrecognizedFaces:{type:"list",member:{shape:"Sf"}},OrientationCorrection:{}}}},SearchFaces:{input:{type:"structure",required:["CollectionId","FaceId"],members:{CollectionId:{},FaceId:{},MaxFaces:{type:"integer"},FaceMatchThreshold:{type:"float"}}},output:{type:"structure",members:{SearchedFaceId:{},FaceMatches:{shape:"S3h"},FaceModelVersion:{}}}},SearchFacesByImage:{input:{type:"structure",required:["CollectionId","Image"],members:{CollectionId:{},Image:{shape:"S2"},MaxFaces:{type:"integer"},FaceMatchThreshold:{type:"float"}}},output:{type:"structure",members:{SearchedFaceBoundingBox:{shape:"Sb"},SearchedFaceConfidence:{type:"float"},FaceMatches:{shape:"S3h"},FaceModelVersion:{}}}},StartCelebrityRecognition:{input:{type:"structure",required:["Video"],members:{Video:{shape:"S4n"},ClientRequestToken:{},NotificationChannel:{shape:"S4p"},JobTag:{}}},output:{type:"structure",members:{JobId:{}}},idempotent:!0},StartContentModeration:{input:{type:"structure",required:["Video"],members:{Video:{shape:"S4n"},MinConfidence:{type:"float"},ClientRequestToken:{},NotificationChannel:{shape:"S4p"},JobTag:{}}},output:{type:"structure",members:{JobId:{}}},idempotent:!0},StartFaceDetection:{input:{type:"structure",required:["Video"],members:{Video:{shape:"S4n"},ClientRequestToken:{},NotificationChannel:{shape:"S4p"},FaceAttributes:{},JobTag:{}}},output:{type:"structure",members:{JobId:{}}},idempotent:!0},StartFaceSearch:{input:{type:"structure",required:["Video","CollectionId"],members:{Video:{shape:"S4n"},ClientRequestToken:{},FaceMatchThreshold:{type:"float"},CollectionId:{},NotificationChannel:{shape:"S4p"},JobTag:{}}},output:{type:"structure",members:{JobId:{}}},idempotent:!0},StartLabelDetection:{input:{type:"structure",required:["Video"],members:{Video:{shape:"S4n"},ClientRequestToken:{},MinConfidence:{type:"float"},NotificationChannel:{shape:"S4p"},JobTag:{}}},output:{type:"structure",members:{JobId:{}}},idempotent:!0},StartPersonTracking:{input:{type:"structure",required:["Video"],members:{Video:{shape:"S4n"},ClientRequestToken:{},NotificationChannel:{shape:"S4p"},JobTag:{}}},output:{type:"structure",members:{JobId:{}}},idempotent:!0},StartStreamProcessor:{input:{type:"structure",required:["Name"],members:{Name:{}}},output:{type:"structure",members:{}}},StopStreamProcessor:{input:{type:"structure",required:["Name"],members:{Name:{}}},output:{type:"structure",members:{}}}},shapes:{S2:{type:"structure",members:{Bytes:{type:"blob"},S3Object:{shape:"S4"}}},S4:{type:"structure",members:{Bucket:{},Name:{},Version:{}}},Sb:{type:"structure",members:{Width:{type:"float"},Height:{type:"float"},Left:{type:"float"},Top:{type:"float"}}},Sf:{type:"structure",members:{BoundingBox:{shape:"Sb"},Confidence:{type:"float"},Landmarks:{shape:"Sg"},Pose:{shape:"Sj"},Quality:{shape:"Sl"}}},Sg:{type:"list",member:{type:"structure",members:{Type:{},X:{type:"float"},Y:{type:"float"}}}},Sj:{type:"structure",members:{Roll:{type:"float"},Yaw:{type:"float"},Pitch:{type:"float"}}},Sl:{type:"structure",members:{Brightness:{type:"float"},Sharpness:{type:"float"}}},Su:{type:"structure",members:{KinesisVideoStream:{type:"structure",members:{Arn:{}}}}},Sx:{type:"structure",members:{KinesisDataStream:{type:"structure",members:{Arn:{}}}}},S11:{type:"structure",members:{FaceSearch:{type:"structure",members:{CollectionId:{},FaceMatchThreshold:{type:"float"}}}}},S19:{type:"list",member:{}},S1j:{type:"list",member:{}},S1n:{type:"structure",members:{BoundingBox:{shape:"Sb"},AgeRange:{type:"structure",members:{Low:{type:"integer"},High:{type:"integer"}}},Smile:{type:"structure",members:{Value:{type:"boolean"},Confidence:{type:"float"}}},Eyeglasses:{type:"structure",members:{Value:{type:"boolean"},Confidence:{type:"float"}}},Sunglasses:{type:"structure",members:{Value:{type:"boolean"},Confidence:{type:"float"}}},Gender:{type:"structure",members:{Value:{},Confidence:{type:"float"}}},Beard:{type:"structure",members:{Value:{type:"boolean"},Confidence:{type:"float"}}},Mustache:{type:"structure",members:{Value:{type:"boolean"},Confidence:{type:"float"}}},EyesOpen:{type:"structure",members:{Value:{type:"boolean"},Confidence:{type:"float"}}},MouthOpen:{type:"structure",members:{Value:{type:"boolean"},Confidence:{type:"float"}}},Emotions:{type:"list",member:{type:"structure",members:{Type:{},Confidence:{type:"float"}}}},Landmarks:{shape:"Sg"},Pose:{shape:"Sj"},Quality:{shape:"Sl"},Confidence:{type:"float"}}},S25:{type:"structure",members:{Name:{},Confidence:{type:"float"}}},S29:{type:"structure",members:{Confidence:{type:"float"},Name:{},ParentName:{}}},S2l:{type:"list",member:{}},S2v:{type:"structure",members:{Codec:{},DurationMillis:{type:"long"},Format:{},FrameRate:{type:"float"},FrameHeight:{type:"long"},FrameWidth:{type:"long"}}},S3f:{type:"structure",members:{Index:{type:"long"},BoundingBox:{shape:"Sb"},Face:{shape:"S1n"}}},S3h:{type:"list",member:{type:"structure",members:{Similarity:{type:"float"},Face:{shape:"S3j"}}}},S3j:{type:"structure",members:{FaceId:{},BoundingBox:{shape:"Sb"},ImageId:{},ExternalImageId:{},Confidence:{type:"float"}}},S4n:{type:"structure",members:{S3Object:{shape:"S4"}}},S4p:{type:"structure",required:["SNSTopicArn","RoleArn"],members:{SNSTopicArn:{},RoleArn:{}}}},paginators:{GetCelebrityRecognition:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken"},GetContentModeration:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken"},GetFaceDetection:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken"},GetFaceSearch:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken"},GetLabelDetection:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken"},GetPersonTracking:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken"},ListCollections:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken",result_key:"CollectionIds"},ListFaces:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken",result_key:"Faces"},ListStreamProcessors:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken"}}},AWS.apiLoader.services.translate={},AWS.Translate=AWS.Service.defineService("translate",["2017-07-01"]),AWS.apiLoader.services.translate["2017-07-01"]={version:"2.0",metadata:{apiVersion:"2017-07-01",endpointPrefix:"translate",jsonVersion:"1.1",protocol:"json",serviceFullName:"Amazon Translate",serviceId:"Translate",signatureVersion:"v4",signingName:"translate",targetPrefix:"AWSShineFrontendService_20170701",uid:"translate-2017-07-01"},operations:{TranslateText:{input:{type:"structure",required:["Text","SourceLanguageCode","TargetLanguageCode"],members:{Text:{},SourceLanguageCode:{},TargetLanguageCode:{}}},output:{type:"structure",required:["TranslatedText","SourceLanguageCode","TargetLanguageCode"],members:{TranslatedText:{},SourceLanguageCode:{},TargetLanguageCode:{}}}}},shapes:{},paginators:{}},AWS.apiLoader.services.sts={},AWS.STS=AWS.Service.defineService("sts",["2011-06-15"]),_xamzrequire=function s(o,a,u){function c(r,e){if(!a[r]){if(!o[r]){var t="function"==typeof _xamzrequire&&_xamzrequire;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=a[r]={exports:{}};o[r][0].call(i.exports,function(e){var t=o[r][1][e];return c(t||e)},i,i.exports,s,o,a,u)}return a[r].exports}for(var l="function"==typeof _xamzrequire&&_xamzrequire,e=0;e<u.length;e++)c(u[e]);return c}({101:[function(e,t,r){var n=e("../core");n.util.update(n.STS.prototype,{credentialsFrom:function(e,t){return e?(t||(t=new n.TemporaryCredentials),t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretAccessKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration,t):null},assumeRoleWithWebIdentity:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithWebIdentity",e,t)},assumeRoleWithSAML:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithSAML",e,t)}})},{"../core":38}]},{},[101]),AWS.apiLoader.services.sts["2011-06-15"]={version:"2.0",metadata:{apiVersion:"2011-06-15",endpointPrefix:"sts",globalEndpoint:"sts.amazonaws.com",protocol:"query",serviceAbbreviation:"AWS STS",serviceFullName:"AWS Security Token Service",serviceId:"STS",signatureVersion:"v4",uid:"sts-2011-06-15",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/"},operations:{AssumeRole:{input:{type:"structure",required:["RoleArn","RoleSessionName"],members:{RoleArn:{},RoleSessionName:{},Policy:{},DurationSeconds:{type:"integer"},ExternalId:{},SerialNumber:{},TokenCode:{}}},output:{resultWrapper:"AssumeRoleResult",type:"structure",members:{Credentials:{shape:"Sa"},AssumedRoleUser:{shape:"Sf"},PackedPolicySize:{type:"integer"}}}},AssumeRoleWithSAML:{input:{type:"structure",required:["RoleArn","PrincipalArn","SAMLAssertion"],members:{RoleArn:{},PrincipalArn:{},SAMLAssertion:{},Policy:{},DurationSeconds:{type:"integer"}}},output:{resultWrapper:"AssumeRoleWithSAMLResult",type:"structure",members:{Credentials:{shape:"Sa"},AssumedRoleUser:{shape:"Sf"},PackedPolicySize:{type:"integer"},Subject:{},SubjectType:{},Issuer:{},Audience:{},NameQualifier:{}}}},AssumeRoleWithWebIdentity:{input:{type:"structure",required:["RoleArn","RoleSessionName","WebIdentityToken"],members:{RoleArn:{},RoleSessionName:{},WebIdentityToken:{},ProviderId:{},Policy:{},DurationSeconds:{type:"integer"}}},output:{resultWrapper:"AssumeRoleWithWebIdentityResult",type:"structure",members:{Credentials:{shape:"Sa"},SubjectFromWebIdentityToken:{},AssumedRoleUser:{shape:"Sf"},PackedPolicySize:{type:"integer"},Provider:{},Audience:{}}}},DecodeAuthorizationMessage:{input:{type:"structure",required:["EncodedMessage"],members:{EncodedMessage:{}}},output:{resultWrapper:"DecodeAuthorizationMessageResult",type:"structure",members:{DecodedMessage:{}}}},GetCallerIdentity:{input:{type:"structure",members:{}},output:{resultWrapper:"GetCallerIdentityResult",type:"structure",members:{UserId:{},Account:{},Arn:{}}}},GetFederationToken:{input:{type:"structure",required:["Name"],members:{Name:{},Policy:{},DurationSeconds:{type:"integer"}}},output:{resultWrapper:"GetFederationTokenResult",type:"structure",members:{Credentials:{shape:"Sa"},FederatedUser:{type:"structure",required:["FederatedUserId","Arn"],members:{FederatedUserId:{},Arn:{}}},PackedPolicySize:{type:"integer"}}}},GetSessionToken:{input:{type:"structure",members:{DurationSeconds:{type:"integer"},SerialNumber:{},TokenCode:{}}},output:{resultWrapper:"GetSessionTokenResult",type:"structure",members:{Credentials:{shape:"Sa"}}}}},shapes:{Sa:{type:"structure",required:["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],members:{AccessKeyId:{},SecretAccessKey:{},SessionToken:{},Expiration:{type:"timestamp"}}},Sf:{type:"structure",required:["AssumedRoleId","Arn"],members:{AssumedRoleId:{},Arn:{}}}},paginators:{}};