MCPcopy
hub / github.com/sourcegraph/checkup / i

Function i

statuspage/js/s3.js:8–8  ·  view source on GitHub ↗
(s,a)

Source from the content-addressed store, hash-verified

6
7// aws-sdk-2.2.48.min.js
8_xamzrequire=function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof _xamzrequire&&_xamzrequire;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){var r=e[s][1][t];return i(r?r:t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof _xamzrequire&&_xamzrequire,s=0;s<n.length;s++)i(n[s]);return i}({24:[function(t,e,r){var n={util:t("./util")},i={};i.toString(),e.exports=n,n.util.update(n,{VERSION:"2.2.48",Signers:{},Protocol:{Json:t("./protocol/json"),Query:t("./protocol/query"),Rest:t("./protocol/rest"),RestJson:t("./protocol/rest_json"),RestXml:t("./protocol/rest_xml")},XML:{Builder:t("./xml/builder"),Parser:null},JSON:{Builder:t("./json/builder"),Parser:t("./json/parser")},Model:{Api:t("./model/api"),Operation:t("./model/operation"),Shape:t("./model/shape"),Paginator:t("./model/paginator"),ResourceWaiter:t("./model/resource_waiter")},util:t("./util"),apiLoader:function(){throw new Error("No API loader set")}}),t("./service"),t("./credentials"),t("./credentials/credential_provider_chain"),t("./credentials/temporary_credentials"),t("./credentials/web_identity_credentials"),t("./credentials/cognito_identity_credentials"),t("./credentials/saml_credentials"),t("./config"),t("./http"),t("./sequential_executor"),t("./event_listeners"),t("./request"),t("./response"),t("./resource_waiter"),t("./signers/request_signer"),t("./param_validator"),n.events=new n.SequentialExecutor},{"./config":23,"./credentials":25,"./credentials/cognito_identity_credentials":26,"./credentials/credential_provider_chain":27,"./credentials/saml_credentials":28,"./credentials/temporary_credentials":29,"./credentials/web_identity_credentials":30,"./event_listeners":36,"./http":37,"./json/builder":39,"./json/parser":40,"./model/api":41,"./model/operation":43,"./model/paginator":44,"./model/resource_waiter":45,"./model/shape":46,"./param_validator":47,"./protocol/json":48,"./protocol/query":49,"./protocol/rest":50,"./protocol/rest_json":51,"./protocol/rest_xml":52,"./request":56,"./resource_waiter":57,"./response":58,"./sequential_executor":60,"./service":61,"./signers/request_signer":77,"./util":84,"./xml/builder":86}],86:[function(t,e,r){function n(){}function i(t,e,r){switch(r.type){case"structure":return o(t,e,r);case"map":return s(t,e,r);case"list":return a(t,e,r);default:return u(t,e,r)}}function o(t,e,r){l.arrayEach(r.memberNames,function(n){var o=r.members[n];if("body"===o.location){var s=e[n],a=o.name;if(void 0!==s&&null!==s)if(o.isXmlAttribute)t.att(a,s);else if(o.flattened)i(t,s,o);else{var u=t.ele(a);c(u,o),i(u,s,o)}}})}function s(t,e,r){var n=r.key.name||"key",o=r.value.name||"value";l.each(e,function(e,s){var a=t.ele(r.flattened?r.name:"entry");i(a.ele(n),e,r.key),i(a.ele(o),s,r.value)})}function a(t,e,r){r.flattened?l.arrayEach(e,function(e){var n=r.member.name||r.name,o=t.ele(n);i(o,e,r.member)}):l.arrayEach(e,function(e){var n=r.member.name||"member",o=t.ele(n);i(o,e,r.member)})}function u(t,e,r){t.txt(r.toWireFormat(e))}function c(t,e){var r,n="xmlns";e.xmlNamespaceUri?(r=e.xmlNamespaceUri,e.xmlNamespacePrefix&&(n+=":"+e.xmlNamespacePrefix)):t.isRoot&&e.api.xmlNamespaceUri&&(r=e.api.xmlNamespaceUri),r&&t.att(n,r)}var l=t("../util"),h=t("xmlbuilder");n.prototype.toXML=function(t,e,r,n){var o=h.create(r);return c(o,e),i(o,t,e),o.children.length>0||n?o.root().toString():""},e.exports=n},{"../util":84,xmlbuilder:103}],103:[function(t,e,r){(function(){var r,n;n=t("lodash/object/assign"),r=t("./XMLBuilder"),e.exports.create=function(t,e,i,o){return o=n({},e,i,o),new r(t,o).root()}}).call(this)},{"./XMLBuilder":88,"lodash/object/assign":145}],145:[function(t,e,r){var n=t("../internal/baseAssign"),i=t("../internal/createAssigner"),o=i(n);e.exports=o},{"../internal/baseAssign":106,"../internal/createAssigner":124}],124:[function(t,e,r){function n(t){return function(){var e=arguments,r=e.length,n=e[0];if(2>r||null==n)return n;var s=e[r-2],a=e[r-1],u=e[3];r>3&&"function"==typeof s?(s=i(s,a,5),r-=2):(s=r>2&&"function"==typeof a?a:null,r-=s?1:0),u&&o(e[1],e[2],u)&&(s=3==r?null:s,r=2);for(var c=0;++c<r;){var l=e[c];l&&t(n,l,s)}return n}}var i=t("./bindCallback"),o=t("./isIterateeCall");e.exports=n},{"./bindCallback":123,"./isIterateeCall":130}],106:[function(t,e,r){function n(t,e,r){var n=o(e);if(!r)return i(e,t,n);for(var s=-1,a=n.length;++s<a;){var u=n[s],c=t[u],l=r(c,e[u],u,t,e);(l===l?l===c:c!==c)&&("undefined"!=typeof c||u in t)||(t[u]=l)}return t}var i=t("./baseCopy"),o=t("../object/keys");e.exports=n},{"../object/keys":147,"./baseCopy":108}],88:[function(t,e,r){(function(){var r,n,i,o,s;s=t("./XMLStringifier"),n=t("./XMLDeclaration"),i=t("./XMLDocType"),o=t("./XMLElement"),e.exports=r=function(){function t(t,e){var r,n;if(null==t)throw new Error("Root element needs a name");null==e&&(e={}),this.options=e,this.stringify=new s(e),n=new o(this,"doc"),r=n.element(t),r.isRoot=!0,r.documentObject=this,this.rootObject=r,e.headless||(r.declaration(e),(null!=e.pubID||null!=e.sysID)&&r.doctype(e))}return t.prototype.root=function(){return this.rootObject},t.prototype.end=function(t){return this.toString(t)},t.prototype.toString=function(t){var e,r,n,i,o,s,a,u;return i=(null!=t?t.pretty:void 0)||!1,e=null!=(s=null!=t?t.indent:void 0)?s:" ",n=null!=(a=null!=t?t.offset:void 0)?a:0,r=null!=(u=null!=t?t.newline:void 0)?u:"\n",o="",null!=this.xmldec&&(o+=this.xmldec.toString(t)),null!=this.doctype&&(o+=this.doctype.toString(t)),o+=this.rootObject.toString(t),i&&o.slice(-r.length)===r&&(o=o.slice(0,-r.length)),o},t}()}).call(this)},{"./XMLDeclaration":95,"./XMLDocType":96,"./XMLElement":97,"./XMLStringifier":101}],101:[function(t,e,r){(function(){var t,r=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty;e.exports=t=function(){function t(t){this.assertLegalChar=r(this.assertLegalChar,this);var e,i,o;this.allowSurrogateChars=null!=t?t.allowSurrogateChars:void 0,i=(null!=t?t.stringify:void 0)||{};for(e in i)n.call(i,e)&&(o=i[e],this[e]=o)}return t.prototype.eleName=function(t){return t=""+t||"",this.assertLegalChar(t)},t.prototype.eleText=function(t){return t=""+t||"",this.assertLegalChar(this.elEscape(t))},t.prototype.cdata=function(t){if(t=""+t||"",t.match(/]]>/))throw new Error("Invalid CDATA text: "+t);return this.assertLegalChar(t)},t.prototype.comment=function(t){if(t=""+t||"",t.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+t);return this.assertLegalChar(t)},t.prototype.raw=function(t){return""+t||""},t.prototype.attName=function(t){return""+t||""},t.prototype.attValue=function(t){return t=""+t||"",this.attEscape(t)},t.prototype.insTarget=function(t){return""+t||""},t.prototype.insValue=function(t){if(t=""+t||"",t.match(/\?>/))throw new Error("Invalid processing instruction value: "+t);return t},t.prototype.xmlVersion=function(t){if(t=""+t||"",!t.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+t);return t},t.prototype.xmlEncoding=function(t){if(t=""+t||"",!t.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/))throw new Error("Invalid encoding: "+t);return t},t.prototype.xmlStandalone=function(t){return t?"yes":"no"},t.prototype.dtdPubID=function(t){return""+t||""},t.prototype.dtdSysID=function(t){return""+t||""},t.prototype.dtdElementValue=function(t){return""+t||""},t.prototype.dtdAttType=function(t){return""+t||""},t.prototype.dtdAttDefault=function(t){return null!=t?""+t||"":t},t.prototype.dtdEntityValue=function(t){return""+t||""},t.prototype.dtdNData=function(t){return""+t||""},t.prototype.convertAttKey="@",t.prototype.convertPIKey="?",t.prototype.convertTextKey="#text",t.prototype.convertCDataKey="#cdata",t.prototype.convertCommentKey="#comment",t.prototype.convertRawKey="#raw",t.prototype.convertListKey="#list",t.prototype.assertLegalChar=function(t){var e,r;if(e=this.allowSurrogateChars?/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/:/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/,r=t.match(e))throw new Error("Invalid character ("+r+") in string: "+t+" at index "+r.index);return t},t.prototype.elEscape=function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},t.prototype.attEscape=function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},t}()}).call(this)},{}],95:[function(t,e,r){(function(){var r,n,i,o,s=function(t,e){function r(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("lodash/object/create"),o=t("lodash/lang/isObject"),n=t("./XMLNode"),e.exports=r=function(t){function e(t,r,n,i){var s;e.__super__.constructor.call(this,t),o(r)&&(s=r,r=s.version,n=s.encoding,i=s.standalone),r||(r="1.0"),null!=r&&(this.version=this.stringify.xmlVersion(r)),null!=n&&(this.encoding=this.stringify.xmlEncoding(n)),null!=i&&(this.standalone=this.stringify.xmlStandalone(i))}return s(e,t),e.prototype.clone=function(){return i(e.prototype,this)},e.prototype.toString=function(t,e){var r,n,i,o,s,a,u,c,l;return o=(null!=t?t.pretty:void 0)||!1,r=null!=(a=null!=t?t.indent:void 0)?a:" ",i=null!=(u=null!=t?t.offset:void 0)?u:0,n=null!=(c=null!=t?t.newline:void 0)?c:"\n",e||(e=0),l=new Array(e+i+1).join(r),s="",o&&(s+=l),s+="<?xml",null!=this.version&&(s+=' version="'+this.version+'"'),null!=this.encoding&&(s+=' encoding="'+this.encoding+'"'),null!=this.standalone&&(s+=' standalone="'+this.standalone+'"'),s+="?>",o&&(s+=n),s},e}(n)}).call(this)},{"./XMLNode":98,"lodash/lang/isObject":142,"lodash/object/create":146}],98:[function(t,e,r){(function(){var r,n,i,o,s,a,u,c,l,h,p,f,d={}.hasOwnProperty;f=t("lodash/lang/isObject"),l=t("lodash/lang/isArray"),p=t("lodash/lang/isFunction"),h=t("lodash/lang/isEmpty"),s=null,r=null,n=null,i=null,o=null,u=null,c=null,e.exports=a=function(){function e(e){this.parent=e,this.options=this.parent.options,this.stringify=this.parent.stringify,null===s&&(s=t("./XMLElement"),r=t("./XMLCData"),n=t("./XMLComment"),i=t("./XMLDeclaration"),o=t("./XMLDocType"),u=t("./XMLRaw"),c=t("./XMLText"))}return e.prototype.clone=function(){throw new Error("Cannot clone generic XMLNode")},e.prototype.element=function(t,e,r){var n,i,o,s,a,u,c;if(s=null,null==e&&(e={}),e=e.valueOf(),f(e)||(u=[e,r],r=u[0],e=u[1]),null!=t&&(t=t.valueOf()),l(t))for(i=0,a=t.length;a>i;i++)n=t[i],s=this.element(n);else if(p(t))s=this.element(t.apply());else if(f(t))for(o in t)d.call(t,o)&&(c=t[o],p(c)&&(c=c.apply()),f(c)&&h(c)&&(c=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===o.indexOf(this.stringify.convertAttKey)?s=this.attribute(o.substr(this.stringify.convertAttKey.length),c):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===o.indexOf(this.stringify.convertPIKey)?s=this.instruction(o.substr(this.stringify.convertPIKey.length),c):f(c)?!this.options.ignoreDecorators&&this.stringify.convertListKey&&0===o.indexOf(this.stringify.convertListKey)&&l(c)?s=this.element(c):(s=this.element(o),s.element(c)):s=this.element(o,c));else s=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===t.indexOf(this.stringify.convertTextKey)?this.text(r):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===t.indexOf(this.stringify.convertCDataKey)?this.cdata(r):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===t.indexOf(this.stringify.convertCommentKey)?this.comment(r):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===t.indexOf(this.stringify.convertRawKey)?this.raw(r):this.node(t,e,r);if(null==s)throw new Error("Could not create any elements with: "+t);return s},e.prototype.insertBefore=function(t,e,r){var n,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i),n=this.parent.element(t,e,r),Array.prototype.push.apply(this.parent.children,o),n},e.prototype.insertAfter=function(t,e,r){var n,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i+1),n=this.parent.element(t,e,r),Array.prototype.push.apply(this.parent.children,o),n},e.prototype.remove=function(){var t,e;if(this.isRoot)throw new Error("Cannot remove the root element");return t=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[t,t-t+1].concat(e=[])),e,this.parent},e.prototype.node=function(t,e,r){var n,i;return null!=t&&(t=t.valueOf()),null==e&&(e={}),e=e.valueOf(),f(e)||(i=[e,r],r=i[0],e=i[1]),n=new s(this,t,e),null!=r&&n.text(r),this.children.push(n),n},e.prototype.text=function(t){var e;return e=new c(this,t),this.children.push(e),this},e.prototype.cdata=function(t){var e;return e=new r(this,t),this.children.push(e),this},e.prototype.comment=function(t){var e;return e=new n(this,t),this.children.push(e),this},e.prototype.raw=function(t){var e;return e=new u(this,t),this.children.push(e),this},e.prototype.declaration=function(t,e,r){var n,o;return n=this.document(),o=new i(n,t,e,r),n.xmldec=o,n.root()},e.prototype.doctype=function(t,e){var r,n;return r=this.document(),n=new o(r,t,e),r.doctype=n,n},e.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},e.prototype.root=function(){var t;if(this.isRoot)return this;for(t=this.parent;!t.isRoot;)t=t.parent;return t},e.prototype.document=function(){return this.root().documentObject},e.prototype.end=function(t){return this.document().toString(t)},e.prototype.prev=function(){var t;if(this.isRoot)throw new Error("Root node has no siblings");if(t=this.parent.children.indexOf(this),1>t)throw new Error("Already at the first node");return this.parent.children[t-1]},e.prototype.next=function(){var t;if(this.isRoot)throw new Error("Root node has no siblings");if(t=this.parent.children.indexOf(this),-1===t||t===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[t+1]},e.prototype.importXMLBuilder=function(t){var e;return e=t.root().clone(),e.parent=this,e.isRoot=!1,this.children.push(e),this},e.prototype.ele=function(t,e,r){return this.element(t,e,r)},e.prototype.nod=function(t,e,r){return this.node(t,e,r)},e.prototype.txt=function(t){return this.text(t)},e.prototype.dat=function(t){return this.cdata(t)},e.prototype.com=function(t){return this.comment(t)},e.prototype.doc=function(){return this.document()},e.prototype.dec=function(t,e,r){return this.declaration(t,e,r)},e.prototype.dtd=function(t,e){return this.doctype(t,e)},e.prototype.e=function(t,e,r){return this.element(t,e,r)},e.prototype.n=function(t,e,r){return this.node(t,e,r)},e.prototype.t=function(t){return this.text(t)},e.prototype.d=function(t){return this.cdata(t)},e.prototype.c=function(t){return this.comment(t)},e.prototype.r=function(t){return this.raw(t)},e.prototype.u=function(){return this.up()},e}()}).call(this)},{"./XMLCData":89,"./XMLComment":90,"./XMLDeclaration":95,"./XMLDocType":96,"./XMLElement":97,"./XMLRaw":100,"./XMLText":102,"lodash/lang/isArray":138,"lodash/lang/isEmpty":139,"lodash/lang/isFunction":140,"lodash/lang/isObject":142}],139:[function(t,e,r){function n(t){if(null==t)return!0;var e=t.length;return a(e)&&(o(t)||c(t)||i(t)||u(t)&&s(t.splice))?!e:!l(t).length}var i=t("./isArguments"),o=t("./isArray"),s=t("./isFunction"),a=t("../internal/isLength"),u=t("../internal/isObjectLike"),c=t("./isString"),l=t("../object/keys");e.exports=n},{"../internal/isLength":131,"../internal/isObjectLike":132,"../object/keys":147,"./isArguments":137,"./isArray":138,"./isFunction":140,"./isString":143}],143:[function(t,e,r){function n(t){return"string"==typeof t||i(t)&&a.call(t)==o||!1}var i=t("../internal/isObjectLike"),o="[object String]",s=Object.prototype,a=s.toString;e.exports=n},{"../internal/isObjectLike":132}],102:[function(t,e,r){(function(){var r,n,i,o=function(t,e){function r(){this.constructor=t}for(var n in e)s.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty;i=t("lodash/object/create"),r=t("./XMLNode"),e.exports=n=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing element text");this.value=this.stringify.eleText(r)}return o(e,t),e.prototype.clone=function(){return i(e.prototype,this)},e.prototype.toString=function(t,e){var r,n,i,o,s,a,u,c,l;return o=(null!=t?t.pretty:void 0)||!1,r=null!=(a=null!=t?t.indent:void 0)?a:" ",i=null!=(u=null!=t?t.offset:void 0)?u:0,n=null!=(c=null!=t?t.newline:void 0)?c:"\n",e||(e=0),l=new Array(e+i+1).join(r),s="",o&&(s+=l),s+=this.value,o&&(s+=n),s},e}(r)}).call(this)},{"./XMLNode":98,"lodash/object/create":146}],100:[function(t,e,r){(function(){var r,n,i,o=function(t,e){function r(){this.constructor=t}for(var n in e)s.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty;i=t("lodash/object/create"),r=t("./XMLNode"),e.exports=n=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing raw text");this.value=this.stringify.raw(r)}return o(e,t),e.prototype.clone=function(){return i(e.prototype,this)},e.prototype.toString=function(t,e){var r,n,i,o,s,a,u,c,l;return o=(null!=t?t.pretty:void 0)||!1,r=null!=(a=null!=t?t.indent:void 0)?a:" ",i=null!=(u=null!=t?t.offset:void 0)?u:0,n=null!=(c=null!=t?t.newline:void 0)?c:"\n",e||(e=0),l=new Array(e+i+1).join(r),s="",o&&(s+=l),s+=this.value,o&&(s+=n),s},e}(r)}).call(this)},{"./XMLNode":98,"lodash/object/create":146}],97:[function(t,e,r){(function(){var r,n,i,o,s,a,u,c,l,h=function(t,e){function r(){this.constructor=t}for(var n in e)p.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},p={}.hasOwnProperty;s=t("lodash/object/create"),l=t("lodash/lang/isObject"),u=t("lodash/lang/isArray"),c=t("lodash/lang/isFunction"),a=t("lodash/collection/every"),i=t("./XMLNode"),r=t("./XMLAttribute"),o=t("./XMLProcessingInstruction"),e.exports=n=function(t){function e(t,r,n){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing element name");this.name=this.stringify.eleName(r),this.children=[],this.instructions=[],this.attributes={},null!=n&&this.attribute(n)}return h(e,t),e.prototype.clone=function(){var t,r,n,i,o,a,u,c;n=s(e.prototype,this),n.isRoot&&(n.documentObject=null),n.attributes={},u=this.attributes;for(r in u)p.call(u,r)&&(t=u[r],n.attributes[r]=t.clone());for(n.instructions=[],c=this.instructions,i=0,o=c.length;o>i;i++)a=c[i],n.instructions.push(a.clone());return n.children=[],this.children.forEach(function(t){var e;return e=t.clone(),e.parent=n,n.children.push(e)}),n},e.prototype.attribute=function(t,e){var n,i;if(null!=t&&(t=t.valueOf()),l(t))for(n in t)p.call(t,n)&&(i=t[n],this.attribute(n,i));else c(e)&&(e=e.apply()),this.options.skipNullAttributes&&null==e||(this.attributes[t]=new r(this,t,e));return this},e.prototype.removeAttribute=function(t){var e,r,n;if(null==t)throw new Error("Missing attribute name");if(t=t.valueOf(),u(t))for(r=0,n=t.length;n>r;r++)e=t[r],delete this.attributes[e];else delete this.attributes[t];return this},e.prototype.instruction=function(t,e){var r,n,i,s,a;if(null!=t&&(t=t.valueOf()),null!=e&&(e=e.valueOf()),u(t))for(r=0,a=t.length;a>r;r++)n=t[r],this.instruction(n);else if(l(t))for(n in t)p.call(t,n)&&(i=t[n],this.instruction(n,i));else c(e)&&(e=e.apply()),s=new o(this,t,e),this.instructions.push(s);return this},e.prototype.toString=function(t,e){var r,n,i,o,s,u,c,l,h,f,d,y,g,m,v,b,w,E,x,S;for(y=(null!=t?t.pretty:void 0)||!1,o=null!=(m=null!=t?t.indent:void 0)?m:" ",d=null!=(v=null!=t?t.offset:void 0)?v:0,f=null!=(b=null!=t?t.newline:void 0)?b:"\n",e||(e=0),S=new Array(e+d+1).join(o),g="",w=this.instructions,i=0,c=w.length;c>i;i++)s=w[i],g+=s.toString(t,e+1);y&&(g+=S),g+="<"+this.name,E=this.attributes;for(h in E)p.call(E,h)&&(r=E[h],g+=r.toString(t));if(0===this.children.length||a(this.children,function(t){return""===t.value}))g+="/>",y&&(g+=f);else if(y&&1===this.children.length&&null!=this.children[0].value)g+=">",g+=this.children[0].value,g+="</"+this.name+">",g+=f;else{for(g+=">",y&&(g+=f),x=this.children,u=0,l=x.length;l>u;u++)n=x[u],g+=n.toString(t,e+1);y&&(g+=S),g+="</"+this.name+">",y&&(g+=f)}return g},e.prototype.att=function(t,e){return this.attribute(t,e)},e.prototype.ins=function(t,e){return this.instruction(t,e)},e.prototype.a=function(t,e){return this.attribute(t,e)},e.prototype.i=function(t,e){return this.instruction(t,e)},e}(i)}).call(this)},{"./XMLAttribute":87,"./XMLNode":98,"./XMLProcessingInstruction":99,"lodash/collection/every":104,"lodash/lang/isArray":138,"lodash/lang/isFunction":140,"lodash/lang/isObject":142,"lodash/object/create":146}],140:[function(t,e,r){(function(r){var n=t("../internal/baseIsFunction"),i=t("./isNative"),o="[object Function]",s=Object.prototype,a=s.toString,u=i(u=r.Uint8Array)&&u,c=n(/x/)||u&&!n(u)?function(t){return a.call(t)==o}:n;e.exports=c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../internal/baseIsFunction":116,"./isNative":141}],116:[function(t,e,r){function n(t){return"function"==typeof t||!1}e.exports=n},{}],104:[function(t,e,r){function n(t,e,r){var n=a(t)?i:s;return("function"!=typeof e||"undefined"!=typeof r)&&(e=o(e,r,3)),n(t,e)}var i=t("../internal/arrayEvery"),o=t("../internal/baseCallback"),s=t("../internal/baseEvery"),a=t("../lang/isArray");e.exports=n},{"../internal/arrayEvery":105,"../internal/baseCallback":107,"../internal/baseEvery":111,"../lang/isArray":138}],111:[function(t,e,r){function n(t,e){var r=!0;return i(t,function(t,n,i){return r=!!e(t,n,i)}),r}var i=t("./baseEach");e.exports=n},{"./baseEach":110}],110:[function(t,e,r){function n(t,e){var r=t?t.length:0;if(!o(r))return i(t,e);for(var n=-1,a=s(t);++n<r&&e(a[n],n,a)!==!1;);return t}var i=t("./baseForOwn"),o=t("./isLength"),s=t("./toObject");e.exports=n},{"./baseForOwn":113,"./isLength":131,"./toObject":136}],113:[function(t,e,r){function n(t,e){return i(t,e,o)}var i=t("./baseFor"),o=t("../object/keys");e.exports=n},{"../object/keys":147,"./baseFor":112}],112:[function(t,e,r){function n(t,e,r){for(var n=-1,o=i(t),s=r(t),a=s.length;++n<a;){var u=s[n];if(e(o[u],u,o)===!1)break}return t}var i=t("./toObject");e.exports=n},{"./toObject":136}],136:[function(t,e,r){function n(t){return i(t)?t:Object(t)}var i=t("../lang/isObject");e.exports=n},{"../lang/isObject":142}],107:[function(t,e,r){function n(t,e,r){var n=typeof t;return"function"==n?"undefined"!=typeof e&&c(t)?a(t,e,r):t:null==t?u:"object"==n?i(t):"undefined"==typeof e?s(t+""):o(t+"",e)}var i=t("./baseMatches"),o=t("./baseMatchesProperty"),s=t("./baseProperty"),a=t("./bindCallback"),u=t("../utility/identity"),c=t("./isBindable");e.exports=n},{"../utility/identity":151,"./baseMatches":118,"./baseMatchesProperty":119,"./baseProperty":120,"./bindCallback":123,"./isBindable":128}],128:[function(t,e,r){function n(t){var e=!(s.funcNames?t.name:s.funcDecomp);if(!e){var r=c.call(t);s.funcNames||(e=!a.test(r)),e||(e=u.test(r)||o(t),i(t,e))}return e}var i=t("./baseSetData"),o=t("../lang/isNative"),s=t("../support"),a=/^\s*function[ \n\r\t]+\w/,u=/\bthis\b/,c=Function.prototype.toString;e.exports=n},{"../lang/isNative":141,"../support":150,"./baseSetData":121}],121:[function(t,e,r){var n=t("../utility/identity"),i=t("./metaMap"),o=i?function(t,e){return i.set(t,e),t}:n;e.exports=o},{"../utility/identity":151,"./metaMap":134}],134:[function(t,e,r){(function(r){var n=t("../lang/isNative"),i=n(i=r.WeakMap)&&i,o=i&&new i;e.exports=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":141}],123:[function(t,e,r){function n(t,e,r){if("function"!=typeof t)return i;if("undefined"==typeof e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 3:return function(r,n,i){return t.call(e,r,n,i)};case 4:return function(r,n,i,o){return t.call(e,r,n,i,o)};case 5:return function(r,n,i,o,s){return t.call(e,r,n,i,o,s)}}return function(){return t.apply(e,arguments)}}var i=t("../utility/identity");e.exports=n},{"../utility/identity":151}],151:[function(t,e,r){function n(t){return t}e.exports=n},{}],120:[function(t,e,r){function n(t){return function(e){return null==e?void 0:e[t]}}e.exports=n},{}],119:[function(t,e,r){function n(t,e){return o(e)?function(r){return null!=r&&r[t]===e}:function(r){return null!=r&&i(e,r[t],null,!0)}}var i=t("./baseIsEqual"),o=t("./isStrictComparable");e.exports=n},{"./baseIsEqual":114,"./isStrictComparable":133}],118:[function(t,e,r){function n(t){var e=s(t),r=e.length;if(1==r){var n=e[0],a=t[n];if(o(a))return function(t){return null!=t&&t[n]===a&&u.call(t,n)}}for(var c=Array(r),l=Array(r);r--;)a=t[e[r]],c[r]=a,l[r]=o(a);return function(t){return i(t,e,c,l)}}var i=t("./baseIsMatch"),o=t("./isStrictComparable"),s=t("../object/keys"),a=Object.prototype,u=a.hasOwnProperty;e.exports=n},{"../object/keys":147,"./baseIsMatch":117,"./isStrictComparable":133}],133:[function(t,e,r){function n(t){return t===t&&(0===t?1/t>0:!i(t))}var i=t("../lang/isObject");e.exports=n},{"../lang/isObject":142}],117:[function(t,e,r){function n(t,e,r,n,o){var a=e.length;if(null==t)return!a;for(var u=-1,c=!o;++u<a;)if(c&&n[u]?r[u]!==t[e[u]]:!s.call(t,e[u]))return!1;for(u=-1;++u<a;){var l=e[u];if(c&&n[u])var h=s.call(t,l);else{var p=t[l],f=r[u];h=o?o(p,f,l):void 0,"undefined"==typeof h&&(h=i(f,p,o,!0))}if(!h)return!1}return!0}var i=t("./baseIsEqual"),o=Object.prototype,s=o.hasOwnProperty;e.exports=n},{"./baseIsEqual":114}],114:[function(t,e,r){function n(t,e,r,o,s,a){if(t===e)return 0!==t||1/t==1/e;var u=typeof t,c=typeof e;return"function"!=u&&"object"!=u&&"function"!=c&&"object"!=c||null==t||null==e?t!==t&&e!==e:i(t,e,n,r,o,s,a)}var i=t("./baseIsEqualDeep");e.exports=n},{"./baseIsEqualDeep":115}],115:[function(t,e,r){function n(t,e,r,n,p,y,g){var m=a(t),v=a(e),b=l,w=l;m||(b=d.call(t),b==c?b=h:b!=h&&(m=u(t))),v||(w=d.call(e),w==c?w=h:w!=h&&(v=u(e)));var E=b==h,x=w==h,S=b==w;if(S&&!m&&!E)return o(t,e,b);var A=E&&f.call(t,"__wrapped__"),R=x&&f.call(e,"__wrapped__");if(A||R)return r(A?t.value():t,R?e.value():e,n,p,y,g);if(!S)return!1;y||(y=[]),g||(g=[]);for(var C=y.length;C--;)if(y[C]==t)return g[C]==e;y.push(t),g.push(e);var I=(m?i:s)(t,e,r,n,p,y,g);return y.pop(),g.pop(),I}var i=t("./equalArrays"),o=t("./equalByTag"),s=t("./equalObjects"),a=t("../lang/isArray"),u=t("../lang/isTypedArray"),c="[object Arguments]",l="[object Array]",h="[object Object]",p=Object.prototype,f=p.hasOwnProperty,d=p.toString;e.exports=n},{"../lang/isArray":138,"../lang/isTypedArray":144,"./equalArrays":125,"./equalByTag":126,"./equalObjects":127}],144:[function(t,e,r){function n(t){return o(t)&&i(t.length)&&L[j.call(t)]||!1}var i=t("../internal/isLength"),o=t("../internal/isObjectLike"),s="[object Arguments]",a="[object Array]",u="[object Boolean]",c="[object Date]",l="[object Error]",h="[object Function]",p="[object Map]",f="[object Number]",d="[object Object]",y="[object RegExp]",g="[object Set]",m="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",w="[object Float32Array]",E="[object Float64Array]",x="[object Int8Array]",S="[object Int16Array]",A="[object Int32Array]",R="[object Uint8Array]",C="[object Uint8ClampedArray]",I="[object Uint16Array]",T="[object Uint32Array]",L={};L[w]=L[E]=L[x]=L[S]=L[A]=L[R]=L[C]=L[I]=L[T]=!0,L[s]=L[a]=L[b]=L[u]=L[c]=L[l]=L[h]=L[p]=L[f]=L[d]=L[y]=L[g]=L[m]=L[v]=!1;var _=Object.prototype,j=_.toString;e.exports=n},{"../internal/isLength":131,"../internal/isObjectLike":132}],127:[function(t,e,r){function n(t,e,r,n,o,a,u){var c=i(t),l=c.length,h=i(e),p=h.length;if(l!=p&&!o)return!1;for(var f,d=-1;++d<l;){var y=c[d],g=s.call(e,y);if(g){var m=t[y],v=e[y];g=void 0,n&&(g=o?n(v,m,y):n(m,v,y)),"undefined"==typeof g&&(g=m&&m===v||r(m,v,n,o,a,u))}if(!g)return!1;f||(f="constructor"==y)}if(!f){var b=t.constructor,w=e.constructor;if(b!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w))return!1}return!0}var i=t("../object/keys"),o=Object.prototype,s=o.hasOwnProperty;e.exports=n},{"../object/keys":147}],126:[function(t,e,r){function n(t,e,r){switch(r){case i:case o:return+t==+e;case s:return t.name==e.name&&t.message==e.message;case a:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case u:case c:return t==e+""}return!1}var i="[object Boolean]",o="[object Date]",s="[object Error]",a="[object Number]",u="[object RegExp]",c="[object String]";e.exports=n},{}],125:[function(t,e,r){function n(t,e,r,n,i,o,s){var a=-1,u=t.length,c=e.length,l=!0;if(u!=c&&!(i&&c>u))return!1;for(;l&&++a<u;){var h=t[a],p=e[a];if(l=void 0,n&&(l=i?n(p,h,a):n(h,p,a)),"undefined"==typeof l)if(i)for(var f=c;f--&&(p=e[f],!(l=h&&h===p||r(h,p,n,i,o,s))););else l=h&&h===p||r(h,p,n,i,o,s)}return!!l}e.exports=n},{}],105:[function(t,e,r){function n(t,e){for(var r=-1,n=t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}e.exports=n},{}],87:[function(t,e,r){(function(){var r,n;n=t("lodash/object/create"),e.exports=r=function(){function t(t,e,r){if(this.stringify=t.stringify,null==e)throw new Error("Missing attribute name of element "+t.name);if(null==r)throw new Error("Missing attribute value for attribute "+e+" of element "+t.name);this.name=this.stringify.attName(e),this.value=this.stringify.attValue(r)}return t.prototype.clone=function(){return n(t.prototype,this)},t.prototype.toString=function(t,e){return" "+this.name+'="'+this.value+'"'},t}()}).call(this)},{"lodash/object/create":146}],96:[function(t,e,r){(function(){var r,n,i,o,s,a,u,c,l,h;l=t("lodash/object/create"),h=t("lodash/lang/isObject"),r=t("./XMLCData"),n=t("./XMLComment"),i=t("./XMLDTDAttList"),s=t("./XMLDTDEntity"),o=t("./XMLDTDElement"),a=t("./XMLDTDNotation"),c=t("./XMLProcessingInstruction"),e.exports=u=function(){function t(t,e,r){var n,i;this.documentObject=t,this.stringify=this.documentObject.stringify,this.children=[],h(e)&&(n=e,e=n.pubID,r=n.sysID),null==r&&(i=[e,r],r=i[0],e=i[1]),null!=e&&(this.pubID=this.stringify.dtdPubID(e)),null!=r&&(this.sysID=this.stringify.dtdSysID(r))}return t.prototype.clone=function(){return l(t.prototype,this)},t.prototype.element=function(t,e){var r;return r=new o(this,t,e),this.children.push(r),this},t.prototype.attList=function(t,e,r,n,o){var s;return s=new i(this,t,e,r,n,o),this.children.push(s),this},t.prototype.entity=function(t,e){var r;return r=new s(this,!1,t,e),this.children.push(r),this},t.prototype.pEntity=function(t,e){var r;return r=new s(this,!0,t,e),this.children.push(r),this},t.prototype.notation=function(t,e){var r;return r=new a(this,t,e),this.children.push(r),this},t.prototype.cdata=function(t){var e;return e=new r(this,t),this.children.push(e),this},t.prototype.comment=function(t){var e;return e=new n(this,t),this.children.push(e),this},t.prototype.instruction=function(t,e){var r;return r=new c(this,t,e),this.children.push(r),this},t.prototype.root=function(){return this.documentObject.root()},t.prototype.document=function(){return this.documentObject},t.prototype.toString=function(t,e){var r,n,i,o,s,a,u,c,l,h,p,f,d;if(u=(null!=t?t.pretty:void 0)||!1,i=null!=(l=null!=t?t.indent:void 0)?l:" ",a=null!=(h=null!=t?t.offset:void 0)?h:0,s=null!=(p=null!=t?t.newline:void 0)?p:"\n",e||(e=0),d=new Array(e+a+1).join(i),c="",u&&(c+=d),c+="<!DOCTYPE "+this.root().name,this.pubID&&this.sysID?c+=' PUBLIC "'+this.pubID+'" "'+this.sysID+'"':this.sysID&&(c+=' SYSTEM "'+this.sysID+'"'),this.children.length>0){for(c+=" [",u&&(c+=s),f=this.children,n=0,o=f.length;o>n;n++)r=f[n],c+=r.toString(t,e+1);c+="]"}return c+=">",u&&(c+=s),c},t.prototype.ele=function(t,e){return this.element(t,e)},t.prototype.att=function(t,e,r,n,i){
9return this.attList(t,e,r,n,i)},t.prototype.ent=function(t,e){return this.entity(t,e)},t.prototype.pent=function(t,e){return this.pEntity(t,e)},t.prototype.not=function(t,e){return this.notation(t,e)},t.prototype.dat=function(t){return this.cdata(t)},t.prototype.com=function(t){return this.comment(t)},t.prototype.ins=function(t,e){return this.instruction(t,e)},t.prototype.up=function(){return this.root()},t.prototype.doc=function(){return this.document()},t}()}).call(this)},{"./XMLCData":89,"./XMLComment":90,"./XMLDTDAttList":91,"./XMLDTDElement":92,"./XMLDTDEntity":93,"./XMLDTDNotation":94,"./XMLProcessingInstruction":99,"lodash/lang/isObject":142,"lodash/object/create":146}],99:[function(t,e,r){(function(){var r,n;n=t("lodash/object/create"),e.exports=r=function(){function t(t,e,r){if(this.stringify=t.stringify,null==e)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(e),r&&(this.value=this.stringify.insValue(r))}return t.prototype.clone=function(){return n(t.prototype,this)},t.prototype.toString=function(t,e){var r,n,i,o,s,a,u,c,l;return o=(null!=t?t.pretty:void 0)||!1,r=null!=(a=null!=t?t.indent:void 0)?a:" ",i=null!=(u=null!=t?t.offset:void 0)?u:0,n=null!=(c=null!=t?t.newline:void 0)?c:"\n",e||(e=0),l=new Array(e+i+1).join(r),s="",o&&(s+=l),s+="<?",s+=this.target,this.value&&(s+=" "+this.value),s+="?>",o&&(s+=n),s},t}()}).call(this)},{"lodash/object/create":146}],94:[function(t,e,r){(function(){var r,n;n=t("lodash/object/create"),e.exports=r=function(){function t(t,e,r){if(this.stringify=t.stringify,null==e)throw new Error("Missing notation name");if(!r.pubID&&!r.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(e),null!=r.pubID&&(this.pubID=this.stringify.dtdPubID(r.pubID)),null!=r.sysID&&(this.sysID=this.stringify.dtdSysID(r.sysID))}return t.prototype.clone=function(){return n(t.prototype,this)},t.prototype.toString=function(t,e){var r,n,i,o,s,a,u,c,l;return o=(null!=t?t.pretty:void 0)||!1,r=null!=(a=null!=t?t.indent:void 0)?a:" ",i=null!=(u=null!=t?t.offset:void 0)?u:0,n=null!=(c=null!=t?t.newline:void 0)?c:"\n",e||(e=0),l=new Array(e+i+1).join(r),s="",o&&(s+=l),s+="<!NOTATION "+this.name,this.pubID&&this.sysID?s+=' PUBLIC "'+this.pubID+'" "'+this.sysID+'"':this.pubID?s+=' PUBLIC "'+this.pubID+'"':this.sysID&&(s+=' SYSTEM "'+this.sysID+'"'),s+=">",o&&(s+=n),s},t}()}).call(this)},{"lodash/object/create":146}],93:[function(t,e,r){(function(){var r,n,i;n=t("lodash/object/create"),i=t("lodash/lang/isObject"),e.exports=r=function(){function t(t,e,r,n){if(this.stringify=t.stringify,null==r)throw new Error("Missing entity name");if(null==n)throw new Error("Missing entity value");if(this.pe=!!e,this.name=this.stringify.eleName(r),i(n)){if(!n.pubID&&!n.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(n.pubID&&!n.sysID)throw new Error("System identifier is required for a public external entity");if(null!=n.pubID&&(this.pubID=this.stringify.dtdPubID(n.pubID)),null!=n.sysID&&(this.sysID=this.stringify.dtdSysID(n.sysID)),null!=n.nData&&(this.nData=this.stringify.dtdNData(n.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(n)}return t.prototype.clone=function(){return n(t.prototype,this)},t.prototype.toString=function(t,e){var r,n,i,o,s,a,u,c,l;return o=(null!=t?t.pretty:void 0)||!1,r=null!=(a=null!=t?t.indent:void 0)?a:" ",i=null!=(u=null!=t?t.offset:void 0)?u:0,n=null!=(c=null!=t?t.newline:void 0)?c:"\n",e||(e=0),l=new Array(e+i+1).join(r),s="",o&&(s+=l),s+="<!ENTITY",this.pe&&(s+=" %"),s+=" "+this.name,this.value?s+=' "'+this.value+'"':(this.pubID&&this.sysID?s+=' PUBLIC "'+this.pubID+'" "'+this.sysID+'"':this.sysID&&(s+=' SYSTEM "'+this.sysID+'"'),this.nData&&(s+=" NDATA "+this.nData)),s+=">",o&&(s+=n),s},t}()}).call(this)},{"lodash/lang/isObject":142,"lodash/object/create":146}],92:[function(t,e,r){(function(){var r,n,i;n=t("lodash/object/create"),i=t("lodash/lang/isArray"),e.exports=r=function(){function t(t,e,r){if(this.stringify=t.stringify,null==e)throw new Error("Missing DTD element name");r||(r="(#PCDATA)"),i(r)&&(r="("+r.join(",")+")"),this.name=this.stringify.eleName(e),this.value=this.stringify.dtdElementValue(r)}return t.prototype.clone=function(){return n(t.prototype,this)},t.prototype.toString=function(t,e){var r,n,i,o,s,a,u,c,l;return o=(null!=t?t.pretty:void 0)||!1,r=null!=(a=null!=t?t.indent:void 0)?a:" ",i=null!=(u=null!=t?t.offset:void 0)?u:0,n=null!=(c=null!=t?t.newline:void 0)?c:"\n",e||(e=0),l=new Array(e+i+1).join(r),s="",o&&(s+=l),s+="<!ELEMENT "+this.name+" "+this.value+">",o&&(s+=n),s},t}()}).call(this)},{"lodash/lang/isArray":138,"lodash/object/create":146}],91:[function(t,e,r){(function(){var r,n;n=t("lodash/object/create"),e.exports=r=function(){function t(t,e,r,n,i,o){if(this.stringify=t.stringify,null==e)throw new Error("Missing DTD element name");if(null==r)throw new Error("Missing DTD attribute name");if(!n)throw new Error("Missing DTD attribute type");if(!i)throw new Error("Missing DTD attribute default");if(0!==i.indexOf("#")&&(i="#"+i),!i.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(o&&!i.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(e),this.attributeName=this.stringify.attName(r),this.attributeType=this.stringify.dtdAttType(n),this.defaultValue=this.stringify.dtdAttDefault(o),this.defaultValueType=i}return t.prototype.clone=function(){return n(t.prototype,this)},t.prototype.toString=function(t,e){var r,n,i,o,s,a,u,c,l;return o=(null!=t?t.pretty:void 0)||!1,r=null!=(a=null!=t?t.indent:void 0)?a:" ",i=null!=(u=null!=t?t.offset:void 0)?u:0,n=null!=(c=null!=t?t.newline:void 0)?c:"\n",e||(e=0),l=new Array(e+i+1).join(r),s="",o&&(s+=l),s+="<!ATTLIST "+this.elementName+" "+this.attributeName+" "+this.attributeType,"#DEFAULT"!==this.defaultValueType&&(s+=" "+this.defaultValueType),this.defaultValue&&(s+=' "'+this.defaultValue+'"'),s+=">",o&&(s+=n),s},t}()}).call(this)},{"lodash/object/create":146}],90:[function(t,e,r){(function(){var r,n,i,o=function(t,e){function r(){this.constructor=t}for(var n in e)s.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty;i=t("lodash/object/create"),n=t("./XMLNode"),e.exports=r=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing comment text");this.text=this.stringify.comment(r)}return o(e,t),e.prototype.clone=function(){return i(e.prototype,this)},e.prototype.toString=function(t,e){var r,n,i,o,s,a,u,c,l;return o=(null!=t?t.pretty:void 0)||!1,r=null!=(a=null!=t?t.indent:void 0)?a:" ",i=null!=(u=null!=t?t.offset:void 0)?u:0,n=null!=(c=null!=t?t.newline:void 0)?c:"\n",e||(e=0),l=new Array(e+i+1).join(r),s="",o&&(s+=l),s+="<!-- "+this.text+" -->",o&&(s+=n),s},e}(n)}).call(this)},{"./XMLNode":98,"lodash/object/create":146}],89:[function(t,e,r){(function(){var r,n,i,o=function(t,e){function r(){this.constructor=t}for(var n in e)s.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty;i=t("lodash/object/create"),n=t("./XMLNode"),e.exports=r=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(r)}return o(e,t),e.prototype.clone=function(){return i(e.prototype,this)},e.prototype.toString=function(t,e){var r,n,i,o,s,a,u,c,l;return o=(null!=t?t.pretty:void 0)||!1,r=null!=(a=null!=t?t.indent:void 0)?a:" ",i=null!=(u=null!=t?t.offset:void 0)?u:0,n=null!=(c=null!=t?t.newline:void 0)?c:"\n",e||(e=0),l=new Array(e+i+1).join(r),s="",o&&(s+=l),s+="<![CDATA["+this.text+"]]>",o&&(s+=n),s},e}(n)}).call(this)},{"./XMLNode":98,"lodash/object/create":146}],146:[function(t,e,r){function n(t,e,r){var n=o(t);return r&&s(t,e,r)&&(e=null),e?i(e,n,a(e)):n}var i=t("../internal/baseCopy"),o=t("../internal/baseCreate"),s=t("../internal/isIterateeCall"),a=t("./keys");e.exports=n},{"../internal/baseCopy":108,"../internal/baseCreate":109,"../internal/isIterateeCall":130,"./keys":147}],147:[function(t,e,r){var n=t("../internal/isLength"),i=t("../lang/isNative"),o=t("../lang/isObject"),s=t("../internal/shimKeys"),a=i(a=Object.keys)&&a,u=a?function(t){if(t)var e=t.constructor,r=t.length;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&r&&n(r)?s(t):o(t)?a(t):[]}:s;e.exports=u},{"../internal/isLength":131,"../internal/shimKeys":135,"../lang/isNative":141,"../lang/isObject":142}],135:[function(t,e,r){function n(t){for(var e=u(t),r=e.length,n=r&&t.length,l=n&&a(n)&&(o(t)||c.nonEnumArgs&&i(t)),p=-1,f=[];++p<r;){var d=e[p];(l&&s(d,n)||h.call(t,d))&&f.push(d)}return f}var i=t("../lang/isArguments"),o=t("../lang/isArray"),s=t("./isIndex"),a=t("./isLength"),u=t("../object/keysIn"),c=t("../support"),l=Object.prototype,h=l.hasOwnProperty;e.exports=n},{"../lang/isArguments":137,"../lang/isArray":138,"../object/keysIn":148,"../support":150,"./isIndex":129,"./isLength":131}],148:[function(t,e,r){function n(t){if(null==t)return[];u(t)||(t=Object(t));var e=t.length;e=e&&a(e)&&(o(t)||c.nonEnumArgs&&i(t))&&e||0;for(var r=t.constructor,n=-1,l="function"==typeof r&&r.prototype===t,p=Array(e),f=e>0;++n<e;)p[n]=n+"";for(var d in t)f&&s(d,e)||"constructor"==d&&(l||!h.call(t,d))||p.push(d);return p}var i=t("../lang/isArguments"),o=t("../lang/isArray"),s=t("../internal/isIndex"),a=t("../internal/isLength"),u=t("../lang/isObject"),c=t("../support"),l=Object.prototype,h=l.hasOwnProperty;e.exports=n},{"../internal/isIndex":129,"../internal/isLength":131,"../lang/isArguments":137,"../lang/isArray":138,"../lang/isObject":142,"../support":150}],150:[function(t,e,r){(function(r){var n=t("./lang/isNative"),i=/\bthis\b/,o=Object.prototype,s=(s=r.window)&&s.document,a=o.propertyIsEnumerable,u={};!function(t){u.funcDecomp=!n(r.WinRTError)&&i.test(function(){return this}),u.funcNames="string"==typeof Function.name;try{u.dom=11===s.createDocumentFragment().nodeType}catch(e){u.dom=!1}try{u.nonEnumArgs=!a.call(arguments,1)}catch(e){u.nonEnumArgs=!0}}(0,0),e.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lang/isNative":141}],138:[function(t,e,r){var n=t("../internal/isLength"),i=t("./isNative"),o=t("../internal/isObjectLike"),s="[object Array]",a=Object.prototype,u=a.toString,c=i(c=Array.isArray)&&c,l=c||function(t){return o(t)&&n(t.length)&&u.call(t)==s||!1};e.exports=l},{"../internal/isLength":131,"../internal/isObjectLike":132,"./isNative":141}],141:[function(t,e,r){function n(t){return null==t?!1:l.call(t)==s?h.test(c.call(t)):o(t)&&a.test(t)||!1}var i=t("../string/escapeRegExp"),o=t("../internal/isObjectLike"),s="[object Function]",a=/^\[object .+?Constructor\]$/,u=Object.prototype,c=Function.prototype.toString,l=u.toString,h=RegExp("^"+i(l).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=n},{"../internal/isObjectLike":132,"../string/escapeRegExp":149}],149:[function(t,e,r){function n(t){return t=i(t),t&&s.test(t)?t.replace(o,"\\$&"):t}var i=t("../internal/baseToString"),o=/[.*+?^${}()|[\]\/\\]/g,s=RegExp(o.source);e.exports=n},{"../internal/baseToString":122}],122:[function(t,e,r){function n(t){return"string"==typeof t?t:null==t?"":t+""}e.exports=n},{}],137:[function(t,e,r){function n(t){var e=o(t)?t.length:void 0;return i(e)&&u.call(t)==s||!1}var i=t("../internal/isLength"),o=t("../internal/isObjectLike"),s="[object Arguments]",a=Object.prototype,u=a.toString;e.exports=n},{"../internal/isLength":131,"../internal/isObjectLike":132}],132:[function(t,e,r){function n(t){return t&&"object"==typeof t||!1}e.exports=n},{}],130:[function(t,e,r){function n(t,e,r){if(!s(r))return!1;var n=typeof e;if("number"==n)var a=r.length,u=o(a)&&i(e,a);else u="string"==n&&e in r;if(u){var c=r[e];return t===t?t===c:c!==c}return!1}var i=t("./isIndex"),o=t("./isLength"),s=t("../lang/isObject");e.exports=n},{"../lang/isObject":142,"./isIndex":129,"./isLength":131}],131:[function(t,e,r){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&i>=t}var i=Math.pow(2,53)-1;e.exports=n},{}],129:[function(t,e,r){function n(t,e){return t=+t,e=null==e?i:e,t>-1&&t%1==0&&e>t}var i=Math.pow(2,53)-1;e.exports=n},{}],109:[function(t,e,r){(function(r){var n=t("../lang/isObject"),i=function(){function t(){}return function(e){if(n(e)){t.prototype=e;var i=new t;t.prototype=null}return i||r.Object()}}();e.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isObject":142}],142:[function(t,e,r){function n(t){var e=typeof t;return"function"==e||t&&"object"==e||!1}e.exports=n},{}],108:[function(t,e,r){function n(t,e,r){r||(r=e,e={});for(var n=-1,i=r.length;++n<i;){var o=r[n];e[o]=t[o]}return e}e.exports=n},{}],77:[function(t,e,r){var n=t("../core"),i=n.util.inherit;n.Signers.RequestSigner=i({constructor:function(t){this.request=t}}),n.Signers.RequestSigner.getVersion=function(t){switch(t){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 "+t)},t("./v2"),t("./v3"),t("./v3https"),t("./v4"),t("./s3"),t("./presign")},{"../core":24,"./presign":76,"./s3":78,"./v2":79,"./v3":80,"./v3https":81,"./v4":82}],82:[function(t,e,r){var n=t("../core"),i=n.util.inherit,o={},s="presigned-expires";n.Signers.V4=i(n.Signers.RequestSigner,{constructor:function(t,e,r){n.Signers.RequestSigner.call(this,t),this.serviceName=e,this.signatureCache=r},algorithm:"AWS4-HMAC-SHA256",addAuthorization:function(t,e){var r=n.util.date.iso8601(e).replace(/[:\-]|\.\d{3}/g,"");this.isPresigned()?this.updateForPresigned(t,r):this.addHeaders(t,r),this.request.headers.Authorization=this.authorization(t,r)},addHeaders:function(t,e){this.request.headers["X-Amz-Date"]=e,t.sessionToken&&(this.request.headers["x-amz-security-token"]=t.sessionToken)},updateForPresigned:function(t,e){var r=this.credentialString(e),i={"X-Amz-Date":e,"X-Amz-Algorithm":this.algorithm,"X-Amz-Credential":t.accessKeyId+"/"+r,"X-Amz-Expires":this.request.headers[s],"X-Amz-SignedHeaders":this.signedHeaders()};t.sessionToken&&(i["X-Amz-Security-Token"]=t.sessionToken),this.request.headers["Content-Type"]&&(i["Content-Type"]=this.request.headers["Content-Type"]),this.request.headers["Content-MD5"]&&(i["Content-MD5"]=this.request.headers["Content-MD5"]),this.request.headers["Cache-Control"]&&(i["Cache-Control"]=this.request.headers["Cache-Control"]),n.util.each.call(this,this.request.headers,function(t,e){t!==s&&this.isSignableHeader(t)&&0===t.toLowerCase().indexOf("x-amz-")&&(i[t]=e)});var o=this.request.path.indexOf("?")>=0?"&":"?";this.request.path+=o+n.util.queryParamsToString(i)},authorization:function(t,e){var r=[],n=this.credentialString(e);return r.push(this.algorithm+" Credential="+t.accessKeyId+"/"+n),r.push("SignedHeaders="+this.signedHeaders()),r.push("Signature="+this.signature(t,e)),r.join(", ")},signature:function(t,e){var r=null;if(this.signatureCache)var r=o[this.serviceName];var i=e.substr(0,8);if(!r||r.akid!==t.accessKeyId||r.region!==this.request.region||r.date!==i){var s=t.secretAccessKey,a=n.util.crypto.hmac("AWS4"+s,i,"buffer"),u=n.util.crypto.hmac(a,this.request.region,"buffer"),c=n.util.crypto.hmac(u,this.serviceName,"buffer"),l=n.util.crypto.hmac(c,"aws4_request","buffer");if(!this.signatureCache)return n.util.crypto.hmac(l,this.stringToSign(e),"hex");o[this.serviceName]={region:this.request.region,date:i,key:l,akid:t.accessKeyId}}var h=o[this.serviceName].key;return n.util.crypto.hmac(h,this.stringToSign(e),"hex")},stringToSign:function(t){var e=[];return e.push("AWS4-HMAC-SHA256"),e.push(t),e.push(this.credentialString(t)),e.push(this.hexEncodedHash(this.canonicalString())),e.join("\n")},canonicalString:function(){var t=[],e=this.request.pathname();return"s3"!==this.serviceName&&(e=n.util.uriEscapePath(e)),t.push(this.request.method),t.push(e),t.push(this.request.search()),t.push(this.canonicalHeaders()+"\n"),t.push(this.signedHeaders()),t.push(this.hexEncodedBodyHash()),t.join("\n")},canonicalHeaders:function(){var t=[];n.util.each.call(this,this.request.headers,function(e,r){t.push([e,r])}),t.sort(function(t,e){return t[0].toLowerCase()<e[0].toLowerCase()?-1:1});var e=[];return n.util.arrayEach.call(this,t,function(t){var r=t[0].toLowerCase();this.isSignableHeader(r)&&e.push(r+":"+this.canonicalHeaderValues(t[1].toString()))}),e.join("\n")},canonicalHeaderValues:function(t){return t.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")},signedHeaders:function(){var t=[];return n.util.each.call(this,this.request.headers,function(e){e=e.toLowerCase(),this.isSignableHeader(e)&&t.push(e)}),t.sort().join(";")},credentialString:function(t){var e=[];return e.push(t.substr(0,8)),e.push(this.request.region),e.push(this.serviceName),e.push("aws4_request"),e.join("/")},hexEncodedHash:function(t){return n.util.crypto.sha256(t,"hex")},hexEncodedBodyHash:function(){return this.isPresigned()&&"s3"===this.serviceName?"UNSIGNED-PAYLOAD":this.request.headers["X-Amz-Content-Sha256"]?this.request.headers["X-Amz-Content-Sha256"]:this.hexEncodedHash(this.request.body||"")},unsignableHeaders:["authorization","content-type","content-length","user-agent",s],isSignableHeader:function(t){return 0===t.toLowerCase().indexOf("x-amz-")?!0:this.unsignableHeaders.indexOf(t)<0},isPresigned:function(){return this.request.headers[s]?!0:!1}}),e.exports=n.Signers.V4},{"../core":24}],81:[function(t,e,r){var n=t("../core"),i=n.util.inherit;t("./v3"),n.Signers.V3Https=i(n.Signers.V3,{authorization:function(t){return"AWS3-HTTPS AWSAccessKeyId="+t.accessKeyId+",Algorithm=HmacSHA256,Signature="+this.signature(t)},stringToSign:function(){return this.request.headers["X-Amz-Date"]}}),e.exports=n.Signers.V3Https},{"../core":24,"./v3":80}],80:[function(t,e,r){var n=t("../core"),i=n.util.inherit;n.Signers.V3=i(n.Signers.RequestSigner,{addAuthorization:function(t,e){var r=n.util.date.rfc822(e);this.request.headers["X-Amz-Date"]=r,t.sessionToken&&(this.request.headers["x-amz-security-token"]=t.sessionToken),this.request.headers["X-Amzn-Authorization"]=this.authorization(t,r)},authorization:function(t){return"AWS3 AWSAccessKeyId="+t.accessKeyId+",Algorithm=HmacSHA256,SignedHeaders="+this.signedHeaders()+",Signature="+this.signature(t)},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,e=[];return n.util.arrayEach(this.headersToSign(),function(r){e.push(r.toLowerCase().trim()+":"+String(t[r]).trim())}),e.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(t){return n.util.crypto.hmac(t.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var t=[];return t.push(this.request.method),t.push("/"),t.push(""),t.push(this.canonicalHeaders()),t.push(this.request.body),n.util.crypto.sha256(t.join("\n"))}}),e.exports=n.Signers.V3},{"../core":24}],79:[function(t,e,r){var n=t("../core"),i=n.util.inherit;n.Signers.V2=i(n.Signers.RequestSigner,{addAuthorization:function(t,e){e||(e=n.util.date.getDate());var r=this.request;r.params.Timestamp=n.util.date.iso8601(e),r.params.SignatureVersion="2",r.params.SignatureMethod="HmacSHA256",r.params.AWSAccessKeyId=t.accessKeyId,t.sessionToken&&(r.params.SecurityToken=t.sessionToken),delete r.params.Signature,r.params.Signature=this.signature(t),r.body=n.util.queryParamsToString(r.params),r.headers["Content-Length"]=r.body.length},signature:function(t){return n.util.crypto.hmac(t.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var t=[];return t.push(this.request.method),t.push(this.request.endpoint.host.toLowerCase()),t.push(this.request.pathname()),t.push(n.util.queryParamsToString(this.request.params)),t.join("\n")}}),e.exports=n.Signers.V2},{"../core":24}],78:[function(t,e,r){var n=t("../core"),i=n.util.inherit;n.Signers.S3=i(n.Signers.RequestSigner,{subResources:{acl:1,cors:1,lifecycle:1,"delete":1,location:1,logging: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(t,e){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=n.util.date.rfc822(e)),t.sessionToken&&(this.request.headers["x-amz-security-token"]=t.sessionToken);var r=this.sign(t.secretAccessKey,this.stringToSign()),i="AWS "+t.accessKeyId+":"+r;this.request.headers.Authorization=i},stringToSign:function(){var t=this.request,e=[];e.push(t.method),e.push(t.headers["Content-MD5"]||""),e.push(t.headers["Content-Type"]||""),e.push(t.headers["presigned-expires"]||"");var r=this.canonicalizedAmzHeaders();return r&&e.push(r),e.push(this.canonicalizedResource()),e.join("\n")},canonicalizedAmzHeaders:function(){var t=[];n.util.each(this.request.headers,function(e){e.match(/^x-amz-/i)&&t.push(e)}),t.sort(function(t,e){return t.toLowerCase()<e.toLowerCase()?-1:1});var e=[];return n.util.arrayEach.call(this,t,function(t){e.push(t.toLowerCase()+":"+String(this.request.headers[t]))}),e.join("\n")},canonicalizedResource:function(){var t=this.request,e=t.path.split("?"),r=e[0],i=e[1],o="";if(t.virtualHostedBucket&&(o+="/"+t.virtualHostedBucket),o+=r,i){var s=[];n.util.arrayEach.call(this,i.split("&"),function(t){var e=t.split("=")[0],r=t.split("=")[1];if(this.subResources[e]||this.responseHeaders[e]){var n={name:e};void 0!==r&&(this.subResources[e]?n.value=r:n.value=decodeURIComponent(r)),s.push(n)}}),s.sort(function(t,e){return t.name<e.name?-1:1}),s.length&&(i=[],n.util.arrayEach(s,function(t){void 0===t.value?i.push(t.name):i.push(t.name+"="+t.value)}),o+="?"+i.join("&"))}return o},sign:function(t,e){return n.util.crypto.hmac(t,e,"base64","sha1")}}),e.exports=n.Signers.S3},{"../core":24}],76:[function(t,e,r){function n(t){var e=t.httpRequest.headers[a];if(delete t.httpRequest.headers["User-Agent"],delete t.httpRequest.headers["X-Amz-User-Agent"],t.service.getSignerClass()===o.Signers.V4){if(e>604800){var r="Presigning does not support expiry time greater than a week with SigV4 signing.";throw o.util.error(new Error,{code:"InvalidExpiryTime",message:r,retryable:!1})}t.httpRequest.headers[a]=e}else{if(t.service.getSignerClass()!==o.Signers.S3)throw o.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});t.httpRequest.headers[a]=parseInt(o.util.date.unixTimestamp()+e,10).toString()}}function i(t){var e=t.httpRequest.endpoint,r=o.util.urlParse(t.httpRequest.path),n={};r.search&&(n=o.util.queryStringParse(r.search.substr(1))),o.util.each(t.httpRequest.headers,function(t,e){t===a&&(t="Expires"),0===t.indexOf("x-amz-meta-")&&(t=t.toLowerCase()),n[t]=e}),delete t.httpRequest.headers[a];var i=n.Authorization.split(" ");if("AWS"===i[0])i=i[1].split(":"),n.AWSAccessKeyId=i[0],n.Signature=i[1];else if("AWS4-HMAC-SHA256"===i[0]){i.shift();var s=i.join(" "),u=s.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];n["X-Amz-Signature"]=u,delete n.Expires}delete n.Authorization,delete n.Host,e.pathname=r.pathname,e.search=o.util.queryParamsToString(n)}var o=t("../core"),s=o.util.inherit,a="presigned-expires";o.Signers.Presign=s({sign:function(t,e,r){if(t.httpRequest.headers[a]=e||3600,t.on("build",n),t.on("sign",i),t.removeListener("afterBuild",o.EventListeners.Core.SET_CONTENT_LENGTH),t.removeListener("afterBuild",o.EventListeners.Core.COMPUTE_SHA256),t.emit("beforePresign",[t]),!r){if(t.build(),t.response.error)throw t.response.error;return o.util.urlFormat(t.httpRequest.endpoint)}t.build(function(){this.response.error?r(this.response.error):r(null,o.util.urlFormat(t.httpRequest.endpoint))})}}),e.exports=o.Signers.Presign},{"../core":24}],61:[function(t,e,r){var n=t("./core"),i=t("./model/api"),o=t("./region_config"),s=n.util.inherit;n.Service=s({constructor:function(t){if(!this.loadServiceClass)throw n.util.error(new Error,"Service must be constructed with `new' operator");var e=this.loadServiceClass(t||{});return e?new e(t):void this.initialize(t)},initialize:function(t){var e=n.config[this.serviceIdentifier];this.config=new n.Config(n.config),e&&this.config.update(e,!0),t&&this.config.update(t,!0),this.validateService(),this.config.endpoint||o(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint)},validateService:function(){},loadServiceClass:function(t){var e=t;if(n.util.isEmpty(this.api)){if(e.apiConfig)return n.Service.defineServiceApi(this.constructor,e.apiConfig);if(this.constructor.services){e=new n.Config(n.config),e.update(t,!0);var r=e.apiVersions[this.constructor.serviceIdentifier];return r=r||e.apiVersion,this.getLatestServiceClass(r)}return null}return null},getLatestServiceClass:function(t){return t=this.getLatestServiceVersion(t),null===this.constructor.services[t]&&n.Service.defineServiceApi(this.constructor,t),this.constructor.services[t]},getLatestServiceVersion:function(t){if(!this.constructor.services||0===this.constructor.services.length)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(t?n.util.isType(t,Date)&&(t=n.util.date.iso8601(t).split("T")[0]):t="latest",Object.hasOwnProperty(this.constructor.services,t))return t;for(var e=Object.keys(this.constructor.services).sort(),r=null,i=e.length-1;i>=0;i--)if("*"!==e[i][e[i].length-1]&&(r=e[i]),e[i].substr(0,10)<=t)return r;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+t+"'")},api:{},defaultRetryCount:3,makeRequest:function(t,e,r){if("function"==typeof e&&(r=e,e=null),e=e||{},this.config.params){var i=this.api.operations[t];i&&(e=n.util.copy(e),n.util.each(this.config.params,function(t,r){i.input.members[t]&&(void 0===e[t]||null===e[t])&&(e[t]=r)}))}var o=new n.Request(this,t,e);return this.addAllRequestListeners(o),r&&o.send(r),o},makeUnauthenticatedRequest:function(t,e,r){"function"==typeof e&&(r=e,e={});var n=this.makeRequest(t,e).toUnauthenticated();return r?n.send(r):n},waitFor:function(t,e,r){var i=new n.ResourceWaiter(this,t);return i.wait(e,r)},addAllRequestListeners:function(t){for(var e=[n.events,n.EventListeners.Core,this.serviceInterface(),n.EventListeners.CorePost],r=0;r<e.length;r++)e[r]&&t.addListeners(e[r]);this.config.paramValidation||t.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),this.config.logger&&t.addListeners(n.EventListeners.Logger),this.setupRequestListeners(t)},setupRequestListeners:function(){},getSignerClass:function(){var t;return t=this.config.signatureVersion?this.config.signatureVersion:this.api.signatureVersion,n.Signers.RequestSigner.getVersion(t)},serviceInterface:function(){switch(this.api.protocol){case"ec2":return n.EventListeners.Query;case"query":return n.EventListeners.Query;case"json":return n.EventListeners.Json;case"rest-json":return n.EventListeners.RestJson;case"rest-xml":return n.EventListeners.RestXml}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(t){return t.httpResponse.statusCode<300},numRetries:function(){return void 0!==this.config.maxRetries?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(t){var e=this.config.retryDelayOptions||{},r=e.customBackoff||null;if("function"==typeof r)return r(t);var n=e.base||30,i=Math.random()*Math.pow(2,t)*n;return i},retryableError:function(t){return this.networkingError(t)?!0:this.expiredCredentialsError(t)?!0:this.throttledError(t)?!0:t.statusCode>=500?!0:!1},networkingError:function(t){return"NetworkingError"===t.code},expiredCredentialsError:function(t){return"ExpiredTokenException"===t.code},clockSkewError:function(t){switch(t.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},throttledError:function(t){switch(t.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":return!0;default:return!1}},endpointFromTemplate:function(t){if("string"!=typeof t)return t;var e=t;return e=e.replace(/\{service\}/g,this.api.endpointPrefix),e=e.replace(/\{region\}/g,this.config.region),e=e.replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(t){this.endpoint=new n.Endpoint(t,this.config)},paginationConfig:function(t,e){var r=this.api.operations[t].paginator;if(!r){if(e){var i=new Error;throw n.util.error(i,"No pagination configuration for "+t)}return null}return r}}),n.util.update(n.Service,{defineMethods:function(t){n.util.each(t.prototype.api.operations,function(e){t.prototype[e]||(t.prototype[e]=function(t,r){return this.makeRequest(e,t,r)})})},defineService:function(t,e,r){n.Service._serviceMap[t]=!0,Array.isArray(e)||(r=e,e=[]);var i=s(n.Service,r||{});if("string"==typeof t){n.Service.addVersions(i,e);var o=i.serviceIdentifier||t;i.serviceIdentifier=o}else i.prototype.api=t,n.Service.defineMethods(i);return i},addVersions:function(t,e){Array.isArray(e)||(e=[e]),t.services=t.services||{};for(var r=0;r<e.length;r++)void 0===t.services[e[r]]&&(t.services[e[r]]=null);t.apiVersions=Object.keys(t.services).sort()},defineServiceApi:function(t,e,r){function o(t){t.isApi?a.prototype.api=t:a.prototype.api=new i(t)}var a=s(t,{serviceIdentifier:t.serviceIdentifier});if("string"==typeof e){if(r)o(r);else try{o(n.apiLoader(t.serviceIdentifier,e))}catch(u){throw n.util.error(u,{message:"Could not find API configuration "+t.serviceIdentifier+"-"+e})}t.services.hasOwnProperty(e)||(t.apiVersions=t.apiVersions.concat(e).sort()),t.services[e]=a}else o(e);return n.Service.defineMethods(a),a},hasService:function(t){return n.Service._serviceMap.hasOwnProperty(t)},_serviceMap:{}})},{"./core":24,"./model/api":41,"./region_config":55}],55:[function(t,e,r){function n(t){if(!t)return null;var e=t.split("-");return e.length<3?null:e.slice(0,e.length-2).join("-")+"-*"}function i(t){var e=t.config.region,r=n(e),i=t.api.endpointPrefix;return[[e,i],[r,i],[e,"*"],[r,"*"],["*",i],["*","*"]].map(function(t){return t[0]&&t[1]?t.join("/"):null})}function o(t,e){a.each(e,function(e,r){"globalEndpoint"!==e&&(void 0===t.config[e]||null===t.config[e])&&(t.config[e]=r)})}function s(t){for(var e=i(t),r=0;r<e.length;r++){var n=e[r];if(n&&u.rules.hasOwnProperty(n)){var s=u.rules[n];return"string"==typeof s&&(s=u.patterns[s]),t.isGlobalEndpoint=!!s.globalEndpoint,s.signatureVersion||(s.signatureVersion="v4"),void o(t,s)}}}var a=t("./util"),u=t("./region_config.json");e.exports=s},{"./region_config.json":54,"./util":84}],54:[function(t,e,r){e.exports={rules:{"*/*":{endpoint:"{service}.{region}.amazonaws.com"},"cn-*/*":{endpoint:"{service}.{region}.amazonaws.com.cn"},"*/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":"s3dash","us-west-1/s3":"s3dash",
10"us-west-2/s3":"s3dash","eu-west-1/s3":"s3dash","ap-southeast-1/s3":"s3dash","ap-southeast-2/s3":"s3dash","ap-northeast-1/s3":"s3dash","sa-east-1/s3":"s3dash","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"},s3dash:{endpoint:"{service}-{region}.amazonaws.com",signatureVersion:"s3"}}}},{}],58:[function(t,e,r){var n=t("./core"),i=n.util.inherit;n.Response=i({constructor:function(t){this.request=t,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new n.HttpResponse,t&&(this.maxRetries=t.service.numRetries(),this.maxRedirects=t.service.config.maxRedirects)},nextPage:function(t){var e,r=this.request.service,i=this.request.operation;try{e=r.paginationConfig(i,!0)}catch(o){this.error=o}if(!this.hasNextPage()){if(t)t(this.error,null);else if(this.error)throw this.error;return null}var s=n.util.copy(this.request.params);if(this.nextPageTokens){var a=e.inputToken;"string"==typeof a&&(a=[a]);for(var u=0;u<a.length;u++)s[a[u]]=this.nextPageTokens[u];return r.makeRequest(this.request.operation,s,t)}return t?t(null,null):null},hasNextPage:function(){return this.cacheNextPageTokens(),this.nextPageTokens?!0:void 0===this.nextPageTokens?void 0:!1},cacheNextPageTokens:function(){if(this.hasOwnProperty("nextPageTokens"))return this.nextPageTokens;this.nextPageTokens=void 0;var t=this.request.service.paginationConfig(this.request.operation);if(!t)return this.nextPageTokens;if(this.nextPageTokens=null,t.moreResults&&!n.util.jamespath.find(t.moreResults,this.data))return this.nextPageTokens;var e=t.outputToken;return"string"==typeof e&&(e=[e]),n.util.arrayEach.call(this,e,function(t){var e=n.util.jamespath.find(t,this.data);e&&(this.nextPageTokens=this.nextPageTokens||[],this.nextPageTokens.push(e))}),this.nextPageTokens}})},{"./core":24}],57:[function(t,e,r){var n=t("./core"),i=n.util.inherit;n.ResourceWaiter=i({constructor:function(t,e){this.service=t,this.state=e,"object"==typeof this.state&&n.util.each.call(this,this.state,function(t,e){this.state=t,this.expectedValue=e}),this.loadWaiterConfig(this.state),this.expectedValue||(this.expectedValue=this.config.successValue)},service:null,state:null,expectedValue:null,config:null,waitDone:!1,Listeners:{retry:(new n.SequentialExecutor).addNamedListeners(function(t){t("RETRY_CHECK","retry",function(t){var e=t.request._waiter;t.error&&"ResourceNotReady"===t.error.code&&(t.error.retryDelay=1e3*e.config.interval)})}),output:(new n.SequentialExecutor).addNamedListeners(function(t){t("CHECK_OUT_ERROR","extractError",function(t){t.error&&t.request._waiter.setError(t,!0)}),t("CHECK_OUTPUT","extractData",function(t){var e=t.request._waiter,r=e.checkSuccess(t);r?t.error=null:e.setError(t,null===r?!1:!0)})}),error:(new n.SequentialExecutor).addNamedListeners(function(t){t("CHECK_ERROR","extractError",function(t){var e=t.request._waiter,r=e.checkError(t);r?(t.error=null,t.data={},t.request.removeAllListeners("extractData")):e.setError(t,null===r?!1:!0)}),t("CHECK_ERR_OUTPUT","extractData",function(t){t.request._waiter.setError(t,!0)})})},wait:function(t,e){"function"==typeof t&&(e=t,t=void 0);var r=this.service.makeRequest(this.config.operation,t),n=this.Listeners[this.config.successType];return r._waiter=this,r.response.maxRetries=this.config.maxAttempts,r.addListeners(this.Listeners.retry),n&&r.addListeners(n),e&&r.send(e),r},setError:function(t,e){t.data=null,t.error=n.util.error(t.error||new Error,{code:"ResourceNotReady",message:"Resource is not in the state "+this.state,retryable:e})},checkSuccess:function(t){if(!this.config.successPath)return t.httpResponse.statusCode<300;var e=n.util.jamespath.find(this.config.successPath,t.data);return this.config.failureValue&&this.config.failureValue.indexOf(e)>=0?null:this.expectedValue?e===this.expectedValue:e?!0:!1},checkError:function(t){var e=this.config.successValue;return"number"==typeof e?t.httpResponse.statusCode===e:t.error&&t.error.code===e},loadWaiterConfig:function(t,e){if(!this.service.api.waiters[t]){if(e)return;throw new n.util.error(new Error,{code:"StateNotFoundError",message:"State "+t+" not found."})}this.config=this.service.api.waiters[t];var r=this.config;!function(){r.successType=r.successType||r.acceptorType,r.successPath=r.successPath||r.acceptorPath,r.successValue=r.successValue||r.acceptorValue,r.failureType=r.failureType||r.acceptorType,r.failurePath=r.failurePath||r.acceptorPath,r.failureValue=r.failureValue||r.acceptorValue}()}})},{"./core":24}],56:[function(t,e,r){(function(e){function r(t){return a.hasOwnProperty(t._asm.currentState)}var n=t("./core"),i=t("./state_machine"),o=n.util.inherit,s=n.util.nodeRequire("domain"),a={success:1,error:1,complete:1},u=new i;u.setupStates=function(){var t=function(t,e){var n=this;n._haltHandlersOnError=!1,n.emit(n._asm.currentState,function(t){if(t)if(r(n)){if(!(s&&n.domain instanceof s.Domain))throw t;t.domainEmitter=n,t.domain=n.domain,t.domainThrown=!1,n.domain.emit("error",t)}else n.response.error=t,e(t);else e(n.response.error)})};this.addState("validate","build","error",t),this.addState("build","afterBuild","restart",t),this.addState("afterBuild","sign","restart",t),this.addState("sign","send","retry",t),this.addState("retry","afterRetry","afterRetry",t),this.addState("afterRetry","sign","error",t),this.addState("send","validateResponse","retry",t),this.addState("validateResponse","extractData","extractError",t),this.addState("extractError","extractData","retry",t),this.addState("extractData","success","retry",t),this.addState("restart","build","error",t),this.addState("success","complete","complete",t),this.addState("error","complete","complete",t),this.addState("complete",null,null,t)},u.setupStates(),n.Request=o({constructor:function(t,e,r){var o=t.endpoint,a=t.config.region,c=t.config.customUserAgent;t.isGlobalEndpoint&&(a="us-east-1"),this.domain=s&&s.active,this.service=t,this.operation=e,this.params=r||{},this.httpRequest=new n.HttpRequest(o,a,c),this.startTime=n.util.date.getDate(),this.response=new n.Response(this),this._asm=new i(u.states,"validate"),this._haltHandlersOnError=!1,n.SequentialExecutor.call(this),this.emit=this.emitEvent},send:function(t){return t&&this.on("complete",function(e){t.call(e,e.error,e.data)}),this.runTo(),this.response},build:function(t){return this.runTo("send",t)},runTo:function(t,e){return this._asm.runTo(t,e,this),this},abort:function(){return this.removeAllListeners("validateResponse"),this.removeAllListeners("extractError"),this.on("validateResponse",function(t){t.error=n.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1})}),this.httpRequest.stream&&(this.httpRequest.stream.abort(),this.httpRequest._abortCallback?this.httpRequest._abortCallback():this.removeAllListeners("send")),this},eachPage:function(t){function e(r){t.call(r,r.error,r.data,function(i){i!==!1&&(r.hasNextPage()?r.nextPage().on("complete",e).send():t.call(r,null,null,n.util.fn.noop))})}t=n.util.fn.makeAsync(t,3),this.on("complete",e).send()},eachItem:function(t){function e(e,i){if(e)return t(e,null);if(null===i)return t(null,null);var o=r.service.paginationConfig(r.operation),s=o.resultKey;Array.isArray(s)&&(s=s[0]);var a=n.util.jamespath.query(s,i);n.util.arrayEach(a,function(e){n.util.arrayEach(e,function(e){t(null,e)})})}var r=this;this.eachPage(e)},isPageable:function(){return this.service.paginationConfig(this.operation)?!0:!1},createReadStream:function(){var t=n.util.nodeRequire("stream"),r=this,i=null;return 2===n.HttpClient.streamsApiVersion?(i=new t.PassThrough,r.send()):(i=new t.Stream,i.readable=!0,i.sent=!1,i.on("newListener",function(t){i.sent||"data"!==t||(i.sent=!0,e.nextTick(function(){r.send()}))})),this.on("httpHeaders",function(t,e,o){if(300>t){r.removeListener("httpData",n.EventListeners.Core.HTTP_DATA),r.removeListener("httpError",n.EventListeners.Core.HTTP_ERROR),r.on("httpError",function(t){o.error=t,o.error.retryable=!1});var s=o.httpResponse.createUnbufferedStream();2===n.HttpClient.streamsApiVersion?s.pipe(i):(s.on("data",function(t){i.emit("data",t)}),s.on("end",function(){i.emit("end")})),s.on("error",function(t){i.emit("error",t)})}}),this.on("error",function(t){i.emit("error",t)}),i},emitEvent:function(t,e,r){"function"==typeof e&&(r=e,e=null),r||(r=function(){}),e||(e=this.eventParameters(t,this.response));var i=n.SequentialExecutor.prototype.emit;i.call(this,t,e,function(t){t&&(this.response.error=t),r.call(this,t)})},eventParameters:function(t){switch(t){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(t,e){return e||"function"!=typeof t||(e=t,t=null),(new n.Signers.Presign).sign(this.toGet(),t,e)},toUnauthenticated:function(){return this.removeListener("validate",n.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",n.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(t){t.httpRequest.method="GET",t.httpRequest.path=t.service.endpoint.path+"?"+t.httpRequest.body,t.httpRequest.body="",delete t.httpRequest.headers["Content-Length"],delete t.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),n.util.mixin(n.Request,n.SequentialExecutor)}).call(this,t("_process"))},{"./core":24,"./state_machine":83,_process:13}],83:[function(t,e,r){function n(t,e){this.currentState=e||null,this.states=t||{}}n.prototype.runTo=function(t,e,r,n){"function"==typeof t&&(n=r,r=e,e=t,t=null);var i=this,o=i.states[i.currentState];o.fn.call(r||i,n,function(n){if(n){if(!o.fail)return e?e.call(r,n):null;i.currentState=o.fail}else{if(!o.accept)return e?e.call(r):null;i.currentState=o.accept}return i.currentState===t?e?e.call(r,n):null:void i.runTo(t,e,r,n)})},n.prototype.addState=function(t,e,r,n){return"function"==typeof e?(n=e,e=null,r=null):"function"==typeof r&&(n=r,r=null),this.currentState||(this.currentState=t),this.states[t]={accept:e,fail:r,fn:n},this},e.exports=n},{}],47:[function(t,e,r){var n=t("./core");n.ParamValidator=n.util.inherit({constructor:function(t){(t===!0||void 0===t)&&(t={min:!0}),this.validation=t},validate:function(t,e,r){if(this.errors=[],this.validateMember(t,e||{},r||"params"),this.errors.length>1){var i=this.errors.join("\n* ");throw i="There were "+this.errors.length+" validation errors:\n* "+i,n.util.error(new Error(i),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(t,e){this.errors.push(n.util.error(new Error(e),{code:t}))},validateStructure:function(t,e,r){this.validateType(e,r,["object"],"structure");for(var n,i=0;t.required&&i<t.required.length;i++){n=t.required[i];var o=e[n];(void 0===o||null===o)&&this.fail("MissingRequiredParameter","Missing required key '"+n+"' in "+r)}for(n in e)if(e.hasOwnProperty(n)){var s=e[n],a=t.members[n];if(void 0!==a){var u=[r,n].join(".");this.validateMember(a,s,u)}else this.fail("UnexpectedParameter","Unexpected key '"+n+"' found in "+r)}return!0},validateMember:function(t,e,r){switch(t.type){case"structure":return this.validateStructure(t,e,r);case"list":return this.validateList(t,e,r);case"map":return this.validateMap(t,e,r);default:return this.validateScalar(t,e,r)}},validateList:function(t,e,r){if(this.validateType(e,r,[Array])){this.validateRange(t,e.length,r,"list member count");for(var n=0;n<e.length;n++)this.validateMember(t.member,e[n],r+"["+n+"]")}},validateMap:function(t,e,r){if(this.validateType(e,r,["object"],"map")){var n=0;for(var i in e)e.hasOwnProperty(i)&&(this.validateMember(t.key,i,r+"[key='"+i+"']"),this.validateMember(t.value,e[i],r+"['"+i+"']"),n++);this.validateRange(t,n,r,"map member count")}},validateScalar:function(t,e,r){switch(t.type){case null:case void 0:case"string":return this.validateString(t,e,r);case"base64":case"binary":return this.validatePayload(e,r);case"integer":case"float":return this.validateNumber(t,e,r);case"boolean":return this.validateType(e,r,["boolean"]);case"timestamp":return this.validateType(e,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 "+t.type+" for "+r)}},validateString:function(t,e,r){this.validateType(e,r,["string"])&&(this.validateEnum(t,e,r),this.validateRange(t,e.length,r,"string length"),this.validatePattern(t,e,r))},validatePattern:function(t,e,r){this.validation.pattern&&void 0!==t.pattern&&(new RegExp(t.pattern).test(e)||this.fail("PatternMatchError",'Provided value "'+e+'" does not match regex pattern /'+t.pattern+"/ for "+r))},validateRange:function(t,e,r,n){this.validation.min&&void 0!==t.min&&e<t.min&&this.fail("MinRangeError","Expected "+n+" >= "+t.min+", but found "+e+" for "+r),this.validation.max&&void 0!==t.max&&e>t.max&&this.fail("MaxRangeError","Expected "+n+" <= "+t.max+", but found "+e+" for "+r)},validateEnum:function(t,e,r){this.validation["enum"]&&void 0!==t["enum"]&&-1===t["enum"].indexOf(e)&&this.fail("EnumError","Found string value of "+e+", but expected "+t["enum"].join("|")+" for "+r)},validateType:function(t,e,r,i){if(null===t||void 0===t)return!1;for(var o=!1,s=0;s<r.length;s++){if("string"==typeof r[s]){if(typeof t===r[s])return!0}else if(r[s]instanceof RegExp){if((t||"").toString().match(r[s]))return!0}else{if(t instanceof r[s])return!0;if(n.util.isType(t,r[s]))return!0;i||o||(r=r.slice()),r[s]=n.util.typeName(r[s])}o=!0}var a=i;a||(a=r.join(", ").replace(/,([^,]+)$/,", or$1"));var u=a.match(/^[aeiou]/i)?"n":"";return this.fail("InvalidParameterType","Expected "+e+" to be a"+u+" "+a),!1},validateNumber:function(t,e,r){if(null!==e&&void 0!==e){if("string"==typeof e){var n=parseFloat(e);n.toString()===e&&(e=n)}this.validateType(e,r,["number"])&&this.validateRange(t,e,r,"numeric value")}},validatePayload:function(t,e){if(null!==t&&void 0!==t&&"string"!=typeof t&&(!t||"number"!=typeof t.byteLength)){if(n.util.isNode()){var r=n.util.nodeRequire("stream").Stream;if(n.util.Buffer.isBuffer(t)||t instanceof r)return}var i=["Buffer","Stream","File","Blob","ArrayBuffer","DataView"];if(t)for(var o=0;o<i.length;o++){if(n.util.isType(t,i[o]))return;if(n.util.typeName(t.constructor)===i[o])return}this.fail("InvalidParameterType","Expected "+e+" to be a string, Buffer, Stream, Blob, or typed array object")}}})},{"./core":24}],41:[function(t,e,r){function n(t,e){t=t||{},e=e||{},e.api=this,t.metadata=t.metadata||{},l(this,"isApi",!0,!1),l(this,"apiVersion",t.metadata.apiVersion),l(this,"endpointPrefix",t.metadata.endpointPrefix),l(this,"signingName",t.metadata.signingName),l(this,"globalEndpoint",t.metadata.globalEndpoint),l(this,"signatureVersion",t.metadata.signatureVersion),l(this,"jsonVersion",t.metadata.jsonVersion),l(this,"targetPrefix",t.metadata.targetPrefix),l(this,"protocol",t.metadata.protocol),l(this,"timestampFormat",t.metadata.timestampFormat),l(this,"xmlNamespaceUri",t.metadata.xmlNamespace),l(this,"abbreviation",t.metadata.serviceAbbreviation),l(this,"fullName",t.metadata.serviceFullName),h(this,"className",function(){var e=t.metadata.serviceAbbreviation||t.metadata.serviceFullName;return e?(e=e.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g,""),"ElasticLoadBalancing"===e&&(e="ELB"),e):null}),l(this,"operations",new i(t.operations,e,function(t,r){return new o(t,r,e)},c.string.lowerFirst)),l(this,"shapes",new i(t.shapes,e,function(t,r){return s.create(r,e)})),l(this,"paginators",new i(t.paginators,e,function(t,r){return new a(t,r,e)})),l(this,"waiters",new i(t.waiters,e,function(t,r){return new u(t,r,e)},c.string.lowerFirst)),e.documentation&&(l(this,"documentation",t.documentation),l(this,"documentationUrl",t.documentationUrl))}var i=t("./collection"),o=t("./operation"),s=t("./shape"),a=t("./paginator"),u=t("./resource_waiter"),c=t("../util"),l=c.property,h=c.memoizedProperty;e.exports=n},{"../util":84,"./collection":42,"./operation":43,"./paginator":44,"./resource_waiter":45,"./shape":46}],45:[function(t,e,r){function n(t,e,r){function n(){o(this,"name",t),o(this,"api",r.api,!1),e.operation&&o(this,"operation",i.string.lowerFirst(e.operation));var n=this,s={ignoreErrors:"ignore_errors",successType:"success_type",successValue:"success_value",successPath:"success_path",acceptorType:"acceptor_type",acceptorValue:"acceptor_value",acceptorPath:"acceptor_path",failureType:"failure_type",failureValue:"failure_value",failurePath:"success_path",interval:"interval",maxAttempts:"max_attempts"};Object.keys(s).forEach(function(t){var r=e[s[t]];r&&o(n,t,r)})}if(r=r||{},r.api){var s=null;e["extends"]?s=r.api.waiters[e["extends"]]:"__default__"!==t&&(s=r.api.waiters.__default__),s&&(n.prototype=s)}return new n}var i=t("../util"),o=i.property;e.exports=n},{"../util":84}],44:[function(t,e,r){function n(t,e){i(this,"inputToken",e.input_token),i(this,"limitKey",e.limit_key),i(this,"moreResults",e.more_results),i(this,"outputToken",e.output_token),i(this,"resultKey",e.result_key)}var i=t("../util").property;e.exports=n},{"../util":84}],43:[function(t,e,r){function n(t,e,r){r=r||{},s(this,"name",e.name||t),s(this,"api",r.api,!1),e.http=e.http||{},s(this,"httpMethod",e.http.method||"POST"),s(this,"httpPath",e.http.requestUri||"/"),a(this,"input",function(){return e.input?i.create(e.input,r):new i.create({type:"structure"},r)}),a(this,"output",function(){return e.output?i.create(e.output,r):new i.create({type:"structure"},r)}),a(this,"errors",function(){var t=[];if(!e.errors)return null;for(var n=0;n<e.errors.length;n++)t.push(i.create(e.errors[n],r));return t}),a(this,"paginator",function(){return r.api.paginators[t]}),r.documentation&&(s(this,"documentation",e.documentation),s(this,"documentationUrl",e.documentationUrl))}var i=t("./shape"),o=t("../util"),s=o.property,a=o.memoizedProperty;e.exports=n},{"../util":84,"./shape":46}],37:[function(t,e,r){var n=t("./core"),i=n.util.inherit;n.Endpoint=i({constructor:function(t,e){if(n.util.hideProperties(this,["slashes","auth","hash","search","query"]),"undefined"==typeof t||null===t)throw new Error("Invalid endpoint: "+t);if("string"!=typeof t)return n.util.copy(t);if(!t.match(/^http/)){var r=e&&void 0!==e.sslEnabled?e.sslEnabled:n.config.sslEnabled;t=(r?"https":"http")+"://"+t}n.util.update(this,n.util.urlParse(t)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),n.HttpRequest=i({constructor:function(t,e,r){t=new n.Endpoint(t),this.method="POST",this.path=t.path||"/",this.headers={},this.body="",this.endpoint=t,this.region=e,this.setUserAgent(r)},setUserAgent:function(t){var e=n.util.isBrowser()?"X-Amz-":"",r="";"string"==typeof t&&t&&(r+=" "+t),this.headers[e+"User-Agent"]=n.util.userAgent()+r},pathname:function(){return this.path.split("?",1)[0]},search:function(){var t=this.path.split("?",2)[1];return t?(t=n.util.queryStringParse(t),n.util.queryParamsToString(t)):""}}),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":24}],36:[function(t,e,r){var n=t("./core"),i=t("./sequential_executor");n.EventListeners={Core:{}},n.EventListeners={Core:(new i).addNamedListeners(function(t,e){e("VALIDATE_CREDENTIALS","validate",function(t,e){return t.service.api.signatureVersion?void t.service.config.getCredentials(function(r){r&&(t.response.error=n.util.error(r,{code:"CredentialsError",message:"Missing credentials in config"})),e()}):e()}),t("VALIDATE_REGION","validate",function(t){t.service.config.region||t.service.isGlobalEndpoint||(t.response.error=n.util.error(new Error,{code:"ConfigError",message:"Missing region in config"}))}),t("VALIDATE_PARAMETERS","validate",function(t){var e=t.service.api.operations[t.operation].input,r=t.service.config.paramValidation;new n.ParamValidator(r).validate(e,t.params)}),e("COMPUTE_SHA256","afterBuild",function(t,e){if(t.haltHandlersOnError(),!t.service.api.signatureVersion)return e();if(t.service.getSignerClass(t)===n.Signers.V4){var r=t.httpRequest.body||"";n.util.computeSha256(r,function(r,n){r?e(r):(t.httpRequest.headers["X-Amz-Content-Sha256"]=n,e())})}else e()}),t("SET_CONTENT_LENGTH","afterBuild",function(t){if(void 0===t.httpRequest.headers["Content-Length"]){var e=n.util.string.byteLength(t.httpRequest.body);t.httpRequest.headers["Content-Length"]=e}}),t("SET_HTTP_HOST","afterBuild",function(t){t.httpRequest.headers.Host=t.httpRequest.endpoint.host}),t("RESTART","restart",function(){var t=this.response.error;t&&t.retryable&&(this.httpRequest=new n.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount<this.service.config.maxRetries?this.response.retryCount++:this.response.error=null)}),e("SIGN","sign",function(t,e){return t.service.api.signatureVersion?void t.service.config.getCredentials(function(r,i){if(r)return t.response.error=r,e();try{var o=n.util.date.getDate(),s=t.service.getSignerClass(t),a=new s(t.httpRequest,t.service.api.signingName||t.service.api.endpointPrefix,t.service.config.signatureCache);delete t.httpRequest.headers.Authorization,delete t.httpRequest.headers.Date,delete t.httpRequest.headers["X-Amz-Date"],a.addAuthorization(i,o),t.signedAt=o}catch(u){t.response.error=u}e()}):e()}),t("VALIDATE_RESPONSE","validateResponse",function(t){this.service.successfulResponse(t,this)?(t.data={},t.error=null):(t.data=null,t.error=n.util.error(new Error,{code:"UnknownError",message:"An unknown error occurred."}))}),e("SEND","send",function(t,e){function r(r){t.httpResponse.stream=r,r.on("headers",function(e,i){t.request.emit("httpHeaders",[e,i,t]),t.httpResponse.streaming||(2===n.HttpClient.streamsApiVersion?r.on("readable",function(){var e=r.read();null!==e&&t.request.emit("httpData",[e,t])}):r.on("data",function(e){t.request.emit("httpData",[e,t])}))}),r.on("end",function(){t.request.emit("httpDone"),e()})}function i(e){e.on("sendProgress",function(e){t.request.emit("httpUploadProgress",[e,t])}),e.on("receiveProgress",function(e){t.request.emit("httpDownloadProgress",[e,t])})}function o(r){t.error=n.util.error(r,{code:"NetworkingError",region:t.request.httpRequest.region,hostname:t.request.httpRequest.endpoint.hostname,retryable:!0}),t.request.emit("httpError",[t.error,t],function(){e()})}function s(){var e=n.HttpClient.getInstance(),s=t.request.service.config.httpOptions||{};try{var a=e.handleRequest(t.request.httpRequest,s,r,o);i(a)}catch(u){o(u)}}t.httpResponse._abortCallback=e,t.error=null,t.data=null;var a=(n.util.date.getDate()-this.signedAt)/1e3;a>=600?this.emit("sign",[this],function(t){t?e(t):s()}):s()}),t("HTTP_HEADERS","httpHeaders",function(t,e,r){r.httpResponse.statusCode=t,r.httpResponse.headers=e,r.httpResponse.body=new n.util.Buffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0;var i=e.date||e.Date;if(i){var o=Date.parse(i);r.request.service.config.correctClockSkew&&n.util.isClockSkewed(o)&&n.util.applyClockOffset(o)}}),t("HTTP_DATA","httpData",function(t,e){if(t){if(n.util.isNode()){e.httpResponse.numBytes+=t.length;var r=e.httpResponse.headers["content-length"],i={loaded:e.httpResponse.numBytes,total:r};e.request.emit("httpDownloadProgress",[i,e])}e.httpResponse.buffers.push(new n.util.Buffer(t))}}),t("HTTP_DONE","httpDone",function(t){if(t.httpResponse.buffers&&t.httpResponse.buffers.length>0){var e=n.util.buffer.concat(t.httpResponse.buffers);t.httpResponse.body=e}delete t.httpResponse.numBytes,delete t.httpResponse.buffers}),t("FINALIZE_ERROR","retry",function(t){t.httpResponse.statusCode&&(t.error.statusCode=t.httpResponse.statusCode,void 0===t.error.retryable&&(t.error.retryable=this.service.retryableError(t.error,this)))}),t("INVALIDATE_CREDENTIALS","retry",function(t){if(t.error)switch(t.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":t.error.retryable=!0,t.request.service.config.credentials.expired=!0}}),t("EXPIRED_SIGNATURE","retry",function(t){var e=t.error;e&&"string"==typeof e.code&&"string"==typeof e.message&&e.code.match(/Signature/)&&e.message.match(/expired/)&&(t.error.retryable=!0)}),t("CLOCK_SKEWED","retry",function(t){t.error&&this.service.clockSkewError(t.error)&&this.service.config.correctClockSkew&&n.config.isClockSkewed&&(t.error.retryable=!0)}),t("REDIRECT","retry",function(t){t.error&&t.error.statusCode>=300&&t.error.statusCode<400&&t.httpResponse.headers.location&&(this.httpRequest.endpoint=new n.Endpoint(t.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,t.error.redirect=!0,t.error.retryable=!0)}),t("RETRY_CHECK","retry",function(t){t.error&&(t.error.redirect&&t.redirectCount<t.maxRedirects?t.error.retryDelay=0:t.retryCount<t.maxRetries&&(t.error.retryDelay=this.service.retryDelays(t.retryCount)||0))}),e("RESET_RETRY_STATE","afterRetry",function(t,e){var r,n=!1;t.error&&(r=t.error.retryDelay||0,t.error.retryable&&t.retryCount<t.maxRetries?(t.retryCount++,n=!0):t.error.redirect&&t.redirectCount<t.maxRedirects&&(t.redirectCount++,n=!0)),n?(t.error=null,setTimeout(e,r)):e()})}),CorePost:(new i).addNamedListeners(function(t){t("EXTRACT_REQUEST_ID","extractData",n.util.extractRequestId),t("EXTRACT_REQUEST_ID","extractError",n.util.extractRequestId),t("ENOTFOUND_ERROR","httpError",function(t){if("NetworkingError"===t.code&&"ENOTFOUND"===t.errno){var e="Inaccessible host: `"+t.hostname+"'. This service may not be available in the `"+t.region+"' region.";this.response.error=n.util.error(new Error(e),{code:"UnknownEndpoint",region:t.region,hostname:t.hostname,retryable:!0,originalError:t})}})}),Logger:(new i).addNamedListeners(function(e){e("LOG_REQUEST","complete",function(e){function r(){var r=n.util.date.getDate().getTime(),s=(r-i.startTime.getTime())/1e3,a=o.isTTY?!0:!1,u=e.httpResponse.statusCode,c=t("util").inspect(i.params,!0,null),l="";return a&&(l+=""),l+="[AWS "+i.service.serviceIdentifier+" "+u,l+=" "+s.toString()+"s "+e.retryCount+" retries]",a&&(l+=""),l+=" "+n.util.string.lowerFirst(i.operation),l+="("+c+")",a&&(l+=""),l}var i=e.request,o=i.service.config.logger;if(o){var s=r();"function"==typeof o.log?o.log(s):"function"==typeof o.write&&o.write(s+"\n")}})}),Json:(new i).addNamedListeners(function(e){var r=t("./protocol/json");e("BUILD","build",r.buildRequest),e("EXTRACT_DATA","extractData",r.extractData),e("EXTRACT_ERROR","extractError",r.extractError)}),Rest:(new i).addNamedListeners(function(e){var r=t("./protocol/rest");e("BUILD","build",r.buildRequest),e("EXTRACT_DATA","extractData",r.extractData),e("EXTRACT_ERROR","extractError",r.extractError)}),RestJson:(new i).addNamedListeners(function(e){var r=t("./protocol/rest_json");e("BUILD","build",r.buildRequest),e("EXTRACT_DATA","extractData",r.extractData),e("EXTRACT_ERROR","extractError",r.extractError)}),RestXml:(new i).addNamedListeners(function(e){var r=t("./protocol/rest_xml");e("BUILD","build",r.buildRequest),e("EXTRACT_DATA","extractData",r.extractData),e("EXTRACT_ERROR","extractError",r.extractError)}),Query:(new i).addNamedListeners(function(e){var r=t("./protocol/query");e("BUILD","build",r.buildRequest),e("EXTRACT_DATA","extractData",r.extractData),e("EXTRACT_ERROR","extractError",r.extractError)})}},{"./core":24,"./protocol/json":48,"./protocol/query":49,"./protocol/rest":50,"./protocol/rest_json":51,"./protocol/rest_xml":52,"./sequential_executor":60,util:20}],60:[function(t,e,r){var n=t("./core");n.SequentialExecutor=n.util.inherit({constructor:function(){this._events={}},listeners:function(t){return this._events[t]?this._events[t].slice(0):[]},on:function(t,e){return this._events[t]?this._events[t].push(e):this._events[t]=[e],this},onAsync:function(t,e){return e._isAsync=!0,this.on(t,e)},removeListener:function(t,e){var r=this._events[t];if(r){for(var n=r.length,i=-1,o=0;n>o;++o)r[o]===e&&(i=o);i>-1&&r.splice(i,1)}return this},removeAllListeners:function(t){return t?delete this._events[t]:this._events={},this},emit:function(t,e,r){r||(r=function(){});var n=this.listeners(t),i=n.length;return this.callListeners(n,e,r),i>0},callListeners:function(t,e,r,i){function o(i){return i&&(a=n.util.error(a||new Error,i),s._haltHandlersOnError)?r.call(s,a):void s.callListeners(t,e,r,a)}for(var s=this,a=i||null;t.length>0;){var u=t.shift();if(u._isAsync)return void u.apply(s,e.concat([o]));try{u.apply(s,e)}catch(c){a=n.util.error(a||new Error,c)}if(a&&s._haltHandlersOnError)return void r.call(s,a)}r.call(s,a)},addListeners:function(t){var e=this;return t._events&&(t=t._events),n.util.each(t,function(t,r){"function"==typeof r&&(r=[r]),n.util.arrayEach(r,function(r){e.on(t,r)})}),e},addNamedListener:function(t,e,r){return this[t]=r,this.addListener(e,r),this},addNamedAsyncListener:function(t,e,r){return r._isAsync=!0,this.addNamedListener(t,e,r)},addNamedListeners:function(t){var e=this;return t(function(){e.addNamedListener.apply(e,arguments)},function(){e.addNamedAsyncListener.apply(e,arguments)}),this}}),n.SequentialExecutor.prototype.addListener=n.SequentialExecutor.prototype.on,e.exports=n.SequentialExecutor},{"./core":24}],52:[function(t,e,r){function n(t){var e=t.service.api.operations[t.operation].input,r=new a.XML.Builder,n=t.params,i=e.payload;if(i){var o=e.members[i];if(n=n[i],void 0===n)return;if("structure"===o.type){var s=o.name;t.httpRequest.body=r.toXML(n,o,s,!0)}else t.httpRequest.body=n}else t.httpRequest.body=r.toXML(n,e,e.name||e.shape||u.string.upperFirst(t.operation)+"Request")}function i(t){c.buildRequest(t),["GET","HEAD"].indexOf(t.httpRequest.method)<0&&n(t)}function o(t){c.extractError(t);var e=(new a.XML.Parser).parse(t.httpResponse.body.toString());e.Errors&&(e=e.Errors),e.Error&&(e=e.Error),e.Code?t.error=u.error(new Error,{code:e.Code,message:e.Message}):t.error=u.error(new Error,{code:t.httpResponse.statusCode,message:null})}function s(t){c.extractData(t);var e,r=t.request,n=t.httpResponse.body,i=r.service.api.operations[r.operation],o=i.output,s=o.payload;if(s){var l=o.members[s];l.isStreaming?t.data[s]=n:"structure"===l.type?(e=new a.XML.Parser,t.data[s]=e.parse(n.toString(),l)):t.data[s]=n.toString()}else if(n.length>0){e=new a.XML.Parser;var h=e.parse(n.toString(),o);u.update(t.data,h)}}var a=t("../core"),u=t("../util"),c=t("./rest");e.exports={buildRequest:i,extractError:o,extractData:s}},{"../core":24,"../util":84,"./rest":50}],51:[function(t,e,r){function n(t){var e=new l,r=t.service.api.operations[t.operation].input;if(r.payload){var n={},i=r.members[r.payload];if(n=t.params[r.payload],void 0===n)return;"structure"===i.type?t.httpRequest.body=e.build(n,i):t.httpRequest.body=n}else t.httpRequest.body=e.build(t.params,r)}function i(t){u.buildRequest(t),["GET","HEAD","DELETE"].indexOf(t.httpRequest.method)<0&&n(t)}function o(t){c.extractError(t)}function s(t){u.extractData(t);var e=t.request,r=e.service.api.operations[e.operation].output||{};if(r.payload){var n=r.members[r.payload],i=t.httpResponse.body;if(n.isStreaming)t.data[r.payload]=i;else if("structure"===n.type||"list"===n.type){var o=new h;t.data[r.payload]=o.parse(i,n)}else t.data[r.payload]=i.toString()}else{var s=t.data;c.extractData(t),t.data=a.merge(s,t.data)}}var a=t("../util"),u=t("./rest"),c=t("./json"),l=t("../json/builder"),h=t("../json/parser");e.exports={buildRequest:i,extractError:o,extractData:s}},{"../json/builder":39,"../json/parser":40,"../util":84,"./json":48,"./rest":50
11}],50:[function(t,e,r){function n(t){t.httpRequest.method=t.service.api.operations[t.operation].httpMethod}function i(t){var e=t.service.api.operations[t.operation],r=e.input,n=[t.httpRequest.endpoint.path,e.httpPath].join("/");n=n.replace(/\/+/g,"/");var i={},o=!1;if(c.each(r.members,function(e,r){var s=t.params[e];if(null!==s&&void 0!==s)if("uri"===r.location){var a=new RegExp("\\{"+r.name+"(\\+)?\\}");n=n.replace(a,function(t,e){var r=e?c.uriEscapePath:c.uriEscape;return r(String(s))})}else"querystring"===r.location&&(o=!0,"list"===r.type?i[r.name]=s.map(function(t){return c.uriEscape(String(t))}):"map"===r.type?c.each(s,function(t,e){Array.isArray(e)?i[t]=e.map(function(t){return c.uriEscape(String(t))}):i[t]=c.uriEscape(String(e))}):i[r.name]=c.uriEscape(String(s)))}),o){n+=n.indexOf("?")>=0?"&":"?";var s=[];c.arrayEach(Object.keys(i).sort(),function(t){Array.isArray(i[t])||(i[t]=[i[t]]);for(var e=0;e<i[t].length;e++)s.push(c.uriEscape(String(t))+"="+i[t][e])}),n+=s.join("&")}t.httpRequest.path=n}function o(t){var e=t.service.api.operations[t.operation];c.each(e.input.members,function(e,r){var n=t.params[e];null!==n&&void 0!==n&&("headers"===r.location&&"map"===r.type?c.each(n,function(e,n){t.httpRequest.headers[r.name+e]=n}):"header"===r.location&&(n=r.toWireFormat(n).toString(),t.httpRequest.headers[r.name]=n))})}function s(t){n(t),i(t),o(t)}function a(){}function u(t){var e=t.request,r={},n=t.httpResponse,i=e.service.api.operations[e.operation],o=i.output,s={};c.each(n.headers,function(t,e){s[t.toLowerCase()]=e}),c.each(o.members,function(t,e){var i=(e.name||t).toLowerCase();if("headers"===e.location&&"map"===e.type){r[t]={};var o=e.isLocationName?e.name:"",a=new RegExp("^"+o+"(.+)","i");c.each(n.headers,function(e,n){var i=e.match(a);null!==i&&(r[t][i[1]]=n)})}else"header"===e.location?void 0!==s[i]&&(r[t]=s[i]):"statusCode"===e.location&&(r[t]=parseInt(n.statusCode,10))}),t.data=r}var c=t("../util");e.exports={buildRequest:s,extractError:a,extractData:u}},{"../util":84}],49:[function(t,e,r){function n(t){var e=t.service.api.operations[t.operation],r=t.httpRequest;r.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",r.params={Version:t.service.api.apiVersion,Action:e.name};var n=new u;n.serialize(t.params,e.input,function(t,e){r.params[t]=e}),r.body=a.queryParamsToString(r.params)}function i(t){var e,r=t.httpResponse.body.toString();e=r.match("<UnknownOperationException")?{Code:"UnknownOperation",Message:"Unknown operation "+t.request.operation}:(new s.XML.Parser).parse(r),e.requestId&&!t.requestId&&(t.requestId=e.requestId),e.Errors&&(e=e.Errors),e.Error&&(e=e.Error),e.Code?t.error=a.error(new Error,{code:e.Code,message:e.Message}):t.error=a.error(new Error,{code:t.httpResponse.statusCode,message:null})}function o(t){var e=t.request,r=e.service.api.operations[e.operation],n=r.output||{},i=n;if(i.resultWrapper){var o=c.create({type:"structure"});o.members[i.resultWrapper]=n,o.memberNames=[i.resultWrapper],a.property(n,"name",n.resultWrapper),n=o}var u=new s.XML.Parser;if(n&&n.members&&!n.members._XAMZRequestId){var l=c.create({type:"string"},{api:{protocol:"query"}},"requestId");n.members._XAMZRequestId=l}var h=u.parse(t.httpResponse.body.toString(),n);t.requestId=h._XAMZRequestId||h.requestId,h._XAMZRequestId&&delete h._XAMZRequestId,i.resultWrapper&&h[i.resultWrapper]&&(a.update(h,h[i.resultWrapper]),delete h[i.resultWrapper]),t.data=h}var s=t("../core"),a=t("../util"),u=t("../query/query_param_serializer"),c=t("../model/shape");e.exports={buildRequest:n,extractError:i,extractData:o}},{"../core":24,"../model/shape":46,"../query/query_param_serializer":53,"../util":84}],53:[function(t,e,r){function n(){}function i(t){return t.isQueryName||"ec2"!==t.api.protocol?t.name:t.name[0].toUpperCase()+t.name.substr(1)}function o(t,e,r,n){c.each(r.members,function(r,o){var s=e[r];if(null!==s&&void 0!==s){var a=i(o);a=t?t+"."+a:a,u(a,s,o,n)}})}function s(t,e,r,n){var i=1;c.each(e,function(e,o){var s=r.flattened?".":".entry.",a=s+i++ +".",c=a+(r.key.name||"key"),l=a+(r.value.name||"value");u(t+c,e,r.key,n),u(t+l,o,r.value,n)})}function a(t,e,r,n){var o=r.member||{};return 0===e.length?void n.call(this,t,null):void c.arrayEach(e,function(e,s){var a="."+(s+1);if("ec2"===r.api.protocol)a+="";else if(r.flattened){if(o.name){var c=t.split(".");c.pop(),c.push(i(o)),t=c.join(".")}}else a=".member"+a;u(t+a,e,o,n)})}function u(t,e,r,n){null!==e&&void 0!==e&&("structure"===r.type?o(t,e,r,n):"list"===r.type?a(t,e,r,n):"map"===r.type?s(t,e,r,n):n(t,r.toWireFormat(e).toString()))}var c=t("../util");n.prototype.serialize=function(t,e,r){o("",t,e,r)},e.exports=n},{"../util":84}],46:[function(t,e,r){function n(t,e,r){null!==r&&void 0!==r&&v.property.apply(this,arguments)}function i(t,e){t.constructor.prototype[e]||v.memoizedProperty.apply(this,arguments)}function o(t,e,r){e=e||{},n(this,"shape",t.shape),n(this,"api",e.api,!1),n(this,"type",t.type),n(this,"enum",t["enum"]),n(this,"min",t.min),n(this,"max",t.max),n(this,"pattern",t.pattern),n(this,"location",t.location||this.location||"body"),n(this,"name",this.name||t.xmlName||t.queryName||t.locationName||r),n(this,"isStreaming",t.streaming||this.isStreaming||!1),n(this,"isComposite",t.isComposite||!1),n(this,"isShape",!0,!1),n(this,"isQueryName",t.queryName?!0:!1,!1),n(this,"isLocationName",t.locationName?!0:!1,!1),e.documentation&&(n(this,"documentation",t.documentation),n(this,"documentationUrl",t.documentationUrl)),t.xmlAttribute&&n(this,"isXmlAttribute",t.xmlAttribute||!1),n(this,"defaultValue",null),this.toWireFormat=function(t){return null===t||void 0===t?"":t},this.toType=function(t){return t}}function s(t){o.apply(this,arguments),n(this,"isComposite",!0),t.flattened&&n(this,"flattened",t.flattened||!1)}function a(t,e){var r=null,a=!this.isShape;s.apply(this,arguments),a&&(n(this,"defaultValue",function(){return{}}),n(this,"members",{}),n(this,"memberNames",[]),n(this,"required",[]),n(this,"isRequired",function(){return!1})),t.members&&(n(this,"members",new m(t.members,e,function(t,r){return o.create(r,e,t)})),i(this,"memberNames",function(){return t.xmlOrder||Object.keys(t.members)})),t.required&&(n(this,"required",t.required),n(this,"isRequired",function(e){if(!r){r={};for(var n=0;n<t.required.length;n++)r[t.required[n]]=!0}return r[e]},!1,!0)),n(this,"resultWrapper",t.resultWrapper||null),t.payload&&n(this,"payload",t.payload),"string"==typeof t.xmlNamespace?n(this,"xmlNamespaceUri",t.xmlNamespace):"object"==typeof t.xmlNamespace&&(n(this,"xmlNamespacePrefix",t.xmlNamespace.prefix),n(this,"xmlNamespaceUri",t.xmlNamespace.uri))}function u(t,e){var r=this,a=!this.isShape;if(s.apply(this,arguments),a&&n(this,"defaultValue",function(){return[]}),t.member&&i(this,"member",function(){return o.create(t.member,e)}),this.flattened){var u=this.name;i(this,"name",function(){return r.member.name||u})}}function c(t,e){var r=!this.isShape;s.apply(this,arguments),r&&(n(this,"defaultValue",function(){return{}}),n(this,"key",o.create({type:"string"},e)),n(this,"value",o.create({type:"string"},e))),t.key&&i(this,"key",function(){return o.create(t.key,e)}),t.value&&i(this,"value",function(){return o.create(t.value,e)})}function l(t){var e=this;if(o.apply(this,arguments),"header"===this.location)n(this,"timestampFormat","rfc822");else if(t.timestampFormat)n(this,"timestampFormat",t.timestampFormat);else if(this.api)if(this.api.timestampFormat)n(this,"timestampFormat",this.api.timestampFormat);else switch(this.api.protocol){case"json":case"rest-json":n(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":n(this,"timestampFormat","iso8601")}this.toType=function(t){return null===t||void 0===t?null:"function"==typeof t.toUTCString?t:"string"==typeof t||"number"==typeof t?v.date.parseTimestamp(t):null},this.toWireFormat=function(t){return v.date.format(t,e.timestampFormat)}}function h(){if(o.apply(this,arguments),this.api)switch(this.api.protocol){case"rest-xml":case"query":case"ec2":this.toType=function(t){return t||""}}}function p(){o.apply(this,arguments),this.toType=function(t){return null===t||void 0===t?null:parseFloat(t)},this.toWireFormat=this.toType}function f(){o.apply(this,arguments),this.toType=function(t){return null===t||void 0===t?null:parseInt(t,10)},this.toWireFormat=this.toType}function d(){o.apply(this,arguments),this.toType=v.base64.decode,this.toWireFormat=v.base64.encode}function y(){d.apply(this,arguments)}function g(){o.apply(this,arguments),this.toType=function(t){return"boolean"==typeof t?t:null===t||void 0===t?null:"true"===t}}var m=t("./collection"),v=t("../util");o.normalizedTypes={character:"string","double":"float","long":"integer","short":"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},o.types={structure:a,list:u,map:c,"boolean":g,timestamp:l,"float":p,integer:f,string:h,base64:y,binary:d},o.resolve=function(t,e){if(t.shape){var r=e.api.shapes[t.shape];if(!r)throw new Error("Cannot find shape reference: "+t.shape);return r}return null},o.create=function(t,e,r){if(t.isShape)return t;var n=o.resolve(t,e);if(n){var i=Object.keys(t);if(e.documentation||(i=i.filter(function(t){return!t.match(/documentation/)})),i===["shape"])return n;var s=function(){n.constructor.call(this,t,e,r)};return s.prototype=n,new s}t.type||(t.members?t.type="structure":t.member?t.type="list":t.key?t.type="map":t.type="string");var a=t.type;if(o.normalizedTypes[t.type]&&(t.type=o.normalizedTypes[t.type]),o.types[t.type])return new o.types[t.type](t,e,r);throw new Error("Unrecognized shape type: "+a)},o.shapes={StructureShape:a,ListShape:u,MapShape:c,StringShape:h,BooleanShape:g,Base64Shape:y},e.exports=o},{"../util":84,"./collection":42}],42:[function(t,e,r){function n(t,e,r,n){o(this,n(t),function(){return r(t,e)})}function i(t,e,r,i){i=i||String;var o=this;for(var s in t)t.hasOwnProperty(s)&&n.call(o,s,t[s],r,i)}var o=t("../util").memoizedProperty;e.exports=i},{"../util":84}],48:[function(t,e,r){function n(t){var e=t.httpRequest,r=t.service.api,n=r.targetPrefix+"."+r.operations[t.operation].name,i=r.jsonVersion||"1.0",o=r.operations[t.operation].input,s=new a;1===i&&(i="1.0"),e.body=s.build(t.params||{},o),e.headers["Content-Type"]="application/x-amz-json-"+i,e.headers["X-Amz-Target"]=n}function i(t){var e={},r=t.httpResponse;if(e.code=r.headers["x-amzn-errortype"]||"UnknownError","string"==typeof e.code&&(e.code=e.code.split(":")[0]),r.body.length>0){var n=JSON.parse(r.body.toString());(n.__type||n.code)&&(e.code=(n.__type||n.code).split("#").pop()),"RequestEntityTooLarge"===e.code?e.message="Request body must be less than 1 MB":e.message=n.message||n.Message||null}else e.statusCode=r.statusCode,e.message=r.statusCode.toString();t.error=s.error(new Error,e)}function o(t){var e=t.httpResponse.body.toString()||"{}";if(t.request.service.config.convertResponseTypes===!1)t.data=JSON.parse(e);else{var r=t.request.service.api.operations[t.request.operation],n=r.output||{},i=new u;t.data=i.parse(e,n)}}var s=t("../util"),a=t("../json/builder"),u=t("../json/parser");e.exports={buildRequest:n,extractError:i,extractData:o}},{"../json/builder":39,"../json/parser":40,"../util":84}],40:[function(t,e,r){function n(){}function i(t,e){if(!e||void 0===t)return void 0;switch(e.type){case"structure":return o(t,e);case"map":return a(t,e);case"list":return s(t,e);default:return u(t,e)}}function o(t,e){if(null==t)return void 0;var r={},n=e.members;return c.each(n,function(e,n){var o=n.isLocationName?n.name:e;if(t.hasOwnProperty(o)){var s=t[o],a=i(s,n);void 0!==a&&(r[e]=a)}}),r}function s(t,e){if(null==t)return void 0;var r=[];return c.arrayEach(t,function(t){var n=i(t,e.member);void 0===n?r.push(null):r.push(n)}),r}function a(t,e){if(null==t)return void 0;var r={};return c.each(t,function(t,n){var o=i(n,e.value);void 0===o?r[t]=null:r[t]=o}),r}function u(t,e){return e.toType(t)}var c=t("../util");n.prototype.parse=function(t,e){return i(JSON.parse(t),e)},e.exports=n},{"../util":84}],39:[function(t,e,r){function n(){}function i(t,e){if(!e||void 0===t||null===t)return void 0;switch(e.type){case"structure":return o(t,e);case"map":return a(t,e);case"list":return s(t,e);default:return u(t,e)}}function o(t,e){var r={};return c.each(t,function(t,n){var o=e.members[t];if(o){if("body"!==o.location)return;var s=o.isLocationName?o.name:t,a=i(n,o);void 0!==a&&(r[s]=a)}}),r}function s(t,e){var r=[];return c.arrayEach(t,function(t){var n=i(t,e.member);void 0!==n&&r.push(n)}),r}function a(t,e){var r={};return c.each(t,function(t,n){var o=i(n,e.value);void 0!==o&&(r[t]=o)}),r}function u(t,e){return e.toWireFormat(t)}var c=t("../util");n.prototype.build=function(t,e){return JSON.stringify(i(t,e))},e.exports=n},{"../util":84}],84:[function(t,e,r){(function(r){var n,i=t("crypto"),o=t("buffer").Buffer,s={engine:function(){return s.isBrowser()&&"undefined"!=typeof navigator?navigator.userAgent:r.platform+"/"+r.version},userAgent:function(){var e=s.isBrowser()?"js":"nodejs",r="aws-sdk-"+e+"/"+t("./core").VERSION;return"nodejs"===e&&(r+=" "+s.engine()),r},isBrowser:function(){return r&&r.browser},isNode:function(){return!s.isBrowser()},nodeRequire:function(e){return s.isNode()?t(e):void 0},multiRequire:function(e,r){return t(s.isNode()?e:r)},uriEscape:function(t){var e=encodeURIComponent(t);return e=e.replace(/[^A-Za-z0-9_.~\-%]+/g,escape),e=e.replace(/[*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})},uriEscapePath:function(t){var e=[];return s.arrayEach(t.split("/"),function(t){e.push(s.uriEscape(t))}),e.join("/")},urlParse:function(e){return t("url").parse(e)},urlFormat:function(e){return t("url").format(e)},queryStringParse:function(e){return t("querystring").parse(e)},queryParamsToString:function(t){var e=[],r=s.uriEscape,n=Object.keys(t).sort();return s.arrayEach(n,function(n){var i=t[n],o=r(n),a=o+"=";if(Array.isArray(i)){var u=[];s.arrayEach(i,function(t){u.push(r(t))}),a=o+"="+u.sort().join("&"+o+"=")}else void 0!==i&&null!==i&&(a=o+"="+r(i));e.push(a)}),e.join("&")},readFileSync:function(t){return"undefined"!=typeof window?null:s.nodeRequire("fs").readFileSync(t,"utf-8")},base64:{encode:function(t){return new o(t).toString("base64")},decode:function(t){return new o(t,"base64")}},Buffer:o,buffer:{toStream:function(t){s.Buffer.isBuffer(t)||(t=new s.Buffer(t));var e=new(s.nodeRequire("stream").Readable),r=0;return e._read=function(n){if(r>=t.length)return e.push(null);var i=r+n;i>t.length&&(i=t.length),e.push(t.slice(r,i)),r=i},e},concat:function(t){var e,r=0,n=0,i=null;for(e=0;e<t.length;e++)r+=t[e].length;for(i=new o(r),e=0;e<t.length;e++)t[e].copy(i,n),n+=t[e].length;return i}},string:{byteLength:function(t){if(null===t||void 0===t)return 0;if("string"==typeof t&&(t=new o(t)),"number"==typeof t.byteLength)return t.byteLength;if("number"==typeof t.length)return t.length;if("number"==typeof t.size)return t.size;if("string"==typeof t.path)return s.nodeRequire("fs").lstatSync(t.path).size;throw s.error(new Error("Cannot determine length of "+t),{object:t})},upperFirst:function(t){return t[0].toUpperCase()+t.substr(1)},lowerFirst:function(t){return t[0].toLowerCase()+t.substr(1)}},ini:{parse:function(t){var e,r={};return s.arrayEach(t.split(/\r?\n/),function(t){t=t.split(/(^|\s);/)[0];var n=t.match(/^\s*\[([^\[\]]+)\]\s*$/);if(n)e=n[1];else if(e){var i=t.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/);i&&(r[e]=r[e]||{},r[e][i[1]]=i[2])}}),r}},fn:{noop:function(){},makeAsync:function(t,e){return e&&e<=t.length?t:function(){var e=Array.prototype.slice.call(arguments,0),r=e.pop(),n=t.apply(null,e);r(n)}}},jamespath:{query:function(t,e){if(!e)return[];var r=[],n=t.split(/\s+\|\|\s+/);return s.arrayEach.call(this,n,function(t){var n=[e],i=t.split(".");return s.arrayEach.call(this,i,function(t){var e=t.match("^(.+?)(?:\\[(-?\\d+|\\*|)\\])?$"),r=[];return s.arrayEach.call(this,n,function(t){"*"===e[1]?s.arrayEach.call(this,t,function(t){r.push(t)}):t.hasOwnProperty(e[1])&&r.push(t[e[1]])}),n=r,void 0!==e[2]&&(r=[],s.arrayEach.call(this,n,function(t){if(Array.isArray(t))if("*"===e[2]||""===e[2])r=r.concat(t);else{var n=parseInt(e[2],10);0>n&&(n=t.length+n),r.push(t[n])}}),n=r),0===n.length?s.abort:void 0}),n.length>0?(r=n,s.abort):void 0}),r},find:function(t,e){return s.jamespath.query(t,e)[0]}},date:{getDate:function(){return n||(n=t("./core")),n.config.systemClockOffset?new Date((new Date).getTime()+n.config.systemClockOffset):new Date},iso8601:function(t){return void 0===t&&(t=s.date.getDate()),t.toISOString().replace(/\.\d{3}Z$/,"Z")},rfc822:function(t){return void 0===t&&(t=s.date.getDate()),t.toUTCString()},unixTimestamp:function(t){return void 0===t&&(t=s.date.getDate()),t.getTime()/1e3},from:function(t){return"number"==typeof t?new Date(1e3*t):new Date(t)},format:function(t,e){return e||(e="iso8601"),s.date[e](s.date.from(t))},parseTimestamp:function(t){if("number"==typeof t)return new Date(1e3*t);if(t.match(/^\d+$/))return new Date(1e3*t);if(t.match(/^\d{4}/))return new Date(t);if(t.match(/^\w{3},/))return new Date(t);throw s.error(new Error("unhandled timestamp format: "+t),{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(t){var e=s.crypto.crc32Table,r=-1;"string"==typeof t&&(t=new o(t));for(var n=0;n<t.length;n++){var i=t.readUInt8(n);r=r>>>8^e[255&(r^i)]}return(-1^r)>>>0},hmac:function(t,e,r,n){return r||(r="binary"),"buffer"===r&&(r=void 0),n||(n="sha256"),"string"==typeof e&&(e=new o(e)),i.createHmac(n,t).update(e).digest(r)},md5:function(t,e,r){return s.crypto.hash("md5",t,e,r)},sha256:function(t,e,r){return s.crypto.hash("sha256",t,e,r)},hash:function(t,e,r,n){var i=s.crypto.createHash(t);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof e&&(e=new o(e));var a=s.arraySliceFn(e),u=o.isBuffer(e);if(s.isBrowser()&&"undefined"!=typeof ArrayBuffer&&e&&e.buffer instanceof ArrayBuffer&&(u=!0),n&&"object"==typeof e&&"function"==typeof e.on&&!u)e.on("data",function(t){i.update(t)}),e.on("error",function(t){n(t)}),e.on("end",function(){n(null,i.digest(r))});else{if(!n||!a||u||"undefined"==typeof FileReader){s.isBrowser()&&"object"==typeof e&&!u&&(e=new o(new Uint8Array(e)));var c=i.update(e).digest(r);return n&&n(null,c),c}var l=0,h=524288,p=new FileReader;p.onerror=function(){n(new Error("Failed to read data."))},p.onload=function(){var t=new o(new Uint8Array(p.result));i.update(t),l+=t.length,p._continueReading()},p._continueReading=function(){if(l>=e.size)return void n(null,i.digest(r));var t=l+h;t>e.size&&(t=e.size),p.readAsArrayBuffer(a.call(e,l,t))},p._continueReading()}},toHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push(("0"+t.charCodeAt(r).toString(16)).substr(-2,2));return e.join("")},createHash:function(t){return i.createHash(t)}},abort:{},each:function(t,e){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=e.call(this,r,t[r]);if(n===s.abort)break}},arrayEach:function(t,e){for(var r in t)if(t.hasOwnProperty(r)){var n=e.call(this,t[r],parseInt(r,10));if(n===s.abort)break}},update:function(t,e){return s.each(e,function(e,r){t[e]=r}),t},merge:function(t,e){return s.update(s.copy(t),e)},copy:function(t){if(null===t||void 0===t)return t;var e={};for(var r in t)e[r]=t[r];return e},isEmpty:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},arraySliceFn:function(t){var e=t.slice||t.webkitSlice||t.mozSlice;return"function"==typeof e?e:null},isType:function(t,e){return"function"==typeof e&&(e=s.typeName(e)),Object.prototype.toString.call(t)==="[object "+e+"]"},typeName:function(t){if(t.hasOwnProperty("name"))return t.name;var e=t.toString(),r=e.match(/^\s*function (.+)\(/);return r?r[1]:e},error:function(t,e){var r=null;return"string"==typeof t.message&&""!==t.message&&("string"==typeof e||e&&e.message)&&(r=s.copy(t),r.message=t.message),t.message=t.message||null,"string"==typeof e?t.message=e:"object"==typeof e&&null!==e&&(s.update(t,e),e.message&&(t.message=e.message),(e.code||e.name)&&(t.code=e.code||e.name),e.stack&&(t.stack=e.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(t,"name",{writable:!0,enumerable:!1}),Object.defineProperty(t,"message",{enumerable:!0})),t.name=e&&e.name||t.name||t.code||"Error",t.time=new Date,r&&(t.originalError=r),t},inherit:function(t,e){var r=null;if(void 0===e)e=t,t=Object,r={};else{var n=function(){};n.prototype=t.prototype,r=new n}return e.constructor===Object&&(e.constructor=function(){return t!==Object?t.apply(this,arguments):void 0}),e.constructor.prototype=r,s.update(e.constructor.prototype,e),e.constructor.__super__=t,e.constructor},mixin:function(){for(var t=arguments[0],e=1;e<arguments.length;e++)for(var r in arguments[e].prototype){var n=arguments[e].prototype[r];"constructor"!==r&&(t.prototype[r]=n)}return t},hideProperties:function(t,e){"function"==typeof Object.defineProperty&&s.arrayEach(e,function(e){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0})})},property:function(t,e,r,n,i){var o={configurable:!0,enumerable:void 0!==n?n:!0};"function"!=typeof r||i?(o.value=r,o.writable=!0):o.get=r,Object.defineProperty(t,e,o)},memoizedProperty:function(t,e,r,n){var i=null;s.property(t,e,function(){return null===i&&(i=r()),i},n)},hoistPayloadMember:function(t){var e=t.request,r=e.operation,n=e.service.api.operations[r].output;if(n.payload){var i=n.members[n.payload],o=t.data[n.payload];"structure"===i.type&&s.each(o,function(e,r){s.property(t.data,e,r,!1)})}},computeSha256:function(t,e){if(s.isNode()){var r=s.nodeRequire("stream").Stream,n=s.nodeRequire("fs");if(t instanceof r){if("string"!=typeof t.path)return e(new Error("Non-file stream objects are not supported with SigV4"));t=n.createReadStream(t.path)}}s.crypto.sha256(t,"hex",function(t,r){t?e(t):e(null,r)})},isClockSkewed:function(t){return t?(s.property(n.config,"isClockSkewed",Math.abs((new Date).getTime()-t)>=3e5,!1),n.config.isClockSkewed):void 0},applyClockOffset:function(t){t&&(n.config.systemClockOffset=t-(new Date).getTime())},extractRequestId:function(t){var e=t.httpResponse.headers["x-amz-request-id"]||t.httpResponse.headers["x-amzn-requestid"];!e&&t.data&&t.data.ResponseMetadata&&(e=t.data.ResponseMetadata.RequestId),e&&(t.requestId=e),t.error&&(t.error.requestId=e)}};e.exports=s}).call(this,t("_process"))},{"./core":24,_process:13,buffer:1,crypto:6,querystring:17,url:18}],30:[function(t,e,r){var n=t("../core");n.WebIdentityCredentials=n.util.inherit(n.Credentials,{constructor:function(t){n.Credentials.call(this),this.expired=!0,this.params=t,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null},refresh:function(t){var e=this;e.createClients(),t||(t=function(t){if(t)throw t}),e.service.assumeRoleWithWebIdentity(function(r,n){e.data=null,r||(e.data=n,e.service.credentialsFrom(n,e)),t(r)})},createClients:function(){this.service=this.service||new n.STS({params:this.params})}})},{"../core":24}],29:[function(t,e,r){var n=t("../core");n.TemporaryCredentials=n.util.inherit(n.Credentials,{constructor:function(t){n.Credentials.call(this),this.loadMasterCredentials(),this.expired=!0,this.params=t||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(t){var e=this;e.createClients(),t||(t=function(t){if(t)throw t}),e.service.config.credentials=e.masterCredentials;var r=e.params.RoleArn?e.service.assumeRole:e.service.getSessionToken;r.call(e.service,function(r,n){r||e.service.credentialsFrom(n,e),t(r)})},loadMasterCredentials:function(){for(this.masterCredentials=n.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials},createClients:function(){this.service=this.service||new n.STS({params:this.params})}})},{"../core":24}],28:[function(t,e,r){var n=t("../core");n.SAMLCredentials=n.util.inherit(n.Credentials,{constructor:function(t){n.Credentials.call(this),this.expired=!0,this.params=t},refresh:function(t){var e=this;e.createClients(),t||(t=function(t){if(t)throw t}),e.service.assumeRoleWithSAML(function(r,n){r||e.service.credentialsFrom(n,e),t(r)})},createClients:function(){this.service=this.service||new n.STS({params:this.params})}})},{"../core":24}],26:[function(t,e,r){var n=t("../core");n.CognitoIdentityCredentials=n.util.inherit(n.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(t){n.Credentials.call(this),this.expired=!0,this.params=t,this.data=null,this.identityId=null,this.loadCachedId()},refresh:function(t){var e=this;e.createClients(),e.data=null,e.identityId=null,e.getId(function(r){r?(e.clearCachedId(),t(r)):e.params.RoleArn?e.getCredentialsFromSTS(t):e.getCredentialsForIdentity(t)})},clearCachedId:function(){this.identityId=null,delete this.params.IdentityId;var t=this.params.IdentityPoolId,e=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+t+e],delete this.storage[this.localStorageKey.providers+t+e]},getId:function(t){var e=this;return"string"==typeof e.params.IdentityId?t(null,e.params.IdentityId):void e.cognito.getId(function(r,n){!r&&n.IdentityId?(e.params.IdentityId=n.IdentityId,t(null,n.IdentityId)):t(r)})},loadCredentials:function(t,e){t&&e&&(e.expired=!1,e.accessKeyId=t.Credentials.AccessKeyId,e.secretAccessKey=t.Credentials.SecretKey,e.sessionToken=t.Credentials.SessionToken,e.expireTime=t.Credentials.Expiration)},getCredentialsForIdentity:function(t){var e=this;e.cognito.getCredentialsForIdentity(function(r,n){r?e.clearCachedId():(e.cacheId(n),e.data=n,e.loadCredentials(e.data,e)),t(r)})},getCredentialsFromSTS:function(t){var e=this;e.cognito.getOpenIdToken(function(r,n){r?(e.clearCachedId(),t(r)):(e.cacheId(n),e.params.WebIdentityToken=n.Token,e.webIdentityCredentials.refresh(function(r){r?e.clearCachedId():(e.data=e.webIdentityCredentials.data,e.sts.credentialsFrom(e.data,e)),t(r)}))})},loadCachedId:function(){var t=this;if(n.util.isBrowser()&&!t.params.IdentityId){var e=t.getStorage("id");if(e&&t.params.Logins){var r=Object.keys(t.params.Logins),i=(t.getStorage("providers")||"").split(","),o=i.filter(function(t){return-1!==r.indexOf(t)});0!==o.length&&(t.params.IdentityId=e)}else e&&(t.params.IdentityId=e)}},createClients:function(){this.webIdentityCredentials=this.webIdentityCredentials||new n.WebIdentityCredentials(this.params),this.cognito=this.cognito||new n.CognitoIdentity({params:this.params}),this.sts=this.sts||new n.STS},cacheId:function(t){this.identityId=t.IdentityId,this.params.IdentityId=this.identityId,n.util.isBrowser()&&(this.setStorage("id",t.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(t){return this.storage[this.localStorageKey[t]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(t,e){try{this.storage[this.localStorageKey[t]+this.params.IdentityPoolId+(this.params.LoginId||"")]=e}catch(r){}},storage:function(){try{return n.util.isBrowser()&&null!==window.localStorage&&"object"==typeof window.localStorage?window.localStorage:{}}catch(t){return{}}}()})},{"../core":24}],23:[function(t,e,r){var n=t("./core");t("./credentials"),t("./credentials/credential_provider_chain"),n.Config=n.util.inherit({constructor:function(t){void 0===t&&(t={}),t=this.extractCredentials(t),n.util.each.call(this,this.keys,function(e,r){this.set(e,t[e],r)})},getCredentials:function(t){function e(e){t(e,e?null:s.credentials)}function r(t,e){return new n.util.error(e||new Error,{code:"CredentialsError",message:t})}function i(){s.credentials.get(function(t){if(t){var n="Could not load credentials from "+s.credentials.constructor.name;t=r(n,t)}e(t)})}function o(){var t=null;s.credentials.accessKeyId&&s.credentials.secretAccessKey||(t=r("Missing credentials")),e(t)}var s=this;s.credentials?"function"==typeof s.credentials.get?i():o():s.credentialProvider?s.credentialProvider.resolve(function(t,n){t&&(t=r("Could not load credentials from any providers",t)),s.credentials=n,e(t)}):e(r("No credentials to load"))},update:function(t,e){e=e||!1,t=this.extractCredentials(t),n.util.each.call(this,t,function(t,r){(e||this.keys.hasOwnProperty(t)||n.Service.hasService(t))&&this.set(t,r)})},loadFromPath:function(t){this.clear();var e=JSON.parse(n.util.readFileSync(t)),r=new n.FileSystemCredentials(t),i=new n.CredentialProviderChain;return i.providers.unshift(r),i.resolve(function(t,r){if(t)throw t;e.credentials=r}),this.constructor(e),this},clear:function(){n.util.each.call(this,this.keys,function(t){delete this[t]}),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(t,e,r){void 0===e?(void 0===r&&(r=this.keys[t]),"function"==typeof r?this[t]=r.call(this):this[t]=r):"httpOptions"===t&&this[t]?this[t]=n.util.merge(this[t],e):this[t]=e},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,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{base:100}},extractCredentials:function(t){return t.accessKeyId&&t.secretAccessKey&&(t=n.util.copy(t),

Callers 10

s3.jsFile · 0.70
oFunction · 0.70
sFunction · 0.70
aFunction · 0.70
nFunction · 0.70
tFunction · 0.70
uFunction · 0.70
cFunction · 0.70
pFunction · 0.70
fFunction · 0.70

Calls 11

uFunction · 0.70
oFunction · 0.70
sFunction · 0.70
aFunction · 0.70
nFunction · 0.70
rFunction · 0.70
eFunction · 0.70
yFunction · 0.70
EFunction · 0.70
cFunction · 0.70
lFunction · 0.70

Tested by

no test coverage detected