!function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){return i(t[s][1][e]||e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;sthis.expireTime)||this.expired||!this.accessKeyId||!this.secretAccessKey},get:function(e){var t=this;this.needsRefresh()?this.refresh(function(n){n||(t.expired=!1),e&&e(n)}):e&&e()},refresh:function(e){this.expired=!1,e()}})},{"./core":11}],13:[function(e,t,n){var r=e("../core"),i=e("../../clients/cognitoidentity"),o=e("../../clients/sts");r.CognitoIdentityCredentials=r.util.inherit(r.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e){r.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this.identityId=null,this.loadCachedId()},refresh:function(e){var t=this;t.createClients(),t.data=null,t.identityId=null,t.getId(function(n){n?(t.clearIdOnNotAuthorized(n),e(n)):t.params.RoleArn?t.getCredentialsFromSTS(e):t.getCredentialsForIdentity(e)})},clearCachedId:function(){this.identityId=null,delete this.params.IdentityId;var e=this.params.IdentityPoolId,t=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+e+t],delete this.storage[this.localStorageKey.providers+e+t]},clearIdOnNotAuthorized:function(e){"NotAuthorizedException"==e.code&&this.clearCachedId()},getId:function(e){var t=this;return"string"==typeof t.params.IdentityId?e(null,t.params.IdentityId):void t.cognito.getId(function(n,r){!n&&r.IdentityId?(t.params.IdentityId=r.IdentityId,e(null,r.IdentityId)):e(n)})},loadCredentials:function(e,t){e&&t&&(t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration)},getCredentialsForIdentity:function(e){var t=this;t.cognito.getCredentialsForIdentity(function(n,r){n?t.clearIdOnNotAuthorized(n):(t.cacheId(r),t.data=r,t.loadCredentials(t.data,t)),e(n)})},getCredentialsFromSTS:function(e){var t=this;t.cognito.getOpenIdToken(function(n,r){n?(t.clearIdOnNotAuthorized(n),e(n)):(t.cacheId(r),t.params.WebIdentityToken=r.Token,t.webIdentityCredentials.refresh(function(n){n||(t.data=t.webIdentityCredentials.data,t.sts.credentialsFrom(t.data,t)),e(n)}))})},loadCachedId:function(){var e=this;if(r.util.isBrowser()&&!e.params.IdentityId){var t=e.getStorage("id");if(t&&e.params.Logins){var n=Object.keys(e.params.Logins);0!==(e.getStorage("providers")||"").split(",").filter(function(e){return-1!==n.indexOf(e)}).length&&(e.params.IdentityId=t)}else t&&(e.params.IdentityId=t)}},createClients:function(){this.webIdentityCredentials=this.webIdentityCredentials||new r.WebIdentityCredentials(this.params),this.cognito=this.cognito||new i({params:this.params}),this.sts=this.sts||new o},cacheId:function(e){this.identityId=e.IdentityId,this.params.IdentityId=this.identityId,r.util.isBrowser()&&(this.setStorage("id",e.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(e){return this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(e,t){try{this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]=t}catch(e){}},storage:function(){try{return r.util.isBrowser()&&null!==window.localStorage&&"object"==typeof window.localStorage?window.localStorage:{}}catch(e){return{}}}()})},{"../../clients/cognitoidentity":5,"../../clients/sts":6,"../core":11}],14:[function(e,t,n){var r=e("../core");r.CredentialProviderChain=r.util.inherit(r.Credentials,{constructor:function(e){this.providers=e||r.CredentialProviderChain.defaultProviders.slice(0)},resolve:function(e){if(0===this.providers.length)return e(new Error("No providers")),this;var t=0,n=this.providers.slice(0);return function r(i,o){if(!i&&o||t===n.length)e(i,o);else{var s=n[t++];(o="function"==typeof s?s.call():s).get?o.get(function(e){r(e,e?null:o)}):r(null,o)}}(),this}}),r.CredentialProviderChain.defaultProviders=[]},{"../core":11}],15:[function(e,t,n){var r=e("../core"),i=e("../../clients/sts");r.SAMLCredentials=r.util.inherit(r.Credentials,{constructor:function(e){r.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(e){var t=this;t.createClients(),e||(e=function(e){if(e)throw e}),t.service.assumeRoleWithSAML(function(n,r){n||t.service.credentialsFrom(r,t),e(n)})},createClients:function(){this.service=this.service||new i({params:this.params})}})},{"../../clients/sts":6,"../core":11}],16:[function(e,t,n){var r=e("../core"),i=e("../../clients/sts");r.TemporaryCredentials=r.util.inherit(r.Credentials,{constructor:function(e){r.Credentials.call(this),this.loadMasterCredentials(),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(e){var t=this;t.createClients(),e||(e=function(e){if(e)throw e}),t.service.config.credentials=t.masterCredentials,(t.params.RoleArn?t.service.assumeRole:t.service.getSessionToken).call(t.service,function(n,r){n||t.service.credentialsFrom(r,t),e(n)})},loadMasterCredentials:function(){for(this.masterCredentials=r.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials},createClients:function(){this.service=this.service||new i({params:this.params})}})},{"../../clients/sts":6,"../core":11}],17:[function(e,t,n){var r=e("../core"),i=e("../../clients/sts");r.WebIdentityCredentials=r.util.inherit(r.Credentials,{constructor:function(e){r.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null},refresh:function(e){var t=this;t.createClients(),e||(e=function(e){if(e)throw e}),t.service.assumeRoleWithWebIdentity(function(n,r){t.data=null,n||(t.data=r,t.service.credentialsFrom(r,t)),e(n)})},createClients:function(){this.service=this.service||new i({params:this.params})}})},{"../../clients/sts":6,"../core":11}],18:[function(e,t,n){var r=e("./core"),i=e("./sequential_executor");r.EventListeners={Core:{}},r.EventListeners={Core:(new i).addNamedListeners(function(e,t){t("VALIDATE_CREDENTIALS","validate",function(e,t){return e.service.api.signatureVersion?void e.service.config.getCredentials(function(n){n&&(e.response.error=r.util.error(n,{code:"CredentialsError",message:"Missing credentials in config"})),t()}):t()}),e("VALIDATE_REGION","validate",function(e){e.service.config.region||e.service.isGlobalEndpoint||(e.response.error=r.util.error(new Error,{code:"ConfigError",message:"Missing region in config"}))}),e("VALIDATE_PARAMETERS","validate",function(e){var t=e.service.api.operations[e.operation].input;new r.ParamValidator(e.service.config.paramValidation).validate(t,e.params)}),t("COMPUTE_SHA256","afterBuild",function(e,t){if(e.haltHandlersOnError(),!e.service.api.signatureVersion)return t();e.service.getSignerClass(e)===r.Signers.V4?r.util.computeSha256(e.httpRequest.body||"",function(n,r){n?t(n):(e.httpRequest.headers["X-Amz-Content-Sha256"]=r,t())}):t()}),e("SET_CONTENT_LENGTH","afterBuild",function(e){if(void 0===e.httpRequest.headers["Content-Length"]){var t=r.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=t}}),e("SET_HTTP_HOST","afterBuild",function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host}),e("RESTART","restart",function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new r.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount=600?this.emit("sign",[this],function(e){e?t(e):o()}):o()}),e("HTTP_HEADERS","httpHeaders",function(e,t,n){n.httpResponse.statusCode=e,n.httpResponse.headers=t,n.httpResponse.body=new r.util.Buffer(""),n.httpResponse.buffers=[],n.httpResponse.numBytes=0;var i=t.date||t.Date;if(i){var o=Date.parse(i);n.request.service.config.correctClockSkew&&r.util.isClockSkewed(o)&&r.util.applyClockOffset(o)}}),e("HTTP_DATA","httpData",function(e,t){e&&(r.util.isNode()&&(t.httpResponse.numBytes+=e.length,t.request.emit("httpDownloadProgress",[{loaded:t.httpResponse.numBytes,total:t.httpResponse.headers["content-length"]},t])),t.httpResponse.buffers.push(new r.util.Buffer(e)))}),e("HTTP_DONE","httpDone",function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=r.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers}),e("FINALIZE_ERROR","retry",function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))}),e("INVALIDATE_CREDENTIALS","retry",function(e){if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}}),e("EXPIRED_SIGNATURE","retry",function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)}),e("CLOCK_SKEWED","retry",function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&r.config.isClockSkewed&&(e.error.retryable=!0)}),e("REDIRECT","retry",function(e){e.error&&e.error.statusCode>=300&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new r.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,e.error.redirect=!0,e.error.retryable=!0)}),e("RETRY_CHECK","retry",function(e){e.error&&(e.error.redirect&&e.redirectCount=this.HEADERS_RECEIVED&&!p){try{c.responseType="arraybuffer"}catch(e){}u.statusCode=c.status,u.headers=s.parseHeaders(c.getAllResponseHeaders()),u.emit("headers",u.statusCode,u.headers),p=!0}this.readyState===this.DONE&&s.finishRequest(c,u)},!1),c.upload.addEventListener("progress",function(e){u.emit("sendProgress",e)}),c.addEventListener("progress",function(e){u.emit("receiveProgress",e)},!1),c.addEventListener("timeout",function(){o(r.util.error(new Error("Timeout"),{code:"TimeoutError"}))},!1),c.addEventListener("error",function(){o(r.util.error(new Error("Network Failure"),{code:"NetworkingError"}))},!1),n(u),c.open(e.method,l,!1!==t.xhrAsync),r.util.each(e.headers,function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&c.setRequestHeader(e,t)}),t.timeout&&!1!==t.xhrAsync&&(c.timeout=t.timeout),t.xhrWithCredentials&&(c.withCredentials=!0);try{c.send(e.body)}catch(t){if(!e.body||"object"!=typeof e.body.buffer)throw t;c.send(e.body.buffer)}return u},parseHeaders:function(e){var t={};return r.util.arrayEach(e.split(/\r?\n/),function(e){var n=e.split(":",1)[0],r=e.substring(n.length+2);n.length>0&&(t[n.toLowerCase()]=r)}),t},finishRequest:function(e,t){var n;if("arraybuffer"===e.responseType&&e.response){var i=e.response;n=new r.util.Buffer(i.byteLength);for(var o=new Uint8Array(i),s=0;s1){var i=this.errors.join("\n* ");throw i="There were "+this.errors.length+" validation errors:\n* "+i,r.util.error(new Error(i),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(e,t){this.errors.push(r.util.error(new Error(t),{code:e}))},validateStructure:function(e,t,n){this.validateType(t,n,["object"],"structure");for(var r,i=0;e.required&&i= "+e.min+", but found "+t+" for "+n),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+r+" <= "+e.max+", but found "+t+" for "+n)},validateEnum:function(e,t,n){this.validation.enum&&void 0!==e.enum&&-1===e.enum.indexOf(t)&&this.fail("EnumError","Found string value of "+t+", but expected "+e.enum.join("|")+" for "+n)},validateType:function(e,t,n,i){if(null==e)return!1;for(var o=!1,s=0;s0){var i=JSON.parse(n.body.toString());(i.__type||i.code)&&(t.code=(i.__type||i.code).split("#").pop()),t.message="RequestEntityTooLarge"===t.code?"Request body must be less than 1 MB":i.message||i.Message||null}else t.statusCode=n.statusCode,t.message=n.statusCode.toString();e.error=r.error(new Error,t)},extractData:function(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var n=e.request.service.api.operations[e.request.operation].output||{},r=new o;e.data=r.parse(t,n)}}}},{"../json/builder":21,"../json/parser":22,"../util":53}],31:[function(e,t,n){var r=e("../core"),i=e("../util"),o=e("../query/query_param_serializer"),s=e("../model/shape");t.exports={buildRequest:function(e){var t=e.service.api.operations[e.operation],n=e.httpRequest;n.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",n.params={Version:e.service.api.apiVersion,Action:t.name},(new o).serialize(e.params,t.input,function(e,t){n.params[e]=t}),n.body=i.queryParamsToString(n.params)},extractError:function(e){var t,n=e.httpResponse.body.toString();(t=n.match("=0?"&":"?";var a=[];r.arrayEach(Object.keys(o).sort(),function(e){Array.isArray(o[e])||(o[e]=[o[e]]);for(var t=0;t0){var c=(t=new r.XML.Parser).parse(s.toString(),a);i.update(e.data,c)}}}},{"../core":11,"../util":53,"./rest":32}],35:[function(e,t,n){function r(){}function i(e){return e.isQueryName||"ec2"!==e.api.protocol?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function o(e,t,n,r){a.each(n.members,function(n,o){var a=t[n];if(null!=a){var u=i(o);s(u=e?e+"."+u:u,a,o,r)}})}function s(e,t,n,r){null!=t&&("structure"===n.type?o(e,t,n,r):"list"===n.type?function(e,t,n,r){var o=n.member||{};0===t.length?r.call(this,e,null):a.arrayEach(t,function(t,a){var u="."+(a+1);if("ec2"===n.api.protocol)u+="";else if(n.flattened){if(o.name){var l=e.split(".");l.pop(),l.push(i(o)),e=l.join(".")}}else u=".member"+u;s(e+u,t,o,r)})}(e,t,n,r):"map"===n.type?function(e,t,n,r){var i=1;a.each(t,function(t,o){var a=(n.flattened?".":".entry.")+i+++".",u=a+(n.value.name||"value");s(e+(a+(n.key.name||"key")),t,n.key,r),s(e+u,o,n.value,r)})}(e,t,n,r):r(e,n.toWireFormat(t).toString()))}var a=e("../util");r.prototype.serialize=function(e,t,n){o("",e,t,n)},t.exports=r},{"../util":53}],36:[function(e,t,n){function r(e,t){i.each(t,function(t,n){"globalEndpoint"!==t&&(null!=e.config[t]||(e.config[t]=n))})}var i=e("./util"),o=e("./region_config.json");t.exports=function(e){for(var t=function(e){var t=e.config.region,n=function(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}(t),r=e.api.endpointPrefix;return[[t,r],[n,r],[t,"*"],[n,"*"],["*",r],["*","*"]].map(function(e){return e[0]&&e[1]?e.join("/"):null})}(e),n=0;n=0){u=!0;var l=0}var c=function(){u&&l!==a?i.emit("error",n.util.error(new Error("Stream content length mismatch. Received "+l+" of "+a+" bytes."),{code:"StreamContentLengthMismatch"})):2===n.HttpClient.streamsApiVersion?i.end():i.emit("end")},p=s.httpResponse.createUnbufferedStream();if(2===n.HttpClient.streamsApiVersion)if(u){var h=new e.PassThrough;h._write=function(t){return t&&t.length&&(l+=t.length),e.PassThrough.prototype._write.apply(this,arguments)},h.on("end",c),p.pipe(h).pipe(i,{end:!1})}else p.pipe(i);else u&&p.on("data",function(e){e&&e.length&&(l+=e.length)}),p.on("data",function(e){i.emit("data",e)}),p.on("end",c);p.on("error",function(e){u=!1,i.emit("error",e)})}}),this.on("error",function(e){i.emit("error",e)}),i},emitEvent:function(e,t,r){"function"==typeof t&&(r=t,t=null),r||(r=function(){}),t||(t=this.eventParameters(e,this.response)),n.SequentialExecutor.prototype.emit.call(this,e,t,function(e){e&&(this.response.error=e),r.call(this,e)})},eventParameters:function(e){switch(e){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(e,t){return t||"function"!=typeof e||(t=e,e=null),(new n.Signers.Presign).sign(this.toGet(),e,t)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this.removeListener("validate",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(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),n.util.addPromisesToRequests(n.Request),n.util.mixin(n.Request,n.SequentialExecutor)}).call(this,e("FWaASH"))},{"./core":11,"./state_machine":52,FWaASH:62,jmespath:79}],39:[function(e,t,n){function r(e){var t=e.request._waiter,n=!1,r="retry";t.config.acceptors.forEach(function(i){if(!n){var o=t.matchers[i.matcher];o&&o(e,i.expected,i.argument)&&(n=!0,r=i.state)}}),!n&&e.error&&(r="failure"),"success"===r?t.setSuccess(e):t.setError(e,"retry"===r)}var i=e("./core"),o=i.util.inherit,s=e("jmespath");i.ResourceWaiter=o({constructor:function(e,t){this.service=e,this.state=t,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(e,t,n){var r=s.search(e.data,n);return s.strictDeepEqual(r,t)},pathAll:function(e,t,n){var r=s.search(e.data,n);Array.isArray(r)||(r=[r]);var i=r.length;if(!i)return!1;for(var o=0;o-1&&n.splice(i,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,n){n||(n=function(){});var r=this.listeners(e),i=r.length;return this.callListeners(r,t,n),i>0},callListeners:function(e,t,n,i){function o(i){return i&&(a=r.util.error(a||new Error,i),s._haltHandlersOnError)?n.call(s,a):void s.callListeners(e,t,n,a)}for(var s=this,a=i||null;e.length>0;){var u=e.shift();if(u._isAsync)return void u.apply(s,t.concat([o]));try{u.apply(s,t)}catch(e){a=r.util.error(a||new Error,e)}if(a&&s._haltHandlersOnError)return void n.call(s,a)}n.call(s,a)},addListeners:function(e){var t=this;return e._events&&(e=e._events),r.util.each(e,function(e,n){"function"==typeof n&&(n=[n]),r.util.arrayEach(n,function(n){t.on(e,n)})}),t},addNamedListener:function(e,t,n){return this[e]=n,this.addListener(t,n),this},addNamedAsyncListener:function(e,t,n){return n._isAsync=!0,this.addNamedListener(e,t,n)},addNamedListeners:function(e){var t=this;return e(function(){t.addNamedListener.apply(t,arguments)},function(){t.addNamedAsyncListener.apply(t,arguments)}),this}}),r.SequentialExecutor.prototype.addListener=r.SequentialExecutor.prototype.on,t.exports=r.SequentialExecutor},{"./core":11}],42:[function(e,t,n){var r=e("./core"),i=e("./model/api"),o=e("./region_config"),s=r.util.inherit,a=0;r.Service=s({constructor:function(e){if(!this.loadServiceClass)throw r.util.error(new Error,"Service must be constructed with `new' operator");var t=this.loadServiceClass(e||{});if(t){var n=r.util.copy(e),i=new t(e);return Object.defineProperty(i,"_originalConfig",{get:function(){return n},enumerable:!1,configurable:!0}),i._clientId=++a,i}this.initialize(e)},initialize:function(e){var t=r.config[this.serviceIdentifier];this.config=new r.Config(r.config),t&&this.config.update(t,!0),e&&this.config.update(e,!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(e){var t=e;if(r.util.isEmpty(this.api)){if(t.apiConfig)return r.Service.defineServiceApi(this.constructor,t.apiConfig);if(this.constructor.services){(t=new r.Config(r.config)).update(e,!0);var n=t.apiVersions[this.constructor.serviceIdentifier];return this.getLatestServiceClass(n=n||t.apiVersion)}return null}return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&r.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||0===this.constructor.services.length)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(e?r.util.isType(e,Date)&&(e=r.util.date.iso8601(e).split("T")[0]):e="latest",Object.hasOwnProperty(this.constructor.services,e))return e;for(var t=Object.keys(this.constructor.services).sort(),n=null,i=t.length-1;i>=0;i--)if("*"!==t[i][t[i].length-1]&&(n=t[i]),t[i].substr(0,10)<=e)return n;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,makeRequest:function(e,t,n){if("function"==typeof t&&(n=t,t=null),t=t||{},this.config.params){var i=this.api.operations[e];i&&(t=r.util.copy(t),r.util.each(this.config.params,function(e,n){i.input.members[e]&&(null!=t[e]||(t[e]=n))}))}var o=new r.Request(this,e,t);return this.addAllRequestListeners(o),n&&o.send(n),o},makeUnauthenticatedRequest:function(e,t,n){"function"==typeof t&&(n=t,t={});var r=this.makeRequest(e,t).toUnauthenticated();return n?r.send(n):r},waitFor:function(e,t,n){return new r.ResourceWaiter(this,e).wait(t,n)},addAllRequestListeners:function(e){for(var t=[r.events,r.EventListeners.Core,this.serviceInterface(),r.EventListeners.CorePost],n=0;n=500},networkingError:function(e){return"NetworkingError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},throttledError:function(e){switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":return!0;default:return!1}},endpointFromTemplate:function(e){return"string"!=typeof e?e:e.replace(/\{service\}/g,this.api.endpointPrefix).replace(/\{region\}/g,this.config.region).replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new r.Endpoint(e,this.config)},paginationConfig:function(e,t){var n=this.api.operations[e].paginator;if(!n){if(t){var i=new Error;throw r.util.error(i,"No pagination configuration for "+e)}return null}return n}}),r.util.update(r.Service,{defineMethods:function(e){r.util.each(e.prototype.api.operations,function(t){e.prototype[t]||(e.prototype[t]="none"===e.prototype.api.operations[t].authtype?function(e,n){return this.makeUnauthenticatedRequest(t,e,n)}:function(e,n){return this.makeRequest(t,e,n)})})},defineService:function(e,t,n){r.Service._serviceMap[e]=!0,Array.isArray(t)||(n=t,t=[]);var i=s(r.Service,n||{});return"string"==typeof e?(r.Service.addVersions(i,t),i.serviceIdentifier=i.serviceIdentifier||e):(i.prototype.api=e,r.Service.defineMethods(i)),i},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var n=0;n604800)throw o.util.error(new Error,{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV4 signing.",retryable:!1});e.httpRequest.headers[s]=t}else{if(n!==o.Signers.S3)throw o.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});e.httpRequest.headers[s]=parseInt(o.util.date.unixTimestamp()+t,10).toString()}}function i(e){var t=e.httpRequest.endpoint,n=o.util.urlParse(e.httpRequest.path),r={};n.search&&(r=o.util.queryStringParse(n.search.substr(1))),o.util.each(e.httpRequest.headers,function(e,t){e===s&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete r[e],e=e.toLowerCase()),r[e]=t}),delete e.httpRequest.headers[s];var i=r.Authorization.split(" ");if("AWS"===i[0])i=i[1].split(":"),r.AWSAccessKeyId=i[0],r.Signature=i[1];else if("AWS4-HMAC-SHA256"===i[0]){i.shift();var a=i.join(" ").match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];r["X-Amz-Signature"]=a,delete r.Expires}delete r.Authorization,delete r.Host,t.pathname=n.pathname,t.search=o.util.queryParamsToString(r)}var o=e("../core"),s="presigned-expires";o.Signers.Presign=(0,o.util.inherit)({sign:function(e,t,n){if(e.httpRequest.headers[s]=t||3600,e.on("build",r),e.on("sign",i),e.removeListener("afterBuild",o.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",o.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!n){if(e.build(),e.response.error)throw e.response.error;return o.util.urlFormat(e.httpRequest.endpoint)}e.build(function(){this.response.error?n(this.response.error):n(null,o.util.urlFormat(e.httpRequest.endpoint))})}}),t.exports=o.Signers.Presign},{"../core":11}],46:[function(e,t,n){var r=e("../core");r.Signers.RequestSigner=(0,r.util.inherit)({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),r.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return r.Signers.V2;case"v3":return r.Signers.V3;case"v4":return r.Signers.V4;case"s3":return r.Signers.S3;case"v3https":return r.Signers.V3Https}throw new Error("Unknown signing version "+e)},e("./v2"),e("./v3"),e("./v3https"),e("./v4"),e("./s3"),e("./presign")},{"../core":11,"./presign":45,"./s3":47,"./v2":48,"./v3":49,"./v3https":50,"./v4":51}],47:[function(e,t,n){var r=e("../core");r.Signers.S3=(0,r.util.inherit)(r.Signers.RequestSigner,{subResources:{acl:1,accelerate: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(e,t){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=r.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var n=this.sign(e.secretAccessKey,this.stringToSign());this.request.headers.Authorization="AWS "+e.accessKeyId+":"+n},stringToSign:function(){var e=this.request,t=[];t.push(e.method),t.push(e.headers["Content-MD5"]||""),t.push(e.headers["Content-Type"]||""),t.push(e.headers["presigned-expires"]||"");var n=this.canonicalizedAmzHeaders();return n&&t.push(n),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var e=[];r.util.each(this.request.headers,function(t){t.match(/^x-amz-/i)&&e.push(t)}),e.sort(function(e,t){return e.toLowerCase()=0?"&":"?";this.request.path+=o+r.util.queryParamsToString(i)},authorization:function(e,t){var n=[],r=this.credentialString(t);return n.push(this.algorithm+" Credential="+e.accessKeyId+"/"+r),n.push("SignedHeaders="+this.signedHeaders()),n.push("Signature="+this.signature(e,t)),n.join(", ")},signature:function(e,t){var n=null,s=this.serviceName+(this.getServiceClientId()?"_"+this.getServiceClientId():"");this.signatureCache&&((n=i[s])||(o.push(s),o.length>50&&delete i[o.shift()]));var a=t.substr(0,8);if(!n||n.akid!==e.accessKeyId||n.region!==this.request.region||n.date!==a){var u=r.util.crypto.hmac("AWS4"+e.secretAccessKey,a,"buffer"),l=r.util.crypto.hmac(u,this.request.region,"buffer"),c=r.util.crypto.hmac(l,this.serviceName,"buffer"),p=r.util.crypto.hmac(c,"aws4_request","buffer");if(!this.signatureCache)return r.util.crypto.hmac(p,this.stringToSign(t),"hex");i[s]={region:this.request.region,date:a,key:p,akid:e.accessKeyId}}return r.util.crypto.hmac(i[s].key,this.stringToSign(t),"hex")},stringToSign:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")},canonicalString:function(){var e=[],t=this.request.pathname();return"s3"!==this.serviceName&&(t=r.util.uriEscapePath(t)),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")},canonicalHeaders:function(){var e=[];r.util.each.call(this,this.request.headers,function(t,n){e.push([t,n])}),e.sort(function(e,t){return e[0].toLowerCase()=e.length)return t.push(null);var i=n+r;i>e.length&&(i=e.length),t.push(e.slice(n,i)),n=i},t},concat:function(e){var t,n,r=0,o=0;for(t=0;t>>8^t[255&(n^e.readUInt8(r))];return(-1^n)>>>0},hmac:function(e,t,n,r){return n||(n="binary"),"buffer"===n&&(n=void 0),r||(r="sha256"),"string"==typeof t&&(t=new i.Buffer(t)),i.crypto.lib.createHmac(r,e).update(t).digest(n)},md5:function(e,t,n){return i.crypto.hash("md5",e,t,n)},sha256:function(e,t,n){return i.crypto.hash("sha256",e,t,n)},hash:function(e,t,n,r){var o=i.crypto.createHash(e);n||(n="binary"),"buffer"===n&&(n=void 0),"string"==typeof t&&(t=new i.Buffer(t));var s=i.arraySliceFn(t),a=i.Buffer.isBuffer(t);if(i.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(a=!0),r&&"object"==typeof t&&"function"==typeof t.on&&!a)t.on("data",function(e){o.update(e)}),t.on("error",function(e){r(e)}),t.on("end",function(){r(null,o.digest(n))});else{if(!r||!s||a||"undefined"==typeof FileReader){i.isBrowser()&&"object"==typeof t&&!a&&(t=new i.Buffer(new Uint8Array(t)));var u=o.update(t).digest(n);return r&&r(null,u),u}var l=0,c=new FileReader;c.onerror=function(){r(new Error("Failed to read data."))},c.onload=function(){var e=new i.Buffer(new Uint8Array(c.result));o.update(e),l+=e.length,c._continueReading()},c._continueReading=function(){if(l>=t.size)r(null,o.digest(n));else{var e=l+524288;e>t.size&&(e=t.size),c.readAsArrayBuffer(s.call(t,l,e))}},c._continueReading()}},toHex:function(e){for(var t=[],n=0;n=3e5,!1),r.config.isClockSkewed},applyClockOffset:function(e){e&&(r.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromisesToRequests:function(e,t){return(t=t||null)||"undefined"==typeof Promise||(t=Promise),"function"!=typeof t?void delete e.prototype.promise:void(e.prototype.promise=function(){var e=this;return new t(function(t,n){e.on("complete",function(e){e.error?n(e.error):t(e.data)}),e.runTo()})})},isDualstackAvailable:function(t){if(!t)return!1;var n=e("../apis/metadata.json");return"string"!=typeof t&&(t=t.serviceIdentifier),!("string"!=typeof t||!n.hasOwnProperty(t)||!n[t].dualstackAvailable)},calculateRetryDelay:function(e,t){t||(t={});var n=t.customBackoff||null;if("function"==typeof n)return n(e);var r=t.base||100;return Math.random()*(Math.pow(2,e)*r)},handleRequestWithRetries:function(e,t,o){t||(t={});var s=r.HttpClient.getInstance(),a=t.httpOptions||{},u=0,l=function(e){var n=t.maxRetries||0;if(e&&"TimeoutError"===e.code&&(e.retryable=!0),e&&e.retryable&&u=500||429===n});r&&s.retryable&&(s.retryAfter=r),l(s)}})},l)};n.nextTick(c)}};t.exports=i}).call(this,e("FWaASH"))},{"../apis/metadata.json":3,"./core":11,FWaASH:62,fs:56}],54:[function(e,t,n){function r(){}function i(e,t){switch(t||(t={}),t.type){case"structure":return o(e,t);case"map":return function(e,t){for(var n={},r=t.key.name||"key",o=t.value.name||"value",s=t.flattened?t.name:"entry",a=e.firstElementChild;a;){if(a.nodeName===s){var u=a.getElementsByTagName(r)[0].textContent,l=a.getElementsByTagName(o)[0];n[u]=i(l,t.value)}a=a.nextElementSibling}return n}(e,t);case"list":return function(e,t){for(var n=[],r=t.flattened?t.name:t.member.name||"member",o=e.firstElementChild;o;)o.nodeName===r&&n.push(i(o,t.member)),o=o.nextElementSibling;return n}(e,t);case void 0:case null:return function(e){if(null==e)return"";if(!e.firstElementChild)return null===e.parentNode.parentNode?{}:0===e.childNodes.length?"":e.textContent;for(var t={type:"structure",members:{}},n=e.firstElementChild;n;){var r=n.nodeName;Object.prototype.hasOwnProperty.call(t.members,r)?t.members[r].type="list":t.members[r]={name:r},n=n.nextElementSibling}return o(e,t)}(e);default:return function(e,t){if(e.getAttribute){var n=e.getAttribute("encoding");"base64"===n&&(t=new a.create({type:n}))}var r=e.textContent;return""===r&&(r=null),"function"==typeof t.toType?t.toType(r):r}(e,t)}}function o(e,t){var n={};return null===e?n:(s.each(t.members,function(t,r){if(r.isXmlAttribute)Object.prototype.hasOwnProperty.call(e.attributes,r.name)&&(n[t]=i({textContent:e.attributes[r.name].value},r));else{var o=r.flattened?e:e.getElementsByTagName(r.name)[0];o?n[t]=i(o,r):r.flattened||"list"!==r.type||(n[t]=r.defaultValue)}}),n)}var s=e("../util"),a=e("../model/shape");r.prototype.parse=function(e,t){if(""===e.replace(/^\s+/,""))return{};var n,r;try{if(window.DOMParser){try{n=(new DOMParser).parseFromString(e,"text/xml")}catch(e){throw s.error(new Error("Parse error in document"),{originalError:e,code:"XMLParserError",retryable:!0})}if(null===n.documentElement)throw s.error(new Error("Cannot parse empty document."),{code:"XMLParserError",retryable:!0});var o=n.getElementsByTagName("parsererror")[0];if(o&&(o.parentNode===n||"body"===o.parentNode.nodeName||o.parentNode.parentNode===n||"body"===o.parentNode.parentNode.nodeName)){var a=o.getElementsByTagName("div")[0]||o;throw s.error(new Error(a.textContent||"Parser error in document"),{code:"XMLParserError",retryable:!0})}}else{if(!window.ActiveXObject)throw new Error("Cannot load XML parser");if((n=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,!n.loadXML(e))throw s.error(new Error("Parse error in document"),{code:"XMLParserError",retryable:!0})}}catch(e){r=e}if(n&&n.documentElement&&!r){var u=i(n.documentElement,t),l=n.getElementsByTagName("ResponseMetadata")[0];return l&&(u.ResponseMetadata=i(l,{})),u}if(r)throw s.error(r||new Error,{code:"XMLParserError",retryable:!0});return{}},t.exports=r},{"../model/shape":28,"../util":53}],55:[function(e,t,n){function r(){}function i(e,t){var n,r="xmlns";t.xmlNamespaceUri?(n=t.xmlNamespaceUri,t.xmlNamespacePrefix&&(r+=":"+t.xmlNamespacePrefix)):e.isRoot&&t.api.xmlNamespaceUri&&(n=t.api.xmlNamespaceUri),n&&e.att(r,n)}var o=e("../util"),s=e("xmlbuilder");r.prototype.toXML=function(e,t,n,r){var a=s.create(n);return i(a,t),function e(t,n,r){switch(r.type){case"structure":return function(t,n,r){o.arrayEach(r.memberNames,function(o){var s=r.members[o];if("body"===s.location){var a=n[o],u=s.name;if(null!=a)if(s.isXmlAttribute)t.att(u,a);else if(s.flattened)e(t,a,s);else{var l=t.ele(u);i(l,s),e(l,a,s)}}})}(t,n,r);case"map":return function(t,n,r){var i=r.key.name||"key",s=r.value.name||"value";o.each(n,function(n,o){var a=t.ele(r.flattened?r.name:"entry");e(a.ele(i),n,r.key),e(a.ele(s),o,r.value)})}(t,n,r);case"list":return function(t,n,r){o.arrayEach(n,r.flattened?function(n){e(t.ele(r.member.name||r.name),n,r.member)}:function(n){e(t.ele(r.member.name||"member"),n,r.member)})}(t,n,r);default:return function(e,t,n){e.txt(n.toWireFormat(t))}(t,n,r)}}(a,e,t),a.children.length>0||r?a.root().toString():""},t.exports=r},{"../util":53,xmlbuilder:100}],56:[function(e,t,n){},{}],57:[function(e,t,n){function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);var i,o,s,a=typeof e;if("base64"===t&&"string"===a)for(e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e);e.length%4!=0;)e+="=";if("number"===a)i=T(e);else if("string"===a)i=r.byteLength(e,t);else{if("object"!==a)throw new Error("First argument needs to be a number, array or string.");i=T(e.length)}if(r._useTypedArrays?o=r._augment(new Uint8Array(i)):((o=this).length=i,o._isBuffer=!0),r._useTypedArrays&&"number"==typeof e.byteLength)o._set(e);else if(function(e){return x(e)||r.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}(e))for(s=0;so&&(i=o):i=o;var s=t.length;U(s%2==0,"Invalid hex string"),i>s/2&&(i=s/2);for(var a=0;a>8,r.push(t%256),r.push(n);return r}(t),e,n,i)}function l(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i=o))return n?(i=e[t],t+1=o))return n?(t+2>>0)):(t+1>>0),i}function h(e,t,n,r){if(r||(U("boolean"==typeof n,"missing or invalid endian"),U(null!=t,"missing offset"),U(t+1=e.length)){var i=c(e,t,n,!0);return 32768&i?-1*(65535-i+1):i}}function d(e,t,n,r){if(r||(U("boolean"==typeof n,"missing or invalid endian"),U(null!=t,"missing offset"),U(t+3=e.length)){var i=p(e,t,n,!0);return 2147483648&i?-1*(4294967295-i+1):i}}function f(e,t,n,r){return r||(U("boolean"==typeof n,"missing or invalid endian"),U(t+3=o))for(var s=0,a=Math.min(o-n,2);s>>8*(r?s:1-s)}function g(e,t,n,r,i){i||(U(null!=t,"missing value"),U("boolean"==typeof r,"missing or invalid endian"),U(null!=n,"missing offset"),U(n+3=o))for(var s=0,a=Math.min(o-n,4);s>>8*(r?s:3-s)&255}function v(e,t,n,r,i){i||(U(null!=t,"missing value"),U("boolean"==typeof r,"missing or invalid endian"),U(null!=n,"missing offset"),U(n+1=e.length||m(e,t>=0?t:65535+t+1,n,r,i)}function b(e,t,n,r,i){i||(U(null!=t,"missing value"),U("boolean"==typeof r,"missing or invalid endian"),U(null!=n,"missing offset"),U(n+3=e.length||g(e,t>=0?t:4294967295+t+1,n,r,i)}function w(e,t,n,r,i){i||(U(null!=t,"missing value"),U("boolean"==typeof r,"missing or invalid endian"),U(null!=n,"missing offset"),U(n+3=e.length||j.write(e,t,n,r,23,4)}function S(e,t,n,r,i){i||(U(null!=t,"missing value"),U("boolean"==typeof r,"missing or invalid endian"),U(null!=n,"missing offset"),U(n+7=e.length||j.write(e,t,n,r,52,8)}function C(e,t,n){return"number"!=typeof e?n:(e=~~e)>=t?t:e>=0?e:(e+=t)>=0?e:0}function T(e){return(e=~~Math.ceil(+e))<0?0:e}function x(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function A(e){return e<16?"0"+e.toString(16):e.toString(16)}function E(e){for(var t=[],n=0;n=55296&&r<=57343&&n++;for(var o=encodeURIComponent(e.slice(i,n+1)).substr(1).split("%"),s=0;s=t.length||i>=e.length);i++)t[i+n]=e[i];return i}function _(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function D(e,t){U("number"==typeof e,"cannot write a non-number as a number"),U(e>=0,"specified a negative value for writing an unsigned value"),U(e<=t,"value is larger than maximum value for type"),U(Math.floor(e)===e,"value has a fractional component")}function P(e,t,n){U("number"==typeof e,"cannot write a non-number as a number"),U(e<=t,"value larger than maximum allowed value"),U(e>=n,"value smaller than minimum allowed value"),U(Math.floor(e)===e,"value has a fractional component")}function R(e,t,n){U("number"==typeof e,"cannot write a non-number as a number"),U(e<=t,"value larger than maximum allowed value"),U(e>=n,"value smaller than minimum allowed value")}function U(e,t){if(!e)throw new Error(t||"Failed assertion")}var L=e("base64-js"),j=e("ieee754");n.Buffer=r,n.SlowBuffer=r,n.INSPECT_MAX_BYTES=50,r.poolSize=8192,r._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(e){return!1}}(),r.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.isBuffer=function(e){return!(null==e||!e._isBuffer)},r.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case"hex":n=e.length/2;break;case"utf8":case"utf-8":n=E(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=k(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;default:throw new Error("Unknown encoding")}return n},r.concat=function(e,t){if(U(x(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new r(0);if(1===e.length)return e[0];var n;if("number"!=typeof t)for(t=0,n=0;np&&(n=p):n=p,r=String(r||"utf8").toLowerCase()){case"hex":c=i(this,e,t,n);break;case"utf8":case"utf-8":c=o(this,e,t,n);break;case"ascii":c=s(this,e,t,n);break;case"binary":c=function(e,t,n,r){return s(e,t,n,r)}(this,e,t,n);break;case"base64":c=a(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":c=u(this,e,t,n);break;default:throw new Error("Unknown encoding")}return c},r.prototype.toString=function(e,t,n){var r,i=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,(n=void 0!==n?Number(n):n=i.length)===t)return"";switch(e){case"hex":r=function(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o=n,"sourceEnd < sourceStart"),U(t>=0&&t=0&&n=0&&i<=o.length,"sourceEnd out of bounds"),i>this.length&&(i=this.length),e.length-t=this.length))return this[e]},r.prototype.readUInt16LE=function(e,t){return c(this,e,!0,t)},r.prototype.readUInt16BE=function(e,t){return c(this,e,!1,t)},r.prototype.readUInt32LE=function(e,t){return p(this,e,!0,t)},r.prototype.readUInt32BE=function(e,t){return p(this,e,!1,t)},r.prototype.readInt8=function(e,t){if(t||(U(null!=e,"missing offset"),U(e=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){return h(this,e,!0,t)},r.prototype.readInt16BE=function(e,t){return h(this,e,!1,t)},r.prototype.readInt32LE=function(e,t){return d(this,e,!0,t)},r.prototype.readInt32BE=function(e,t){return d(this,e,!1,t)},r.prototype.readFloatLE=function(e,t){return f(this,e,!0,t)},r.prototype.readFloatBE=function(e,t){return f(this,e,!1,t)},r.prototype.readDoubleLE=function(e,t){return y(this,e,!0,t)},r.prototype.readDoubleBE=function(e,t){return y(this,e,!1,t)},r.prototype.writeUInt8=function(e,t,n){n||(U(null!=e,"missing value"),U(null!=t,"missing offset"),U(t=this.length||(this[t]=e)},r.prototype.writeUInt16LE=function(e,t,n){m(this,e,t,!0,n)},r.prototype.writeUInt16BE=function(e,t,n){m(this,e,t,!1,n)},r.prototype.writeUInt32LE=function(e,t,n){g(this,e,t,!0,n)},r.prototype.writeUInt32BE=function(e,t,n){g(this,e,t,!1,n)},r.prototype.writeInt8=function(e,t,n){n||(U(null!=e,"missing value"),U(null!=t,"missing offset"),U(t=this.length||this.writeUInt8(e>=0?e:255+e+1,t,n)},r.prototype.writeInt16LE=function(e,t,n){v(this,e,t,!0,n)},r.prototype.writeInt16BE=function(e,t,n){v(this,e,t,!1,n)},r.prototype.writeInt32LE=function(e,t,n){b(this,e,t,!0,n)},r.prototype.writeInt32BE=function(e,t,n){b(this,e,t,!1,n)},r.prototype.writeFloatLE=function(e,t,n){w(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){w(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){S(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){S(this,e,t,!1,n)},r.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),U("number"==typeof e&&!isNaN(e),"value is not a number"),U(n>=t,"end < start"),n!==t&&0!==this.length){U(t>=0&&t=0&&n<=this.length,"end out of bounds");for(var r=t;r"},r.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(r._useTypedArrays)return new r(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;t0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;u="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,l=new n(3*e.length/4-u),s=u>0?e.length-4:e.length;var p=0;for(i=0,o=0;i>16),r((65280&a)>>8),r(255&a);return 2===u?r(255&(a=t(e.charAt(i))<<2|t(e.charAt(i+1))>>4)):1===u&&(r((a=t(e.charAt(i))<<10|t(e.charAt(i+1))<<4|t(e.charAt(i+2))>>2)>>8&255),r(255&a)),l},e.fromByteArray=function(e){function t(e){return r.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,o,s,a=e.length%3,u="";for(i=0,s=e.length-a;i>2),u+=t(o<<4&63),u+="==";break;case 2:u+=t((o=(e[e.length-2]<<8)+e[e.length-1])>>10),u+=t(o>>4&63),u+=t(o<<2&63),u+="="}return u}}(void 0===n?this.base64js={}:n)},{}],59:[function(e,t,n){n.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,c=-7,p=n?i-1:0,h=n?-1:1,d=e[t+p];for(p+=h,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+e[t+p],p+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+e[t+p],p+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=l}return(d?-1:1)*s*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var s,a,u,l=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,f=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+p>=1?h/u:h*Math.pow(2,1-p))*u>=2&&(s++,u/=2),s+p>=c?(a=0,s=c):s+p>=1?(a=(t*u-1)*Math.pow(2,i),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;e[n+d]=255&a,d+=f,a/=256,i-=8);for(s=s<0;e[n+d]=255&s,d+=f,s/=256,l-=8);e[n+d-f]|=128*y}},{}],60:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(s(n=this._events[e]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,a=new Array(r-1),u=1;u0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,s,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(a=s;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[e]))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){return e._events&&e._events[t]?i(e._events[t])?1:e._events[t].length:0}},{}],61:[function(e,t,n){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],62:[function(e,t,n){function r(){}var i=t.exports={};i.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){var t=e.source;(t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),n.length>0)&&n.shift()()},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),i.title="browser",i.browser=!0,i.env={},i.argv=[],i.on=r,i.addListener=r,i.once=r,i.off=r,i.removeListener=r,i.removeAllListeners=r,i.emit=r,i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],63:[function(e,t,n){(function(e){!function(r){function i(e){throw RangeError(P[e])}function o(e,t){for(var n=e.length;n--;)e[n]=t(e[n]);return e}function s(e,t){return o(e.split(D),t).join(".")}function a(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=L((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+L(e)}).join("")}function l(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:w}function c(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function p(e,t,n){var r=0;for(e=n?U(e/x):e>>1,e+=U(e/t);e>R*C>>1;r+=w)e=U(e/R);return U(r+(R+1)*e/(e+T))}function h(e){var t,n,r,o,s,a,c,h,d,f,y=[],m=e.length,g=0,v=E,T=A;for((n=e.lastIndexOf(k))<0&&(n=0),r=0;r=128&&i("not-basic"),y.push(e.charCodeAt(r));for(o=n>0?n+1:0;o=m&&i("invalid-input"),((h=l(e.charCodeAt(o++)))>=w||h>U((b-g)/a))&&i("overflow"),g+=h*a,!(h<(d=c<=T?S:c>=T+C?C:c-T));c+=w)a>U(b/(f=w-d))&&i("overflow"),a*=f;T=p(g-s,t=y.length+1,0==s),U(g/t)>b-v&&i("overflow"),v+=U(g/t),g%=t,y.splice(g++,0,v)}return u(y)}function d(e){var t,n,r,o,s,u,l,h,d,f,y,m,g,v,T,x=[];for(m=(e=a(e)).length,t=E,n=0,s=A,u=0;u=t&&yU((b-n)/(g=r+1))&&i("overflow"),n+=(l-t)*g,t=l,u=0;ub&&i("overflow"),y==t){for(h=n,d=w;!(h<(f=d<=s?S:d>=s+C?C:d-s));d+=w)x.push(L(c(f+(T=h-f)%(v=w-f),0))),h=U(T/v);x.push(L(c(h,0))),s=p(n,g,r==o),n=0,++r}++n,++t}return x.join("")}var f="object"==typeof n&&n,y="object"==typeof t&&t&&t.exports==f&&t,m="object"==typeof e&&e;m.global!==m&&m.window!==m||(r=m);var g,v,b=2147483647,w=36,S=1,C=26,T=38,x=700,A=72,E=128,k="-",I=/^xn--/,_=/[^ -~]/,D=/\x2E|\u3002|\uFF0E|\uFF61/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=w-S,U=Math.floor,L=String.fromCharCode;if(g={version:"1.2.4",ucs2:{decode:a,encode:u},decode:h,encode:d,toASCII:function(e){return s(e,function(e){return _.test(e)?"xn--"+d(e):e})},toUnicode:function(e){return s(e,function(e){return I.test(e)?h(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(f&&!f.nodeType)if(y)y.exports=g;else for(v in g)g.hasOwnProperty(v)&&(f[v]=g[v]);else r.punycode=g}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],64:[function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,o){n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t=t||"&");var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=e.length;u>0&&l>u&&(l=u);for(var c=0;c=0?(p=y.substr(0,m),h=y.substr(m+1)):(p=y,h=""),d=decodeURIComponent(p),f=decodeURIComponent(h),r(s,d)?i(s[d])?s[d].push(f):s[d]=[s[d],f]:s[d]=f}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],65:[function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?function(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(t)?r.showHidden=t:t&&n._extend(r,t),m(r.showHidden)&&(r.showHidden=!1),m(r.depth)&&(r.depth=2),m(r.colors)&&(r.colors=!1),m(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),a(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"\x1b["+i.colors[n][0]+"m"+e+"\x1b["+i.colors[n][1]+"m":e}function s(e,t){return e}function a(e,t,r){if(e.customInspect&&t&&S(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return y(i)||(i=a(e,i,r)),i}var o=u(e,t);if(o)return o;var s=Object.keys(t),h=function(e){var t={};return s.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),w(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(t);if(0===s.length){if(S(t))return e.stylize("[Function"+(t.name?": "+t.name:"")+"]","special");if(g(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(b(t))return e.stylize(Date.prototype.toString.call(t),"date");if(w(t))return l(t)}var d,f="",m=!1,v=["{","}"];return p(t)&&(m=!0,v=["[","]"]),S(t)&&(f=" [Function"+(t.name?": "+t.name:"")+"]"),g(t)&&(f=" "+RegExp.prototype.toString.call(t)),b(t)&&(f=" "+Date.prototype.toUTCString.call(t)),w(t)&&(f=" "+l(t)),0!==s.length||m&&0!=t.length?r<0?g(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),d=m?function(e,t,n,r,i){for(var o=[],s=0,a=t.length;s60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(d,f,v)):v[0]+f+v[1]}function u(e,t){if(m(t))return e.stylize("undefined","undefined");if(y(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return f(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,n,r,i,o){var s,u,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?u=e.stylize(l.set?"[Getter/Setter]":"[Getter]","special"):l.set&&(u=e.stylize("[Setter]","special")),x(r,i)||(s="["+i+"]"),u||(e.seen.indexOf(l.value)<0?(u=d(n)?a(e,l.value,null):a(e,l.value,n-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),m(s)){if(o&&i.match(/^\d+$/))return u;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function p(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function d(e){return null===e}function f(e){return"number"==typeof e}function y(e){return"string"==typeof e}function m(e){return void 0===e}function g(e){return v(e)&&"[object RegExp]"===C(e)}function v(e){return"object"==typeof e&&null!==e}function b(e){return v(e)&&"[object Date]"===C(e)}function w(e){return v(e)&&("[object Error]"===C(e)||e instanceof Error)}function S(e){return"function"==typeof e}function C(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var A=/%[sdj%]/g;n.format=function(e){if(!y(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),a=r[n];n=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function p(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return O(e).length;default:if(r)return j(e).length;t=(""+t).toLowerCase(),r=!0}}function h(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function d(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:f(e,t,n,r,i);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):f(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function f(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var s,a=1,u=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,l/=2,n/=2}if(i){var c=-1;for(s=n;su&&(n=u-l),s=n;s>=0;s--){for(var p=!0,h=0;hi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s>8,i.push(n%256),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return q.fromByteArray(0===t&&n===e.length?e:e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:l>223?3:l>191?2:1;if(i+p<=n)switch(p){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:s=e[i+2],128==(192&(o=e[i+1]))&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:s=e[i+2],a=e[i+3],128==(192&(o=e[i+1]))&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,p=1):c>65535&&(r.push((c-=65536)>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=p}return function(e){var t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function _(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function P(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return i||P(e,0,n,4),M.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||P(e,0,n,8),M.write(e,t,n,r,52,8),n+8}function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function j(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],s=0;s55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function O(e){return q.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function N(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}var q=e("base64-js"),M=e("ieee754"),F=e("isarray");n.Buffer=o,n.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},n.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),n.kMaxLength=r(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return s(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return function(e,t,n,r){return a(t),t<=0?i(e,t):void 0!==n?"string"==typeof r?i(e,t).fill(n,r):i(e,t).fill(n):i(e,t)}(null,e,t,n)},o.allocUnsafe=function(e){return u(null,e)},o.allocUnsafeSlow=function(e){return u(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);ithis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return x(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}).apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),u=Math.min(s,a),l=this.slice(r,i),c=e.slice(t,n),p=0;pi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return g(this,e,t,n);case"latin1":case"binary":return v(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;o.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),M.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),M.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),M.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),M.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):_(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):_(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):_(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):_(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s>18&63]+o[e>>12&63]+o[e>>6&63]+o[63&e]}function i(e,t,n){for(var i=[],o=t;o0)throw new Error("Invalid string. Length must be a multiple of 4");u=new a(3*l/4-(o="="===e[l-2]?2:"="===e[l-1]?1:0)),r=o>0?l-4:l;var c=0;for(t=0,n=0;t>16&255,u[c++]=i>>8&255,u[c++]=255&i;return 2===o?(i=s[e.charCodeAt(t)]<<2|s[e.charCodeAt(t+1)]>>4,u[c++]=255&i):1===o&&(i=s[e.charCodeAt(t)]<<10|s[e.charCodeAt(t+1)]<<4|s[e.charCodeAt(t+2)]>>2,u[c++]=i>>8&255,u[c++]=255&i),u},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,s="",a=[],u=16383,l=0,c=n-r;lc?c:l+u));return 1===r?(s+=o[(t=e[n-1])>>2],s+=o[t<<4&63],s+="=="):2===r&&(s+=o[(t=(e[n-2]<<8)+e[n-1])>>10],s+=o[t>>4&63],s+=o[t<<2&63],s+="="),a.push(s),a.join("")};var o=[],s=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array;!function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;tc?t=e(t):t.length>5]|=128<>>9<<4)]=t;for(var n=1732584193,r=-271733879,i=-1732584194,c=271733878,p=0;p>>32-i}(l(l(t,e),l(r,o))),n)}function o(e,t,n,r,o,s,a){return i(t&n|~t&r,e,t,o,s,a)}function s(e,t,n,r,o,s,a){return i(t&r|n&~r,e,t,o,s,a)}function a(e,t,n,r,o,s,a){return i(t^n^r,e,t,o,s,a)}function u(e,t,n,r,o,s,a){return i(n^(t|~r),e,t,o,s,a)}function l(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}var c=e("./helpers");t.exports=function(e){return c.hash(e,r,16)}},{"./helpers":73}],76:[function(e,t,n){!function(){var e,n;e=function(e){for(var t,n=new Array(e),r=0;r>>((3&r)<<3)&255;return n},this.crypto&&crypto.getRandomValues&&(n=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=n||e}()},{}],77:[function(e,t,n){function r(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n=Array(80),r=1732584193,u=-271733879,l=-1732584194,c=271733878,p=-1009589776,h=0;h>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t){return e<>>32-t}var u=e("./helpers");t.exports=function(e){return u.hash(e,r,20,!0)}},{"./helpers":73}],78:[function(e,t,n){var r=e("./helpers"),i=function(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},o=function(e,t){return e>>>t|e<<32-t},s=function(e,t){return e>>>t},a=function(e,t,n){return e&t^~e&n},u=function(e,t,n){return e&t^e&n^t&n},l=function(e){return o(e,2)^o(e,13)^o(e,22)},c=function(e){return o(e,6)^o(e,11)^o(e,25)},p=function(e){return o(e,7)^o(e,18)^s(e,3)},h=function(e){return o(e,17)^o(e,19)^s(e,10)},d=function(e,t){var n,r,o,s,d,f,y,m,g,v,b=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),S=new Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var C=0;C="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e}function s(e){return e>="0"&&e<="9"||"-"===e}function a(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e}function u(){}function l(){}function c(e){this.runtime=e}function p(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[d]}]},avg:{_func:this._functionAvg,_signature:[{types:[b]}]},ceil:{_func:this._functionCeil,_signature:[{types:[d]}]},contains:{_func:this._functionContains,_signature:[{types:[y,m]},{types:[f]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[y]},{types:[y]}]},floor:{_func:this._functionFloor,_signature:[{types:[d]}]},length:{_func:this._functionLength,_signature:[{types:[y,m,g]}]},map:{_func:this._functionMap,_signature:[{types:[v]},{types:[m]}]},max:{_func:this._functionMax,_signature:[{types:[b,w]}]},merge:{_func:this._functionMerge,_signature:[{types:[g],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[m]},{types:[v]}]},sum:{_func:this._functionSum,_signature:[{types:[b]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[y]},{types:[y]}]},min:{_func:this._functionMin,_signature:[{types:[b,w]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[m]},{types:[v]}]},type:{_func:this._functionType,_signature:[{types:[f]}]},keys:{_func:this._functionKeys,_signature:[{types:[g]}]},values:{_func:this._functionValues,_signature:[{types:[g]}]},sort:{_func:this._functionSort,_signature:[{types:[w,b]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[m]},{types:[v]}]},join:{_func:this._functionJoin,_signature:[{types:[y]},{types:[w]}]},reverse:{_func:this._functionReverse,_signature:[{types:[y,m]}]},to_array:{_func:this._functionToArray,_signature:[{types:[f]}]},to_string:{_func:this._functionToString,_signature:[{types:[f]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[f]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[f],variadic:!0}]}}}var h;h="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var d=0,f=1,y=2,m=3,g=4,v=6,b=8,w=9,S="UnquotedIdentifier",C="QuotedIdentifier",T="Rbracket",x="Rparen",A="Comma",E="Colon",k="Rbrace",I="Number",_="Current",D="Expref",P="Pipe",R="EQ",U="GT",L="LT",j="GTE",O="LTE",N="NE",q="Flatten",M="Star",F="Filter",B="Dot",H="Lbrace",$="Lbracket",z="Lparen",V="Literal",W={".":B,"*":M,",":A,":":E,"{":H,"}":k,"]":T,"(":z,")":x,"@":_},K={"<":!0,">":!0,"=":!0,"!":!0},X={" ":!0,"\t":!0,"\n":!0};u.prototype={tokenize:function(e){var t,n,r,i=[];for(this._current=0;this._current"===n?"="===e[this._current]?(this._current++,{type:j,value:">=",start:t}):{type:U,value:">",start:t}:"="===n&&"="===e[this._current]?(this._current++,{type:R,value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,n=this._current,r=e.length;"`"!==e[this._current]&&this._current=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var Y={EOF:0,UnquotedIdentifier:0,QuotedIdentifier:0,Rbracket:0,Rparen:0,Comma:0,Rbrace:0,Number:0,Current:0,Expref:0,Pipe:1,Or:2,And:3,EQ:5,GT:5,LT:5,GTE:5,LTE:5,NE:5,Flatten:9,Star:20,Filter:21,Dot:40,Not:45,Lbrace:50,Lbracket:55,Lparen:60};l.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var n=this._lookaheadToken(0),r=new Error("Unexpected token type: "+n.type+", value: "+n.value);throw r.name="ParserError",r}return t},_loadTokens:function(e){var t=(new u).tokenize(e);t.push({type:"EOF",value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var n=this.nud(t),r=this._lookahead(0);e=0?this.expression(e):t===$?(this._match($),this._parseMultiselectList()):t===H?(this._match(H),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(Y[this._lookahead(0)]<10)t={type:"Identity"};else if(this._lookahead(0)===$)t=this.expression(e);else if(this._lookahead(0)===F)t=this.expression(e);else{if(this._lookahead(0)!==B){var n=this._lookaheadToken(0),r=new Error("Sytanx error, unexpected token: "+n.value+"("+n.type+")");throw r.name="ParserError",r}this._match(B),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];this._lookahead(0)!==T;){var t=this.expression(0);if(e.push(t),this._lookahead(0)===A&&(this._match(A),this._lookahead(0)===T))throw new Error("Unexpected token Rbracket")}return this._match(T),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,n,r=[],i=[S,C];;){if(e=this._lookaheadToken(0),i.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match(E),n=this.expression(0),r.push({type:"KeyValuePair",name:t,value:n}),this._lookahead(0)===A)this._match(A);else if(this._lookahead(0)===k){this._match(k);break}}return{type:"MultiSelectHash",children:r}}},c.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,o){var s,a,u,l,c,p,h,d,f;switch(e.type){case"Field":return null===o?null:n(o)?void 0===(p=o[e.name])?null:p:null;case"Subexpression":for(u=this.visit(e.children[0],o),f=1;f0)for(f=v;fb;f+=w)u.push(o[f]);return u;case"Projection":var S=this.visit(e.children[0],o);if(!t(S))return null;for(d=[],f=0;fc;break;case j:u=l>=c;break;case L:u=l=e&&(t=n<0?e-1:e),t}},p.prototype={callFunction:function(e,t){var n=this.functionTable[e];if(void 0===n)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,n._signature),n._func.call(this,t)},_validateArgs:function(e,t,n){var r;if(n[n.length-1].variadic){if(t.length=0;r--)n+=t[r];return n}var i=e[0].slice(0);return i.reverse(),i},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,n=e[0],r=0;r=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return n(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],n=this._interpreter,r=e[0],i=e[1],o=0;o0){if(this._getTypeName(e[0][0])===d)return Math.max.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;r0){if(this._getTypeName(e[0][0])===d)return Math.min.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;ra?1:so&&(o=n,t=r[s]);return t},_functionMinBy:function(e){for(var t,n,r=e[0],i=this.createKeyFunction(e[1],[d,y]),o=1/0,s=0;s0&&u>a&&(u=a);for(var l=0;l=0?(c=f.substr(0,y),p=f.substr(y+1)):(c=f,p=""),h=decodeURIComponent(c),d=decodeURIComponent(p),r(o,h)?Array.isArray(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o}},{}],81:[function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,i){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(r(i))+n;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(r(e))}).join(t):o+encodeURIComponent(r(e[i]))}).join(t):i?encodeURIComponent(r(i))+n+encodeURIComponent(r(e)):""}},{}],82:[function(e,t,n){arguments[4][66][0].apply(n,arguments)},{"./decode":80,"./encode":81}],83:[function(e,t,n){function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,n){if(e&&s(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return"string"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return null===e}var u=e("punycode");n.parse=i,n.resolve=function(e,t){return i(e,!1,!0).resolve(t)},n.resolveObject=function(e,t){return e?i(e,!1,!0).resolveObject(t):t},n.format=function(e){return o(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)},n.Url=r;var l=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,p=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(p),d=["%","/","?",";","#"].concat(h),f=["/","?","#"],y=/^[a-z0-9A-Z_-]{0,63}$/,m=/^([a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=e("querystring");r.prototype.parse=function(e,t,n){if(!o(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e;r=r.trim();var i=l.exec(r);if(i){var s=(i=i[0]).toLowerCase();this.protocol=s,r=r.substr(i.length)}if(n||i||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===r.substr(0,2);!a||i&&v[i]||(r=r.substr(2),this.slashes=!0)}if(!v[i]&&(a||i&&!b[i])){for(var c=-1,p=0;p127?"x":k[_];if(!I.match(y)){var P=A.slice(0,p),R=A.slice(p+1),U=k.match(m);U&&(P.push(U[1]),R.unshift(U[2])),R.length&&(r="/"+R.join(".")+r),this.hostname=P.join(".");break}}}if(this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),!x){var L=this.hostname.split("."),j=[];for(p=0;p0)&&n.host.split("@"))&&(n.auth=g.shift(),n.host=n.hostname=g.shift())),n.search=e.search,n.query=e.query,a(n.pathname)&&a(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!p.length)return n.pathname=null,n.path=n.search?"/"+n.search:null,n.href=n.format(),n;for(var d=p.slice(-1)[0],f=(n.host||e.host)&&("."===d||".."===d)||""===d,y=0,m=p.length;m>=0;m--)"."==(d=p[m])?p.splice(m,1):".."===d?(p.splice(m,1),y++):y&&(p.splice(m,1),y--);if(!l&&!c)for(;y--;y)p.unshift("..");!l||""===p[0]||p[0]&&"/"===p[0].charAt(0)||p.unshift(""),f&&"/"!==p.join("/").substr(-1)&&p.push("");var g,w=""===p[0]||p[0]&&"/"===p[0].charAt(0);return h&&(n.hostname=n.host=w?"":p.length?p.shift():"",(g=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=g.shift(),n.host=n.hostname=g.shift())),(l=l||n.host&&p.length)&&!w&&p.unshift(""),p.length?n.pathname=p.join("/"):(n.pathname=null,n.path=null),a(n.pathname)&&a(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:63,querystring:66}],84:[function(e,t,n){(function(){var n;n=e("lodash/object/create"),t.exports=function(){function e(e,t,n){if(this.stringify=e.stringify,null==t)throw new Error("Missing attribute name of element "+e.name);if(null==n)throw new Error("Missing attribute value for attribute "+t+" of element "+e.name);this.name=this.stringify.attName(t),this.value=this.stringify.attValue(n)}return e.prototype.clone=function(){return n(e.prototype,this)},e.prototype.toString=function(e,t){return" "+this.name+'="'+this.value+'"'},e}()}).call(this)},{"lodash/object/create":143}],85:[function(e,t,n){(function(){var n,r;r=e("./XMLStringifier"),e("./XMLDeclaration"),e("./XMLDocType"),n=e("./XMLElement"),t.exports=function(){function e(e,t){var i;if(null==e)throw new Error("Root element needs a name");null==t&&(t={}),this.options=t,this.stringify=new r(t),(i=new n(this,"doc").element(e)).isRoot=!0,i.documentObject=this,this.rootObject=i,t.headless||(i.declaration(t),null==t.pubID&&null==t.sysID||i.doctype(t))}return e.prototype.root=function(){return this.rootObject},e.prototype.end=function(e){return this.toString(e)},e.prototype.toString=function(e){var t,n,r,i;return n=(null!=e?e.pretty:void 0)||!1,t=null!=(i=null!=e?e.newline:void 0)?i:"\n",r="",null!=this.xmldec&&(r+=this.xmldec.toString(e)),null!=this.doctype&&(r+=this.doctype.toString(e)),r+=this.rootObject.toString(e),n&&r.slice(-t.length)===t&&(r=r.slice(0,-t.length)),r},e}()}).call(this)},{"./XMLDeclaration":92,"./XMLDocType":93,"./XMLElement":94,"./XMLStringifier":98}],86:[function(e,t,n){(function(){var n,r,i={}.hasOwnProperty;r=e("lodash/object/create"),n=e("./XMLNode"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(n)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,n),t.prototype.clone=function(){return r(t.prototype,this)},t.prototype.toString=function(e,t){var n,r,i,o,s,a,u,l,c;return o=(null!=e?e.pretty:void 0)||!1,n=null!=(a=null!=e?e.indent:void 0)?a:" ",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(l=null!=e?e.newline:void 0)?l:"\n",t||(t=0),c=new Array(t+i+1).join(n),s="",o&&(s+=c),s+="",o&&(s+=r),s},t}()}).call(this)},{"./XMLNode":95,"lodash/object/create":143}],87:[function(e,t,n){(function(){var n,r,i={}.hasOwnProperty;r=e("lodash/object/create"),n=e("./XMLNode"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing comment text");this.text=this.stringify.comment(n)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,n),t.prototype.clone=function(){return r(t.prototype,this)},t.prototype.toString=function(e,t){var n,r,i,o,s,a,u,l,c;return o=(null!=e?e.pretty:void 0)||!1,n=null!=(a=null!=e?e.indent:void 0)?a:" ",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(l=null!=e?e.newline:void 0)?l:"\n",t||(t=0),c=new Array(t+i+1).join(n),s="",o&&(s+=c),s+="\x3c!-- "+this.text+" --\x3e",o&&(s+=r),s},t}()}).call(this)},{"./XMLNode":95,"lodash/object/create":143}],88:[function(e,t,n){(function(){var n;n=e("lodash/object/create"),t.exports=function(){function e(e,t,n,r,i,o){if(this.stringify=e.stringify,null==t)throw new Error("Missing DTD element name");if(null==n)throw new Error("Missing DTD attribute name");if(!r)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(t),this.attributeName=this.stringify.attName(n),this.attributeType=this.stringify.dtdAttType(r),this.defaultValue=this.stringify.dtdAttDefault(o),this.defaultValueType=i}return e.prototype.clone=function(){return n(e.prototype,this)},e.prototype.toString=function(e,t){var n,r,i,o,s,a,u,l,c;return o=(null!=e?e.pretty:void 0)||!1,n=null!=(a=null!=e?e.indent:void 0)?a:" ",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(l=null!=e?e.newline:void 0)?l:"\n",t||(t=0),c=new Array(t+i+1).join(n),s="",o&&(s+=c),s+="",o&&(s+=r),s},e}()}).call(this)},{"lodash/object/create":143}],89:[function(e,t,n){(function(){var n,r;n=e("lodash/object/create"),r=e("lodash/lang/isArray"),t.exports=function(){function e(e,t,n){if(this.stringify=e.stringify,null==t)throw new Error("Missing DTD element name");n||(n="(#PCDATA)"),r(n)&&(n="("+n.join(",")+")"),this.name=this.stringify.eleName(t),this.value=this.stringify.dtdElementValue(n)}return e.prototype.clone=function(){return n(e.prototype,this)},e.prototype.toString=function(e,t){var n,r,i,o,s,a,u,l,c;return o=(null!=e?e.pretty:void 0)||!1,n=null!=(a=null!=e?e.indent:void 0)?a:" ",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(l=null!=e?e.newline:void 0)?l:"\n",t||(t=0),c=new Array(t+i+1).join(n),s="",o&&(s+=c),s+="",o&&(s+=r),s},e}()}).call(this)},{"lodash/lang/isArray":135,"lodash/object/create":143}],90:[function(e,t,n){(function(){var n,r;n=e("lodash/object/create"),r=e("lodash/lang/isObject"),t.exports=function(){function e(e,t,n,i){if(this.stringify=e.stringify,null==n)throw new Error("Missing entity name");if(null==i)throw new Error("Missing entity value");if(this.pe=!!t,this.name=this.stringify.eleName(n),r(i)){if(!i.pubID&&!i.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(i.pubID&&!i.sysID)throw new Error("System identifier is required for a public external entity");if(null!=i.pubID&&(this.pubID=this.stringify.dtdPubID(i.pubID)),null!=i.sysID&&(this.sysID=this.stringify.dtdSysID(i.sysID)),null!=i.nData&&(this.nData=this.stringify.dtdNData(i.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(i)}return e.prototype.clone=function(){return n(e.prototype,this)},e.prototype.toString=function(e,t){var n,r,i,o,s,a,u,l,c;return o=(null!=e?e.pretty:void 0)||!1,n=null!=(a=null!=e?e.indent:void 0)?a:" ",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(l=null!=e?e.newline:void 0)?l:"\n",t||(t=0),c=new Array(t+i+1).join(n),s="",o&&(s+=c),s+="",o&&(s+=r),s},e}()}).call(this)},{"lodash/lang/isObject":139,"lodash/object/create":143}],91:[function(e,t,n){(function(){var n;n=e("lodash/object/create"),t.exports=function(){function e(e,t,n){if(this.stringify=e.stringify,null==t)throw new Error("Missing notation name");if(!n.pubID&&!n.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(t),null!=n.pubID&&(this.pubID=this.stringify.dtdPubID(n.pubID)),null!=n.sysID&&(this.sysID=this.stringify.dtdSysID(n.sysID))}return e.prototype.clone=function(){return n(e.prototype,this)},e.prototype.toString=function(e,t){var n,r,i,o,s,a,u,l,c;return o=(null!=e?e.pretty:void 0)||!1,n=null!=(a=null!=e?e.indent:void 0)?a:" ",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(l=null!=e?e.newline:void 0)?l:"\n",t||(t=0),c=new Array(t+i+1).join(n),s="",o&&(s+=c),s+="",o&&(s+=r),s},e}()}).call(this)},{"lodash/object/create":143}],92:[function(e,t,n){(function(){var n,r,i,o={}.hasOwnProperty;r=e("lodash/object/create"),i=e("lodash/lang/isObject"),n=e("./XMLNode"),t.exports=function(e){function t(e,n,r,o){var s;t.__super__.constructor.call(this,e),i(n)&&(n=(s=n).version,r=s.encoding,o=s.standalone),n||(n="1.0"),null!=n&&(this.version=this.stringify.xmlVersion(n)),null!=r&&(this.encoding=this.stringify.xmlEncoding(r)),null!=o&&(this.standalone=this.stringify.xmlStandalone(o))}return function(e,t){function n(){this.constructor=e}for(var r in t)o.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,n),t.prototype.clone=function(){return r(t.prototype,this)},t.prototype.toString=function(e,t){var n,r,i,o,s,a,u,l,c;return o=(null!=e?e.pretty:void 0)||!1,n=null!=(a=null!=e?e.indent:void 0)?a:" ",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(l=null!=e?e.newline:void 0)?l:"\n",t||(t=0),c=new Array(t+i+1).join(n),s="",o&&(s+=c),s+="",o&&(s+=r),s},t}()}).call(this)},{"./XMLNode":95,"lodash/lang/isObject":139,"lodash/object/create":143}],93:[function(e,t,n){(function(){var n,r,i,o,s,a,u,l,c;l=e("lodash/object/create"),c=e("lodash/lang/isObject"),n=e("./XMLCData"),r=e("./XMLComment"),i=e("./XMLDTDAttList"),s=e("./XMLDTDEntity"),o=e("./XMLDTDElement"),a=e("./XMLDTDNotation"),u=e("./XMLProcessingInstruction"),t.exports=function(){function e(e,t,n){var r,i;this.documentObject=e,this.stringify=this.documentObject.stringify,this.children=[],c(t)&&(t=(r=t).pubID,n=r.sysID),null==n&&(n=(i=[t,n])[0],t=i[1]),null!=t&&(this.pubID=this.stringify.dtdPubID(t)),null!=n&&(this.sysID=this.stringify.dtdSysID(n))}return e.prototype.clone=function(){return l(e.prototype,this)},e.prototype.element=function(e,t){var n;return n=new o(this,e,t),this.children.push(n),this},e.prototype.attList=function(e,t,n,r,o){var s;return s=new i(this,e,t,n,r,o),this.children.push(s),this},e.prototype.entity=function(e,t){var n;return n=new s(this,!1,e,t),this.children.push(n),this},e.prototype.pEntity=function(e,t){var n;return n=new s(this,!0,e,t),this.children.push(n),this},e.prototype.notation=function(e,t){var n;return n=new a(this,e,t),this.children.push(n),this},e.prototype.cdata=function(e){var t;return t=new n(this,e),this.children.push(t),this},e.prototype.comment=function(e){var t;return t=new r(this,e),this.children.push(t),this},e.prototype.instruction=function(e,t){var n;return n=new u(this,e,t),this.children.push(n),this},e.prototype.root=function(){return this.documentObject.root()},e.prototype.document=function(){return this.documentObject},e.prototype.toString=function(e,t){var n,r,i,o,s,a,u,l,c,p,h,d;if(a=(null!=e?e.pretty:void 0)||!1,r=null!=(l=null!=e?e.indent:void 0)?l:" ",s=null!=(c=null!=e?e.offset:void 0)?c:0,o=null!=(p=null!=e?e.newline:void 0)?p:"\n",t||(t=0),d=new Array(t+s+1).join(r),u="",a&&(u+=d),u+="0){for(u+=" [",a&&(u+=o),n=0,i=(h=this.children).length;n",h&&(d+=l);else if(h&&1===this.children.length&&null!=this.children[0].value)d+=">",d+=this.children[0].value,d+="",d+=l;else{for(d+=">",h&&(d+=l),i=0,a=(b=this.children).length;i",h&&(d+=l)}return d},t.prototype.att=function(e,t){return this.attribute(e,t)},t.prototype.ins=function(e,t){return this.instruction(e,t)},t.prototype.a=function(e,t){return this.attribute(e,t)},t.prototype.i=function(e,t){return this.instruction(e,t)},t}()}).call(this)},{"./XMLAttribute":84,"./XMLNode":95,"./XMLProcessingInstruction":96,"lodash/collection/every":101,"lodash/lang/isArray":135,"lodash/lang/isFunction":137,"lodash/lang/isObject":139,"lodash/object/create":143}],95:[function(e,t,n){(function(){var n,r,i,o,s,a,u,l,c,p,h,d={}.hasOwnProperty;h=e("lodash/lang/isObject"),l=e("lodash/lang/isArray"),p=e("lodash/lang/isFunction"),c=e("lodash/lang/isEmpty"),s=null,n=null,r=null,i=null,o=null,a=null,u=null,t.exports=function(){function t(t){this.parent=t,this.options=this.parent.options,this.stringify=this.parent.stringify,null===s&&(s=e("./XMLElement"),n=e("./XMLCData"),r=e("./XMLComment"),i=e("./XMLDeclaration"),o=e("./XMLDocType"),a=e("./XMLRaw"),u=e("./XMLText"))}return t.prototype.clone=function(){throw new Error("Cannot clone generic XMLNode")},t.prototype.element=function(e,t,n){var r,i,o,s,a,u;if(o=null,null==t&&(t={}),t=t.valueOf(),h(t)||(n=(a=[t,n])[0],t=a[1]),null!=e&&(e=e.valueOf()),l(e))for(r=0,s=e.length;r/))throw new Error("Invalid CDATA text: "+e);return this.assertLegalChar(e)},t.prototype.comment=function(e){if((e=""+e||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},t.prototype.raw=function(e){return""+e||""},t.prototype.attName=function(e){return""+e||""},t.prototype.attValue=function(e){return this.attEscape(e=""+e||"")},t.prototype.insTarget=function(e){return""+e||""},t.prototype.insValue=function(e){if((e=""+e||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return e},t.prototype.xmlVersion=function(e){if(!(e=""+e||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},t.prototype.xmlEncoding=function(e){if(!(e=""+e||"").match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/))throw new Error("Invalid encoding: "+e);return e},t.prototype.xmlStandalone=function(e){return e?"yes":"no"},t.prototype.dtdPubID=function(e){return""+e||""},t.prototype.dtdSysID=function(e){return""+e||""},t.prototype.dtdElementValue=function(e){return""+e||""},t.prototype.dtdAttType=function(e){return""+e||""},t.prototype.dtdAttDefault=function(e){return null!=e?""+e||"":e},t.prototype.dtdEntityValue=function(e){return""+e||""},t.prototype.dtdNData=function(e){return""+e||""},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(e){var t;if(t=e.match(this.allowSurrogateChars?/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/:/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/))throw new Error("Invalid character ("+t+") in string: "+e+" at index "+t.index);return e},t.prototype.elEscape=function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/\r/g," ")},t.prototype.attEscape=function(e){return e.replace(/&/g,"&").replace(/3&&"function"==typeof s?(s=r(s,a,5),n-=2):n-=(s=n>2&&"function"==typeof a?a:null)?1:0,u&&i(t[1],t[2],u)&&(s=3==n?null:s,n=2);for(var l=0;++lu))return!1;for(;c&&++a-1&&e%1==0&&e-1&&e%1==0&&e<=r}},{}],129:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e||!1}},{}],130:[function(e,t,n){var r=e("../lang/isObject");t.exports=function(e){return e==e&&(0===e?1/e>0:!r(e))}},{"../lang/isObject":139}],131:[function(e,t,n){(function(n){var r=e("../lang/isNative")(r=n.WeakMap)&&r,i=r&&new r;t.exports=i}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":138}],132:[function(e,t,n){var r=e("../lang/isArguments"),i=e("../lang/isArray"),o=e("./isIndex"),s=e("./isLength"),a=e("../object/keysIn"),u=e("../support"),l=Object.prototype.hasOwnProperty;t.exports=function(e){for(var t=a(e),n=t.length,c=n&&e.length,p=c&&s(c)&&(i(e)||u.nonEnumArgs&&r(e)),h=-1,d=[];++h0;++c>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function u(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<=0;){var s=t*this[e++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},n.prototype.DB=26,n.prototype.DM=67108863,n.prototype.DV=1<<26,n.prototype.FV=Math.pow(2,52),n.prototype.F1=26,n.prototype.F2=0;var l,c,p="0123456789abcdefghijklmnopqrstuvwxyz",h=new Array;for(l="0".charCodeAt(0),c=0;c<=9;++c)h[l++]=c;for(l="a".charCodeAt(0),c=10;c<36;++c)h[l++]=c;for(l="A".charCodeAt(0),c=10;c<36;++c)h[l++]=c;u.prototype.convert=function(e){var t=r();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(n.ZERO)>0&&this.m.subTo(t,t),t},u.prototype.revert=function(e){var t=r();return e.copyTo(t),this.reduce(t),t},u.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},u.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},u.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},n.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},n.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},n.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");r=2}this.t=0,this.s=0;for(var i=e.length,s=!1,a=0;--i>=0;){var u=o(e,i);u<0?"-"==e.charAt(i)&&(s=!0):(s=!1,0==a?this[this.t++]=u:a+r>this.DB?(this[this.t-1]|=(u&(1<>this.DB-a):this[this.t-1]|=u<=this.DB&&(a-=this.DB))}this.clamp(),s&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},n.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},n.prototype.drShiftTo=function(e,t){for(var n=e;n=0;--n)t[n+s+1]=this[n]>>i|a,a=(this[n]&o)<=0;--n)t[n]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},n.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<>r;for(var s=n+1;s>r;r>0&&(t[this.t-n-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},n.prototype.multiplyTo=function(e,t){var r=this.abs(),i=e.abs(),o=r.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o=0;)e[n]=0;for(n=0;n=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},n.prototype.divRemTo=function(e,t,i){var o=e.abs();if(!(o.t<=0)){var s=this.abs();if(s.t0?(o.lShiftTo(p,u),s.lShiftTo(p,i)):(o.copyTo(u),s.copyTo(i));var h=u.t,d=u[h-1];if(0!=d){var f=d*(1<1?u[h-2]>>this.F2:0),y=this.FV/f,m=(1<=0&&(i[i.t++]=1,i.subTo(w,i)),n.ONE.dlShiftTo(h,w),w.subTo(u,u);u.t=0;){var S=i[--v]==d?this.DM:Math.floor(i[v]*y+(i[v-1]+g)*m);if((i[v]+=u.am(0,S,i,b,0,h))0&&i.rShiftTo(p,i),l<0&&n.ZERO.subTo(i,i)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},n.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},n.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString();var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");t=2}var n,r=(1<0)for(u>u)>0&&(o=!0,s=i(n));a>=0;)u>(u+=this.DB-t)):(n=this[a]>>(u-=t)&r,u<=0&&(u+=this.DB,--a)),n>0&&(o=!0),o&&(s+=i(n));return o?s:"0"},n.prototype.negate=function(){var e=r();return n.ZERO.subTo(this,e),e},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+a(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(e){var t=r();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t},n.prototype.equals=function(e){return 0==this.compareTo(e)},n.prototype.add=function(e){var t=r();return this.addTo(e,t),t},n.prototype.subtract=function(e){var t=r();return this.subTo(e,t),t},n.prototype.multiply=function(e){var t=r();return this.multiplyTo(e,t),t},n.prototype.divide=function(e){var t=r();return this.divRemTo(e,t,null),t},n.prototype.modPow=function(e,t){var n,i=e.bitLength(),o=s(1),l=new u(t);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6;var c=new Array,p=3,h=n-1,d=(1<1){var f=r();for(l.sqrTo(c[1],f);p<=d;)c[p]=r(),l.mulTo(f,c[p-2],c[p]),p+=2}var y,m,g=e.t-1,v=!0,b=r();for(i=a(e[g])-1;g>=0;){for(i>=h?y=e[g]>>i-h&d:(y=(e[g]&(1<0&&(y|=e[g-1]>>this.DB+i-h)),p=n;0==(1&y);)y>>=1,--p;if((i-=p)<0&&(i+=this.DB,--g),v)c[y].copyTo(o),v=!1;else{for(;p>1;)l.sqrTo(o,b),l.sqrTo(b,o),p-=2;p>0?l.sqrTo(o,b):(m=o,o=b,b=m),l.mulTo(b,c[y],o)}for(;g>=0&&0==(e[g]&1<0&&void 0!==arguments[0]?arguments[0]:{}).AccessToken;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.jwtToken=t||""}return r(e,[{key:"getJwtToken",value:function(){return this.jwtToken}},{key:"getExpiration",value:function(){var e=this.jwtToken.split(".")[1];return JSON.parse(i.util.base64.decode(e).toString("utf8")).exp}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{}).IdToken;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.jwtToken=t||""}return r(e,[{key:"getJwtToken",value:function(){return this.jwtToken}},{key:"getExpiration",value:function(){var e=this.jwtToken.split(".")[1];return JSON.parse(i.util.base64.decode(e).toString("utf8")).exp}}]),e}();t.default=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{}).RefreshToken;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.token=t||""}return n(e,[{key:"getToken",value:function(){return this.token}}]),e}();t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.Name,r=t.Value;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.Name=n||"",this.Value=r||""}return n(e,[{key:"getValue",value:function(){return this.Value}},{key:"setValue",value:function(e){return this.Value=e,this}},{key:"getName",value:function(){return this.Name}},{key:"setName",value:function(e){return this.Name=e,this}},{key:"toString",value:function(){return JSON.stringify(this)}},{key:"toJSON",value:function(){return{Name:this.Name,Value:this.Value}}}]),e}();t.default=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.IdToken,r=t.RefreshToken,i=t.AccessToken;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),null==i||null==n)throw new Error("Id token and Access Token must be present.");this.idToken=n,this.refreshToken=r,this.accessToken=i}return n(e,[{key:"getIdToken",value:function(){return this.idToken}},{key:"getRefreshToken",value:function(){return this.refreshToken}},{key:"getAccessToken",value:function(){return this.accessToken}},{key:"isValid",value:function(){var e=Math.floor(new Date/1e3);return e+~]|"+N+")"+N+"*"),V=new RegExp(N+"|>"),W=new RegExp(F),K=new RegExp("^"+q+"$"),X={ID:new RegExp("^#("+q+")"),CLASS:new RegExp("^\\.("+q+")"),TAG:new RegExp("^("+q+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+N+"*(even|odd|(([+-]|)(\\d*)n|)"+N+"*(?:([+-]|)"+N+"*(\\d+)|))"+N+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+N+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+N+"*((?:-\\d)?\\d*)"+N+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+N+"?|("+N+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},se=we(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{U.apply(D=L.call(S.childNodes),S.childNodes)}catch(t){U={apply:D.length?function(e,t){R.apply(e,L.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ae(e,t,r,i){var o,a,l,c,p,f,g,v=t&&t.ownerDocument,C=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==C&&9!==C&&11!==C)return r;if(!i&&((t?t.ownerDocument||t:S)!==d&&h(t),t=t||d,y)){if(11!==C&&(p=Q.exec(e)))if(o=p[1]){if(9===C){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(v&&(l=v.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(p[2])return U.apply(r,t.getElementsByTagName(e)),r;if((o=p[3])&&n.getElementsByClassName&&t.getElementsByClassName)return U.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!k[e+" "]&&(!m||!m.test(e))&&(1!==C||"object"!==t.nodeName.toLowerCase())){if(g=e,v=t,1===C&&V.test(e)){for((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=w),a=(f=s(e)).length;a--;)f[a]="#"+c+" "+be(f[a]);g=f.join(","),v=ee.test(e)&&ge(t.parentNode)||t}try{return U.apply(r,v.querySelectorAll(g)),r}catch(t){k(e,!0)}finally{c===w&&t.removeAttribute("id")}}}return u(e.replace(H,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[w]=!0,e}function ce(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function pe(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function he(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ye(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return le(function(t){return t=+t,le(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},o=ae.isXML=function(e){var t=(e.ownerDocument||e).documentElement;return!Y.test(e.namespaceURI||t&&t.nodeName||"HTML")},h=ae.setDocument=function(e){var t,i,s=e?e.ownerDocument||e:S;return s!==d&&9===s.nodeType&&s.documentElement&&(f=(d=s).documentElement,y=!o(d),S!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Z.test(d.getElementsByClassName),n.getById=ce(function(e){return f.appendChild(e).id=w,!d.getElementsByName||!d.getElementsByName(w).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&y){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&y){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&y)return t.getElementsByClassName(e)},g=[],m=[],(n.qsa=Z.test(d.querySelectorAll))&&(ce(function(e){f.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+N+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+N+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+N+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Z.test(v=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),g.push("!=",F)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=Z.test(f.compareDocumentPosition),b=t||Z.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},I=t?function(e,t){if(e===t)return p=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===S&&b(S,e)?-1:t===d||t.ownerDocument===S&&b(S,t)?1:c?j(c,e)-j(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return p=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?j(c,e)-j(c,t):0;if(i===o)return he(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?he(s[r],a[r]):s[r]===S?-1:a[r]===S?1:0}),d},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&h(e),n.matchesSelector&&y&&!k[t+" "]&&(!g||!g.test(t))&&(!m||!m.test(t)))try{var r=v.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){k(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=x[e+" "];return t||(t=new RegExp("(^|"+N+")"+e+"("+N+"|$)"))&&x(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ae.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,t,n){return y(t)?S.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?S.grep(e,function(e){return e===t!==n}):"string"!=typeof t?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||P,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:R.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(S.merge(this,S.parseHTML(i[1],(t=t instanceof S?t[0]:t)&&t.nodeType?t.ownerDocument||t:r,!0)),_.test(i[1])&&S.isPlainObject(t))for(i in t)y(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,P=S(r);var U=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function j(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,fe=/^$|^module$|\/(?:java|ecma)script/i,ye={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&I(e,t)?S.merge([e],n):n}function ge(e,t){for(var n=0,r=e.length;nx",f.noCloneChecked=!!ve.cloneNode(!0).lastChild.defaultValue;var Ce=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xe=/^([^.]*)(?:\.(.+)|)/;function Ae(){return!0}function Ee(){return!1}function ke(e,t){return e===function(){try{return r.activeElement}catch(e){}}()==("focus"===t)}function Ie(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)Ie(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return S().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function _e(e,t,n){n?(J.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var r,i,s=J.get(this,t);if(1&e.isTrigger&&this[t]){if(s.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(s=o.call(arguments),J.set(this,t,s),r=n(this,t),this[t](),s!==(i=J.get(this,t))||r?J.set(this,t,!1):i={},s!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else s.length&&(J.set(this,t,{value:S.event.trigger(S.extend(s[0],S.Event.prototype),s.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===J.get(e,t)&&S.event.add(e,t,Ae)}S.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,l,c,p,h,d,f,y,m=J.get(e);if(m)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(ie,i),n.guid||(n.guid=S.guid++),(u=m.events)||(u=m.events={}),(s=m.handle)||(s=m.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(O)||[""]).length;l--;)d=y=(a=xe.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),d&&(p=S.event.special[d]||{},p=S.event.special[d=(i?p.delegateType:p.bindType)||d]||{},c=S.extend({type:d,origType:y,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:f.join(".")},o),(h=u[d])||((h=u[d]=[]).delegateCount=0,p.setup&&!1!==p.setup.call(e,r,f,s)||e.addEventListener&&e.addEventListener(d,s)),p.add&&(p.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),S.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,c,p,h,d,f,y,m=J.hasData(e)&&J.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(O)||[""]).length;l--;)if(d=y=(a=xe.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),d){for(p=S.event.special[d]||{},h=u[d=(r?p.delegateType:p.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)c=h[o],!i&&y!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,p.remove&&p.remove.call(e,c));s&&!h.length&&(p.teardown&&!1!==p.teardown.call(e,f,m.handle)||S.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=S.event.fix(e),u=new Array(arguments.length),l=(J.get(this,"events")||{})[a.type]||[],c=S.event.special[a.type]||{};for(u[0]=a,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,Pe=/\s*$/g;function Le(e,t){return I(e,"table")&&I(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function je(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ne(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),s=J.set(t,o),l=o.events))for(i in delete s.handle,s.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,s,a,u,l,c=e.cloneNode(!0),p=oe(e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(s=me(c),r=0,i=(o=me(e)).length;r").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}});var Kt,Xt=[],Yt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+At++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,s,a=!1!==t.jsonp&&(Yt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Yt,"$1"+i):!1!==t.jsonp&&(t.url+=(Et.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||S.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},r.always(function(){void 0===o?S(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Xt.push(i)),s&&y(o)&&o(s[0]),s=o=void 0}),"script"}),f.createHTMLDocument=((Kt=r.implementation.createHTMLDocument("").body).innerHTML="
",2===Kt.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),s=!n&&[],(o=_.exec(e))?[t.createElement(o[1])]:(o=Se([e],t,s),s&&s.length&&S(s).remove(),S.merge([],o.childNodes)));var i,o,s},S.fn.load=function(e,t,n){var r,i,o,s=this,a=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.expr.pseudos.animated=function(e){return S.grep(S.timers,function(t){return e===t.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l=S.css(e,"position"),c=S(e),p={};"static"===l&&(e.style.position="relative"),a=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(s=(r=c.position()).top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),y(t)&&(t=t.call(e,n,S.extend({},a))),null!=t.top&&(p.top=t.top-a.top+s),null!=t.left&&(p.left=t.left-a.left+i),"using"in t?t.using.call(e,p):c.css(p)}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){S.offset.setOffset(this,e,t)});var t,n,r=this[0];return r?r.getClientRects().length?{top:(t=r.getBoundingClientRect()).top+(n=r.ownerDocument.defaultView).pageYOffset,left:t.left+n.pageXOffset}:{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||ie})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;S.fn[e]=function(r){return $(this,function(e,r,i){var o;if(m(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),S.each(["top","left"],function(e,t){S.cssHooks[t]=ze(f.pixelPosition,function(e,n){if(n)return n=$e(e,t),Fe.test(n)?S(e).position()[t]+"px":n})}),S.each({Height:"height",Width:"width"},function(e,t){S.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){S.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return $(this,function(t,n,i){var o;return m(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?S.css(t,n,a):S.style(t,n,i,a)},t,s?i:void 0,s)}})}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){S.fn[t]=function(e,n){return 0Previous',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(t,n){return e('