diff --git a/packages/amazon-cognito-identity-js/dist/amazon-cognito-identity.js b/packages/amazon-cognito-identity-js/dist/amazon-cognito-identity.js index 4628badb9d1..4c870b975e7 100644 --- a/packages/amazon-cognito-identity-js/dist/amazon-cognito-identity.js +++ b/packages/amazon-cognito-identity-js/dist/amazon-cognito-identity.js @@ -76,7 +76,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.__esModule = true; - var _AuthenticationDetails = __webpack_require__(19); + var _AuthenticationDetails = __webpack_require__(15); Object.defineProperty(exports, 'AuthenticationDetails', { enumerable: true, @@ -139,7 +139,7 @@ return /******/ (function(modules) { // webpackBootstrap } }); - var _CognitoUserPool = __webpack_require__(21); + var _CognitoUserPool = __webpack_require__(17); Object.defineProperty(exports, 'CognitoUserPool', { enumerable: true, @@ -157,7 +157,7 @@ return /******/ (function(modules) { // webpackBootstrap } }); - var _CookieStorage = __webpack_require__(22); + var _CookieStorage = __webpack_require__(18); Object.defineProperty(exports, 'CookieStorage', { enumerable: true, @@ -191,9 +191,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict' - var base64 = __webpack_require__(15) - var ieee754 = __webpack_require__(16) - var isArray = __webpack_require__(17) + var base64 = __webpack_require__(20) + var ieee754 = __webpack_require__(25) + var isArray = __webpack_require__(26) exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer @@ -5722,10 +5722,10 @@ return /******/ (function(modules) { // webpackBootstrap /***/ (function(module, exports, __webpack_require__) { var Buffer = __webpack_require__(1).Buffer - var sha = __webpack_require__(26) - var sha256 = __webpack_require__(27) - var rng = __webpack_require__(25) - var md5 = __webpack_require__(24) + var sha = __webpack_require__(23) + var sha256 = __webpack_require__(24) + var rng = __webpack_require__(22) + var md5 = __webpack_require__(21) var algorithms = { sha1: sha, @@ -5824,945 +5824,712 @@ return /******/ (function(modules) { // webpackBootstrap /* 15 */ /***/ (function(module, exports) { - 'use strict' - - exports.byteLength = byteLength - exports.toByteArray = toByteArray - exports.fromByteArray = fromByteArray - - var lookup = [] - var revLookup = [] - var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + "use strict"; - var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' - for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i - } + exports.__esModule = true; - revLookup['-'.charCodeAt(0)] = 62 - revLookup['_'.charCodeAt(0)] = 63 + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - function placeHoldersCount (b64) { - var len = b64.length - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } + /*! + * Copyright 2016 Amazon.com, + * Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Amazon Software License (the "License"). + * You may not use this file except in compliance with the + * License. A copy of the License is located at + * + * http://aws.amazon.com/asl/ + * + * or in the "license" file accompanying this file. This file is + * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, express or implied. See the License + * for the specific language governing permissions and + * limitations under the License. + */ - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 - } + /** @class */ + var AuthenticationDetails = function () { + /** + * Constructs a new AuthenticationDetails object + * @param {object=} data Creation options. + * @param {string} data.Username User being authenticated. + * @param {string} data.Password Plain-text password to authenticate with. + * @param {(AttributeArg[])?} data.ValidationData Application extra metadata. + * @param {(AttributeArg[])?} data.AuthParamaters Authentication paramaters for custom auth. + */ + function AuthenticationDetails(data) { + _classCallCheck(this, AuthenticationDetails); - function byteLength (b64) { - // base64 is 4/3 + up to two characters of the original data - return (b64.length * 3 / 4) - placeHoldersCount(b64) - } + var _ref = data || {}, + ValidationData = _ref.ValidationData, + Username = _ref.Username, + Password = _ref.Password, + AuthParameters = _ref.AuthParameters; - function toByteArray (b64) { - var i, l, tmp, placeHolders, arr - var len = b64.length - placeHolders = placeHoldersCount(b64) + this.validationData = ValidationData || {}; + this.authParameters = AuthParameters || {}; + this.username = Username; + this.password = Password; + } - arr = new Arr((len * 3 / 4) - placeHolders) + /** + * @returns {string} the record's username + */ - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? len - 4 : len - var L = 0 + AuthenticationDetails.prototype.getUsername = function getUsername() { + return this.username; + }; - for (i = 0; i < l; i += 4) { - tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] - arr[L++] = (tmp >> 16) & 0xFF - arr[L++] = (tmp >> 8) & 0xFF - arr[L++] = tmp & 0xFF - } + /** + * @returns {string} the record's password + */ - if (placeHolders === 2) { - tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[L++] = tmp & 0xFF - } else if (placeHolders === 1) { - tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[L++] = (tmp >> 8) & 0xFF - arr[L++] = tmp & 0xFF - } - return arr - } + AuthenticationDetails.prototype.getPassword = function getPassword() { + return this.password; + }; - function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] - } + /** + * @returns {Array} the record's validationData + */ - function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output.push(tripletToBase64(tmp)) - } - return output.join('') - } - function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var output = '' - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 + AuthenticationDetails.prototype.getValidationData = function getValidationData() { + return this.validationData; + }; - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } + /** + * @returns {Array} the record's authParameters + */ - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - output += lookup[tmp >> 2] - output += lookup[(tmp << 4) & 0x3F] - output += '==' - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) - output += lookup[tmp >> 10] - output += lookup[(tmp >> 4) & 0x3F] - output += lookup[(tmp << 2) & 0x3F] - output += '=' - } - parts.push(output) + AuthenticationDetails.prototype.getAuthParameters = function getAuthParameters() { + return this.authParameters; + }; - return parts.join('') - } + return AuthenticationDetails; + }(); + exports.default = AuthenticationDetails; /***/ }), /* 16 */ -/***/ (function(module, exports) { - - exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] +/***/ (function(module, exports, __webpack_require__) { - i += d + 'use strict'; - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + exports.__esModule = true; - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + var _UserAgent = __webpack_require__(19); - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) - } + var _UserAgent2 = _interopRequireDefault(_UserAgent); - exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - value = Math.abs(value) + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } + /** @class */ + var Client = function () { + /** + * Constructs a new AWS Cognito Identity Provider client object + * @param {string} region AWS region + * @param {string} endpoint endpoint + */ + function Client(region, endpoint, options) { + _classCallCheck(this, Client); - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } + this.endpoint = endpoint || 'https://cognito-idp.' + region + '.amazonaws.com/'; + this.userAgent = _UserAgent2.default.prototype.userAgent || 'aws-amplify/0.1.x js'; + this.options = options || {}; } - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 - } + /** + * Makes an unauthenticated request on AWS Cognito Identity Provider API + * using fetch + * @param {string} operation API operation + * @param {object} params Input parameters + * @param {function} callback Callback called when a response is returned + * @returns {void} + */ -/***/ }), -/* 17 */ -/***/ (function(module, exports) { + Client.prototype.request = function request(operation, params, callback) { + var headers = { + 'Content-Type': 'application/x-amz-json-1.1', + 'X-Amz-Target': 'AWSCognitoIdentityProviderService.' + operation, + 'X-Amz-User-Agent': this.userAgent + }; - var toString = {}.toString; + var options = Object.assign(this.options, { + headers: headers, + method: 'POST', + mode: 'cors', + cache: 'no-cache', + body: JSON.stringify(params) + }); - module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; - }; + var response = void 0; + fetch(this.endpoint, options).then(function (resp) { + response = resp; + return resp; + }, function (err) { + // If error happens here, the request failed + // if it is TypeError throw network error + if (err instanceof TypeError) { + throw new Error('Network error'); + } + throw err; + }).then(function (resp) { + return resp.json().catch(function () { + return {}; + }); + }).then(function (data) { + if (response.ok) return callback(null, data); -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * JavaScript Cookie v2.2.0 - * https://github.com/js-cookie/js-cookie - * - * Copyright 2006, 2015 Klaus Hartl & Fagner Brack - * Released under the MIT license - */ - ;(function (factory) { - var registeredInModuleLoader = false; - if (true) { - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - registeredInModuleLoader = true; - } - if (true) { - module.exports = factory(); - registeredInModuleLoader = true; - } - if (!registeredInModuleLoader) { - var OldCookies = window.Cookies; - var api = window.Cookies = factory(); - api.noConflict = function () { - window.Cookies = OldCookies; - return api; - }; - } - }(function () { - function extend () { - var i = 0; - var result = {}; - for (; i < arguments.length; i++) { - var attributes = arguments[ i ]; - for (var key in attributes) { - result[key] = attributes[key]; - } - } - return result; - } + // Taken from aws-sdk-js/lib/protocol/json.js + // eslint-disable-next-line no-underscore-dangle + var code = (data.__type || data.code).split('#').pop(); + var error = { + code: code, + name: code, + message: data.message || data.Message || null + }; + return callback(error); + }).catch(function (err) { + // default to return 'UnknownError' + var error = { code: 'UnknownError', message: 'Unkown error' }; - function init (converter) { - function api (key, value, attributes) { - var result; - if (typeof document === 'undefined') { - return; - } + // first check if we have a service error + if (response && response.headers && response.headers.get('x-amzn-errortype')) { + try { + var code = response.headers.get('x-amz-errortype').split(':')[0]; + error = { + code: code, + name: code, + statusCode: response.status, + message: response.status ? response.status.toString() : null + }; + } catch (ex) {} + // pass through so it doesn't get swallowed if we can't parse it - // Write + // otherwise check if error is Network error + } else if (err instanceof Error && err.message === 'Network error') { + error = { + code: 'NetworkError', + name: err.name, + message: err.message + }; + } + return callback(error); + }); + }; - if (arguments.length > 1) { - attributes = extend({ - path: '/' - }, api.defaults, attributes); + return Client; + }(); - if (typeof attributes.expires === 'number') { - var expires = new Date(); - expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5); - attributes.expires = expires; - } + exports.default = Client; - // We're using "expires" because "max-age" is not supported by IE - attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { - try { - result = JSON.stringify(value); - if (/^[\{\[]/.test(result)) { - value = result; - } - } catch (e) {} + 'use strict'; - if (!converter.write) { - value = encodeURIComponent(String(value)) - .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); - } else { - value = converter.write(value, key); - } + exports.__esModule = true; - key = encodeURIComponent(String(key)); - key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent); - key = key.replace(/[\(\)]/g, escape); + var _Client = __webpack_require__(16); - var stringifiedAttributes = ''; + var _Client2 = _interopRequireDefault(_Client); - for (var attributeName in attributes) { - if (!attributes[attributeName]) { - continue; - } - stringifiedAttributes += '; ' + attributeName; - if (attributes[attributeName] === true) { - continue; - } - stringifiedAttributes += '=' + attributes[attributeName]; - } - return (document.cookie = key + '=' + value + stringifiedAttributes); - } + var _CognitoUser = __webpack_require__(9); - // Read + var _CognitoUser2 = _interopRequireDefault(_CognitoUser); - if (!key) { - result = {}; - } + var _StorageHelper = __webpack_require__(13); - // To prevent the for loop in the first place assign an empty array - // in case there are no cookies at all. Also prevents odd result when - // calling "get()" - var cookies = document.cookie ? document.cookie.split('; ') : []; - var rdecode = /(%[0-9A-Z]{2})+/g; - var i = 0; + var _StorageHelper2 = _interopRequireDefault(_StorageHelper); - for (; i < cookies.length; i++) { - var parts = cookies[i].split('='); - var cookie = parts.slice(1).join('='); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - if (!this.json && cookie.charAt(0) === '"') { - cookie = cookie.slice(1, -1); - } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /*! + * Copyright 2016 Amazon.com, + * Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Amazon Software License (the "License"). + * You may not use this file except in compliance with the + * License. A copy of the License is located at + * + * http://aws.amazon.com/asl/ + * + * or in the "license" file accompanying this file. This file is + * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, express or implied. See the License + * for the specific language governing permissions and + * limitations under the License. + */ - try { - var name = parts[0].replace(rdecode, decodeURIComponent); - cookie = converter.read ? - converter.read(cookie, name) : converter(cookie, name) || - cookie.replace(rdecode, decodeURIComponent); + /** @class */ + var CognitoUserPool = function () { + /** + * Constructs a new CognitoUserPool object + * @param {object} data Creation options. + * @param {string} data.UserPoolId Cognito user pool id. + * @param {string} data.ClientId User pool application client id. + * @param {object} data.Storage Optional storage object. + * @param {boolean} data.AdvancedSecurityDataCollectionFlag Optional: + * boolean flag indicating if the data collection is enabled + * to support cognito advanced security features. By default, this + * flag is set to true. + */ + function CognitoUserPool(data) { + _classCallCheck(this, CognitoUserPool); - if (this.json) { - try { - cookie = JSON.parse(cookie); - } catch (e) {} - } + var _ref = data || {}, + UserPoolId = _ref.UserPoolId, + ClientId = _ref.ClientId, + ProxyAgent = _ref.ProxyAgent, + endpoint = _ref.endpoint, + AdvancedSecurityDataCollectionFlag = _ref.AdvancedSecurityDataCollectionFlag; - if (key === name) { - result = cookie; - break; - } + if (!UserPoolId || !ClientId) { + throw new Error('Both UserPoolId and ClientId are required.'); + } + if (!/^[\w-]+_.+$/.test(UserPoolId)) { + throw new Error('Invalid UserPoolId format.'); + } + var region = UserPoolId.split('_')[0]; - if (!key) { - result[name] = cookie; - } - } catch (e) {} - } + this.userPoolId = UserPoolId; + this.clientId = ClientId; - return result; - } + this.client = new _Client2.default(region, endpoint, { agent: ProxyAgent || null }); - api.set = api; - api.get = function (key) { - return api.call(api, key); - }; - api.getJSON = function () { - return api.apply({ - json: true - }, [].slice.call(arguments)); - }; - api.defaults = {}; + /** + * By default, AdvancedSecurityDataCollectionFlag is set to true, + * if no input value is provided. + */ + this.advancedSecurityDataCollectionFlag = AdvancedSecurityDataCollectionFlag !== false; - api.remove = function (key, attributes) { - api(key, '', extend(attributes, { - expires: -1 - })); - }; + this.storage = data.Storage || new _StorageHelper2.default().getStorage(); + } - api.withConverter = init; + /** + * @returns {string} the user pool id + */ - return api; - } - return init(function () {}); - })); + CognitoUserPool.prototype.getUserPoolId = function getUserPoolId() { + return this.userPoolId; + }; + /** + * @returns {string} the client id + */ -/***/ }), -/* 19 */ -/***/ (function(module, exports) { - "use strict"; - - exports.__esModule = true; - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - /*! - * Copyright 2016 Amazon.com, - * Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Amazon Software License (the "License"). - * You may not use this file except in compliance with the - * License. A copy of the License is located at - * - * http://aws.amazon.com/asl/ - * - * or in the "license" file accompanying this file. This file is - * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, express or implied. See the License - * for the specific language governing permissions and - * limitations under the License. - */ + CognitoUserPool.prototype.getClientId = function getClientId() { + return this.clientId; + }; - /** @class */ - var AuthenticationDetails = function () { /** - * Constructs a new AuthenticationDetails object - * @param {object=} data Creation options. - * @param {string} data.Username User being authenticated. - * @param {string} data.Password Plain-text password to authenticate with. - * @param {(AttributeArg[])?} data.ValidationData Application extra metadata. - * @param {(AttributeArg[])?} data.AuthParamaters Authentication paramaters for custom auth. + * @typedef {object} SignUpResult + * @property {CognitoUser} user New user. + * @property {bool} userConfirmed If the user is already confirmed. + */ + /** + * method for signing up a user + * @param {string} username User's username. + * @param {string} password Plain-text initial password entered by user. + * @param {(AttributeArg[])=} userAttributes New user attributes. + * @param {(AttributeArg[])=} validationData Application metadata. + * @param {nodeCallback} callback Called on error or with the new user. + * @returns {void} */ - function AuthenticationDetails(data) { - _classCallCheck(this, AuthenticationDetails); - var _ref = data || {}, - ValidationData = _ref.ValidationData, - Username = _ref.Username, - Password = _ref.Password, - AuthParameters = _ref.AuthParameters; - this.validationData = ValidationData || {}; - this.authParameters = AuthParameters || {}; - this.username = Username; - this.password = Password; - } + CognitoUserPool.prototype.signUp = function signUp(username, password, userAttributes, validationData, callback) { + var _this = this; - /** - * @returns {string} the record's username - */ + var jsonReq = { + ClientId: this.clientId, + Username: username, + Password: password, + UserAttributes: userAttributes, + ValidationData: validationData + }; + if (this.getUserContextData(username)) { + jsonReq.UserContextData = this.getUserContextData(username); + } + this.client.request('SignUp', jsonReq, function (err, data) { + if (err) { + return callback(err, null); + } + + var cognitoUser = { + Username: username, + Pool: _this, + Storage: _this.storage + }; + var returnData = { + user: new _CognitoUser2.default(cognitoUser), + userConfirmed: data.UserConfirmed, + userSub: data.UserSub + }; - AuthenticationDetails.prototype.getUsername = function getUsername() { - return this.username; + return callback(null, returnData); + }); }; /** - * @returns {string} the record's password + * method for getting the current user of the application from the local storage + * + * @returns {CognitoUser} the user retrieved from storage */ - AuthenticationDetails.prototype.getPassword = function getPassword() { - return this.password; - }; + CognitoUserPool.prototype.getCurrentUser = function getCurrentUser() { + var lastUserKey = 'CognitoIdentityServiceProvider.' + this.clientId + '.LastAuthUser'; - /** - * @returns {Array} the record's validationData - */ + var lastAuthUser = this.storage.getItem(lastUserKey); + if (lastAuthUser) { + var cognitoUser = { + Username: lastAuthUser, + Pool: this, + Storage: this.storage + }; + return new _CognitoUser2.default(cognitoUser); + } - AuthenticationDetails.prototype.getValidationData = function getValidationData() { - return this.validationData; + return null; }; /** - * @returns {Array} the record's authParameters - */ + * This method returns the encoded data string used for cognito advanced security feature. + * This would be generated only when developer has included the JS used for collecting the + * data on their client. Please refer to documentation to know more about using AdvancedSecurity + * features + * @param {string} username the username for the context data + * @returns {string} the user context data + **/ - AuthenticationDetails.prototype.getAuthParameters = function getAuthParameters() { - return this.authParameters; + CognitoUserPool.prototype.getUserContextData = function getUserContextData(username) { + if (typeof AmazonCognitoAdvancedSecurityData === 'undefined') { + return undefined; + } + /* eslint-disable */ + var amazonCognitoAdvancedSecurityDataConst = AmazonCognitoAdvancedSecurityData; + /* eslint-enable */ + + if (this.advancedSecurityDataCollectionFlag) { + var advancedSecurityData = amazonCognitoAdvancedSecurityDataConst.getData(username, this.userPoolId, this.clientId); + if (advancedSecurityData) { + var userContextData = { + EncodedData: advancedSecurityData + }; + return userContextData; + } + } + return {}; }; - return AuthenticationDetails; + return CognitoUserPool; }(); - exports.default = AuthenticationDetails; + exports.default = CognitoUserPool; /***/ }), -/* 20 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; - var _UserAgent = __webpack_require__(23); + var _jsCookie = __webpack_require__(27); - var _UserAgent2 = _interopRequireDefault(_UserAgent); + var Cookies = _interopRequireWildcard(_jsCookie); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /** @class */ - var Client = function () { + var CookieStorage = function () { + /** - * Constructs a new AWS Cognito Identity Provider client object - * @param {string} region AWS region - * @param {string} endpoint endpoint + * Constructs a new CookieStorage object + * @param {object} data Creation options. + * @param {string} data.domain Cookies domain (mandatory). + * @param {string} data.path Cookies path (default: '/') + * @param {integer} data.expires Cookie expiration (in days, default: 365) + * @param {boolean} data.secure Cookie secure flag (default: true) */ - function Client(region, endpoint) { - _classCallCheck(this, Client); + function CookieStorage(data) { + _classCallCheck(this, CookieStorage); - this.endpoint = endpoint || 'https://cognito-idp.' + region + '.amazonaws.com/'; - this.userAgent = _UserAgent2.default.prototype.userAgent || 'aws-amplify/0.1.x js'; + this.domain = data.domain; + if (data.path) { + this.path = data.path; + } else { + this.path = '/'; + } + if (Object.prototype.hasOwnProperty.call(data, 'expires')) { + this.expires = data.expires; + } else { + this.expires = 365; + } + if (Object.prototype.hasOwnProperty.call(data, 'secure')) { + this.secure = data.secure; + } else { + this.secure = true; + } } /** - * Makes an unauthenticated request on AWS Cognito Identity Provider API - * using fetch - * @param {string} operation API operation - * @param {object} params Input parameters - * @param {function} callback Callback called when a response is returned - * @returns {void} - */ + * This is used to set a specific item in storage + * @param {string} key - the key for the item + * @param {object} value - the value + * @returns {string} value that was set + */ - Client.prototype.request = function request(operation, params, callback) { - var headers = { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'AWSCognitoIdentityProviderService.' + operation, - 'X-Amz-User-Agent': this.userAgent - }; + CookieStorage.prototype.setItem = function setItem(key, value) { + Cookies.set(key, value, { + path: this.path, + expires: this.expires, + domain: this.domain, + secure: this.secure + }); + return Cookies.get(key); + }; - var options = { - headers: headers, - method: 'POST', - mode: 'cors', - cache: 'no-cache', - body: JSON.stringify(params) - }; + /** + * This is used to get a specific key from storage + * @param {string} key - the key for the item + * This is used to clear the storage + * @returns {string} the data item + */ - var response = void 0; - fetch(this.endpoint, options).then(function (resp) { - response = resp; - return resp; - }, function (err) { - // If error happens here, the request failed - // if it is TypeError throw network error - if (err instanceof TypeError) { - throw new Error('Network error'); - } - throw err; - }).then(function (resp) { - return resp.json().catch(function () { - return {}; - }); - }).then(function (data) { - if (response.ok) return callback(null, data); + CookieStorage.prototype.getItem = function getItem(key) { + return Cookies.get(key); + }; - // Taken from aws-sdk-js/lib/protocol/json.js - // eslint-disable-next-line no-underscore-dangle - var code = (data.__type || data.code).split('#').pop(); - var error = { - code: code, - name: code, - message: data.message || data.Message || null - }; - return callback(error); - }).catch(function (err) { - // default to return 'UnknownError' - var error = { code: 'UnknownError', message: 'Unkown error' }; + /** + * This is used to remove an item from storage + * @param {string} key - the key being set + * @returns {string} value - value that was deleted + */ - // first check if we have a service error - if (response && response.headers && response.headers.get('x-amzn-errortype')) { - try { - var code = response.headers.get('x-amz-errortype').split(':')[0]; - error = { - code: code, - name: code, - statusCode: response.status, - message: response.status ? response.status.toString() : null - }; - } catch (ex) {} - // pass through so it doesn't get swallowed if we can't parse it - // otherwise check if error is Network error - } else if (err instanceof Error && err.message === 'Network error') { - error = { - code: 'NetworkError', - name: err.name, - message: err.message - }; - } - return callback(error); + CookieStorage.prototype.removeItem = function removeItem(key) { + return Cookies.remove(key, { + path: this.path, + domain: this.domain, + secure: this.secure }); }; - return Client; + /** + * This is used to clear the storage + * @returns {string} nothing + */ + + + CookieStorage.prototype.clear = function clear() { + var cookies = Cookies.get(); + var index = void 0; + for (index = 0; index < cookies.length; ++index) { + Cookies.remove(cookies[index]); + } + return {}; + }; + + return CookieStorage; }(); - exports.default = Client; + exports.default = CookieStorage; /***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { +/* 19 */ +/***/ (function(module, exports) { 'use strict'; exports.__esModule = true; + // class for defining the amzn user-agent + exports.default = UserAgent; + // constructor - var _Client = __webpack_require__(20); - - var _Client2 = _interopRequireDefault(_Client); - - var _CognitoUser = __webpack_require__(9); + function UserAgent() {} + // public + UserAgent.prototype.userAgent = 'aws-amplify/0.1.x js'; - var _CognitoUser2 = _interopRequireDefault(_CognitoUser); +/***/ }), +/* 20 */ +/***/ (function(module, exports) { - var _StorageHelper = __webpack_require__(13); + 'use strict' - var _StorageHelper2 = _interopRequireDefault(_StorageHelper); + exports.byteLength = byteLength + exports.toByteArray = toByteArray + exports.fromByteArray = fromByteArray - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var lookup = [] + var revLookup = [] + var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /*! - * Copyright 2016 Amazon.com, - * Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Amazon Software License (the "License"). - * You may not use this file except in compliance with the - * License. A copy of the License is located at - * - * http://aws.amazon.com/asl/ - * - * or in the "license" file accompanying this file. This file is - * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, express or implied. See the License - * for the specific language governing permissions and - * limitations under the License. - */ + var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i + } - /** @class */ - var CognitoUserPool = function () { - /** - * Constructs a new CognitoUserPool object - * @param {object} data Creation options. - * @param {string} data.UserPoolId Cognito user pool id. - * @param {string} data.ClientId User pool application client id. - * @param {object} data.Storage Optional storage object. - * @param {boolean} data.AdvancedSecurityDataCollectionFlag Optional: - * boolean flag indicating if the data collection is enabled - * to support cognito advanced security features. By default, this - * flag is set to true. - */ - function CognitoUserPool(data) { - _classCallCheck(this, CognitoUserPool); + // Support decoding URL-safe base64 strings, as Node.js does. + // See: https://en.wikipedia.org/wiki/Base64#URL_applications + revLookup['-'.charCodeAt(0)] = 62 + revLookup['_'.charCodeAt(0)] = 63 - var _ref = data || {}, - UserPoolId = _ref.UserPoolId, - ClientId = _ref.ClientId, - endpoint = _ref.endpoint, - AdvancedSecurityDataCollectionFlag = _ref.AdvancedSecurityDataCollectionFlag; + function getLens (b64) { + var len = b64.length - if (!UserPoolId || !ClientId) { - throw new Error('Both UserPoolId and ClientId are required.'); - } - if (!/^[\w-]+_.+$/.test(UserPoolId)) { - throw new Error('Invalid UserPoolId format.'); - } - var region = UserPoolId.split('_')[0]; + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } - this.userPoolId = UserPoolId; - this.clientId = ClientId; + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len - this.client = new _Client2.default(region, endpoint); + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) - /** - * By default, AdvancedSecurityDataCollectionFlag is set to true, - * if no input value is provided. - */ - this.advancedSecurityDataCollectionFlag = AdvancedSecurityDataCollectionFlag !== false; + return [validLen, placeHoldersLen] + } - this.storage = data.Storage || new _StorageHelper2.default().getStorage(); - } + // base64 is 4/3 + up to two characters of the original data + function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen + } - /** - * @returns {string} the user pool id - */ + function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen + } + function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] - CognitoUserPool.prototype.getUserPoolId = function getUserPoolId() { - return this.userPoolId; - }; + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - /** - * @returns {string} the client id - */ + var curByte = 0 + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen - CognitoUserPool.prototype.getClientId = function getClientId() { - return this.clientId; - }; + for (var i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } - /** - * @typedef {object} SignUpResult - * @property {CognitoUser} user New user. - * @property {bool} userConfirmed If the user is already confirmed. - */ - /** - * method for signing up a user - * @param {string} username User's username. - * @param {string} password Plain-text initial password entered by user. - * @param {(AttributeArg[])=} userAttributes New user attributes. - * @param {(AttributeArg[])=} validationData Application metadata. - * @param {nodeCallback} callback Called on error or with the new user. - * @returns {void} - */ + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } - CognitoUserPool.prototype.signUp = function signUp(username, password, userAttributes, validationData, callback) { - var _this = this; + return arr + } - var jsonReq = { - ClientId: this.clientId, - Username: username, - Password: password, - UserAttributes: userAttributes, - ValidationData: validationData - }; - if (this.getUserContextData(username)) { - jsonReq.UserContextData = this.getUserContextData(username); - } - this.client.request('SignUp', jsonReq, function (err, data) { - if (err) { - return callback(err, null); - } + function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] + } - var cognitoUser = { - Username: username, - Pool: _this, - Storage: _this.storage - }; + function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') + } - var returnData = { - user: new _CognitoUser2.default(cognitoUser), - userConfirmed: data.UserConfirmed, - userSub: data.UserSub - }; + function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 - return callback(null, returnData); - }); - }; + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk( + uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) + )) + } - /** - * method for getting the current user of the application from the local storage - * - * @returns {CognitoUser} the user retrieved from storage - */ + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + return parts.join('') + } - CognitoUserPool.prototype.getCurrentUser = function getCurrentUser() { - var lastUserKey = 'CognitoIdentityServiceProvider.' + this.clientId + '.LastAuthUser'; - var lastAuthUser = this.storage.getItem(lastUserKey); - if (lastAuthUser) { - var cognitoUser = { - Username: lastAuthUser, - Pool: this, - Storage: this.storage - }; - - return new _CognitoUser2.default(cognitoUser); - } - - return null; - }; - - /** - * This method returns the encoded data string used for cognito advanced security feature. - * This would be generated only when developer has included the JS used for collecting the - * data on their client. Please refer to documentation to know more about using AdvancedSecurity - * features - * @param {string} username the username for the context data - * @returns {string} the user context data - **/ - - - CognitoUserPool.prototype.getUserContextData = function getUserContextData(username) { - if (typeof AmazonCognitoAdvancedSecurityData === 'undefined') { - return undefined; - } - /* eslint-disable */ - var amazonCognitoAdvancedSecurityDataConst = AmazonCognitoAdvancedSecurityData; - /* eslint-enable */ - - if (this.advancedSecurityDataCollectionFlag) { - var advancedSecurityData = amazonCognitoAdvancedSecurityDataConst.getData(username, this.userPoolId, this.clientId); - if (advancedSecurityData) { - var userContextData = { - EncodedData: advancedSecurityData - }; - return userContextData; - } - } - return {}; - }; - - return CognitoUserPool; - }(); - - exports.default = CognitoUserPool; - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - var _jsCookie = __webpack_require__(18); - - var Cookies = _interopRequireWildcard(_jsCookie); - - function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - /** @class */ - var CookieStorage = function () { - - /** - * Constructs a new CookieStorage object - * @param {object} data Creation options. - * @param {string} data.domain Cookies domain (mandatory). - * @param {string} data.path Cookies path (default: '/') - * @param {integer} data.expires Cookie expiration (in days, default: 365) - * @param {boolean} data.secure Cookie secure flag (default: true) - */ - function CookieStorage(data) { - _classCallCheck(this, CookieStorage); - - this.domain = data.domain; - if (data.path) { - this.path = data.path; - } else { - this.path = '/'; - } - if (Object.prototype.hasOwnProperty.call(data, 'expires')) { - this.expires = data.expires; - } else { - this.expires = 365; - } - if (Object.prototype.hasOwnProperty.call(data, 'secure')) { - this.secure = data.secure; - } else { - this.secure = true; - } - } - - /** - * This is used to set a specific item in storage - * @param {string} key - the key for the item - * @param {object} value - the value - * @returns {string} value that was set - */ - - - CookieStorage.prototype.setItem = function setItem(key, value) { - Cookies.set(key, value, { - path: this.path, - expires: this.expires, - domain: this.domain, - secure: this.secure - }); - return Cookies.get(key); - }; - - /** - * This is used to get a specific key from storage - * @param {string} key - the key for the item - * This is used to clear the storage - * @returns {string} the data item - */ - - - CookieStorage.prototype.getItem = function getItem(key) { - return Cookies.get(key); - }; - - /** - * This is used to remove an item from storage - * @param {string} key - the key being set - * @returns {string} value - value that was deleted - */ - - - CookieStorage.prototype.removeItem = function removeItem(key) { - return Cookies.remove(key, { - path: this.path, - domain: this.domain, - secure: this.secure - }); - }; - - /** - * This is used to clear the storage - * @returns {string} nothing - */ - - - CookieStorage.prototype.clear = function clear() { - var cookies = Cookies.get(); - var index = void 0; - for (index = 0; index < cookies.length; ++index) { - Cookies.remove(cookies[index]); - } - return {}; - }; - - return CookieStorage; - }(); - - exports.default = CookieStorage; - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - - 'use strict'; - - exports.__esModule = true; - // class for defining the amzn user-agent - exports.default = UserAgent; - // constructor - - function UserAgent() {} - // public - UserAgent.prototype.userAgent = 'aws-amplify/0.1.x js'; - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message @@ -6930,7 +6697,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 25 */ +/* 22 */ /***/ (function(module, exports) { // Original code adapted from Robert Kieffer. @@ -6967,7 +6734,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 26 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { /* @@ -7074,7 +6841,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 27 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { @@ -7158,6 +6925,278 @@ return /******/ (function(modules) { // webpackBootstrap }; +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + + exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) + } + + exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 + } + + +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + + var toString = {}.toString; + + module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; + }; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + * JavaScript Cookie v2.2.0 + * https://github.com/js-cookie/js-cookie + * + * Copyright 2006, 2015 Klaus Hartl & Fagner Brack + * Released under the MIT license + */ + ;(function (factory) { + var registeredInModuleLoader = false; + if (true) { + !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + registeredInModuleLoader = true; + } + if (true) { + module.exports = factory(); + registeredInModuleLoader = true; + } + if (!registeredInModuleLoader) { + var OldCookies = window.Cookies; + var api = window.Cookies = factory(); + api.noConflict = function () { + window.Cookies = OldCookies; + return api; + }; + } + }(function () { + function extend () { + var i = 0; + var result = {}; + for (; i < arguments.length; i++) { + var attributes = arguments[ i ]; + for (var key in attributes) { + result[key] = attributes[key]; + } + } + return result; + } + + function init (converter) { + function api (key, value, attributes) { + var result; + if (typeof document === 'undefined') { + return; + } + + // Write + + if (arguments.length > 1) { + attributes = extend({ + path: '/' + }, api.defaults, attributes); + + if (typeof attributes.expires === 'number') { + var expires = new Date(); + expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5); + attributes.expires = expires; + } + + // We're using "expires" because "max-age" is not supported by IE + attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; + + try { + result = JSON.stringify(value); + if (/^[\{\[]/.test(result)) { + value = result; + } + } catch (e) {} + + if (!converter.write) { + value = encodeURIComponent(String(value)) + .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); + } else { + value = converter.write(value, key); + } + + key = encodeURIComponent(String(key)); + key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent); + key = key.replace(/[\(\)]/g, escape); + + var stringifiedAttributes = ''; + + for (var attributeName in attributes) { + if (!attributes[attributeName]) { + continue; + } + stringifiedAttributes += '; ' + attributeName; + if (attributes[attributeName] === true) { + continue; + } + stringifiedAttributes += '=' + attributes[attributeName]; + } + return (document.cookie = key + '=' + value + stringifiedAttributes); + } + + // Read + + if (!key) { + result = {}; + } + + // To prevent the for loop in the first place assign an empty array + // in case there are no cookies at all. Also prevents odd result when + // calling "get()" + var cookies = document.cookie ? document.cookie.split('; ') : []; + var rdecode = /(%[0-9A-Z]{2})+/g; + var i = 0; + + for (; i < cookies.length; i++) { + var parts = cookies[i].split('='); + var cookie = parts.slice(1).join('='); + + if (!this.json && cookie.charAt(0) === '"') { + cookie = cookie.slice(1, -1); + } + + try { + var name = parts[0].replace(rdecode, decodeURIComponent); + cookie = converter.read ? + converter.read(cookie, name) : converter(cookie, name) || + cookie.replace(rdecode, decodeURIComponent); + + if (this.json) { + try { + cookie = JSON.parse(cookie); + } catch (e) {} + } + + if (key === name) { + result = cookie; + break; + } + + if (!key) { + result[name] = cookie; + } + } catch (e) {} + } + + return result; + } + + api.set = api; + api.get = function (key) { + return api.call(api, key); + }; + api.getJSON = function () { + return api.apply({ + json: true + }, [].slice.call(arguments)); + }; + api.defaults = {}; + + api.remove = function (key, attributes) { + api(key, '', extend(attributes, { + expires: -1 + })); + }; + + api.withConverter = init; + + return api; + } + + return init(function () {}); + })); + + /***/ }) /******/ ]) }); diff --git a/packages/amazon-cognito-identity-js/dist/amazon-cognito-identity.min.js b/packages/amazon-cognito-identity-js/dist/amazon-cognito-identity.min.js index 1737e5266a2..0eca513e04a 100644 --- a/packages/amazon-cognito-identity-js/dist/amazon-cognito-identity.min.js +++ b/packages/amazon-cognito-identity-js/dist/amazon-cognito-identity.min.js @@ -14,13 +14,13 @@ * for the specific language governing permissions and * limitations under the License. */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AmazonCognitoIdentity=t():e.AmazonCognitoIdentity=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(19);Object.defineProperty(t,"AuthenticationDetails",{enumerable:!0,get:function(){return r(i).default}});var o=n(3);Object.defineProperty(t,"AuthenticationHelper",{enumerable:!0,get:function(){return r(o).default}});var s=n(5);Object.defineProperty(t,"CognitoAccessToken",{enumerable:!0,get:function(){return r(s).default}});var a=n(6);Object.defineProperty(t,"CognitoIdToken",{enumerable:!0,get:function(){return r(a).default}});var u=n(8);Object.defineProperty(t,"CognitoRefreshToken",{enumerable:!0,get:function(){return r(u).default}});var c=n(9);Object.defineProperty(t,"CognitoUser",{enumerable:!0,get:function(){return r(c).default}});var h=n(10);Object.defineProperty(t,"CognitoUserAttribute",{enumerable:!0,get:function(){return r(h).default}});var f=n(21);Object.defineProperty(t,"CognitoUserPool",{enumerable:!0,get:function(){return r(f).default}});var l=n(11);Object.defineProperty(t,"CognitoUserSession",{enumerable:!0,get:function(){return r(l).default}});var p=n(22);Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return r(p).default}});var d=n(12);Object.defineProperty(t,"DateHelper",{enumerable:!0,get:function(){return r(d).default}})},function(e,t,n){(function(e){/*! +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AmazonCognitoIdentity=t():e.AmazonCognitoIdentity=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(15);Object.defineProperty(t,"AuthenticationDetails",{enumerable:!0,get:function(){return r(i).default}});var o=n(3);Object.defineProperty(t,"AuthenticationHelper",{enumerable:!0,get:function(){return r(o).default}});var s=n(5);Object.defineProperty(t,"CognitoAccessToken",{enumerable:!0,get:function(){return r(s).default}});var a=n(6);Object.defineProperty(t,"CognitoIdToken",{enumerable:!0,get:function(){return r(a).default}});var u=n(8);Object.defineProperty(t,"CognitoRefreshToken",{enumerable:!0,get:function(){return r(u).default}});var c=n(9);Object.defineProperty(t,"CognitoUser",{enumerable:!0,get:function(){return r(c).default}});var h=n(10);Object.defineProperty(t,"CognitoUserAttribute",{enumerable:!0,get:function(){return r(h).default}});var f=n(17);Object.defineProperty(t,"CognitoUserPool",{enumerable:!0,get:function(){return r(f).default}});var l=n(11);Object.defineProperty(t,"CognitoUserSession",{enumerable:!0,get:function(){return r(l).default}});var p=n(18);Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return r(p).default}});var d=n(12);Object.defineProperty(t,"DateHelper",{enumerable:!0,get:function(){return r(d).default}})},function(e,t,n){(function(e){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -"use strict";function r(){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}}function i(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),s.alloc(+e)}function y(e,t){if(s.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 H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return H(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return F(this,t,n);case"utf8":case"utf-8":return P(this,t,n);case"ascii":return b(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return R(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function S(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(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=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:A(e,t,n,r,i);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):A(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function A(e,t,n,r,i){function o(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}var c;if(i){var h=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var f=!0,l=0;li&&(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;s239?4:o>223?3:o>191?2:1;if(i+a<=n){var u,c,h,f;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(s=f));break;case 3:u=e[i+1],c=e[i+2],128===(192&u)&&128===(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:u=e[i+1],c=e[i+2],h=e[i+3],128===(192&u)&&128===(192&c)&&128===(192&h)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&h,f>65535&&f<1114112&&(s=f))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return _(r)}function _(e){var t=e.length;if(t<=ee)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 x(e,t,n,r,i,o){if(!s.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 O(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 N(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 V(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 K(e,t,n,r,i){return i||V(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,n,r,23,4),n+4}function q(e,t,n,r,i){return i||V(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,n,r,52,8),n+8}function L(e){if(e=Y(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function Y(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(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=(i-55296<<10|n-56320)+65536}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 J(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function G(e){return X.toByteArray(L(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Z(e){return e!==e}var X=n(15),Q=n(16),$=n(17);t.Buffer=s,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return a(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return c(null,e,t,n)},s.allocUnsafe=function(e){return h(null,e)},s.allocUnsafeSlow=function(e){return h(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,i){if(!s.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(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,a=n-t,u=Math.min(o,a),c=this.slice(r,i),h=e.slice(t,n),f=0;fi)&&(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 C(this,e,t,n);case"utf8":case"utf-8":return U(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return D(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),Q.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),Q.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),Q.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),Q.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;x(this,e,t,n,i,0)}var o=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+o]=e/s&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);x(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},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);x(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},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return K(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return K(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return q(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return q(this,e,t,!1,n)},s.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(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o=0;){var s=t*this[e++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i}function o(e,t,n,r,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,h=a*u+c*s;u=s*u+((32767&h)<<15)+n[r]+(1073741823&i),i=(u>>>30)+(h>>>15)+a*c+(i>>>30),n[r++]=1073741823&u}return i}function s(e,t,n,r,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,h=a*u+c*s;u=s*u+((16383&h)<<14)+n[r]+i,i=(u>>28)+(h>>14)+a*c,n[r++]=268435455&u}return i}function a(e){return Z.charAt(e)}function u(e,t){var n=X[e.charCodeAt(t)];return null==n?-1:n}function c(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function h(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}function f(e){var t=r();return t.fromInt(e),t}function l(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,o=!1,s=0;--i>=0;){var a=u(e,i);a<0?"-"==e.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}this.clamp(),o&&n.ZERO.subTo(this,this)}function p(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function d(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&&(i=!0,o=a(n));s>=0;)u>(u+=this.DB-t)):(n=this[s]>>(u-=t)&r,u<=0&&(u+=this.DB,--s)),n>0&&(i=!0),i&&(o+=a(n));return i?o:"0"}function g(){var e=r();return n.ZERO.subTo(this,e),e}function v(){return this.s<0?this.negate():this}function y(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(t=n-e.t,0!=t)return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0}function m(e){var t,n=1;return 0!=(t=e>>>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 S(){return this.t<=0?0:this.DB*(this.t-1)+m(this[this.t-1]^this.s&this.DM)}function w(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}function A(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()}function U(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)return void(t.t=0);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()}function T(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()}function I(e,t,i){var o=e.abs();if(!(o.t<=0)){var s=this.abs();if(s.t0?(o.lShiftTo(h,a),s.lShiftTo(h,i)):(o.copyTo(a),s.copyTo(i));var f=a.t,l=a[f-1];if(0!=l){var p=l*(1<1?a[f-2]>>this.F2:0),d=this.FV/p,g=(1<=0&&(i[i.t++]=1,i.subTo(w,i)),n.ONE.dlShiftTo(f,w),w.subTo(a,a);a.t=0;){var A=i[--y]==l?this.DM:Math.floor(i[y]*d+(i[y-1]+v)*g);if((i[y]+=a.am(0,A,i,S,0,f))0&&i.rShiftTo(h,i),u<0&&n.ZERO.subTo(i,i)}}}function R(e){var t=r();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t}function P(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return t=t*(2-(15&e)*t)&15,t=t*(2-(255&e)*t)&255,t=t*(2-((65535&e)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function _(e){return 0==this.compareTo(e)}function b(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()}function k(e){var t=r();return this.addTo(e,t),t}function F(e){var t=r();return this.subTo(e,t),t}function B(e){var t=r();return this.multiplyTo(e,t),t}function M(e){var t=r();return this.divRemTo(e,t,null),t}function x(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(t,t),t}function N(e){var t=r();return e.copyTo(t),this.reduce(t),t}function V(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=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)}function K(e,t){e.squareTo(t),this.reduce(t)}function q(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function L(e,t,n){var i,o=e.bitLength(),s=f(1),a=new x(t);if(o<=0)return s;i=o<18?1:o<48?3:o<144?4:o<768?5:6;var u=new Array,c=3,h=i-1,l=(1<1){var p=r();for(a.sqrTo(u[1],p);c<=l;)u[c]=r(),a.mulTo(p,u[c-2],u[c]),c+=2}var d,g,v=e.t-1,y=!0,S=r();for(o=m(e[v])-1;v>=0;){for(o>=h?d=e[v]>>o-h&l:(d=(e[v]&(1<0&&(d|=e[v-1]>>this.DB+o-h)),c=i;0==(1&d);)d>>=1,--c;if((o-=c)<0&&(o+=this.DB,--v),y)u[d].copyTo(s),y=!1;else{for(;c>1;)a.sqrTo(s,S),a.sqrTo(S,s),c-=2;c>0?a.sqrTo(s,S):(g=s,s=S,S=g),a.mulTo(S,u[d],s)}for(;v>=0&&0==(e[v]&1<=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),s.alloc(+e)}function y(e,t){if(s.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 H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return H(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return F(this,t,n);case"utf8":case"utf-8":return P(this,t,n);case"ascii":return b(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return R(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function S(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function w(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=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:A(e,t,n,r,i);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):A(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function A(e,t,n,r,i){function o(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}var c;if(i){var h=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var f=!0,l=0;li&&(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;s239?4:o>223?3:o>191?2:1;if(i+a<=n){var u,c,h,f;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(s=f));break;case 3:u=e[i+1],c=e[i+2],128===(192&u)&&128===(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:u=e[i+1],c=e[i+2],h=e[i+3],128===(192&u)&&128===(192&c)&&128===(192&h)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&h,f>65535&&f<1114112&&(s=f))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return _(r)}function _(e){var t=e.length;if(t<=ee)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 x(e,t,n,r,i,o){if(!s.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 O(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 N(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 V(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 K(e,t,n,r,i){return i||V(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,n,r,23,4),n+4}function q(e,t,n,r,i){return i||V(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,n,r,52,8),n+8}function L(e){if(e=Y(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function Y(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function H(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=(i-55296<<10|n-56320)+65536}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 J(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function G(e){return X.toByteArray(L(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Z(e){return e!==e}var X=n(20),Q=n(25),$=n(26);t.Buffer=s,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return a(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return c(null,e,t,n)},s.allocUnsafe=function(e){return h(null,e)},s.allocUnsafeSlow=function(e){return h(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,i){if(!s.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(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,a=n-t,u=Math.min(o,a),c=this.slice(r,i),h=e.slice(t,n),f=0;fi)&&(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 C(this,e,t,n);case"utf8":case"utf-8":return U(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return D(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),Q.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),Q.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),Q.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),Q.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;x(this,e,t,n,i,0)}var o=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+o]=e/s&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);x(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},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);x(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},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return K(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return K(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return q(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return q(this,e,t,!1,n)},s.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(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o=0;){var s=t*this[e++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i}function o(e,t,n,r,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,h=a*u+c*s;u=s*u+((32767&h)<<15)+n[r]+(1073741823&i),i=(u>>>30)+(h>>>15)+a*c+(i>>>30),n[r++]=1073741823&u}return i}function s(e,t,n,r,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,h=a*u+c*s;u=s*u+((16383&h)<<14)+n[r]+i,i=(u>>28)+(h>>14)+a*c,n[r++]=268435455&u}return i}function a(e){return Z.charAt(e)}function u(e,t){var n=X[e.charCodeAt(t)];return null==n?-1:n}function c(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function h(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}function f(e){var t=r();return t.fromInt(e),t}function l(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,o=!1,s=0;--i>=0;){var a=u(e,i);a<0?"-"==e.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}this.clamp(),o&&n.ZERO.subTo(this,this)}function p(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function d(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&&(i=!0,o=a(n));s>=0;)u>(u+=this.DB-t)):(n=this[s]>>(u-=t)&r,u<=0&&(u+=this.DB,--s)),n>0&&(i=!0),i&&(o+=a(n));return i?o:"0"}function g(){var e=r();return n.ZERO.subTo(this,e),e}function v(){return this.s<0?this.negate():this}function y(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(t=n-e.t,0!=t)return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0}function m(e){var t,n=1;return 0!=(t=e>>>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 S(){return this.t<=0?0:this.DB*(this.t-1)+m(this[this.t-1]^this.s&this.DM)}function w(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}function A(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()}function U(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)return void(t.t=0);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()}function T(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()}function I(e,t,i){var o=e.abs();if(!(o.t<=0)){var s=this.abs();if(s.t0?(o.lShiftTo(h,a),s.lShiftTo(h,i)):(o.copyTo(a),s.copyTo(i));var f=a.t,l=a[f-1];if(0!=l){var p=l*(1<1?a[f-2]>>this.F2:0),d=this.FV/p,g=(1<=0&&(i[i.t++]=1,i.subTo(w,i)),n.ONE.dlShiftTo(f,w),w.subTo(a,a);a.t=0;){var A=i[--y]==l?this.DM:Math.floor(i[y]*d+(i[y-1]+v)*g);if((i[y]+=a.am(0,A,i,S,0,f))0&&i.rShiftTo(h,i),u<0&&n.ZERO.subTo(i,i)}}}function R(e){var t=r();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t}function P(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return t=t*(2-(15&e)*t)&15,t=t*(2-(255&e)*t)&255,t=t*(2-((65535&e)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function _(e){return 0==this.compareTo(e)}function b(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()}function k(e){var t=r();return this.addTo(e,t),t}function F(e){var t=r();return this.subTo(e,t),t}function B(e){var t=r();return this.multiplyTo(e,t),t}function M(e){var t=r();return this.divRemTo(e,t,null),t}function x(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(t,t),t}function N(e){var t=r();return e.copyTo(t),this.reduce(t),t}function V(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=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)}function K(e,t){e.squareTo(t),this.reduce(t)}function q(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function L(e,t,n){var i,o=e.bitLength(),s=f(1),a=new x(t);if(o<=0)return s;i=o<18?1:o<48?3:o<144?4:o<768?5:6;var u=new Array,c=3,h=i-1,l=(1<1){var p=r();for(a.sqrTo(u[1],p);c<=l;)u[c]=r(),a.mulTo(p,u[c-2],u[c]),c+=2}var d,g,v=e.t-1,y=!0,S=r();for(o=m(e[v])-1;v>=0;){for(o>=h?d=e[v]>>o-h&l:(d=(e[v]&(1<0&&(d|=e[v-1]>>this.DB+o-h)),c=i;0==(1&d);)d>>=1,--c;if((o-=c)<0&&(o+=this.DB,--v),y)u[d].copyTo(s),y=!1;else{for(;c>1;)a.sqrTo(s,S),a.sqrTo(S,s),c-=2;c>0?a.sqrTo(s,S):(g=s,s=S,S=g),a.mulTo(S,u[d],s)}for(;v>=0&&0==(e[v]&1<0&&void 0!==arguments[0]?arguments[0]:{},r=n.AccessToken;return i(this,t),o(this,e.call(this,r||""))}return s(t,e),t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=n(7),u=r(a),c=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.IdToken;return i(this,t),o(this,e.call(this,r||""))}return s(t,e),t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=n(1),o=function(){function e(t){r(this,e),this.jwtToken=t||"",this.payload=this.decodePayload()}return e.prototype.getJwtToken=function(){return this.jwtToken},e.prototype.getExpiration=function(){return this.payload.exp},e.prototype.getIssuedAt=function(){return this.payload.iat},e.prototype.decodePayload=function(){var e=this.jwtToken.split(".")[1];try{return JSON.parse(i.Buffer.from(e,"base64").toString("utf8"))}catch(e){return{}}},e}();t.default=o},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;/*! * Copyright 2016 Amazon.com, * Inc. or its affiliates. All Rights Reserved. @@ -101,7 +101,7 @@ var r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"], * for the specific language governing permissions and * limitations under the License. */ -var r={},i=function(){function e(){n(this,e)}return e.setItem=function(e,t){return r[e]=t,r[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0},e.removeItem=function(e){return delete r[e]},e.clear=function(){return r={}},e}(),o=function(){function e(){n(this,e);try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch(e){this.storageWindow=i}}return e.prototype.getStorage=function(){return this.storageWindow},e}();t.default=o},function(e,t,n){function r(e,t,n){a.isBuffer(t)||(t=new a(t)),a.isBuffer(n)||(n=new a(n)),t.length>p?t=e(t):t.length0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function i(e){var t,r,i,o,s,a=e.length;o=n(e),s=new h(3*a/4-o),r=o>0?a-4:a;var u=0;for(t=0;t>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,s[u++]=255&i):1===o&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,n){for(var r,i=[],s=t;sh?h:c+a));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=r,t.toByteArray=i,t.fromByteArray=a;for(var u=[],c=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=f.length;l>1,h=-7,f=n?i-1:0,l=n?-1:1,p=e[t+f];for(f+=l,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+e[t+f],f+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+e[t+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,c=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=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=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+f>=1?l/u:l*Math.pow(2,1-f),t*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;e[n+p]=255&s,p+=d,s/=256,c-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){var r,i;!function(o){var s=!1;if(r=o,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i)),s=!0,e.exports=o(),s=!0,!s){var a=window.Cookies,u=window.Cookies=o();u.noConflict=function(){return window.Cookies=a,u}}}(function(){function e(){for(var e=0,t={};e1){if(o=e({path:"/"},r.defaults,o),"number"==typeof o.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}o.expires=o.expires?o.expires.toUTCString():"";try{s=JSON.stringify(i),/^[\{\[]/.test(s)&&(i=s)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape);var u="";for(var c in o)o[c]&&(u+="; "+c,o[c]!==!0&&(u+="="+o[c]));return document.cookie=t+"="+i+u}t||(s={});for(var h=document.cookie?document.cookie.split("; "):[],f=/(%[0-9A-Z]{2})+/g,l=0;lp?t=e(t):t.length>5]|=128<>>9<<4)+14]=t;for(var n=1732584193,r=-271733879,i=-1732584194,h=271733878,f=0;f>16)+(t>>16)+(n>>16);return r<<16|65535&n}function h(e,t){return e<>>32-t}var f=n(2);e.exports=function(e){return f.hash(e,r,16)}},function(e,t){!function(){var t,n,r=this;t=function(e){for(var t,t,n=new Array(e),r=0;r>>((3&r)<<3)&255;return n},r.crypto&&crypto.getRandomValues&&(n=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),e.exports=n||t}()},function(e,t,n){function r(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),r=1732584193,u=-271733879,c=-1732584194,h=271733878,f=-1009589776,l=0;l>16)+(t>>16)+(n>>16);return r<<16|65535&n}function a(e,t){return e<>>32-t}var u=n(2);e.exports=function(e){return u.hash(e,r,20,!0)}},function(e,t,n){var r=n(2),i=function(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<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},c=function(e){return o(e,2)^o(e,13)^o(e,22)},h=function(e){return o(e,6)^o(e,11)^o(e,25)},f=function(e){return o(e,7)^o(e,18)^s(e,3)},l=function(e){return o(e,17)^o(e,19)^s(e,10)},p=function(e,t){var n,r,o,s,p,d,g,v,y,m,S,w,A=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),C=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),U=new Array(64);e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var y=0;y0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function r(e){var t=n(e),r=t[0],i=t[1];return 3*(r+i)/4-i}function i(e,t,n){return 3*(t+n)/4-n}function o(e){for(var t,r=n(e),o=r[0],s=r[1],a=new f(i(e,o,s)),u=0,c=s>0?o-4:o,l=0;l>16&255,a[u++]=t>>8&255,a[u++]=255&t;return 2===s&&(t=h[e.charCodeAt(l)]<<2|h[e.charCodeAt(l+1)]>>4,a[u++]=255&t),1===s&&(t=h[e.charCodeAt(l)]<<10|h[e.charCodeAt(l+1)]<<4|h[e.charCodeAt(l+2)]>>2,a[u++]=t>>8&255,a[u++]=255&t),a}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function a(e,t,n){for(var r,i=[],o=t;ou?u:s+o));return 1===r?(t=e[n-1],i.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),i.join("")}t.byteLength=r,t.toByteArray=o,t.fromByteArray=u;for(var c=[],h=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=l.length;p>5]|=128<>>9<<4)+14]=t;for(var n=1732584193,r=-271733879,i=-1732584194,h=271733878,f=0;f>16)+(t>>16)+(n>>16);return r<<16|65535&n}function h(e,t){return e<>>32-t}var f=n(2);e.exports=function(e){return f.hash(e,r,16)}},function(e,t){!function(){var t,n,r=this;t=function(e){for(var t,t,n=new Array(e),r=0;r>>((3&r)<<3)&255;return n},r.crypto&&crypto.getRandomValues&&(n=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),e.exports=n||t}()},function(e,t,n){function r(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),r=1732584193,u=-271733879,c=-1732584194,h=271733878,f=-1009589776,l=0;l>16)+(t>>16)+(n>>16);return r<<16|65535&n}function a(e,t){return e<>>32-t}var u=n(2);e.exports=function(e){return u.hash(e,r,20,!0)}},function(e,t,n){var r=n(2),i=function(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<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},c=function(e){return o(e,2)^o(e,13)^o(e,22)},h=function(e){return o(e,6)^o(e,11)^o(e,25)},f=function(e){return o(e,7)^o(e,18)^s(e,3)},l=function(e){return o(e,17)^o(e,19)^s(e,10)},p=function(e,t){var n,r,o,s,p,d,g,v,y,m,S,w,A=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),C=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),U=new Array(64);e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var y=0;y>1,h=-7,f=n?i-1:0,l=n?-1:1,p=e[t+f];for(f+=l,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+e[t+f],f+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+e[t+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,c=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=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=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+f>=1?l/u:l*Math.pow(2,1-f),t*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;e[n+p]=255&s,p+=d,s/=256,c-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){var r,i;!function(o){var s=!1;if(r=o,i="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==i&&(e.exports=i)),s=!0,e.exports=o(),s=!0,!s){var a=window.Cookies,u=window.Cookies=o();u.noConflict=function(){return window.Cookies=a,u}}}(function(){function e(){for(var e=0,t={};e1){if(o=e({path:"/"},r.defaults,o),"number"==typeof o.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}o.expires=o.expires?o.expires.toUTCString():"";try{s=JSON.stringify(i),/^[\{\[]/.test(s)&&(i=s)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape);var u="";for(var c in o)o[c]&&(u+="; "+c,o[c]!==!0&&(u+="="+o[c]));return document.cookie=t+"="+i+u}t||(s={});for(var h=document.cookie?document.cookie.split("; "):[],f=/(%[0-9A-Z]{2})+/g,l=0;l \n\t * @license MIT\n\t */\n\t/* eslint-disable no-proto */\n\t\n\t'use strict'\n\t\n\tvar base64 = __webpack_require__(15)\n\tvar ieee754 = __webpack_require__(16)\n\tvar isArray = __webpack_require__(17)\n\t\n\texports.Buffer = Buffer\n\texports.SlowBuffer = SlowBuffer\n\texports.INSPECT_MAX_BYTES = 50\n\t\n\t/**\n\t * If `Buffer.TYPED_ARRAY_SUPPORT`:\n\t * === true Use Uint8Array implementation (fastest)\n\t * === false Use Object implementation (most compatible, even IE6)\n\t *\n\t * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n\t * Opera 11.6+, iOS 4.2+.\n\t *\n\t * Due to various browser bugs, sometimes the Object implementation will be used even\n\t * when the browser supports typed arrays.\n\t *\n\t * Note:\n\t *\n\t * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n\t * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n\t *\n\t * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n\t *\n\t * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n\t * incorrect length in some situations.\n\t\n\t * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n\t * get the Object implementation, which is slower but behaves correctly.\n\t */\n\tBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n\t ? global.TYPED_ARRAY_SUPPORT\n\t : typedArraySupport()\n\t\n\t/*\n\t * Export kMaxLength after typed array support is determined.\n\t */\n\texports.kMaxLength = kMaxLength()\n\t\n\tfunction typedArraySupport () {\n\t try {\n\t var arr = new Uint8Array(1)\n\t arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n\t return arr.foo() === 42 && // typed array instances can be augmented\n\t typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n\t arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n\t } catch (e) {\n\t return false\n\t }\n\t}\n\t\n\tfunction kMaxLength () {\n\t return Buffer.TYPED_ARRAY_SUPPORT\n\t ? 0x7fffffff\n\t : 0x3fffffff\n\t}\n\t\n\tfunction createBuffer (that, length) {\n\t if (kMaxLength() < length) {\n\t throw new RangeError('Invalid typed array length')\n\t }\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t // Return an augmented `Uint8Array` instance, for best performance\n\t that = new Uint8Array(length)\n\t that.__proto__ = Buffer.prototype\n\t } else {\n\t // Fallback: Return an object instance of the Buffer class\n\t if (that === null) {\n\t that = new Buffer(length)\n\t }\n\t that.length = length\n\t }\n\t\n\t return that\n\t}\n\t\n\t/**\n\t * The Buffer constructor returns instances of `Uint8Array` that have their\n\t * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n\t * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n\t * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n\t * returns a single octet.\n\t *\n\t * The `Uint8Array` prototype remains unmodified.\n\t */\n\t\n\tfunction Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}\n\t\n\tBuffer.poolSize = 8192 // not used by this implementation\n\t\n\t// TODO: Legacy, not needed anymore. Remove in next major version.\n\tBuffer._augment = function (arr) {\n\t arr.__proto__ = Buffer.prototype\n\t return arr\n\t}\n\t\n\tfunction from (that, value, encodingOrOffset, length) {\n\t if (typeof value === 'number') {\n\t throw new TypeError('\"value\" argument must not be a number')\n\t }\n\t\n\t if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n\t return fromArrayBuffer(that, value, encodingOrOffset, length)\n\t }\n\t\n\t if (typeof value === 'string') {\n\t return fromString(that, value, encodingOrOffset)\n\t }\n\t\n\t return fromObject(that, value)\n\t}\n\t\n\t/**\n\t * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n\t * if value is a number.\n\t * Buffer.from(str[, encoding])\n\t * Buffer.from(array)\n\t * Buffer.from(buffer)\n\t * Buffer.from(arrayBuffer[, byteOffset[, length]])\n\t **/\n\tBuffer.from = function (value, encodingOrOffset, length) {\n\t return from(null, value, encodingOrOffset, length)\n\t}\n\t\n\tif (Buffer.TYPED_ARRAY_SUPPORT) {\n\t Buffer.prototype.__proto__ = Uint8Array.prototype\n\t Buffer.__proto__ = Uint8Array\n\t if (typeof Symbol !== 'undefined' && Symbol.species &&\n\t Buffer[Symbol.species] === Buffer) {\n\t // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n\t Object.defineProperty(Buffer, Symbol.species, {\n\t value: null,\n\t configurable: true\n\t })\n\t }\n\t}\n\t\n\tfunction assertSize (size) {\n\t if (typeof size !== 'number') {\n\t throw new TypeError('\"size\" argument must be a number')\n\t } else if (size < 0) {\n\t throw new RangeError('\"size\" argument must not be negative')\n\t }\n\t}\n\t\n\tfunction alloc (that, size, fill, encoding) {\n\t assertSize(size)\n\t if (size <= 0) {\n\t return createBuffer(that, size)\n\t }\n\t if (fill !== undefined) {\n\t // Only pay attention to encoding if it's a string. This\n\t // prevents accidentally sending in a number that would\n\t // be interpretted as a start offset.\n\t return typeof encoding === 'string'\n\t ? createBuffer(that, size).fill(fill, encoding)\n\t : createBuffer(that, size).fill(fill)\n\t }\n\t return createBuffer(that, size)\n\t}\n\t\n\t/**\n\t * Creates a new filled Buffer instance.\n\t * alloc(size[, fill[, encoding]])\n\t **/\n\tBuffer.alloc = function (size, fill, encoding) {\n\t return alloc(null, size, fill, encoding)\n\t}\n\t\n\tfunction allocUnsafe (that, size) {\n\t assertSize(size)\n\t that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t for (var i = 0; i < size; ++i) {\n\t that[i] = 0\n\t }\n\t }\n\t return that\n\t}\n\t\n\t/**\n\t * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n\t * */\n\tBuffer.allocUnsafe = function (size) {\n\t return allocUnsafe(null, size)\n\t}\n\t/**\n\t * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n\t */\n\tBuffer.allocUnsafeSlow = function (size) {\n\t return allocUnsafe(null, size)\n\t}\n\t\n\tfunction fromString (that, string, encoding) {\n\t if (typeof encoding !== 'string' || encoding === '') {\n\t encoding = 'utf8'\n\t }\n\t\n\t if (!Buffer.isEncoding(encoding)) {\n\t throw new TypeError('\"encoding\" must be a valid string encoding')\n\t }\n\t\n\t var length = byteLength(string, encoding) | 0\n\t that = createBuffer(that, length)\n\t\n\t var actual = that.write(string, encoding)\n\t\n\t if (actual !== length) {\n\t // Writing a hex string, for example, that contains invalid characters will\n\t // cause everything after the first invalid character to be ignored. (e.g.\n\t // 'abxxcd' will be treated as 'ab')\n\t that = that.slice(0, actual)\n\t }\n\t\n\t return that\n\t}\n\t\n\tfunction fromArrayLike (that, array) {\n\t var length = array.length < 0 ? 0 : checked(array.length) | 0\n\t that = createBuffer(that, length)\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}\n\t\n\tfunction fromArrayBuffer (that, array, byteOffset, length) {\n\t array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\t\n\t if (byteOffset < 0 || array.byteLength < byteOffset) {\n\t throw new RangeError('\\'offset\\' is out of bounds')\n\t }\n\t\n\t if (array.byteLength < byteOffset + (length || 0)) {\n\t throw new RangeError('\\'length\\' is out of bounds')\n\t }\n\t\n\t if (byteOffset === undefined && length === undefined) {\n\t array = new Uint8Array(array)\n\t } else if (length === undefined) {\n\t array = new Uint8Array(array, byteOffset)\n\t } else {\n\t array = new Uint8Array(array, byteOffset, length)\n\t }\n\t\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t // Return an augmented `Uint8Array` instance, for best performance\n\t that = array\n\t that.__proto__ = Buffer.prototype\n\t } else {\n\t // Fallback: Return an object instance of the Buffer class\n\t that = fromArrayLike(that, array)\n\t }\n\t return that\n\t}\n\t\n\tfunction fromObject (that, obj) {\n\t if (Buffer.isBuffer(obj)) {\n\t var len = checked(obj.length) | 0\n\t that = createBuffer(that, len)\n\t\n\t if (that.length === 0) {\n\t return that\n\t }\n\t\n\t obj.copy(that, 0, 0, len)\n\t return that\n\t }\n\t\n\t if (obj) {\n\t if ((typeof ArrayBuffer !== 'undefined' &&\n\t obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n\t if (typeof obj.length !== 'number' || isnan(obj.length)) {\n\t return createBuffer(that, 0)\n\t }\n\t return fromArrayLike(that, obj)\n\t }\n\t\n\t if (obj.type === 'Buffer' && isArray(obj.data)) {\n\t return fromArrayLike(that, obj.data)\n\t }\n\t }\n\t\n\t throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n\t}\n\t\n\tfunction checked (length) {\n\t // Note: cannot use `length < kMaxLength()` here because that fails when\n\t // length is NaN (which is otherwise coerced to zero.)\n\t if (length >= kMaxLength()) {\n\t throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n\t 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n\t }\n\t return length | 0\n\t}\n\t\n\tfunction SlowBuffer (length) {\n\t if (+length != length) { // eslint-disable-line eqeqeq\n\t length = 0\n\t }\n\t return Buffer.alloc(+length)\n\t}\n\t\n\tBuffer.isBuffer = function isBuffer (b) {\n\t return !!(b != null && b._isBuffer)\n\t}\n\t\n\tBuffer.compare = function compare (a, b) {\n\t if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n\t throw new TypeError('Arguments must be Buffers')\n\t }\n\t\n\t if (a === b) return 0\n\t\n\t var x = a.length\n\t var y = b.length\n\t\n\t for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n\t if (a[i] !== b[i]) {\n\t x = a[i]\n\t y = b[i]\n\t break\n\t }\n\t }\n\t\n\t if (x < y) return -1\n\t if (y < x) return 1\n\t return 0\n\t}\n\t\n\tBuffer.isEncoding = function isEncoding (encoding) {\n\t switch (String(encoding).toLowerCase()) {\n\t case 'hex':\n\t case 'utf8':\n\t case 'utf-8':\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t case 'base64':\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return true\n\t default:\n\t return false\n\t }\n\t}\n\t\n\tBuffer.concat = function concat (list, length) {\n\t if (!isArray(list)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers')\n\t }\n\t\n\t if (list.length === 0) {\n\t return Buffer.alloc(0)\n\t }\n\t\n\t var i\n\t if (length === undefined) {\n\t length = 0\n\t for (i = 0; i < list.length; ++i) {\n\t length += list[i].length\n\t }\n\t }\n\t\n\t var buffer = Buffer.allocUnsafe(length)\n\t var pos = 0\n\t for (i = 0; i < list.length; ++i) {\n\t var buf = list[i]\n\t if (!Buffer.isBuffer(buf)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers')\n\t }\n\t buf.copy(buffer, pos)\n\t pos += buf.length\n\t }\n\t return buffer\n\t}\n\t\n\tfunction byteLength (string, encoding) {\n\t if (Buffer.isBuffer(string)) {\n\t return string.length\n\t }\n\t if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n\t (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n\t return string.byteLength\n\t }\n\t if (typeof string !== 'string') {\n\t string = '' + string\n\t }\n\t\n\t var len = string.length\n\t if (len === 0) return 0\n\t\n\t // Use a for loop to avoid recursion\n\t var loweredCase = false\n\t for (;;) {\n\t switch (encoding) {\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t return len\n\t case 'utf8':\n\t case 'utf-8':\n\t case undefined:\n\t return utf8ToBytes(string).length\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return len * 2\n\t case 'hex':\n\t return len >>> 1\n\t case 'base64':\n\t return base64ToBytes(string).length\n\t default:\n\t if (loweredCase) return utf8ToBytes(string).length // assume utf8\n\t encoding = ('' + encoding).toLowerCase()\n\t loweredCase = true\n\t }\n\t }\n\t}\n\tBuffer.byteLength = byteLength\n\t\n\tfunction slowToString (encoding, start, end) {\n\t var loweredCase = false\n\t\n\t // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n\t // property of a typed array.\n\t\n\t // This behaves neither like String nor Uint8Array in that we set start/end\n\t // to their upper/lower bounds if the value passed is out of range.\n\t // undefined is handled specially as per ECMA-262 6th Edition,\n\t // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n\t if (start === undefined || start < 0) {\n\t start = 0\n\t }\n\t // Return early if start > this.length. Done here to prevent potential uint32\n\t // coercion fail below.\n\t if (start > this.length) {\n\t return ''\n\t }\n\t\n\t if (end === undefined || end > this.length) {\n\t end = this.length\n\t }\n\t\n\t if (end <= 0) {\n\t return ''\n\t }\n\t\n\t // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n\t end >>>= 0\n\t start >>>= 0\n\t\n\t if (end <= start) {\n\t return ''\n\t }\n\t\n\t if (!encoding) encoding = 'utf8'\n\t\n\t while (true) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexSlice(this, start, end)\n\t\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Slice(this, start, end)\n\t\n\t case 'ascii':\n\t return asciiSlice(this, start, end)\n\t\n\t case 'latin1':\n\t case 'binary':\n\t return latin1Slice(this, start, end)\n\t\n\t case 'base64':\n\t return base64Slice(this, start, end)\n\t\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return utf16leSlice(this, start, end)\n\t\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n\t encoding = (encoding + '').toLowerCase()\n\t loweredCase = true\n\t }\n\t }\n\t}\n\t\n\t// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n\t// Buffer instances.\n\tBuffer.prototype._isBuffer = true\n\t\n\tfunction swap (b, n, m) {\n\t var i = b[n]\n\t b[n] = b[m]\n\t b[m] = i\n\t}\n\t\n\tBuffer.prototype.swap16 = function swap16 () {\n\t var len = this.length\n\t if (len % 2 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 16-bits')\n\t }\n\t for (var i = 0; i < len; i += 2) {\n\t swap(this, i, i + 1)\n\t }\n\t return this\n\t}\n\t\n\tBuffer.prototype.swap32 = function swap32 () {\n\t var len = this.length\n\t if (len % 4 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 32-bits')\n\t }\n\t for (var i = 0; i < len; i += 4) {\n\t swap(this, i, i + 3)\n\t swap(this, i + 1, i + 2)\n\t }\n\t return this\n\t}\n\t\n\tBuffer.prototype.swap64 = function swap64 () {\n\t var len = this.length\n\t if (len % 8 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 64-bits')\n\t }\n\t for (var i = 0; i < len; i += 8) {\n\t swap(this, i, i + 7)\n\t swap(this, i + 1, i + 6)\n\t swap(this, i + 2, i + 5)\n\t swap(this, i + 3, i + 4)\n\t }\n\t return this\n\t}\n\t\n\tBuffer.prototype.toString = function toString () {\n\t var length = this.length | 0\n\t if (length === 0) return ''\n\t if (arguments.length === 0) return utf8Slice(this, 0, length)\n\t return slowToString.apply(this, arguments)\n\t}\n\t\n\tBuffer.prototype.equals = function equals (b) {\n\t if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n\t if (this === b) return true\n\t return Buffer.compare(this, b) === 0\n\t}\n\t\n\tBuffer.prototype.inspect = function inspect () {\n\t var str = ''\n\t var max = exports.INSPECT_MAX_BYTES\n\t if (this.length > 0) {\n\t str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n\t if (this.length > max) str += ' ... '\n\t }\n\t return ''\n\t}\n\t\n\tBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n\t if (!Buffer.isBuffer(target)) {\n\t throw new TypeError('Argument must be a Buffer')\n\t }\n\t\n\t if (start === undefined) {\n\t start = 0\n\t }\n\t if (end === undefined) {\n\t end = target ? target.length : 0\n\t }\n\t if (thisStart === undefined) {\n\t thisStart = 0\n\t }\n\t if (thisEnd === undefined) {\n\t thisEnd = this.length\n\t }\n\t\n\t if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n\t throw new RangeError('out of range index')\n\t }\n\t\n\t if (thisStart >= thisEnd && start >= end) {\n\t return 0\n\t }\n\t if (thisStart >= thisEnd) {\n\t return -1\n\t }\n\t if (start >= end) {\n\t return 1\n\t }\n\t\n\t start >>>= 0\n\t end >>>= 0\n\t thisStart >>>= 0\n\t thisEnd >>>= 0\n\t\n\t if (this === target) return 0\n\t\n\t var x = thisEnd - thisStart\n\t var y = end - start\n\t var len = Math.min(x, y)\n\t\n\t var thisCopy = this.slice(thisStart, thisEnd)\n\t var targetCopy = target.slice(start, end)\n\t\n\t for (var i = 0; i < len; ++i) {\n\t if (thisCopy[i] !== targetCopy[i]) {\n\t x = thisCopy[i]\n\t y = targetCopy[i]\n\t break\n\t }\n\t }\n\t\n\t if (x < y) return -1\n\t if (y < x) return 1\n\t return 0\n\t}\n\t\n\t// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n\t// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n\t//\n\t// Arguments:\n\t// - buffer - a Buffer to search\n\t// - val - a string, Buffer, or number\n\t// - byteOffset - an index into `buffer`; will be clamped to an int32\n\t// - encoding - an optional encoding, relevant is val is a string\n\t// - dir - true for indexOf, false for lastIndexOf\n\tfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n\t // Empty buffer means no match\n\t if (buffer.length === 0) return -1\n\t\n\t // Normalize byteOffset\n\t if (typeof byteOffset === 'string') {\n\t encoding = byteOffset\n\t byteOffset = 0\n\t } else if (byteOffset > 0x7fffffff) {\n\t byteOffset = 0x7fffffff\n\t } else if (byteOffset < -0x80000000) {\n\t byteOffset = -0x80000000\n\t }\n\t byteOffset = +byteOffset // Coerce to Number.\n\t if (isNaN(byteOffset)) {\n\t // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n\t byteOffset = dir ? 0 : (buffer.length - 1)\n\t }\n\t\n\t // Normalize byteOffset: negative offsets start from the end of the buffer\n\t if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n\t if (byteOffset >= buffer.length) {\n\t if (dir) return -1\n\t else byteOffset = buffer.length - 1\n\t } else if (byteOffset < 0) {\n\t if (dir) byteOffset = 0\n\t else return -1\n\t }\n\t\n\t // Normalize val\n\t if (typeof val === 'string') {\n\t val = Buffer.from(val, encoding)\n\t }\n\t\n\t // Finally, search either indexOf (if dir is true) or lastIndexOf\n\t if (Buffer.isBuffer(val)) {\n\t // Special case: looking for empty string/buffer always fails\n\t if (val.length === 0) {\n\t return -1\n\t }\n\t return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n\t } else if (typeof val === 'number') {\n\t val = val & 0xFF // Search for a byte value [0-255]\n\t if (Buffer.TYPED_ARRAY_SUPPORT &&\n\t typeof Uint8Array.prototype.indexOf === 'function') {\n\t if (dir) {\n\t return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n\t } else {\n\t return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n\t }\n\t }\n\t return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n\t }\n\t\n\t throw new TypeError('val must be string, number or Buffer')\n\t}\n\t\n\tfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n\t var indexSize = 1\n\t var arrLength = arr.length\n\t var valLength = val.length\n\t\n\t if (encoding !== undefined) {\n\t encoding = String(encoding).toLowerCase()\n\t if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n\t encoding === 'utf16le' || encoding === 'utf-16le') {\n\t if (arr.length < 2 || val.length < 2) {\n\t return -1\n\t }\n\t indexSize = 2\n\t arrLength /= 2\n\t valLength /= 2\n\t byteOffset /= 2\n\t }\n\t }\n\t\n\t function read (buf, i) {\n\t if (indexSize === 1) {\n\t return buf[i]\n\t } else {\n\t return buf.readUInt16BE(i * indexSize)\n\t }\n\t }\n\t\n\t var i\n\t if (dir) {\n\t var foundIndex = -1\n\t for (i = byteOffset; i < arrLength; i++) {\n\t if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n\t if (foundIndex === -1) foundIndex = i\n\t if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n\t } else {\n\t if (foundIndex !== -1) i -= i - foundIndex\n\t foundIndex = -1\n\t }\n\t }\n\t } else {\n\t if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n\t for (i = byteOffset; i >= 0; i--) {\n\t var found = true\n\t for (var j = 0; j < valLength; j++) {\n\t if (read(arr, i + j) !== read(val, j)) {\n\t found = false\n\t break\n\t }\n\t }\n\t if (found) return i\n\t }\n\t }\n\t\n\t return -1\n\t}\n\t\n\tBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n\t return this.indexOf(val, byteOffset, encoding) !== -1\n\t}\n\t\n\tBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n\t}\n\t\n\tBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n\t}\n\t\n\tfunction hexWrite (buf, string, offset, length) {\n\t offset = Number(offset) || 0\n\t var remaining = buf.length - offset\n\t if (!length) {\n\t length = remaining\n\t } else {\n\t length = Number(length)\n\t if (length > remaining) {\n\t length = remaining\n\t }\n\t }\n\t\n\t // must be an even number of digits\n\t var strLen = string.length\n\t if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\t\n\t if (length > strLen / 2) {\n\t length = strLen / 2\n\t }\n\t for (var i = 0; i < length; ++i) {\n\t var parsed = parseInt(string.substr(i * 2, 2), 16)\n\t if (isNaN(parsed)) return i\n\t buf[offset + i] = parsed\n\t }\n\t return i\n\t}\n\t\n\tfunction utf8Write (buf, string, offset, length) {\n\t return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n\t}\n\t\n\tfunction asciiWrite (buf, string, offset, length) {\n\t return blitBuffer(asciiToBytes(string), buf, offset, length)\n\t}\n\t\n\tfunction latin1Write (buf, string, offset, length) {\n\t return asciiWrite(buf, string, offset, length)\n\t}\n\t\n\tfunction base64Write (buf, string, offset, length) {\n\t return blitBuffer(base64ToBytes(string), buf, offset, length)\n\t}\n\t\n\tfunction ucs2Write (buf, string, offset, length) {\n\t return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n\t}\n\t\n\tBuffer.prototype.write = function write (string, offset, length, encoding) {\n\t // Buffer#write(string)\n\t if (offset === undefined) {\n\t encoding = 'utf8'\n\t length = this.length\n\t offset = 0\n\t // Buffer#write(string, encoding)\n\t } else if (length === undefined && typeof offset === 'string') {\n\t encoding = offset\n\t length = this.length\n\t offset = 0\n\t // Buffer#write(string, offset[, length][, encoding])\n\t } else if (isFinite(offset)) {\n\t offset = offset | 0\n\t if (isFinite(length)) {\n\t length = length | 0\n\t if (encoding === undefined) encoding = 'utf8'\n\t } else {\n\t encoding = length\n\t length = undefined\n\t }\n\t // legacy write(string, encoding, offset, length) - remove in v0.13\n\t } else {\n\t throw new Error(\n\t 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n\t )\n\t }\n\t\n\t var remaining = this.length - offset\n\t if (length === undefined || length > remaining) length = remaining\n\t\n\t if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n\t throw new RangeError('Attempt to write outside buffer bounds')\n\t }\n\t\n\t if (!encoding) encoding = 'utf8'\n\t\n\t var loweredCase = false\n\t for (;;) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexWrite(this, string, offset, length)\n\t\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Write(this, string, offset, length)\n\t\n\t case 'ascii':\n\t return asciiWrite(this, string, offset, length)\n\t\n\t case 'latin1':\n\t case 'binary':\n\t return latin1Write(this, string, offset, length)\n\t\n\t case 'base64':\n\t // Warning: maxLength not taken into account in base64Write\n\t return base64Write(this, string, offset, length)\n\t\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return ucs2Write(this, string, offset, length)\n\t\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n\t encoding = ('' + encoding).toLowerCase()\n\t loweredCase = true\n\t }\n\t }\n\t}\n\t\n\tBuffer.prototype.toJSON = function toJSON () {\n\t return {\n\t type: 'Buffer',\n\t data: Array.prototype.slice.call(this._arr || this, 0)\n\t }\n\t}\n\t\n\tfunction base64Slice (buf, start, end) {\n\t if (start === 0 && end === buf.length) {\n\t return base64.fromByteArray(buf)\n\t } else {\n\t return base64.fromByteArray(buf.slice(start, end))\n\t }\n\t}\n\t\n\tfunction utf8Slice (buf, start, end) {\n\t end = Math.min(buf.length, end)\n\t var res = []\n\t\n\t var i = start\n\t while (i < end) {\n\t var firstByte = buf[i]\n\t var codePoint = null\n\t var bytesPerSequence = (firstByte > 0xEF) ? 4\n\t : (firstByte > 0xDF) ? 3\n\t : (firstByte > 0xBF) ? 2\n\t : 1\n\t\n\t if (i + bytesPerSequence <= end) {\n\t var secondByte, thirdByte, fourthByte, tempCodePoint\n\t\n\t switch (bytesPerSequence) {\n\t case 1:\n\t if (firstByte < 0x80) {\n\t codePoint = firstByte\n\t }\n\t break\n\t case 2:\n\t secondByte = buf[i + 1]\n\t if ((secondByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n\t if (tempCodePoint > 0x7F) {\n\t codePoint = tempCodePoint\n\t }\n\t }\n\t break\n\t case 3:\n\t secondByte = buf[i + 1]\n\t thirdByte = buf[i + 2]\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n\t if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n\t codePoint = tempCodePoint\n\t }\n\t }\n\t break\n\t case 4:\n\t secondByte = buf[i + 1]\n\t thirdByte = buf[i + 2]\n\t fourthByte = buf[i + 3]\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n\t if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n\t codePoint = tempCodePoint\n\t }\n\t }\n\t }\n\t }\n\t\n\t if (codePoint === null) {\n\t // we did not generate a valid codePoint so insert a\n\t // replacement char (U+FFFD) and advance only 1 byte\n\t codePoint = 0xFFFD\n\t bytesPerSequence = 1\n\t } else if (codePoint > 0xFFFF) {\n\t // encode to utf16 (surrogate pair dance)\n\t codePoint -= 0x10000\n\t res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n\t codePoint = 0xDC00 | codePoint & 0x3FF\n\t }\n\t\n\t res.push(codePoint)\n\t i += bytesPerSequence\n\t }\n\t\n\t return decodeCodePointsArray(res)\n\t}\n\t\n\t// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n\t// the lowest limit is Chrome, with 0x10000 args.\n\t// We go 1 magnitude less, for safety\n\tvar MAX_ARGUMENTS_LENGTH = 0x1000\n\t\n\tfunction decodeCodePointsArray (codePoints) {\n\t var len = codePoints.length\n\t if (len <= MAX_ARGUMENTS_LENGTH) {\n\t return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n\t }\n\t\n\t // Decode in chunks to avoid \"call stack size exceeded\".\n\t var res = ''\n\t var i = 0\n\t while (i < len) {\n\t res += String.fromCharCode.apply(\n\t String,\n\t codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n\t )\n\t }\n\t return res\n\t}\n\t\n\tfunction asciiSlice (buf, start, end) {\n\t var ret = ''\n\t end = Math.min(buf.length, end)\n\t\n\t for (var i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i] & 0x7F)\n\t }\n\t return ret\n\t}\n\t\n\tfunction latin1Slice (buf, start, end) {\n\t var ret = ''\n\t end = Math.min(buf.length, end)\n\t\n\t for (var i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i])\n\t }\n\t return ret\n\t}\n\t\n\tfunction hexSlice (buf, start, end) {\n\t var len = buf.length\n\t\n\t if (!start || start < 0) start = 0\n\t if (!end || end < 0 || end > len) end = len\n\t\n\t var out = ''\n\t for (var i = start; i < end; ++i) {\n\t out += toHex(buf[i])\n\t }\n\t return out\n\t}\n\t\n\tfunction utf16leSlice (buf, start, end) {\n\t var bytes = buf.slice(start, end)\n\t var res = ''\n\t for (var i = 0; i < bytes.length; i += 2) {\n\t res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n\t }\n\t return res\n\t}\n\t\n\tBuffer.prototype.slice = function slice (start, end) {\n\t var len = this.length\n\t start = ~~start\n\t end = end === undefined ? len : ~~end\n\t\n\t if (start < 0) {\n\t start += len\n\t if (start < 0) start = 0\n\t } else if (start > len) {\n\t start = len\n\t }\n\t\n\t if (end < 0) {\n\t end += len\n\t if (end < 0) end = 0\n\t } else if (end > len) {\n\t end = len\n\t }\n\t\n\t if (end < start) end = start\n\t\n\t var newBuf\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t newBuf = this.subarray(start, end)\n\t newBuf.__proto__ = Buffer.prototype\n\t } else {\n\t var sliceLen = end - start\n\t newBuf = new Buffer(sliceLen, undefined)\n\t for (var i = 0; i < sliceLen; ++i) {\n\t newBuf[i] = this[i + start]\n\t }\n\t }\n\t\n\t return newBuf\n\t}\n\t\n\t/*\n\t * Need to make sure that buffer isn't trying to write out of bounds.\n\t */\n\tfunction checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}\n\t\n\tBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) checkOffset(offset, byteLength, this.length)\n\t\n\t var val = this[offset]\n\t var mul = 1\n\t var i = 0\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul\n\t }\n\t\n\t return val\n\t}\n\t\n\tBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) {\n\t checkOffset(offset, byteLength, this.length)\n\t }\n\t\n\t var val = this[offset + --byteLength]\n\t var mul = 1\n\t while (byteLength > 0 && (mul *= 0x100)) {\n\t val += this[offset + --byteLength] * mul\n\t }\n\t\n\t return val\n\t}\n\t\n\tBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 1, this.length)\n\t return this[offset]\n\t}\n\t\n\tBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 2, this.length)\n\t return this[offset] | (this[offset + 1] << 8)\n\t}\n\t\n\tBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 2, this.length)\n\t return (this[offset] << 8) | this[offset + 1]\n\t}\n\t\n\tBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t\n\t return ((this[offset]) |\n\t (this[offset + 1] << 8) |\n\t (this[offset + 2] << 16)) +\n\t (this[offset + 3] * 0x1000000)\n\t}\n\t\n\tBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t\n\t return (this[offset] * 0x1000000) +\n\t ((this[offset + 1] << 16) |\n\t (this[offset + 2] << 8) |\n\t this[offset + 3])\n\t}\n\t\n\tBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) checkOffset(offset, byteLength, this.length)\n\t\n\t var val = this[offset]\n\t var mul = 1\n\t var i = 0\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul\n\t }\n\t mul *= 0x80\n\t\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\t\n\t return val\n\t}\n\t\n\tBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) checkOffset(offset, byteLength, this.length)\n\t\n\t var i = byteLength\n\t var mul = 1\n\t var val = this[offset + --i]\n\t while (i > 0 && (mul *= 0x100)) {\n\t val += this[offset + --i] * mul\n\t }\n\t mul *= 0x80\n\t\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\t\n\t return val\n\t}\n\t\n\tBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 1, this.length)\n\t if (!(this[offset] & 0x80)) return (this[offset])\n\t return ((0xff - this[offset] + 1) * -1)\n\t}\n\t\n\tBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 2, this.length)\n\t var val = this[offset] | (this[offset + 1] << 8)\n\t return (val & 0x8000) ? val | 0xFFFF0000 : val\n\t}\n\t\n\tBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 2, this.length)\n\t var val = this[offset + 1] | (this[offset] << 8)\n\t return (val & 0x8000) ? val | 0xFFFF0000 : val\n\t}\n\t\n\tBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t\n\t return (this[offset]) |\n\t (this[offset + 1] << 8) |\n\t (this[offset + 2] << 16) |\n\t (this[offset + 3] << 24)\n\t}\n\t\n\tBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t\n\t return (this[offset] << 24) |\n\t (this[offset + 1] << 16) |\n\t (this[offset + 2] << 8) |\n\t (this[offset + 3])\n\t}\n\t\n\tBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t return ieee754.read(this, offset, true, 23, 4)\n\t}\n\t\n\tBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t return ieee754.read(this, offset, false, 23, 4)\n\t}\n\t\n\tBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 8, this.length)\n\t return ieee754.read(this, offset, true, 52, 8)\n\t}\n\t\n\tBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 8, this.length)\n\t return ieee754.read(this, offset, false, 52, 8)\n\t}\n\t\n\tfunction checkInt (buf, value, offset, ext, max, min) {\n\t if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n\t if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range')\n\t}\n\t\n\tBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) {\n\t var maxBytes = Math.pow(2, 8 * byteLength) - 1\n\t checkInt(this, value, offset, byteLength, maxBytes, 0)\n\t }\n\t\n\t var mul = 1\n\t var i = 0\n\t this[offset] = value & 0xFF\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t this[offset + i] = (value / mul) & 0xFF\n\t }\n\t\n\t return offset + byteLength\n\t}\n\t\n\tBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) {\n\t var maxBytes = Math.pow(2, 8 * byteLength) - 1\n\t checkInt(this, value, offset, byteLength, maxBytes, 0)\n\t }\n\t\n\t var i = byteLength - 1\n\t var mul = 1\n\t this[offset + i] = value & 0xFF\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t this[offset + i] = (value / mul) & 0xFF\n\t }\n\t\n\t return offset + byteLength\n\t}\n\t\n\tBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n\t this[offset] = (value & 0xff)\n\t return offset + 1\n\t}\n\t\n\tfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n\t if (value < 0) value = 0xffff + value + 1\n\t for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n\t buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n\t (littleEndian ? i : 1 - i) * 8\n\t }\n\t}\n\t\n\tBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value & 0xff)\n\t this[offset + 1] = (value >>> 8)\n\t } else {\n\t objectWriteUInt16(this, value, offset, true)\n\t }\n\t return offset + 2\n\t}\n\t\n\tBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value >>> 8)\n\t this[offset + 1] = (value & 0xff)\n\t } else {\n\t objectWriteUInt16(this, value, offset, false)\n\t }\n\t return offset + 2\n\t}\n\t\n\tfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n\t if (value < 0) value = 0xffffffff + value + 1\n\t for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n\t buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n\t }\n\t}\n\t\n\tBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset + 3] = (value >>> 24)\n\t this[offset + 2] = (value >>> 16)\n\t this[offset + 1] = (value >>> 8)\n\t this[offset] = (value & 0xff)\n\t } else {\n\t objectWriteUInt32(this, value, offset, true)\n\t }\n\t return offset + 4\n\t}\n\t\n\tBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value >>> 24)\n\t this[offset + 1] = (value >>> 16)\n\t this[offset + 2] = (value >>> 8)\n\t this[offset + 3] = (value & 0xff)\n\t } else {\n\t objectWriteUInt32(this, value, offset, false)\n\t }\n\t return offset + 4\n\t}\n\t\n\tBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) {\n\t var limit = Math.pow(2, 8 * byteLength - 1)\n\t\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit)\n\t }\n\t\n\t var i = 0\n\t var mul = 1\n\t var sub = 0\n\t this[offset] = value & 0xFF\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n\t sub = 1\n\t }\n\t this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n\t }\n\t\n\t return offset + byteLength\n\t}\n\t\n\tBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) {\n\t var limit = Math.pow(2, 8 * byteLength - 1)\n\t\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit)\n\t }\n\t\n\t var i = byteLength - 1\n\t var mul = 1\n\t var sub = 0\n\t this[offset + i] = value & 0xFF\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n\t sub = 1\n\t }\n\t this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n\t }\n\t\n\t return offset + byteLength\n\t}\n\t\n\tBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n\t if (value < 0) value = 0xff + value + 1\n\t this[offset] = (value & 0xff)\n\t return offset + 1\n\t}\n\t\n\tBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value & 0xff)\n\t this[offset + 1] = (value >>> 8)\n\t } else {\n\t objectWriteUInt16(this, value, offset, true)\n\t }\n\t return offset + 2\n\t}\n\t\n\tBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value >>> 8)\n\t this[offset + 1] = (value & 0xff)\n\t } else {\n\t objectWriteUInt16(this, value, offset, false)\n\t }\n\t return offset + 2\n\t}\n\t\n\tBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value & 0xff)\n\t this[offset + 1] = (value >>> 8)\n\t this[offset + 2] = (value >>> 16)\n\t this[offset + 3] = (value >>> 24)\n\t } else {\n\t objectWriteUInt32(this, value, offset, true)\n\t }\n\t return offset + 4\n\t}\n\t\n\tBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n\t if (value < 0) value = 0xffffffff + value + 1\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value >>> 24)\n\t this[offset + 1] = (value >>> 16)\n\t this[offset + 2] = (value >>> 8)\n\t this[offset + 3] = (value & 0xff)\n\t } else {\n\t objectWriteUInt32(this, value, offset, false)\n\t }\n\t return offset + 4\n\t}\n\t\n\tfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range')\n\t if (offset < 0) throw new RangeError('Index out of range')\n\t}\n\t\n\tfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n\t }\n\t ieee754.write(buf, value, offset, littleEndian, 23, 4)\n\t return offset + 4\n\t}\n\t\n\tBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n\t return writeFloat(this, value, offset, true, noAssert)\n\t}\n\t\n\tBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n\t return writeFloat(this, value, offset, false, noAssert)\n\t}\n\t\n\tfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n\t }\n\t ieee754.write(buf, value, offset, littleEndian, 52, 8)\n\t return offset + 8\n\t}\n\t\n\tBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n\t return writeDouble(this, value, offset, true, noAssert)\n\t}\n\t\n\tBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n\t return writeDouble(this, value, offset, false, noAssert)\n\t}\n\t\n\t// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\n\tBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n\t if (!start) start = 0\n\t if (!end && end !== 0) end = this.length\n\t if (targetStart >= target.length) targetStart = target.length\n\t if (!targetStart) targetStart = 0\n\t if (end > 0 && end < start) end = start\n\t\n\t // Copy 0 bytes; we're done\n\t if (end === start) return 0\n\t if (target.length === 0 || this.length === 0) return 0\n\t\n\t // Fatal error conditions\n\t if (targetStart < 0) {\n\t throw new RangeError('targetStart out of bounds')\n\t }\n\t if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n\t if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\t\n\t // Are we oob?\n\t if (end > this.length) end = this.length\n\t if (target.length - targetStart < end - start) {\n\t end = target.length - targetStart + start\n\t }\n\t\n\t var len = end - start\n\t var i\n\t\n\t if (this === target && start < targetStart && targetStart < end) {\n\t // descending copy from end\n\t for (i = len - 1; i >= 0; --i) {\n\t target[i + targetStart] = this[i + start]\n\t }\n\t } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n\t // ascending copy from start\n\t for (i = 0; i < len; ++i) {\n\t target[i + targetStart] = this[i + start]\n\t }\n\t } else {\n\t Uint8Array.prototype.set.call(\n\t target,\n\t this.subarray(start, start + len),\n\t targetStart\n\t )\n\t }\n\t\n\t return len\n\t}\n\t\n\t// Usage:\n\t// buffer.fill(number[, offset[, end]])\n\t// buffer.fill(buffer[, offset[, end]])\n\t// buffer.fill(string[, offset[, end]][, encoding])\n\tBuffer.prototype.fill = function fill (val, start, end, encoding) {\n\t // Handle string cases:\n\t if (typeof val === 'string') {\n\t if (typeof start === 'string') {\n\t encoding = start\n\t start = 0\n\t end = this.length\n\t } else if (typeof end === 'string') {\n\t encoding = end\n\t end = this.length\n\t }\n\t if (val.length === 1) {\n\t var code = val.charCodeAt(0)\n\t if (code < 256) {\n\t val = code\n\t }\n\t }\n\t if (encoding !== undefined && typeof encoding !== 'string') {\n\t throw new TypeError('encoding must be a string')\n\t }\n\t if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding)\n\t }\n\t } else if (typeof val === 'number') {\n\t val = val & 255\n\t }\n\t\n\t // Invalid ranges are not set to a default, so can range check early.\n\t if (start < 0 || this.length < start || this.length < end) {\n\t throw new RangeError('Out of range index')\n\t }\n\t\n\t if (end <= start) {\n\t return this\n\t }\n\t\n\t start = start >>> 0\n\t end = end === undefined ? this.length : end >>> 0\n\t\n\t if (!val) val = 0\n\t\n\t var i\n\t if (typeof val === 'number') {\n\t for (i = start; i < end; ++i) {\n\t this[i] = val\n\t }\n\t } else {\n\t var bytes = Buffer.isBuffer(val)\n\t ? val\n\t : utf8ToBytes(new Buffer(val, encoding).toString())\n\t var len = bytes.length\n\t for (i = 0; i < end - start; ++i) {\n\t this[i + start] = bytes[i % len]\n\t }\n\t }\n\t\n\t return this\n\t}\n\t\n\t// HELPER FUNCTIONS\n\t// ================\n\t\n\tvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\t\n\tfunction base64clean (str) {\n\t // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n\t str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n\t // Node converts strings with length < 2 to ''\n\t if (str.length < 2) return ''\n\t // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n\t while (str.length % 4 !== 0) {\n\t str = str + '='\n\t }\n\t return str\n\t}\n\t\n\tfunction stringtrim (str) {\n\t if (str.trim) return str.trim()\n\t return str.replace(/^\\s+|\\s+$/g, '')\n\t}\n\t\n\tfunction toHex (n) {\n\t if (n < 16) return '0' + n.toString(16)\n\t return n.toString(16)\n\t}\n\t\n\tfunction utf8ToBytes (string, units) {\n\t units = units || Infinity\n\t var codePoint\n\t var length = string.length\n\t var leadSurrogate = null\n\t var bytes = []\n\t\n\t for (var i = 0; i < length; ++i) {\n\t codePoint = string.charCodeAt(i)\n\t\n\t // is surrogate component\n\t if (codePoint > 0xD7FF && codePoint < 0xE000) {\n\t // last char was a lead\n\t if (!leadSurrogate) {\n\t // no lead yet\n\t if (codePoint > 0xDBFF) {\n\t // unexpected trail\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n\t continue\n\t } else if (i + 1 === length) {\n\t // unpaired lead\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n\t continue\n\t }\n\t\n\t // valid lead\n\t leadSurrogate = codePoint\n\t\n\t continue\n\t }\n\t\n\t // 2 leads in a row\n\t if (codePoint < 0xDC00) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n\t leadSurrogate = codePoint\n\t continue\n\t }\n\t\n\t // valid surrogate pair\n\t codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n\t } else if (leadSurrogate) {\n\t // valid bmp char, but last char was a lead\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n\t }\n\t\n\t leadSurrogate = null\n\t\n\t // encode utf8\n\t if (codePoint < 0x80) {\n\t if ((units -= 1) < 0) break\n\t bytes.push(codePoint)\n\t } else if (codePoint < 0x800) {\n\t if ((units -= 2) < 0) break\n\t bytes.push(\n\t codePoint >> 0x6 | 0xC0,\n\t codePoint & 0x3F | 0x80\n\t )\n\t } else if (codePoint < 0x10000) {\n\t if ((units -= 3) < 0) break\n\t bytes.push(\n\t codePoint >> 0xC | 0xE0,\n\t codePoint >> 0x6 & 0x3F | 0x80,\n\t codePoint & 0x3F | 0x80\n\t )\n\t } else if (codePoint < 0x110000) {\n\t if ((units -= 4) < 0) break\n\t bytes.push(\n\t codePoint >> 0x12 | 0xF0,\n\t codePoint >> 0xC & 0x3F | 0x80,\n\t codePoint >> 0x6 & 0x3F | 0x80,\n\t codePoint & 0x3F | 0x80\n\t )\n\t } else {\n\t throw new Error('Invalid code point')\n\t }\n\t }\n\t\n\t return bytes\n\t}\n\t\n\tfunction asciiToBytes (str) {\n\t var byteArray = []\n\t for (var i = 0; i < str.length; ++i) {\n\t // Node's code seems to be doing this and not & 0x7F..\n\t byteArray.push(str.charCodeAt(i) & 0xFF)\n\t }\n\t return byteArray\n\t}\n\t\n\tfunction utf16leToBytes (str, units) {\n\t var c, hi, lo\n\t var byteArray = []\n\t for (var i = 0; i < str.length; ++i) {\n\t if ((units -= 2) < 0) break\n\t\n\t c = str.charCodeAt(i)\n\t hi = c >> 8\n\t lo = c % 256\n\t byteArray.push(lo)\n\t byteArray.push(hi)\n\t }\n\t\n\t return byteArray\n\t}\n\t\n\tfunction base64ToBytes (str) {\n\t return base64.toByteArray(base64clean(str))\n\t}\n\t\n\tfunction blitBuffer (src, dst, offset, length) {\n\t for (var i = 0; i < length; ++i) {\n\t if ((i + offset >= dst.length) || (i >= src.length)) break\n\t dst[i + offset] = src[i]\n\t }\n\t return i\n\t}\n\t\n\tfunction isnan (val) {\n\t return val !== val // eslint-disable-line no-self-compare\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar Buffer = __webpack_require__(1).Buffer;\n\tvar intSize = 4;\n\tvar zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0);\n\tvar chrsz = 8;\n\t\n\tfunction toArray(buf, bigEndian) {\n\t if ((buf.length % intSize) !== 0) {\n\t var len = buf.length + (intSize - (buf.length % intSize));\n\t buf = Buffer.concat([buf, zeroBuffer], len);\n\t }\n\t\n\t var arr = [];\n\t var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE;\n\t for (var i = 0; i < buf.length; i += intSize) {\n\t arr.push(fn.call(buf, i));\n\t }\n\t return arr;\n\t}\n\t\n\tfunction toBuffer(arr, size, bigEndian) {\n\t var buf = new Buffer(size);\n\t var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE;\n\t for (var i = 0; i < arr.length; i++) {\n\t fn.call(buf, arr[i], i * 4, true);\n\t }\n\t return buf;\n\t}\n\t\n\tfunction hash(buf, fn, hashSize, bigEndian) {\n\t if (!Buffer.isBuffer(buf)) buf = new Buffer(buf);\n\t var arr = fn(toArray(buf, bigEndian), buf.length * chrsz);\n\t return toBuffer(arr, hashSize, bigEndian);\n\t}\n\t\n\tmodule.exports = { hash: hash };\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _buffer = __webpack_require__(1);\n\t\n\tvar _cryptoBrowserify = __webpack_require__(14);\n\t\n\tvar crypto = _interopRequireWildcard(_cryptoBrowserify);\n\t\n\tvar _BigInteger = __webpack_require__(4);\n\t\n\tvar _BigInteger2 = _interopRequireDefault(_BigInteger);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\tvar createHash = crypto.createHash;\n\tvar createHmac = crypto.createHmac;\n\tvar randomBytes = crypto.randomBytes;\n\t\n\tvar initN = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1' + '29024E088A67CC74020BBEA63B139B22514A08798E3404DD' + 'EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245' + 'E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED' + 'EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D' + 'C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F' + '83655D23DCA3AD961C62F356208552BB9ED529077096966D' + '670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B' + 'E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9' + 'DE2BCBF6955817183995497CEA956AE515D2261898FA0510' + '15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64' + 'ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7' + 'ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B' + 'F12FFA06D98A0864D87602733EC86A64521F2B18177B200C' + 'BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31' + '43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF';\n\t\n\tvar newPasswordRequiredChallengeUserAttributePrefix = 'userAttributes.';\n\t\n\t/** @class */\n\t\n\tvar AuthenticationHelper = function () {\n\t /**\n\t * Constructs a new AuthenticationHelper object\n\t * @param {string} PoolName Cognito user pool name.\n\t */\n\t function AuthenticationHelper(PoolName) {\n\t _classCallCheck(this, AuthenticationHelper);\n\t\n\t this.N = new _BigInteger2.default(initN, 16);\n\t this.g = new _BigInteger2.default('2', 16);\n\t this.k = new _BigInteger2.default(this.hexHash('00' + this.N.toString(16) + '0' + this.g.toString(16)), 16);\n\t\n\t this.smallAValue = this.generateRandomSmallA();\n\t this.getLargeAValue(function () {});\n\t\n\t this.infoBits = _buffer.Buffer.from('Caldera Derived Key', 'utf8');\n\t\n\t this.poolName = PoolName;\n\t }\n\t\n\t /**\n\t * @returns {BigInteger} small A, a random number\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getSmallAValue = function getSmallAValue() {\n\t return this.smallAValue;\n\t };\n\t\n\t /**\n\t * @param {nodeCallback} callback Called with (err, largeAValue)\n\t * @returns {void}\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getLargeAValue = function getLargeAValue(callback) {\n\t var _this = this;\n\t\n\t if (this.largeAValue) {\n\t callback(null, this.largeAValue);\n\t } else {\n\t this.calculateA(this.smallAValue, function (err, largeAValue) {\n\t if (err) {\n\t callback(err, null);\n\t }\n\t\n\t _this.largeAValue = largeAValue;\n\t callback(null, _this.largeAValue);\n\t });\n\t }\n\t };\n\t\n\t /**\n\t * helper function to generate a random big integer\n\t * @returns {BigInteger} a random value.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.generateRandomSmallA = function generateRandomSmallA() {\n\t var hexRandom = randomBytes(128).toString('hex');\n\t\n\t var randomBigInt = new _BigInteger2.default(hexRandom, 16);\n\t var smallABigInt = randomBigInt.mod(this.N);\n\t\n\t return smallABigInt;\n\t };\n\t\n\t /**\n\t * helper function to generate a random string\n\t * @returns {string} a random value.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.generateRandomString = function generateRandomString() {\n\t return randomBytes(40).toString('base64');\n\t };\n\t\n\t /**\n\t * @returns {string} Generated random value included in password hash.\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getRandomPassword = function getRandomPassword() {\n\t return this.randomPassword;\n\t };\n\t\n\t /**\n\t * @returns {string} Generated random value included in devices hash.\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getSaltDevices = function getSaltDevices() {\n\t return this.SaltToHashDevices;\n\t };\n\t\n\t /**\n\t * @returns {string} Value used to verify devices.\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getVerifierDevices = function getVerifierDevices() {\n\t return this.verifierDevices;\n\t };\n\t\n\t /**\n\t * Generate salts and compute verifier.\n\t * @param {string} deviceGroupKey Devices to generate verifier for.\n\t * @param {string} username User to generate verifier for.\n\t * @param {nodeCallback} callback Called with (err, null)\n\t * @returns {void}\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.generateHashDevice = function generateHashDevice(deviceGroupKey, username, callback) {\n\t var _this2 = this;\n\t\n\t this.randomPassword = this.generateRandomString();\n\t var combinedString = '' + deviceGroupKey + username + ':' + this.randomPassword;\n\t var hashedString = this.hash(combinedString);\n\t\n\t var hexRandom = randomBytes(16).toString('hex');\n\t this.SaltToHashDevices = this.padHex(new _BigInteger2.default(hexRandom, 16));\n\t\n\t this.g.modPow(new _BigInteger2.default(this.hexHash(this.SaltToHashDevices + hashedString), 16), this.N, function (err, verifierDevicesNotPadded) {\n\t if (err) {\n\t callback(err, null);\n\t }\n\t\n\t _this2.verifierDevices = _this2.padHex(verifierDevicesNotPadded);\n\t callback(null, null);\n\t });\n\t };\n\t\n\t /**\n\t * Calculate the client's public value A = g^a%N\n\t * with the generated random number a\n\t * @param {BigInteger} a Randomly generated small A.\n\t * @param {nodeCallback} callback Called with (err, largeAValue)\n\t * @returns {void}\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.calculateA = function calculateA(a, callback) {\n\t var _this3 = this;\n\t\n\t this.g.modPow(a, this.N, function (err, A) {\n\t if (err) {\n\t callback(err, null);\n\t }\n\t\n\t if (A.mod(_this3.N).equals(_BigInteger2.default.ZERO)) {\n\t callback(new Error('Illegal paramater. A mod N cannot be 0.'), null);\n\t }\n\t\n\t callback(null, A);\n\t });\n\t };\n\t\n\t /**\n\t * Calculate the client's value U which is the hash of A and B\n\t * @param {BigInteger} A Large A value.\n\t * @param {BigInteger} B Server B value.\n\t * @returns {BigInteger} Computed U value.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.calculateU = function calculateU(A, B) {\n\t this.UHexHash = this.hexHash(this.padHex(A) + this.padHex(B));\n\t var finalU = new _BigInteger2.default(this.UHexHash, 16);\n\t\n\t return finalU;\n\t };\n\t\n\t /**\n\t * Calculate a hash from a bitArray\n\t * @param {Buffer} buf Value to hash.\n\t * @returns {String} Hex-encoded hash.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.hash = function hash(buf) {\n\t var hashHex = createHash('sha256').update(buf).digest('hex');\n\t return new Array(64 - hashHex.length).join('0') + hashHex;\n\t };\n\t\n\t /**\n\t * Calculate a hash from a hex string\n\t * @param {String} hexStr Value to hash.\n\t * @returns {String} Hex-encoded hash.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.hexHash = function hexHash(hexStr) {\n\t return this.hash(_buffer.Buffer.from(hexStr, 'hex'));\n\t };\n\t\n\t /**\n\t * Standard hkdf algorithm\n\t * @param {Buffer} ikm Input key material.\n\t * @param {Buffer} salt Salt value.\n\t * @returns {Buffer} Strong key material.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.computehkdf = function computehkdf(ikm, salt) {\n\t var prk = createHmac('sha256', salt).update(ikm).digest();\n\t var infoBitsUpdate = _buffer.Buffer.concat([this.infoBits, _buffer.Buffer.from(String.fromCharCode(1), 'utf8')]);\n\t var hmac = createHmac('sha256', prk).update(infoBitsUpdate).digest();\n\t return hmac.slice(0, 16);\n\t };\n\t\n\t /**\n\t * Calculates the final hkdf based on computed S value, and computed U value and the key\n\t * @param {String} username Username.\n\t * @param {String} password Password.\n\t * @param {BigInteger} serverBValue Server B value.\n\t * @param {BigInteger} salt Generated salt.\n\t * @param {nodeCallback} callback Called with (err, hkdfValue)\n\t * @returns {void}\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getPasswordAuthenticationKey = function getPasswordAuthenticationKey(username, password, serverBValue, salt, callback) {\n\t var _this4 = this;\n\t\n\t if (serverBValue.mod(this.N).equals(_BigInteger2.default.ZERO)) {\n\t throw new Error('B cannot be zero.');\n\t }\n\t\n\t this.UValue = this.calculateU(this.largeAValue, serverBValue);\n\t\n\t if (this.UValue.equals(_BigInteger2.default.ZERO)) {\n\t throw new Error('U cannot be zero.');\n\t }\n\t\n\t var usernamePassword = '' + this.poolName + username + ':' + password;\n\t var usernamePasswordHash = this.hash(usernamePassword);\n\t\n\t var xValue = new _BigInteger2.default(this.hexHash(this.padHex(salt) + usernamePasswordHash), 16);\n\t this.calculateS(xValue, serverBValue, function (err, sValue) {\n\t if (err) {\n\t callback(err, null);\n\t }\n\t\n\t var hkdf = _this4.computehkdf(_buffer.Buffer.from(_this4.padHex(sValue), 'hex'), _buffer.Buffer.from(_this4.padHex(_this4.UValue.toString(16)), 'hex'));\n\t\n\t callback(null, hkdf);\n\t });\n\t };\n\t\n\t /**\n\t * Calculates the S value used in getPasswordAuthenticationKey\n\t * @param {BigInteger} xValue Salted password hash value.\n\t * @param {BigInteger} serverBValue Server B value.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.calculateS = function calculateS(xValue, serverBValue, callback) {\n\t var _this5 = this;\n\t\n\t this.g.modPow(xValue, this.N, function (err, gModPowXN) {\n\t if (err) {\n\t callback(err, null);\n\t }\n\t\n\t var intValue2 = serverBValue.subtract(_this5.k.multiply(gModPowXN));\n\t intValue2.modPow(_this5.smallAValue.add(_this5.UValue.multiply(xValue)), _this5.N, function (err2, result) {\n\t if (err2) {\n\t callback(err2, null);\n\t }\n\t\n\t callback(null, result.mod(_this5.N));\n\t });\n\t });\n\t };\n\t\n\t /**\n\t * Return constant newPasswordRequiredChallengeUserAttributePrefix\n\t * @return {newPasswordRequiredChallengeUserAttributePrefix} constant prefix value\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getNewPasswordRequiredChallengeUserAttributePrefix = function getNewPasswordRequiredChallengeUserAttributePrefix() {\n\t return newPasswordRequiredChallengeUserAttributePrefix;\n\t };\n\t\n\t /**\n\t * Converts a BigInteger (or hex string) to hex format padded with zeroes for hashing\n\t * @param {BigInteger|String} bigInt Number or string to pad.\n\t * @returns {String} Padded hex string.\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.padHex = function padHex(bigInt) {\n\t var hashStr = bigInt.toString(16);\n\t if (hashStr.length % 2 === 1) {\n\t hashStr = '0' + hashStr;\n\t } else if ('89ABCDEFabcdef'.indexOf(hashStr[0]) !== -1) {\n\t hashStr = '00' + hashStr;\n\t }\n\t return hashStr;\n\t };\n\t\n\t return AuthenticationHelper;\n\t}();\n\t\n\texports.default = AuthenticationHelper;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t// A small implementation of BigInteger based on http://www-cs-students.stanford.edu/~tjw/jsbn/\n\t//\n\t// All public methods have been removed except the following:\n\t// new BigInteger(a, b) (only radix 2, 4, 8, 16 and 32 supported)\n\t// toString (only radix 2, 4, 8, 16 and 32 supported)\n\t// negate\n\t// abs\n\t// compareTo\n\t// bitLength\n\t// mod\n\t// equals\n\t// add\n\t// subtract\n\t// multiply\n\t// divide\n\t// modPow\n\t\n\texports.default = BigInteger;\n\t\n\t/*\n\t * Copyright (c) 2003-2005 Tom Wu\n\t * All Rights Reserved.\n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining\n\t * a copy of this software and associated documentation files (the\n\t * \"Software\"), to deal in the Software without restriction, including\n\t * without limitation the rights to use, copy, modify, merge, publish,\n\t * distribute, sublicense, and/or sell copies of the Software, and to\n\t * permit persons to whom the Software is furnished to do so, subject to\n\t * the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be\n\t * included in all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND,\n\t * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY\n\t * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n\t *\n\t * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,\n\t * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER\n\t * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF\n\t * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT\n\t * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\t *\n\t * In addition, the following condition applies:\n\t *\n\t * All redistributions must retain an intact copy of this copyright notice\n\t * and disclaimer.\n\t */\n\t\n\t// (public) Constructor\n\t\n\tfunction BigInteger(a, b) {\n\t if (a != null) this.fromString(a, b);\n\t}\n\t\n\t// return new, unset BigInteger\n\tfunction nbi() {\n\t return new BigInteger(null);\n\t}\n\t\n\t// Bits per digit\n\tvar dbits;\n\t\n\t// JavaScript engine analysis\n\tvar canary = 0xdeadbeefcafe;\n\tvar j_lm = (canary & 0xffffff) == 0xefcafe;\n\t\n\t// am: Compute w_j += (x*this_i), propagate carries,\n\t// c is initial carry, returns final carry.\n\t// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n\t// We need to select the fastest one that works in this environment.\n\t\n\t// am1: use a single mult and divide to get the high bits,\n\t// max digit bits should be 26 because\n\t// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n\tfunction am1(i, x, w, j, c, n) {\n\t while (--n >= 0) {\n\t var v = x * this[i++] + w[j] + c;\n\t c = Math.floor(v / 0x4000000);\n\t w[j++] = v & 0x3ffffff;\n\t }\n\t return c;\n\t}\n\t// am2 avoids a big mult-and-extract completely.\n\t// Max digit bits should be <= 30 because we do bitwise ops\n\t// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n\tfunction am2(i, x, w, j, c, n) {\n\t var xl = x & 0x7fff,\n\t xh = x >> 15;\n\t while (--n >= 0) {\n\t var l = this[i] & 0x7fff;\n\t var h = this[i++] >> 15;\n\t var m = xh * l + h * xl;\n\t l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n\t c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n\t w[j++] = l & 0x3fffffff;\n\t }\n\t return c;\n\t}\n\t// Alternately, set max digit bits to 28 since some\n\t// browsers slow down when dealing with 32-bit numbers.\n\tfunction am3(i, x, w, j, c, n) {\n\t var xl = x & 0x3fff,\n\t xh = x >> 14;\n\t while (--n >= 0) {\n\t var l = this[i] & 0x3fff;\n\t var h = this[i++] >> 14;\n\t var m = xh * l + h * xl;\n\t l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n\t c = (l >> 28) + (m >> 14) + xh * h;\n\t w[j++] = l & 0xfffffff;\n\t }\n\t return c;\n\t}\n\tvar inBrowser = typeof navigator !== \"undefined\";\n\tif (inBrowser && j_lm && navigator.appName == \"Microsoft Internet Explorer\") {\n\t BigInteger.prototype.am = am2;\n\t dbits = 30;\n\t} else if (inBrowser && j_lm && navigator.appName != \"Netscape\") {\n\t BigInteger.prototype.am = am1;\n\t dbits = 26;\n\t} else {\n\t // Mozilla/Netscape seems to prefer am3\n\t BigInteger.prototype.am = am3;\n\t dbits = 28;\n\t}\n\t\n\tBigInteger.prototype.DB = dbits;\n\tBigInteger.prototype.DM = (1 << dbits) - 1;\n\tBigInteger.prototype.DV = 1 << dbits;\n\t\n\tvar BI_FP = 52;\n\tBigInteger.prototype.FV = Math.pow(2, BI_FP);\n\tBigInteger.prototype.F1 = BI_FP - dbits;\n\tBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n\t\n\t// Digit conversions\n\tvar BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\tvar BI_RC = new Array();\n\tvar rr, vv;\n\trr = \"0\".charCodeAt(0);\n\tfor (vv = 0; vv <= 9; ++vv) {\n\t BI_RC[rr++] = vv;\n\t}rr = \"a\".charCodeAt(0);\n\tfor (vv = 10; vv < 36; ++vv) {\n\t BI_RC[rr++] = vv;\n\t}rr = \"A\".charCodeAt(0);\n\tfor (vv = 10; vv < 36; ++vv) {\n\t BI_RC[rr++] = vv;\n\t}function int2char(n) {\n\t return BI_RM.charAt(n);\n\t}\n\tfunction intAt(s, i) {\n\t var c = BI_RC[s.charCodeAt(i)];\n\t return c == null ? -1 : c;\n\t}\n\t\n\t// (protected) copy this to r\n\tfunction bnpCopyTo(r) {\n\t for (var i = this.t - 1; i >= 0; --i) {\n\t r[i] = this[i];\n\t }r.t = this.t;\n\t r.s = this.s;\n\t}\n\t\n\t// (protected) set from integer value x, -DV <= x < DV\n\tfunction bnpFromInt(x) {\n\t this.t = 1;\n\t this.s = x < 0 ? -1 : 0;\n\t if (x > 0) this[0] = x;else if (x < -1) this[0] = x + this.DV;else this.t = 0;\n\t}\n\t\n\t// return bigint initialized to value\n\tfunction nbv(i) {\n\t var r = nbi();\n\t\n\t r.fromInt(i);\n\t\n\t return r;\n\t}\n\t\n\t// (protected) set from string and radix\n\tfunction bnpFromString(s, b) {\n\t var k;\n\t if (b == 16) k = 4;else if (b == 8) k = 3;else if (b == 2) k = 1;else if (b == 32) k = 5;else if (b == 4) k = 2;else throw new Error(\"Only radix 2, 4, 8, 16, 32 are supported\");\n\t this.t = 0;\n\t this.s = 0;\n\t var i = s.length,\n\t mi = false,\n\t sh = 0;\n\t while (--i >= 0) {\n\t var x = intAt(s, i);\n\t if (x < 0) {\n\t if (s.charAt(i) == \"-\") mi = true;\n\t continue;\n\t }\n\t mi = false;\n\t if (sh == 0) this[this.t++] = x;else if (sh + k > this.DB) {\n\t this[this.t - 1] |= (x & (1 << this.DB - sh) - 1) << sh;\n\t this[this.t++] = x >> this.DB - sh;\n\t } else this[this.t - 1] |= x << sh;\n\t sh += k;\n\t if (sh >= this.DB) sh -= this.DB;\n\t }\n\t this.clamp();\n\t if (mi) BigInteger.ZERO.subTo(this, this);\n\t}\n\t\n\t// (protected) clamp off excess high words\n\tfunction bnpClamp() {\n\t var c = this.s & this.DM;\n\t while (this.t > 0 && this[this.t - 1] == c) {\n\t --this.t;\n\t }\n\t}\n\t\n\t// (public) return string representation in given radix\n\tfunction bnToString(b) {\n\t if (this.s < 0) return \"-\" + this.negate().toString();\n\t var k;\n\t if (b == 16) k = 4;else if (b == 8) k = 3;else if (b == 2) k = 1;else if (b == 32) k = 5;else if (b == 4) k = 2;else throw new Error(\"Only radix 2, 4, 8, 16, 32 are supported\");\n\t var km = (1 << k) - 1,\n\t d,\n\t m = false,\n\t r = \"\",\n\t i = this.t;\n\t var p = this.DB - i * this.DB % k;\n\t if (i-- > 0) {\n\t if (p < this.DB && (d = this[i] >> p) > 0) {\n\t m = true;\n\t r = int2char(d);\n\t }\n\t while (i >= 0) {\n\t if (p < k) {\n\t d = (this[i] & (1 << p) - 1) << k - p;\n\t d |= this[--i] >> (p += this.DB - k);\n\t } else {\n\t d = this[i] >> (p -= k) & km;\n\t if (p <= 0) {\n\t p += this.DB;\n\t --i;\n\t }\n\t }\n\t if (d > 0) m = true;\n\t if (m) r += int2char(d);\n\t }\n\t }\n\t return m ? r : \"0\";\n\t}\n\t\n\t// (public) -this\n\tfunction bnNegate() {\n\t var r = nbi();\n\t\n\t BigInteger.ZERO.subTo(this, r);\n\t\n\t return r;\n\t}\n\t\n\t// (public) |this|\n\tfunction bnAbs() {\n\t return this.s < 0 ? this.negate() : this;\n\t}\n\t\n\t// (public) return + if this > a, - if this < a, 0 if equal\n\tfunction bnCompareTo(a) {\n\t var r = this.s - a.s;\n\t if (r != 0) return r;\n\t var i = this.t;\n\t r = i - a.t;\n\t if (r != 0) return this.s < 0 ? -r : r;\n\t while (--i >= 0) {\n\t if ((r = this[i] - a[i]) != 0) return r;\n\t }return 0;\n\t}\n\t\n\t// returns bit length of the integer x\n\tfunction nbits(x) {\n\t var r = 1,\n\t t;\n\t if ((t = x >>> 16) != 0) {\n\t x = t;\n\t r += 16;\n\t }\n\t if ((t = x >> 8) != 0) {\n\t x = t;\n\t r += 8;\n\t }\n\t if ((t = x >> 4) != 0) {\n\t x = t;\n\t r += 4;\n\t }\n\t if ((t = x >> 2) != 0) {\n\t x = t;\n\t r += 2;\n\t }\n\t if ((t = x >> 1) != 0) {\n\t x = t;\n\t r += 1;\n\t }\n\t return r;\n\t}\n\t\n\t// (public) return the number of bits in \"this\"\n\tfunction bnBitLength() {\n\t if (this.t <= 0) return 0;\n\t return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM);\n\t}\n\t\n\t// (protected) r = this << n*DB\n\tfunction bnpDLShiftTo(n, r) {\n\t var i;\n\t for (i = this.t - 1; i >= 0; --i) {\n\t r[i + n] = this[i];\n\t }for (i = n - 1; i >= 0; --i) {\n\t r[i] = 0;\n\t }r.t = this.t + n;\n\t r.s = this.s;\n\t}\n\t\n\t// (protected) r = this >> n*DB\n\tfunction bnpDRShiftTo(n, r) {\n\t for (var i = n; i < this.t; ++i) {\n\t r[i - n] = this[i];\n\t }r.t = Math.max(this.t - n, 0);\n\t r.s = this.s;\n\t}\n\t\n\t// (protected) r = this << n\n\tfunction bnpLShiftTo(n, r) {\n\t var bs = n % this.DB;\n\t var cbs = this.DB - bs;\n\t var bm = (1 << cbs) - 1;\n\t var ds = Math.floor(n / this.DB),\n\t c = this.s << bs & this.DM,\n\t i;\n\t for (i = this.t - 1; i >= 0; --i) {\n\t r[i + ds + 1] = this[i] >> cbs | c;\n\t c = (this[i] & bm) << bs;\n\t }\n\t for (i = ds - 1; i >= 0; --i) {\n\t r[i] = 0;\n\t }r[ds] = c;\n\t r.t = this.t + ds + 1;\n\t r.s = this.s;\n\t r.clamp();\n\t}\n\t\n\t// (protected) r = this >> n\n\tfunction bnpRShiftTo(n, r) {\n\t r.s = this.s;\n\t var ds = Math.floor(n / this.DB);\n\t if (ds >= this.t) {\n\t r.t = 0;\n\t return;\n\t }\n\t var bs = n % this.DB;\n\t var cbs = this.DB - bs;\n\t var bm = (1 << bs) - 1;\n\t r[0] = this[ds] >> bs;\n\t for (var i = ds + 1; i < this.t; ++i) {\n\t r[i - ds - 1] |= (this[i] & bm) << cbs;\n\t r[i - ds] = this[i] >> bs;\n\t }\n\t if (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs;\n\t r.t = this.t - ds;\n\t r.clamp();\n\t}\n\t\n\t// (protected) r = this - a\n\tfunction bnpSubTo(a, r) {\n\t var i = 0,\n\t c = 0,\n\t m = Math.min(a.t, this.t);\n\t while (i < m) {\n\t c += this[i] - a[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t if (a.t < this.t) {\n\t c -= a.s;\n\t while (i < this.t) {\n\t c += this[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t c += this.s;\n\t } else {\n\t c += this.s;\n\t while (i < a.t) {\n\t c -= a[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t c -= a.s;\n\t }\n\t r.s = c < 0 ? -1 : 0;\n\t if (c < -1) r[i++] = this.DV + c;else if (c > 0) r[i++] = c;\n\t r.t = i;\n\t r.clamp();\n\t}\n\t\n\t// (protected) r = this * a, r != this,a (HAC 14.12)\n\t// \"this\" should be the larger one if appropriate.\n\tfunction bnpMultiplyTo(a, r) {\n\t var x = this.abs(),\n\t y = a.abs();\n\t var i = x.t;\n\t r.t = i + y.t;\n\t while (--i >= 0) {\n\t r[i] = 0;\n\t }for (i = 0; i < y.t; ++i) {\n\t r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n\t }r.s = 0;\n\t r.clamp();\n\t if (this.s != a.s) BigInteger.ZERO.subTo(r, r);\n\t}\n\t\n\t// (protected) r = this^2, r != this (HAC 14.16)\n\tfunction bnpSquareTo(r) {\n\t var x = this.abs();\n\t var i = r.t = 2 * x.t;\n\t while (--i >= 0) {\n\t r[i] = 0;\n\t }for (i = 0; i < x.t - 1; ++i) {\n\t var c = x.am(i, x[i], r, 2 * i, 0, 1);\n\t if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {\n\t r[i + x.t] -= x.DV;\n\t r[i + x.t + 1] = 1;\n\t }\n\t }\n\t if (r.t > 0) r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n\t r.s = 0;\n\t r.clamp();\n\t}\n\t\n\t// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n\t// r != q, this != m. q or r may be null.\n\tfunction bnpDivRemTo(m, q, r) {\n\t var pm = m.abs();\n\t if (pm.t <= 0) return;\n\t var pt = this.abs();\n\t if (pt.t < pm.t) {\n\t if (q != null) q.fromInt(0);\n\t if (r != null) this.copyTo(r);\n\t return;\n\t }\n\t if (r == null) r = nbi();\n\t var y = nbi(),\n\t ts = this.s,\n\t ms = m.s;\n\t var nsh = this.DB - nbits(pm[pm.t - 1]);\n\t // normalize modulus\n\t if (nsh > 0) {\n\t pm.lShiftTo(nsh, y);\n\t pt.lShiftTo(nsh, r);\n\t } else {\n\t pm.copyTo(y);\n\t pt.copyTo(r);\n\t }\n\t var ys = y.t;\n\t var y0 = y[ys - 1];\n\t if (y0 == 0) return;\n\t var yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0);\n\t var d1 = this.FV / yt,\n\t d2 = (1 << this.F1) / yt,\n\t e = 1 << this.F2;\n\t var i = r.t,\n\t j = i - ys,\n\t t = q == null ? nbi() : q;\n\t y.dlShiftTo(j, t);\n\t if (r.compareTo(t) >= 0) {\n\t r[r.t++] = 1;\n\t r.subTo(t, r);\n\t }\n\t BigInteger.ONE.dlShiftTo(ys, t);\n\t t.subTo(y, y);\n\t // \"negative\" y so we can replace sub with am later\n\t while (y.t < ys) {\n\t y[y.t++] = 0;\n\t }while (--j >= 0) {\n\t // Estimate quotient digit\n\t var qd = r[--i] == y0 ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n\t if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {\n\t // Try it out\n\t y.dlShiftTo(j, t);\n\t r.subTo(t, r);\n\t while (r[i] < --qd) {\n\t r.subTo(t, r);\n\t }\n\t }\n\t }\n\t if (q != null) {\n\t r.drShiftTo(ys, q);\n\t if (ts != ms) BigInteger.ZERO.subTo(q, q);\n\t }\n\t r.t = ys;\n\t r.clamp();\n\t if (nsh > 0) r.rShiftTo(nsh, r);\n\t // Denormalize remainder\n\t if (ts < 0) BigInteger.ZERO.subTo(r, r);\n\t}\n\t\n\t// (public) this mod a\n\tfunction bnMod(a) {\n\t var r = nbi();\n\t this.abs().divRemTo(a, null, r);\n\t if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r);\n\t return r;\n\t}\n\t\n\t// (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n\t// justification:\n\t// xy == 1 (mod m)\n\t// xy = 1+km\n\t// xy(2-xy) = (1+km)(1-km)\n\t// x[y(2-xy)] = 1-k^2m^2\n\t// x[y(2-xy)] == 1 (mod m^2)\n\t// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n\t// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n\t// JS multiply \"overflows\" differently from C/C++, so care is needed here.\n\tfunction bnpInvDigit() {\n\t if (this.t < 1) return 0;\n\t var x = this[0];\n\t if ((x & 1) == 0) return 0;\n\t var y = x & 3;\n\t // y == 1/x mod 2^2\n\t y = y * (2 - (x & 0xf) * y) & 0xf;\n\t // y == 1/x mod 2^4\n\t y = y * (2 - (x & 0xff) * y) & 0xff;\n\t // y == 1/x mod 2^8\n\t y = y * (2 - ((x & 0xffff) * y & 0xffff)) & 0xffff;\n\t // y == 1/x mod 2^16\n\t // last step - calculate inverse mod DV directly;\n\t // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n\t y = y * (2 - x * y % this.DV) % this.DV;\n\t // y == 1/x mod 2^dbits\n\t // we really want the negative inverse, and -DV < y < DV\n\t return y > 0 ? this.DV - y : -y;\n\t}\n\t\n\tfunction bnEquals(a) {\n\t return this.compareTo(a) == 0;\n\t}\n\t\n\t// (protected) r = this + a\n\tfunction bnpAddTo(a, r) {\n\t var i = 0,\n\t c = 0,\n\t m = Math.min(a.t, this.t);\n\t while (i < m) {\n\t c += this[i] + a[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t if (a.t < this.t) {\n\t c += a.s;\n\t while (i < this.t) {\n\t c += this[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t c += this.s;\n\t } else {\n\t c += this.s;\n\t while (i < a.t) {\n\t c += a[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t c += a.s;\n\t }\n\t r.s = c < 0 ? -1 : 0;\n\t if (c > 0) r[i++] = c;else if (c < -1) r[i++] = this.DV + c;\n\t r.t = i;\n\t r.clamp();\n\t}\n\t\n\t// (public) this + a\n\tfunction bnAdd(a) {\n\t var r = nbi();\n\t\n\t this.addTo(a, r);\n\t\n\t return r;\n\t}\n\t\n\t// (public) this - a\n\tfunction bnSubtract(a) {\n\t var r = nbi();\n\t\n\t this.subTo(a, r);\n\t\n\t return r;\n\t}\n\t\n\t// (public) this * a\n\tfunction bnMultiply(a) {\n\t var r = nbi();\n\t\n\t this.multiplyTo(a, r);\n\t\n\t return r;\n\t}\n\t\n\t// (public) this / a\n\tfunction bnDivide(a) {\n\t var r = nbi();\n\t\n\t this.divRemTo(a, r, null);\n\t\n\t return r;\n\t}\n\t\n\t// Montgomery reduction\n\tfunction Montgomery(m) {\n\t this.m = m;\n\t this.mp = m.invDigit();\n\t this.mpl = this.mp & 0x7fff;\n\t this.mph = this.mp >> 15;\n\t this.um = (1 << m.DB - 15) - 1;\n\t this.mt2 = 2 * m.t;\n\t}\n\t\n\t// xR mod m\n\tfunction montConvert(x) {\n\t var r = nbi();\n\t x.abs().dlShiftTo(this.m.t, r);\n\t r.divRemTo(this.m, null, r);\n\t if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r);\n\t return r;\n\t}\n\t\n\t// x/R mod m\n\tfunction montRevert(x) {\n\t var r = nbi();\n\t x.copyTo(r);\n\t this.reduce(r);\n\t return r;\n\t}\n\t\n\t// x = x/R mod m (HAC 14.32)\n\tfunction montReduce(x) {\n\t while (x.t <= this.mt2) {\n\t // pad x so am has enough room later\n\t x[x.t++] = 0;\n\t }for (var i = 0; i < this.m.t; ++i) {\n\t // faster way of calculating u0 = x[i]*mp mod DV\n\t var j = x[i] & 0x7fff;\n\t var u0 = j * this.mpl + ((j * this.mph + (x[i] >> 15) * this.mpl & this.um) << 15) & x.DM;\n\t // use am to combine the multiply-shift-add into one call\n\t j = i + this.m.t;\n\t x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n\t // propagate carry\n\t while (x[j] >= x.DV) {\n\t x[j] -= x.DV;\n\t x[++j]++;\n\t }\n\t }\n\t x.clamp();\n\t x.drShiftTo(this.m.t, x);\n\t if (x.compareTo(this.m) >= 0) x.subTo(this.m, x);\n\t}\n\t\n\t// r = \"x^2/R mod m\"; x != r\n\tfunction montSqrTo(x, r) {\n\t x.squareTo(r);\n\t\n\t this.reduce(r);\n\t}\n\t\n\t// r = \"xy/R mod m\"; x,y != r\n\tfunction montMulTo(x, y, r) {\n\t x.multiplyTo(y, r);\n\t\n\t this.reduce(r);\n\t}\n\t\n\tMontgomery.prototype.convert = montConvert;\n\tMontgomery.prototype.revert = montRevert;\n\tMontgomery.prototype.reduce = montReduce;\n\tMontgomery.prototype.mulTo = montMulTo;\n\tMontgomery.prototype.sqrTo = montSqrTo;\n\t\n\t// (public) this^e % m (HAC 14.85)\n\tfunction bnModPow(e, m, callback) {\n\t var i = e.bitLength(),\n\t k,\n\t r = nbv(1),\n\t z = new Montgomery(m);\n\t if (i <= 0) return r;else if (i < 18) k = 1;else if (i < 48) k = 3;else if (i < 144) k = 4;else if (i < 768) k = 5;else k = 6;\n\t\n\t // precomputation\n\t var g = new Array(),\n\t n = 3,\n\t k1 = k - 1,\n\t km = (1 << k) - 1;\n\t g[1] = z.convert(this);\n\t if (k > 1) {\n\t var g2 = nbi();\n\t z.sqrTo(g[1], g2);\n\t while (n <= km) {\n\t g[n] = nbi();\n\t z.mulTo(g2, g[n - 2], g[n]);\n\t n += 2;\n\t }\n\t }\n\t\n\t var j = e.t - 1,\n\t w,\n\t is1 = true,\n\t r2 = nbi(),\n\t t;\n\t i = nbits(e[j]) - 1;\n\t while (j >= 0) {\n\t if (i >= k1) w = e[j] >> i - k1 & km;else {\n\t w = (e[j] & (1 << i + 1) - 1) << k1 - i;\n\t if (j > 0) w |= e[j - 1] >> this.DB + i - k1;\n\t }\n\t\n\t n = k;\n\t while ((w & 1) == 0) {\n\t w >>= 1;\n\t --n;\n\t }\n\t if ((i -= n) < 0) {\n\t i += this.DB;\n\t --j;\n\t }\n\t if (is1) {\n\t // ret == 1, don't bother squaring or multiplying it\n\t g[w].copyTo(r);\n\t is1 = false;\n\t } else {\n\t while (n > 1) {\n\t z.sqrTo(r, r2);\n\t z.sqrTo(r2, r);\n\t n -= 2;\n\t }\n\t if (n > 0) z.sqrTo(r, r2);else {\n\t t = r;\n\t r = r2;\n\t r2 = t;\n\t }\n\t z.mulTo(r2, g[w], r);\n\t }\n\t\n\t while (j >= 0 && (e[j] & 1 << i) == 0) {\n\t z.sqrTo(r, r2);\n\t t = r;\n\t r = r2;\n\t r2 = t;\n\t if (--i < 0) {\n\t i = this.DB - 1;\n\t --j;\n\t }\n\t }\n\t }\n\t var result = z.revert(r);\n\t callback(null, result);\n\t return result;\n\t}\n\t\n\t// protected\n\tBigInteger.prototype.copyTo = bnpCopyTo;\n\tBigInteger.prototype.fromInt = bnpFromInt;\n\tBigInteger.prototype.fromString = bnpFromString;\n\tBigInteger.prototype.clamp = bnpClamp;\n\tBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n\tBigInteger.prototype.drShiftTo = bnpDRShiftTo;\n\tBigInteger.prototype.lShiftTo = bnpLShiftTo;\n\tBigInteger.prototype.rShiftTo = bnpRShiftTo;\n\tBigInteger.prototype.subTo = bnpSubTo;\n\tBigInteger.prototype.multiplyTo = bnpMultiplyTo;\n\tBigInteger.prototype.squareTo = bnpSquareTo;\n\tBigInteger.prototype.divRemTo = bnpDivRemTo;\n\tBigInteger.prototype.invDigit = bnpInvDigit;\n\tBigInteger.prototype.addTo = bnpAddTo;\n\t\n\t// public\n\tBigInteger.prototype.toString = bnToString;\n\tBigInteger.prototype.negate = bnNegate;\n\tBigInteger.prototype.abs = bnAbs;\n\tBigInteger.prototype.compareTo = bnCompareTo;\n\tBigInteger.prototype.bitLength = bnBitLength;\n\tBigInteger.prototype.mod = bnMod;\n\tBigInteger.prototype.equals = bnEquals;\n\tBigInteger.prototype.add = bnAdd;\n\tBigInteger.prototype.subtract = bnSubtract;\n\tBigInteger.prototype.multiply = bnMultiply;\n\tBigInteger.prototype.divide = bnDivide;\n\tBigInteger.prototype.modPow = bnModPow;\n\t\n\t// \"constants\"\n\tBigInteger.ZERO = nbv(0);\n\tBigInteger.ONE = nbv(1);\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _CognitoJwtToken2 = __webpack_require__(7);\n\t\n\tvar _CognitoJwtToken3 = _interopRequireDefault(_CognitoJwtToken2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoAccessToken = function (_CognitoJwtToken) {\n\t _inherits(CognitoAccessToken, _CognitoJwtToken);\n\t\n\t /**\n\t * Constructs a new CognitoAccessToken object\n\t * @param {string=} AccessToken The JWT access token.\n\t */\n\t function CognitoAccessToken() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t AccessToken = _ref.AccessToken;\n\t\n\t _classCallCheck(this, CognitoAccessToken);\n\t\n\t return _possibleConstructorReturn(this, _CognitoJwtToken.call(this, AccessToken || ''));\n\t }\n\t\n\t return CognitoAccessToken;\n\t}(_CognitoJwtToken3.default);\n\t\n\texports.default = CognitoAccessToken;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _CognitoJwtToken2 = __webpack_require__(7);\n\t\n\tvar _CognitoJwtToken3 = _interopRequireDefault(_CognitoJwtToken2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoIdToken = function (_CognitoJwtToken) {\n\t _inherits(CognitoIdToken, _CognitoJwtToken);\n\t\n\t /**\n\t * Constructs a new CognitoIdToken object\n\t * @param {string=} IdToken The JWT Id token\n\t */\n\t function CognitoIdToken() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t IdToken = _ref.IdToken;\n\t\n\t _classCallCheck(this, CognitoIdToken);\n\t\n\t return _possibleConstructorReturn(this, _CognitoJwtToken.call(this, IdToken || ''));\n\t }\n\t\n\t return CognitoIdToken;\n\t}(_CognitoJwtToken3.default);\n\t\n\texports.default = CognitoIdToken;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _buffer = __webpack_require__(1);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoJwtToken = function () {\n\t /**\n\t * Constructs a new CognitoJwtToken object\n\t * @param {string=} token The JWT token.\n\t */\n\t function CognitoJwtToken(token) {\n\t _classCallCheck(this, CognitoJwtToken);\n\t\n\t // Assign object\n\t this.jwtToken = token || '';\n\t this.payload = this.decodePayload();\n\t }\n\t\n\t /**\n\t * @returns {string} the record's token.\n\t */\n\t\n\t\n\t CognitoJwtToken.prototype.getJwtToken = function getJwtToken() {\n\t return this.jwtToken;\n\t };\n\t\n\t /**\n\t * @returns {int} the token's expiration (exp member).\n\t */\n\t\n\t\n\t CognitoJwtToken.prototype.getExpiration = function getExpiration() {\n\t return this.payload.exp;\n\t };\n\t\n\t /**\n\t * @returns {int} the token's \"issued at\" (iat member).\n\t */\n\t\n\t\n\t CognitoJwtToken.prototype.getIssuedAt = function getIssuedAt() {\n\t return this.payload.iat;\n\t };\n\t\n\t /**\n\t * @returns {object} the token's payload.\n\t */\n\t\n\t\n\t CognitoJwtToken.prototype.decodePayload = function decodePayload() {\n\t var payload = this.jwtToken.split('.')[1];\n\t try {\n\t return JSON.parse(_buffer.Buffer.from(payload, 'base64').toString('utf8'));\n\t } catch (err) {\n\t return {};\n\t }\n\t };\n\t\n\t return CognitoJwtToken;\n\t}();\n\t\n\texports.default = CognitoJwtToken;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoRefreshToken = function () {\n\t /**\n\t * Constructs a new CognitoRefreshToken object\n\t * @param {string=} RefreshToken The JWT refresh token.\n\t */\n\t function CognitoRefreshToken() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t RefreshToken = _ref.RefreshToken;\n\t\n\t _classCallCheck(this, CognitoRefreshToken);\n\t\n\t // Assign object\n\t this.token = RefreshToken || '';\n\t }\n\t\n\t /**\n\t * @returns {string} the record's token.\n\t */\n\t\n\t\n\t CognitoRefreshToken.prototype.getToken = function getToken() {\n\t return this.token;\n\t };\n\t\n\t return CognitoRefreshToken;\n\t}();\n\t\n\texports.default = CognitoRefreshToken;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _buffer = __webpack_require__(1);\n\t\n\tvar _cryptoBrowserify = __webpack_require__(14);\n\t\n\tvar crypto = _interopRequireWildcard(_cryptoBrowserify);\n\t\n\tvar _BigInteger = __webpack_require__(4);\n\t\n\tvar _BigInteger2 = _interopRequireDefault(_BigInteger);\n\t\n\tvar _AuthenticationHelper = __webpack_require__(3);\n\t\n\tvar _AuthenticationHelper2 = _interopRequireDefault(_AuthenticationHelper);\n\t\n\tvar _CognitoAccessToken = __webpack_require__(5);\n\t\n\tvar _CognitoAccessToken2 = _interopRequireDefault(_CognitoAccessToken);\n\t\n\tvar _CognitoIdToken = __webpack_require__(6);\n\t\n\tvar _CognitoIdToken2 = _interopRequireDefault(_CognitoIdToken);\n\t\n\tvar _CognitoRefreshToken = __webpack_require__(8);\n\t\n\tvar _CognitoRefreshToken2 = _interopRequireDefault(_CognitoRefreshToken);\n\t\n\tvar _CognitoUserSession = __webpack_require__(11);\n\t\n\tvar _CognitoUserSession2 = _interopRequireDefault(_CognitoUserSession);\n\t\n\tvar _DateHelper = __webpack_require__(12);\n\t\n\tvar _DateHelper2 = _interopRequireDefault(_DateHelper);\n\t\n\tvar _CognitoUserAttribute = __webpack_require__(10);\n\t\n\tvar _CognitoUserAttribute2 = _interopRequireDefault(_CognitoUserAttribute);\n\t\n\tvar _StorageHelper = __webpack_require__(13);\n\t\n\tvar _StorageHelper2 = _interopRequireDefault(_StorageHelper);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t//import createHmac from 'create-hmac';\n\t\n\t\n\tvar createHmac = crypto.createHmac;\n\t\n\t/**\n\t * @callback nodeCallback\n\t * @template T result\n\t * @param {*} err The operation failure reason, or null.\n\t * @param {T} result The operation result.\n\t */\n\t\n\t/**\n\t * @callback onFailure\n\t * @param {*} err Failure reason.\n\t */\n\t\n\t/**\n\t * @callback onSuccess\n\t * @template T result\n\t * @param {T} result The operation result.\n\t */\n\t\n\t/**\n\t * @callback mfaRequired\n\t * @param {*} details MFA challenge details.\n\t */\n\t\n\t/**\n\t * @callback customChallenge\n\t * @param {*} details Custom challenge details.\n\t */\n\t\n\t/**\n\t * @callback inputVerificationCode\n\t * @param {*} data Server response.\n\t */\n\t\n\t/**\n\t * @callback authSuccess\n\t * @param {CognitoUserSession} session The new session.\n\t * @param {bool=} userConfirmationNecessary User must be confirmed.\n\t */\n\t\n\t/** @class */\n\tvar CognitoUser = function () {\n\t /**\n\t * Constructs a new CognitoUser object\n\t * @param {object} data Creation options\n\t * @param {string} data.Username The user's username.\n\t * @param {CognitoUserPool} data.Pool Pool containing the user.\n\t * @param {object} data.Storage Optional storage object.\n\t */\n\t function CognitoUser(data) {\n\t _classCallCheck(this, CognitoUser);\n\t\n\t if (data == null || data.Username == null || data.Pool == null) {\n\t throw new Error('Username and pool information are required.');\n\t }\n\t\n\t this.username = data.Username || '';\n\t this.pool = data.Pool;\n\t this.Session = null;\n\t\n\t this.client = data.Pool.client;\n\t\n\t this.signInUserSession = null;\n\t this.authenticationFlowType = 'USER_SRP_AUTH';\n\t\n\t this.storage = data.Storage || new _StorageHelper2.default().getStorage();\n\t }\n\t\n\t /**\n\t * Sets the session for this user\n\t * @param {CognitoUserSession} signInUserSession the session\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.setSignInUserSession = function setSignInUserSession(signInUserSession) {\n\t this.clearCachedTokens();\n\t this.signInUserSession = signInUserSession;\n\t this.cacheTokens();\n\t };\n\t\n\t /**\n\t * @returns {CognitoUserSession} the current session for this user\n\t */\n\t\n\t\n\t CognitoUser.prototype.getSignInUserSession = function getSignInUserSession() {\n\t return this.signInUserSession;\n\t };\n\t\n\t /**\n\t * @returns {string} the user's username\n\t */\n\t\n\t\n\t CognitoUser.prototype.getUsername = function getUsername() {\n\t return this.username;\n\t };\n\t\n\t /**\n\t * @returns {String} the authentication flow type\n\t */\n\t\n\t\n\t CognitoUser.prototype.getAuthenticationFlowType = function getAuthenticationFlowType() {\n\t return this.authenticationFlowType;\n\t };\n\t\n\t /**\n\t * sets authentication flow type\n\t * @param {string} authenticationFlowType New value.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.setAuthenticationFlowType = function setAuthenticationFlowType(authenticationFlowType) {\n\t this.authenticationFlowType = authenticationFlowType;\n\t };\n\t\n\t /**\n\t * This is used for authenticating the user through the custom authentication flow.\n\t * @param {AuthenticationDetails} authDetails Contains the authentication data\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {customChallenge} callback.customChallenge Custom challenge\n\t * response required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.initiateAuth = function initiateAuth(authDetails, callback) {\n\t var _this = this;\n\t\n\t var authParameters = authDetails.getAuthParameters();\n\t authParameters.USERNAME = this.username;\n\t\n\t var jsonReq = {\n\t AuthFlow: 'CUSTOM_AUTH',\n\t ClientId: this.pool.getClientId(),\n\t AuthParameters: authParameters,\n\t ClientMetadata: authDetails.getValidationData()\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t\n\t this.client.request('InitiateAuth', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t var challengeName = data.ChallengeName;\n\t var challengeParameters = data.ChallengeParameters;\n\t\n\t if (challengeName === 'CUSTOM_CHALLENGE') {\n\t _this.Session = data.Session;\n\t return callback.customChallenge(challengeParameters);\n\t }\n\t _this.signInUserSession = _this.getCognitoUserSession(data.AuthenticationResult);\n\t _this.cacheTokens();\n\t return callback.onSuccess(_this.signInUserSession);\n\t });\n\t };\n\t\n\t /**\n\t * This is used for authenticating the user.\n\t * stuff\n\t * @param {AuthenticationDetails} authDetails Contains the authentication data\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {newPasswordRequired} callback.newPasswordRequired new\n\t * password and any required attributes are required to continue\n\t * @param {mfaRequired} callback.mfaRequired MFA code\n\t * required to continue.\n\t * @param {customChallenge} callback.customChallenge Custom challenge\n\t * response required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.authenticateUser = function authenticateUser(authDetails, callback) {\n\t if (this.authenticationFlowType === 'USER_PASSWORD_AUTH') {\n\t return this.authenticateUserPlainUsernamePassword(authDetails, callback);\n\t } else if (this.authenticationFlowType === 'USER_SRP_AUTH') {\n\t return this.authenticateUserDefaultAuth(authDetails, callback);\n\t }\n\t return callback.onFailure(new Error('Authentication flow type is invalid.'));\n\t };\n\t\n\t /**\n\t * PRIVATE ONLY: This is an internal only method and should not\n\t * be directly called by the consumers.\n\t * It calls the AuthenticationHelper for SRP related\n\t * stuff\n\t * @param {AuthenticationDetails} authDetails Contains the authentication data\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {newPasswordRequired} callback.newPasswordRequired new\n\t * password and any required attributes are required to continue\n\t * @param {mfaRequired} callback.mfaRequired MFA code\n\t * required to continue.\n\t * @param {customChallenge} callback.customChallenge Custom challenge\n\t * response required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.authenticateUserDefaultAuth = function authenticateUserDefaultAuth(authDetails, callback) {\n\t var _this2 = this;\n\t\n\t var authenticationHelper = new _AuthenticationHelper2.default(this.pool.getUserPoolId().split('_')[1]);\n\t var dateHelper = new _DateHelper2.default();\n\t\n\t var serverBValue = void 0;\n\t var salt = void 0;\n\t var authParameters = {};\n\t\n\t if (this.deviceKey != null) {\n\t authParameters.DEVICE_KEY = this.deviceKey;\n\t }\n\t\n\t authParameters.USERNAME = this.username;\n\t authenticationHelper.getLargeAValue(function (errOnAValue, aValue) {\n\t // getLargeAValue callback start\n\t if (errOnAValue) {\n\t callback.onFailure(errOnAValue);\n\t }\n\t\n\t authParameters.SRP_A = aValue.toString(16);\n\t\n\t if (_this2.authenticationFlowType === 'CUSTOM_AUTH') {\n\t authParameters.CHALLENGE_NAME = 'SRP_A';\n\t }\n\t\n\t var jsonReq = {\n\t AuthFlow: _this2.authenticationFlowType,\n\t ClientId: _this2.pool.getClientId(),\n\t AuthParameters: authParameters,\n\t ClientMetadata: authDetails.getValidationData()\n\t };\n\t if (_this2.getUserContextData(_this2.username)) {\n\t jsonReq.UserContextData = _this2.getUserContextData(_this2.username);\n\t }\n\t\n\t _this2.client.request('InitiateAuth', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t\n\t var challengeParameters = data.ChallengeParameters;\n\t\n\t _this2.username = challengeParameters.USER_ID_FOR_SRP;\n\t serverBValue = new _BigInteger2.default(challengeParameters.SRP_B, 16);\n\t salt = new _BigInteger2.default(challengeParameters.SALT, 16);\n\t _this2.getCachedDeviceKeyAndPassword();\n\t\n\t authenticationHelper.getPasswordAuthenticationKey(_this2.username, authDetails.getPassword(), serverBValue, salt, function (errOnHkdf, hkdf) {\n\t // getPasswordAuthenticationKey callback start\n\t if (errOnHkdf) {\n\t callback.onFailure(errOnHkdf);\n\t }\n\t\n\t var dateNow = dateHelper.getNowString();\n\t\n\t var signatureString = createHmac('sha256', hkdf).update(_buffer.Buffer.concat([_buffer.Buffer.from(_this2.pool.getUserPoolId().split('_')[1], 'utf8'), _buffer.Buffer.from(_this2.username, 'utf8'), _buffer.Buffer.from(challengeParameters.SECRET_BLOCK, 'base64'), _buffer.Buffer.from(dateNow, 'utf8')])).digest('base64');\n\t\n\t var challengeResponses = {};\n\t\n\t challengeResponses.USERNAME = _this2.username;\n\t challengeResponses.PASSWORD_CLAIM_SECRET_BLOCK = challengeParameters.SECRET_BLOCK;\n\t challengeResponses.TIMESTAMP = dateNow;\n\t challengeResponses.PASSWORD_CLAIM_SIGNATURE = signatureString;\n\t\n\t if (_this2.deviceKey != null) {\n\t challengeResponses.DEVICE_KEY = _this2.deviceKey;\n\t }\n\t\n\t var respondToAuthChallenge = function respondToAuthChallenge(challenge, challengeCallback) {\n\t return _this2.client.request('RespondToAuthChallenge', challenge, function (errChallenge, dataChallenge) {\n\t if (errChallenge && errChallenge.code === 'ResourceNotFoundException' && errChallenge.message.toLowerCase().indexOf('device') !== -1) {\n\t challengeResponses.DEVICE_KEY = null;\n\t _this2.deviceKey = null;\n\t _this2.randomPassword = null;\n\t _this2.deviceGroupKey = null;\n\t _this2.clearCachedDeviceKeyAndPassword();\n\t return respondToAuthChallenge(challenge, challengeCallback);\n\t }\n\t return challengeCallback(errChallenge, dataChallenge);\n\t });\n\t };\n\t\n\t var jsonReqResp = {\n\t ChallengeName: 'PASSWORD_VERIFIER',\n\t ClientId: _this2.pool.getClientId(),\n\t ChallengeResponses: challengeResponses,\n\t Session: data.Session\n\t };\n\t if (_this2.getUserContextData()) {\n\t jsonReqResp.UserContextData = _this2.getUserContextData();\n\t }\n\t respondToAuthChallenge(jsonReqResp, function (errAuthenticate, dataAuthenticate) {\n\t if (errAuthenticate) {\n\t return callback.onFailure(errAuthenticate);\n\t }\n\t\n\t var challengeName = dataAuthenticate.ChallengeName;\n\t if (challengeName === 'NEW_PASSWORD_REQUIRED') {\n\t _this2.Session = dataAuthenticate.Session;\n\t var userAttributes = null;\n\t var rawRequiredAttributes = null;\n\t var requiredAttributes = [];\n\t var userAttributesPrefix = authenticationHelper.getNewPasswordRequiredChallengeUserAttributePrefix();\n\t\n\t if (dataAuthenticate.ChallengeParameters) {\n\t userAttributes = JSON.parse(dataAuthenticate.ChallengeParameters.userAttributes);\n\t rawRequiredAttributes = JSON.parse(dataAuthenticate.ChallengeParameters.requiredAttributes);\n\t }\n\t\n\t if (rawRequiredAttributes) {\n\t for (var i = 0; i < rawRequiredAttributes.length; i++) {\n\t requiredAttributes[i] = rawRequiredAttributes[i].substr(userAttributesPrefix.length);\n\t }\n\t }\n\t return callback.newPasswordRequired(userAttributes, requiredAttributes);\n\t }\n\t return _this2.authenticateUserInternal(dataAuthenticate, authenticationHelper, callback);\n\t });\n\t return undefined;\n\t // getPasswordAuthenticationKey callback end\n\t });\n\t return undefined;\n\t });\n\t // getLargeAValue callback end\n\t });\n\t };\n\t\n\t /**\n\t * PRIVATE ONLY: This is an internal only method and should not\n\t * be directly called by the consumers.\n\t * @param {AuthenticationDetails} authDetails Contains the authentication data.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {mfaRequired} callback.mfaRequired MFA code\n\t * required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.authenticateUserPlainUsernamePassword = function authenticateUserPlainUsernamePassword(authDetails, callback) {\n\t var _this3 = this;\n\t\n\t var authParameters = {};\n\t authParameters.USERNAME = this.username;\n\t authParameters.PASSWORD = authDetails.getPassword();\n\t if (!authParameters.PASSWORD) {\n\t callback.onFailure(new Error('PASSWORD parameter is required'));\n\t return;\n\t }\n\t var authenticationHelper = new _AuthenticationHelper2.default(this.pool.getUserPoolId().split('_')[1]);\n\t this.getCachedDeviceKeyAndPassword();\n\t if (this.deviceKey != null) {\n\t authParameters.DEVICE_KEY = this.deviceKey;\n\t }\n\t\n\t var jsonReq = {\n\t AuthFlow: 'USER_PASSWORD_AUTH',\n\t ClientId: this.pool.getClientId(),\n\t AuthParameters: authParameters,\n\t ClientMetadata: authDetails.getValidationData()\n\t };\n\t if (this.getUserContextData(this.username)) {\n\t jsonReq.UserContextData = this.getUserContextData(this.username);\n\t }\n\t // USER_PASSWORD_AUTH happens in a single round-trip: client sends userName and password,\n\t // Cognito UserPools verifies password and returns tokens.\n\t this.client.request('InitiateAuth', jsonReq, function (err, authResult) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return _this3.authenticateUserInternal(authResult, authenticationHelper, callback);\n\t });\n\t };\n\t\n\t /**\n\t * PRIVATE ONLY: This is an internal only method and should not\n\t * be directly called by the consumers.\n\t * @param {object} dataAuthenticate authentication data\n\t * @param {object} authenticationHelper helper created\n\t * @param {callback} callback passed on from caller\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.authenticateUserInternal = function authenticateUserInternal(dataAuthenticate, authenticationHelper, callback) {\n\t var _this4 = this;\n\t\n\t var challengeName = dataAuthenticate.ChallengeName;\n\t var challengeParameters = dataAuthenticate.ChallengeParameters;\n\t\n\t if (challengeName === 'SMS_MFA') {\n\t this.Session = dataAuthenticate.Session;\n\t return callback.mfaRequired(challengeName, challengeParameters);\n\t }\n\t\n\t if (challengeName === 'SELECT_MFA_TYPE') {\n\t this.Session = dataAuthenticate.Session;\n\t return callback.selectMFAType(challengeName, challengeParameters);\n\t }\n\t\n\t if (challengeName === 'MFA_SETUP') {\n\t this.Session = dataAuthenticate.Session;\n\t return callback.mfaSetup(challengeName, challengeParameters);\n\t }\n\t\n\t if (challengeName === 'SOFTWARE_TOKEN_MFA') {\n\t this.Session = dataAuthenticate.Session;\n\t return callback.totpRequired(challengeName, challengeParameters);\n\t }\n\t\n\t if (challengeName === 'CUSTOM_CHALLENGE') {\n\t this.Session = dataAuthenticate.Session;\n\t return callback.customChallenge(challengeParameters);\n\t }\n\t\n\t if (challengeName === 'DEVICE_SRP_AUTH') {\n\t this.getDeviceResponse(callback);\n\t return undefined;\n\t }\n\t\n\t this.signInUserSession = this.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n\t this.cacheTokens();\n\t\n\t var newDeviceMetadata = dataAuthenticate.AuthenticationResult.NewDeviceMetadata;\n\t if (newDeviceMetadata == null) {\n\t return callback.onSuccess(this.signInUserSession);\n\t }\n\t\n\t authenticationHelper.generateHashDevice(dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey, function (errGenHash) {\n\t if (errGenHash) {\n\t return callback.onFailure(errGenHash);\n\t }\n\t\n\t var deviceSecretVerifierConfig = {\n\t Salt: _buffer.Buffer.from(authenticationHelper.getSaltDevices(), 'hex').toString('base64'),\n\t PasswordVerifier: _buffer.Buffer.from(authenticationHelper.getVerifierDevices(), 'hex').toString('base64')\n\t };\n\t\n\t _this4.verifierDevices = deviceSecretVerifierConfig.PasswordVerifier;\n\t _this4.deviceGroupKey = newDeviceMetadata.DeviceGroupKey;\n\t _this4.randomPassword = authenticationHelper.getRandomPassword();\n\t\n\t _this4.client.request('ConfirmDevice', {\n\t DeviceKey: newDeviceMetadata.DeviceKey,\n\t AccessToken: _this4.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n\t DeviceName: navigator.userAgent\n\t }, function (errConfirm, dataConfirm) {\n\t if (errConfirm) {\n\t return callback.onFailure(errConfirm);\n\t }\n\t\n\t _this4.deviceKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey;\n\t _this4.cacheDeviceKeyAndPassword();\n\t if (dataConfirm.UserConfirmationNecessary === true) {\n\t return callback.onSuccess(_this4.signInUserSession, dataConfirm.UserConfirmationNecessary);\n\t }\n\t return callback.onSuccess(_this4.signInUserSession);\n\t });\n\t return undefined;\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This method is user to complete the NEW_PASSWORD_REQUIRED challenge.\n\t * Pass the new password with any new user attributes to be updated.\n\t * User attribute keys must be of format userAttributes..\n\t * @param {string} newPassword new password for this user\n\t * @param {object} requiredAttributeData map with values for all required attributes\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {mfaRequired} callback.mfaRequired MFA code required to continue.\n\t * @param {customChallenge} callback.customChallenge Custom challenge\n\t * response required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.completeNewPasswordChallenge = function completeNewPasswordChallenge(newPassword, requiredAttributeData, callback) {\n\t var _this5 = this;\n\t\n\t if (!newPassword) {\n\t return callback.onFailure(new Error('New password is required.'));\n\t }\n\t var authenticationHelper = new _AuthenticationHelper2.default(this.pool.getUserPoolId().split('_')[1]);\n\t var userAttributesPrefix = authenticationHelper.getNewPasswordRequiredChallengeUserAttributePrefix();\n\t\n\t var finalUserAttributes = {};\n\t if (requiredAttributeData) {\n\t Object.keys(requiredAttributeData).forEach(function (key) {\n\t finalUserAttributes[userAttributesPrefix + key] = requiredAttributeData[key];\n\t });\n\t }\n\t\n\t finalUserAttributes.NEW_PASSWORD = newPassword;\n\t finalUserAttributes.USERNAME = this.username;\n\t var jsonReq = {\n\t ChallengeName: 'NEW_PASSWORD_REQUIRED',\n\t ClientId: this.pool.getClientId(),\n\t ChallengeResponses: finalUserAttributes,\n\t Session: this.Session\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t\n\t this.client.request('RespondToAuthChallenge', jsonReq, function (errAuthenticate, dataAuthenticate) {\n\t if (errAuthenticate) {\n\t return callback.onFailure(errAuthenticate);\n\t }\n\t return _this5.authenticateUserInternal(dataAuthenticate, authenticationHelper, callback);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to get a session using device authentication. It is called at the end of user\n\t * authentication\n\t *\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t * @private\n\t */\n\t\n\t\n\t CognitoUser.prototype.getDeviceResponse = function getDeviceResponse(callback) {\n\t var _this6 = this;\n\t\n\t var authenticationHelper = new _AuthenticationHelper2.default(this.deviceGroupKey);\n\t var dateHelper = new _DateHelper2.default();\n\t\n\t var authParameters = {};\n\t\n\t authParameters.USERNAME = this.username;\n\t authParameters.DEVICE_KEY = this.deviceKey;\n\t authenticationHelper.getLargeAValue(function (errAValue, aValue) {\n\t // getLargeAValue callback start\n\t if (errAValue) {\n\t callback.onFailure(errAValue);\n\t }\n\t\n\t authParameters.SRP_A = aValue.toString(16);\n\t\n\t var jsonReq = {\n\t ChallengeName: 'DEVICE_SRP_AUTH',\n\t ClientId: _this6.pool.getClientId(),\n\t ChallengeResponses: authParameters\n\t };\n\t if (_this6.getUserContextData()) {\n\t jsonReq.UserContextData = _this6.getUserContextData();\n\t }\n\t _this6.client.request('RespondToAuthChallenge', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t\n\t var challengeParameters = data.ChallengeParameters;\n\t\n\t var serverBValue = new _BigInteger2.default(challengeParameters.SRP_B, 16);\n\t var salt = new _BigInteger2.default(challengeParameters.SALT, 16);\n\t\n\t authenticationHelper.getPasswordAuthenticationKey(_this6.deviceKey, _this6.randomPassword, serverBValue, salt, function (errHkdf, hkdf) {\n\t // getPasswordAuthenticationKey callback start\n\t if (errHkdf) {\n\t return callback.onFailure(errHkdf);\n\t }\n\t\n\t var dateNow = dateHelper.getNowString();\n\t\n\t var signatureString = createHmac('sha256', hkdf).update(_buffer.Buffer.concat([_buffer.Buffer.from(_this6.deviceGroupKey, 'utf8'), _buffer.Buffer.from(_this6.deviceKey, 'utf8'), _buffer.Buffer.from(challengeParameters.SECRET_BLOCK, 'base64'), _buffer.Buffer.from(dateNow, 'utf8')])).digest('base64');\n\t\n\t var challengeResponses = {};\n\t\n\t challengeResponses.USERNAME = _this6.username;\n\t challengeResponses.PASSWORD_CLAIM_SECRET_BLOCK = challengeParameters.SECRET_BLOCK;\n\t challengeResponses.TIMESTAMP = dateNow;\n\t challengeResponses.PASSWORD_CLAIM_SIGNATURE = signatureString;\n\t challengeResponses.DEVICE_KEY = _this6.deviceKey;\n\t\n\t var jsonReqResp = {\n\t ChallengeName: 'DEVICE_PASSWORD_VERIFIER',\n\t ClientId: _this6.pool.getClientId(),\n\t ChallengeResponses: challengeResponses,\n\t Session: data.Session\n\t };\n\t if (_this6.getUserContextData()) {\n\t jsonReqResp.UserContextData = _this6.getUserContextData();\n\t }\n\t\n\t _this6.client.request('RespondToAuthChallenge', jsonReqResp, function (errAuthenticate, dataAuthenticate) {\n\t if (errAuthenticate) {\n\t return callback.onFailure(errAuthenticate);\n\t }\n\t\n\t _this6.signInUserSession = _this6.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n\t _this6.cacheTokens();\n\t\n\t return callback.onSuccess(_this6.signInUserSession);\n\t });\n\t return undefined;\n\t // getPasswordAuthenticationKey callback end\n\t });\n\t return undefined;\n\t });\n\t // getLargeAValue callback end\n\t });\n\t };\n\t\n\t /**\n\t * This is used for a certain user to confirm the registration by using a confirmation code\n\t * @param {string} confirmationCode Code entered by user.\n\t * @param {bool} forceAliasCreation Allow migrating from an existing email / phone number.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.confirmRegistration = function confirmRegistration(confirmationCode, forceAliasCreation, callback) {\n\t var jsonReq = {\n\t ClientId: this.pool.getClientId(),\n\t ConfirmationCode: confirmationCode,\n\t Username: this.username,\n\t ForceAliasCreation: forceAliasCreation\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('ConfirmSignUp', jsonReq, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t };\n\t\n\t /**\n\t * This is used by the user once he has the responses to a custom challenge\n\t * @param {string} answerChallenge The custom challange answer.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {customChallenge} callback.customChallenge\n\t * Custom challenge response required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.sendCustomChallengeAnswer = function sendCustomChallengeAnswer(answerChallenge, callback) {\n\t var _this7 = this;\n\t\n\t var challengeResponses = {};\n\t challengeResponses.USERNAME = this.username;\n\t challengeResponses.ANSWER = answerChallenge;\n\t\n\t var authenticationHelper = new _AuthenticationHelper2.default(this.pool.getUserPoolId().split('_')[1]);\n\t this.getCachedDeviceKeyAndPassword();\n\t if (this.deviceKey != null) {\n\t challengeResponses.DEVICE_KEY = this.deviceKey;\n\t }\n\t\n\t var jsonReq = {\n\t ChallengeName: 'CUSTOM_CHALLENGE',\n\t ChallengeResponses: challengeResponses,\n\t ClientId: this.pool.getClientId(),\n\t Session: this.Session\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('RespondToAuthChallenge', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t\n\t return _this7.authenticateUserInternal(data, authenticationHelper, callback);\n\t });\n\t };\n\t\n\t /**\n\t * This is used by the user once he has an MFA code\n\t * @param {string} confirmationCode The MFA code entered by the user.\n\t * @param {object} callback Result callback map.\n\t * @param {string} mfaType The mfa we are replying to.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.sendMFACode = function sendMFACode(confirmationCode, callback, mfaType) {\n\t var _this8 = this;\n\t\n\t var challengeResponses = {};\n\t challengeResponses.USERNAME = this.username;\n\t challengeResponses.SMS_MFA_CODE = confirmationCode;\n\t var mfaTypeSelection = mfaType || 'SMS_MFA';\n\t if (mfaTypeSelection === 'SOFTWARE_TOKEN_MFA') {\n\t challengeResponses.SOFTWARE_TOKEN_MFA_CODE = confirmationCode;\n\t }\n\t\n\t if (this.deviceKey != null) {\n\t challengeResponses.DEVICE_KEY = this.deviceKey;\n\t }\n\t\n\t var jsonReq = {\n\t ChallengeName: mfaTypeSelection,\n\t ChallengeResponses: challengeResponses,\n\t ClientId: this.pool.getClientId(),\n\t Session: this.Session\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t\n\t this.client.request('RespondToAuthChallenge', jsonReq, function (err, dataAuthenticate) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t\n\t var challengeName = dataAuthenticate.ChallengeName;\n\t\n\t if (challengeName === 'DEVICE_SRP_AUTH') {\n\t _this8.getDeviceResponse(callback);\n\t return undefined;\n\t }\n\t\n\t _this8.signInUserSession = _this8.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n\t _this8.cacheTokens();\n\t\n\t if (dataAuthenticate.AuthenticationResult.NewDeviceMetadata == null) {\n\t return callback.onSuccess(_this8.signInUserSession);\n\t }\n\t\n\t var authenticationHelper = new _AuthenticationHelper2.default(_this8.pool.getUserPoolId().split('_')[1]);\n\t authenticationHelper.generateHashDevice(dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey, function (errGenHash) {\n\t if (errGenHash) {\n\t return callback.onFailure(errGenHash);\n\t }\n\t\n\t var deviceSecretVerifierConfig = {\n\t Salt: _buffer.Buffer.from(authenticationHelper.getSaltDevices(), 'hex').toString('base64'),\n\t PasswordVerifier: _buffer.Buffer.from(authenticationHelper.getVerifierDevices(), 'hex').toString('base64')\n\t };\n\t\n\t _this8.verifierDevices = deviceSecretVerifierConfig.PasswordVerifier;\n\t _this8.deviceGroupKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey;\n\t _this8.randomPassword = authenticationHelper.getRandomPassword();\n\t\n\t _this8.client.request('ConfirmDevice', {\n\t DeviceKey: dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey,\n\t AccessToken: _this8.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n\t DeviceName: navigator.userAgent\n\t }, function (errConfirm, dataConfirm) {\n\t if (errConfirm) {\n\t return callback.onFailure(errConfirm);\n\t }\n\t\n\t _this8.deviceKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey;\n\t _this8.cacheDeviceKeyAndPassword();\n\t if (dataConfirm.UserConfirmationNecessary === true) {\n\t return callback.onSuccess(_this8.signInUserSession, dataConfirm.UserConfirmationNecessary);\n\t }\n\t return callback.onSuccess(_this8.signInUserSession);\n\t });\n\t return undefined;\n\t });\n\t return undefined;\n\t });\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to change the current password\n\t * @param {string} oldUserPassword The current password.\n\t * @param {string} newUserPassword The requested new password.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.changePassword = function changePassword(oldUserPassword, newUserPassword, callback) {\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('ChangePassword', {\n\t PreviousPassword: oldUserPassword,\n\t ProposedPassword: newUserPassword,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to enable MFA for himself\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.enableMFA = function enableMFA(callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t var mfaOptions = [];\n\t var mfaEnabled = {\n\t DeliveryMedium: 'SMS',\n\t AttributeName: 'phone_number'\n\t };\n\t mfaOptions.push(mfaEnabled);\n\t\n\t this.client.request('SetUserSettings', {\n\t MFAOptions: mfaOptions,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to enable MFA for himself\n\t * @param {string[]} smsMfaSettings the sms mfa settings\n\t * @param {string[]} softwareTokenMfaSettings the software token mfa settings\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.setUserMfaPreference = function setUserMfaPreference(smsMfaSettings, softwareTokenMfaSettings, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('SetUserMFAPreference', {\n\t SMSMfaSettings: smsMfaSettings,\n\t SoftwareTokenMfaSettings: softwareTokenMfaSettings,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to disable MFA for himself\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.disableMFA = function disableMFA(callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t var mfaOptions = [];\n\t\n\t this.client.request('SetUserSettings', {\n\t MFAOptions: mfaOptions,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to delete himself\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.deleteUser = function deleteUser(callback) {\n\t var _this9 = this;\n\t\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('DeleteUser', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t _this9.clearCachedTokens();\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * @typedef {CognitoUserAttribute | { Name:string, Value:string }} AttributeArg\n\t */\n\t /**\n\t * This is used by an authenticated user to change a list of attributes\n\t * @param {AttributeArg[]} attributes A list of the new user attributes.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.updateAttributes = function updateAttributes(attributes, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('UpdateUserAttributes', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t UserAttributes: attributes\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to get a list of attributes\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getUserAttributes = function getUserAttributes(callback) {\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('GetUser', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err, userData) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t\n\t var attributeList = [];\n\t\n\t for (var i = 0; i < userData.UserAttributes.length; i++) {\n\t var attribute = {\n\t Name: userData.UserAttributes[i].Name,\n\t Value: userData.UserAttributes[i].Value\n\t };\n\t var userAttribute = new _CognitoUserAttribute2.default(attribute);\n\t attributeList.push(userAttribute);\n\t }\n\t\n\t return callback(null, attributeList);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to get the MFAOptions\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getMFAOptions = function getMFAOptions(callback) {\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('GetUser', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err, userData) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t\n\t return callback(null, userData.MFAOptions);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated users to get the userData\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getUserData = function getUserData(callback) {\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('GetUser', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err, userData) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t\n\t return callback(null, userData);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to delete a list of attributes\n\t * @param {string[]} attributeList Names of the attributes to delete.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.deleteAttributes = function deleteAttributes(attributeList, callback) {\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('DeleteUserAttributes', {\n\t UserAttributeNames: attributeList,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by a user to resend a confirmation code\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.resendConfirmationCode = function resendConfirmationCode(callback) {\n\t var jsonReq = {\n\t ClientId: this.pool.getClientId(),\n\t Username: this.username\n\t };\n\t\n\t this.client.request('ResendConfirmationCode', jsonReq, function (err, result) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, result);\n\t });\n\t };\n\t\n\t /**\n\t * This is used to get a session, either from the session object\n\t * or from the local storage, or by using a refresh token\n\t *\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getSession = function getSession(callback) {\n\t if (this.username == null) {\n\t return callback(new Error('Username is null. Cannot retrieve a new session'), null);\n\t }\n\t\n\t if (this.signInUserSession != null && this.signInUserSession.isValid()) {\n\t return callback(null, this.signInUserSession);\n\t }\n\t\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId() + '.' + this.username;\n\t var idTokenKey = keyPrefix + '.idToken';\n\t var accessTokenKey = keyPrefix + '.accessToken';\n\t var refreshTokenKey = keyPrefix + '.refreshToken';\n\t var clockDriftKey = keyPrefix + '.clockDrift';\n\t\n\t if (this.storage.getItem(idTokenKey)) {\n\t var idToken = new _CognitoIdToken2.default({\n\t IdToken: this.storage.getItem(idTokenKey)\n\t });\n\t var accessToken = new _CognitoAccessToken2.default({\n\t AccessToken: this.storage.getItem(accessTokenKey)\n\t });\n\t var refreshToken = new _CognitoRefreshToken2.default({\n\t RefreshToken: this.storage.getItem(refreshTokenKey)\n\t });\n\t var clockDrift = parseInt(this.storage.getItem(clockDriftKey), 0) || 0;\n\t\n\t var sessionData = {\n\t IdToken: idToken,\n\t AccessToken: accessToken,\n\t RefreshToken: refreshToken,\n\t ClockDrift: clockDrift\n\t };\n\t var cachedSession = new _CognitoUserSession2.default(sessionData);\n\t if (cachedSession.isValid()) {\n\t this.signInUserSession = cachedSession;\n\t return callback(null, this.signInUserSession);\n\t }\n\t\n\t if (refreshToken.getToken() == null) {\n\t return callback(new Error('Cannot retrieve a new session. Please authenticate.'), null);\n\t }\n\t\n\t this.refreshSession(refreshToken, callback);\n\t } else {\n\t callback(new Error('Local storage is missing an ID Token, Please authenticate'), null);\n\t }\n\t\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This uses the refreshToken to retrieve a new session\n\t * @param {CognitoRefreshToken} refreshToken A previous session's refresh token.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.refreshSession = function refreshSession(refreshToken, callback) {\n\t var _this10 = this;\n\t\n\t var authParameters = {};\n\t authParameters.REFRESH_TOKEN = refreshToken.getToken();\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId();\n\t var lastUserKey = keyPrefix + '.LastAuthUser';\n\t\n\t if (this.storage.getItem(lastUserKey)) {\n\t this.username = this.storage.getItem(lastUserKey);\n\t var deviceKeyKey = keyPrefix + '.' + this.username + '.deviceKey';\n\t this.deviceKey = this.storage.getItem(deviceKeyKey);\n\t authParameters.DEVICE_KEY = this.deviceKey;\n\t }\n\t\n\t var jsonReq = {\n\t ClientId: this.pool.getClientId(),\n\t AuthFlow: 'REFRESH_TOKEN_AUTH',\n\t AuthParameters: authParameters\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('InitiateAuth', jsonReq, function (err, authResult) {\n\t if (err) {\n\t if (err.code === 'NotAuthorizedException') {\n\t _this10.clearCachedTokens();\n\t }\n\t return callback(err, null);\n\t }\n\t if (authResult) {\n\t var authenticationResult = authResult.AuthenticationResult;\n\t if (!Object.prototype.hasOwnProperty.call(authenticationResult, 'RefreshToken')) {\n\t authenticationResult.RefreshToken = refreshToken.getToken();\n\t }\n\t _this10.signInUserSession = _this10.getCognitoUserSession(authenticationResult);\n\t _this10.cacheTokens();\n\t return callback(null, _this10.signInUserSession);\n\t }\n\t return undefined;\n\t });\n\t };\n\t\n\t /**\n\t * This is used to save the session tokens to local storage\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.cacheTokens = function cacheTokens() {\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId();\n\t var idTokenKey = keyPrefix + '.' + this.username + '.idToken';\n\t var accessTokenKey = keyPrefix + '.' + this.username + '.accessToken';\n\t var refreshTokenKey = keyPrefix + '.' + this.username + '.refreshToken';\n\t var clockDriftKey = keyPrefix + '.' + this.username + '.clockDrift';\n\t var lastUserKey = keyPrefix + '.LastAuthUser';\n\t\n\t this.storage.setItem(idTokenKey, this.signInUserSession.getIdToken().getJwtToken());\n\t this.storage.setItem(accessTokenKey, this.signInUserSession.getAccessToken().getJwtToken());\n\t this.storage.setItem(refreshTokenKey, this.signInUserSession.getRefreshToken().getToken());\n\t this.storage.setItem(clockDriftKey, '' + this.signInUserSession.getClockDrift());\n\t this.storage.setItem(lastUserKey, this.username);\n\t };\n\t\n\t /**\n\t * This is used to cache the device key and device group and device password\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.cacheDeviceKeyAndPassword = function cacheDeviceKeyAndPassword() {\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId() + '.' + this.username;\n\t var deviceKeyKey = keyPrefix + '.deviceKey';\n\t var randomPasswordKey = keyPrefix + '.randomPasswordKey';\n\t var deviceGroupKeyKey = keyPrefix + '.deviceGroupKey';\n\t\n\t this.storage.setItem(deviceKeyKey, this.deviceKey);\n\t this.storage.setItem(randomPasswordKey, this.randomPassword);\n\t this.storage.setItem(deviceGroupKeyKey, this.deviceGroupKey);\n\t };\n\t\n\t /**\n\t * This is used to get current device key and device group and device password\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getCachedDeviceKeyAndPassword = function getCachedDeviceKeyAndPassword() {\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId() + '.' + this.username;\n\t var deviceKeyKey = keyPrefix + '.deviceKey';\n\t var randomPasswordKey = keyPrefix + '.randomPasswordKey';\n\t var deviceGroupKeyKey = keyPrefix + '.deviceGroupKey';\n\t\n\t if (this.storage.getItem(deviceKeyKey)) {\n\t this.deviceKey = this.storage.getItem(deviceKeyKey);\n\t this.randomPassword = this.storage.getItem(randomPasswordKey);\n\t this.deviceGroupKey = this.storage.getItem(deviceGroupKeyKey);\n\t }\n\t };\n\t\n\t /**\n\t * This is used to clear the device key info from local storage\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.clearCachedDeviceKeyAndPassword = function clearCachedDeviceKeyAndPassword() {\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId() + '.' + this.username;\n\t var deviceKeyKey = keyPrefix + '.deviceKey';\n\t var randomPasswordKey = keyPrefix + '.randomPasswordKey';\n\t var deviceGroupKeyKey = keyPrefix + '.deviceGroupKey';\n\t\n\t this.storage.removeItem(deviceKeyKey);\n\t this.storage.removeItem(randomPasswordKey);\n\t this.storage.removeItem(deviceGroupKeyKey);\n\t };\n\t\n\t /**\n\t * This is used to clear the session tokens from local storage\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.clearCachedTokens = function clearCachedTokens() {\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId();\n\t var idTokenKey = keyPrefix + '.' + this.username + '.idToken';\n\t var accessTokenKey = keyPrefix + '.' + this.username + '.accessToken';\n\t var refreshTokenKey = keyPrefix + '.' + this.username + '.refreshToken';\n\t var lastUserKey = keyPrefix + '.LastAuthUser';\n\t\n\t this.storage.removeItem(idTokenKey);\n\t this.storage.removeItem(accessTokenKey);\n\t this.storage.removeItem(refreshTokenKey);\n\t this.storage.removeItem(lastUserKey);\n\t };\n\t\n\t /**\n\t * This is used to build a user session from tokens retrieved in the authentication result\n\t * @param {object} authResult Successful auth response from server.\n\t * @returns {CognitoUserSession} The new user session.\n\t * @private\n\t */\n\t\n\t\n\t CognitoUser.prototype.getCognitoUserSession = function getCognitoUserSession(authResult) {\n\t var idToken = new _CognitoIdToken2.default(authResult);\n\t var accessToken = new _CognitoAccessToken2.default(authResult);\n\t var refreshToken = new _CognitoRefreshToken2.default(authResult);\n\t\n\t var sessionData = {\n\t IdToken: idToken,\n\t AccessToken: accessToken,\n\t RefreshToken: refreshToken\n\t };\n\t\n\t return new _CognitoUserSession2.default(sessionData);\n\t };\n\t\n\t /**\n\t * This is used to initiate a forgot password request\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {inputVerificationCode?} callback.inputVerificationCode\n\t * Optional callback raised instead of onSuccess with response data.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.forgotPassword = function forgotPassword(callback) {\n\t var jsonReq = {\n\t ClientId: this.pool.getClientId(),\n\t Username: this.username\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('ForgotPassword', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t if (typeof callback.inputVerificationCode === 'function') {\n\t return callback.inputVerificationCode(data);\n\t }\n\t return callback.onSuccess(data);\n\t });\n\t };\n\t\n\t /**\n\t * This is used to confirm a new password using a confirmationCode\n\t * @param {string} confirmationCode Code entered by user.\n\t * @param {string} newPassword Confirm new password.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.confirmPassword = function confirmPassword(confirmationCode, newPassword, callback) {\n\t var jsonReq = {\n\t ClientId: this.pool.getClientId(),\n\t Username: this.username,\n\t ConfirmationCode: confirmationCode,\n\t Password: newPassword\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('ConfirmForgotPassword', jsonReq, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess();\n\t });\n\t };\n\t\n\t /**\n\t * This is used to initiate an attribute confirmation request\n\t * @param {string} attributeName User attribute that needs confirmation.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {inputVerificationCode} callback.inputVerificationCode Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getAttributeVerificationCode = function getAttributeVerificationCode(attributeName, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('GetUserAttributeVerificationCode', {\n\t AttributeName: attributeName,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t if (typeof callback.inputVerificationCode === 'function') {\n\t return callback.inputVerificationCode(data);\n\t }\n\t return callback.onSuccess();\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to confirm an attribute using a confirmation code\n\t * @param {string} attributeName Attribute being confirmed.\n\t * @param {string} confirmationCode Code entered by user.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.verifyAttribute = function verifyAttribute(attributeName, confirmationCode, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('VerifyUserAttribute', {\n\t AttributeName: attributeName,\n\t Code: confirmationCode,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess('SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to get the device information using the current device key\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess<*>} callback.onSuccess Called on success with device data.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getDevice = function getDevice(callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('GetDevice', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceKey: this.deviceKey\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess(data);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to forget a specific device\n\t * @param {string} deviceKey Device key.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.forgetSpecificDevice = function forgetSpecificDevice(deviceKey, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('ForgetDevice', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceKey: deviceKey\n\t }, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess('SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to forget the current device\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.forgetDevice = function forgetDevice(callback) {\n\t var _this11 = this;\n\t\n\t this.forgetSpecificDevice(this.deviceKey, {\n\t onFailure: callback.onFailure,\n\t onSuccess: function onSuccess(result) {\n\t _this11.deviceKey = null;\n\t _this11.deviceGroupKey = null;\n\t _this11.randomPassword = null;\n\t _this11.clearCachedDeviceKeyAndPassword();\n\t return callback.onSuccess(result);\n\t }\n\t });\n\t };\n\t\n\t /**\n\t * This is used to set the device status as remembered\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.setDeviceStatusRemembered = function setDeviceStatusRemembered(callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('UpdateDeviceStatus', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceKey: this.deviceKey,\n\t DeviceRememberedStatus: 'remembered'\n\t }, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess('SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to set the device status as not remembered\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.setDeviceStatusNotRemembered = function setDeviceStatusNotRemembered(callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('UpdateDeviceStatus', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceKey: this.deviceKey,\n\t DeviceRememberedStatus: 'not_remembered'\n\t }, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess('SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to list all devices for a user\n\t *\n\t * @param {int} limit the number of devices returned in a call\n\t * @param {string} paginationToken the pagination token in case any was returned before\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess<*>} callback.onSuccess Called on success with device list.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.listDevices = function listDevices(limit, paginationToken, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('ListDevices', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t Limit: limit,\n\t PaginationToken: paginationToken\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess(data);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to globally revoke all tokens issued to a user\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.globalSignOut = function globalSignOut(callback) {\n\t var _this12 = this;\n\t\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('GlobalSignOut', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t _this12.clearCachedTokens();\n\t return callback.onSuccess('SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used for the user to signOut of the application and clear the cached tokens.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.signOut = function signOut() {\n\t this.signInUserSession = null;\n\t this.clearCachedTokens();\n\t };\n\t\n\t /**\n\t * This is used by a user trying to select a given MFA\n\t * @param {string} answerChallenge the mfa the user wants\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.sendMFASelectionAnswer = function sendMFASelectionAnswer(answerChallenge, callback) {\n\t var _this13 = this;\n\t\n\t var challengeResponses = {};\n\t challengeResponses.USERNAME = this.username;\n\t challengeResponses.ANSWER = answerChallenge;\n\t\n\t var jsonReq = {\n\t ChallengeName: 'SELECT_MFA_TYPE',\n\t ChallengeResponses: challengeResponses,\n\t ClientId: this.pool.getClientId(),\n\t Session: this.Session\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('RespondToAuthChallenge', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t _this13.Session = data.Session;\n\t if (answerChallenge === 'SMS_MFA') {\n\t return callback.mfaRequired(data.challengeName, data.challengeParameters);\n\t }\n\t if (answerChallenge === 'SOFTWARE_TOKEN_MFA') {\n\t return callback.totpRequired(data.challengeName, data.challengeParameters);\n\t }\n\t return undefined;\n\t });\n\t };\n\t\n\t /**\n\t * This returns the user context data for advanced security feature.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getUserContextData = function getUserContextData() {\n\t var pool = this.pool;\n\t return pool.getUserContextData(this.username);\n\t };\n\t\n\t /**\n\t * This is used by an authenticated or a user trying to authenticate to associate a TOTP MFA\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.associateSoftwareToken = function associateSoftwareToken(callback) {\n\t var _this14 = this;\n\t\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t this.client.request('AssociateSoftwareToken', {\n\t Session: this.Session\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t _this14.Session = data.Session;\n\t return callback.associateSecretCode(data.SecretCode);\n\t });\n\t } else {\n\t this.client.request('AssociateSoftwareToken', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.associateSecretCode(data.SecretCode);\n\t });\n\t }\n\t };\n\t\n\t /**\n\t * This is used by an authenticated or a user trying to authenticate to verify a TOTP MFA\n\t * @param {string} totpCode The MFA code entered by the user.\n\t * @param {string} friendlyDeviceName The device name we are assigning to the device.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.verifySoftwareToken = function verifySoftwareToken(totpCode, friendlyDeviceName, callback) {\n\t var _this15 = this;\n\t\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t this.client.request('VerifySoftwareToken', {\n\t Session: this.Session,\n\t UserCode: totpCode,\n\t FriendlyDeviceName: friendlyDeviceName\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t _this15.Session = data.Session;\n\t var challengeResponses = {};\n\t challengeResponses.USERNAME = _this15.username;\n\t var jsonReq = {\n\t ChallengeName: 'MFA_SETUP',\n\t ClientId: _this15.pool.getClientId(),\n\t ChallengeResponses: challengeResponses,\n\t Session: _this15.Session\n\t };\n\t if (_this15.getUserContextData()) {\n\t jsonReq.UserContextData = _this15.getUserContextData();\n\t }\n\t _this15.client.request('RespondToAuthChallenge', jsonReq, function (errRespond, dataRespond) {\n\t if (errRespond) {\n\t return callback.onFailure(errRespond);\n\t }\n\t _this15.signInUserSession = _this15.getCognitoUserSession(dataRespond.AuthenticationResult);\n\t _this15.cacheTokens();\n\t return callback.onSuccess(_this15.signInUserSession);\n\t });\n\t return undefined;\n\t });\n\t } else {\n\t this.client.request('VerifySoftwareToken', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t UserCode: totpCode,\n\t FriendlyDeviceName: friendlyDeviceName\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess(data);\n\t });\n\t }\n\t };\n\t\n\t return CognitoUser;\n\t}();\n\t\n\texports.default = CognitoUser;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoUserAttribute = function () {\n\t /**\n\t * Constructs a new CognitoUserAttribute object\n\t * @param {string=} Name The record's name\n\t * @param {string=} Value The record's value\n\t */\n\t function CognitoUserAttribute() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t Name = _ref.Name,\n\t Value = _ref.Value;\n\t\n\t _classCallCheck(this, CognitoUserAttribute);\n\t\n\t this.Name = Name || '';\n\t this.Value = Value || '';\n\t }\n\t\n\t /**\n\t * @returns {string} the record's value.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.getValue = function getValue() {\n\t return this.Value;\n\t };\n\t\n\t /**\n\t * Sets the record's value.\n\t * @param {string} value The new value.\n\t * @returns {CognitoUserAttribute} The record for method chaining.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.setValue = function setValue(value) {\n\t this.Value = value;\n\t return this;\n\t };\n\t\n\t /**\n\t * @returns {string} the record's name.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.getName = function getName() {\n\t return this.Name;\n\t };\n\t\n\t /**\n\t * Sets the record's name\n\t * @param {string} name The new name.\n\t * @returns {CognitoUserAttribute} The record for method chaining.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.setName = function setName(name) {\n\t this.Name = name;\n\t return this;\n\t };\n\t\n\t /**\n\t * @returns {string} a string representation of the record.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.toString = function toString() {\n\t return JSON.stringify(this);\n\t };\n\t\n\t /**\n\t * @returns {object} a flat object representing the record.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.toJSON = function toJSON() {\n\t return {\n\t Name: this.Name,\n\t Value: this.Value\n\t };\n\t };\n\t\n\t return CognitoUserAttribute;\n\t}();\n\t\n\texports.default = CognitoUserAttribute;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoUserSession = function () {\n\t /**\n\t * Constructs a new CognitoUserSession object\n\t * @param {CognitoIdToken} IdToken The session's Id token.\n\t * @param {CognitoRefreshToken=} RefreshToken The session's refresh token.\n\t * @param {CognitoAccessToken} AccessToken The session's access token.\n\t * @param {int} ClockDrift The saved computer's clock drift or undefined to force calculation.\n\t */\n\t function CognitoUserSession() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t IdToken = _ref.IdToken,\n\t RefreshToken = _ref.RefreshToken,\n\t AccessToken = _ref.AccessToken,\n\t ClockDrift = _ref.ClockDrift;\n\t\n\t _classCallCheck(this, CognitoUserSession);\n\t\n\t if (AccessToken == null || IdToken == null) {\n\t throw new Error('Id token and Access Token must be present.');\n\t }\n\t\n\t this.idToken = IdToken;\n\t this.refreshToken = RefreshToken;\n\t this.accessToken = AccessToken;\n\t this.clockDrift = ClockDrift === undefined ? this.calculateClockDrift() : ClockDrift;\n\t }\n\t\n\t /**\n\t * @returns {CognitoIdToken} the session's Id token\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.getIdToken = function getIdToken() {\n\t return this.idToken;\n\t };\n\t\n\t /**\n\t * @returns {CognitoRefreshToken} the session's refresh token\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.getRefreshToken = function getRefreshToken() {\n\t return this.refreshToken;\n\t };\n\t\n\t /**\n\t * @returns {CognitoAccessToken} the session's access token\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.getAccessToken = function getAccessToken() {\n\t return this.accessToken;\n\t };\n\t\n\t /**\n\t * @returns {int} the session's clock drift\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.getClockDrift = function getClockDrift() {\n\t return this.clockDrift;\n\t };\n\t\n\t /**\n\t * @returns {int} the computer's clock drift\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.calculateClockDrift = function calculateClockDrift() {\n\t var now = Math.floor(new Date() / 1000);\n\t var iat = Math.min(this.accessToken.getIssuedAt(), this.idToken.getIssuedAt());\n\t\n\t return now - iat;\n\t };\n\t\n\t /**\n\t * Checks to see if the session is still valid based on session expiry information found\n\t * in tokens and the current time (adjusted with clock drift)\n\t * @returns {boolean} if the session is still valid\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.isValid = function isValid() {\n\t var now = Math.floor(new Date() / 1000);\n\t var adjusted = now - this.clockDrift;\n\t\n\t return adjusted < this.accessToken.getExpiration() && adjusted < this.idToken.getExpiration();\n\t };\n\t\n\t return CognitoUserSession;\n\t}();\n\t\n\texports.default = CognitoUserSession;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\tvar monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\tvar weekNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n\t\n\t/** @class */\n\t\n\tvar DateHelper = function () {\n\t function DateHelper() {\n\t _classCallCheck(this, DateHelper);\n\t }\n\t\n\t /**\n\t * @returns {string} The current time in \"ddd MMM D HH:mm:ss UTC YYYY\" format.\n\t */\n\t DateHelper.prototype.getNowString = function getNowString() {\n\t var now = new Date();\n\t\n\t var weekDay = weekNames[now.getUTCDay()];\n\t var month = monthNames[now.getUTCMonth()];\n\t var day = now.getUTCDate();\n\t\n\t var hours = now.getUTCHours();\n\t if (hours < 10) {\n\t hours = '0' + hours;\n\t }\n\t\n\t var minutes = now.getUTCMinutes();\n\t if (minutes < 10) {\n\t minutes = '0' + minutes;\n\t }\n\t\n\t var seconds = now.getUTCSeconds();\n\t if (seconds < 10) {\n\t seconds = '0' + seconds;\n\t }\n\t\n\t var year = now.getUTCFullYear();\n\t\n\t // ddd MMM D HH:mm:ss UTC YYYY\n\t var dateNow = weekDay + ' ' + month + ' ' + day + ' ' + hours + ':' + minutes + ':' + seconds + ' UTC ' + year;\n\t\n\t return dateNow;\n\t };\n\t\n\t return DateHelper;\n\t}();\n\t\n\texports.default = DateHelper;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\tvar dataMemory = {};\n\t\n\t/** @class */\n\t\n\tvar MemoryStorage = function () {\n\t function MemoryStorage() {\n\t _classCallCheck(this, MemoryStorage);\n\t }\n\t\n\t /**\n\t * This is used to set a specific item in storage\n\t * @param {string} key - the key for the item\n\t * @param {object} value - the value\n\t * @returns {string} value that was set\n\t */\n\t MemoryStorage.setItem = function setItem(key, value) {\n\t dataMemory[key] = value;\n\t return dataMemory[key];\n\t };\n\t\n\t /**\n\t * This is used to get a specific key from storage\n\t * @param {string} key - the key for the item\n\t * This is used to clear the storage\n\t * @returns {string} the data item\n\t */\n\t\n\t\n\t MemoryStorage.getItem = function getItem(key) {\n\t return Object.prototype.hasOwnProperty.call(dataMemory, key) ? dataMemory[key] : undefined;\n\t };\n\t\n\t /**\n\t * This is used to remove an item from storage\n\t * @param {string} key - the key being set\n\t * @returns {string} value - value that was deleted\n\t */\n\t\n\t\n\t MemoryStorage.removeItem = function removeItem(key) {\n\t return delete dataMemory[key];\n\t };\n\t\n\t /**\n\t * This is used to clear the storage\n\t * @returns {string} nothing\n\t */\n\t\n\t\n\t MemoryStorage.clear = function clear() {\n\t dataMemory = {};\n\t return dataMemory;\n\t };\n\t\n\t return MemoryStorage;\n\t}();\n\t\n\t/** @class */\n\t\n\t\n\tvar StorageHelper = function () {\n\t\n\t /**\n\t * This is used to get a storage object\n\t * @returns {object} the storage\n\t */\n\t function StorageHelper() {\n\t _classCallCheck(this, StorageHelper);\n\t\n\t try {\n\t this.storageWindow = window.localStorage;\n\t this.storageWindow.setItem('aws.cognito.test-ls', 1);\n\t this.storageWindow.removeItem('aws.cognito.test-ls');\n\t } catch (exception) {\n\t this.storageWindow = MemoryStorage;\n\t }\n\t }\n\t\n\t /**\n\t * This is used to return the storage\n\t * @returns {object} the storage\n\t */\n\t\n\t\n\t StorageHelper.prototype.getStorage = function getStorage() {\n\t return this.storageWindow;\n\t };\n\t\n\t return StorageHelper;\n\t}();\n\t\n\texports.default = StorageHelper;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar Buffer = __webpack_require__(1).Buffer\n\tvar sha = __webpack_require__(26)\n\tvar sha256 = __webpack_require__(27)\n\tvar rng = __webpack_require__(25)\n\tvar md5 = __webpack_require__(24)\n\t\n\tvar algorithms = {\n\t sha1: sha,\n\t sha256: sha256,\n\t md5: md5\n\t}\n\t\n\tvar blocksize = 64\n\tvar zeroBuffer = new Buffer(blocksize); zeroBuffer.fill(0)\n\tfunction hmac(fn, key, data) {\n\t if(!Buffer.isBuffer(key)) key = new Buffer(key)\n\t if(!Buffer.isBuffer(data)) data = new Buffer(data)\n\t\n\t if(key.length > blocksize) {\n\t key = fn(key)\n\t } else if(key.length < blocksize) {\n\t key = Buffer.concat([key, zeroBuffer], blocksize)\n\t }\n\t\n\t var ipad = new Buffer(blocksize), opad = new Buffer(blocksize)\n\t for(var i = 0; i < blocksize; i++) {\n\t ipad[i] = key[i] ^ 0x36\n\t opad[i] = key[i] ^ 0x5C\n\t }\n\t\n\t var hash = fn(Buffer.concat([ipad, data]))\n\t return fn(Buffer.concat([opad, hash]))\n\t}\n\t\n\tfunction hash(alg, key) {\n\t alg = alg || 'sha1'\n\t var fn = algorithms[alg]\n\t var bufs = []\n\t var length = 0\n\t if(!fn) error('algorithm:', alg, 'is not yet supported')\n\t return {\n\t update: function (data) {\n\t if(!Buffer.isBuffer(data)) data = new Buffer(data)\n\t \n\t bufs.push(data)\n\t length += data.length\n\t return this\n\t },\n\t digest: function (enc) {\n\t var buf = Buffer.concat(bufs)\n\t var r = key ? hmac(fn, key, buf) : fn(buf)\n\t bufs = null\n\t return enc ? r.toString(enc) : r\n\t }\n\t }\n\t}\n\t\n\tfunction error () {\n\t var m = [].slice.call(arguments).join(' ')\n\t throw new Error([\n\t m,\n\t 'we accept pull requests',\n\t 'http://github.com/dominictarr/crypto-browserify'\n\t ].join('\\n'))\n\t}\n\t\n\texports.createHash = function (alg) { return hash(alg) }\n\texports.createHmac = function (alg, key) { return hash(alg, key) }\n\texports.randomBytes = function(size, callback) {\n\t if (callback && callback.call) {\n\t try {\n\t callback.call(this, undefined, new Buffer(rng(size)))\n\t } catch (err) { callback(err) }\n\t } else {\n\t return new Buffer(rng(size))\n\t }\n\t}\n\t\n\tfunction each(a, f) {\n\t for(var i in a)\n\t f(a[i], i)\n\t}\n\t\n\t// the least I can do is make error messages for the rest of the node.js/crypto api.\n\teach(['createCredentials'\n\t, 'createCipher'\n\t, 'createCipheriv'\n\t, 'createDecipher'\n\t, 'createDecipheriv'\n\t, 'createSign'\n\t, 'createVerify'\n\t, 'createDiffieHellman'\n\t, 'pbkdf2'], function (name) {\n\t exports[name] = function () {\n\t error('sorry,', name, 'is not implemented yet')\n\t }\n\t})\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\n\t'use strict'\n\t\n\texports.byteLength = byteLength\n\texports.toByteArray = toByteArray\n\texports.fromByteArray = fromByteArray\n\t\n\tvar lookup = []\n\tvar revLookup = []\n\tvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\t\n\tvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n\tfor (var i = 0, len = code.length; i < len; ++i) {\n\t lookup[i] = code[i]\n\t revLookup[code.charCodeAt(i)] = i\n\t}\n\t\n\trevLookup['-'.charCodeAt(0)] = 62\n\trevLookup['_'.charCodeAt(0)] = 63\n\t\n\tfunction placeHoldersCount (b64) {\n\t var len = b64.length\n\t if (len % 4 > 0) {\n\t throw new Error('Invalid string. Length must be a multiple of 4')\n\t }\n\t\n\t // the number of equal signs (place holders)\n\t // if there are two placeholders, than the two characters before it\n\t // represent one byte\n\t // if there is only one, then the three characters before it represent 2 bytes\n\t // this is just a cheap hack to not do indexOf twice\n\t return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n\t}\n\t\n\tfunction byteLength (b64) {\n\t // base64 is 4/3 + up to two characters of the original data\n\t return (b64.length * 3 / 4) - placeHoldersCount(b64)\n\t}\n\t\n\tfunction toByteArray (b64) {\n\t var i, l, tmp, placeHolders, arr\n\t var len = b64.length\n\t placeHolders = placeHoldersCount(b64)\n\t\n\t arr = new Arr((len * 3 / 4) - placeHolders)\n\t\n\t // if there are placeholders, only get up to the last complete 4 chars\n\t l = placeHolders > 0 ? len - 4 : len\n\t\n\t var L = 0\n\t\n\t for (i = 0; i < l; i += 4) {\n\t tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n\t arr[L++] = (tmp >> 16) & 0xFF\n\t arr[L++] = (tmp >> 8) & 0xFF\n\t arr[L++] = tmp & 0xFF\n\t }\n\t\n\t if (placeHolders === 2) {\n\t tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n\t arr[L++] = tmp & 0xFF\n\t } else if (placeHolders === 1) {\n\t tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n\t arr[L++] = (tmp >> 8) & 0xFF\n\t arr[L++] = tmp & 0xFF\n\t }\n\t\n\t return arr\n\t}\n\t\n\tfunction tripletToBase64 (num) {\n\t return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n\t}\n\t\n\tfunction encodeChunk (uint8, start, end) {\n\t var tmp\n\t var output = []\n\t for (var i = start; i < end; i += 3) {\n\t tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n\t output.push(tripletToBase64(tmp))\n\t }\n\t return output.join('')\n\t}\n\t\n\tfunction fromByteArray (uint8) {\n\t var tmp\n\t var len = uint8.length\n\t var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n\t var output = ''\n\t var parts = []\n\t var maxChunkLength = 16383 // must be multiple of 3\n\t\n\t // go through the array every three bytes, we'll deal with trailing stuff later\n\t for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n\t parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n\t }\n\t\n\t // pad the end with zeros, but make sure to not forget the extra bytes\n\t if (extraBytes === 1) {\n\t tmp = uint8[len - 1]\n\t output += lookup[tmp >> 2]\n\t output += lookup[(tmp << 4) & 0x3F]\n\t output += '=='\n\t } else if (extraBytes === 2) {\n\t tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n\t output += lookup[tmp >> 10]\n\t output += lookup[(tmp >> 4) & 0x3F]\n\t output += lookup[(tmp << 2) & 0x3F]\n\t output += '='\n\t }\n\t\n\t parts.push(output)\n\t\n\t return parts.join('')\n\t}\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\n\texports.read = function (buffer, offset, isLE, mLen, nBytes) {\n\t var e, m\n\t var eLen = nBytes * 8 - mLen - 1\n\t var eMax = (1 << eLen) - 1\n\t var eBias = eMax >> 1\n\t var nBits = -7\n\t var i = isLE ? (nBytes - 1) : 0\n\t var d = isLE ? -1 : 1\n\t var s = buffer[offset + i]\n\t\n\t i += d\n\t\n\t e = s & ((1 << (-nBits)) - 1)\n\t s >>= (-nBits)\n\t nBits += eLen\n\t for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\t\n\t m = e & ((1 << (-nBits)) - 1)\n\t e >>= (-nBits)\n\t nBits += mLen\n\t for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\t\n\t if (e === 0) {\n\t e = 1 - eBias\n\t } else if (e === eMax) {\n\t return m ? NaN : ((s ? -1 : 1) * Infinity)\n\t } else {\n\t m = m + Math.pow(2, mLen)\n\t e = e - eBias\n\t }\n\t return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n\t}\n\t\n\texports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n\t var e, m, c\n\t var eLen = nBytes * 8 - mLen - 1\n\t var eMax = (1 << eLen) - 1\n\t var eBias = eMax >> 1\n\t var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n\t var i = isLE ? 0 : (nBytes - 1)\n\t var d = isLE ? 1 : -1\n\t var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\t\n\t value = Math.abs(value)\n\t\n\t if (isNaN(value) || value === Infinity) {\n\t m = isNaN(value) ? 1 : 0\n\t e = eMax\n\t } else {\n\t e = Math.floor(Math.log(value) / Math.LN2)\n\t if (value * (c = Math.pow(2, -e)) < 1) {\n\t e--\n\t c *= 2\n\t }\n\t if (e + eBias >= 1) {\n\t value += rt / c\n\t } else {\n\t value += rt * Math.pow(2, 1 - eBias)\n\t }\n\t if (value * c >= 2) {\n\t e++\n\t c /= 2\n\t }\n\t\n\t if (e + eBias >= eMax) {\n\t m = 0\n\t e = eMax\n\t } else if (e + eBias >= 1) {\n\t m = (value * c - 1) * Math.pow(2, mLen)\n\t e = e + eBias\n\t } else {\n\t m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n\t e = 0\n\t }\n\t }\n\t\n\t for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\t\n\t e = (e << mLen) | m\n\t eLen += mLen\n\t for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\t\n\t buffer[offset + i - d] |= s * 128\n\t}\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports) {\n\n\tvar toString = {}.toString;\n\t\n\tmodule.exports = Array.isArray || function (arr) {\n\t return toString.call(arr) == '[object Array]';\n\t};\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n\t * JavaScript Cookie v2.2.0\n\t * https://github.com/js-cookie/js-cookie\n\t *\n\t * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n\t * Released under the MIT license\n\t */\n\t;(function (factory) {\n\t\tvar registeredInModuleLoader = false;\n\t\tif (true) {\n\t\t\t!(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t\t\tregisteredInModuleLoader = true;\n\t\t}\n\t\tif (true) {\n\t\t\tmodule.exports = factory();\n\t\t\tregisteredInModuleLoader = true;\n\t\t}\n\t\tif (!registeredInModuleLoader) {\n\t\t\tvar OldCookies = window.Cookies;\n\t\t\tvar api = window.Cookies = factory();\n\t\t\tapi.noConflict = function () {\n\t\t\t\twindow.Cookies = OldCookies;\n\t\t\t\treturn api;\n\t\t\t};\n\t\t}\n\t}(function () {\n\t\tfunction extend () {\n\t\t\tvar i = 0;\n\t\t\tvar result = {};\n\t\t\tfor (; i < arguments.length; i++) {\n\t\t\t\tvar attributes = arguments[ i ];\n\t\t\t\tfor (var key in attributes) {\n\t\t\t\t\tresult[key] = attributes[key];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\n\t\tfunction init (converter) {\n\t\t\tfunction api (key, value, attributes) {\n\t\t\t\tvar result;\n\t\t\t\tif (typeof document === 'undefined') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\t// Write\n\t\n\t\t\t\tif (arguments.length > 1) {\n\t\t\t\t\tattributes = extend({\n\t\t\t\t\t\tpath: '/'\n\t\t\t\t\t}, api.defaults, attributes);\n\t\n\t\t\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\t\t\tvar expires = new Date();\n\t\t\t\t\t\texpires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n\t\t\t\t\t\tattributes.expires = expires;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresult = JSON.stringify(value);\n\t\t\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\t\t\tvalue = result;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (e) {}\n\t\n\t\t\t\t\tif (!converter.write) {\n\t\t\t\t\t\tvalue = encodeURIComponent(String(value))\n\t\t\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = converter.write(value, key);\n\t\t\t\t\t}\n\t\n\t\t\t\t\tkey = encodeURIComponent(String(key));\n\t\t\t\t\tkey = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);\n\t\t\t\t\tkey = key.replace(/[\\(\\)]/g, escape);\n\t\n\t\t\t\t\tvar stringifiedAttributes = '';\n\t\n\t\t\t\t\tfor (var attributeName in attributes) {\n\t\t\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName];\n\t\t\t\t\t}\n\t\t\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t\t\t}\n\t\n\t\t\t\t// Read\n\t\n\t\t\t\tif (!key) {\n\t\t\t\t\tresult = {};\n\t\t\t\t}\n\t\n\t\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t\t// in case there are no cookies at all. Also prevents odd result when\n\t\t\t\t// calling \"get()\"\n\t\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\t\tvar rdecode = /(%[0-9A-Z]{2})+/g;\n\t\t\t\tvar i = 0;\n\t\n\t\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\t\tvar cookie = parts.slice(1).join('=');\n\t\n\t\t\t\t\tif (!this.json && cookie.charAt(0) === '\"') {\n\t\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t\t}\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar name = parts[0].replace(rdecode, decodeURIComponent);\n\t\t\t\t\t\tcookie = converter.read ?\n\t\t\t\t\t\t\tconverter.read(cookie, name) : converter(cookie, name) ||\n\t\t\t\t\t\t\tcookie.replace(rdecode, decodeURIComponent);\n\t\n\t\t\t\t\t\tif (this.json) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\t\tresult = cookie;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif (!key) {\n\t\t\t\t\t\t\tresult[name] = cookie;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (e) {}\n\t\t\t\t}\n\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\n\t\t\tapi.set = api;\n\t\t\tapi.get = function (key) {\n\t\t\t\treturn api.call(api, key);\n\t\t\t};\n\t\t\tapi.getJSON = function () {\n\t\t\t\treturn api.apply({\n\t\t\t\t\tjson: true\n\t\t\t\t}, [].slice.call(arguments));\n\t\t\t};\n\t\t\tapi.defaults = {};\n\t\n\t\t\tapi.remove = function (key, attributes) {\n\t\t\t\tapi(key, '', extend(attributes, {\n\t\t\t\t\texpires: -1\n\t\t\t\t}));\n\t\t\t};\n\t\n\t\t\tapi.withConverter = init;\n\t\n\t\t\treturn api;\n\t\t}\n\t\n\t\treturn init(function () {});\n\t}));\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar AuthenticationDetails = function () {\n\t /**\n\t * Constructs a new AuthenticationDetails object\n\t * @param {object=} data Creation options.\n\t * @param {string} data.Username User being authenticated.\n\t * @param {string} data.Password Plain-text password to authenticate with.\n\t * @param {(AttributeArg[])?} data.ValidationData Application extra metadata.\n\t * @param {(AttributeArg[])?} data.AuthParamaters Authentication paramaters for custom auth.\n\t */\n\t function AuthenticationDetails(data) {\n\t _classCallCheck(this, AuthenticationDetails);\n\t\n\t var _ref = data || {},\n\t ValidationData = _ref.ValidationData,\n\t Username = _ref.Username,\n\t Password = _ref.Password,\n\t AuthParameters = _ref.AuthParameters;\n\t\n\t this.validationData = ValidationData || {};\n\t this.authParameters = AuthParameters || {};\n\t this.username = Username;\n\t this.password = Password;\n\t }\n\t\n\t /**\n\t * @returns {string} the record's username\n\t */\n\t\n\t\n\t AuthenticationDetails.prototype.getUsername = function getUsername() {\n\t return this.username;\n\t };\n\t\n\t /**\n\t * @returns {string} the record's password\n\t */\n\t\n\t\n\t AuthenticationDetails.prototype.getPassword = function getPassword() {\n\t return this.password;\n\t };\n\t\n\t /**\n\t * @returns {Array} the record's validationData\n\t */\n\t\n\t\n\t AuthenticationDetails.prototype.getValidationData = function getValidationData() {\n\t return this.validationData;\n\t };\n\t\n\t /**\n\t * @returns {Array} the record's authParameters\n\t */\n\t\n\t\n\t AuthenticationDetails.prototype.getAuthParameters = function getAuthParameters() {\n\t return this.authParameters;\n\t };\n\t\n\t return AuthenticationDetails;\n\t}();\n\t\n\texports.default = AuthenticationDetails;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _UserAgent = __webpack_require__(23);\n\t\n\tvar _UserAgent2 = _interopRequireDefault(_UserAgent);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/** @class */\n\tvar Client = function () {\n\t /**\n\t * Constructs a new AWS Cognito Identity Provider client object\n\t * @param {string} region AWS region\n\t * @param {string} endpoint endpoint\n\t */\n\t function Client(region, endpoint) {\n\t _classCallCheck(this, Client);\n\t\n\t this.endpoint = endpoint || 'https://cognito-idp.' + region + '.amazonaws.com/';\n\t this.userAgent = _UserAgent2.default.prototype.userAgent || 'aws-amplify/0.1.x js';\n\t }\n\t\n\t /**\n\t * Makes an unauthenticated request on AWS Cognito Identity Provider API\n\t * using fetch\n\t * @param {string} operation API operation\n\t * @param {object} params Input parameters\n\t * @param {function} callback Callback called when a response is returned\n\t * @returns {void}\n\t */\n\t\n\t\n\t Client.prototype.request = function request(operation, params, callback) {\n\t var headers = {\n\t 'Content-Type': 'application/x-amz-json-1.1',\n\t 'X-Amz-Target': 'AWSCognitoIdentityProviderService.' + operation,\n\t 'X-Amz-User-Agent': this.userAgent\n\t };\n\t\n\t var options = {\n\t headers: headers,\n\t method: 'POST',\n\t mode: 'cors',\n\t cache: 'no-cache',\n\t body: JSON.stringify(params)\n\t };\n\t\n\t var response = void 0;\n\t\n\t fetch(this.endpoint, options).then(function (resp) {\n\t response = resp;\n\t return resp;\n\t }, function (err) {\n\t // If error happens here, the request failed\n\t // if it is TypeError throw network error\n\t if (err instanceof TypeError) {\n\t throw new Error('Network error');\n\t }\n\t throw err;\n\t }).then(function (resp) {\n\t return resp.json().catch(function () {\n\t return {};\n\t });\n\t }).then(function (data) {\n\t if (response.ok) return callback(null, data);\n\t\n\t // Taken from aws-sdk-js/lib/protocol/json.js\n\t // eslint-disable-next-line no-underscore-dangle\n\t var code = (data.__type || data.code).split('#').pop();\n\t var error = {\n\t code: code,\n\t name: code,\n\t message: data.message || data.Message || null\n\t };\n\t return callback(error);\n\t }).catch(function (err) {\n\t // default to return 'UnknownError'\n\t var error = { code: 'UnknownError', message: 'Unkown error' };\n\t\n\t // first check if we have a service error\n\t if (response && response.headers && response.headers.get('x-amzn-errortype')) {\n\t try {\n\t var code = response.headers.get('x-amz-errortype').split(':')[0];\n\t error = {\n\t code: code,\n\t name: code,\n\t statusCode: response.status,\n\t message: response.status ? response.status.toString() : null\n\t };\n\t } catch (ex) {}\n\t // pass through so it doesn't get swallowed if we can't parse it\n\t\n\t // otherwise check if error is Network error\n\t } else if (err instanceof Error && err.message === 'Network error') {\n\t error = {\n\t code: 'NetworkError',\n\t name: err.name,\n\t message: err.message\n\t };\n\t }\n\t return callback(error);\n\t });\n\t };\n\t\n\t return Client;\n\t}();\n\t\n\texports.default = Client;\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _Client = __webpack_require__(20);\n\t\n\tvar _Client2 = _interopRequireDefault(_Client);\n\t\n\tvar _CognitoUser = __webpack_require__(9);\n\t\n\tvar _CognitoUser2 = _interopRequireDefault(_CognitoUser);\n\t\n\tvar _StorageHelper = __webpack_require__(13);\n\t\n\tvar _StorageHelper2 = _interopRequireDefault(_StorageHelper);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoUserPool = function () {\n\t /**\n\t * Constructs a new CognitoUserPool object\n\t * @param {object} data Creation options.\n\t * @param {string} data.UserPoolId Cognito user pool id.\n\t * @param {string} data.ClientId User pool application client id.\n\t * @param {object} data.Storage Optional storage object.\n\t * @param {boolean} data.AdvancedSecurityDataCollectionFlag Optional:\n\t * boolean flag indicating if the data collection is enabled\n\t * to support cognito advanced security features. By default, this\n\t * flag is set to true.\n\t */\n\t function CognitoUserPool(data) {\n\t _classCallCheck(this, CognitoUserPool);\n\t\n\t var _ref = data || {},\n\t UserPoolId = _ref.UserPoolId,\n\t ClientId = _ref.ClientId,\n\t endpoint = _ref.endpoint,\n\t AdvancedSecurityDataCollectionFlag = _ref.AdvancedSecurityDataCollectionFlag;\n\t\n\t if (!UserPoolId || !ClientId) {\n\t throw new Error('Both UserPoolId and ClientId are required.');\n\t }\n\t if (!/^[\\w-]+_.+$/.test(UserPoolId)) {\n\t throw new Error('Invalid UserPoolId format.');\n\t }\n\t var region = UserPoolId.split('_')[0];\n\t\n\t this.userPoolId = UserPoolId;\n\t this.clientId = ClientId;\n\t\n\t this.client = new _Client2.default(region, endpoint);\n\t\n\t /**\n\t * By default, AdvancedSecurityDataCollectionFlag is set to true,\n\t * if no input value is provided.\n\t */\n\t this.advancedSecurityDataCollectionFlag = AdvancedSecurityDataCollectionFlag !== false;\n\t\n\t this.storage = data.Storage || new _StorageHelper2.default().getStorage();\n\t }\n\t\n\t /**\n\t * @returns {string} the user pool id\n\t */\n\t\n\t\n\t CognitoUserPool.prototype.getUserPoolId = function getUserPoolId() {\n\t return this.userPoolId;\n\t };\n\t\n\t /**\n\t * @returns {string} the client id\n\t */\n\t\n\t\n\t CognitoUserPool.prototype.getClientId = function getClientId() {\n\t return this.clientId;\n\t };\n\t\n\t /**\n\t * @typedef {object} SignUpResult\n\t * @property {CognitoUser} user New user.\n\t * @property {bool} userConfirmed If the user is already confirmed.\n\t */\n\t /**\n\t * method for signing up a user\n\t * @param {string} username User's username.\n\t * @param {string} password Plain-text initial password entered by user.\n\t * @param {(AttributeArg[])=} userAttributes New user attributes.\n\t * @param {(AttributeArg[])=} validationData Application metadata.\n\t * @param {nodeCallback} callback Called on error or with the new user.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUserPool.prototype.signUp = function signUp(username, password, userAttributes, validationData, callback) {\n\t var _this = this;\n\t\n\t var jsonReq = {\n\t ClientId: this.clientId,\n\t Username: username,\n\t Password: password,\n\t UserAttributes: userAttributes,\n\t ValidationData: validationData\n\t };\n\t if (this.getUserContextData(username)) {\n\t jsonReq.UserContextData = this.getUserContextData(username);\n\t }\n\t this.client.request('SignUp', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t\n\t var cognitoUser = {\n\t Username: username,\n\t Pool: _this,\n\t Storage: _this.storage\n\t };\n\t\n\t var returnData = {\n\t user: new _CognitoUser2.default(cognitoUser),\n\t userConfirmed: data.UserConfirmed,\n\t userSub: data.UserSub\n\t };\n\t\n\t return callback(null, returnData);\n\t });\n\t };\n\t\n\t /**\n\t * method for getting the current user of the application from the local storage\n\t *\n\t * @returns {CognitoUser} the user retrieved from storage\n\t */\n\t\n\t\n\t CognitoUserPool.prototype.getCurrentUser = function getCurrentUser() {\n\t var lastUserKey = 'CognitoIdentityServiceProvider.' + this.clientId + '.LastAuthUser';\n\t\n\t var lastAuthUser = this.storage.getItem(lastUserKey);\n\t if (lastAuthUser) {\n\t var cognitoUser = {\n\t Username: lastAuthUser,\n\t Pool: this,\n\t Storage: this.storage\n\t };\n\t\n\t return new _CognitoUser2.default(cognitoUser);\n\t }\n\t\n\t return null;\n\t };\n\t\n\t /**\n\t * This method returns the encoded data string used for cognito advanced security feature.\n\t * This would be generated only when developer has included the JS used for collecting the\n\t * data on their client. Please refer to documentation to know more about using AdvancedSecurity\n\t * features\n\t * @param {string} username the username for the context data\n\t * @returns {string} the user context data\n\t **/\n\t\n\t\n\t CognitoUserPool.prototype.getUserContextData = function getUserContextData(username) {\n\t if (typeof AmazonCognitoAdvancedSecurityData === 'undefined') {\n\t return undefined;\n\t }\n\t /* eslint-disable */\n\t var amazonCognitoAdvancedSecurityDataConst = AmazonCognitoAdvancedSecurityData;\n\t /* eslint-enable */\n\t\n\t if (this.advancedSecurityDataCollectionFlag) {\n\t var advancedSecurityData = amazonCognitoAdvancedSecurityDataConst.getData(username, this.userPoolId, this.clientId);\n\t if (advancedSecurityData) {\n\t var userContextData = {\n\t EncodedData: advancedSecurityData\n\t };\n\t return userContextData;\n\t }\n\t }\n\t return {};\n\t };\n\t\n\t return CognitoUserPool;\n\t}();\n\t\n\texports.default = CognitoUserPool;\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _jsCookie = __webpack_require__(18);\n\t\n\tvar Cookies = _interopRequireWildcard(_jsCookie);\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/** @class */\n\tvar CookieStorage = function () {\n\t\n\t /**\n\t * Constructs a new CookieStorage object\n\t * @param {object} data Creation options.\n\t * @param {string} data.domain Cookies domain (mandatory).\n\t * @param {string} data.path Cookies path (default: '/')\n\t * @param {integer} data.expires Cookie expiration (in days, default: 365)\n\t * @param {boolean} data.secure Cookie secure flag (default: true)\n\t */\n\t function CookieStorage(data) {\n\t _classCallCheck(this, CookieStorage);\n\t\n\t this.domain = data.domain;\n\t if (data.path) {\n\t this.path = data.path;\n\t } else {\n\t this.path = '/';\n\t }\n\t if (Object.prototype.hasOwnProperty.call(data, 'expires')) {\n\t this.expires = data.expires;\n\t } else {\n\t this.expires = 365;\n\t }\n\t if (Object.prototype.hasOwnProperty.call(data, 'secure')) {\n\t this.secure = data.secure;\n\t } else {\n\t this.secure = true;\n\t }\n\t }\n\t\n\t /**\n\t * This is used to set a specific item in storage\n\t * @param {string} key - the key for the item\n\t * @param {object} value - the value\n\t * @returns {string} value that was set\n\t */\n\t\n\t\n\t CookieStorage.prototype.setItem = function setItem(key, value) {\n\t Cookies.set(key, value, {\n\t path: this.path,\n\t expires: this.expires,\n\t domain: this.domain,\n\t secure: this.secure\n\t });\n\t return Cookies.get(key);\n\t };\n\t\n\t /**\n\t * This is used to get a specific key from storage\n\t * @param {string} key - the key for the item\n\t * This is used to clear the storage\n\t * @returns {string} the data item\n\t */\n\t\n\t\n\t CookieStorage.prototype.getItem = function getItem(key) {\n\t return Cookies.get(key);\n\t };\n\t\n\t /**\n\t * This is used to remove an item from storage\n\t * @param {string} key - the key being set\n\t * @returns {string} value - value that was deleted\n\t */\n\t\n\t\n\t CookieStorage.prototype.removeItem = function removeItem(key) {\n\t return Cookies.remove(key, {\n\t path: this.path,\n\t domain: this.domain,\n\t secure: this.secure\n\t });\n\t };\n\t\n\t /**\n\t * This is used to clear the storage\n\t * @returns {string} nothing\n\t */\n\t\n\t\n\t CookieStorage.prototype.clear = function clear() {\n\t var cookies = Cookies.get();\n\t var index = void 0;\n\t for (index = 0; index < cookies.length; ++index) {\n\t Cookies.remove(cookies[index]);\n\t }\n\t return {};\n\t };\n\t\n\t return CookieStorage;\n\t}();\n\t\n\texports.default = CookieStorage;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t// class for defining the amzn user-agent\n\texports.default = UserAgent;\n\t// constructor\n\t\n\tfunction UserAgent() {}\n\t// public\n\tUserAgent.prototype.userAgent = 'aws-amplify/0.1.x js';\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/*\r\n\t * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\r\n\t * Digest Algorithm, as defined in RFC 1321.\r\n\t * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.\r\n\t * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\r\n\t * Distributed under the BSD License\r\n\t * See http://pajhome.org.uk/crypt/md5 for more info.\r\n\t */\r\n\t\r\n\tvar helpers = __webpack_require__(2);\r\n\t\r\n\t/*\r\n\t * Perform a simple self-test to see if the VM is working\r\n\t */\r\n\tfunction md5_vm_test()\r\n\t{\r\n\t return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n\t}\r\n\t\r\n\t/*\r\n\t * Calculate the MD5 of an array of little-endian words, and a bit length\r\n\t */\r\n\tfunction core_md5(x, len)\r\n\t{\r\n\t /* append padding */\r\n\t x[len >> 5] |= 0x80 << ((len) % 32);\r\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\r\n\t\r\n\t var a = 1732584193;\r\n\t var b = -271733879;\r\n\t var c = -1732584194;\r\n\t var d = 271733878;\r\n\t\r\n\t for(var i = 0; i < x.length; i += 16)\r\n\t {\r\n\t var olda = a;\r\n\t var oldb = b;\r\n\t var oldc = c;\r\n\t var oldd = d;\r\n\t\r\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\r\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\r\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\r\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\r\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\r\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\r\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\r\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\r\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\r\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\r\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\r\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\r\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\r\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\r\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\r\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\r\n\t\r\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\r\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\r\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\r\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\r\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\r\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\r\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\r\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\r\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\r\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\r\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\r\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\r\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\r\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\r\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\r\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\r\n\t\r\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\r\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\r\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\r\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\r\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\r\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\r\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\r\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\r\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\r\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\r\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\r\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\r\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\r\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\r\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\r\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\r\n\t\r\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\r\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\r\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\r\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\r\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\r\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\r\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\r\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\r\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\r\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\r\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\r\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\r\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\r\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\r\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\r\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\r\n\t\r\n\t a = safe_add(a, olda);\r\n\t b = safe_add(b, oldb);\r\n\t c = safe_add(c, oldc);\r\n\t d = safe_add(d, oldd);\r\n\t }\r\n\t return Array(a, b, c, d);\r\n\t\r\n\t}\r\n\t\r\n\t/*\r\n\t * These functions implement the four basic operations the algorithm uses.\r\n\t */\r\n\tfunction md5_cmn(q, a, b, x, s, t)\r\n\t{\r\n\t return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);\r\n\t}\r\n\tfunction md5_ff(a, b, c, d, x, s, t)\r\n\t{\r\n\t return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);\r\n\t}\r\n\tfunction md5_gg(a, b, c, d, x, s, t)\r\n\t{\r\n\t return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);\r\n\t}\r\n\tfunction md5_hh(a, b, c, d, x, s, t)\r\n\t{\r\n\t return md5_cmn(b ^ c ^ d, a, b, x, s, t);\r\n\t}\r\n\tfunction md5_ii(a, b, c, d, x, s, t)\r\n\t{\r\n\t return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);\r\n\t}\r\n\t\r\n\t/*\r\n\t * Add integers, wrapping at 2^32. This uses 16-bit operations internally\r\n\t * to work around bugs in some JS interpreters.\r\n\t */\r\n\tfunction safe_add(x, y)\r\n\t{\r\n\t var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n\t var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n\t return (msw << 16) | (lsw & 0xFFFF);\r\n\t}\r\n\t\r\n\t/*\r\n\t * Bitwise rotate a 32-bit number to the left.\r\n\t */\r\n\tfunction bit_rol(num, cnt)\r\n\t{\r\n\t return (num << cnt) | (num >>> (32 - cnt));\r\n\t}\r\n\t\r\n\tmodule.exports = function md5(buf) {\r\n\t return helpers.hash(buf, core_md5, 16);\r\n\t};\r\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\n\t// Original code adapted from Robert Kieffer.\n\t// details at https://github.com/broofa/node-uuid\n\t(function() {\n\t var _global = this;\n\t\n\t var mathRNG, whatwgRNG;\n\t\n\t // NOTE: Math.random() does not guarantee \"cryptographic quality\"\n\t mathRNG = function(size) {\n\t var bytes = new Array(size);\n\t var r;\n\t\n\t for (var i = 0, r; i < size; i++) {\n\t if ((i & 0x03) == 0) r = Math.random() * 0x100000000;\n\t bytes[i] = r >>> ((i & 0x03) << 3) & 0xff;\n\t }\n\t\n\t return bytes;\n\t }\n\t\n\t if (_global.crypto && crypto.getRandomValues) {\n\t whatwgRNG = function(size) {\n\t var bytes = new Uint8Array(size);\n\t crypto.getRandomValues(bytes);\n\t return bytes;\n\t }\n\t }\n\t\n\t module.exports = whatwgRNG || mathRNG;\n\t\n\t}())\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/*\n\t * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n\t * in FIPS PUB 180-1\n\t * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n\t * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n\t * Distributed under the BSD License\n\t * See http://pajhome.org.uk/crypt/md5 for details.\n\t */\n\t\n\tvar helpers = __webpack_require__(2);\n\t\n\t/*\n\t * Calculate the SHA-1 of an array of big-endian words, and a bit length\n\t */\n\tfunction core_sha1(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << (24 - len % 32);\n\t x[((len + 64 >> 9) << 4) + 15] = len;\n\t\n\t var w = Array(80);\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t var e = -1009589776;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t var olde = e;\n\t\n\t for(var j = 0; j < 80; j++)\n\t {\n\t if(j < 16) w[j] = x[i + j];\n\t else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);\n\t var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)),\n\t safe_add(safe_add(e, w[j]), sha1_kt(j)));\n\t e = d;\n\t d = c;\n\t c = rol(b, 30);\n\t b = a;\n\t a = t;\n\t }\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t e = safe_add(e, olde);\n\t }\n\t return Array(a, b, c, d, e);\n\t\n\t}\n\t\n\t/*\n\t * Perform the appropriate triplet combination function for the current\n\t * iteration\n\t */\n\tfunction sha1_ft(t, b, c, d)\n\t{\n\t if(t < 20) return (b & c) | ((~b) & d);\n\t if(t < 40) return b ^ c ^ d;\n\t if(t < 60) return (b & c) | (b & d) | (c & d);\n\t return b ^ c ^ d;\n\t}\n\t\n\t/*\n\t * Determine the appropriate additive constant for the current iteration\n\t */\n\tfunction sha1_kt(t)\n\t{\n\t return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :\n\t (t < 60) ? -1894007588 : -899497514;\n\t}\n\t\n\t/*\n\t * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n\t * to work around bugs in some JS interpreters.\n\t */\n\tfunction safe_add(x, y)\n\t{\n\t var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t return (msw << 16) | (lsw & 0xFFFF);\n\t}\n\t\n\t/*\n\t * Bitwise rotate a 32-bit number to the left.\n\t */\n\tfunction rol(num, cnt)\n\t{\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t}\n\t\n\tmodule.exports = function sha1(buf) {\n\t return helpers.hash(buf, core_sha1, 20, true);\n\t};\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t\n\t/**\n\t * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n\t * in FIPS 180-2\n\t * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n\t * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n\t *\n\t */\n\t\n\tvar helpers = __webpack_require__(2);\n\t\n\tvar safe_add = function(x, y) {\n\t var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t return (msw << 16) | (lsw & 0xFFFF);\n\t};\n\t\n\tvar S = function(X, n) {\n\t return (X >>> n) | (X << (32 - n));\n\t};\n\t\n\tvar R = function(X, n) {\n\t return (X >>> n);\n\t};\n\t\n\tvar Ch = function(x, y, z) {\n\t return ((x & y) ^ ((~x) & z));\n\t};\n\t\n\tvar Maj = function(x, y, z) {\n\t return ((x & y) ^ (x & z) ^ (y & z));\n\t};\n\t\n\tvar Sigma0256 = function(x) {\n\t return (S(x, 2) ^ S(x, 13) ^ S(x, 22));\n\t};\n\t\n\tvar Sigma1256 = function(x) {\n\t return (S(x, 6) ^ S(x, 11) ^ S(x, 25));\n\t};\n\t\n\tvar Gamma0256 = function(x) {\n\t return (S(x, 7) ^ S(x, 18) ^ R(x, 3));\n\t};\n\t\n\tvar Gamma1256 = function(x) {\n\t return (S(x, 17) ^ S(x, 19) ^ R(x, 10));\n\t};\n\t\n\tvar core_sha256 = function(m, l) {\n\t var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2);\n\t var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19);\n\t var W = new Array(64);\n\t var a, b, c, d, e, f, g, h, i, j;\n\t var T1, T2;\n\t /* append padding */\n\t m[l >> 5] |= 0x80 << (24 - l % 32);\n\t m[((l + 64 >> 9) << 4) + 15] = l;\n\t for (var i = 0; i < m.length; i += 16) {\n\t a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7];\n\t for (var j = 0; j < 64; j++) {\n\t if (j < 16) {\n\t W[j] = m[j + i];\n\t } else {\n\t W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]);\n\t }\n\t T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]);\n\t T2 = safe_add(Sigma0256(a), Maj(a, b, c));\n\t h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2);\n\t }\n\t HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]);\n\t HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]);\n\t }\n\t return HASH;\n\t};\n\t\n\tmodule.exports = function sha256(buf) {\n\t return helpers.hash(buf, core_sha256, 32, true);\n\t};\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// amazon-cognito-identity.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 984cd731d4cd939f2d96","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { default as AuthenticationDetails } from './AuthenticationDetails';\nexport { default as AuthenticationHelper } from './AuthenticationHelper';\nexport { default as CognitoAccessToken } from './CognitoAccessToken';\nexport { default as CognitoIdToken } from './CognitoIdToken';\nexport { default as CognitoRefreshToken } from './CognitoRefreshToken';\nexport { default as CognitoUser } from './CognitoUser';\nexport { default as CognitoUserAttribute } from './CognitoUserAttribute';\nexport { default as CognitoUserPool } from './CognitoUserPool';\nexport { default as CognitoUserSession } from './CognitoUserSession';\nexport { default as CookieStorage } from './CookieStorage';\nexport { default as DateHelper } from './DateHelper';\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /private/var/folders/t2/9mln5kt56vlclhj4d7b6sjjn896kfm/T/tmp.r2qEusAl/aws-amplify/~/buffer/index.js\n// module id = 1\n// module chunks = 0","var Buffer = require('buffer').Buffer;\nvar intSize = 4;\nvar zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0);\nvar chrsz = 8;\n\nfunction toArray(buf, bigEndian) {\n if ((buf.length % intSize) !== 0) {\n var len = buf.length + (intSize - (buf.length % intSize));\n buf = Buffer.concat([buf, zeroBuffer], len);\n }\n\n var arr = [];\n var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE;\n for (var i = 0; i < buf.length; i += intSize) {\n arr.push(fn.call(buf, i));\n }\n return arr;\n}\n\nfunction toBuffer(arr, size, bigEndian) {\n var buf = new Buffer(size);\n var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE;\n for (var i = 0; i < arr.length; i++) {\n fn.call(buf, arr[i], i * 4, true);\n }\n return buf;\n}\n\nfunction hash(buf, fn, hashSize, bigEndian) {\n if (!Buffer.isBuffer(buf)) buf = new Buffer(buf);\n var arr = fn(toArray(buf, bigEndian), buf.length * chrsz);\n return toBuffer(arr, hashSize, bigEndian);\n}\n\nmodule.exports = { hash: hash };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/helpers.js\n// module id = 2\n// module chunks = 0","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Buffer } from 'buffer/';\nimport * as crypto from 'crypto-browserify';\nconst createHash = crypto.createHash;\nconst createHmac = crypto.createHmac;\nconst randomBytes = crypto.randomBytes;\n\nimport BigInteger from './BigInteger';\n\nconst initN = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1'\n + '29024E088A67CC74020BBEA63B139B22514A08798E3404DD'\n + 'EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245'\n + 'E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED'\n + 'EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D'\n + 'C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F'\n + '83655D23DCA3AD961C62F356208552BB9ED529077096966D'\n + '670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B'\n + 'E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9'\n + 'DE2BCBF6955817183995497CEA956AE515D2261898FA0510'\n + '15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64'\n + 'ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7'\n + 'ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B'\n + 'F12FFA06D98A0864D87602733EC86A64521F2B18177B200C'\n + 'BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31'\n + '43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF';\n\nconst newPasswordRequiredChallengeUserAttributePrefix = 'userAttributes.';\n\n/** @class */\nexport default class AuthenticationHelper {\n /**\n * Constructs a new AuthenticationHelper object\n * @param {string} PoolName Cognito user pool name.\n */\n constructor(PoolName) {\n this.N = new BigInteger(initN, 16);\n this.g = new BigInteger('2', 16);\n this.k = new BigInteger(this.hexHash(`00${this.N.toString(16)}0${this.g.toString(16)}`), 16);\n\n this.smallAValue = this.generateRandomSmallA();\n this.getLargeAValue(() => {});\n\n this.infoBits = Buffer.from('Caldera Derived Key', 'utf8');\n\n this.poolName = PoolName;\n }\n\n /**\n * @returns {BigInteger} small A, a random number\n */\n getSmallAValue() {\n return this.smallAValue;\n }\n\n /**\n * @param {nodeCallback} callback Called with (err, largeAValue)\n * @returns {void}\n */\n getLargeAValue(callback) {\n if (this.largeAValue) {\n callback(null, this.largeAValue);\n } else {\n this.calculateA(this.smallAValue, (err, largeAValue) => {\n if (err) {\n callback(err, null);\n }\n\n this.largeAValue = largeAValue;\n callback(null, this.largeAValue);\n });\n }\n }\n\n /**\n * helper function to generate a random big integer\n * @returns {BigInteger} a random value.\n * @private\n */\n generateRandomSmallA() {\n const hexRandom = randomBytes(128).toString('hex');\n\n const randomBigInt = new BigInteger(hexRandom, 16);\n const smallABigInt = randomBigInt.mod(this.N);\n\n return smallABigInt;\n }\n\n /**\n * helper function to generate a random string\n * @returns {string} a random value.\n * @private\n */\n generateRandomString() {\n return randomBytes(40).toString('base64');\n }\n\n /**\n * @returns {string} Generated random value included in password hash.\n */\n getRandomPassword() {\n return this.randomPassword;\n }\n\n /**\n * @returns {string} Generated random value included in devices hash.\n */\n getSaltDevices() {\n return this.SaltToHashDevices;\n }\n\n /**\n * @returns {string} Value used to verify devices.\n */\n getVerifierDevices() {\n return this.verifierDevices;\n }\n\n /**\n * Generate salts and compute verifier.\n * @param {string} deviceGroupKey Devices to generate verifier for.\n * @param {string} username User to generate verifier for.\n * @param {nodeCallback} callback Called with (err, null)\n * @returns {void}\n */\n generateHashDevice(deviceGroupKey, username, callback) {\n this.randomPassword = this.generateRandomString();\n const combinedString = `${deviceGroupKey}${username}:${this.randomPassword}`;\n const hashedString = this.hash(combinedString);\n\n const hexRandom = randomBytes(16).toString('hex');\n this.SaltToHashDevices = this.padHex(new BigInteger(hexRandom, 16));\n\n this.g.modPow(\n new BigInteger(this.hexHash(this.SaltToHashDevices + hashedString), 16),\n this.N,\n (err, verifierDevicesNotPadded) => {\n if (err) {\n callback(err, null);\n }\n\n this.verifierDevices = this.padHex(verifierDevicesNotPadded);\n callback(null, null);\n });\n }\n\n /**\n * Calculate the client's public value A = g^a%N\n * with the generated random number a\n * @param {BigInteger} a Randomly generated small A.\n * @param {nodeCallback} callback Called with (err, largeAValue)\n * @returns {void}\n * @private\n */\n calculateA(a, callback) {\n this.g.modPow(a, this.N, (err, A) => {\n if (err) {\n callback(err, null);\n }\n\n if (A.mod(this.N).equals(BigInteger.ZERO)) {\n callback(new Error('Illegal paramater. A mod N cannot be 0.'), null);\n }\n\n callback(null, A);\n });\n }\n\n /**\n * Calculate the client's value U which is the hash of A and B\n * @param {BigInteger} A Large A value.\n * @param {BigInteger} B Server B value.\n * @returns {BigInteger} Computed U value.\n * @private\n */\n calculateU(A, B) {\n this.UHexHash = this.hexHash(this.padHex(A) + this.padHex(B));\n const finalU = new BigInteger(this.UHexHash, 16);\n\n return finalU;\n }\n\n /**\n * Calculate a hash from a bitArray\n * @param {Buffer} buf Value to hash.\n * @returns {String} Hex-encoded hash.\n * @private\n */\n hash(buf) {\n const hashHex = createHash('sha256').update(buf).digest('hex');\n return (new Array(64 - hashHex.length).join('0')) + hashHex;\n }\n\n /**\n * Calculate a hash from a hex string\n * @param {String} hexStr Value to hash.\n * @returns {String} Hex-encoded hash.\n * @private\n */\n hexHash(hexStr) {\n return this.hash(Buffer.from(hexStr, 'hex'));\n }\n\n /**\n * Standard hkdf algorithm\n * @param {Buffer} ikm Input key material.\n * @param {Buffer} salt Salt value.\n * @returns {Buffer} Strong key material.\n * @private\n */\n computehkdf(ikm, salt) {\n const prk = createHmac('sha256', salt).update(ikm).digest();\n const infoBitsUpdate = Buffer.concat([\n this.infoBits,\n Buffer.from(String.fromCharCode(1), 'utf8'),\n ]);\n const hmac = createHmac('sha256', prk).update(infoBitsUpdate).digest();\n return hmac.slice(0, 16);\n }\n\n /**\n * Calculates the final hkdf based on computed S value, and computed U value and the key\n * @param {String} username Username.\n * @param {String} password Password.\n * @param {BigInteger} serverBValue Server B value.\n * @param {BigInteger} salt Generated salt.\n * @param {nodeCallback} callback Called with (err, hkdfValue)\n * @returns {void}\n */\n getPasswordAuthenticationKey(username, password, serverBValue, salt, callback) {\n if (serverBValue.mod(this.N).equals(BigInteger.ZERO)) {\n throw new Error('B cannot be zero.');\n }\n\n this.UValue = this.calculateU(this.largeAValue, serverBValue);\n\n if (this.UValue.equals(BigInteger.ZERO)) {\n throw new Error('U cannot be zero.');\n }\n\n const usernamePassword = `${this.poolName}${username}:${password}`;\n const usernamePasswordHash = this.hash(usernamePassword);\n\n const xValue = new BigInteger(this.hexHash(this.padHex(salt) + usernamePasswordHash), 16);\n this.calculateS(xValue, serverBValue, (err, sValue) => {\n if (err) {\n callback(err, null);\n }\n\n const hkdf = this.computehkdf(\n Buffer.from(this.padHex(sValue), 'hex'),\n Buffer.from(this.padHex(this.UValue.toString(16)), 'hex'));\n\n callback(null, hkdf);\n });\n }\n\n /**\n * Calculates the S value used in getPasswordAuthenticationKey\n * @param {BigInteger} xValue Salted password hash value.\n * @param {BigInteger} serverBValue Server B value.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n calculateS(xValue, serverBValue, callback) {\n this.g.modPow(xValue, this.N, (err, gModPowXN) => {\n if (err) {\n callback(err, null);\n }\n\n const intValue2 = serverBValue.subtract(this.k.multiply(gModPowXN));\n intValue2.modPow(\n this.smallAValue.add(this.UValue.multiply(xValue)),\n this.N,\n (err2, result) => {\n if (err2) {\n callback(err2, null);\n }\n\n callback(null, result.mod(this.N));\n }\n );\n });\n }\n\n /**\n * Return constant newPasswordRequiredChallengeUserAttributePrefix\n * @return {newPasswordRequiredChallengeUserAttributePrefix} constant prefix value\n */\n getNewPasswordRequiredChallengeUserAttributePrefix() {\n return newPasswordRequiredChallengeUserAttributePrefix;\n }\n\n /**\n * Converts a BigInteger (or hex string) to hex format padded with zeroes for hashing\n * @param {BigInteger|String} bigInt Number or string to pad.\n * @returns {String} Padded hex string.\n */\n padHex(bigInt) {\n let hashStr = bigInt.toString(16);\n if (hashStr.length % 2 === 1) {\n hashStr = `0${hashStr}`;\n } else if ('89ABCDEFabcdef'.indexOf(hashStr[0]) !== -1) {\n hashStr = `00${hashStr}`;\n }\n return hashStr;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/AuthenticationHelper.js","// A small implementation of BigInteger based on http://www-cs-students.stanford.edu/~tjw/jsbn/\n//\n// All public methods have been removed except the following:\n// new BigInteger(a, b) (only radix 2, 4, 8, 16 and 32 supported)\n// toString (only radix 2, 4, 8, 16 and 32 supported)\n// negate\n// abs\n// compareTo\n// bitLength\n// mod\n// equals\n// add\n// subtract\n// multiply\n// divide\n// modPow\n\nexport default BigInteger;\n\n/*\n * Copyright (c) 2003-2005 Tom Wu\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY\n * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n *\n * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,\n * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER\n * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF\n * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT\n * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n *\n * In addition, the following condition applies:\n *\n * All redistributions must retain an intact copy of this copyright notice\n * and disclaimer.\n */\n\n// (public) Constructor\nfunction BigInteger(a, b) {\n if (a != null) this.fromString(a, b);\n}\n\n// return new, unset BigInteger\nfunction nbi() {\n return new BigInteger(null);\n}\n\n// Bits per digit\nvar dbits;\n\n// JavaScript engine analysis\nvar canary = 0xdeadbeefcafe;\nvar j_lm = ((canary&0xffffff)==0xefcafe);\n\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\n\n// am1: use a single mult and divide to get the high bits,\n// max digit bits should be 26 because\n// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\nfunction am1(i,x,w,j,c,n) {\n while(--n >= 0) {\n var v = x*this[i++]+w[j]+c;\n c = Math.floor(v/0x4000000);\n w[j++] = v&0x3ffffff;\n }\n return c;\n}\n// am2 avoids a big mult-and-extract completely.\n// Max digit bits should be <= 30 because we do bitwise ops\n// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\nfunction am2(i,x,w,j,c,n) {\n var xl = x&0x7fff, xh = x>>15;\n while(--n >= 0) {\n var l = this[i]&0x7fff;\n var h = this[i++]>>15;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);\n c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);\n w[j++] = l&0x3fffffff;\n }\n return c;\n}\n// Alternately, set max digit bits to 28 since some\n// browsers slow down when dealing with 32-bit numbers.\nfunction am3(i,x,w,j,c,n) {\n var xl = x&0x3fff, xh = x>>14;\n while(--n >= 0) {\n var l = this[i]&0x3fff;\n var h = this[i++]>>14;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x3fff)<<14)+w[j]+c;\n c = (l>>28)+(m>>14)+xh*h;\n w[j++] = l&0xfffffff;\n }\n return c;\n}\nvar inBrowser = typeof navigator !== \"undefined\";\nif(inBrowser && j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n BigInteger.prototype.am = am2;\n dbits = 30;\n}\nelse if(inBrowser && j_lm && (navigator.appName != \"Netscape\")) {\n BigInteger.prototype.am = am1;\n dbits = 26;\n}\nelse { // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n}\n\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = (1 << dbits) - 1;\nBigInteger.prototype.DV = 1 << dbits;\n\nvar BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n\n// Digit conversions\nvar BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\nvar BI_RC = new Array();\nvar rr, vv;\nrr = \"0\".charCodeAt(0);\nfor (vv = 0; vv <= 9; ++vv)\n BI_RC[rr++] = vv;\nrr = \"a\".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv)\n BI_RC[rr++] = vv;\nrr = \"A\".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv)\n BI_RC[rr++] = vv;\n\nfunction int2char(n) {\n return BI_RM.charAt(n);\n}\nfunction intAt(s, i) {\n var c = BI_RC[s.charCodeAt(i)];\n return c == null ? -1 : c;\n}\n\n// (protected) copy this to r\nfunction bnpCopyTo(r) {\n for (var i = this.t - 1; i >= 0; --i)\n r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n}\n\n// (protected) set from integer value x, -DV <= x < DV\nfunction bnpFromInt(x) {\n this.t = 1;\n this.s = x < 0 ? -1 : 0;\n if (x > 0) this[0] = x;\n else if (x < -1) this[0] = x + this.DV;\n else this.t = 0;\n}\n\n// return bigint initialized to value\nfunction nbv(i) {\n var r = nbi();\n\n r.fromInt(i);\n\n return r;\n}\n\n// (protected) set from string and radix\nfunction bnpFromString(s, b) {\n var k;\n if (b == 16) k = 4;\n else if (b == 8) k = 3;\n else if (b == 2) k = 1;\n else if (b == 32) k = 5;\n else if (b == 4) k = 2;\n else throw new Error(\"Only radix 2, 4, 8, 16, 32 are supported\");\n this.t = 0;\n this.s = 0;\n var i = s.length, mi = false, sh = 0;\n while (--i >= 0) {\n var x = intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) == \"-\") mi = true;\n continue;\n }\n mi = false;\n if (sh == 0) this[this.t++] = x;\n else if (sh + k > this.DB) {\n this[this.t - 1] |= (x & (1 << this.DB - sh) - 1) << sh;\n this[this.t++] = x >> this.DB - sh;\n } else this[this.t - 1] |= x << sh;\n sh += k;\n if (sh >= this.DB) sh -= this.DB;\n }\n this.clamp();\n if (mi) BigInteger.ZERO.subTo(this, this);\n}\n\n// (protected) clamp off excess high words\nfunction bnpClamp() {\n var c = this.s & this.DM;\n while (this.t > 0 && this[this.t - 1] == c)\n --this.t;\n}\n\n// (public) return string representation in given radix\nfunction bnToString(b) {\n if (this.s < 0) return \"-\" + this.negate().toString();\n var k;\n if (b == 16) k = 4;\n else if (b == 8) k = 3;\n else if (b == 2) k = 1;\n else if (b == 32) k = 5;\n else if (b == 4) k = 2;\n else throw new Error(\"Only radix 2, 4, 8, 16, 32 are supported\");\n var km = (1 << k) - 1, d, m = false, r = \"\", i = this.t;\n var p = this.DB - i * this.DB % k;\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) > 0) {\n m = true;\n r = int2char(d);\n }\n while (i >= 0) {\n if (p < k) {\n d = (this[i] & (1 << p) - 1) << k - p;\n d |= this[--i] >> (p += this.DB - k);\n } else {\n d = this[i] >> (p -= k) & km;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if (d > 0) m = true;\n if (m) r += int2char(d);\n }\n }\n return m ? r : \"0\";\n}\n\n// (public) -this\nfunction bnNegate() {\n var r = nbi();\n\n BigInteger.ZERO.subTo(this, r);\n\n return r;\n}\n\n// (public) |this|\nfunction bnAbs() {\n return this.s < 0 ? this.negate() : this;\n}\n\n// (public) return + if this > a, - if this < a, 0 if equal\nfunction bnCompareTo(a) {\n var r = this.s - a.s;\n if (r != 0) return r;\n var i = this.t;\n r = i - a.t;\n if (r != 0) return this.s < 0 ? -r : r;\n while (--i >= 0)\n if ((r = this[i] - a[i]) != 0) return r;\n return 0;\n}\n\n// returns bit length of the integer x\nfunction nbits(x) {\n var r = 1, t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}\n\n// (public) return the number of bits in \"this\"\nfunction bnBitLength() {\n if (this.t <= 0) return 0;\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM);\n}\n\n// (protected) r = this << n*DB\nfunction bnpDLShiftTo(n, r) {\n var i;\n for (i = this.t - 1; i >= 0; --i)\n r[i + n] = this[i];\n for (i = n - 1; i >= 0; --i)\n r[i] = 0;\n r.t = this.t + n;\n r.s = this.s;\n}\n\n// (protected) r = this >> n*DB\nfunction bnpDRShiftTo(n, r) {\n for (var i = n; i < this.t; ++i)\n r[i - n] = this[i];\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n}\n\n// (protected) r = this << n\nfunction bnpLShiftTo(n, r) {\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << cbs) - 1;\n var ds = Math.floor(n / this.DB), c = this.s << bs & this.DM, i;\n for (i = this.t - 1; i >= 0; --i) {\n r[i + ds + 1] = this[i] >> cbs | c;\n c = (this[i] & bm) << bs;\n }\n for (i = ds - 1; i >= 0; --i)\n r[i] = 0;\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n}\n\n// (protected) r = this >> n\nfunction bnpRShiftTo(n, r) {\n r.s = this.s;\n var ds = Math.floor(n / this.DB);\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n for (var i = ds + 1; i < this.t; ++i) {\n r[i - ds - 1] |= (this[i] & bm) << cbs;\n r[i - ds] = this[i] >> bs;\n }\n if (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs;\n r.t = this.t - ds;\n r.clamp();\n}\n\n// (protected) r = this - a\nfunction bnpSubTo(a, r) {\n var i = 0, c = 0, m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] - a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c -= a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n } else {\n c += this.s;\n while (i < a.t) {\n c -= a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c < -1) r[i++] = this.DV + c;\n else if (c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n}\n\n// (protected) r = this * a, r != this,a (HAC 14.12)\n// \"this\" should be the larger one if appropriate.\nfunction bnpMultiplyTo(a, r) {\n var x = this.abs(), y = a.abs();\n var i = x.t;\n r.t = i + y.t;\n while (--i >= 0)\n r[i] = 0;\n for (i = 0; i < y.t; ++i)\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n r.s = 0;\n r.clamp();\n if (this.s != a.s) BigInteger.ZERO.subTo(r, r);\n}\n\n// (protected) r = this^2, r != this (HAC 14.16)\nfunction bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2 * x.t;\n while (--i >= 0)\n r[i] = 0;\n for (i = 0; i < x.t - 1; ++i) {\n var c = x.am(i, x[i], r, 2 * i, 0, 1);\n if (\n (r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >=\n x.DV\n ) {\n r[i + x.t] -= x.DV;\n r[i + x.t + 1] = 1;\n }\n }\n if (r.t > 0) r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n r.s = 0;\n r.clamp();\n}\n\n// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n// r != q, this != m. q or r may be null.\nfunction bnpDivRemTo(m, q, r) {\n var pm = m.abs();\n if (pm.t <= 0) return;\n var pt = this.abs();\n if (pt.t < pm.t) {\n if (q != null) q.fromInt(0);\n if (r != null) this.copyTo(r);\n return;\n }\n if (r == null) r = nbi();\n var y = nbi(), ts = this.s, ms = m.s;\n var nsh = this.DB - nbits(pm[pm.t - 1]);\n // normalize modulus\n if (nsh > 0) {\n pm.lShiftTo(nsh, y);\n pt.lShiftTo(nsh, r);\n } else {\n pm.copyTo(y);\n pt.copyTo(r);\n }\n var ys = y.t;\n var y0 = y[ys - 1];\n if (y0 == 0) return;\n var yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0);\n var d1 = this.FV / yt, d2 = (1 << this.F1) / yt, e = 1 << this.F2;\n var i = r.t, j = i - ys, t = q == null ? nbi() : q;\n y.dlShiftTo(j, t);\n if (r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t, r);\n }\n BigInteger.ONE.dlShiftTo(ys, t);\n t.subTo(y, y);\n // \"negative\" y so we can replace sub with am later\n while (y.t < ys)\n y[y.t++] = 0;\n while (--j >= 0) {\n // Estimate quotient digit\n var qd = r[--i] == y0\n ? this.DM\n : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {\n // Try it out\n y.dlShiftTo(j, t);\n r.subTo(t, r);\n while (r[i] < --qd) r.subTo(t, r);\n }\n }\n if (q != null) {\n r.drShiftTo(ys, q);\n if (ts != ms) BigInteger.ZERO.subTo(q, q);\n }\n r.t = ys;\n r.clamp();\n if (nsh > 0) r.rShiftTo(nsh, r);\n // Denormalize remainder\n if (ts < 0) BigInteger.ZERO.subTo(r, r);\n}\n\n// (public) this mod a\nfunction bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r);\n return r;\n}\n\n// (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n// justification:\n// xy == 1 (mod m)\n// xy = 1+km\n// xy(2-xy) = (1+km)(1-km)\n// x[y(2-xy)] = 1-k^2m^2\n// x[y(2-xy)] == 1 (mod m^2)\n// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n// JS multiply \"overflows\" differently from C/C++, so care is needed here.\nfunction bnpInvDigit() {\n if (this.t < 1) return 0;\n var x = this[0];\n if ((x & 1) == 0) return 0;\n var y = x & 3;\n // y == 1/x mod 2^2\n y = y * (2 - (x & 0xf) * y) & 0xf;\n // y == 1/x mod 2^4\n y = y * (2 - (x & 0xff) * y) & 0xff;\n // y == 1/x mod 2^8\n y = y * (2 - ((x & 0xffff) * y & 0xffff)) & 0xffff;\n // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = y * (2 - x * y % this.DV) % this.DV;\n // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return y > 0 ? this.DV - y : -y;\n}\n\nfunction bnEquals(a) {\n return this.compareTo(a) == 0;\n}\n\n// (protected) r = this + a\nfunction bnpAddTo(a, r) {\n var i = 0, c = 0, m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] + a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c += a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n } else {\n c += this.s;\n while (i < a.t) {\n c += a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c > 0) r[i++] = c;\n else if (c < -1) r[i++] = this.DV + c;\n r.t = i;\n r.clamp();\n}\n\n// (public) this + a\nfunction bnAdd(a) {\n var r = nbi();\n\n this.addTo(a, r);\n\n return r;\n}\n\n// (public) this - a\nfunction bnSubtract(a) {\n var r = nbi();\n\n this.subTo(a, r);\n\n return r;\n}\n\n// (public) this * a\nfunction bnMultiply(a) {\n var r = nbi();\n\n this.multiplyTo(a, r);\n\n return r;\n}\n\n// (public) this / a\nfunction bnDivide(a) {\n var r = nbi();\n\n this.divRemTo(a, r, null);\n\n return r;\n}\n\n// Montgomery reduction\nfunction Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << m.DB - 15) - 1;\n this.mt2 = 2 * m.t;\n}\n\n// xR mod m\nfunction montConvert(x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t, r);\n r.divRemTo(this.m, null, r);\n if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r);\n return r;\n}\n\n// x/R mod m\nfunction montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n}\n\n// x = x/R mod m (HAC 14.32)\nfunction montReduce(x) {\n while (x.t <= this.mt2)\n // pad x so am has enough room later\n x[x.t++] = 0;\n for (var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i] & 0x7fff;\n var u0 = j * this.mpl +\n ((j * this.mph + (x[i] >> 15) * this.mpl & this.um) << 15) &\n x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n // propagate carry\n while (x[j] >= x.DV) {\n x[j] -= x.DV;\n x[++j]++;\n }\n }\n x.clamp();\n x.drShiftTo(this.m.t, x);\n if (x.compareTo(this.m) >= 0) x.subTo(this.m, x);\n}\n\n// r = \"x^2/R mod m\"; x != r\nfunction montSqrTo(x, r) {\n x.squareTo(r);\n\n this.reduce(r);\n}\n\n// r = \"xy/R mod m\"; x,y != r\nfunction montMulTo(x, y, r) {\n x.multiplyTo(y, r);\n\n this.reduce(r);\n}\n\nMontgomery.prototype.convert = montConvert;\nMontgomery.prototype.revert = montRevert;\nMontgomery.prototype.reduce = montReduce;\nMontgomery.prototype.mulTo = montMulTo;\nMontgomery.prototype.sqrTo = montSqrTo;\n\n// (public) this^e % m (HAC 14.85)\nfunction bnModPow(e, m, callback) {\n var i = e.bitLength(), k, r = nbv(1), z = new Montgomery(m);\n if (i <= 0) return r;\n else if (i < 18) k = 1;\n else if (i < 48) k = 3;\n else if (i < 144) k = 4;\n else if (i < 768) k = 5;\n else k = 6;\n\n // precomputation\n var g = new Array(), n = 3, k1 = k - 1, km = (1 << k) - 1;\n g[1] = z.convert(this);\n if (k > 1) {\n var g2 = nbi();\n z.sqrTo(g[1], g2);\n while (n <= km) {\n g[n] = nbi();\n z.mulTo(g2, g[n - 2], g[n]);\n n += 2;\n }\n }\n\n var j = e.t - 1, w, is1 = true, r2 = nbi(), t;\n i = nbits(e[j]) - 1;\n while (j >= 0) {\n if (i >= k1) w = e[j] >> i - k1 & km;\n else {\n w = (e[j] & (1 << i + 1) - 1) << k1 - i;\n if (j > 0) w |= e[j - 1] >> this.DB + i - k1;\n }\n\n n = k;\n while ((w & 1) == 0) {\n w >>= 1;\n --n;\n }\n if ((i -= n) < 0) {\n i += this.DB;\n --j;\n }\n if (is1) {\n // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n } else {\n while (n > 1) {\n z.sqrTo(r, r2);\n z.sqrTo(r2, r);\n n -= 2;\n }\n if (n > 0) z.sqrTo(r, r2);\n else {\n t = r;\n r = r2;\n r2 = t;\n }\n z.mulTo(r2, g[w], r);\n }\n\n while (j >= 0 && (e[j] & 1 << i) == 0) {\n z.sqrTo(r, r2);\n t = r;\n r = r2;\n r2 = t;\n if (--i < 0) {\n i = this.DB - 1;\n --j;\n }\n }\n }\n var result = z.revert(r);\n callback(null, result);\n return result;\n}\n\n// protected\nBigInteger.prototype.copyTo = bnpCopyTo;\nBigInteger.prototype.fromInt = bnpFromInt;\nBigInteger.prototype.fromString = bnpFromString;\nBigInteger.prototype.clamp = bnpClamp;\nBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\nBigInteger.prototype.drShiftTo = bnpDRShiftTo;\nBigInteger.prototype.lShiftTo = bnpLShiftTo;\nBigInteger.prototype.rShiftTo = bnpRShiftTo;\nBigInteger.prototype.subTo = bnpSubTo;\nBigInteger.prototype.multiplyTo = bnpMultiplyTo;\nBigInteger.prototype.squareTo = bnpSquareTo;\nBigInteger.prototype.divRemTo = bnpDivRemTo;\nBigInteger.prototype.invDigit = bnpInvDigit;\nBigInteger.prototype.addTo = bnpAddTo;\n\n// public\nBigInteger.prototype.toString = bnToString;\nBigInteger.prototype.negate = bnNegate;\nBigInteger.prototype.abs = bnAbs;\nBigInteger.prototype.compareTo = bnCompareTo;\nBigInteger.prototype.bitLength = bnBitLength;\nBigInteger.prototype.mod = bnMod;\nBigInteger.prototype.equals = bnEquals;\nBigInteger.prototype.add = bnAdd;\nBigInteger.prototype.subtract = bnSubtract;\nBigInteger.prototype.multiply = bnMultiply;\nBigInteger.prototype.divide = bnDivide;\nBigInteger.prototype.modPow = bnModPow;\n\n// \"constants\"\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/BigInteger.js","/*\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport CognitoJwtToken from './CognitoJwtToken';\n\n/** @class */\nexport default class CognitoAccessToken extends CognitoJwtToken {\n /**\n * Constructs a new CognitoAccessToken object\n * @param {string=} AccessToken The JWT access token.\n */\n constructor({ AccessToken } = {}) {\n super(AccessToken || '');\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoAccessToken.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport CognitoJwtToken from './CognitoJwtToken';\n\n/** @class */\nexport default class CognitoIdToken extends CognitoJwtToken {\n /**\n * Constructs a new CognitoIdToken object\n * @param {string=} IdToken The JWT Id token\n */\n constructor({ IdToken } = {}) {\n super(IdToken || '');\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoIdToken.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Buffer } from 'buffer/';\n\n/** @class */\nexport default class CognitoJwtToken {\n /**\n * Constructs a new CognitoJwtToken object\n * @param {string=} token The JWT token.\n */\n constructor(token) {\n // Assign object\n this.jwtToken = token || '';\n this.payload = this.decodePayload();\n }\n\n /**\n * @returns {string} the record's token.\n */\n getJwtToken() {\n return this.jwtToken;\n }\n\n /**\n * @returns {int} the token's expiration (exp member).\n */\n getExpiration() {\n return this.payload.exp;\n }\n\n /**\n * @returns {int} the token's \"issued at\" (iat member).\n */\n getIssuedAt() {\n return this.payload.iat;\n }\n\n /**\n * @returns {object} the token's payload.\n */\n decodePayload() {\n const payload = this.jwtToken.split('.')[1];\n try {\n return JSON.parse(Buffer.from(payload, 'base64').toString('utf8'));\n } catch (err) {\n return {};\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoJwtToken.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nexport default class CognitoRefreshToken {\n /**\n * Constructs a new CognitoRefreshToken object\n * @param {string=} RefreshToken The JWT refresh token.\n */\n constructor({ RefreshToken } = {}) {\n // Assign object\n this.token = RefreshToken || '';\n }\n\n /**\n * @returns {string} the record's token.\n */\n getToken() {\n return this.token;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoRefreshToken.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Buffer } from 'buffer/';\n//import createHmac from 'create-hmac';\nimport * as crypto from 'crypto-browserify';\nconst createHmac = crypto.createHmac;\n\nimport BigInteger from './BigInteger';\nimport AuthenticationHelper from './AuthenticationHelper';\nimport CognitoAccessToken from './CognitoAccessToken';\nimport CognitoIdToken from './CognitoIdToken';\nimport CognitoRefreshToken from './CognitoRefreshToken';\nimport CognitoUserSession from './CognitoUserSession';\nimport DateHelper from './DateHelper';\nimport CognitoUserAttribute from './CognitoUserAttribute';\nimport StorageHelper from './StorageHelper';\n\n/**\n * @callback nodeCallback\n * @template T result\n * @param {*} err The operation failure reason, or null.\n * @param {T} result The operation result.\n */\n\n/**\n * @callback onFailure\n * @param {*} err Failure reason.\n */\n\n/**\n * @callback onSuccess\n * @template T result\n * @param {T} result The operation result.\n */\n\n/**\n * @callback mfaRequired\n * @param {*} details MFA challenge details.\n */\n\n/**\n * @callback customChallenge\n * @param {*} details Custom challenge details.\n */\n\n/**\n * @callback inputVerificationCode\n * @param {*} data Server response.\n */\n\n/**\n * @callback authSuccess\n * @param {CognitoUserSession} session The new session.\n * @param {bool=} userConfirmationNecessary User must be confirmed.\n */\n\n\n/** @class */\nexport default class CognitoUser {\n /**\n * Constructs a new CognitoUser object\n * @param {object} data Creation options\n * @param {string} data.Username The user's username.\n * @param {CognitoUserPool} data.Pool Pool containing the user.\n * @param {object} data.Storage Optional storage object.\n */\n constructor(data) {\n if (data == null || data.Username == null || data.Pool == null) {\n throw new Error('Username and pool information are required.');\n }\n\n this.username = data.Username || '';\n this.pool = data.Pool;\n this.Session = null;\n\n this.client = data.Pool.client;\n\n this.signInUserSession = null;\n this.authenticationFlowType = 'USER_SRP_AUTH';\n\n this.storage = data.Storage || new StorageHelper().getStorage();\n }\n\n /**\n * Sets the session for this user\n * @param {CognitoUserSession} signInUserSession the session\n * @returns {void}\n */\n setSignInUserSession(signInUserSession) {\n this.clearCachedTokens();\n this.signInUserSession = signInUserSession;\n this.cacheTokens();\n }\n\n /**\n * @returns {CognitoUserSession} the current session for this user\n */\n getSignInUserSession() {\n return this.signInUserSession;\n }\n\n /**\n * @returns {string} the user's username\n */\n getUsername() {\n return this.username;\n }\n\n /**\n * @returns {String} the authentication flow type\n */\n getAuthenticationFlowType() {\n return this.authenticationFlowType;\n }\n\n /**\n * sets authentication flow type\n * @param {string} authenticationFlowType New value.\n * @returns {void}\n */\n setAuthenticationFlowType(authenticationFlowType) {\n this.authenticationFlowType = authenticationFlowType;\n }\n\n\n /**\n * This is used for authenticating the user through the custom authentication flow.\n * @param {AuthenticationDetails} authDetails Contains the authentication data\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n initiateAuth(authDetails, callback) {\n const authParameters = authDetails.getAuthParameters();\n authParameters.USERNAME = this.username;\n\n const jsonReq = {\n AuthFlow: 'CUSTOM_AUTH',\n ClientId: this.pool.getClientId(),\n AuthParameters: authParameters,\n ClientMetadata: authDetails.getValidationData(),\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n\n this.client.request('InitiateAuth', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n const challengeName = data.ChallengeName;\n const challengeParameters = data.ChallengeParameters;\n\n if (challengeName === 'CUSTOM_CHALLENGE') {\n this.Session = data.Session;\n return callback.customChallenge(challengeParameters);\n }\n this.signInUserSession = this.getCognitoUserSession(data.AuthenticationResult);\n this.cacheTokens();\n return callback.onSuccess(this.signInUserSession);\n });\n }\n\n /**\n * This is used for authenticating the user.\n * stuff\n * @param {AuthenticationDetails} authDetails Contains the authentication data\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {newPasswordRequired} callback.newPasswordRequired new\n * password and any required attributes are required to continue\n * @param {mfaRequired} callback.mfaRequired MFA code\n * required to continue.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n authenticateUser(authDetails, callback) {\n if (this.authenticationFlowType === 'USER_PASSWORD_AUTH') {\n return this.authenticateUserPlainUsernamePassword(authDetails, callback);\n } else if (this.authenticationFlowType === 'USER_SRP_AUTH') {\n return this.authenticateUserDefaultAuth(authDetails, callback);\n }\n return callback.onFailure(new Error('Authentication flow type is invalid.'));\n }\n\n /**\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n * It calls the AuthenticationHelper for SRP related\n * stuff\n * @param {AuthenticationDetails} authDetails Contains the authentication data\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {newPasswordRequired} callback.newPasswordRequired new\n * password and any required attributes are required to continue\n * @param {mfaRequired} callback.mfaRequired MFA code\n * required to continue.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n authenticateUserDefaultAuth(authDetails, callback) {\n const authenticationHelper = new AuthenticationHelper(\n this.pool.getUserPoolId().split('_')[1]);\n const dateHelper = new DateHelper();\n\n let serverBValue;\n let salt;\n const authParameters = {};\n\n if (this.deviceKey != null) {\n authParameters.DEVICE_KEY = this.deviceKey;\n }\n\n authParameters.USERNAME = this.username;\n authenticationHelper.getLargeAValue((errOnAValue, aValue) => {\n // getLargeAValue callback start\n if (errOnAValue) {\n callback.onFailure(errOnAValue);\n }\n\n authParameters.SRP_A = aValue.toString(16);\n\n if (this.authenticationFlowType === 'CUSTOM_AUTH') {\n authParameters.CHALLENGE_NAME = 'SRP_A';\n }\n\n const jsonReq = {\n AuthFlow: this.authenticationFlowType,\n ClientId: this.pool.getClientId(),\n AuthParameters: authParameters,\n ClientMetadata: authDetails.getValidationData(),\n };\n if (this.getUserContextData(this.username)) {\n jsonReq.UserContextData = this.getUserContextData(this.username);\n }\n\n this.client.request('InitiateAuth', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n\n const challengeParameters = data.ChallengeParameters;\n\n this.username = challengeParameters.USER_ID_FOR_SRP;\n serverBValue = new BigInteger(challengeParameters.SRP_B, 16);\n salt = new BigInteger(challengeParameters.SALT, 16);\n this.getCachedDeviceKeyAndPassword();\n\n authenticationHelper.getPasswordAuthenticationKey(\n this.username,\n authDetails.getPassword(),\n serverBValue,\n salt,\n (errOnHkdf, hkdf) => {\n // getPasswordAuthenticationKey callback start\n if (errOnHkdf) {\n callback.onFailure(errOnHkdf);\n }\n\n const dateNow = dateHelper.getNowString();\n\n const signatureString = createHmac('sha256', hkdf)\n .update(Buffer.concat([\n Buffer.from(this.pool.getUserPoolId().split('_')[1], 'utf8'),\n Buffer.from(this.username, 'utf8'),\n Buffer.from(challengeParameters.SECRET_BLOCK, 'base64'),\n Buffer.from(dateNow, 'utf8'),\n ]))\n .digest('base64');\n\n const challengeResponses = {};\n\n challengeResponses.USERNAME = this.username;\n challengeResponses.PASSWORD_CLAIM_SECRET_BLOCK = challengeParameters.SECRET_BLOCK;\n challengeResponses.TIMESTAMP = dateNow;\n challengeResponses.PASSWORD_CLAIM_SIGNATURE = signatureString;\n\n if (this.deviceKey != null) {\n challengeResponses.DEVICE_KEY = this.deviceKey;\n }\n\n const respondToAuthChallenge = (challenge, challengeCallback) =>\n this.client.request('RespondToAuthChallenge', challenge,\n (errChallenge, dataChallenge) => {\n if (errChallenge && errChallenge.code === 'ResourceNotFoundException' &&\n errChallenge.message.toLowerCase().indexOf('device') !== -1) {\n challengeResponses.DEVICE_KEY = null;\n this.deviceKey = null;\n this.randomPassword = null;\n this.deviceGroupKey = null;\n this.clearCachedDeviceKeyAndPassword();\n return respondToAuthChallenge(challenge, challengeCallback);\n }\n return challengeCallback(errChallenge, dataChallenge);\n });\n\n const jsonReqResp = {\n ChallengeName: 'PASSWORD_VERIFIER',\n ClientId: this.pool.getClientId(),\n ChallengeResponses: challengeResponses,\n Session: data.Session,\n };\n if (this.getUserContextData()) {\n jsonReqResp.UserContextData = this.getUserContextData();\n }\n respondToAuthChallenge(jsonReqResp, (errAuthenticate, dataAuthenticate) => {\n if (errAuthenticate) {\n return callback.onFailure(errAuthenticate);\n }\n\n const challengeName = dataAuthenticate.ChallengeName;\n if (challengeName === 'NEW_PASSWORD_REQUIRED') {\n this.Session = dataAuthenticate.Session;\n let userAttributes = null;\n let rawRequiredAttributes = null;\n const requiredAttributes = [];\n const userAttributesPrefix = authenticationHelper\n .getNewPasswordRequiredChallengeUserAttributePrefix();\n\n if (dataAuthenticate.ChallengeParameters) {\n userAttributes = JSON.parse(\n dataAuthenticate.ChallengeParameters.userAttributes);\n rawRequiredAttributes = JSON.parse(\n dataAuthenticate.ChallengeParameters.requiredAttributes);\n }\n\n if (rawRequiredAttributes) {\n for (let i = 0; i < rawRequiredAttributes.length; i++) {\n requiredAttributes[i] = rawRequiredAttributes[i].substr(\n userAttributesPrefix.length\n );\n }\n }\n return callback.newPasswordRequired(userAttributes, requiredAttributes);\n }\n return this.authenticateUserInternal(\n dataAuthenticate,\n authenticationHelper,\n callback\n );\n });\n return undefined;\n // getPasswordAuthenticationKey callback end\n });\n return undefined;\n });\n // getLargeAValue callback end\n });\n }\n\n /**\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n * @param {AuthenticationDetails} authDetails Contains the authentication data.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {mfaRequired} callback.mfaRequired MFA code\n * required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n authenticateUserPlainUsernamePassword(authDetails, callback) {\n const authParameters = {};\n authParameters.USERNAME = this.username;\n authParameters.PASSWORD = authDetails.getPassword();\n if (!authParameters.PASSWORD) {\n callback.onFailure(new Error('PASSWORD parameter is required'));\n return;\n }\n const authenticationHelper = new AuthenticationHelper(\n this.pool.getUserPoolId().split('_')[1]);\n this.getCachedDeviceKeyAndPassword();\n if (this.deviceKey != null) {\n authParameters.DEVICE_KEY = this.deviceKey;\n }\n\n const jsonReq = {\n AuthFlow: 'USER_PASSWORD_AUTH',\n ClientId: this.pool.getClientId(),\n AuthParameters: authParameters,\n ClientMetadata: authDetails.getValidationData(),\n };\n if (this.getUserContextData(this.username)) {\n jsonReq.UserContextData = this.getUserContextData(this.username);\n }\n // USER_PASSWORD_AUTH happens in a single round-trip: client sends userName and password,\n // Cognito UserPools verifies password and returns tokens.\n this.client.request('InitiateAuth', jsonReq, (err, authResult) => {\n if (err) {\n return callback.onFailure(err);\n }\n return this.authenticateUserInternal(authResult, authenticationHelper, callback);\n });\n }\n\n /**\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n * @param {object} dataAuthenticate authentication data\n * @param {object} authenticationHelper helper created\n * @param {callback} callback passed on from caller\n * @returns {void}\n */\n authenticateUserInternal(dataAuthenticate, authenticationHelper, callback) {\n const challengeName = dataAuthenticate.ChallengeName;\n const challengeParameters = dataAuthenticate.ChallengeParameters;\n\n if (challengeName === 'SMS_MFA') {\n this.Session = dataAuthenticate.Session;\n return callback.mfaRequired(challengeName, challengeParameters);\n }\n\n if (challengeName === 'SELECT_MFA_TYPE') {\n this.Session = dataAuthenticate.Session;\n return callback.selectMFAType(challengeName, challengeParameters);\n }\n\n if (challengeName === 'MFA_SETUP') {\n this.Session = dataAuthenticate.Session;\n return callback.mfaSetup(challengeName, challengeParameters);\n }\n\n if (challengeName === 'SOFTWARE_TOKEN_MFA') {\n this.Session = dataAuthenticate.Session;\n return callback.totpRequired(challengeName, challengeParameters);\n }\n\n if (challengeName === 'CUSTOM_CHALLENGE') {\n this.Session = dataAuthenticate.Session;\n return callback.customChallenge(challengeParameters);\n }\n\n if (challengeName === 'DEVICE_SRP_AUTH') {\n this.getDeviceResponse(callback);\n return undefined;\n }\n\n this.signInUserSession = this.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n this.cacheTokens();\n\n const newDeviceMetadata = dataAuthenticate.AuthenticationResult.NewDeviceMetadata;\n if (newDeviceMetadata == null) {\n return callback.onSuccess(this.signInUserSession);\n }\n\n authenticationHelper.generateHashDevice(\n dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,\n dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey,\n (errGenHash) => {\n if (errGenHash) {\n return callback.onFailure(errGenHash);\n }\n\n const deviceSecretVerifierConfig = {\n Salt: Buffer.from(\n authenticationHelper.getSaltDevices(), 'hex'\n ).toString('base64'),\n PasswordVerifier: Buffer.from(\n authenticationHelper.getVerifierDevices(), 'hex'\n ).toString('base64'),\n };\n\n this.verifierDevices = deviceSecretVerifierConfig.PasswordVerifier;\n this.deviceGroupKey = newDeviceMetadata.DeviceGroupKey;\n this.randomPassword = authenticationHelper.getRandomPassword();\n\n this.client.request('ConfirmDevice', {\n DeviceKey: newDeviceMetadata.DeviceKey,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n DeviceName: navigator.userAgent,\n }, (errConfirm, dataConfirm) => {\n if (errConfirm) {\n return callback.onFailure(errConfirm);\n }\n\n this.deviceKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey;\n this.cacheDeviceKeyAndPassword();\n if (dataConfirm.UserConfirmationNecessary === true) {\n return callback.onSuccess(\n this.signInUserSession, dataConfirm.UserConfirmationNecessary);\n }\n return callback.onSuccess(this.signInUserSession);\n });\n return undefined;\n });\n return undefined;\n }\n\n /**\n * This method is user to complete the NEW_PASSWORD_REQUIRED challenge.\n * Pass the new password with any new user attributes to be updated.\n * User attribute keys must be of format userAttributes..\n * @param {string} newPassword new password for this user\n * @param {object} requiredAttributeData map with values for all required attributes\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {mfaRequired} callback.mfaRequired MFA code required to continue.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n completeNewPasswordChallenge(newPassword, requiredAttributeData, callback) {\n if (!newPassword) {\n return callback.onFailure(new Error('New password is required.'));\n }\n const authenticationHelper = new AuthenticationHelper(\n this.pool.getUserPoolId().split('_')[1]);\n const userAttributesPrefix = authenticationHelper\n .getNewPasswordRequiredChallengeUserAttributePrefix();\n\n const finalUserAttributes = {};\n if (requiredAttributeData) {\n Object.keys(requiredAttributeData).forEach((key) => {\n finalUserAttributes[userAttributesPrefix + key] = requiredAttributeData[key];\n });\n }\n\n finalUserAttributes.NEW_PASSWORD = newPassword;\n finalUserAttributes.USERNAME = this.username;\n const jsonReq = {\n ChallengeName: 'NEW_PASSWORD_REQUIRED',\n ClientId: this.pool.getClientId(),\n ChallengeResponses: finalUserAttributes,\n Session: this.Session,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n\n this.client.request('RespondToAuthChallenge',\n jsonReq, (errAuthenticate, dataAuthenticate) => {\n if (errAuthenticate) {\n return callback.onFailure(errAuthenticate);\n }\n return this.authenticateUserInternal(dataAuthenticate, authenticationHelper, callback);\n });\n return undefined;\n }\n\n /**\n * This is used to get a session using device authentication. It is called at the end of user\n * authentication\n *\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n * @private\n */\n getDeviceResponse(callback) {\n const authenticationHelper = new AuthenticationHelper(\n this.deviceGroupKey);\n const dateHelper = new DateHelper();\n\n const authParameters = {};\n\n authParameters.USERNAME = this.username;\n authParameters.DEVICE_KEY = this.deviceKey;\n authenticationHelper.getLargeAValue((errAValue, aValue) => {\n // getLargeAValue callback start\n if (errAValue) {\n callback.onFailure(errAValue);\n }\n\n authParameters.SRP_A = aValue.toString(16);\n\n const jsonReq = {\n ChallengeName: 'DEVICE_SRP_AUTH',\n ClientId: this.pool.getClientId(),\n ChallengeResponses: authParameters,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n\n const challengeParameters = data.ChallengeParameters;\n\n const serverBValue = new BigInteger(challengeParameters.SRP_B, 16);\n const salt = new BigInteger(challengeParameters.SALT, 16);\n\n authenticationHelper.getPasswordAuthenticationKey(\n this.deviceKey,\n this.randomPassword,\n serverBValue,\n salt,\n (errHkdf, hkdf) => {\n // getPasswordAuthenticationKey callback start\n if (errHkdf) {\n return callback.onFailure(errHkdf);\n }\n\n const dateNow = dateHelper.getNowString();\n\n const signatureString = createHmac('sha256', hkdf)\n .update(Buffer.concat([\n Buffer.from(this.deviceGroupKey, 'utf8'),\n Buffer.from(this.deviceKey, 'utf8'),\n Buffer.from(challengeParameters.SECRET_BLOCK, 'base64'),\n Buffer.from(dateNow, 'utf8'),\n ]))\n .digest('base64');\n\n const challengeResponses = {};\n\n challengeResponses.USERNAME = this.username;\n challengeResponses.PASSWORD_CLAIM_SECRET_BLOCK = challengeParameters.SECRET_BLOCK;\n challengeResponses.TIMESTAMP = dateNow;\n challengeResponses.PASSWORD_CLAIM_SIGNATURE = signatureString;\n challengeResponses.DEVICE_KEY = this.deviceKey;\n\n const jsonReqResp = {\n ChallengeName: 'DEVICE_PASSWORD_VERIFIER',\n ClientId: this.pool.getClientId(),\n ChallengeResponses: challengeResponses,\n Session: data.Session,\n };\n if (this.getUserContextData()) {\n jsonReqResp.UserContextData = this.getUserContextData();\n }\n\n this.client.request('RespondToAuthChallenge',\n jsonReqResp, (errAuthenticate, dataAuthenticate) => {\n if (errAuthenticate) {\n return callback.onFailure(errAuthenticate);\n }\n\n this.signInUserSession = this.getCognitoUserSession(\n dataAuthenticate.AuthenticationResult\n );\n this.cacheTokens();\n\n return callback.onSuccess(this.signInUserSession);\n });\n return undefined;\n // getPasswordAuthenticationKey callback end\n });\n return undefined;\n });\n // getLargeAValue callback end\n });\n }\n\n /**\n * This is used for a certain user to confirm the registration by using a confirmation code\n * @param {string} confirmationCode Code entered by user.\n * @param {bool} forceAliasCreation Allow migrating from an existing email / phone number.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n confirmRegistration(confirmationCode, forceAliasCreation, callback) {\n const jsonReq = {\n ClientId: this.pool.getClientId(),\n ConfirmationCode: confirmationCode,\n Username: this.username,\n ForceAliasCreation: forceAliasCreation,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('ConfirmSignUp', jsonReq, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n }\n\n /**\n * This is used by the user once he has the responses to a custom challenge\n * @param {string} answerChallenge The custom challange answer.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {customChallenge} callback.customChallenge\n * Custom challenge response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n sendCustomChallengeAnswer(answerChallenge, callback) {\n const challengeResponses = {};\n challengeResponses.USERNAME = this.username;\n challengeResponses.ANSWER = answerChallenge;\n\n const authenticationHelper = new AuthenticationHelper(\n this.pool.getUserPoolId().split('_')[1]\n );\n this.getCachedDeviceKeyAndPassword();\n if (this.deviceKey != null) {\n challengeResponses.DEVICE_KEY = this.deviceKey;\n }\n\n const jsonReq = {\n ChallengeName: 'CUSTOM_CHALLENGE',\n ChallengeResponses: challengeResponses,\n ClientId: this.pool.getClientId(),\n Session: this.Session,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n\n return this.authenticateUserInternal(data, authenticationHelper, callback);\n });\n }\n\n /**\n * This is used by the user once he has an MFA code\n * @param {string} confirmationCode The MFA code entered by the user.\n * @param {object} callback Result callback map.\n * @param {string} mfaType The mfa we are replying to.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n sendMFACode(confirmationCode, callback, mfaType) {\n const challengeResponses = {};\n challengeResponses.USERNAME = this.username;\n challengeResponses.SMS_MFA_CODE = confirmationCode;\n const mfaTypeSelection = mfaType || 'SMS_MFA';\n if (mfaTypeSelection === 'SOFTWARE_TOKEN_MFA') {\n challengeResponses.SOFTWARE_TOKEN_MFA_CODE = confirmationCode;\n }\n\n if (this.deviceKey != null) {\n challengeResponses.DEVICE_KEY = this.deviceKey;\n }\n\n const jsonReq = {\n ChallengeName: mfaTypeSelection,\n ChallengeResponses: challengeResponses,\n ClientId: this.pool.getClientId(),\n Session: this.Session,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n\n this.client.request('RespondToAuthChallenge',\n jsonReq, (err, dataAuthenticate) => {\n if (err) {\n return callback.onFailure(err);\n }\n\n const challengeName = dataAuthenticate.ChallengeName;\n\n if (challengeName === 'DEVICE_SRP_AUTH') {\n this.getDeviceResponse(callback);\n return undefined;\n }\n\n this.signInUserSession =\n this.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n this.cacheTokens();\n\n if (dataAuthenticate.AuthenticationResult.NewDeviceMetadata == null) {\n return callback.onSuccess(this.signInUserSession);\n }\n\n const authenticationHelper = new AuthenticationHelper(\n this.pool.getUserPoolId().split('_')[1]);\n authenticationHelper.generateHashDevice(\n dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,\n dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey,\n (errGenHash) => {\n if (errGenHash) {\n return callback.onFailure(errGenHash);\n }\n\n const deviceSecretVerifierConfig = {\n Salt: Buffer.from(\n authenticationHelper.getSaltDevices(), 'hex'\n ).toString('base64'),\n PasswordVerifier: Buffer.from(\n authenticationHelper.getVerifierDevices(), 'hex'\n ).toString('base64'),\n };\n\n this.verifierDevices = deviceSecretVerifierConfig.PasswordVerifier;\n this.deviceGroupKey = dataAuthenticate.AuthenticationResult\n .NewDeviceMetadata.DeviceGroupKey;\n this.randomPassword = authenticationHelper.getRandomPassword();\n\n this.client.request('ConfirmDevice', {\n DeviceKey: dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n DeviceName: navigator.userAgent,\n }, (errConfirm, dataConfirm) => {\n if (errConfirm) {\n return callback.onFailure(errConfirm);\n }\n\n this.deviceKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey;\n this.cacheDeviceKeyAndPassword();\n if (dataConfirm.UserConfirmationNecessary === true) {\n return callback.onSuccess(\n this.signInUserSession,\n dataConfirm.UserConfirmationNecessary);\n }\n return callback.onSuccess(this.signInUserSession);\n });\n return undefined;\n });\n return undefined;\n });\n }\n\n /**\n * This is used by an authenticated user to change the current password\n * @param {string} oldUserPassword The current password.\n * @param {string} newUserPassword The requested new password.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n changePassword(oldUserPassword, newUserPassword, callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('ChangePassword', {\n PreviousPassword: oldUserPassword,\n ProposedPassword: newUserPassword,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to enable MFA for himself\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n enableMFA(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n const mfaOptions = [];\n const mfaEnabled = {\n DeliveryMedium: 'SMS',\n AttributeName: 'phone_number',\n };\n mfaOptions.push(mfaEnabled);\n\n this.client.request('SetUserSettings', {\n MFAOptions: mfaOptions,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to enable MFA for himself\n * @param {string[]} smsMfaSettings the sms mfa settings\n * @param {string[]} softwareTokenMfaSettings the software token mfa settings\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n setUserMfaPreference(smsMfaSettings, softwareTokenMfaSettings, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('SetUserMFAPreference', {\n SMSMfaSettings: smsMfaSettings,\n SoftwareTokenMfaSettings: softwareTokenMfaSettings,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to disable MFA for himself\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n disableMFA(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n const mfaOptions = [];\n\n this.client.request('SetUserSettings', {\n MFAOptions: mfaOptions,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n\n /**\n * This is used by an authenticated user to delete himself\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n deleteUser(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('DeleteUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n this.clearCachedTokens();\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * @typedef {CognitoUserAttribute | { Name:string, Value:string }} AttributeArg\n */\n /**\n * This is used by an authenticated user to change a list of attributes\n * @param {AttributeArg[]} attributes A list of the new user attributes.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n updateAttributes(attributes, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('UpdateUserAttributes', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n UserAttributes: attributes,\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to get a list of attributes\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n getUserAttributes(callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('GetUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, (err, userData) => {\n if (err) {\n return callback(err, null);\n }\n\n const attributeList = [];\n\n for (let i = 0; i < userData.UserAttributes.length; i++) {\n const attribute = {\n Name: userData.UserAttributes[i].Name,\n Value: userData.UserAttributes[i].Value,\n };\n const userAttribute = new CognitoUserAttribute(attribute);\n attributeList.push(userAttribute);\n }\n\n return callback(null, attributeList);\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to get the MFAOptions\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n getMFAOptions(callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('GetUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, (err, userData) => {\n if (err) {\n return callback(err, null);\n }\n\n return callback(null, userData.MFAOptions);\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated users to get the userData\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n getUserData(callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('GetUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, (err, userData) => {\n if (err) {\n return callback(err, null);\n }\n\n return callback(null, userData);\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to delete a list of attributes\n * @param {string[]} attributeList Names of the attributes to delete.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n deleteAttributes(attributeList, callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('DeleteUserAttributes', {\n UserAttributeNames: attributeList,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used by a user to resend a confirmation code\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n resendConfirmationCode(callback) {\n const jsonReq = {\n ClientId: this.pool.getClientId(),\n Username: this.username,\n };\n\n this.client.request('ResendConfirmationCode', jsonReq, (err, result) => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, result);\n });\n }\n\n /**\n * This is used to get a session, either from the session object\n * or from the local storage, or by using a refresh token\n *\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n getSession(callback) {\n if (this.username == null) {\n return callback(new Error('Username is null. Cannot retrieve a new session'), null);\n }\n\n if (this.signInUserSession != null && this.signInUserSession.isValid()) {\n return callback(null, this.signInUserSession);\n }\n\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}.${this.username}`;\n const idTokenKey = `${keyPrefix}.idToken`;\n const accessTokenKey = `${keyPrefix}.accessToken`;\n const refreshTokenKey = `${keyPrefix}.refreshToken`;\n const clockDriftKey = `${keyPrefix}.clockDrift`;\n\n if (this.storage.getItem(idTokenKey)) {\n const idToken = new CognitoIdToken({\n IdToken: this.storage.getItem(idTokenKey),\n });\n const accessToken = new CognitoAccessToken({\n AccessToken: this.storage.getItem(accessTokenKey),\n });\n const refreshToken = new CognitoRefreshToken({\n RefreshToken: this.storage.getItem(refreshTokenKey),\n });\n const clockDrift = parseInt(this.storage.getItem(clockDriftKey), 0) || 0;\n\n const sessionData = {\n IdToken: idToken,\n AccessToken: accessToken,\n RefreshToken: refreshToken,\n ClockDrift: clockDrift,\n };\n const cachedSession = new CognitoUserSession(sessionData);\n if (cachedSession.isValid()) {\n this.signInUserSession = cachedSession;\n return callback(null, this.signInUserSession);\n }\n\n if (refreshToken.getToken() == null) {\n return callback(new Error('Cannot retrieve a new session. Please authenticate.'), null);\n }\n\n this.refreshSession(refreshToken, callback);\n } else {\n callback(new Error('Local storage is missing an ID Token, Please authenticate'), null);\n }\n\n return undefined;\n }\n\n\n /**\n * This uses the refreshToken to retrieve a new session\n * @param {CognitoRefreshToken} refreshToken A previous session's refresh token.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n refreshSession(refreshToken, callback) {\n const authParameters = {};\n authParameters.REFRESH_TOKEN = refreshToken.getToken();\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}`;\n const lastUserKey = `${keyPrefix}.LastAuthUser`;\n\n if (this.storage.getItem(lastUserKey)) {\n this.username = this.storage.getItem(lastUserKey);\n const deviceKeyKey = `${keyPrefix}.${this.username}.deviceKey`;\n this.deviceKey = this.storage.getItem(deviceKeyKey);\n authParameters.DEVICE_KEY = this.deviceKey;\n }\n\n const jsonReq = {\n ClientId: this.pool.getClientId(),\n AuthFlow: 'REFRESH_TOKEN_AUTH',\n AuthParameters: authParameters,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('InitiateAuth', jsonReq, (err, authResult) => {\n if (err) {\n if (err.code === 'NotAuthorizedException') {\n this.clearCachedTokens();\n }\n return callback(err, null);\n }\n if (authResult) {\n const authenticationResult = authResult.AuthenticationResult;\n if (!Object.prototype.hasOwnProperty.call(authenticationResult, 'RefreshToken')) {\n authenticationResult.RefreshToken = refreshToken.getToken();\n }\n this.signInUserSession = this.getCognitoUserSession(authenticationResult);\n this.cacheTokens();\n return callback(null, this.signInUserSession);\n }\n return undefined;\n });\n }\n\n /**\n * This is used to save the session tokens to local storage\n * @returns {void}\n */\n cacheTokens() {\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}`;\n const idTokenKey = `${keyPrefix}.${this.username}.idToken`;\n const accessTokenKey = `${keyPrefix}.${this.username}.accessToken`;\n const refreshTokenKey = `${keyPrefix}.${this.username}.refreshToken`;\n const clockDriftKey = `${keyPrefix}.${this.username}.clockDrift`;\n const lastUserKey = `${keyPrefix}.LastAuthUser`;\n\n this.storage.setItem(idTokenKey, this.signInUserSession.getIdToken().getJwtToken());\n this.storage.setItem(accessTokenKey, this.signInUserSession.getAccessToken().getJwtToken());\n this.storage.setItem(refreshTokenKey, this.signInUserSession.getRefreshToken().getToken());\n this.storage.setItem(clockDriftKey, `${this.signInUserSession.getClockDrift()}`);\n this.storage.setItem(lastUserKey, this.username);\n }\n\n /**\n * This is used to cache the device key and device group and device password\n * @returns {void}\n */\n cacheDeviceKeyAndPassword() {\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}.${this.username}`;\n const deviceKeyKey = `${keyPrefix}.deviceKey`;\n const randomPasswordKey = `${keyPrefix}.randomPasswordKey`;\n const deviceGroupKeyKey = `${keyPrefix}.deviceGroupKey`;\n\n this.storage.setItem(deviceKeyKey, this.deviceKey);\n this.storage.setItem(randomPasswordKey, this.randomPassword);\n this.storage.setItem(deviceGroupKeyKey, this.deviceGroupKey);\n }\n\n /**\n * This is used to get current device key and device group and device password\n * @returns {void}\n */\n getCachedDeviceKeyAndPassword() {\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}.${this.username}`;\n const deviceKeyKey = `${keyPrefix}.deviceKey`;\n const randomPasswordKey = `${keyPrefix}.randomPasswordKey`;\n const deviceGroupKeyKey = `${keyPrefix}.deviceGroupKey`;\n\n if (this.storage.getItem(deviceKeyKey)) {\n this.deviceKey = this.storage.getItem(deviceKeyKey);\n this.randomPassword = this.storage.getItem(randomPasswordKey);\n this.deviceGroupKey = this.storage.getItem(deviceGroupKeyKey);\n }\n }\n\n /**\n * This is used to clear the device key info from local storage\n * @returns {void}\n */\n clearCachedDeviceKeyAndPassword() {\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}.${this.username}`;\n const deviceKeyKey = `${keyPrefix}.deviceKey`;\n const randomPasswordKey = `${keyPrefix}.randomPasswordKey`;\n const deviceGroupKeyKey = `${keyPrefix}.deviceGroupKey`;\n\n this.storage.removeItem(deviceKeyKey);\n this.storage.removeItem(randomPasswordKey);\n this.storage.removeItem(deviceGroupKeyKey);\n }\n\n /**\n * This is used to clear the session tokens from local storage\n * @returns {void}\n */\n clearCachedTokens() {\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}`;\n const idTokenKey = `${keyPrefix}.${this.username}.idToken`;\n const accessTokenKey = `${keyPrefix}.${this.username}.accessToken`;\n const refreshTokenKey = `${keyPrefix}.${this.username}.refreshToken`;\n const lastUserKey = `${keyPrefix}.LastAuthUser`;\n\n this.storage.removeItem(idTokenKey);\n this.storage.removeItem(accessTokenKey);\n this.storage.removeItem(refreshTokenKey);\n this.storage.removeItem(lastUserKey);\n }\n\n /**\n * This is used to build a user session from tokens retrieved in the authentication result\n * @param {object} authResult Successful auth response from server.\n * @returns {CognitoUserSession} The new user session.\n * @private\n */\n getCognitoUserSession(authResult) {\n const idToken = new CognitoIdToken(authResult);\n const accessToken = new CognitoAccessToken(authResult);\n const refreshToken = new CognitoRefreshToken(authResult);\n\n const sessionData = {\n IdToken: idToken,\n AccessToken: accessToken,\n RefreshToken: refreshToken,\n };\n\n return new CognitoUserSession(sessionData);\n }\n\n /**\n * This is used to initiate a forgot password request\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {inputVerificationCode?} callback.inputVerificationCode\n * Optional callback raised instead of onSuccess with response data.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n forgotPassword(callback) {\n const jsonReq = {\n ClientId: this.pool.getClientId(),\n Username: this.username,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('ForgotPassword', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n if (typeof callback.inputVerificationCode === 'function') {\n return callback.inputVerificationCode(data);\n }\n return callback.onSuccess(data);\n });\n }\n\n /**\n * This is used to confirm a new password using a confirmationCode\n * @param {string} confirmationCode Code entered by user.\n * @param {string} newPassword Confirm new password.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n confirmPassword(confirmationCode, newPassword, callback) {\n const jsonReq = {\n ClientId: this.pool.getClientId(),\n Username: this.username,\n ConfirmationCode: confirmationCode,\n Password: newPassword,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('ConfirmForgotPassword', jsonReq, err => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess();\n });\n }\n\n /**\n * This is used to initiate an attribute confirmation request\n * @param {string} attributeName User attribute that needs confirmation.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {inputVerificationCode} callback.inputVerificationCode Called on success.\n * @returns {void}\n */\n getAttributeVerificationCode(attributeName, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('GetUserAttributeVerificationCode', {\n AttributeName: attributeName,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n if (typeof callback.inputVerificationCode === 'function') {\n return callback.inputVerificationCode(data);\n }\n return callback.onSuccess();\n });\n return undefined;\n }\n\n /**\n * This is used to confirm an attribute using a confirmation code\n * @param {string} attributeName Attribute being confirmed.\n * @param {string} confirmationCode Code entered by user.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n verifyAttribute(attributeName, confirmationCode, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('VerifyUserAttribute', {\n AttributeName: attributeName,\n Code: confirmationCode,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used to get the device information using the current device key\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess<*>} callback.onSuccess Called on success with device data.\n * @returns {void}\n */\n getDevice(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('GetDevice', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: this.deviceKey,\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess(data);\n });\n return undefined;\n }\n\n /**\n * This is used to forget a specific device\n * @param {string} deviceKey Device key.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n forgetSpecificDevice(deviceKey, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('ForgetDevice', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: deviceKey,\n }, err => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used to forget the current device\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n forgetDevice(callback) {\n this.forgetSpecificDevice(this.deviceKey, {\n onFailure: callback.onFailure,\n onSuccess: result => {\n this.deviceKey = null;\n this.deviceGroupKey = null;\n this.randomPassword = null;\n this.clearCachedDeviceKeyAndPassword();\n return callback.onSuccess(result);\n },\n });\n }\n\n /**\n * This is used to set the device status as remembered\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n setDeviceStatusRemembered(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('UpdateDeviceStatus', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: this.deviceKey,\n DeviceRememberedStatus: 'remembered',\n }, err => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used to set the device status as not remembered\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n setDeviceStatusNotRemembered(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('UpdateDeviceStatus', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: this.deviceKey,\n DeviceRememberedStatus: 'not_remembered',\n }, err => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used to list all devices for a user\n *\n * @param {int} limit the number of devices returned in a call\n * @param {string} paginationToken the pagination token in case any was returned before\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess<*>} callback.onSuccess Called on success with device list.\n * @returns {void}\n */\n listDevices(limit, paginationToken, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('ListDevices', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n Limit: limit,\n PaginationToken: paginationToken,\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess(data);\n });\n return undefined;\n }\n\n /**\n * This is used to globally revoke all tokens issued to a user\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n globalSignOut(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('GlobalSignOut', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback.onFailure(err);\n }\n this.clearCachedTokens();\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used for the user to signOut of the application and clear the cached tokens.\n * @returns {void}\n */\n signOut() {\n this.signInUserSession = null;\n this.clearCachedTokens();\n }\n\n /**\n * This is used by a user trying to select a given MFA\n * @param {string} answerChallenge the mfa the user wants\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n sendMFASelectionAnswer(answerChallenge, callback) {\n const challengeResponses = {};\n challengeResponses.USERNAME = this.username;\n challengeResponses.ANSWER = answerChallenge;\n\n const jsonReq = {\n ChallengeName: 'SELECT_MFA_TYPE',\n ChallengeResponses: challengeResponses,\n ClientId: this.pool.getClientId(),\n Session: this.Session,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n this.Session = data.Session;\n if (answerChallenge === 'SMS_MFA') {\n return callback.mfaRequired(data.challengeName, data.challengeParameters);\n }\n if (answerChallenge === 'SOFTWARE_TOKEN_MFA') {\n return callback.totpRequired(data.challengeName, data.challengeParameters);\n }\n return undefined;\n });\n }\n\n /**\n * This returns the user context data for advanced security feature.\n * @returns {void}\n */\n getUserContextData() {\n const pool = this.pool;\n return pool.getUserContextData(this.username);\n }\n\n /**\n * This is used by an authenticated or a user trying to authenticate to associate a TOTP MFA\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n associateSoftwareToken(callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n this.client.request('AssociateSoftwareToken', {\n Session: this.Session,\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n this.Session = data.Session;\n return callback.associateSecretCode(data.SecretCode);\n });\n } else {\n this.client.request('AssociateSoftwareToken', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.associateSecretCode(data.SecretCode);\n });\n }\n }\n\n /**\n * This is used by an authenticated or a user trying to authenticate to verify a TOTP MFA\n * @param {string} totpCode The MFA code entered by the user.\n * @param {string} friendlyDeviceName The device name we are assigning to the device.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n verifySoftwareToken(totpCode, friendlyDeviceName, callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n this.client.request('VerifySoftwareToken', {\n Session: this.Session,\n UserCode: totpCode,\n FriendlyDeviceName: friendlyDeviceName,\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n this.Session = data.Session;\n const challengeResponses = {};\n challengeResponses.USERNAME = this.username;\n const jsonReq = {\n ChallengeName: 'MFA_SETUP',\n ClientId: this.pool.getClientId(),\n ChallengeResponses: challengeResponses,\n Session: this.Session,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge',\n jsonReq, (errRespond, dataRespond) => {\n if (errRespond) {\n return callback.onFailure(errRespond);\n }\n this.signInUserSession = this.getCognitoUserSession(dataRespond.AuthenticationResult);\n this.cacheTokens();\n return callback.onSuccess(this.signInUserSession);\n });\n return undefined;\n });\n } else {\n this.client.request('VerifySoftwareToken', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n UserCode: totpCode,\n FriendlyDeviceName: friendlyDeviceName,\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess(data);\n });\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoUser.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nexport default class CognitoUserAttribute {\n /**\n * Constructs a new CognitoUserAttribute object\n * @param {string=} Name The record's name\n * @param {string=} Value The record's value\n */\n constructor({ Name, Value } = {}) {\n this.Name = Name || '';\n this.Value = Value || '';\n }\n\n /**\n * @returns {string} the record's value.\n */\n getValue() {\n return this.Value;\n }\n\n /**\n * Sets the record's value.\n * @param {string} value The new value.\n * @returns {CognitoUserAttribute} The record for method chaining.\n */\n setValue(value) {\n this.Value = value;\n return this;\n }\n\n /**\n * @returns {string} the record's name.\n */\n getName() {\n return this.Name;\n }\n\n /**\n * Sets the record's name\n * @param {string} name The new name.\n * @returns {CognitoUserAttribute} The record for method chaining.\n */\n setName(name) {\n this.Name = name;\n return this;\n }\n\n /**\n * @returns {string} a string representation of the record.\n */\n toString() {\n return JSON.stringify(this);\n }\n\n /**\n * @returns {object} a flat object representing the record.\n */\n toJSON() {\n return {\n Name: this.Name,\n Value: this.Value,\n };\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoUserAttribute.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nexport default class CognitoUserSession {\n /**\n * Constructs a new CognitoUserSession object\n * @param {CognitoIdToken} IdToken The session's Id token.\n * @param {CognitoRefreshToken=} RefreshToken The session's refresh token.\n * @param {CognitoAccessToken} AccessToken The session's access token.\n * @param {int} ClockDrift The saved computer's clock drift or undefined to force calculation.\n */\n constructor({ IdToken, RefreshToken, AccessToken, ClockDrift } = {}) {\n if (AccessToken == null || IdToken == null) {\n throw new Error('Id token and Access Token must be present.');\n }\n\n this.idToken = IdToken;\n this.refreshToken = RefreshToken;\n this.accessToken = AccessToken;\n this.clockDrift = ClockDrift === undefined ? this.calculateClockDrift() : ClockDrift;\n }\n\n /**\n * @returns {CognitoIdToken} the session's Id token\n */\n getIdToken() {\n return this.idToken;\n }\n\n /**\n * @returns {CognitoRefreshToken} the session's refresh token\n */\n getRefreshToken() {\n return this.refreshToken;\n }\n\n /**\n * @returns {CognitoAccessToken} the session's access token\n */\n getAccessToken() {\n return this.accessToken;\n }\n\n /**\n * @returns {int} the session's clock drift\n */\n getClockDrift() {\n return this.clockDrift;\n }\n\n /**\n * @returns {int} the computer's clock drift\n */\n calculateClockDrift() {\n const now = Math.floor(new Date() / 1000);\n const iat = Math.min(this.accessToken.getIssuedAt(), this.idToken.getIssuedAt());\n\n return now - iat;\n }\n\n /**\n * Checks to see if the session is still valid based on session expiry information found\n * in tokens and the current time (adjusted with clock drift)\n * @returns {boolean} if the session is still valid\n */\n isValid() {\n const now = Math.floor(new Date() / 1000);\n const adjusted = now - this.clockDrift;\n\n return adjusted < this.accessToken.getExpiration() && adjusted < this.idToken.getExpiration();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoUserSession.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst monthNames =\n ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\nconst weekNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n\n/** @class */\nexport default class DateHelper {\n /**\n * @returns {string} The current time in \"ddd MMM D HH:mm:ss UTC YYYY\" format.\n */\n getNowString() {\n const now = new Date();\n\n const weekDay = weekNames[now.getUTCDay()];\n const month = monthNames[now.getUTCMonth()];\n const day = now.getUTCDate();\n\n let hours = now.getUTCHours();\n if (hours < 10) {\n hours = `0${hours}`;\n }\n\n let minutes = now.getUTCMinutes();\n if (minutes < 10) {\n minutes = `0${minutes}`;\n }\n\n let seconds = now.getUTCSeconds();\n if (seconds < 10) {\n seconds = `0${seconds}`;\n }\n\n const year = now.getUTCFullYear();\n\n // ddd MMM D HH:mm:ss UTC YYYY\n const dateNow = `${weekDay} ${month} ${day} ${hours}:${minutes}:${seconds} UTC ${year}`;\n\n return dateNow;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/DateHelper.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet dataMemory = {};\n\n/** @class */\nclass MemoryStorage {\n\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n static setItem(key, value) {\n dataMemory[key] = value;\n return dataMemory[key];\n }\n\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n static getItem(key) {\n return Object.prototype.hasOwnProperty.call(dataMemory, key) ? dataMemory[key] : undefined;\n }\n\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n static removeItem(key) {\n return delete dataMemory[key];\n }\n\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n static clear() {\n dataMemory = {};\n return dataMemory;\n }\n}\n\n/** @class */\nexport default class StorageHelper {\n\n /**\n * This is used to get a storage object\n * @returns {object} the storage\n */\n constructor() {\n try {\n this.storageWindow = window.localStorage;\n this.storageWindow.setItem('aws.cognito.test-ls', 1);\n this.storageWindow.removeItem('aws.cognito.test-ls');\n } catch (exception) {\n this.storageWindow = MemoryStorage;\n }\n }\n\n /**\n * This is used to return the storage\n * @returns {object} the storage\n */\n getStorage() {\n return this.storageWindow;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/StorageHelper.js","var Buffer = require('buffer').Buffer\nvar sha = require('./sha')\nvar sha256 = require('./sha256')\nvar rng = require('./rng')\nvar md5 = require('./md5')\n\nvar algorithms = {\n sha1: sha,\n sha256: sha256,\n md5: md5\n}\n\nvar blocksize = 64\nvar zeroBuffer = new Buffer(blocksize); zeroBuffer.fill(0)\nfunction hmac(fn, key, data) {\n if(!Buffer.isBuffer(key)) key = new Buffer(key)\n if(!Buffer.isBuffer(data)) data = new Buffer(data)\n\n if(key.length > blocksize) {\n key = fn(key)\n } else if(key.length < blocksize) {\n key = Buffer.concat([key, zeroBuffer], blocksize)\n }\n\n var ipad = new Buffer(blocksize), opad = new Buffer(blocksize)\n for(var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n var hash = fn(Buffer.concat([ipad, data]))\n return fn(Buffer.concat([opad, hash]))\n}\n\nfunction hash(alg, key) {\n alg = alg || 'sha1'\n var fn = algorithms[alg]\n var bufs = []\n var length = 0\n if(!fn) error('algorithm:', alg, 'is not yet supported')\n return {\n update: function (data) {\n if(!Buffer.isBuffer(data)) data = new Buffer(data)\n \n bufs.push(data)\n length += data.length\n return this\n },\n digest: function (enc) {\n var buf = Buffer.concat(bufs)\n var r = key ? hmac(fn, key, buf) : fn(buf)\n bufs = null\n return enc ? r.toString(enc) : r\n }\n }\n}\n\nfunction error () {\n var m = [].slice.call(arguments).join(' ')\n throw new Error([\n m,\n 'we accept pull requests',\n 'http://github.com/dominictarr/crypto-browserify'\n ].join('\\n'))\n}\n\nexports.createHash = function (alg) { return hash(alg) }\nexports.createHmac = function (alg, key) { return hash(alg, key) }\nexports.randomBytes = function(size, callback) {\n if (callback && callback.call) {\n try {\n callback.call(this, undefined, new Buffer(rng(size)))\n } catch (err) { callback(err) }\n } else {\n return new Buffer(rng(size))\n }\n}\n\nfunction each(a, f) {\n for(var i in a)\n f(a[i], i)\n}\n\n// the least I can do is make error messages for the rest of the node.js/crypto api.\neach(['createCredentials'\n, 'createCipher'\n, 'createCipheriv'\n, 'createDecipher'\n, 'createDecipheriv'\n, 'createSign'\n, 'createVerify'\n, 'createDiffieHellman'\n, 'pbkdf2'], function (name) {\n exports[name] = function () {\n error('sorry,', name, 'is not implemented yet')\n }\n})\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/index.js\n// module id = 14\n// module chunks = 0","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return (b64.length * 3 / 4) - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\n arr = new Arr((len * 3 / 4) - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0; i < l; i += 4) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /private/var/folders/t2/9mln5kt56vlclhj4d7b6sjjn896kfm/T/tmp.r2qEusAl/aws-amplify/~/base64-js/index.js\n// module id = 15\n// module chunks = 0","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /private/var/folders/t2/9mln5kt56vlclhj4d7b6sjjn896kfm/T/tmp.r2qEusAl/aws-amplify/~/ieee754/index.js\n// module id = 16\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /private/var/folders/t2/9mln5kt56vlclhj4d7b6sjjn896kfm/T/tmp.r2qEusAl/aws-amplify/~/isarray/index.js\n// module id = 17\n// module chunks = 0","/*!\n * JavaScript Cookie v2.2.0\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader = false;\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api (key, value, attributes) {\n\t\t\tvar result;\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Write\n\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tattributes = extend({\n\t\t\t\t\tpath: '/'\n\t\t\t\t}, api.defaults, attributes);\n\n\t\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\t\tvar expires = new Date();\n\t\t\t\t\texpires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n\t\t\t\t\tattributes.expires = expires;\n\t\t\t\t}\n\n\t\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\t\ttry {\n\t\t\t\t\tresult = JSON.stringify(value);\n\t\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\t\tvalue = result;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\n\t\t\t\tif (!converter.write) {\n\t\t\t\t\tvalue = encodeURIComponent(String(value))\n\t\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\t\t\t\t} else {\n\t\t\t\t\tvalue = converter.write(value, key);\n\t\t\t\t}\n\n\t\t\t\tkey = encodeURIComponent(String(key));\n\t\t\t\tkey = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);\n\t\t\t\tkey = key.replace(/[\\(\\)]/g, escape);\n\n\t\t\t\tvar stringifiedAttributes = '';\n\n\t\t\t\tfor (var attributeName in attributes) {\n\t\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName];\n\t\t\t\t}\n\t\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t\t}\n\n\t\t\t// Read\n\n\t\t\tif (!key) {\n\t\t\t\tresult = {};\n\t\t\t}\n\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all. Also prevents odd result when\n\t\t\t// calling \"get()\"\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar rdecode = /(%[0-9A-Z]{2})+/g;\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!this.json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = parts[0].replace(rdecode, decodeURIComponent);\n\t\t\t\t\tcookie = converter.read ?\n\t\t\t\t\t\tconverter.read(cookie, name) : converter(cookie, name) ||\n\t\t\t\t\t\tcookie.replace(rdecode, decodeURIComponent);\n\n\t\t\t\t\tif (this.json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tresult = cookie;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!key) {\n\t\t\t\t\t\tresult[name] = cookie;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tapi.set = api;\n\t\tapi.get = function (key) {\n\t\t\treturn api.call(api, key);\n\t\t};\n\t\tapi.getJSON = function () {\n\t\t\treturn api.apply({\n\t\t\t\tjson: true\n\t\t\t}, [].slice.call(arguments));\n\t\t};\n\t\tapi.defaults = {};\n\n\t\tapi.remove = function (key, attributes) {\n\t\t\tapi(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /private/var/folders/t2/9mln5kt56vlclhj4d7b6sjjn896kfm/T/tmp.r2qEusAl/aws-amplify/~/js-cookie/src/js.cookie.js\n// module id = 18\n// module chunks = 0","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nexport default class AuthenticationDetails {\n /**\n * Constructs a new AuthenticationDetails object\n * @param {object=} data Creation options.\n * @param {string} data.Username User being authenticated.\n * @param {string} data.Password Plain-text password to authenticate with.\n * @param {(AttributeArg[])?} data.ValidationData Application extra metadata.\n * @param {(AttributeArg[])?} data.AuthParamaters Authentication paramaters for custom auth.\n */\n constructor(data) {\n const { ValidationData, Username, Password, AuthParameters } = data || {};\n this.validationData = ValidationData || {};\n this.authParameters = AuthParameters || {};\n this.username = Username;\n this.password = Password;\n }\n\n /**\n * @returns {string} the record's username\n */\n getUsername() {\n return this.username;\n }\n\n /**\n * @returns {string} the record's password\n */\n getPassword() {\n return this.password;\n }\n\n /**\n * @returns {Array} the record's validationData\n */\n getValidationData() {\n return this.validationData;\n }\n\n /**\n * @returns {Array} the record's authParameters\n */\n getAuthParameters() {\n return this.authParameters;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/AuthenticationDetails.js","import UserAgent from './UserAgent';\n/** @class */\nexport default class Client {\n /**\n * Constructs a new AWS Cognito Identity Provider client object\n * @param {string} region AWS region\n * @param {string} endpoint endpoint\n */\n constructor(region, endpoint) {\n this.endpoint = endpoint || `https://cognito-idp.${region}.amazonaws.com/`;\n this.userAgent = UserAgent.prototype.userAgent || 'aws-amplify/0.1.x js';\n }\n\n /**\n * Makes an unauthenticated request on AWS Cognito Identity Provider API\n * using fetch\n * @param {string} operation API operation\n * @param {object} params Input parameters\n * @param {function} callback Callback called when a response is returned\n * @returns {void}\n */\n request(operation, params, callback) {\n const headers = {\n 'Content-Type': 'application/x-amz-json-1.1',\n 'X-Amz-Target': `AWSCognitoIdentityProviderService.${operation}`,\n 'X-Amz-User-Agent': this.userAgent,\n };\n\n const options = {\n headers,\n method: 'POST',\n mode: 'cors',\n cache: 'no-cache',\n body: JSON.stringify(params),\n };\n\n let response;\n\n fetch(this.endpoint, options)\n .then(resp => {\n response = resp;\n return resp;\n }, err => {\n // If error happens here, the request failed\n // if it is TypeError throw network error\n if (err instanceof TypeError) {\n throw new Error('Network error');\n }\n throw err;\n })\n .then(resp => resp.json().catch(() => ({})))\n .then(data => {\n if (response.ok) return callback(null, data);\n\n // Taken from aws-sdk-js/lib/protocol/json.js\n // eslint-disable-next-line no-underscore-dangle\n const code = (data.__type || data.code).split('#').pop();\n const error = {\n code,\n name: code,\n message: (data.message || data.Message || null),\n };\n return callback(error);\n })\n .catch(err => {\n // default to return 'UnknownError'\n let error = { code: 'UnknownError', message: 'Unkown error' };\n\n // first check if we have a service error\n if (response && response.headers && response.headers.get('x-amzn-errortype')) {\n try {\n const code = (response.headers.get('x-amz-errortype')).split(':')[0];\n error = {\n code,\n name: code,\n statusCode: response.status,\n message: (response.status) ? response.status.toString() : null,\n };\n } catch (ex) {\n // pass through so it doesn't get swallowed if we can't parse it\n }\n // otherwise check if error is Network error\n } else if (err instanceof Error && err.message === 'Network error') {\n error = {\n code: 'NetworkError',\n name: err.name,\n message: err.message,\n };\n }\n return callback(error);\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Client.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Client from './Client';\nimport CognitoUser from './CognitoUser';\nimport StorageHelper from './StorageHelper';\n\n/** @class */\nexport default class CognitoUserPool {\n /**\n * Constructs a new CognitoUserPool object\n * @param {object} data Creation options.\n * @param {string} data.UserPoolId Cognito user pool id.\n * @param {string} data.ClientId User pool application client id.\n * @param {object} data.Storage Optional storage object.\n * @param {boolean} data.AdvancedSecurityDataCollectionFlag Optional:\n * boolean flag indicating if the data collection is enabled\n * to support cognito advanced security features. By default, this\n * flag is set to true.\n */\n constructor(data) {\n const { UserPoolId, ClientId, endpoint, AdvancedSecurityDataCollectionFlag } = data || {};\n if (!UserPoolId || !ClientId) {\n throw new Error('Both UserPoolId and ClientId are required.');\n }\n if (!/^[\\w-]+_.+$/.test(UserPoolId)) {\n throw new Error('Invalid UserPoolId format.');\n }\n const region = UserPoolId.split('_')[0];\n\n this.userPoolId = UserPoolId;\n this.clientId = ClientId;\n\n this.client = new Client(region, endpoint);\n\n /**\n * By default, AdvancedSecurityDataCollectionFlag is set to true,\n * if no input value is provided.\n */\n this.advancedSecurityDataCollectionFlag = AdvancedSecurityDataCollectionFlag !== false;\n\n this.storage = data.Storage || new StorageHelper().getStorage();\n }\n\n /**\n * @returns {string} the user pool id\n */\n getUserPoolId() {\n return this.userPoolId;\n }\n\n /**\n * @returns {string} the client id\n */\n getClientId() {\n return this.clientId;\n }\n\n /**\n * @typedef {object} SignUpResult\n * @property {CognitoUser} user New user.\n * @property {bool} userConfirmed If the user is already confirmed.\n */\n /**\n * method for signing up a user\n * @param {string} username User's username.\n * @param {string} password Plain-text initial password entered by user.\n * @param {(AttributeArg[])=} userAttributes New user attributes.\n * @param {(AttributeArg[])=} validationData Application metadata.\n * @param {nodeCallback} callback Called on error or with the new user.\n * @returns {void}\n */\n signUp(username, password, userAttributes, validationData, callback) {\n const jsonReq = {\n ClientId: this.clientId,\n Username: username,\n Password: password,\n UserAttributes: userAttributes,\n ValidationData: validationData,\n };\n if (this.getUserContextData(username)) {\n jsonReq.UserContextData = this.getUserContextData(username);\n }\n this.client.request('SignUp', jsonReq, (err, data) => {\n if (err) {\n return callback(err, null);\n }\n\n const cognitoUser = {\n Username: username,\n Pool: this,\n Storage: this.storage,\n };\n\n const returnData = {\n user: new CognitoUser(cognitoUser),\n userConfirmed: data.UserConfirmed,\n userSub: data.UserSub,\n };\n\n return callback(null, returnData);\n });\n }\n\n\n /**\n * method for getting the current user of the application from the local storage\n *\n * @returns {CognitoUser} the user retrieved from storage\n */\n getCurrentUser() {\n const lastUserKey = `CognitoIdentityServiceProvider.${this.clientId}.LastAuthUser`;\n\n const lastAuthUser = this.storage.getItem(lastUserKey);\n if (lastAuthUser) {\n const cognitoUser = {\n Username: lastAuthUser,\n Pool: this,\n Storage: this.storage,\n };\n\n return new CognitoUser(cognitoUser);\n }\n\n return null;\n }\n\n /**\n * This method returns the encoded data string used for cognito advanced security feature.\n * This would be generated only when developer has included the JS used for collecting the\n * data on their client. Please refer to documentation to know more about using AdvancedSecurity\n * features\n * @param {string} username the username for the context data\n * @returns {string} the user context data\n **/\n getUserContextData(username) {\n if (typeof AmazonCognitoAdvancedSecurityData === 'undefined') {\n return undefined;\n }\n /* eslint-disable */\n const amazonCognitoAdvancedSecurityDataConst = AmazonCognitoAdvancedSecurityData;\n /* eslint-enable */\n\n if (this.advancedSecurityDataCollectionFlag) {\n const advancedSecurityData = amazonCognitoAdvancedSecurityDataConst.getData(username,\n this.userPoolId, this.clientId);\n if (advancedSecurityData) {\n const userContextData = {\n EncodedData: advancedSecurityData,\n };\n return userContextData;\n }\n }\n return {};\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoUserPool.js","\nimport * as Cookies from 'js-cookie';\n\n/** @class */\nexport default class CookieStorage {\n\n /**\n * Constructs a new CookieStorage object\n * @param {object} data Creation options.\n * @param {string} data.domain Cookies domain (mandatory).\n * @param {string} data.path Cookies path (default: '/')\n * @param {integer} data.expires Cookie expiration (in days, default: 365)\n * @param {boolean} data.secure Cookie secure flag (default: true)\n */\n constructor(data) {\n this.domain = data.domain;\n if (data.path) {\n this.path = data.path;\n } else {\n this.path = '/';\n }\n if (Object.prototype.hasOwnProperty.call(data, 'expires')) {\n this.expires = data.expires;\n } else {\n this.expires = 365;\n }\n if (Object.prototype.hasOwnProperty.call(data, 'secure')) {\n this.secure = data.secure;\n } else {\n this.secure = true;\n }\n }\n\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n setItem(key, value) {\n Cookies.set(key, value, {\n path: this.path,\n expires: this.expires,\n domain: this.domain,\n secure: this.secure,\n }\n );\n return Cookies.get(key);\n }\n\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n getItem(key) {\n return Cookies.get(key);\n }\n\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n removeItem(key) {\n return Cookies.remove(key, {\n path: this.path,\n domain: this.domain,\n secure: this.secure,\n }\n );\n }\n\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n clear() {\n const cookies = Cookies.get();\n let index;\n for (index = 0; index < cookies.length; ++index) {\n Cookies.remove(cookies[index]);\n }\n return {};\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CookieStorage.js","// class for defining the amzn user-agent\nexport default UserAgent;\n// constructor\nfunction UserAgent() {}\n// public\nUserAgent.prototype.userAgent = 'aws-amplify/0.1.x js';\n\n\n// WEBPACK FOOTER //\n// ./src/UserAgent.js","/*\r\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\r\n * Digest Algorithm, as defined in RFC 1321.\r\n * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.\r\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\r\n * Distributed under the BSD License\r\n * See http://pajhome.org.uk/crypt/md5 for more info.\r\n */\r\n\r\nvar helpers = require('./helpers');\r\n\r\n/*\r\n * Perform a simple self-test to see if the VM is working\r\n */\r\nfunction md5_vm_test()\r\n{\r\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n}\r\n\r\n/*\r\n * Calculate the MD5 of an array of little-endian words, and a bit length\r\n */\r\nfunction core_md5(x, len)\r\n{\r\n /* append padding */\r\n x[len >> 5] |= 0x80 << ((len) % 32);\r\n x[(((len + 64) >>> 9) << 4) + 14] = len;\r\n\r\n var a = 1732584193;\r\n var b = -271733879;\r\n var c = -1732584194;\r\n var d = 271733878;\r\n\r\n for(var i = 0; i < x.length; i += 16)\r\n {\r\n var olda = a;\r\n var oldb = b;\r\n var oldc = c;\r\n var oldd = d;\r\n\r\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\r\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\r\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\r\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\r\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\r\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\r\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\r\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\r\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\r\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\r\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\r\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\r\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\r\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\r\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\r\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\r\n\r\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\r\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\r\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\r\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\r\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\r\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\r\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\r\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\r\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\r\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\r\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\r\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\r\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\r\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\r\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\r\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\r\n\r\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\r\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\r\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\r\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\r\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\r\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\r\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\r\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\r\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\r\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\r\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\r\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\r\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\r\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\r\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\r\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\r\n\r\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\r\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\r\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\r\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\r\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\r\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\r\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\r\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\r\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\r\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\r\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\r\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\r\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\r\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\r\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\r\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\r\n\r\n a = safe_add(a, olda);\r\n b = safe_add(b, oldb);\r\n c = safe_add(c, oldc);\r\n d = safe_add(d, oldd);\r\n }\r\n return Array(a, b, c, d);\r\n\r\n}\r\n\r\n/*\r\n * These functions implement the four basic operations the algorithm uses.\r\n */\r\nfunction md5_cmn(q, a, b, x, s, t)\r\n{\r\n return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);\r\n}\r\nfunction md5_ff(a, b, c, d, x, s, t)\r\n{\r\n return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);\r\n}\r\nfunction md5_gg(a, b, c, d, x, s, t)\r\n{\r\n return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);\r\n}\r\nfunction md5_hh(a, b, c, d, x, s, t)\r\n{\r\n return md5_cmn(b ^ c ^ d, a, b, x, s, t);\r\n}\r\nfunction md5_ii(a, b, c, d, x, s, t)\r\n{\r\n return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);\r\n}\r\n\r\n/*\r\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\r\n * to work around bugs in some JS interpreters.\r\n */\r\nfunction safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}\r\n\r\n/*\r\n * Bitwise rotate a 32-bit number to the left.\r\n */\r\nfunction bit_rol(num, cnt)\r\n{\r\n return (num << cnt) | (num >>> (32 - cnt));\r\n}\r\n\r\nmodule.exports = function md5(buf) {\r\n return helpers.hash(buf, core_md5, 16);\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/md5.js\n// module id = 24\n// module chunks = 0","// Original code adapted from Robert Kieffer.\n// details at https://github.com/broofa/node-uuid\n(function() {\n var _global = this;\n\n var mathRNG, whatwgRNG;\n\n // NOTE: Math.random() does not guarantee \"cryptographic quality\"\n mathRNG = function(size) {\n var bytes = new Array(size);\n var r;\n\n for (var i = 0, r; i < size; i++) {\n if ((i & 0x03) == 0) r = Math.random() * 0x100000000;\n bytes[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return bytes;\n }\n\n if (_global.crypto && crypto.getRandomValues) {\n whatwgRNG = function(size) {\n var bytes = new Uint8Array(size);\n crypto.getRandomValues(bytes);\n return bytes;\n }\n }\n\n module.exports = whatwgRNG || mathRNG;\n\n}())\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/rng.js\n// module id = 25\n// module chunks = 0","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar helpers = require('./helpers');\n\n/*\n * Calculate the SHA-1 of an array of big-endian words, and a bit length\n */\nfunction core_sha1(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << (24 - len % 32);\n x[((len + 64 >> 9) << 4) + 15] = len;\n\n var w = Array(80);\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n var e = -1009589776;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n var olde = e;\n\n for(var j = 0; j < 80; j++)\n {\n if(j < 16) w[j] = x[i + j];\n else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);\n var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)),\n safe_add(safe_add(e, w[j]), sha1_kt(j)));\n e = d;\n d = c;\n c = rol(b, 30);\n b = a;\n a = t;\n }\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n e = safe_add(e, olde);\n }\n return Array(a, b, c, d, e);\n\n}\n\n/*\n * Perform the appropriate triplet combination function for the current\n * iteration\n */\nfunction sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}\n\n/*\n * Determine the appropriate additive constant for the current iteration\n */\nfunction sha1_kt(t)\n{\n return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :\n (t < 60) ? -1894007588 : -899497514;\n}\n\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\nfunction safe_add(x, y)\n{\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n}\n\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\nfunction rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}\n\nmodule.exports = function sha1(buf) {\n return helpers.hash(buf, core_sha1, 20, true);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/sha.js\n// module id = 26\n// module chunks = 0","\n/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar helpers = require('./helpers');\n\nvar safe_add = function(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n};\n\nvar S = function(X, n) {\n return (X >>> n) | (X << (32 - n));\n};\n\nvar R = function(X, n) {\n return (X >>> n);\n};\n\nvar Ch = function(x, y, z) {\n return ((x & y) ^ ((~x) & z));\n};\n\nvar Maj = function(x, y, z) {\n return ((x & y) ^ (x & z) ^ (y & z));\n};\n\nvar Sigma0256 = function(x) {\n return (S(x, 2) ^ S(x, 13) ^ S(x, 22));\n};\n\nvar Sigma1256 = function(x) {\n return (S(x, 6) ^ S(x, 11) ^ S(x, 25));\n};\n\nvar Gamma0256 = function(x) {\n return (S(x, 7) ^ S(x, 18) ^ R(x, 3));\n};\n\nvar Gamma1256 = function(x) {\n return (S(x, 17) ^ S(x, 19) ^ R(x, 10));\n};\n\nvar core_sha256 = function(m, l) {\n var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2);\n var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19);\n var W = new Array(64);\n var a, b, c, d, e, f, g, h, i, j;\n var T1, T2;\n /* append padding */\n m[l >> 5] |= 0x80 << (24 - l % 32);\n m[((l + 64 >> 9) << 4) + 15] = l;\n for (var i = 0; i < m.length; i += 16) {\n a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7];\n for (var j = 0; j < 64; j++) {\n if (j < 16) {\n W[j] = m[j + i];\n } else {\n W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]);\n }\n T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]);\n T2 = safe_add(Sigma0256(a), Maj(a, b, c));\n h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2);\n }\n HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]);\n HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]);\n }\n return HASH;\n};\n\nmodule.exports = function sha256(buf) {\n return helpers.hash(buf, core_sha256, 32, true);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/sha256.js\n// module id = 27\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///amazon-cognito-identity.min.js","webpack:///webpack/bootstrap f34347463e4243527c48","webpack:///./src/index.js","webpack:///./~/buffer/index.js","webpack:///./~/crypto-browserify/helpers.js","webpack:///./src/AuthenticationHelper.js","webpack:///./src/BigInteger.js","webpack:///./src/CognitoAccessToken.js","webpack:///./src/CognitoIdToken.js","webpack:///./src/CognitoJwtToken.js","webpack:///./src/CognitoRefreshToken.js","webpack:///./src/CognitoUser.js","webpack:///./src/CognitoUserAttribute.js","webpack:///./src/CognitoUserSession.js","webpack:///./src/DateHelper.js","webpack:///./src/StorageHelper.js","webpack:///./~/crypto-browserify/index.js","webpack:///./src/AuthenticationDetails.js","webpack:///./src/Client.js","webpack:///./src/CognitoUserPool.js","webpack:///./src/CookieStorage.js","webpack:///./src/UserAgent.js","webpack:///./~/base64-js/index.js","webpack:///./~/crypto-browserify/md5.js","webpack:///./~/crypto-browserify/rng.js","webpack:///./~/crypto-browserify/sha.js","webpack:///./~/crypto-browserify/sha256.js","webpack:///./~/ieee754/index.js","webpack:///./~/isarray/index.js","webpack:///./~/js-cookie/src/js.cookie.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","_AuthenticationDetails","Object","defineProperty","enumerable","get","_AuthenticationHelper","_CognitoAccessToken","_CognitoIdToken","_CognitoRefreshToken","_CognitoUser","_CognitoUserAttribute","_CognitoUserPool","_CognitoUserSession","_CookieStorage","_DateHelper","global","typedArraySupport","arr","Uint8Array","__proto__","prototype","foo","subarray","byteLength","e","kMaxLength","Buffer","TYPED_ARRAY_SUPPORT","createBuffer","that","length","RangeError","arg","encodingOrOffset","Error","allocUnsafe","from","value","TypeError","ArrayBuffer","fromArrayBuffer","fromString","fromObject","assertSize","size","alloc","fill","encoding","undefined","checked","i","string","isEncoding","actual","write","slice","fromArrayLike","array","byteOffset","isBuffer","len","copy","buffer","isnan","type","isArray","data","toString","SlowBuffer","isView","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","start","end","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","b","n","bidirectionalIndexOf","val","dir","isNaN","arrayIndexOf","indexOf","lastIndexOf","read","buf","indexSize","readUInt16BE","arrLength","valLength","String","foundIndex","found","j","hexWrite","offset","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","asciiToBytes","latin1Write","base64Write","ucs2Write","utf16leToBytes","base64","fromByteArray","Math","min","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","push","decodeCodePointsArray","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","apply","ret","out","toHex","bytes","checkOffset","ext","checkInt","max","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754","writeDouble","base64clean","str","stringtrim","replace","INVALID_BASE64_RE","trim","units","Infinity","leadSurrogate","charCodeAt","byteArray","hi","lo","toByteArray","src","dst","INSPECT_MAX_BYTES","poolSize","_augment","Symbol","species","configurable","allocUnsafeSlow","_isBuffer","compare","a","x","y","concat","list","pos","swap16","swap32","swap64","arguments","equals","inspect","match","join","target","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","Array","_arr","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","maxBytes","writeUIntBE","writeUInt8","floor","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","set","code","toArray","bigEndian","intSize","zeroBuffer","fn","toBuffer","hash","hashSize","chrsz","_interopRequireWildcard","newObj","key","hasOwnProperty","_classCallCheck","instance","Constructor","_buffer","_cryptoBrowserify","crypto","_BigInteger","_BigInteger2","createHash","createHmac","randomBytes","initN","newPasswordRequiredChallengeUserAttributePrefix","AuthenticationHelper","PoolName","N","g","k","hexHash","smallAValue","generateRandomSmallA","getLargeAValue","infoBits","poolName","getSmallAValue","callback","_this","largeAValue","calculateA","err","hexRandom","randomBigInt","smallABigInt","mod","generateRandomString","getRandomPassword","randomPassword","getSaltDevices","SaltToHashDevices","getVerifierDevices","verifierDevices","generateHashDevice","deviceGroupKey","username","_this2","combinedString","hashedString","padHex","modPow","verifierDevicesNotPadded","_this3","A","ZERO","calculateU","B","UHexHash","finalU","hashHex","update","digest","hexStr","computehkdf","ikm","salt","prk","infoBitsUpdate","hmac","getPasswordAuthenticationKey","password","serverBValue","_this4","UValue","usernamePassword","usernamePasswordHash","xValue","calculateS","sValue","hkdf","_this5","gModPowXN","intValue2","subtract","multiply","add","err2","result","getNewPasswordRequiredChallengeUserAttributePrefix","bigInt","hashStr","BigInteger","nbi","am1","w","v","am2","xl","xh","l","h","am3","int2char","BI_RM","charAt","intAt","s","BI_RC","bnpCopyTo","r","t","bnpFromInt","DV","nbv","fromInt","bnpFromString","mi","sh","DB","clamp","subTo","bnpClamp","DM","bnToString","negate","d","km","bnNegate","bnAbs","bnCompareTo","nbits","bnBitLength","bnpDLShiftTo","bnpDRShiftTo","bnpLShiftTo","bs","cbs","bm","ds","bnpRShiftTo","bnpSubTo","bnpMultiplyTo","abs","am","bnpSquareTo","bnpDivRemTo","q","pm","pt","copyTo","ts","ms","nsh","lShiftTo","ys","y0","yt","F1","F2","d1","FV","d2","dlShiftTo","compareTo","ONE","qd","drShiftTo","rShiftTo","bnMod","divRemTo","bnpInvDigit","bnEquals","bnpAddTo","bnAdd","addTo","bnSubtract","bnMultiply","multiplyTo","bnDivide","Montgomery","mp","invDigit","mpl","mph","um","mt2","montConvert","montRevert","reduce","montReduce","u0","montSqrTo","squareTo","montMulTo","bnModPow","bitLength","z","k1","convert","g2","sqrTo","mulTo","is1","r2","revert","dbits","canary","j_lm","inBrowser","navigator","appName","BI_FP","rr","vv","divide","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","create","constructor","writable","setPrototypeOf","_CognitoJwtToken2","_CognitoJwtToken3","CognitoAccessToken","_CognitoJwtToken","_ref","AccessToken","CognitoIdToken","IdToken","CognitoJwtToken","token","jwtToken","payload","decodePayload","getJwtToken","getExpiration","exp","getIssuedAt","iat","split","JSON","parse","CognitoRefreshToken","RefreshToken","getToken","_AuthenticationHelper2","_CognitoAccessToken2","_CognitoIdToken2","_CognitoRefreshToken2","_CognitoUserSession2","_DateHelper2","_CognitoUserAttribute2","_StorageHelper","_StorageHelper2","CognitoUser","Username","Pool","pool","Session","client","signInUserSession","authenticationFlowType","storage","Storage","getStorage","setSignInUserSession","clearCachedTokens","cacheTokens","getSignInUserSession","getUsername","getAuthenticationFlowType","setAuthenticationFlowType","initiateAuth","authDetails","authParameters","getAuthParameters","USERNAME","jsonReq","AuthFlow","ClientId","getClientId","AuthParameters","ClientMetadata","getValidationData","getUserContextData","UserContextData","request","onFailure","challengeName","ChallengeName","challengeParameters","ChallengeParameters","customChallenge","getCognitoUserSession","AuthenticationResult","onSuccess","authenticateUser","authenticateUserPlainUsernamePassword","authenticateUserDefaultAuth","authenticationHelper","getUserPoolId","dateHelper","deviceKey","DEVICE_KEY","errOnAValue","aValue","SRP_A","CHALLENGE_NAME","USER_ID_FOR_SRP","SRP_B","SALT","getCachedDeviceKeyAndPassword","getPassword","errOnHkdf","dateNow","getNowString","signatureString","SECRET_BLOCK","challengeResponses","PASSWORD_CLAIM_SECRET_BLOCK","TIMESTAMP","PASSWORD_CLAIM_SIGNATURE","respondToAuthChallenge","challenge","challengeCallback","errChallenge","dataChallenge","message","clearCachedDeviceKeyAndPassword","jsonReqResp","ChallengeResponses","errAuthenticate","dataAuthenticate","userAttributes","rawRequiredAttributes","requiredAttributes","userAttributesPrefix","newPasswordRequired","authenticateUserInternal","PASSWORD","authResult","mfaRequired","selectMFAType","mfaSetup","totpRequired","getDeviceResponse","newDeviceMetadata","NewDeviceMetadata","DeviceGroupKey","DeviceKey","errGenHash","deviceSecretVerifierConfig","Salt","PasswordVerifier","getAccessToken","DeviceSecretVerifierConfig","DeviceName","userAgent","errConfirm","dataConfirm","cacheDeviceKeyAndPassword","UserConfirmationNecessary","completeNewPasswordChallenge","newPassword","requiredAttributeData","finalUserAttributes","keys","forEach","NEW_PASSWORD","_this6","errAValue","errHkdf","confirmRegistration","confirmationCode","forceAliasCreation","ConfirmationCode","ForceAliasCreation","sendCustomChallengeAnswer","answerChallenge","_this7","ANSWER","sendMFACode","mfaType","_this8","SMS_MFA_CODE","mfaTypeSelection","SOFTWARE_TOKEN_MFA_CODE","changePassword","oldUserPassword","newUserPassword","isValid","PreviousPassword","ProposedPassword","enableMFA","mfaOptions","mfaEnabled","DeliveryMedium","AttributeName","MFAOptions","setUserMfaPreference","smsMfaSettings","softwareTokenMfaSettings","SMSMfaSettings","SoftwareTokenMfaSettings","disableMFA","deleteUser","_this9","updateAttributes","attributes","UserAttributes","getUserAttributes","userData","attributeList","attribute","Name","Value","userAttribute","getMFAOptions","getUserData","deleteAttributes","UserAttributeNames","resendConfirmationCode","getSession","keyPrefix","idTokenKey","accessTokenKey","refreshTokenKey","clockDriftKey","getItem","idToken","accessToken","refreshToken","clockDrift","sessionData","ClockDrift","cachedSession","refreshSession","_this10","REFRESH_TOKEN","lastUserKey","deviceKeyKey","authenticationResult","setItem","getIdToken","getRefreshToken","getClockDrift","randomPasswordKey","deviceGroupKeyKey","removeItem","forgotPassword","inputVerificationCode","confirmPassword","Password","getAttributeVerificationCode","attributeName","verifyAttribute","Code","getDevice","forgetSpecificDevice","forgetDevice","_this11","setDeviceStatusRemembered","DeviceRememberedStatus","setDeviceStatusNotRemembered","listDevices","paginationToken","Limit","PaginationToken","globalSignOut","_this12","signOut","sendMFASelectionAnswer","_this13","associateSoftwareToken","_this14","associateSecretCode","SecretCode","verifySoftwareToken","totpCode","friendlyDeviceName","_this15","UserCode","FriendlyDeviceName","errRespond","dataRespond","CognitoUserAttribute","getValue","setValue","getName","setName","name","stringify","CognitoUserSession","calculateClockDrift","now","Date","adjusted","monthNames","weekNames","DateHelper","weekDay","getUTCDay","month","getUTCMonth","day","getUTCDate","hours","getUTCHours","minutes","getUTCMinutes","seconds","getUTCSeconds","year","getUTCFullYear","dataMemory","MemoryStorage","clear","StorageHelper","storageWindow","window","localStorage","exception","blocksize","ipad","opad","alg","algorithms","bufs","error","enc","each","f","sha","sha256","rng","md5","sha1","AuthenticationDetails","ValidationData","validationData","_UserAgent","_UserAgent2","Client","region","endpoint","options","operation","params","headers","Content-Type","X-Amz-Target","X-Amz-User-Agent","assign","method","mode","cache","body","response","fetch","then","resp","json","catch","ok","__type","pop","Message","statusCode","status","ex","_Client","_Client2","_CognitoUser2","CognitoUserPool","UserPoolId","ProxyAgent","AdvancedSecurityDataCollectionFlag","test","userPoolId","clientId","agent","advancedSecurityDataCollectionFlag","signUp","cognitoUser","returnData","user","userConfirmed","UserConfirmed","userSub","UserSub","getCurrentUser","lastAuthUser","AmazonCognitoAdvancedSecurityData","amazonCognitoAdvancedSecurityDataConst","advancedSecurityData","getData","userContextData","EncodedData","_jsCookie","Cookies","CookieStorage","domain","path","expires","secure","remove","cookies","index","UserAgent","getLens","b64","validLen","placeHoldersLen","lens","_byteLength","tmp","Arr","curByte","revLookup","tripletToBase64","num","lookup","encodeChunk","uint8","output","extraBytes","parts","maxChunkLength","len2","core_md5","olda","oldb","oldc","oldd","md5_ff","md5_gg","md5_hh","md5_ii","safe_add","md5_cmn","bit_rol","lsw","msw","cnt","helpers","mathRNG","whatwgRNG","_global","random","getRandomValues","core_sha1","olde","rol","sha1_ft","sha1_kt","S","X","R","Ch","Maj","Sigma0256","Sigma1256","Gamma0256","Gamma1256","core_sha256","T1","T2","K","HASH","W","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","rt","log","LN2","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_RESULT__","registeredInModuleLoader","OldCookies","api","noConflict","extend","init","converter","document","defaults","setMilliseconds","getMilliseconds","toUTCString","encodeURIComponent","decodeURIComponent","escape","stringifiedAttributes","cookie","rdecode","getJSON","withConverter"],"mappings":";;;;;;;;;;;;;;;;CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,sBAAAD,IAEAD,EAAA,sBAAAC,KACCK,KAAA,WACD,MCkBgB,UAAUC,GCxB1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD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A3c,KAAAC,MAAA0c,GACO,MAAA16B,IAGP,GAAA2O,IAAA8e,EAAA,CACAvZ,EAAAwmB,CACA,OAGA/rB,IACAuF,EAAAuZ,GAAAiN,GAEK,MAAA16B,KAGL,MAAAkU,IAsBA,MAnBA0lB,GAAA9rB,IAAA8rB,EACAA,EAAAh7B,IAAA,SAAA+P,GACA,MAAAirB,GAAA57B,KAAA47B,EAAAjrB,IAEAirB,EAAAgB,QAAA,WACA,MAAAhB,GAAA5yB,OACAgrB,MAAA,MACIjwB,MAAA/D,KAAAmM,aAEJyvB,EAAAM,YAEAN,EAAAhF,OAAA,SAAAjmB,EAAA4Z,GACAqR,EAAAjrB,EAAA,GAAAmrB,EAAAvR,GACAmM,SAAA,MAIAkF,EAAAiB,cAAAd,EAEAH,EAGA,MAAAG,GAAA","file":"amazon-cognito-identity.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"AmazonCognitoIdentity\"] = factory();\n\telse\n\t\troot[\"AmazonCognitoIdentity\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n * \n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n * \n * http://aws.amazon.com/asl/\n * \n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License. \n */\n\n\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"AmazonCognitoIdentity\"] = factory();\n\telse\n\t\troot[\"AmazonCognitoIdentity\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _AuthenticationDetails = __webpack_require__(15);\n\t\n\tObject.defineProperty(exports, 'AuthenticationDetails', {\n\t enumerable: true,\n\t get: function get() {\n\t return _interopRequireDefault(_AuthenticationDetails).default;\n\t }\n\t});\n\t\n\tvar _AuthenticationHelper = __webpack_require__(3);\n\t\n\tObject.defineProperty(exports, 'AuthenticationHelper', {\n\t enumerable: true,\n\t get: function get() {\n\t return _interopRequireDefault(_AuthenticationHelper).default;\n\t }\n\t});\n\t\n\tvar _CognitoAccessToken = __webpack_require__(5);\n\t\n\tObject.defineProperty(exports, 'CognitoAccessToken', {\n\t enumerable: true,\n\t get: function get() {\n\t return _interopRequireDefault(_CognitoAccessToken).default;\n\t }\n\t});\n\t\n\tvar _CognitoIdToken = __webpack_require__(6);\n\t\n\tObject.defineProperty(exports, 'CognitoIdToken', {\n\t enumerable: true,\n\t get: function get() {\n\t return _interopRequireDefault(_CognitoIdToken).default;\n\t }\n\t});\n\t\n\tvar _CognitoRefreshToken = __webpack_require__(8);\n\t\n\tObject.defineProperty(exports, 'CognitoRefreshToken', {\n\t enumerable: true,\n\t get: function get() {\n\t return _interopRequireDefault(_CognitoRefreshToken).default;\n\t }\n\t});\n\t\n\tvar _CognitoUser = __webpack_require__(9);\n\t\n\tObject.defineProperty(exports, 'CognitoUser', {\n\t enumerable: true,\n\t get: function get() {\n\t return _interopRequireDefault(_CognitoUser).default;\n\t }\n\t});\n\t\n\tvar _CognitoUserAttribute = __webpack_require__(10);\n\t\n\tObject.defineProperty(exports, 'CognitoUserAttribute', {\n\t enumerable: true,\n\t get: function get() {\n\t return _interopRequireDefault(_CognitoUserAttribute).default;\n\t }\n\t});\n\t\n\tvar _CognitoUserPool = __webpack_require__(17);\n\t\n\tObject.defineProperty(exports, 'CognitoUserPool', {\n\t enumerable: true,\n\t get: function get() {\n\t return _interopRequireDefault(_CognitoUserPool).default;\n\t }\n\t});\n\t\n\tvar _CognitoUserSession = __webpack_require__(11);\n\t\n\tObject.defineProperty(exports, 'CognitoUserSession', {\n\t enumerable: true,\n\t get: function get() {\n\t return _interopRequireDefault(_CognitoUserSession).default;\n\t }\n\t});\n\t\n\tvar _CookieStorage = __webpack_require__(18);\n\t\n\tObject.defineProperty(exports, 'CookieStorage', {\n\t enumerable: true,\n\t get: function get() {\n\t return _interopRequireDefault(_CookieStorage).default;\n\t }\n\t});\n\t\n\tvar _DateHelper = __webpack_require__(12);\n\t\n\tObject.defineProperty(exports, 'DateHelper', {\n\t enumerable: true,\n\t get: function get() {\n\t return _interopRequireDefault(_DateHelper).default;\n\t }\n\t});\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/*!\n\t * The buffer module from node.js, for the browser.\n\t *\n\t * @author Feross Aboukhadijeh \n\t * @license MIT\n\t */\n\t/* eslint-disable no-proto */\n\t\n\t'use strict'\n\t\n\tvar base64 = __webpack_require__(20)\n\tvar ieee754 = __webpack_require__(25)\n\tvar isArray = __webpack_require__(26)\n\t\n\texports.Buffer = Buffer\n\texports.SlowBuffer = SlowBuffer\n\texports.INSPECT_MAX_BYTES = 50\n\t\n\t/**\n\t * If `Buffer.TYPED_ARRAY_SUPPORT`:\n\t * === true Use Uint8Array implementation (fastest)\n\t * === false Use Object implementation (most compatible, even IE6)\n\t *\n\t * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n\t * Opera 11.6+, iOS 4.2+.\n\t *\n\t * Due to various browser bugs, sometimes the Object implementation will be used even\n\t * when the browser supports typed arrays.\n\t *\n\t * Note:\n\t *\n\t * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n\t * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n\t *\n\t * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n\t *\n\t * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n\t * incorrect length in some situations.\n\t\n\t * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n\t * get the Object implementation, which is slower but behaves correctly.\n\t */\n\tBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n\t ? global.TYPED_ARRAY_SUPPORT\n\t : typedArraySupport()\n\t\n\t/*\n\t * Export kMaxLength after typed array support is determined.\n\t */\n\texports.kMaxLength = kMaxLength()\n\t\n\tfunction typedArraySupport () {\n\t try {\n\t var arr = new Uint8Array(1)\n\t arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n\t return arr.foo() === 42 && // typed array instances can be augmented\n\t typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n\t arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n\t } catch (e) {\n\t return false\n\t }\n\t}\n\t\n\tfunction kMaxLength () {\n\t return Buffer.TYPED_ARRAY_SUPPORT\n\t ? 0x7fffffff\n\t : 0x3fffffff\n\t}\n\t\n\tfunction createBuffer (that, length) {\n\t if (kMaxLength() < length) {\n\t throw new RangeError('Invalid typed array length')\n\t }\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t // Return an augmented `Uint8Array` instance, for best performance\n\t that = new Uint8Array(length)\n\t that.__proto__ = Buffer.prototype\n\t } else {\n\t // Fallback: Return an object instance of the Buffer class\n\t if (that === null) {\n\t that = new Buffer(length)\n\t }\n\t that.length = length\n\t }\n\t\n\t return that\n\t}\n\t\n\t/**\n\t * The Buffer constructor returns instances of `Uint8Array` that have their\n\t * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n\t * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n\t * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n\t * returns a single octet.\n\t *\n\t * The `Uint8Array` prototype remains unmodified.\n\t */\n\t\n\tfunction Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}\n\t\n\tBuffer.poolSize = 8192 // not used by this implementation\n\t\n\t// TODO: Legacy, not needed anymore. Remove in next major version.\n\tBuffer._augment = function (arr) {\n\t arr.__proto__ = Buffer.prototype\n\t return arr\n\t}\n\t\n\tfunction from (that, value, encodingOrOffset, length) {\n\t if (typeof value === 'number') {\n\t throw new TypeError('\"value\" argument must not be a number')\n\t }\n\t\n\t if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n\t return fromArrayBuffer(that, value, encodingOrOffset, length)\n\t }\n\t\n\t if (typeof value === 'string') {\n\t return fromString(that, value, encodingOrOffset)\n\t }\n\t\n\t return fromObject(that, value)\n\t}\n\t\n\t/**\n\t * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n\t * if value is a number.\n\t * Buffer.from(str[, encoding])\n\t * Buffer.from(array)\n\t * Buffer.from(buffer)\n\t * Buffer.from(arrayBuffer[, byteOffset[, length]])\n\t **/\n\tBuffer.from = function (value, encodingOrOffset, length) {\n\t return from(null, value, encodingOrOffset, length)\n\t}\n\t\n\tif (Buffer.TYPED_ARRAY_SUPPORT) {\n\t Buffer.prototype.__proto__ = Uint8Array.prototype\n\t Buffer.__proto__ = Uint8Array\n\t if (typeof Symbol !== 'undefined' && Symbol.species &&\n\t Buffer[Symbol.species] === Buffer) {\n\t // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n\t Object.defineProperty(Buffer, Symbol.species, {\n\t value: null,\n\t configurable: true\n\t })\n\t }\n\t}\n\t\n\tfunction assertSize (size) {\n\t if (typeof size !== 'number') {\n\t throw new TypeError('\"size\" argument must be a number')\n\t } else if (size < 0) {\n\t throw new RangeError('\"size\" argument must not be negative')\n\t }\n\t}\n\t\n\tfunction alloc (that, size, fill, encoding) {\n\t assertSize(size)\n\t if (size <= 0) {\n\t return createBuffer(that, size)\n\t }\n\t if (fill !== undefined) {\n\t // Only pay attention to encoding if it's a string. This\n\t // prevents accidentally sending in a number that would\n\t // be interpretted as a start offset.\n\t return typeof encoding === 'string'\n\t ? createBuffer(that, size).fill(fill, encoding)\n\t : createBuffer(that, size).fill(fill)\n\t }\n\t return createBuffer(that, size)\n\t}\n\t\n\t/**\n\t * Creates a new filled Buffer instance.\n\t * alloc(size[, fill[, encoding]])\n\t **/\n\tBuffer.alloc = function (size, fill, encoding) {\n\t return alloc(null, size, fill, encoding)\n\t}\n\t\n\tfunction allocUnsafe (that, size) {\n\t assertSize(size)\n\t that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t for (var i = 0; i < size; ++i) {\n\t that[i] = 0\n\t }\n\t }\n\t return that\n\t}\n\t\n\t/**\n\t * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n\t * */\n\tBuffer.allocUnsafe = function (size) {\n\t return allocUnsafe(null, size)\n\t}\n\t/**\n\t * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n\t */\n\tBuffer.allocUnsafeSlow = function (size) {\n\t return allocUnsafe(null, size)\n\t}\n\t\n\tfunction fromString (that, string, encoding) {\n\t if (typeof encoding !== 'string' || encoding === '') {\n\t encoding = 'utf8'\n\t }\n\t\n\t if (!Buffer.isEncoding(encoding)) {\n\t throw new TypeError('\"encoding\" must be a valid string encoding')\n\t }\n\t\n\t var length = byteLength(string, encoding) | 0\n\t that = createBuffer(that, length)\n\t\n\t var actual = that.write(string, encoding)\n\t\n\t if (actual !== length) {\n\t // Writing a hex string, for example, that contains invalid characters will\n\t // cause everything after the first invalid character to be ignored. (e.g.\n\t // 'abxxcd' will be treated as 'ab')\n\t that = that.slice(0, actual)\n\t }\n\t\n\t return that\n\t}\n\t\n\tfunction fromArrayLike (that, array) {\n\t var length = array.length < 0 ? 0 : checked(array.length) | 0\n\t that = createBuffer(that, length)\n\t for (var i = 0; i < length; i += 1) {\n\t that[i] = array[i] & 255\n\t }\n\t return that\n\t}\n\t\n\tfunction fromArrayBuffer (that, array, byteOffset, length) {\n\t array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\t\n\t if (byteOffset < 0 || array.byteLength < byteOffset) {\n\t throw new RangeError('\\'offset\\' is out of bounds')\n\t }\n\t\n\t if (array.byteLength < byteOffset + (length || 0)) {\n\t throw new RangeError('\\'length\\' is out of bounds')\n\t }\n\t\n\t if (byteOffset === undefined && length === undefined) {\n\t array = new Uint8Array(array)\n\t } else if (length === undefined) {\n\t array = new Uint8Array(array, byteOffset)\n\t } else {\n\t array = new Uint8Array(array, byteOffset, length)\n\t }\n\t\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t // Return an augmented `Uint8Array` instance, for best performance\n\t that = array\n\t that.__proto__ = Buffer.prototype\n\t } else {\n\t // Fallback: Return an object instance of the Buffer class\n\t that = fromArrayLike(that, array)\n\t }\n\t return that\n\t}\n\t\n\tfunction fromObject (that, obj) {\n\t if (Buffer.isBuffer(obj)) {\n\t var len = checked(obj.length) | 0\n\t that = createBuffer(that, len)\n\t\n\t if (that.length === 0) {\n\t return that\n\t }\n\t\n\t obj.copy(that, 0, 0, len)\n\t return that\n\t }\n\t\n\t if (obj) {\n\t if ((typeof ArrayBuffer !== 'undefined' &&\n\t obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n\t if (typeof obj.length !== 'number' || isnan(obj.length)) {\n\t return createBuffer(that, 0)\n\t }\n\t return fromArrayLike(that, obj)\n\t }\n\t\n\t if (obj.type === 'Buffer' && isArray(obj.data)) {\n\t return fromArrayLike(that, obj.data)\n\t }\n\t }\n\t\n\t throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n\t}\n\t\n\tfunction checked (length) {\n\t // Note: cannot use `length < kMaxLength()` here because that fails when\n\t // length is NaN (which is otherwise coerced to zero.)\n\t if (length >= kMaxLength()) {\n\t throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n\t 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n\t }\n\t return length | 0\n\t}\n\t\n\tfunction SlowBuffer (length) {\n\t if (+length != length) { // eslint-disable-line eqeqeq\n\t length = 0\n\t }\n\t return Buffer.alloc(+length)\n\t}\n\t\n\tBuffer.isBuffer = function isBuffer (b) {\n\t return !!(b != null && b._isBuffer)\n\t}\n\t\n\tBuffer.compare = function compare (a, b) {\n\t if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n\t throw new TypeError('Arguments must be Buffers')\n\t }\n\t\n\t if (a === b) return 0\n\t\n\t var x = a.length\n\t var y = b.length\n\t\n\t for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n\t if (a[i] !== b[i]) {\n\t x = a[i]\n\t y = b[i]\n\t break\n\t }\n\t }\n\t\n\t if (x < y) return -1\n\t if (y < x) return 1\n\t return 0\n\t}\n\t\n\tBuffer.isEncoding = function isEncoding (encoding) {\n\t switch (String(encoding).toLowerCase()) {\n\t case 'hex':\n\t case 'utf8':\n\t case 'utf-8':\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t case 'base64':\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return true\n\t default:\n\t return false\n\t }\n\t}\n\t\n\tBuffer.concat = function concat (list, length) {\n\t if (!isArray(list)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers')\n\t }\n\t\n\t if (list.length === 0) {\n\t return Buffer.alloc(0)\n\t }\n\t\n\t var i\n\t if (length === undefined) {\n\t length = 0\n\t for (i = 0; i < list.length; ++i) {\n\t length += list[i].length\n\t }\n\t }\n\t\n\t var buffer = Buffer.allocUnsafe(length)\n\t var pos = 0\n\t for (i = 0; i < list.length; ++i) {\n\t var buf = list[i]\n\t if (!Buffer.isBuffer(buf)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers')\n\t }\n\t buf.copy(buffer, pos)\n\t pos += buf.length\n\t }\n\t return buffer\n\t}\n\t\n\tfunction byteLength (string, encoding) {\n\t if (Buffer.isBuffer(string)) {\n\t return string.length\n\t }\n\t if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n\t (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n\t return string.byteLength\n\t }\n\t if (typeof string !== 'string') {\n\t string = '' + string\n\t }\n\t\n\t var len = string.length\n\t if (len === 0) return 0\n\t\n\t // Use a for loop to avoid recursion\n\t var loweredCase = false\n\t for (;;) {\n\t switch (encoding) {\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t return len\n\t case 'utf8':\n\t case 'utf-8':\n\t case undefined:\n\t return utf8ToBytes(string).length\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return len * 2\n\t case 'hex':\n\t return len >>> 1\n\t case 'base64':\n\t return base64ToBytes(string).length\n\t default:\n\t if (loweredCase) return utf8ToBytes(string).length // assume utf8\n\t encoding = ('' + encoding).toLowerCase()\n\t loweredCase = true\n\t }\n\t }\n\t}\n\tBuffer.byteLength = byteLength\n\t\n\tfunction slowToString (encoding, start, end) {\n\t var loweredCase = false\n\t\n\t // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n\t // property of a typed array.\n\t\n\t // This behaves neither like String nor Uint8Array in that we set start/end\n\t // to their upper/lower bounds if the value passed is out of range.\n\t // undefined is handled specially as per ECMA-262 6th Edition,\n\t // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n\t if (start === undefined || start < 0) {\n\t start = 0\n\t }\n\t // Return early if start > this.length. Done here to prevent potential uint32\n\t // coercion fail below.\n\t if (start > this.length) {\n\t return ''\n\t }\n\t\n\t if (end === undefined || end > this.length) {\n\t end = this.length\n\t }\n\t\n\t if (end <= 0) {\n\t return ''\n\t }\n\t\n\t // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n\t end >>>= 0\n\t start >>>= 0\n\t\n\t if (end <= start) {\n\t return ''\n\t }\n\t\n\t if (!encoding) encoding = 'utf8'\n\t\n\t while (true) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexSlice(this, start, end)\n\t\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Slice(this, start, end)\n\t\n\t case 'ascii':\n\t return asciiSlice(this, start, end)\n\t\n\t case 'latin1':\n\t case 'binary':\n\t return latin1Slice(this, start, end)\n\t\n\t case 'base64':\n\t return base64Slice(this, start, end)\n\t\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return utf16leSlice(this, start, end)\n\t\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n\t encoding = (encoding + '').toLowerCase()\n\t loweredCase = true\n\t }\n\t }\n\t}\n\t\n\t// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n\t// Buffer instances.\n\tBuffer.prototype._isBuffer = true\n\t\n\tfunction swap (b, n, m) {\n\t var i = b[n]\n\t b[n] = b[m]\n\t b[m] = i\n\t}\n\t\n\tBuffer.prototype.swap16 = function swap16 () {\n\t var len = this.length\n\t if (len % 2 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 16-bits')\n\t }\n\t for (var i = 0; i < len; i += 2) {\n\t swap(this, i, i + 1)\n\t }\n\t return this\n\t}\n\t\n\tBuffer.prototype.swap32 = function swap32 () {\n\t var len = this.length\n\t if (len % 4 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 32-bits')\n\t }\n\t for (var i = 0; i < len; i += 4) {\n\t swap(this, i, i + 3)\n\t swap(this, i + 1, i + 2)\n\t }\n\t return this\n\t}\n\t\n\tBuffer.prototype.swap64 = function swap64 () {\n\t var len = this.length\n\t if (len % 8 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 64-bits')\n\t }\n\t for (var i = 0; i < len; i += 8) {\n\t swap(this, i, i + 7)\n\t swap(this, i + 1, i + 6)\n\t swap(this, i + 2, i + 5)\n\t swap(this, i + 3, i + 4)\n\t }\n\t return this\n\t}\n\t\n\tBuffer.prototype.toString = function toString () {\n\t var length = this.length | 0\n\t if (length === 0) return ''\n\t if (arguments.length === 0) return utf8Slice(this, 0, length)\n\t return slowToString.apply(this, arguments)\n\t}\n\t\n\tBuffer.prototype.equals = function equals (b) {\n\t if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n\t if (this === b) return true\n\t return Buffer.compare(this, b) === 0\n\t}\n\t\n\tBuffer.prototype.inspect = function inspect () {\n\t var str = ''\n\t var max = exports.INSPECT_MAX_BYTES\n\t if (this.length > 0) {\n\t str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n\t if (this.length > max) str += ' ... '\n\t }\n\t return ''\n\t}\n\t\n\tBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n\t if (!Buffer.isBuffer(target)) {\n\t throw new TypeError('Argument must be a Buffer')\n\t }\n\t\n\t if (start === undefined) {\n\t start = 0\n\t }\n\t if (end === undefined) {\n\t end = target ? target.length : 0\n\t }\n\t if (thisStart === undefined) {\n\t thisStart = 0\n\t }\n\t if (thisEnd === undefined) {\n\t thisEnd = this.length\n\t }\n\t\n\t if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n\t throw new RangeError('out of range index')\n\t }\n\t\n\t if (thisStart >= thisEnd && start >= end) {\n\t return 0\n\t }\n\t if (thisStart >= thisEnd) {\n\t return -1\n\t }\n\t if (start >= end) {\n\t return 1\n\t }\n\t\n\t start >>>= 0\n\t end >>>= 0\n\t thisStart >>>= 0\n\t thisEnd >>>= 0\n\t\n\t if (this === target) return 0\n\t\n\t var x = thisEnd - thisStart\n\t var y = end - start\n\t var len = Math.min(x, y)\n\t\n\t var thisCopy = this.slice(thisStart, thisEnd)\n\t var targetCopy = target.slice(start, end)\n\t\n\t for (var i = 0; i < len; ++i) {\n\t if (thisCopy[i] !== targetCopy[i]) {\n\t x = thisCopy[i]\n\t y = targetCopy[i]\n\t break\n\t }\n\t }\n\t\n\t if (x < y) return -1\n\t if (y < x) return 1\n\t return 0\n\t}\n\t\n\t// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n\t// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n\t//\n\t// Arguments:\n\t// - buffer - a Buffer to search\n\t// - val - a string, Buffer, or number\n\t// - byteOffset - an index into `buffer`; will be clamped to an int32\n\t// - encoding - an optional encoding, relevant is val is a string\n\t// - dir - true for indexOf, false for lastIndexOf\n\tfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n\t // Empty buffer means no match\n\t if (buffer.length === 0) return -1\n\t\n\t // Normalize byteOffset\n\t if (typeof byteOffset === 'string') {\n\t encoding = byteOffset\n\t byteOffset = 0\n\t } else if (byteOffset > 0x7fffffff) {\n\t byteOffset = 0x7fffffff\n\t } else if (byteOffset < -0x80000000) {\n\t byteOffset = -0x80000000\n\t }\n\t byteOffset = +byteOffset // Coerce to Number.\n\t if (isNaN(byteOffset)) {\n\t // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n\t byteOffset = dir ? 0 : (buffer.length - 1)\n\t }\n\t\n\t // Normalize byteOffset: negative offsets start from the end of the buffer\n\t if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n\t if (byteOffset >= buffer.length) {\n\t if (dir) return -1\n\t else byteOffset = buffer.length - 1\n\t } else if (byteOffset < 0) {\n\t if (dir) byteOffset = 0\n\t else return -1\n\t }\n\t\n\t // Normalize val\n\t if (typeof val === 'string') {\n\t val = Buffer.from(val, encoding)\n\t }\n\t\n\t // Finally, search either indexOf (if dir is true) or lastIndexOf\n\t if (Buffer.isBuffer(val)) {\n\t // Special case: looking for empty string/buffer always fails\n\t if (val.length === 0) {\n\t return -1\n\t }\n\t return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n\t } else if (typeof val === 'number') {\n\t val = val & 0xFF // Search for a byte value [0-255]\n\t if (Buffer.TYPED_ARRAY_SUPPORT &&\n\t typeof Uint8Array.prototype.indexOf === 'function') {\n\t if (dir) {\n\t return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n\t } else {\n\t return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n\t }\n\t }\n\t return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n\t }\n\t\n\t throw new TypeError('val must be string, number or Buffer')\n\t}\n\t\n\tfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n\t var indexSize = 1\n\t var arrLength = arr.length\n\t var valLength = val.length\n\t\n\t if (encoding !== undefined) {\n\t encoding = String(encoding).toLowerCase()\n\t if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n\t encoding === 'utf16le' || encoding === 'utf-16le') {\n\t if (arr.length < 2 || val.length < 2) {\n\t return -1\n\t }\n\t indexSize = 2\n\t arrLength /= 2\n\t valLength /= 2\n\t byteOffset /= 2\n\t }\n\t }\n\t\n\t function read (buf, i) {\n\t if (indexSize === 1) {\n\t return buf[i]\n\t } else {\n\t return buf.readUInt16BE(i * indexSize)\n\t }\n\t }\n\t\n\t var i\n\t if (dir) {\n\t var foundIndex = -1\n\t for (i = byteOffset; i < arrLength; i++) {\n\t if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n\t if (foundIndex === -1) foundIndex = i\n\t if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n\t } else {\n\t if (foundIndex !== -1) i -= i - foundIndex\n\t foundIndex = -1\n\t }\n\t }\n\t } else {\n\t if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n\t for (i = byteOffset; i >= 0; i--) {\n\t var found = true\n\t for (var j = 0; j < valLength; j++) {\n\t if (read(arr, i + j) !== read(val, j)) {\n\t found = false\n\t break\n\t }\n\t }\n\t if (found) return i\n\t }\n\t }\n\t\n\t return -1\n\t}\n\t\n\tBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n\t return this.indexOf(val, byteOffset, encoding) !== -1\n\t}\n\t\n\tBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n\t}\n\t\n\tBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n\t}\n\t\n\tfunction hexWrite (buf, string, offset, length) {\n\t offset = Number(offset) || 0\n\t var remaining = buf.length - offset\n\t if (!length) {\n\t length = remaining\n\t } else {\n\t length = Number(length)\n\t if (length > remaining) {\n\t length = remaining\n\t }\n\t }\n\t\n\t // must be an even number of digits\n\t var strLen = string.length\n\t if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\t\n\t if (length > strLen / 2) {\n\t length = strLen / 2\n\t }\n\t for (var i = 0; i < length; ++i) {\n\t var parsed = parseInt(string.substr(i * 2, 2), 16)\n\t if (isNaN(parsed)) return i\n\t buf[offset + i] = parsed\n\t }\n\t return i\n\t}\n\t\n\tfunction utf8Write (buf, string, offset, length) {\n\t return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n\t}\n\t\n\tfunction asciiWrite (buf, string, offset, length) {\n\t return blitBuffer(asciiToBytes(string), buf, offset, length)\n\t}\n\t\n\tfunction latin1Write (buf, string, offset, length) {\n\t return asciiWrite(buf, string, offset, length)\n\t}\n\t\n\tfunction base64Write (buf, string, offset, length) {\n\t return blitBuffer(base64ToBytes(string), buf, offset, length)\n\t}\n\t\n\tfunction ucs2Write (buf, string, offset, length) {\n\t return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n\t}\n\t\n\tBuffer.prototype.write = function write (string, offset, length, encoding) {\n\t // Buffer#write(string)\n\t if (offset === undefined) {\n\t encoding = 'utf8'\n\t length = this.length\n\t offset = 0\n\t // Buffer#write(string, encoding)\n\t } else if (length === undefined && typeof offset === 'string') {\n\t encoding = offset\n\t length = this.length\n\t offset = 0\n\t // Buffer#write(string, offset[, length][, encoding])\n\t } else if (isFinite(offset)) {\n\t offset = offset | 0\n\t if (isFinite(length)) {\n\t length = length | 0\n\t if (encoding === undefined) encoding = 'utf8'\n\t } else {\n\t encoding = length\n\t length = undefined\n\t }\n\t // legacy write(string, encoding, offset, length) - remove in v0.13\n\t } else {\n\t throw new Error(\n\t 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n\t )\n\t }\n\t\n\t var remaining = this.length - offset\n\t if (length === undefined || length > remaining) length = remaining\n\t\n\t if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n\t throw new RangeError('Attempt to write outside buffer bounds')\n\t }\n\t\n\t if (!encoding) encoding = 'utf8'\n\t\n\t var loweredCase = false\n\t for (;;) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexWrite(this, string, offset, length)\n\t\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Write(this, string, offset, length)\n\t\n\t case 'ascii':\n\t return asciiWrite(this, string, offset, length)\n\t\n\t case 'latin1':\n\t case 'binary':\n\t return latin1Write(this, string, offset, length)\n\t\n\t case 'base64':\n\t // Warning: maxLength not taken into account in base64Write\n\t return base64Write(this, string, offset, length)\n\t\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return ucs2Write(this, string, offset, length)\n\t\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n\t encoding = ('' + encoding).toLowerCase()\n\t loweredCase = true\n\t }\n\t }\n\t}\n\t\n\tBuffer.prototype.toJSON = function toJSON () {\n\t return {\n\t type: 'Buffer',\n\t data: Array.prototype.slice.call(this._arr || this, 0)\n\t }\n\t}\n\t\n\tfunction base64Slice (buf, start, end) {\n\t if (start === 0 && end === buf.length) {\n\t return base64.fromByteArray(buf)\n\t } else {\n\t return base64.fromByteArray(buf.slice(start, end))\n\t }\n\t}\n\t\n\tfunction utf8Slice (buf, start, end) {\n\t end = Math.min(buf.length, end)\n\t var res = []\n\t\n\t var i = start\n\t while (i < end) {\n\t var firstByte = buf[i]\n\t var codePoint = null\n\t var bytesPerSequence = (firstByte > 0xEF) ? 4\n\t : (firstByte > 0xDF) ? 3\n\t : (firstByte > 0xBF) ? 2\n\t : 1\n\t\n\t if (i + bytesPerSequence <= end) {\n\t var secondByte, thirdByte, fourthByte, tempCodePoint\n\t\n\t switch (bytesPerSequence) {\n\t case 1:\n\t if (firstByte < 0x80) {\n\t codePoint = firstByte\n\t }\n\t break\n\t case 2:\n\t secondByte = buf[i + 1]\n\t if ((secondByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n\t if (tempCodePoint > 0x7F) {\n\t codePoint = tempCodePoint\n\t }\n\t }\n\t break\n\t case 3:\n\t secondByte = buf[i + 1]\n\t thirdByte = buf[i + 2]\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n\t if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n\t codePoint = tempCodePoint\n\t }\n\t }\n\t break\n\t case 4:\n\t secondByte = buf[i + 1]\n\t thirdByte = buf[i + 2]\n\t fourthByte = buf[i + 3]\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n\t if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n\t codePoint = tempCodePoint\n\t }\n\t }\n\t }\n\t }\n\t\n\t if (codePoint === null) {\n\t // we did not generate a valid codePoint so insert a\n\t // replacement char (U+FFFD) and advance only 1 byte\n\t codePoint = 0xFFFD\n\t bytesPerSequence = 1\n\t } else if (codePoint > 0xFFFF) {\n\t // encode to utf16 (surrogate pair dance)\n\t codePoint -= 0x10000\n\t res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n\t codePoint = 0xDC00 | codePoint & 0x3FF\n\t }\n\t\n\t res.push(codePoint)\n\t i += bytesPerSequence\n\t }\n\t\n\t return decodeCodePointsArray(res)\n\t}\n\t\n\t// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n\t// the lowest limit is Chrome, with 0x10000 args.\n\t// We go 1 magnitude less, for safety\n\tvar MAX_ARGUMENTS_LENGTH = 0x1000\n\t\n\tfunction decodeCodePointsArray (codePoints) {\n\t var len = codePoints.length\n\t if (len <= MAX_ARGUMENTS_LENGTH) {\n\t return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n\t }\n\t\n\t // Decode in chunks to avoid \"call stack size exceeded\".\n\t var res = ''\n\t var i = 0\n\t while (i < len) {\n\t res += String.fromCharCode.apply(\n\t String,\n\t codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n\t )\n\t }\n\t return res\n\t}\n\t\n\tfunction asciiSlice (buf, start, end) {\n\t var ret = ''\n\t end = Math.min(buf.length, end)\n\t\n\t for (var i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i] & 0x7F)\n\t }\n\t return ret\n\t}\n\t\n\tfunction latin1Slice (buf, start, end) {\n\t var ret = ''\n\t end = Math.min(buf.length, end)\n\t\n\t for (var i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i])\n\t }\n\t return ret\n\t}\n\t\n\tfunction hexSlice (buf, start, end) {\n\t var len = buf.length\n\t\n\t if (!start || start < 0) start = 0\n\t if (!end || end < 0 || end > len) end = len\n\t\n\t var out = ''\n\t for (var i = start; i < end; ++i) {\n\t out += toHex(buf[i])\n\t }\n\t return out\n\t}\n\t\n\tfunction utf16leSlice (buf, start, end) {\n\t var bytes = buf.slice(start, end)\n\t var res = ''\n\t for (var i = 0; i < bytes.length; i += 2) {\n\t res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n\t }\n\t return res\n\t}\n\t\n\tBuffer.prototype.slice = function slice (start, end) {\n\t var len = this.length\n\t start = ~~start\n\t end = end === undefined ? len : ~~end\n\t\n\t if (start < 0) {\n\t start += len\n\t if (start < 0) start = 0\n\t } else if (start > len) {\n\t start = len\n\t }\n\t\n\t if (end < 0) {\n\t end += len\n\t if (end < 0) end = 0\n\t } else if (end > len) {\n\t end = len\n\t }\n\t\n\t if (end < start) end = start\n\t\n\t var newBuf\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t newBuf = this.subarray(start, end)\n\t newBuf.__proto__ = Buffer.prototype\n\t } else {\n\t var sliceLen = end - start\n\t newBuf = new Buffer(sliceLen, undefined)\n\t for (var i = 0; i < sliceLen; ++i) {\n\t newBuf[i] = this[i + start]\n\t }\n\t }\n\t\n\t return newBuf\n\t}\n\t\n\t/*\n\t * Need to make sure that buffer isn't trying to write out of bounds.\n\t */\n\tfunction checkOffset (offset, ext, length) {\n\t if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n\t}\n\t\n\tBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) checkOffset(offset, byteLength, this.length)\n\t\n\t var val = this[offset]\n\t var mul = 1\n\t var i = 0\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul\n\t }\n\t\n\t return val\n\t}\n\t\n\tBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) {\n\t checkOffset(offset, byteLength, this.length)\n\t }\n\t\n\t var val = this[offset + --byteLength]\n\t var mul = 1\n\t while (byteLength > 0 && (mul *= 0x100)) {\n\t val += this[offset + --byteLength] * mul\n\t }\n\t\n\t return val\n\t}\n\t\n\tBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 1, this.length)\n\t return this[offset]\n\t}\n\t\n\tBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 2, this.length)\n\t return this[offset] | (this[offset + 1] << 8)\n\t}\n\t\n\tBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 2, this.length)\n\t return (this[offset] << 8) | this[offset + 1]\n\t}\n\t\n\tBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t\n\t return ((this[offset]) |\n\t (this[offset + 1] << 8) |\n\t (this[offset + 2] << 16)) +\n\t (this[offset + 3] * 0x1000000)\n\t}\n\t\n\tBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t\n\t return (this[offset] * 0x1000000) +\n\t ((this[offset + 1] << 16) |\n\t (this[offset + 2] << 8) |\n\t this[offset + 3])\n\t}\n\t\n\tBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) checkOffset(offset, byteLength, this.length)\n\t\n\t var val = this[offset]\n\t var mul = 1\n\t var i = 0\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul\n\t }\n\t mul *= 0x80\n\t\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\t\n\t return val\n\t}\n\t\n\tBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) checkOffset(offset, byteLength, this.length)\n\t\n\t var i = byteLength\n\t var mul = 1\n\t var val = this[offset + --i]\n\t while (i > 0 && (mul *= 0x100)) {\n\t val += this[offset + --i] * mul\n\t }\n\t mul *= 0x80\n\t\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\t\n\t return val\n\t}\n\t\n\tBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 1, this.length)\n\t if (!(this[offset] & 0x80)) return (this[offset])\n\t return ((0xff - this[offset] + 1) * -1)\n\t}\n\t\n\tBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 2, this.length)\n\t var val = this[offset] | (this[offset + 1] << 8)\n\t return (val & 0x8000) ? val | 0xFFFF0000 : val\n\t}\n\t\n\tBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 2, this.length)\n\t var val = this[offset + 1] | (this[offset] << 8)\n\t return (val & 0x8000) ? val | 0xFFFF0000 : val\n\t}\n\t\n\tBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t\n\t return (this[offset]) |\n\t (this[offset + 1] << 8) |\n\t (this[offset + 2] << 16) |\n\t (this[offset + 3] << 24)\n\t}\n\t\n\tBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t\n\t return (this[offset] << 24) |\n\t (this[offset + 1] << 16) |\n\t (this[offset + 2] << 8) |\n\t (this[offset + 3])\n\t}\n\t\n\tBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t return ieee754.read(this, offset, true, 23, 4)\n\t}\n\t\n\tBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 4, this.length)\n\t return ieee754.read(this, offset, false, 23, 4)\n\t}\n\t\n\tBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 8, this.length)\n\t return ieee754.read(this, offset, true, 52, 8)\n\t}\n\t\n\tBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n\t if (!noAssert) checkOffset(offset, 8, this.length)\n\t return ieee754.read(this, offset, false, 52, 8)\n\t}\n\t\n\tfunction checkInt (buf, value, offset, ext, max, min) {\n\t if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n\t if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range')\n\t}\n\t\n\tBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) {\n\t var maxBytes = Math.pow(2, 8 * byteLength) - 1\n\t checkInt(this, value, offset, byteLength, maxBytes, 0)\n\t }\n\t\n\t var mul = 1\n\t var i = 0\n\t this[offset] = value & 0xFF\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t this[offset + i] = (value / mul) & 0xFF\n\t }\n\t\n\t return offset + byteLength\n\t}\n\t\n\tBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t byteLength = byteLength | 0\n\t if (!noAssert) {\n\t var maxBytes = Math.pow(2, 8 * byteLength) - 1\n\t checkInt(this, value, offset, byteLength, maxBytes, 0)\n\t }\n\t\n\t var i = byteLength - 1\n\t var mul = 1\n\t this[offset + i] = value & 0xFF\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t this[offset + i] = (value / mul) & 0xFF\n\t }\n\t\n\t return offset + byteLength\n\t}\n\t\n\tBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n\t this[offset] = (value & 0xff)\n\t return offset + 1\n\t}\n\t\n\tfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n\t if (value < 0) value = 0xffff + value + 1\n\t for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n\t buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n\t (littleEndian ? i : 1 - i) * 8\n\t }\n\t}\n\t\n\tBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value & 0xff)\n\t this[offset + 1] = (value >>> 8)\n\t } else {\n\t objectWriteUInt16(this, value, offset, true)\n\t }\n\t return offset + 2\n\t}\n\t\n\tBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value >>> 8)\n\t this[offset + 1] = (value & 0xff)\n\t } else {\n\t objectWriteUInt16(this, value, offset, false)\n\t }\n\t return offset + 2\n\t}\n\t\n\tfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n\t if (value < 0) value = 0xffffffff + value + 1\n\t for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n\t buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n\t }\n\t}\n\t\n\tBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset + 3] = (value >>> 24)\n\t this[offset + 2] = (value >>> 16)\n\t this[offset + 1] = (value >>> 8)\n\t this[offset] = (value & 0xff)\n\t } else {\n\t objectWriteUInt32(this, value, offset, true)\n\t }\n\t return offset + 4\n\t}\n\t\n\tBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value >>> 24)\n\t this[offset + 1] = (value >>> 16)\n\t this[offset + 2] = (value >>> 8)\n\t this[offset + 3] = (value & 0xff)\n\t } else {\n\t objectWriteUInt32(this, value, offset, false)\n\t }\n\t return offset + 4\n\t}\n\t\n\tBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) {\n\t var limit = Math.pow(2, 8 * byteLength - 1)\n\t\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit)\n\t }\n\t\n\t var i = 0\n\t var mul = 1\n\t var sub = 0\n\t this[offset] = value & 0xFF\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n\t sub = 1\n\t }\n\t this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n\t }\n\t\n\t return offset + byteLength\n\t}\n\t\n\tBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) {\n\t var limit = Math.pow(2, 8 * byteLength - 1)\n\t\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit)\n\t }\n\t\n\t var i = byteLength - 1\n\t var mul = 1\n\t var sub = 0\n\t this[offset + i] = value & 0xFF\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n\t sub = 1\n\t }\n\t this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n\t }\n\t\n\t return offset + byteLength\n\t}\n\t\n\tBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n\t if (value < 0) value = 0xff + value + 1\n\t this[offset] = (value & 0xff)\n\t return offset + 1\n\t}\n\t\n\tBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value & 0xff)\n\t this[offset + 1] = (value >>> 8)\n\t } else {\n\t objectWriteUInt16(this, value, offset, true)\n\t }\n\t return offset + 2\n\t}\n\t\n\tBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value >>> 8)\n\t this[offset + 1] = (value & 0xff)\n\t } else {\n\t objectWriteUInt16(this, value, offset, false)\n\t }\n\t return offset + 2\n\t}\n\t\n\tBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value & 0xff)\n\t this[offset + 1] = (value >>> 8)\n\t this[offset + 2] = (value >>> 16)\n\t this[offset + 3] = (value >>> 24)\n\t } else {\n\t objectWriteUInt32(this, value, offset, true)\n\t }\n\t return offset + 4\n\t}\n\t\n\tBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n\t value = +value\n\t offset = offset | 0\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n\t if (value < 0) value = 0xffffffff + value + 1\n\t if (Buffer.TYPED_ARRAY_SUPPORT) {\n\t this[offset] = (value >>> 24)\n\t this[offset + 1] = (value >>> 16)\n\t this[offset + 2] = (value >>> 8)\n\t this[offset + 3] = (value & 0xff)\n\t } else {\n\t objectWriteUInt32(this, value, offset, false)\n\t }\n\t return offset + 4\n\t}\n\t\n\tfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range')\n\t if (offset < 0) throw new RangeError('Index out of range')\n\t}\n\t\n\tfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n\t }\n\t ieee754.write(buf, value, offset, littleEndian, 23, 4)\n\t return offset + 4\n\t}\n\t\n\tBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n\t return writeFloat(this, value, offset, true, noAssert)\n\t}\n\t\n\tBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n\t return writeFloat(this, value, offset, false, noAssert)\n\t}\n\t\n\tfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n\t }\n\t ieee754.write(buf, value, offset, littleEndian, 52, 8)\n\t return offset + 8\n\t}\n\t\n\tBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n\t return writeDouble(this, value, offset, true, noAssert)\n\t}\n\t\n\tBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n\t return writeDouble(this, value, offset, false, noAssert)\n\t}\n\t\n\t// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\n\tBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n\t if (!start) start = 0\n\t if (!end && end !== 0) end = this.length\n\t if (targetStart >= target.length) targetStart = target.length\n\t if (!targetStart) targetStart = 0\n\t if (end > 0 && end < start) end = start\n\t\n\t // Copy 0 bytes; we're done\n\t if (end === start) return 0\n\t if (target.length === 0 || this.length === 0) return 0\n\t\n\t // Fatal error conditions\n\t if (targetStart < 0) {\n\t throw new RangeError('targetStart out of bounds')\n\t }\n\t if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n\t if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\t\n\t // Are we oob?\n\t if (end > this.length) end = this.length\n\t if (target.length - targetStart < end - start) {\n\t end = target.length - targetStart + start\n\t }\n\t\n\t var len = end - start\n\t var i\n\t\n\t if (this === target && start < targetStart && targetStart < end) {\n\t // descending copy from end\n\t for (i = len - 1; i >= 0; --i) {\n\t target[i + targetStart] = this[i + start]\n\t }\n\t } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n\t // ascending copy from start\n\t for (i = 0; i < len; ++i) {\n\t target[i + targetStart] = this[i + start]\n\t }\n\t } else {\n\t Uint8Array.prototype.set.call(\n\t target,\n\t this.subarray(start, start + len),\n\t targetStart\n\t )\n\t }\n\t\n\t return len\n\t}\n\t\n\t// Usage:\n\t// buffer.fill(number[, offset[, end]])\n\t// buffer.fill(buffer[, offset[, end]])\n\t// buffer.fill(string[, offset[, end]][, encoding])\n\tBuffer.prototype.fill = function fill (val, start, end, encoding) {\n\t // Handle string cases:\n\t if (typeof val === 'string') {\n\t if (typeof start === 'string') {\n\t encoding = start\n\t start = 0\n\t end = this.length\n\t } else if (typeof end === 'string') {\n\t encoding = end\n\t end = this.length\n\t }\n\t if (val.length === 1) {\n\t var code = val.charCodeAt(0)\n\t if (code < 256) {\n\t val = code\n\t }\n\t }\n\t if (encoding !== undefined && typeof encoding !== 'string') {\n\t throw new TypeError('encoding must be a string')\n\t }\n\t if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding)\n\t }\n\t } else if (typeof val === 'number') {\n\t val = val & 255\n\t }\n\t\n\t // Invalid ranges are not set to a default, so can range check early.\n\t if (start < 0 || this.length < start || this.length < end) {\n\t throw new RangeError('Out of range index')\n\t }\n\t\n\t if (end <= start) {\n\t return this\n\t }\n\t\n\t start = start >>> 0\n\t end = end === undefined ? this.length : end >>> 0\n\t\n\t if (!val) val = 0\n\t\n\t var i\n\t if (typeof val === 'number') {\n\t for (i = start; i < end; ++i) {\n\t this[i] = val\n\t }\n\t } else {\n\t var bytes = Buffer.isBuffer(val)\n\t ? val\n\t : utf8ToBytes(new Buffer(val, encoding).toString())\n\t var len = bytes.length\n\t for (i = 0; i < end - start; ++i) {\n\t this[i + start] = bytes[i % len]\n\t }\n\t }\n\t\n\t return this\n\t}\n\t\n\t// HELPER FUNCTIONS\n\t// ================\n\t\n\tvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\t\n\tfunction base64clean (str) {\n\t // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n\t str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n\t // Node converts strings with length < 2 to ''\n\t if (str.length < 2) return ''\n\t // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n\t while (str.length % 4 !== 0) {\n\t str = str + '='\n\t }\n\t return str\n\t}\n\t\n\tfunction stringtrim (str) {\n\t if (str.trim) return str.trim()\n\t return str.replace(/^\\s+|\\s+$/g, '')\n\t}\n\t\n\tfunction toHex (n) {\n\t if (n < 16) return '0' + n.toString(16)\n\t return n.toString(16)\n\t}\n\t\n\tfunction utf8ToBytes (string, units) {\n\t units = units || Infinity\n\t var codePoint\n\t var length = string.length\n\t var leadSurrogate = null\n\t var bytes = []\n\t\n\t for (var i = 0; i < length; ++i) {\n\t codePoint = string.charCodeAt(i)\n\t\n\t // is surrogate component\n\t if (codePoint > 0xD7FF && codePoint < 0xE000) {\n\t // last char was a lead\n\t if (!leadSurrogate) {\n\t // no lead yet\n\t if (codePoint > 0xDBFF) {\n\t // unexpected trail\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n\t continue\n\t } else if (i + 1 === length) {\n\t // unpaired lead\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n\t continue\n\t }\n\t\n\t // valid lead\n\t leadSurrogate = codePoint\n\t\n\t continue\n\t }\n\t\n\t // 2 leads in a row\n\t if (codePoint < 0xDC00) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n\t leadSurrogate = codePoint\n\t continue\n\t }\n\t\n\t // valid surrogate pair\n\t codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n\t } else if (leadSurrogate) {\n\t // valid bmp char, but last char was a lead\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n\t }\n\t\n\t leadSurrogate = null\n\t\n\t // encode utf8\n\t if (codePoint < 0x80) {\n\t if ((units -= 1) < 0) break\n\t bytes.push(codePoint)\n\t } else if (codePoint < 0x800) {\n\t if ((units -= 2) < 0) break\n\t bytes.push(\n\t codePoint >> 0x6 | 0xC0,\n\t codePoint & 0x3F | 0x80\n\t )\n\t } else if (codePoint < 0x10000) {\n\t if ((units -= 3) < 0) break\n\t bytes.push(\n\t codePoint >> 0xC | 0xE0,\n\t codePoint >> 0x6 & 0x3F | 0x80,\n\t codePoint & 0x3F | 0x80\n\t )\n\t } else if (codePoint < 0x110000) {\n\t if ((units -= 4) < 0) break\n\t bytes.push(\n\t codePoint >> 0x12 | 0xF0,\n\t codePoint >> 0xC & 0x3F | 0x80,\n\t codePoint >> 0x6 & 0x3F | 0x80,\n\t codePoint & 0x3F | 0x80\n\t )\n\t } else {\n\t throw new Error('Invalid code point')\n\t }\n\t }\n\t\n\t return bytes\n\t}\n\t\n\tfunction asciiToBytes (str) {\n\t var byteArray = []\n\t for (var i = 0; i < str.length; ++i) {\n\t // Node's code seems to be doing this and not & 0x7F..\n\t byteArray.push(str.charCodeAt(i) & 0xFF)\n\t }\n\t return byteArray\n\t}\n\t\n\tfunction utf16leToBytes (str, units) {\n\t var c, hi, lo\n\t var byteArray = []\n\t for (var i = 0; i < str.length; ++i) {\n\t if ((units -= 2) < 0) break\n\t\n\t c = str.charCodeAt(i)\n\t hi = c >> 8\n\t lo = c % 256\n\t byteArray.push(lo)\n\t byteArray.push(hi)\n\t }\n\t\n\t return byteArray\n\t}\n\t\n\tfunction base64ToBytes (str) {\n\t return base64.toByteArray(base64clean(str))\n\t}\n\t\n\tfunction blitBuffer (src, dst, offset, length) {\n\t for (var i = 0; i < length; ++i) {\n\t if ((i + offset >= dst.length) || (i >= src.length)) break\n\t dst[i + offset] = src[i]\n\t }\n\t return i\n\t}\n\t\n\tfunction isnan (val) {\n\t return val !== val // eslint-disable-line no-self-compare\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar Buffer = __webpack_require__(1).Buffer;\n\tvar intSize = 4;\n\tvar zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0);\n\tvar chrsz = 8;\n\t\n\tfunction toArray(buf, bigEndian) {\n\t if ((buf.length % intSize) !== 0) {\n\t var len = buf.length + (intSize - (buf.length % intSize));\n\t buf = Buffer.concat([buf, zeroBuffer], len);\n\t }\n\t\n\t var arr = [];\n\t var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE;\n\t for (var i = 0; i < buf.length; i += intSize) {\n\t arr.push(fn.call(buf, i));\n\t }\n\t return arr;\n\t}\n\t\n\tfunction toBuffer(arr, size, bigEndian) {\n\t var buf = new Buffer(size);\n\t var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE;\n\t for (var i = 0; i < arr.length; i++) {\n\t fn.call(buf, arr[i], i * 4, true);\n\t }\n\t return buf;\n\t}\n\t\n\tfunction hash(buf, fn, hashSize, bigEndian) {\n\t if (!Buffer.isBuffer(buf)) buf = new Buffer(buf);\n\t var arr = fn(toArray(buf, bigEndian), buf.length * chrsz);\n\t return toBuffer(arr, hashSize, bigEndian);\n\t}\n\t\n\tmodule.exports = { hash: hash };\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _buffer = __webpack_require__(1);\n\t\n\tvar _cryptoBrowserify = __webpack_require__(14);\n\t\n\tvar crypto = _interopRequireWildcard(_cryptoBrowserify);\n\t\n\tvar _BigInteger = __webpack_require__(4);\n\t\n\tvar _BigInteger2 = _interopRequireDefault(_BigInteger);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\tvar createHash = crypto.createHash;\n\tvar createHmac = crypto.createHmac;\n\tvar randomBytes = crypto.randomBytes;\n\t\n\tvar initN = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1' + '29024E088A67CC74020BBEA63B139B22514A08798E3404DD' + 'EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245' + 'E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED' + 'EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D' + 'C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F' + '83655D23DCA3AD961C62F356208552BB9ED529077096966D' + '670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B' + 'E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9' + 'DE2BCBF6955817183995497CEA956AE515D2261898FA0510' + '15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64' + 'ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7' + 'ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B' + 'F12FFA06D98A0864D87602733EC86A64521F2B18177B200C' + 'BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31' + '43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF';\n\t\n\tvar newPasswordRequiredChallengeUserAttributePrefix = 'userAttributes.';\n\t\n\t/** @class */\n\t\n\tvar AuthenticationHelper = function () {\n\t /**\n\t * Constructs a new AuthenticationHelper object\n\t * @param {string} PoolName Cognito user pool name.\n\t */\n\t function AuthenticationHelper(PoolName) {\n\t _classCallCheck(this, AuthenticationHelper);\n\t\n\t this.N = new _BigInteger2.default(initN, 16);\n\t this.g = new _BigInteger2.default('2', 16);\n\t this.k = new _BigInteger2.default(this.hexHash('00' + this.N.toString(16) + '0' + this.g.toString(16)), 16);\n\t\n\t this.smallAValue = this.generateRandomSmallA();\n\t this.getLargeAValue(function () {});\n\t\n\t this.infoBits = _buffer.Buffer.from('Caldera Derived Key', 'utf8');\n\t\n\t this.poolName = PoolName;\n\t }\n\t\n\t /**\n\t * @returns {BigInteger} small A, a random number\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getSmallAValue = function getSmallAValue() {\n\t return this.smallAValue;\n\t };\n\t\n\t /**\n\t * @param {nodeCallback} callback Called with (err, largeAValue)\n\t * @returns {void}\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getLargeAValue = function getLargeAValue(callback) {\n\t var _this = this;\n\t\n\t if (this.largeAValue) {\n\t callback(null, this.largeAValue);\n\t } else {\n\t this.calculateA(this.smallAValue, function (err, largeAValue) {\n\t if (err) {\n\t callback(err, null);\n\t }\n\t\n\t _this.largeAValue = largeAValue;\n\t callback(null, _this.largeAValue);\n\t });\n\t }\n\t };\n\t\n\t /**\n\t * helper function to generate a random big integer\n\t * @returns {BigInteger} a random value.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.generateRandomSmallA = function generateRandomSmallA() {\n\t var hexRandom = randomBytes(128).toString('hex');\n\t\n\t var randomBigInt = new _BigInteger2.default(hexRandom, 16);\n\t var smallABigInt = randomBigInt.mod(this.N);\n\t\n\t return smallABigInt;\n\t };\n\t\n\t /**\n\t * helper function to generate a random string\n\t * @returns {string} a random value.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.generateRandomString = function generateRandomString() {\n\t return randomBytes(40).toString('base64');\n\t };\n\t\n\t /**\n\t * @returns {string} Generated random value included in password hash.\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getRandomPassword = function getRandomPassword() {\n\t return this.randomPassword;\n\t };\n\t\n\t /**\n\t * @returns {string} Generated random value included in devices hash.\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getSaltDevices = function getSaltDevices() {\n\t return this.SaltToHashDevices;\n\t };\n\t\n\t /**\n\t * @returns {string} Value used to verify devices.\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getVerifierDevices = function getVerifierDevices() {\n\t return this.verifierDevices;\n\t };\n\t\n\t /**\n\t * Generate salts and compute verifier.\n\t * @param {string} deviceGroupKey Devices to generate verifier for.\n\t * @param {string} username User to generate verifier for.\n\t * @param {nodeCallback} callback Called with (err, null)\n\t * @returns {void}\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.generateHashDevice = function generateHashDevice(deviceGroupKey, username, callback) {\n\t var _this2 = this;\n\t\n\t this.randomPassword = this.generateRandomString();\n\t var combinedString = '' + deviceGroupKey + username + ':' + this.randomPassword;\n\t var hashedString = this.hash(combinedString);\n\t\n\t var hexRandom = randomBytes(16).toString('hex');\n\t this.SaltToHashDevices = this.padHex(new _BigInteger2.default(hexRandom, 16));\n\t\n\t this.g.modPow(new _BigInteger2.default(this.hexHash(this.SaltToHashDevices + hashedString), 16), this.N, function (err, verifierDevicesNotPadded) {\n\t if (err) {\n\t callback(err, null);\n\t }\n\t\n\t _this2.verifierDevices = _this2.padHex(verifierDevicesNotPadded);\n\t callback(null, null);\n\t });\n\t };\n\t\n\t /**\n\t * Calculate the client's public value A = g^a%N\n\t * with the generated random number a\n\t * @param {BigInteger} a Randomly generated small A.\n\t * @param {nodeCallback} callback Called with (err, largeAValue)\n\t * @returns {void}\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.calculateA = function calculateA(a, callback) {\n\t var _this3 = this;\n\t\n\t this.g.modPow(a, this.N, function (err, A) {\n\t if (err) {\n\t callback(err, null);\n\t }\n\t\n\t if (A.mod(_this3.N).equals(_BigInteger2.default.ZERO)) {\n\t callback(new Error('Illegal paramater. A mod N cannot be 0.'), null);\n\t }\n\t\n\t callback(null, A);\n\t });\n\t };\n\t\n\t /**\n\t * Calculate the client's value U which is the hash of A and B\n\t * @param {BigInteger} A Large A value.\n\t * @param {BigInteger} B Server B value.\n\t * @returns {BigInteger} Computed U value.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.calculateU = function calculateU(A, B) {\n\t this.UHexHash = this.hexHash(this.padHex(A) + this.padHex(B));\n\t var finalU = new _BigInteger2.default(this.UHexHash, 16);\n\t\n\t return finalU;\n\t };\n\t\n\t /**\n\t * Calculate a hash from a bitArray\n\t * @param {Buffer} buf Value to hash.\n\t * @returns {String} Hex-encoded hash.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.hash = function hash(buf) {\n\t var hashHex = createHash('sha256').update(buf).digest('hex');\n\t return new Array(64 - hashHex.length).join('0') + hashHex;\n\t };\n\t\n\t /**\n\t * Calculate a hash from a hex string\n\t * @param {String} hexStr Value to hash.\n\t * @returns {String} Hex-encoded hash.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.hexHash = function hexHash(hexStr) {\n\t return this.hash(_buffer.Buffer.from(hexStr, 'hex'));\n\t };\n\t\n\t /**\n\t * Standard hkdf algorithm\n\t * @param {Buffer} ikm Input key material.\n\t * @param {Buffer} salt Salt value.\n\t * @returns {Buffer} Strong key material.\n\t * @private\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.computehkdf = function computehkdf(ikm, salt) {\n\t var prk = createHmac('sha256', salt).update(ikm).digest();\n\t var infoBitsUpdate = _buffer.Buffer.concat([this.infoBits, _buffer.Buffer.from(String.fromCharCode(1), 'utf8')]);\n\t var hmac = createHmac('sha256', prk).update(infoBitsUpdate).digest();\n\t return hmac.slice(0, 16);\n\t };\n\t\n\t /**\n\t * Calculates the final hkdf based on computed S value, and computed U value and the key\n\t * @param {String} username Username.\n\t * @param {String} password Password.\n\t * @param {BigInteger} serverBValue Server B value.\n\t * @param {BigInteger} salt Generated salt.\n\t * @param {nodeCallback} callback Called with (err, hkdfValue)\n\t * @returns {void}\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getPasswordAuthenticationKey = function getPasswordAuthenticationKey(username, password, serverBValue, salt, callback) {\n\t var _this4 = this;\n\t\n\t if (serverBValue.mod(this.N).equals(_BigInteger2.default.ZERO)) {\n\t throw new Error('B cannot be zero.');\n\t }\n\t\n\t this.UValue = this.calculateU(this.largeAValue, serverBValue);\n\t\n\t if (this.UValue.equals(_BigInteger2.default.ZERO)) {\n\t throw new Error('U cannot be zero.');\n\t }\n\t\n\t var usernamePassword = '' + this.poolName + username + ':' + password;\n\t var usernamePasswordHash = this.hash(usernamePassword);\n\t\n\t var xValue = new _BigInteger2.default(this.hexHash(this.padHex(salt) + usernamePasswordHash), 16);\n\t this.calculateS(xValue, serverBValue, function (err, sValue) {\n\t if (err) {\n\t callback(err, null);\n\t }\n\t\n\t var hkdf = _this4.computehkdf(_buffer.Buffer.from(_this4.padHex(sValue), 'hex'), _buffer.Buffer.from(_this4.padHex(_this4.UValue.toString(16)), 'hex'));\n\t\n\t callback(null, hkdf);\n\t });\n\t };\n\t\n\t /**\n\t * Calculates the S value used in getPasswordAuthenticationKey\n\t * @param {BigInteger} xValue Salted password hash value.\n\t * @param {BigInteger} serverBValue Server B value.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.calculateS = function calculateS(xValue, serverBValue, callback) {\n\t var _this5 = this;\n\t\n\t this.g.modPow(xValue, this.N, function (err, gModPowXN) {\n\t if (err) {\n\t callback(err, null);\n\t }\n\t\n\t var intValue2 = serverBValue.subtract(_this5.k.multiply(gModPowXN));\n\t intValue2.modPow(_this5.smallAValue.add(_this5.UValue.multiply(xValue)), _this5.N, function (err2, result) {\n\t if (err2) {\n\t callback(err2, null);\n\t }\n\t\n\t callback(null, result.mod(_this5.N));\n\t });\n\t });\n\t };\n\t\n\t /**\n\t * Return constant newPasswordRequiredChallengeUserAttributePrefix\n\t * @return {newPasswordRequiredChallengeUserAttributePrefix} constant prefix value\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.getNewPasswordRequiredChallengeUserAttributePrefix = function getNewPasswordRequiredChallengeUserAttributePrefix() {\n\t return newPasswordRequiredChallengeUserAttributePrefix;\n\t };\n\t\n\t /**\n\t * Converts a BigInteger (or hex string) to hex format padded with zeroes for hashing\n\t * @param {BigInteger|String} bigInt Number or string to pad.\n\t * @returns {String} Padded hex string.\n\t */\n\t\n\t\n\t AuthenticationHelper.prototype.padHex = function padHex(bigInt) {\n\t var hashStr = bigInt.toString(16);\n\t if (hashStr.length % 2 === 1) {\n\t hashStr = '0' + hashStr;\n\t } else if ('89ABCDEFabcdef'.indexOf(hashStr[0]) !== -1) {\n\t hashStr = '00' + hashStr;\n\t }\n\t return hashStr;\n\t };\n\t\n\t return AuthenticationHelper;\n\t}();\n\t\n\texports.default = AuthenticationHelper;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t// A small implementation of BigInteger based on http://www-cs-students.stanford.edu/~tjw/jsbn/\n\t//\n\t// All public methods have been removed except the following:\n\t// new BigInteger(a, b) (only radix 2, 4, 8, 16 and 32 supported)\n\t// toString (only radix 2, 4, 8, 16 and 32 supported)\n\t// negate\n\t// abs\n\t// compareTo\n\t// bitLength\n\t// mod\n\t// equals\n\t// add\n\t// subtract\n\t// multiply\n\t// divide\n\t// modPow\n\t\n\texports.default = BigInteger;\n\t\n\t/*\n\t * Copyright (c) 2003-2005 Tom Wu\n\t * All Rights Reserved.\n\t *\n\t * Permission is hereby granted, free of charge, to any person obtaining\n\t * a copy of this software and associated documentation files (the\n\t * \"Software\"), to deal in the Software without restriction, including\n\t * without limitation the rights to use, copy, modify, merge, publish,\n\t * distribute, sublicense, and/or sell copies of the Software, and to\n\t * permit persons to whom the Software is furnished to do so, subject to\n\t * the following conditions:\n\t *\n\t * The above copyright notice and this permission notice shall be\n\t * included in all copies or substantial portions of the Software.\n\t *\n\t * THE SOFTWARE IS PROVIDED \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND,\n\t * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY\n\t * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n\t *\n\t * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,\n\t * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER\n\t * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF\n\t * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT\n\t * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\t *\n\t * In addition, the following condition applies:\n\t *\n\t * All redistributions must retain an intact copy of this copyright notice\n\t * and disclaimer.\n\t */\n\t\n\t// (public) Constructor\n\t\n\tfunction BigInteger(a, b) {\n\t if (a != null) this.fromString(a, b);\n\t}\n\t\n\t// return new, unset BigInteger\n\tfunction nbi() {\n\t return new BigInteger(null);\n\t}\n\t\n\t// Bits per digit\n\tvar dbits;\n\t\n\t// JavaScript engine analysis\n\tvar canary = 0xdeadbeefcafe;\n\tvar j_lm = (canary & 0xffffff) == 0xefcafe;\n\t\n\t// am: Compute w_j += (x*this_i), propagate carries,\n\t// c is initial carry, returns final carry.\n\t// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n\t// We need to select the fastest one that works in this environment.\n\t\n\t// am1: use a single mult and divide to get the high bits,\n\t// max digit bits should be 26 because\n\t// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n\tfunction am1(i, x, w, j, c, n) {\n\t while (--n >= 0) {\n\t var v = x * this[i++] + w[j] + c;\n\t c = Math.floor(v / 0x4000000);\n\t w[j++] = v & 0x3ffffff;\n\t }\n\t return c;\n\t}\n\t// am2 avoids a big mult-and-extract completely.\n\t// Max digit bits should be <= 30 because we do bitwise ops\n\t// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n\tfunction am2(i, x, w, j, c, n) {\n\t var xl = x & 0x7fff,\n\t xh = x >> 15;\n\t while (--n >= 0) {\n\t var l = this[i] & 0x7fff;\n\t var h = this[i++] >> 15;\n\t var m = xh * l + h * xl;\n\t l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n\t c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n\t w[j++] = l & 0x3fffffff;\n\t }\n\t return c;\n\t}\n\t// Alternately, set max digit bits to 28 since some\n\t// browsers slow down when dealing with 32-bit numbers.\n\tfunction am3(i, x, w, j, c, n) {\n\t var xl = x & 0x3fff,\n\t xh = x >> 14;\n\t while (--n >= 0) {\n\t var l = this[i] & 0x3fff;\n\t var h = this[i++] >> 14;\n\t var m = xh * l + h * xl;\n\t l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n\t c = (l >> 28) + (m >> 14) + xh * h;\n\t w[j++] = l & 0xfffffff;\n\t }\n\t return c;\n\t}\n\tvar inBrowser = typeof navigator !== \"undefined\";\n\tif (inBrowser && j_lm && navigator.appName == \"Microsoft Internet Explorer\") {\n\t BigInteger.prototype.am = am2;\n\t dbits = 30;\n\t} else if (inBrowser && j_lm && navigator.appName != \"Netscape\") {\n\t BigInteger.prototype.am = am1;\n\t dbits = 26;\n\t} else {\n\t // Mozilla/Netscape seems to prefer am3\n\t BigInteger.prototype.am = am3;\n\t dbits = 28;\n\t}\n\t\n\tBigInteger.prototype.DB = dbits;\n\tBigInteger.prototype.DM = (1 << dbits) - 1;\n\tBigInteger.prototype.DV = 1 << dbits;\n\t\n\tvar BI_FP = 52;\n\tBigInteger.prototype.FV = Math.pow(2, BI_FP);\n\tBigInteger.prototype.F1 = BI_FP - dbits;\n\tBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n\t\n\t// Digit conversions\n\tvar BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\tvar BI_RC = new Array();\n\tvar rr, vv;\n\trr = \"0\".charCodeAt(0);\n\tfor (vv = 0; vv <= 9; ++vv) {\n\t BI_RC[rr++] = vv;\n\t}rr = \"a\".charCodeAt(0);\n\tfor (vv = 10; vv < 36; ++vv) {\n\t BI_RC[rr++] = vv;\n\t}rr = \"A\".charCodeAt(0);\n\tfor (vv = 10; vv < 36; ++vv) {\n\t BI_RC[rr++] = vv;\n\t}function int2char(n) {\n\t return BI_RM.charAt(n);\n\t}\n\tfunction intAt(s, i) {\n\t var c = BI_RC[s.charCodeAt(i)];\n\t return c == null ? -1 : c;\n\t}\n\t\n\t// (protected) copy this to r\n\tfunction bnpCopyTo(r) {\n\t for (var i = this.t - 1; i >= 0; --i) {\n\t r[i] = this[i];\n\t }r.t = this.t;\n\t r.s = this.s;\n\t}\n\t\n\t// (protected) set from integer value x, -DV <= x < DV\n\tfunction bnpFromInt(x) {\n\t this.t = 1;\n\t this.s = x < 0 ? -1 : 0;\n\t if (x > 0) this[0] = x;else if (x < -1) this[0] = x + this.DV;else this.t = 0;\n\t}\n\t\n\t// return bigint initialized to value\n\tfunction nbv(i) {\n\t var r = nbi();\n\t\n\t r.fromInt(i);\n\t\n\t return r;\n\t}\n\t\n\t// (protected) set from string and radix\n\tfunction bnpFromString(s, b) {\n\t var k;\n\t if (b == 16) k = 4;else if (b == 8) k = 3;else if (b == 2) k = 1;else if (b == 32) k = 5;else if (b == 4) k = 2;else throw new Error(\"Only radix 2, 4, 8, 16, 32 are supported\");\n\t this.t = 0;\n\t this.s = 0;\n\t var i = s.length,\n\t mi = false,\n\t sh = 0;\n\t while (--i >= 0) {\n\t var x = intAt(s, i);\n\t if (x < 0) {\n\t if (s.charAt(i) == \"-\") mi = true;\n\t continue;\n\t }\n\t mi = false;\n\t if (sh == 0) this[this.t++] = x;else if (sh + k > this.DB) {\n\t this[this.t - 1] |= (x & (1 << this.DB - sh) - 1) << sh;\n\t this[this.t++] = x >> this.DB - sh;\n\t } else this[this.t - 1] |= x << sh;\n\t sh += k;\n\t if (sh >= this.DB) sh -= this.DB;\n\t }\n\t this.clamp();\n\t if (mi) BigInteger.ZERO.subTo(this, this);\n\t}\n\t\n\t// (protected) clamp off excess high words\n\tfunction bnpClamp() {\n\t var c = this.s & this.DM;\n\t while (this.t > 0 && this[this.t - 1] == c) {\n\t --this.t;\n\t }\n\t}\n\t\n\t// (public) return string representation in given radix\n\tfunction bnToString(b) {\n\t if (this.s < 0) return \"-\" + this.negate().toString();\n\t var k;\n\t if (b == 16) k = 4;else if (b == 8) k = 3;else if (b == 2) k = 1;else if (b == 32) k = 5;else if (b == 4) k = 2;else throw new Error(\"Only radix 2, 4, 8, 16, 32 are supported\");\n\t var km = (1 << k) - 1,\n\t d,\n\t m = false,\n\t r = \"\",\n\t i = this.t;\n\t var p = this.DB - i * this.DB % k;\n\t if (i-- > 0) {\n\t if (p < this.DB && (d = this[i] >> p) > 0) {\n\t m = true;\n\t r = int2char(d);\n\t }\n\t while (i >= 0) {\n\t if (p < k) {\n\t d = (this[i] & (1 << p) - 1) << k - p;\n\t d |= this[--i] >> (p += this.DB - k);\n\t } else {\n\t d = this[i] >> (p -= k) & km;\n\t if (p <= 0) {\n\t p += this.DB;\n\t --i;\n\t }\n\t }\n\t if (d > 0) m = true;\n\t if (m) r += int2char(d);\n\t }\n\t }\n\t return m ? r : \"0\";\n\t}\n\t\n\t// (public) -this\n\tfunction bnNegate() {\n\t var r = nbi();\n\t\n\t BigInteger.ZERO.subTo(this, r);\n\t\n\t return r;\n\t}\n\t\n\t// (public) |this|\n\tfunction bnAbs() {\n\t return this.s < 0 ? this.negate() : this;\n\t}\n\t\n\t// (public) return + if this > a, - if this < a, 0 if equal\n\tfunction bnCompareTo(a) {\n\t var r = this.s - a.s;\n\t if (r != 0) return r;\n\t var i = this.t;\n\t r = i - a.t;\n\t if (r != 0) return this.s < 0 ? -r : r;\n\t while (--i >= 0) {\n\t if ((r = this[i] - a[i]) != 0) return r;\n\t }return 0;\n\t}\n\t\n\t// returns bit length of the integer x\n\tfunction nbits(x) {\n\t var r = 1,\n\t t;\n\t if ((t = x >>> 16) != 0) {\n\t x = t;\n\t r += 16;\n\t }\n\t if ((t = x >> 8) != 0) {\n\t x = t;\n\t r += 8;\n\t }\n\t if ((t = x >> 4) != 0) {\n\t x = t;\n\t r += 4;\n\t }\n\t if ((t = x >> 2) != 0) {\n\t x = t;\n\t r += 2;\n\t }\n\t if ((t = x >> 1) != 0) {\n\t x = t;\n\t r += 1;\n\t }\n\t return r;\n\t}\n\t\n\t// (public) return the number of bits in \"this\"\n\tfunction bnBitLength() {\n\t if (this.t <= 0) return 0;\n\t return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM);\n\t}\n\t\n\t// (protected) r = this << n*DB\n\tfunction bnpDLShiftTo(n, r) {\n\t var i;\n\t for (i = this.t - 1; i >= 0; --i) {\n\t r[i + n] = this[i];\n\t }for (i = n - 1; i >= 0; --i) {\n\t r[i] = 0;\n\t }r.t = this.t + n;\n\t r.s = this.s;\n\t}\n\t\n\t// (protected) r = this >> n*DB\n\tfunction bnpDRShiftTo(n, r) {\n\t for (var i = n; i < this.t; ++i) {\n\t r[i - n] = this[i];\n\t }r.t = Math.max(this.t - n, 0);\n\t r.s = this.s;\n\t}\n\t\n\t// (protected) r = this << n\n\tfunction bnpLShiftTo(n, r) {\n\t var bs = n % this.DB;\n\t var cbs = this.DB - bs;\n\t var bm = (1 << cbs) - 1;\n\t var ds = Math.floor(n / this.DB),\n\t c = this.s << bs & this.DM,\n\t i;\n\t for (i = this.t - 1; i >= 0; --i) {\n\t r[i + ds + 1] = this[i] >> cbs | c;\n\t c = (this[i] & bm) << bs;\n\t }\n\t for (i = ds - 1; i >= 0; --i) {\n\t r[i] = 0;\n\t }r[ds] = c;\n\t r.t = this.t + ds + 1;\n\t r.s = this.s;\n\t r.clamp();\n\t}\n\t\n\t// (protected) r = this >> n\n\tfunction bnpRShiftTo(n, r) {\n\t r.s = this.s;\n\t var ds = Math.floor(n / this.DB);\n\t if (ds >= this.t) {\n\t r.t = 0;\n\t return;\n\t }\n\t var bs = n % this.DB;\n\t var cbs = this.DB - bs;\n\t var bm = (1 << bs) - 1;\n\t r[0] = this[ds] >> bs;\n\t for (var i = ds + 1; i < this.t; ++i) {\n\t r[i - ds - 1] |= (this[i] & bm) << cbs;\n\t r[i - ds] = this[i] >> bs;\n\t }\n\t if (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs;\n\t r.t = this.t - ds;\n\t r.clamp();\n\t}\n\t\n\t// (protected) r = this - a\n\tfunction bnpSubTo(a, r) {\n\t var i = 0,\n\t c = 0,\n\t m = Math.min(a.t, this.t);\n\t while (i < m) {\n\t c += this[i] - a[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t if (a.t < this.t) {\n\t c -= a.s;\n\t while (i < this.t) {\n\t c += this[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t c += this.s;\n\t } else {\n\t c += this.s;\n\t while (i < a.t) {\n\t c -= a[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t c -= a.s;\n\t }\n\t r.s = c < 0 ? -1 : 0;\n\t if (c < -1) r[i++] = this.DV + c;else if (c > 0) r[i++] = c;\n\t r.t = i;\n\t r.clamp();\n\t}\n\t\n\t// (protected) r = this * a, r != this,a (HAC 14.12)\n\t// \"this\" should be the larger one if appropriate.\n\tfunction bnpMultiplyTo(a, r) {\n\t var x = this.abs(),\n\t y = a.abs();\n\t var i = x.t;\n\t r.t = i + y.t;\n\t while (--i >= 0) {\n\t r[i] = 0;\n\t }for (i = 0; i < y.t; ++i) {\n\t r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n\t }r.s = 0;\n\t r.clamp();\n\t if (this.s != a.s) BigInteger.ZERO.subTo(r, r);\n\t}\n\t\n\t// (protected) r = this^2, r != this (HAC 14.16)\n\tfunction bnpSquareTo(r) {\n\t var x = this.abs();\n\t var i = r.t = 2 * x.t;\n\t while (--i >= 0) {\n\t r[i] = 0;\n\t }for (i = 0; i < x.t - 1; ++i) {\n\t var c = x.am(i, x[i], r, 2 * i, 0, 1);\n\t if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {\n\t r[i + x.t] -= x.DV;\n\t r[i + x.t + 1] = 1;\n\t }\n\t }\n\t if (r.t > 0) r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n\t r.s = 0;\n\t r.clamp();\n\t}\n\t\n\t// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n\t// r != q, this != m. q or r may be null.\n\tfunction bnpDivRemTo(m, q, r) {\n\t var pm = m.abs();\n\t if (pm.t <= 0) return;\n\t var pt = this.abs();\n\t if (pt.t < pm.t) {\n\t if (q != null) q.fromInt(0);\n\t if (r != null) this.copyTo(r);\n\t return;\n\t }\n\t if (r == null) r = nbi();\n\t var y = nbi(),\n\t ts = this.s,\n\t ms = m.s;\n\t var nsh = this.DB - nbits(pm[pm.t - 1]);\n\t // normalize modulus\n\t if (nsh > 0) {\n\t pm.lShiftTo(nsh, y);\n\t pt.lShiftTo(nsh, r);\n\t } else {\n\t pm.copyTo(y);\n\t pt.copyTo(r);\n\t }\n\t var ys = y.t;\n\t var y0 = y[ys - 1];\n\t if (y0 == 0) return;\n\t var yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0);\n\t var d1 = this.FV / yt,\n\t d2 = (1 << this.F1) / yt,\n\t e = 1 << this.F2;\n\t var i = r.t,\n\t j = i - ys,\n\t t = q == null ? nbi() : q;\n\t y.dlShiftTo(j, t);\n\t if (r.compareTo(t) >= 0) {\n\t r[r.t++] = 1;\n\t r.subTo(t, r);\n\t }\n\t BigInteger.ONE.dlShiftTo(ys, t);\n\t t.subTo(y, y);\n\t // \"negative\" y so we can replace sub with am later\n\t while (y.t < ys) {\n\t y[y.t++] = 0;\n\t }while (--j >= 0) {\n\t // Estimate quotient digit\n\t var qd = r[--i] == y0 ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n\t if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {\n\t // Try it out\n\t y.dlShiftTo(j, t);\n\t r.subTo(t, r);\n\t while (r[i] < --qd) {\n\t r.subTo(t, r);\n\t }\n\t }\n\t }\n\t if (q != null) {\n\t r.drShiftTo(ys, q);\n\t if (ts != ms) BigInteger.ZERO.subTo(q, q);\n\t }\n\t r.t = ys;\n\t r.clamp();\n\t if (nsh > 0) r.rShiftTo(nsh, r);\n\t // Denormalize remainder\n\t if (ts < 0) BigInteger.ZERO.subTo(r, r);\n\t}\n\t\n\t// (public) this mod a\n\tfunction bnMod(a) {\n\t var r = nbi();\n\t this.abs().divRemTo(a, null, r);\n\t if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r);\n\t return r;\n\t}\n\t\n\t// (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n\t// justification:\n\t// xy == 1 (mod m)\n\t// xy = 1+km\n\t// xy(2-xy) = (1+km)(1-km)\n\t// x[y(2-xy)] = 1-k^2m^2\n\t// x[y(2-xy)] == 1 (mod m^2)\n\t// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n\t// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n\t// JS multiply \"overflows\" differently from C/C++, so care is needed here.\n\tfunction bnpInvDigit() {\n\t if (this.t < 1) return 0;\n\t var x = this[0];\n\t if ((x & 1) == 0) return 0;\n\t var y = x & 3;\n\t // y == 1/x mod 2^2\n\t y = y * (2 - (x & 0xf) * y) & 0xf;\n\t // y == 1/x mod 2^4\n\t y = y * (2 - (x & 0xff) * y) & 0xff;\n\t // y == 1/x mod 2^8\n\t y = y * (2 - ((x & 0xffff) * y & 0xffff)) & 0xffff;\n\t // y == 1/x mod 2^16\n\t // last step - calculate inverse mod DV directly;\n\t // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n\t y = y * (2 - x * y % this.DV) % this.DV;\n\t // y == 1/x mod 2^dbits\n\t // we really want the negative inverse, and -DV < y < DV\n\t return y > 0 ? this.DV - y : -y;\n\t}\n\t\n\tfunction bnEquals(a) {\n\t return this.compareTo(a) == 0;\n\t}\n\t\n\t// (protected) r = this + a\n\tfunction bnpAddTo(a, r) {\n\t var i = 0,\n\t c = 0,\n\t m = Math.min(a.t, this.t);\n\t while (i < m) {\n\t c += this[i] + a[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t if (a.t < this.t) {\n\t c += a.s;\n\t while (i < this.t) {\n\t c += this[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t c += this.s;\n\t } else {\n\t c += this.s;\n\t while (i < a.t) {\n\t c += a[i];\n\t r[i++] = c & this.DM;\n\t c >>= this.DB;\n\t }\n\t c += a.s;\n\t }\n\t r.s = c < 0 ? -1 : 0;\n\t if (c > 0) r[i++] = c;else if (c < -1) r[i++] = this.DV + c;\n\t r.t = i;\n\t r.clamp();\n\t}\n\t\n\t// (public) this + a\n\tfunction bnAdd(a) {\n\t var r = nbi();\n\t\n\t this.addTo(a, r);\n\t\n\t return r;\n\t}\n\t\n\t// (public) this - a\n\tfunction bnSubtract(a) {\n\t var r = nbi();\n\t\n\t this.subTo(a, r);\n\t\n\t return r;\n\t}\n\t\n\t// (public) this * a\n\tfunction bnMultiply(a) {\n\t var r = nbi();\n\t\n\t this.multiplyTo(a, r);\n\t\n\t return r;\n\t}\n\t\n\t// (public) this / a\n\tfunction bnDivide(a) {\n\t var r = nbi();\n\t\n\t this.divRemTo(a, r, null);\n\t\n\t return r;\n\t}\n\t\n\t// Montgomery reduction\n\tfunction Montgomery(m) {\n\t this.m = m;\n\t this.mp = m.invDigit();\n\t this.mpl = this.mp & 0x7fff;\n\t this.mph = this.mp >> 15;\n\t this.um = (1 << m.DB - 15) - 1;\n\t this.mt2 = 2 * m.t;\n\t}\n\t\n\t// xR mod m\n\tfunction montConvert(x) {\n\t var r = nbi();\n\t x.abs().dlShiftTo(this.m.t, r);\n\t r.divRemTo(this.m, null, r);\n\t if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r);\n\t return r;\n\t}\n\t\n\t// x/R mod m\n\tfunction montRevert(x) {\n\t var r = nbi();\n\t x.copyTo(r);\n\t this.reduce(r);\n\t return r;\n\t}\n\t\n\t// x = x/R mod m (HAC 14.32)\n\tfunction montReduce(x) {\n\t while (x.t <= this.mt2) {\n\t // pad x so am has enough room later\n\t x[x.t++] = 0;\n\t }for (var i = 0; i < this.m.t; ++i) {\n\t // faster way of calculating u0 = x[i]*mp mod DV\n\t var j = x[i] & 0x7fff;\n\t var u0 = j * this.mpl + ((j * this.mph + (x[i] >> 15) * this.mpl & this.um) << 15) & x.DM;\n\t // use am to combine the multiply-shift-add into one call\n\t j = i + this.m.t;\n\t x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n\t // propagate carry\n\t while (x[j] >= x.DV) {\n\t x[j] -= x.DV;\n\t x[++j]++;\n\t }\n\t }\n\t x.clamp();\n\t x.drShiftTo(this.m.t, x);\n\t if (x.compareTo(this.m) >= 0) x.subTo(this.m, x);\n\t}\n\t\n\t// r = \"x^2/R mod m\"; x != r\n\tfunction montSqrTo(x, r) {\n\t x.squareTo(r);\n\t\n\t this.reduce(r);\n\t}\n\t\n\t// r = \"xy/R mod m\"; x,y != r\n\tfunction montMulTo(x, y, r) {\n\t x.multiplyTo(y, r);\n\t\n\t this.reduce(r);\n\t}\n\t\n\tMontgomery.prototype.convert = montConvert;\n\tMontgomery.prototype.revert = montRevert;\n\tMontgomery.prototype.reduce = montReduce;\n\tMontgomery.prototype.mulTo = montMulTo;\n\tMontgomery.prototype.sqrTo = montSqrTo;\n\t\n\t// (public) this^e % m (HAC 14.85)\n\tfunction bnModPow(e, m, callback) {\n\t var i = e.bitLength(),\n\t k,\n\t r = nbv(1),\n\t z = new Montgomery(m);\n\t if (i <= 0) return r;else if (i < 18) k = 1;else if (i < 48) k = 3;else if (i < 144) k = 4;else if (i < 768) k = 5;else k = 6;\n\t\n\t // precomputation\n\t var g = new Array(),\n\t n = 3,\n\t k1 = k - 1,\n\t km = (1 << k) - 1;\n\t g[1] = z.convert(this);\n\t if (k > 1) {\n\t var g2 = nbi();\n\t z.sqrTo(g[1], g2);\n\t while (n <= km) {\n\t g[n] = nbi();\n\t z.mulTo(g2, g[n - 2], g[n]);\n\t n += 2;\n\t }\n\t }\n\t\n\t var j = e.t - 1,\n\t w,\n\t is1 = true,\n\t r2 = nbi(),\n\t t;\n\t i = nbits(e[j]) - 1;\n\t while (j >= 0) {\n\t if (i >= k1) w = e[j] >> i - k1 & km;else {\n\t w = (e[j] & (1 << i + 1) - 1) << k1 - i;\n\t if (j > 0) w |= e[j - 1] >> this.DB + i - k1;\n\t }\n\t\n\t n = k;\n\t while ((w & 1) == 0) {\n\t w >>= 1;\n\t --n;\n\t }\n\t if ((i -= n) < 0) {\n\t i += this.DB;\n\t --j;\n\t }\n\t if (is1) {\n\t // ret == 1, don't bother squaring or multiplying it\n\t g[w].copyTo(r);\n\t is1 = false;\n\t } else {\n\t while (n > 1) {\n\t z.sqrTo(r, r2);\n\t z.sqrTo(r2, r);\n\t n -= 2;\n\t }\n\t if (n > 0) z.sqrTo(r, r2);else {\n\t t = r;\n\t r = r2;\n\t r2 = t;\n\t }\n\t z.mulTo(r2, g[w], r);\n\t }\n\t\n\t while (j >= 0 && (e[j] & 1 << i) == 0) {\n\t z.sqrTo(r, r2);\n\t t = r;\n\t r = r2;\n\t r2 = t;\n\t if (--i < 0) {\n\t i = this.DB - 1;\n\t --j;\n\t }\n\t }\n\t }\n\t var result = z.revert(r);\n\t callback(null, result);\n\t return result;\n\t}\n\t\n\t// protected\n\tBigInteger.prototype.copyTo = bnpCopyTo;\n\tBigInteger.prototype.fromInt = bnpFromInt;\n\tBigInteger.prototype.fromString = bnpFromString;\n\tBigInteger.prototype.clamp = bnpClamp;\n\tBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n\tBigInteger.prototype.drShiftTo = bnpDRShiftTo;\n\tBigInteger.prototype.lShiftTo = bnpLShiftTo;\n\tBigInteger.prototype.rShiftTo = bnpRShiftTo;\n\tBigInteger.prototype.subTo = bnpSubTo;\n\tBigInteger.prototype.multiplyTo = bnpMultiplyTo;\n\tBigInteger.prototype.squareTo = bnpSquareTo;\n\tBigInteger.prototype.divRemTo = bnpDivRemTo;\n\tBigInteger.prototype.invDigit = bnpInvDigit;\n\tBigInteger.prototype.addTo = bnpAddTo;\n\t\n\t// public\n\tBigInteger.prototype.toString = bnToString;\n\tBigInteger.prototype.negate = bnNegate;\n\tBigInteger.prototype.abs = bnAbs;\n\tBigInteger.prototype.compareTo = bnCompareTo;\n\tBigInteger.prototype.bitLength = bnBitLength;\n\tBigInteger.prototype.mod = bnMod;\n\tBigInteger.prototype.equals = bnEquals;\n\tBigInteger.prototype.add = bnAdd;\n\tBigInteger.prototype.subtract = bnSubtract;\n\tBigInteger.prototype.multiply = bnMultiply;\n\tBigInteger.prototype.divide = bnDivide;\n\tBigInteger.prototype.modPow = bnModPow;\n\t\n\t// \"constants\"\n\tBigInteger.ZERO = nbv(0);\n\tBigInteger.ONE = nbv(1);\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _CognitoJwtToken2 = __webpack_require__(7);\n\t\n\tvar _CognitoJwtToken3 = _interopRequireDefault(_CognitoJwtToken2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoAccessToken = function (_CognitoJwtToken) {\n\t _inherits(CognitoAccessToken, _CognitoJwtToken);\n\t\n\t /**\n\t * Constructs a new CognitoAccessToken object\n\t * @param {string=} AccessToken The JWT access token.\n\t */\n\t function CognitoAccessToken() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t AccessToken = _ref.AccessToken;\n\t\n\t _classCallCheck(this, CognitoAccessToken);\n\t\n\t return _possibleConstructorReturn(this, _CognitoJwtToken.call(this, AccessToken || ''));\n\t }\n\t\n\t return CognitoAccessToken;\n\t}(_CognitoJwtToken3.default);\n\t\n\texports.default = CognitoAccessToken;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _CognitoJwtToken2 = __webpack_require__(7);\n\t\n\tvar _CognitoJwtToken3 = _interopRequireDefault(_CognitoJwtToken2);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoIdToken = function (_CognitoJwtToken) {\n\t _inherits(CognitoIdToken, _CognitoJwtToken);\n\t\n\t /**\n\t * Constructs a new CognitoIdToken object\n\t * @param {string=} IdToken The JWT Id token\n\t */\n\t function CognitoIdToken() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t IdToken = _ref.IdToken;\n\t\n\t _classCallCheck(this, CognitoIdToken);\n\t\n\t return _possibleConstructorReturn(this, _CognitoJwtToken.call(this, IdToken || ''));\n\t }\n\t\n\t return CognitoIdToken;\n\t}(_CognitoJwtToken3.default);\n\t\n\texports.default = CognitoIdToken;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _buffer = __webpack_require__(1);\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoJwtToken = function () {\n\t /**\n\t * Constructs a new CognitoJwtToken object\n\t * @param {string=} token The JWT token.\n\t */\n\t function CognitoJwtToken(token) {\n\t _classCallCheck(this, CognitoJwtToken);\n\t\n\t // Assign object\n\t this.jwtToken = token || '';\n\t this.payload = this.decodePayload();\n\t }\n\t\n\t /**\n\t * @returns {string} the record's token.\n\t */\n\t\n\t\n\t CognitoJwtToken.prototype.getJwtToken = function getJwtToken() {\n\t return this.jwtToken;\n\t };\n\t\n\t /**\n\t * @returns {int} the token's expiration (exp member).\n\t */\n\t\n\t\n\t CognitoJwtToken.prototype.getExpiration = function getExpiration() {\n\t return this.payload.exp;\n\t };\n\t\n\t /**\n\t * @returns {int} the token's \"issued at\" (iat member).\n\t */\n\t\n\t\n\t CognitoJwtToken.prototype.getIssuedAt = function getIssuedAt() {\n\t return this.payload.iat;\n\t };\n\t\n\t /**\n\t * @returns {object} the token's payload.\n\t */\n\t\n\t\n\t CognitoJwtToken.prototype.decodePayload = function decodePayload() {\n\t var payload = this.jwtToken.split('.')[1];\n\t try {\n\t return JSON.parse(_buffer.Buffer.from(payload, 'base64').toString('utf8'));\n\t } catch (err) {\n\t return {};\n\t }\n\t };\n\t\n\t return CognitoJwtToken;\n\t}();\n\t\n\texports.default = CognitoJwtToken;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoRefreshToken = function () {\n\t /**\n\t * Constructs a new CognitoRefreshToken object\n\t * @param {string=} RefreshToken The JWT refresh token.\n\t */\n\t function CognitoRefreshToken() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t RefreshToken = _ref.RefreshToken;\n\t\n\t _classCallCheck(this, CognitoRefreshToken);\n\t\n\t // Assign object\n\t this.token = RefreshToken || '';\n\t }\n\t\n\t /**\n\t * @returns {string} the record's token.\n\t */\n\t\n\t\n\t CognitoRefreshToken.prototype.getToken = function getToken() {\n\t return this.token;\n\t };\n\t\n\t return CognitoRefreshToken;\n\t}();\n\t\n\texports.default = CognitoRefreshToken;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _buffer = __webpack_require__(1);\n\t\n\tvar _cryptoBrowserify = __webpack_require__(14);\n\t\n\tvar crypto = _interopRequireWildcard(_cryptoBrowserify);\n\t\n\tvar _BigInteger = __webpack_require__(4);\n\t\n\tvar _BigInteger2 = _interopRequireDefault(_BigInteger);\n\t\n\tvar _AuthenticationHelper = __webpack_require__(3);\n\t\n\tvar _AuthenticationHelper2 = _interopRequireDefault(_AuthenticationHelper);\n\t\n\tvar _CognitoAccessToken = __webpack_require__(5);\n\t\n\tvar _CognitoAccessToken2 = _interopRequireDefault(_CognitoAccessToken);\n\t\n\tvar _CognitoIdToken = __webpack_require__(6);\n\t\n\tvar _CognitoIdToken2 = _interopRequireDefault(_CognitoIdToken);\n\t\n\tvar _CognitoRefreshToken = __webpack_require__(8);\n\t\n\tvar _CognitoRefreshToken2 = _interopRequireDefault(_CognitoRefreshToken);\n\t\n\tvar _CognitoUserSession = __webpack_require__(11);\n\t\n\tvar _CognitoUserSession2 = _interopRequireDefault(_CognitoUserSession);\n\t\n\tvar _DateHelper = __webpack_require__(12);\n\t\n\tvar _DateHelper2 = _interopRequireDefault(_DateHelper);\n\t\n\tvar _CognitoUserAttribute = __webpack_require__(10);\n\t\n\tvar _CognitoUserAttribute2 = _interopRequireDefault(_CognitoUserAttribute);\n\t\n\tvar _StorageHelper = __webpack_require__(13);\n\t\n\tvar _StorageHelper2 = _interopRequireDefault(_StorageHelper);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t//import createHmac from 'create-hmac';\n\t\n\t\n\tvar createHmac = crypto.createHmac;\n\t\n\t/**\n\t * @callback nodeCallback\n\t * @template T result\n\t * @param {*} err The operation failure reason, or null.\n\t * @param {T} result The operation result.\n\t */\n\t\n\t/**\n\t * @callback onFailure\n\t * @param {*} err Failure reason.\n\t */\n\t\n\t/**\n\t * @callback onSuccess\n\t * @template T result\n\t * @param {T} result The operation result.\n\t */\n\t\n\t/**\n\t * @callback mfaRequired\n\t * @param {*} details MFA challenge details.\n\t */\n\t\n\t/**\n\t * @callback customChallenge\n\t * @param {*} details Custom challenge details.\n\t */\n\t\n\t/**\n\t * @callback inputVerificationCode\n\t * @param {*} data Server response.\n\t */\n\t\n\t/**\n\t * @callback authSuccess\n\t * @param {CognitoUserSession} session The new session.\n\t * @param {bool=} userConfirmationNecessary User must be confirmed.\n\t */\n\t\n\t/** @class */\n\tvar CognitoUser = function () {\n\t /**\n\t * Constructs a new CognitoUser object\n\t * @param {object} data Creation options\n\t * @param {string} data.Username The user's username.\n\t * @param {CognitoUserPool} data.Pool Pool containing the user.\n\t * @param {object} data.Storage Optional storage object.\n\t */\n\t function CognitoUser(data) {\n\t _classCallCheck(this, CognitoUser);\n\t\n\t if (data == null || data.Username == null || data.Pool == null) {\n\t throw new Error('Username and pool information are required.');\n\t }\n\t\n\t this.username = data.Username || '';\n\t this.pool = data.Pool;\n\t this.Session = null;\n\t\n\t this.client = data.Pool.client;\n\t\n\t this.signInUserSession = null;\n\t this.authenticationFlowType = 'USER_SRP_AUTH';\n\t\n\t this.storage = data.Storage || new _StorageHelper2.default().getStorage();\n\t }\n\t\n\t /**\n\t * Sets the session for this user\n\t * @param {CognitoUserSession} signInUserSession the session\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.setSignInUserSession = function setSignInUserSession(signInUserSession) {\n\t this.clearCachedTokens();\n\t this.signInUserSession = signInUserSession;\n\t this.cacheTokens();\n\t };\n\t\n\t /**\n\t * @returns {CognitoUserSession} the current session for this user\n\t */\n\t\n\t\n\t CognitoUser.prototype.getSignInUserSession = function getSignInUserSession() {\n\t return this.signInUserSession;\n\t };\n\t\n\t /**\n\t * @returns {string} the user's username\n\t */\n\t\n\t\n\t CognitoUser.prototype.getUsername = function getUsername() {\n\t return this.username;\n\t };\n\t\n\t /**\n\t * @returns {String} the authentication flow type\n\t */\n\t\n\t\n\t CognitoUser.prototype.getAuthenticationFlowType = function getAuthenticationFlowType() {\n\t return this.authenticationFlowType;\n\t };\n\t\n\t /**\n\t * sets authentication flow type\n\t * @param {string} authenticationFlowType New value.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.setAuthenticationFlowType = function setAuthenticationFlowType(authenticationFlowType) {\n\t this.authenticationFlowType = authenticationFlowType;\n\t };\n\t\n\t /**\n\t * This is used for authenticating the user through the custom authentication flow.\n\t * @param {AuthenticationDetails} authDetails Contains the authentication data\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {customChallenge} callback.customChallenge Custom challenge\n\t * response required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.initiateAuth = function initiateAuth(authDetails, callback) {\n\t var _this = this;\n\t\n\t var authParameters = authDetails.getAuthParameters();\n\t authParameters.USERNAME = this.username;\n\t\n\t var jsonReq = {\n\t AuthFlow: 'CUSTOM_AUTH',\n\t ClientId: this.pool.getClientId(),\n\t AuthParameters: authParameters,\n\t ClientMetadata: authDetails.getValidationData()\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t\n\t this.client.request('InitiateAuth', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t var challengeName = data.ChallengeName;\n\t var challengeParameters = data.ChallengeParameters;\n\t\n\t if (challengeName === 'CUSTOM_CHALLENGE') {\n\t _this.Session = data.Session;\n\t return callback.customChallenge(challengeParameters);\n\t }\n\t _this.signInUserSession = _this.getCognitoUserSession(data.AuthenticationResult);\n\t _this.cacheTokens();\n\t return callback.onSuccess(_this.signInUserSession);\n\t });\n\t };\n\t\n\t /**\n\t * This is used for authenticating the user.\n\t * stuff\n\t * @param {AuthenticationDetails} authDetails Contains the authentication data\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {newPasswordRequired} callback.newPasswordRequired new\n\t * password and any required attributes are required to continue\n\t * @param {mfaRequired} callback.mfaRequired MFA code\n\t * required to continue.\n\t * @param {customChallenge} callback.customChallenge Custom challenge\n\t * response required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.authenticateUser = function authenticateUser(authDetails, callback) {\n\t if (this.authenticationFlowType === 'USER_PASSWORD_AUTH') {\n\t return this.authenticateUserPlainUsernamePassword(authDetails, callback);\n\t } else if (this.authenticationFlowType === 'USER_SRP_AUTH') {\n\t return this.authenticateUserDefaultAuth(authDetails, callback);\n\t }\n\t return callback.onFailure(new Error('Authentication flow type is invalid.'));\n\t };\n\t\n\t /**\n\t * PRIVATE ONLY: This is an internal only method and should not\n\t * be directly called by the consumers.\n\t * It calls the AuthenticationHelper for SRP related\n\t * stuff\n\t * @param {AuthenticationDetails} authDetails Contains the authentication data\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {newPasswordRequired} callback.newPasswordRequired new\n\t * password and any required attributes are required to continue\n\t * @param {mfaRequired} callback.mfaRequired MFA code\n\t * required to continue.\n\t * @param {customChallenge} callback.customChallenge Custom challenge\n\t * response required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.authenticateUserDefaultAuth = function authenticateUserDefaultAuth(authDetails, callback) {\n\t var _this2 = this;\n\t\n\t var authenticationHelper = new _AuthenticationHelper2.default(this.pool.getUserPoolId().split('_')[1]);\n\t var dateHelper = new _DateHelper2.default();\n\t\n\t var serverBValue = void 0;\n\t var salt = void 0;\n\t var authParameters = {};\n\t\n\t if (this.deviceKey != null) {\n\t authParameters.DEVICE_KEY = this.deviceKey;\n\t }\n\t\n\t authParameters.USERNAME = this.username;\n\t authenticationHelper.getLargeAValue(function (errOnAValue, aValue) {\n\t // getLargeAValue callback start\n\t if (errOnAValue) {\n\t callback.onFailure(errOnAValue);\n\t }\n\t\n\t authParameters.SRP_A = aValue.toString(16);\n\t\n\t if (_this2.authenticationFlowType === 'CUSTOM_AUTH') {\n\t authParameters.CHALLENGE_NAME = 'SRP_A';\n\t }\n\t\n\t var jsonReq = {\n\t AuthFlow: _this2.authenticationFlowType,\n\t ClientId: _this2.pool.getClientId(),\n\t AuthParameters: authParameters,\n\t ClientMetadata: authDetails.getValidationData()\n\t };\n\t if (_this2.getUserContextData(_this2.username)) {\n\t jsonReq.UserContextData = _this2.getUserContextData(_this2.username);\n\t }\n\t\n\t _this2.client.request('InitiateAuth', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t\n\t var challengeParameters = data.ChallengeParameters;\n\t\n\t _this2.username = challengeParameters.USER_ID_FOR_SRP;\n\t serverBValue = new _BigInteger2.default(challengeParameters.SRP_B, 16);\n\t salt = new _BigInteger2.default(challengeParameters.SALT, 16);\n\t _this2.getCachedDeviceKeyAndPassword();\n\t\n\t authenticationHelper.getPasswordAuthenticationKey(_this2.username, authDetails.getPassword(), serverBValue, salt, function (errOnHkdf, hkdf) {\n\t // getPasswordAuthenticationKey callback start\n\t if (errOnHkdf) {\n\t callback.onFailure(errOnHkdf);\n\t }\n\t\n\t var dateNow = dateHelper.getNowString();\n\t\n\t var signatureString = createHmac('sha256', hkdf).update(_buffer.Buffer.concat([_buffer.Buffer.from(_this2.pool.getUserPoolId().split('_')[1], 'utf8'), _buffer.Buffer.from(_this2.username, 'utf8'), _buffer.Buffer.from(challengeParameters.SECRET_BLOCK, 'base64'), _buffer.Buffer.from(dateNow, 'utf8')])).digest('base64');\n\t\n\t var challengeResponses = {};\n\t\n\t challengeResponses.USERNAME = _this2.username;\n\t challengeResponses.PASSWORD_CLAIM_SECRET_BLOCK = challengeParameters.SECRET_BLOCK;\n\t challengeResponses.TIMESTAMP = dateNow;\n\t challengeResponses.PASSWORD_CLAIM_SIGNATURE = signatureString;\n\t\n\t if (_this2.deviceKey != null) {\n\t challengeResponses.DEVICE_KEY = _this2.deviceKey;\n\t }\n\t\n\t var respondToAuthChallenge = function respondToAuthChallenge(challenge, challengeCallback) {\n\t return _this2.client.request('RespondToAuthChallenge', challenge, function (errChallenge, dataChallenge) {\n\t if (errChallenge && errChallenge.code === 'ResourceNotFoundException' && errChallenge.message.toLowerCase().indexOf('device') !== -1) {\n\t challengeResponses.DEVICE_KEY = null;\n\t _this2.deviceKey = null;\n\t _this2.randomPassword = null;\n\t _this2.deviceGroupKey = null;\n\t _this2.clearCachedDeviceKeyAndPassword();\n\t return respondToAuthChallenge(challenge, challengeCallback);\n\t }\n\t return challengeCallback(errChallenge, dataChallenge);\n\t });\n\t };\n\t\n\t var jsonReqResp = {\n\t ChallengeName: 'PASSWORD_VERIFIER',\n\t ClientId: _this2.pool.getClientId(),\n\t ChallengeResponses: challengeResponses,\n\t Session: data.Session\n\t };\n\t if (_this2.getUserContextData()) {\n\t jsonReqResp.UserContextData = _this2.getUserContextData();\n\t }\n\t respondToAuthChallenge(jsonReqResp, function (errAuthenticate, dataAuthenticate) {\n\t if (errAuthenticate) {\n\t return callback.onFailure(errAuthenticate);\n\t }\n\t\n\t var challengeName = dataAuthenticate.ChallengeName;\n\t if (challengeName === 'NEW_PASSWORD_REQUIRED') {\n\t _this2.Session = dataAuthenticate.Session;\n\t var userAttributes = null;\n\t var rawRequiredAttributes = null;\n\t var requiredAttributes = [];\n\t var userAttributesPrefix = authenticationHelper.getNewPasswordRequiredChallengeUserAttributePrefix();\n\t\n\t if (dataAuthenticate.ChallengeParameters) {\n\t userAttributes = JSON.parse(dataAuthenticate.ChallengeParameters.userAttributes);\n\t rawRequiredAttributes = JSON.parse(dataAuthenticate.ChallengeParameters.requiredAttributes);\n\t }\n\t\n\t if (rawRequiredAttributes) {\n\t for (var i = 0; i < rawRequiredAttributes.length; i++) {\n\t requiredAttributes[i] = rawRequiredAttributes[i].substr(userAttributesPrefix.length);\n\t }\n\t }\n\t return callback.newPasswordRequired(userAttributes, requiredAttributes);\n\t }\n\t return _this2.authenticateUserInternal(dataAuthenticate, authenticationHelper, callback);\n\t });\n\t return undefined;\n\t // getPasswordAuthenticationKey callback end\n\t });\n\t return undefined;\n\t });\n\t // getLargeAValue callback end\n\t });\n\t };\n\t\n\t /**\n\t * PRIVATE ONLY: This is an internal only method and should not\n\t * be directly called by the consumers.\n\t * @param {AuthenticationDetails} authDetails Contains the authentication data.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {mfaRequired} callback.mfaRequired MFA code\n\t * required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.authenticateUserPlainUsernamePassword = function authenticateUserPlainUsernamePassword(authDetails, callback) {\n\t var _this3 = this;\n\t\n\t var authParameters = {};\n\t authParameters.USERNAME = this.username;\n\t authParameters.PASSWORD = authDetails.getPassword();\n\t if (!authParameters.PASSWORD) {\n\t callback.onFailure(new Error('PASSWORD parameter is required'));\n\t return;\n\t }\n\t var authenticationHelper = new _AuthenticationHelper2.default(this.pool.getUserPoolId().split('_')[1]);\n\t this.getCachedDeviceKeyAndPassword();\n\t if (this.deviceKey != null) {\n\t authParameters.DEVICE_KEY = this.deviceKey;\n\t }\n\t\n\t var jsonReq = {\n\t AuthFlow: 'USER_PASSWORD_AUTH',\n\t ClientId: this.pool.getClientId(),\n\t AuthParameters: authParameters,\n\t ClientMetadata: authDetails.getValidationData()\n\t };\n\t if (this.getUserContextData(this.username)) {\n\t jsonReq.UserContextData = this.getUserContextData(this.username);\n\t }\n\t // USER_PASSWORD_AUTH happens in a single round-trip: client sends userName and password,\n\t // Cognito UserPools verifies password and returns tokens.\n\t this.client.request('InitiateAuth', jsonReq, function (err, authResult) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return _this3.authenticateUserInternal(authResult, authenticationHelper, callback);\n\t });\n\t };\n\t\n\t /**\n\t * PRIVATE ONLY: This is an internal only method and should not\n\t * be directly called by the consumers.\n\t * @param {object} dataAuthenticate authentication data\n\t * @param {object} authenticationHelper helper created\n\t * @param {callback} callback passed on from caller\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.authenticateUserInternal = function authenticateUserInternal(dataAuthenticate, authenticationHelper, callback) {\n\t var _this4 = this;\n\t\n\t var challengeName = dataAuthenticate.ChallengeName;\n\t var challengeParameters = dataAuthenticate.ChallengeParameters;\n\t\n\t if (challengeName === 'SMS_MFA') {\n\t this.Session = dataAuthenticate.Session;\n\t return callback.mfaRequired(challengeName, challengeParameters);\n\t }\n\t\n\t if (challengeName === 'SELECT_MFA_TYPE') {\n\t this.Session = dataAuthenticate.Session;\n\t return callback.selectMFAType(challengeName, challengeParameters);\n\t }\n\t\n\t if (challengeName === 'MFA_SETUP') {\n\t this.Session = dataAuthenticate.Session;\n\t return callback.mfaSetup(challengeName, challengeParameters);\n\t }\n\t\n\t if (challengeName === 'SOFTWARE_TOKEN_MFA') {\n\t this.Session = dataAuthenticate.Session;\n\t return callback.totpRequired(challengeName, challengeParameters);\n\t }\n\t\n\t if (challengeName === 'CUSTOM_CHALLENGE') {\n\t this.Session = dataAuthenticate.Session;\n\t return callback.customChallenge(challengeParameters);\n\t }\n\t\n\t if (challengeName === 'DEVICE_SRP_AUTH') {\n\t this.getDeviceResponse(callback);\n\t return undefined;\n\t }\n\t\n\t this.signInUserSession = this.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n\t this.cacheTokens();\n\t\n\t var newDeviceMetadata = dataAuthenticate.AuthenticationResult.NewDeviceMetadata;\n\t if (newDeviceMetadata == null) {\n\t return callback.onSuccess(this.signInUserSession);\n\t }\n\t\n\t authenticationHelper.generateHashDevice(dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey, function (errGenHash) {\n\t if (errGenHash) {\n\t return callback.onFailure(errGenHash);\n\t }\n\t\n\t var deviceSecretVerifierConfig = {\n\t Salt: _buffer.Buffer.from(authenticationHelper.getSaltDevices(), 'hex').toString('base64'),\n\t PasswordVerifier: _buffer.Buffer.from(authenticationHelper.getVerifierDevices(), 'hex').toString('base64')\n\t };\n\t\n\t _this4.verifierDevices = deviceSecretVerifierConfig.PasswordVerifier;\n\t _this4.deviceGroupKey = newDeviceMetadata.DeviceGroupKey;\n\t _this4.randomPassword = authenticationHelper.getRandomPassword();\n\t\n\t _this4.client.request('ConfirmDevice', {\n\t DeviceKey: newDeviceMetadata.DeviceKey,\n\t AccessToken: _this4.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n\t DeviceName: navigator.userAgent\n\t }, function (errConfirm, dataConfirm) {\n\t if (errConfirm) {\n\t return callback.onFailure(errConfirm);\n\t }\n\t\n\t _this4.deviceKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey;\n\t _this4.cacheDeviceKeyAndPassword();\n\t if (dataConfirm.UserConfirmationNecessary === true) {\n\t return callback.onSuccess(_this4.signInUserSession, dataConfirm.UserConfirmationNecessary);\n\t }\n\t return callback.onSuccess(_this4.signInUserSession);\n\t });\n\t return undefined;\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This method is user to complete the NEW_PASSWORD_REQUIRED challenge.\n\t * Pass the new password with any new user attributes to be updated.\n\t * User attribute keys must be of format userAttributes..\n\t * @param {string} newPassword new password for this user\n\t * @param {object} requiredAttributeData map with values for all required attributes\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {mfaRequired} callback.mfaRequired MFA code required to continue.\n\t * @param {customChallenge} callback.customChallenge Custom challenge\n\t * response required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.completeNewPasswordChallenge = function completeNewPasswordChallenge(newPassword, requiredAttributeData, callback) {\n\t var _this5 = this;\n\t\n\t if (!newPassword) {\n\t return callback.onFailure(new Error('New password is required.'));\n\t }\n\t var authenticationHelper = new _AuthenticationHelper2.default(this.pool.getUserPoolId().split('_')[1]);\n\t var userAttributesPrefix = authenticationHelper.getNewPasswordRequiredChallengeUserAttributePrefix();\n\t\n\t var finalUserAttributes = {};\n\t if (requiredAttributeData) {\n\t Object.keys(requiredAttributeData).forEach(function (key) {\n\t finalUserAttributes[userAttributesPrefix + key] = requiredAttributeData[key];\n\t });\n\t }\n\t\n\t finalUserAttributes.NEW_PASSWORD = newPassword;\n\t finalUserAttributes.USERNAME = this.username;\n\t var jsonReq = {\n\t ChallengeName: 'NEW_PASSWORD_REQUIRED',\n\t ClientId: this.pool.getClientId(),\n\t ChallengeResponses: finalUserAttributes,\n\t Session: this.Session\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t\n\t this.client.request('RespondToAuthChallenge', jsonReq, function (errAuthenticate, dataAuthenticate) {\n\t if (errAuthenticate) {\n\t return callback.onFailure(errAuthenticate);\n\t }\n\t return _this5.authenticateUserInternal(dataAuthenticate, authenticationHelper, callback);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to get a session using device authentication. It is called at the end of user\n\t * authentication\n\t *\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t * @private\n\t */\n\t\n\t\n\t CognitoUser.prototype.getDeviceResponse = function getDeviceResponse(callback) {\n\t var _this6 = this;\n\t\n\t var authenticationHelper = new _AuthenticationHelper2.default(this.deviceGroupKey);\n\t var dateHelper = new _DateHelper2.default();\n\t\n\t var authParameters = {};\n\t\n\t authParameters.USERNAME = this.username;\n\t authParameters.DEVICE_KEY = this.deviceKey;\n\t authenticationHelper.getLargeAValue(function (errAValue, aValue) {\n\t // getLargeAValue callback start\n\t if (errAValue) {\n\t callback.onFailure(errAValue);\n\t }\n\t\n\t authParameters.SRP_A = aValue.toString(16);\n\t\n\t var jsonReq = {\n\t ChallengeName: 'DEVICE_SRP_AUTH',\n\t ClientId: _this6.pool.getClientId(),\n\t ChallengeResponses: authParameters\n\t };\n\t if (_this6.getUserContextData()) {\n\t jsonReq.UserContextData = _this6.getUserContextData();\n\t }\n\t _this6.client.request('RespondToAuthChallenge', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t\n\t var challengeParameters = data.ChallengeParameters;\n\t\n\t var serverBValue = new _BigInteger2.default(challengeParameters.SRP_B, 16);\n\t var salt = new _BigInteger2.default(challengeParameters.SALT, 16);\n\t\n\t authenticationHelper.getPasswordAuthenticationKey(_this6.deviceKey, _this6.randomPassword, serverBValue, salt, function (errHkdf, hkdf) {\n\t // getPasswordAuthenticationKey callback start\n\t if (errHkdf) {\n\t return callback.onFailure(errHkdf);\n\t }\n\t\n\t var dateNow = dateHelper.getNowString();\n\t\n\t var signatureString = createHmac('sha256', hkdf).update(_buffer.Buffer.concat([_buffer.Buffer.from(_this6.deviceGroupKey, 'utf8'), _buffer.Buffer.from(_this6.deviceKey, 'utf8'), _buffer.Buffer.from(challengeParameters.SECRET_BLOCK, 'base64'), _buffer.Buffer.from(dateNow, 'utf8')])).digest('base64');\n\t\n\t var challengeResponses = {};\n\t\n\t challengeResponses.USERNAME = _this6.username;\n\t challengeResponses.PASSWORD_CLAIM_SECRET_BLOCK = challengeParameters.SECRET_BLOCK;\n\t challengeResponses.TIMESTAMP = dateNow;\n\t challengeResponses.PASSWORD_CLAIM_SIGNATURE = signatureString;\n\t challengeResponses.DEVICE_KEY = _this6.deviceKey;\n\t\n\t var jsonReqResp = {\n\t ChallengeName: 'DEVICE_PASSWORD_VERIFIER',\n\t ClientId: _this6.pool.getClientId(),\n\t ChallengeResponses: challengeResponses,\n\t Session: data.Session\n\t };\n\t if (_this6.getUserContextData()) {\n\t jsonReqResp.UserContextData = _this6.getUserContextData();\n\t }\n\t\n\t _this6.client.request('RespondToAuthChallenge', jsonReqResp, function (errAuthenticate, dataAuthenticate) {\n\t if (errAuthenticate) {\n\t return callback.onFailure(errAuthenticate);\n\t }\n\t\n\t _this6.signInUserSession = _this6.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n\t _this6.cacheTokens();\n\t\n\t return callback.onSuccess(_this6.signInUserSession);\n\t });\n\t return undefined;\n\t // getPasswordAuthenticationKey callback end\n\t });\n\t return undefined;\n\t });\n\t // getLargeAValue callback end\n\t });\n\t };\n\t\n\t /**\n\t * This is used for a certain user to confirm the registration by using a confirmation code\n\t * @param {string} confirmationCode Code entered by user.\n\t * @param {bool} forceAliasCreation Allow migrating from an existing email / phone number.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.confirmRegistration = function confirmRegistration(confirmationCode, forceAliasCreation, callback) {\n\t var jsonReq = {\n\t ClientId: this.pool.getClientId(),\n\t ConfirmationCode: confirmationCode,\n\t Username: this.username,\n\t ForceAliasCreation: forceAliasCreation\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('ConfirmSignUp', jsonReq, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t };\n\t\n\t /**\n\t * This is used by the user once he has the responses to a custom challenge\n\t * @param {string} answerChallenge The custom challange answer.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {customChallenge} callback.customChallenge\n\t * Custom challenge response required to continue.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.sendCustomChallengeAnswer = function sendCustomChallengeAnswer(answerChallenge, callback) {\n\t var _this7 = this;\n\t\n\t var challengeResponses = {};\n\t challengeResponses.USERNAME = this.username;\n\t challengeResponses.ANSWER = answerChallenge;\n\t\n\t var authenticationHelper = new _AuthenticationHelper2.default(this.pool.getUserPoolId().split('_')[1]);\n\t this.getCachedDeviceKeyAndPassword();\n\t if (this.deviceKey != null) {\n\t challengeResponses.DEVICE_KEY = this.deviceKey;\n\t }\n\t\n\t var jsonReq = {\n\t ChallengeName: 'CUSTOM_CHALLENGE',\n\t ChallengeResponses: challengeResponses,\n\t ClientId: this.pool.getClientId(),\n\t Session: this.Session\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('RespondToAuthChallenge', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t\n\t return _this7.authenticateUserInternal(data, authenticationHelper, callback);\n\t });\n\t };\n\t\n\t /**\n\t * This is used by the user once he has an MFA code\n\t * @param {string} confirmationCode The MFA code entered by the user.\n\t * @param {object} callback Result callback map.\n\t * @param {string} mfaType The mfa we are replying to.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {authSuccess} callback.onSuccess Called on success with the new session.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.sendMFACode = function sendMFACode(confirmationCode, callback, mfaType) {\n\t var _this8 = this;\n\t\n\t var challengeResponses = {};\n\t challengeResponses.USERNAME = this.username;\n\t challengeResponses.SMS_MFA_CODE = confirmationCode;\n\t var mfaTypeSelection = mfaType || 'SMS_MFA';\n\t if (mfaTypeSelection === 'SOFTWARE_TOKEN_MFA') {\n\t challengeResponses.SOFTWARE_TOKEN_MFA_CODE = confirmationCode;\n\t }\n\t\n\t if (this.deviceKey != null) {\n\t challengeResponses.DEVICE_KEY = this.deviceKey;\n\t }\n\t\n\t var jsonReq = {\n\t ChallengeName: mfaTypeSelection,\n\t ChallengeResponses: challengeResponses,\n\t ClientId: this.pool.getClientId(),\n\t Session: this.Session\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t\n\t this.client.request('RespondToAuthChallenge', jsonReq, function (err, dataAuthenticate) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t\n\t var challengeName = dataAuthenticate.ChallengeName;\n\t\n\t if (challengeName === 'DEVICE_SRP_AUTH') {\n\t _this8.getDeviceResponse(callback);\n\t return undefined;\n\t }\n\t\n\t _this8.signInUserSession = _this8.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n\t _this8.cacheTokens();\n\t\n\t if (dataAuthenticate.AuthenticationResult.NewDeviceMetadata == null) {\n\t return callback.onSuccess(_this8.signInUserSession);\n\t }\n\t\n\t var authenticationHelper = new _AuthenticationHelper2.default(_this8.pool.getUserPoolId().split('_')[1]);\n\t authenticationHelper.generateHashDevice(dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey, dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey, function (errGenHash) {\n\t if (errGenHash) {\n\t return callback.onFailure(errGenHash);\n\t }\n\t\n\t var deviceSecretVerifierConfig = {\n\t Salt: _buffer.Buffer.from(authenticationHelper.getSaltDevices(), 'hex').toString('base64'),\n\t PasswordVerifier: _buffer.Buffer.from(authenticationHelper.getVerifierDevices(), 'hex').toString('base64')\n\t };\n\t\n\t _this8.verifierDevices = deviceSecretVerifierConfig.PasswordVerifier;\n\t _this8.deviceGroupKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey;\n\t _this8.randomPassword = authenticationHelper.getRandomPassword();\n\t\n\t _this8.client.request('ConfirmDevice', {\n\t DeviceKey: dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey,\n\t AccessToken: _this8.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n\t DeviceName: navigator.userAgent\n\t }, function (errConfirm, dataConfirm) {\n\t if (errConfirm) {\n\t return callback.onFailure(errConfirm);\n\t }\n\t\n\t _this8.deviceKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey;\n\t _this8.cacheDeviceKeyAndPassword();\n\t if (dataConfirm.UserConfirmationNecessary === true) {\n\t return callback.onSuccess(_this8.signInUserSession, dataConfirm.UserConfirmationNecessary);\n\t }\n\t return callback.onSuccess(_this8.signInUserSession);\n\t });\n\t return undefined;\n\t });\n\t return undefined;\n\t });\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to change the current password\n\t * @param {string} oldUserPassword The current password.\n\t * @param {string} newUserPassword The requested new password.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.changePassword = function changePassword(oldUserPassword, newUserPassword, callback) {\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('ChangePassword', {\n\t PreviousPassword: oldUserPassword,\n\t ProposedPassword: newUserPassword,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to enable MFA for himself\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.enableMFA = function enableMFA(callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t var mfaOptions = [];\n\t var mfaEnabled = {\n\t DeliveryMedium: 'SMS',\n\t AttributeName: 'phone_number'\n\t };\n\t mfaOptions.push(mfaEnabled);\n\t\n\t this.client.request('SetUserSettings', {\n\t MFAOptions: mfaOptions,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to enable MFA for himself\n\t * @param {string[]} smsMfaSettings the sms mfa settings\n\t * @param {string[]} softwareTokenMfaSettings the software token mfa settings\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.setUserMfaPreference = function setUserMfaPreference(smsMfaSettings, softwareTokenMfaSettings, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('SetUserMFAPreference', {\n\t SMSMfaSettings: smsMfaSettings,\n\t SoftwareTokenMfaSettings: softwareTokenMfaSettings,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to disable MFA for himself\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.disableMFA = function disableMFA(callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t var mfaOptions = [];\n\t\n\t this.client.request('SetUserSettings', {\n\t MFAOptions: mfaOptions,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to delete himself\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.deleteUser = function deleteUser(callback) {\n\t var _this9 = this;\n\t\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('DeleteUser', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t _this9.clearCachedTokens();\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * @typedef {CognitoUserAttribute | { Name:string, Value:string }} AttributeArg\n\t */\n\t /**\n\t * This is used by an authenticated user to change a list of attributes\n\t * @param {AttributeArg[]} attributes A list of the new user attributes.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.updateAttributes = function updateAttributes(attributes, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('UpdateUserAttributes', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t UserAttributes: attributes\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to get a list of attributes\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getUserAttributes = function getUserAttributes(callback) {\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('GetUser', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err, userData) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t\n\t var attributeList = [];\n\t\n\t for (var i = 0; i < userData.UserAttributes.length; i++) {\n\t var attribute = {\n\t Name: userData.UserAttributes[i].Name,\n\t Value: userData.UserAttributes[i].Value\n\t };\n\t var userAttribute = new _CognitoUserAttribute2.default(attribute);\n\t attributeList.push(userAttribute);\n\t }\n\t\n\t return callback(null, attributeList);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to get the MFAOptions\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getMFAOptions = function getMFAOptions(callback) {\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('GetUser', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err, userData) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t\n\t return callback(null, userData.MFAOptions);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated users to get the userData\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getUserData = function getUserData(callback) {\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('GetUser', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err, userData) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t\n\t return callback(null, userData);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by an authenticated user to delete a list of attributes\n\t * @param {string[]} attributeList Names of the attributes to delete.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.deleteAttributes = function deleteAttributes(attributeList, callback) {\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t return callback(new Error('User is not authenticated'), null);\n\t }\n\t\n\t this.client.request('DeleteUserAttributes', {\n\t UserAttributeNames: attributeList,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, 'SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used by a user to resend a confirmation code\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.resendConfirmationCode = function resendConfirmationCode(callback) {\n\t var jsonReq = {\n\t ClientId: this.pool.getClientId(),\n\t Username: this.username\n\t };\n\t\n\t this.client.request('ResendConfirmationCode', jsonReq, function (err, result) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t return callback(null, result);\n\t });\n\t };\n\t\n\t /**\n\t * This is used to get a session, either from the session object\n\t * or from the local storage, or by using a refresh token\n\t *\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getSession = function getSession(callback) {\n\t if (this.username == null) {\n\t return callback(new Error('Username is null. Cannot retrieve a new session'), null);\n\t }\n\t\n\t if (this.signInUserSession != null && this.signInUserSession.isValid()) {\n\t return callback(null, this.signInUserSession);\n\t }\n\t\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId() + '.' + this.username;\n\t var idTokenKey = keyPrefix + '.idToken';\n\t var accessTokenKey = keyPrefix + '.accessToken';\n\t var refreshTokenKey = keyPrefix + '.refreshToken';\n\t var clockDriftKey = keyPrefix + '.clockDrift';\n\t\n\t if (this.storage.getItem(idTokenKey)) {\n\t var idToken = new _CognitoIdToken2.default({\n\t IdToken: this.storage.getItem(idTokenKey)\n\t });\n\t var accessToken = new _CognitoAccessToken2.default({\n\t AccessToken: this.storage.getItem(accessTokenKey)\n\t });\n\t var refreshToken = new _CognitoRefreshToken2.default({\n\t RefreshToken: this.storage.getItem(refreshTokenKey)\n\t });\n\t var clockDrift = parseInt(this.storage.getItem(clockDriftKey), 0) || 0;\n\t\n\t var sessionData = {\n\t IdToken: idToken,\n\t AccessToken: accessToken,\n\t RefreshToken: refreshToken,\n\t ClockDrift: clockDrift\n\t };\n\t var cachedSession = new _CognitoUserSession2.default(sessionData);\n\t if (cachedSession.isValid()) {\n\t this.signInUserSession = cachedSession;\n\t return callback(null, this.signInUserSession);\n\t }\n\t\n\t if (refreshToken.getToken() == null) {\n\t return callback(new Error('Cannot retrieve a new session. Please authenticate.'), null);\n\t }\n\t\n\t this.refreshSession(refreshToken, callback);\n\t } else {\n\t callback(new Error('Local storage is missing an ID Token, Please authenticate'), null);\n\t }\n\t\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This uses the refreshToken to retrieve a new session\n\t * @param {CognitoRefreshToken} refreshToken A previous session's refresh token.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.refreshSession = function refreshSession(refreshToken, callback) {\n\t var _this10 = this;\n\t\n\t var authParameters = {};\n\t authParameters.REFRESH_TOKEN = refreshToken.getToken();\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId();\n\t var lastUserKey = keyPrefix + '.LastAuthUser';\n\t\n\t if (this.storage.getItem(lastUserKey)) {\n\t this.username = this.storage.getItem(lastUserKey);\n\t var deviceKeyKey = keyPrefix + '.' + this.username + '.deviceKey';\n\t this.deviceKey = this.storage.getItem(deviceKeyKey);\n\t authParameters.DEVICE_KEY = this.deviceKey;\n\t }\n\t\n\t var jsonReq = {\n\t ClientId: this.pool.getClientId(),\n\t AuthFlow: 'REFRESH_TOKEN_AUTH',\n\t AuthParameters: authParameters\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('InitiateAuth', jsonReq, function (err, authResult) {\n\t if (err) {\n\t if (err.code === 'NotAuthorizedException') {\n\t _this10.clearCachedTokens();\n\t }\n\t return callback(err, null);\n\t }\n\t if (authResult) {\n\t var authenticationResult = authResult.AuthenticationResult;\n\t if (!Object.prototype.hasOwnProperty.call(authenticationResult, 'RefreshToken')) {\n\t authenticationResult.RefreshToken = refreshToken.getToken();\n\t }\n\t _this10.signInUserSession = _this10.getCognitoUserSession(authenticationResult);\n\t _this10.cacheTokens();\n\t return callback(null, _this10.signInUserSession);\n\t }\n\t return undefined;\n\t });\n\t };\n\t\n\t /**\n\t * This is used to save the session tokens to local storage\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.cacheTokens = function cacheTokens() {\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId();\n\t var idTokenKey = keyPrefix + '.' + this.username + '.idToken';\n\t var accessTokenKey = keyPrefix + '.' + this.username + '.accessToken';\n\t var refreshTokenKey = keyPrefix + '.' + this.username + '.refreshToken';\n\t var clockDriftKey = keyPrefix + '.' + this.username + '.clockDrift';\n\t var lastUserKey = keyPrefix + '.LastAuthUser';\n\t\n\t this.storage.setItem(idTokenKey, this.signInUserSession.getIdToken().getJwtToken());\n\t this.storage.setItem(accessTokenKey, this.signInUserSession.getAccessToken().getJwtToken());\n\t this.storage.setItem(refreshTokenKey, this.signInUserSession.getRefreshToken().getToken());\n\t this.storage.setItem(clockDriftKey, '' + this.signInUserSession.getClockDrift());\n\t this.storage.setItem(lastUserKey, this.username);\n\t };\n\t\n\t /**\n\t * This is used to cache the device key and device group and device password\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.cacheDeviceKeyAndPassword = function cacheDeviceKeyAndPassword() {\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId() + '.' + this.username;\n\t var deviceKeyKey = keyPrefix + '.deviceKey';\n\t var randomPasswordKey = keyPrefix + '.randomPasswordKey';\n\t var deviceGroupKeyKey = keyPrefix + '.deviceGroupKey';\n\t\n\t this.storage.setItem(deviceKeyKey, this.deviceKey);\n\t this.storage.setItem(randomPasswordKey, this.randomPassword);\n\t this.storage.setItem(deviceGroupKeyKey, this.deviceGroupKey);\n\t };\n\t\n\t /**\n\t * This is used to get current device key and device group and device password\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getCachedDeviceKeyAndPassword = function getCachedDeviceKeyAndPassword() {\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId() + '.' + this.username;\n\t var deviceKeyKey = keyPrefix + '.deviceKey';\n\t var randomPasswordKey = keyPrefix + '.randomPasswordKey';\n\t var deviceGroupKeyKey = keyPrefix + '.deviceGroupKey';\n\t\n\t if (this.storage.getItem(deviceKeyKey)) {\n\t this.deviceKey = this.storage.getItem(deviceKeyKey);\n\t this.randomPassword = this.storage.getItem(randomPasswordKey);\n\t this.deviceGroupKey = this.storage.getItem(deviceGroupKeyKey);\n\t }\n\t };\n\t\n\t /**\n\t * This is used to clear the device key info from local storage\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.clearCachedDeviceKeyAndPassword = function clearCachedDeviceKeyAndPassword() {\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId() + '.' + this.username;\n\t var deviceKeyKey = keyPrefix + '.deviceKey';\n\t var randomPasswordKey = keyPrefix + '.randomPasswordKey';\n\t var deviceGroupKeyKey = keyPrefix + '.deviceGroupKey';\n\t\n\t this.storage.removeItem(deviceKeyKey);\n\t this.storage.removeItem(randomPasswordKey);\n\t this.storage.removeItem(deviceGroupKeyKey);\n\t };\n\t\n\t /**\n\t * This is used to clear the session tokens from local storage\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.clearCachedTokens = function clearCachedTokens() {\n\t var keyPrefix = 'CognitoIdentityServiceProvider.' + this.pool.getClientId();\n\t var idTokenKey = keyPrefix + '.' + this.username + '.idToken';\n\t var accessTokenKey = keyPrefix + '.' + this.username + '.accessToken';\n\t var refreshTokenKey = keyPrefix + '.' + this.username + '.refreshToken';\n\t var lastUserKey = keyPrefix + '.LastAuthUser';\n\t\n\t this.storage.removeItem(idTokenKey);\n\t this.storage.removeItem(accessTokenKey);\n\t this.storage.removeItem(refreshTokenKey);\n\t this.storage.removeItem(lastUserKey);\n\t };\n\t\n\t /**\n\t * This is used to build a user session from tokens retrieved in the authentication result\n\t * @param {object} authResult Successful auth response from server.\n\t * @returns {CognitoUserSession} The new user session.\n\t * @private\n\t */\n\t\n\t\n\t CognitoUser.prototype.getCognitoUserSession = function getCognitoUserSession(authResult) {\n\t var idToken = new _CognitoIdToken2.default(authResult);\n\t var accessToken = new _CognitoAccessToken2.default(authResult);\n\t var refreshToken = new _CognitoRefreshToken2.default(authResult);\n\t\n\t var sessionData = {\n\t IdToken: idToken,\n\t AccessToken: accessToken,\n\t RefreshToken: refreshToken\n\t };\n\t\n\t return new _CognitoUserSession2.default(sessionData);\n\t };\n\t\n\t /**\n\t * This is used to initiate a forgot password request\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {inputVerificationCode?} callback.inputVerificationCode\n\t * Optional callback raised instead of onSuccess with response data.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.forgotPassword = function forgotPassword(callback) {\n\t var jsonReq = {\n\t ClientId: this.pool.getClientId(),\n\t Username: this.username\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('ForgotPassword', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t if (typeof callback.inputVerificationCode === 'function') {\n\t return callback.inputVerificationCode(data);\n\t }\n\t return callback.onSuccess(data);\n\t });\n\t };\n\t\n\t /**\n\t * This is used to confirm a new password using a confirmationCode\n\t * @param {string} confirmationCode Code entered by user.\n\t * @param {string} newPassword Confirm new password.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.confirmPassword = function confirmPassword(confirmationCode, newPassword, callback) {\n\t var jsonReq = {\n\t ClientId: this.pool.getClientId(),\n\t Username: this.username,\n\t ConfirmationCode: confirmationCode,\n\t Password: newPassword\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('ConfirmForgotPassword', jsonReq, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess();\n\t });\n\t };\n\t\n\t /**\n\t * This is used to initiate an attribute confirmation request\n\t * @param {string} attributeName User attribute that needs confirmation.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {inputVerificationCode} callback.inputVerificationCode Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getAttributeVerificationCode = function getAttributeVerificationCode(attributeName, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('GetUserAttributeVerificationCode', {\n\t AttributeName: attributeName,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t if (typeof callback.inputVerificationCode === 'function') {\n\t return callback.inputVerificationCode(data);\n\t }\n\t return callback.onSuccess();\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to confirm an attribute using a confirmation code\n\t * @param {string} attributeName Attribute being confirmed.\n\t * @param {string} confirmationCode Code entered by user.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.verifyAttribute = function verifyAttribute(attributeName, confirmationCode, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('VerifyUserAttribute', {\n\t AttributeName: attributeName,\n\t Code: confirmationCode,\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess('SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to get the device information using the current device key\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess<*>} callback.onSuccess Called on success with device data.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getDevice = function getDevice(callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('GetDevice', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceKey: this.deviceKey\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess(data);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to forget a specific device\n\t * @param {string} deviceKey Device key.\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.forgetSpecificDevice = function forgetSpecificDevice(deviceKey, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('ForgetDevice', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceKey: deviceKey\n\t }, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess('SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to forget the current device\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.forgetDevice = function forgetDevice(callback) {\n\t var _this11 = this;\n\t\n\t this.forgetSpecificDevice(this.deviceKey, {\n\t onFailure: callback.onFailure,\n\t onSuccess: function onSuccess(result) {\n\t _this11.deviceKey = null;\n\t _this11.deviceGroupKey = null;\n\t _this11.randomPassword = null;\n\t _this11.clearCachedDeviceKeyAndPassword();\n\t return callback.onSuccess(result);\n\t }\n\t });\n\t };\n\t\n\t /**\n\t * This is used to set the device status as remembered\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.setDeviceStatusRemembered = function setDeviceStatusRemembered(callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('UpdateDeviceStatus', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceKey: this.deviceKey,\n\t DeviceRememberedStatus: 'remembered'\n\t }, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess('SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to set the device status as not remembered\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.setDeviceStatusNotRemembered = function setDeviceStatusNotRemembered(callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('UpdateDeviceStatus', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t DeviceKey: this.deviceKey,\n\t DeviceRememberedStatus: 'not_remembered'\n\t }, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess('SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to list all devices for a user\n\t *\n\t * @param {int} limit the number of devices returned in a call\n\t * @param {string} paginationToken the pagination token in case any was returned before\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess<*>} callback.onSuccess Called on success with device list.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.listDevices = function listDevices(limit, paginationToken, callback) {\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('ListDevices', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t Limit: limit,\n\t PaginationToken: paginationToken\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess(data);\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used to globally revoke all tokens issued to a user\n\t * @param {object} callback Result callback map.\n\t * @param {onFailure} callback.onFailure Called on any error.\n\t * @param {onSuccess} callback.onSuccess Called on success.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.globalSignOut = function globalSignOut(callback) {\n\t var _this12 = this;\n\t\n\t if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n\t return callback.onFailure(new Error('User is not authenticated'));\n\t }\n\t\n\t this.client.request('GlobalSignOut', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t _this12.clearCachedTokens();\n\t return callback.onSuccess('SUCCESS');\n\t });\n\t return undefined;\n\t };\n\t\n\t /**\n\t * This is used for the user to signOut of the application and clear the cached tokens.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.signOut = function signOut() {\n\t this.signInUserSession = null;\n\t this.clearCachedTokens();\n\t };\n\t\n\t /**\n\t * This is used by a user trying to select a given MFA\n\t * @param {string} answerChallenge the mfa the user wants\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.sendMFASelectionAnswer = function sendMFASelectionAnswer(answerChallenge, callback) {\n\t var _this13 = this;\n\t\n\t var challengeResponses = {};\n\t challengeResponses.USERNAME = this.username;\n\t challengeResponses.ANSWER = answerChallenge;\n\t\n\t var jsonReq = {\n\t ChallengeName: 'SELECT_MFA_TYPE',\n\t ChallengeResponses: challengeResponses,\n\t ClientId: this.pool.getClientId(),\n\t Session: this.Session\n\t };\n\t if (this.getUserContextData()) {\n\t jsonReq.UserContextData = this.getUserContextData();\n\t }\n\t this.client.request('RespondToAuthChallenge', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t _this13.Session = data.Session;\n\t if (answerChallenge === 'SMS_MFA') {\n\t return callback.mfaRequired(data.challengeName, data.challengeParameters);\n\t }\n\t if (answerChallenge === 'SOFTWARE_TOKEN_MFA') {\n\t return callback.totpRequired(data.challengeName, data.challengeParameters);\n\t }\n\t return undefined;\n\t });\n\t };\n\t\n\t /**\n\t * This returns the user context data for advanced security feature.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.getUserContextData = function getUserContextData() {\n\t var pool = this.pool;\n\t return pool.getUserContextData(this.username);\n\t };\n\t\n\t /**\n\t * This is used by an authenticated or a user trying to authenticate to associate a TOTP MFA\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.associateSoftwareToken = function associateSoftwareToken(callback) {\n\t var _this14 = this;\n\t\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t this.client.request('AssociateSoftwareToken', {\n\t Session: this.Session\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t _this14.Session = data.Session;\n\t return callback.associateSecretCode(data.SecretCode);\n\t });\n\t } else {\n\t this.client.request('AssociateSoftwareToken', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken()\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.associateSecretCode(data.SecretCode);\n\t });\n\t }\n\t };\n\t\n\t /**\n\t * This is used by an authenticated or a user trying to authenticate to verify a TOTP MFA\n\t * @param {string} totpCode The MFA code entered by the user.\n\t * @param {string} friendlyDeviceName The device name we are assigning to the device.\n\t * @param {nodeCallback} callback Called on success or error.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUser.prototype.verifySoftwareToken = function verifySoftwareToken(totpCode, friendlyDeviceName, callback) {\n\t var _this15 = this;\n\t\n\t if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n\t this.client.request('VerifySoftwareToken', {\n\t Session: this.Session,\n\t UserCode: totpCode,\n\t FriendlyDeviceName: friendlyDeviceName\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t _this15.Session = data.Session;\n\t var challengeResponses = {};\n\t challengeResponses.USERNAME = _this15.username;\n\t var jsonReq = {\n\t ChallengeName: 'MFA_SETUP',\n\t ClientId: _this15.pool.getClientId(),\n\t ChallengeResponses: challengeResponses,\n\t Session: _this15.Session\n\t };\n\t if (_this15.getUserContextData()) {\n\t jsonReq.UserContextData = _this15.getUserContextData();\n\t }\n\t _this15.client.request('RespondToAuthChallenge', jsonReq, function (errRespond, dataRespond) {\n\t if (errRespond) {\n\t return callback.onFailure(errRespond);\n\t }\n\t _this15.signInUserSession = _this15.getCognitoUserSession(dataRespond.AuthenticationResult);\n\t _this15.cacheTokens();\n\t return callback.onSuccess(_this15.signInUserSession);\n\t });\n\t return undefined;\n\t });\n\t } else {\n\t this.client.request('VerifySoftwareToken', {\n\t AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n\t UserCode: totpCode,\n\t FriendlyDeviceName: friendlyDeviceName\n\t }, function (err, data) {\n\t if (err) {\n\t return callback.onFailure(err);\n\t }\n\t return callback.onSuccess(data);\n\t });\n\t }\n\t };\n\t\n\t return CognitoUser;\n\t}();\n\t\n\texports.default = CognitoUser;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoUserAttribute = function () {\n\t /**\n\t * Constructs a new CognitoUserAttribute object\n\t * @param {string=} Name The record's name\n\t * @param {string=} Value The record's value\n\t */\n\t function CognitoUserAttribute() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t Name = _ref.Name,\n\t Value = _ref.Value;\n\t\n\t _classCallCheck(this, CognitoUserAttribute);\n\t\n\t this.Name = Name || '';\n\t this.Value = Value || '';\n\t }\n\t\n\t /**\n\t * @returns {string} the record's value.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.getValue = function getValue() {\n\t return this.Value;\n\t };\n\t\n\t /**\n\t * Sets the record's value.\n\t * @param {string} value The new value.\n\t * @returns {CognitoUserAttribute} The record for method chaining.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.setValue = function setValue(value) {\n\t this.Value = value;\n\t return this;\n\t };\n\t\n\t /**\n\t * @returns {string} the record's name.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.getName = function getName() {\n\t return this.Name;\n\t };\n\t\n\t /**\n\t * Sets the record's name\n\t * @param {string} name The new name.\n\t * @returns {CognitoUserAttribute} The record for method chaining.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.setName = function setName(name) {\n\t this.Name = name;\n\t return this;\n\t };\n\t\n\t /**\n\t * @returns {string} a string representation of the record.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.toString = function toString() {\n\t return JSON.stringify(this);\n\t };\n\t\n\t /**\n\t * @returns {object} a flat object representing the record.\n\t */\n\t\n\t\n\t CognitoUserAttribute.prototype.toJSON = function toJSON() {\n\t return {\n\t Name: this.Name,\n\t Value: this.Value\n\t };\n\t };\n\t\n\t return CognitoUserAttribute;\n\t}();\n\t\n\texports.default = CognitoUserAttribute;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoUserSession = function () {\n\t /**\n\t * Constructs a new CognitoUserSession object\n\t * @param {CognitoIdToken} IdToken The session's Id token.\n\t * @param {CognitoRefreshToken=} RefreshToken The session's refresh token.\n\t * @param {CognitoAccessToken} AccessToken The session's access token.\n\t * @param {int} ClockDrift The saved computer's clock drift or undefined to force calculation.\n\t */\n\t function CognitoUserSession() {\n\t var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n\t IdToken = _ref.IdToken,\n\t RefreshToken = _ref.RefreshToken,\n\t AccessToken = _ref.AccessToken,\n\t ClockDrift = _ref.ClockDrift;\n\t\n\t _classCallCheck(this, CognitoUserSession);\n\t\n\t if (AccessToken == null || IdToken == null) {\n\t throw new Error('Id token and Access Token must be present.');\n\t }\n\t\n\t this.idToken = IdToken;\n\t this.refreshToken = RefreshToken;\n\t this.accessToken = AccessToken;\n\t this.clockDrift = ClockDrift === undefined ? this.calculateClockDrift() : ClockDrift;\n\t }\n\t\n\t /**\n\t * @returns {CognitoIdToken} the session's Id token\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.getIdToken = function getIdToken() {\n\t return this.idToken;\n\t };\n\t\n\t /**\n\t * @returns {CognitoRefreshToken} the session's refresh token\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.getRefreshToken = function getRefreshToken() {\n\t return this.refreshToken;\n\t };\n\t\n\t /**\n\t * @returns {CognitoAccessToken} the session's access token\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.getAccessToken = function getAccessToken() {\n\t return this.accessToken;\n\t };\n\t\n\t /**\n\t * @returns {int} the session's clock drift\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.getClockDrift = function getClockDrift() {\n\t return this.clockDrift;\n\t };\n\t\n\t /**\n\t * @returns {int} the computer's clock drift\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.calculateClockDrift = function calculateClockDrift() {\n\t var now = Math.floor(new Date() / 1000);\n\t var iat = Math.min(this.accessToken.getIssuedAt(), this.idToken.getIssuedAt());\n\t\n\t return now - iat;\n\t };\n\t\n\t /**\n\t * Checks to see if the session is still valid based on session expiry information found\n\t * in tokens and the current time (adjusted with clock drift)\n\t * @returns {boolean} if the session is still valid\n\t */\n\t\n\t\n\t CognitoUserSession.prototype.isValid = function isValid() {\n\t var now = Math.floor(new Date() / 1000);\n\t var adjusted = now - this.clockDrift;\n\t\n\t return adjusted < this.accessToken.getExpiration() && adjusted < this.idToken.getExpiration();\n\t };\n\t\n\t return CognitoUserSession;\n\t}();\n\t\n\texports.default = CognitoUserSession;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\tvar monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\n\tvar weekNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n\t\n\t/** @class */\n\t\n\tvar DateHelper = function () {\n\t function DateHelper() {\n\t _classCallCheck(this, DateHelper);\n\t }\n\t\n\t /**\n\t * @returns {string} The current time in \"ddd MMM D HH:mm:ss UTC YYYY\" format.\n\t */\n\t DateHelper.prototype.getNowString = function getNowString() {\n\t var now = new Date();\n\t\n\t var weekDay = weekNames[now.getUTCDay()];\n\t var month = monthNames[now.getUTCMonth()];\n\t var day = now.getUTCDate();\n\t\n\t var hours = now.getUTCHours();\n\t if (hours < 10) {\n\t hours = '0' + hours;\n\t }\n\t\n\t var minutes = now.getUTCMinutes();\n\t if (minutes < 10) {\n\t minutes = '0' + minutes;\n\t }\n\t\n\t var seconds = now.getUTCSeconds();\n\t if (seconds < 10) {\n\t seconds = '0' + seconds;\n\t }\n\t\n\t var year = now.getUTCFullYear();\n\t\n\t // ddd MMM D HH:mm:ss UTC YYYY\n\t var dateNow = weekDay + ' ' + month + ' ' + day + ' ' + hours + ':' + minutes + ':' + seconds + ' UTC ' + year;\n\t\n\t return dateNow;\n\t };\n\t\n\t return DateHelper;\n\t}();\n\t\n\texports.default = DateHelper;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\tvar dataMemory = {};\n\t\n\t/** @class */\n\t\n\tvar MemoryStorage = function () {\n\t function MemoryStorage() {\n\t _classCallCheck(this, MemoryStorage);\n\t }\n\t\n\t /**\n\t * This is used to set a specific item in storage\n\t * @param {string} key - the key for the item\n\t * @param {object} value - the value\n\t * @returns {string} value that was set\n\t */\n\t MemoryStorage.setItem = function setItem(key, value) {\n\t dataMemory[key] = value;\n\t return dataMemory[key];\n\t };\n\t\n\t /**\n\t * This is used to get a specific key from storage\n\t * @param {string} key - the key for the item\n\t * This is used to clear the storage\n\t * @returns {string} the data item\n\t */\n\t\n\t\n\t MemoryStorage.getItem = function getItem(key) {\n\t return Object.prototype.hasOwnProperty.call(dataMemory, key) ? dataMemory[key] : undefined;\n\t };\n\t\n\t /**\n\t * This is used to remove an item from storage\n\t * @param {string} key - the key being set\n\t * @returns {string} value - value that was deleted\n\t */\n\t\n\t\n\t MemoryStorage.removeItem = function removeItem(key) {\n\t return delete dataMemory[key];\n\t };\n\t\n\t /**\n\t * This is used to clear the storage\n\t * @returns {string} nothing\n\t */\n\t\n\t\n\t MemoryStorage.clear = function clear() {\n\t dataMemory = {};\n\t return dataMemory;\n\t };\n\t\n\t return MemoryStorage;\n\t}();\n\t\n\t/** @class */\n\t\n\t\n\tvar StorageHelper = function () {\n\t\n\t /**\n\t * This is used to get a storage object\n\t * @returns {object} the storage\n\t */\n\t function StorageHelper() {\n\t _classCallCheck(this, StorageHelper);\n\t\n\t try {\n\t this.storageWindow = window.localStorage;\n\t this.storageWindow.setItem('aws.cognito.test-ls', 1);\n\t this.storageWindow.removeItem('aws.cognito.test-ls');\n\t } catch (exception) {\n\t this.storageWindow = MemoryStorage;\n\t }\n\t }\n\t\n\t /**\n\t * This is used to return the storage\n\t * @returns {object} the storage\n\t */\n\t\n\t\n\t StorageHelper.prototype.getStorage = function getStorage() {\n\t return this.storageWindow;\n\t };\n\t\n\t return StorageHelper;\n\t}();\n\t\n\texports.default = StorageHelper;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar Buffer = __webpack_require__(1).Buffer\n\tvar sha = __webpack_require__(23)\n\tvar sha256 = __webpack_require__(24)\n\tvar rng = __webpack_require__(22)\n\tvar md5 = __webpack_require__(21)\n\t\n\tvar algorithms = {\n\t sha1: sha,\n\t sha256: sha256,\n\t md5: md5\n\t}\n\t\n\tvar blocksize = 64\n\tvar zeroBuffer = new Buffer(blocksize); zeroBuffer.fill(0)\n\tfunction hmac(fn, key, data) {\n\t if(!Buffer.isBuffer(key)) key = new Buffer(key)\n\t if(!Buffer.isBuffer(data)) data = new Buffer(data)\n\t\n\t if(key.length > blocksize) {\n\t key = fn(key)\n\t } else if(key.length < blocksize) {\n\t key = Buffer.concat([key, zeroBuffer], blocksize)\n\t }\n\t\n\t var ipad = new Buffer(blocksize), opad = new Buffer(blocksize)\n\t for(var i = 0; i < blocksize; i++) {\n\t ipad[i] = key[i] ^ 0x36\n\t opad[i] = key[i] ^ 0x5C\n\t }\n\t\n\t var hash = fn(Buffer.concat([ipad, data]))\n\t return fn(Buffer.concat([opad, hash]))\n\t}\n\t\n\tfunction hash(alg, key) {\n\t alg = alg || 'sha1'\n\t var fn = algorithms[alg]\n\t var bufs = []\n\t var length = 0\n\t if(!fn) error('algorithm:', alg, 'is not yet supported')\n\t return {\n\t update: function (data) {\n\t if(!Buffer.isBuffer(data)) data = new Buffer(data)\n\t \n\t bufs.push(data)\n\t length += data.length\n\t return this\n\t },\n\t digest: function (enc) {\n\t var buf = Buffer.concat(bufs)\n\t var r = key ? hmac(fn, key, buf) : fn(buf)\n\t bufs = null\n\t return enc ? r.toString(enc) : r\n\t }\n\t }\n\t}\n\t\n\tfunction error () {\n\t var m = [].slice.call(arguments).join(' ')\n\t throw new Error([\n\t m,\n\t 'we accept pull requests',\n\t 'http://github.com/dominictarr/crypto-browserify'\n\t ].join('\\n'))\n\t}\n\t\n\texports.createHash = function (alg) { return hash(alg) }\n\texports.createHmac = function (alg, key) { return hash(alg, key) }\n\texports.randomBytes = function(size, callback) {\n\t if (callback && callback.call) {\n\t try {\n\t callback.call(this, undefined, new Buffer(rng(size)))\n\t } catch (err) { callback(err) }\n\t } else {\n\t return new Buffer(rng(size))\n\t }\n\t}\n\t\n\tfunction each(a, f) {\n\t for(var i in a)\n\t f(a[i], i)\n\t}\n\t\n\t// the least I can do is make error messages for the rest of the node.js/crypto api.\n\teach(['createCredentials'\n\t, 'createCipher'\n\t, 'createCipheriv'\n\t, 'createDecipher'\n\t, 'createDecipheriv'\n\t, 'createSign'\n\t, 'createVerify'\n\t, 'createDiffieHellman'\n\t, 'pbkdf2'], function (name) {\n\t exports[name] = function () {\n\t error('sorry,', name, 'is not implemented yet')\n\t }\n\t})\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\t\n\texports.__esModule = true;\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar AuthenticationDetails = function () {\n\t /**\n\t * Constructs a new AuthenticationDetails object\n\t * @param {object=} data Creation options.\n\t * @param {string} data.Username User being authenticated.\n\t * @param {string} data.Password Plain-text password to authenticate with.\n\t * @param {(AttributeArg[])?} data.ValidationData Application extra metadata.\n\t * @param {(AttributeArg[])?} data.AuthParamaters Authentication paramaters for custom auth.\n\t */\n\t function AuthenticationDetails(data) {\n\t _classCallCheck(this, AuthenticationDetails);\n\t\n\t var _ref = data || {},\n\t ValidationData = _ref.ValidationData,\n\t Username = _ref.Username,\n\t Password = _ref.Password,\n\t AuthParameters = _ref.AuthParameters;\n\t\n\t this.validationData = ValidationData || {};\n\t this.authParameters = AuthParameters || {};\n\t this.username = Username;\n\t this.password = Password;\n\t }\n\t\n\t /**\n\t * @returns {string} the record's username\n\t */\n\t\n\t\n\t AuthenticationDetails.prototype.getUsername = function getUsername() {\n\t return this.username;\n\t };\n\t\n\t /**\n\t * @returns {string} the record's password\n\t */\n\t\n\t\n\t AuthenticationDetails.prototype.getPassword = function getPassword() {\n\t return this.password;\n\t };\n\t\n\t /**\n\t * @returns {Array} the record's validationData\n\t */\n\t\n\t\n\t AuthenticationDetails.prototype.getValidationData = function getValidationData() {\n\t return this.validationData;\n\t };\n\t\n\t /**\n\t * @returns {Array} the record's authParameters\n\t */\n\t\n\t\n\t AuthenticationDetails.prototype.getAuthParameters = function getAuthParameters() {\n\t return this.authParameters;\n\t };\n\t\n\t return AuthenticationDetails;\n\t}();\n\t\n\texports.default = AuthenticationDetails;\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _UserAgent = __webpack_require__(19);\n\t\n\tvar _UserAgent2 = _interopRequireDefault(_UserAgent);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/** @class */\n\tvar Client = function () {\n\t /**\n\t * Constructs a new AWS Cognito Identity Provider client object\n\t * @param {string} region AWS region\n\t * @param {string} endpoint endpoint\n\t */\n\t function Client(region, endpoint, options) {\n\t _classCallCheck(this, Client);\n\t\n\t this.endpoint = endpoint || 'https://cognito-idp.' + region + '.amazonaws.com/';\n\t this.userAgent = _UserAgent2.default.prototype.userAgent || 'aws-amplify/0.1.x js';\n\t this.options = options || {};\n\t }\n\t\n\t /**\n\t * Makes an unauthenticated request on AWS Cognito Identity Provider API\n\t * using fetch\n\t * @param {string} operation API operation\n\t * @param {object} params Input parameters\n\t * @param {function} callback Callback called when a response is returned\n\t * @returns {void}\n\t */\n\t\n\t\n\t Client.prototype.request = function request(operation, params, callback) {\n\t var headers = {\n\t 'Content-Type': 'application/x-amz-json-1.1',\n\t 'X-Amz-Target': 'AWSCognitoIdentityProviderService.' + operation,\n\t 'X-Amz-User-Agent': this.userAgent\n\t };\n\t\n\t var options = Object.assign(this.options, {\n\t headers: headers,\n\t method: 'POST',\n\t mode: 'cors',\n\t cache: 'no-cache',\n\t body: JSON.stringify(params)\n\t });\n\t\n\t var response = void 0;\n\t\n\t fetch(this.endpoint, options).then(function (resp) {\n\t response = resp;\n\t return resp;\n\t }, function (err) {\n\t // If error happens here, the request failed\n\t // if it is TypeError throw network error\n\t if (err instanceof TypeError) {\n\t throw new Error('Network error');\n\t }\n\t throw err;\n\t }).then(function (resp) {\n\t return resp.json().catch(function () {\n\t return {};\n\t });\n\t }).then(function (data) {\n\t if (response.ok) return callback(null, data);\n\t\n\t // Taken from aws-sdk-js/lib/protocol/json.js\n\t // eslint-disable-next-line no-underscore-dangle\n\t var code = (data.__type || data.code).split('#').pop();\n\t var error = {\n\t code: code,\n\t name: code,\n\t message: data.message || data.Message || null\n\t };\n\t return callback(error);\n\t }).catch(function (err) {\n\t // default to return 'UnknownError'\n\t var error = { code: 'UnknownError', message: 'Unkown error' };\n\t\n\t // first check if we have a service error\n\t if (response && response.headers && response.headers.get('x-amzn-errortype')) {\n\t try {\n\t var code = response.headers.get('x-amz-errortype').split(':')[0];\n\t error = {\n\t code: code,\n\t name: code,\n\t statusCode: response.status,\n\t message: response.status ? response.status.toString() : null\n\t };\n\t } catch (ex) {}\n\t // pass through so it doesn't get swallowed if we can't parse it\n\t\n\t // otherwise check if error is Network error\n\t } else if (err instanceof Error && err.message === 'Network error') {\n\t error = {\n\t code: 'NetworkError',\n\t name: err.name,\n\t message: err.message\n\t };\n\t }\n\t return callback(error);\n\t });\n\t };\n\t\n\t return Client;\n\t}();\n\t\n\texports.default = Client;\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _Client = __webpack_require__(16);\n\t\n\tvar _Client2 = _interopRequireDefault(_Client);\n\t\n\tvar _CognitoUser = __webpack_require__(9);\n\t\n\tvar _CognitoUser2 = _interopRequireDefault(_CognitoUser);\n\t\n\tvar _StorageHelper = __webpack_require__(13);\n\t\n\tvar _StorageHelper2 = _interopRequireDefault(_StorageHelper);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*!\n\t * Copyright 2016 Amazon.com,\n\t * Inc. or its affiliates. All Rights Reserved.\n\t *\n\t * Licensed under the Amazon Software License (the \"License\").\n\t * You may not use this file except in compliance with the\n\t * License. A copy of the License is located at\n\t *\n\t * http://aws.amazon.com/asl/\n\t *\n\t * or in the \"license\" file accompanying this file. This file is\n\t * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n\t * CONDITIONS OF ANY KIND, express or implied. See the License\n\t * for the specific language governing permissions and\n\t * limitations under the License.\n\t */\n\t\n\t/** @class */\n\tvar CognitoUserPool = function () {\n\t /**\n\t * Constructs a new CognitoUserPool object\n\t * @param {object} data Creation options.\n\t * @param {string} data.UserPoolId Cognito user pool id.\n\t * @param {string} data.ClientId User pool application client id.\n\t * @param {object} data.Storage Optional storage object.\n\t * @param {boolean} data.AdvancedSecurityDataCollectionFlag Optional:\n\t * boolean flag indicating if the data collection is enabled\n\t * to support cognito advanced security features. By default, this\n\t * flag is set to true.\n\t */\n\t function CognitoUserPool(data) {\n\t _classCallCheck(this, CognitoUserPool);\n\t\n\t var _ref = data || {},\n\t UserPoolId = _ref.UserPoolId,\n\t ClientId = _ref.ClientId,\n\t ProxyAgent = _ref.ProxyAgent,\n\t endpoint = _ref.endpoint,\n\t AdvancedSecurityDataCollectionFlag = _ref.AdvancedSecurityDataCollectionFlag;\n\t\n\t if (!UserPoolId || !ClientId) {\n\t throw new Error('Both UserPoolId and ClientId are required.');\n\t }\n\t if (!/^[\\w-]+_.+$/.test(UserPoolId)) {\n\t throw new Error('Invalid UserPoolId format.');\n\t }\n\t var region = UserPoolId.split('_')[0];\n\t\n\t this.userPoolId = UserPoolId;\n\t this.clientId = ClientId;\n\t\n\t this.client = new _Client2.default(region, endpoint, { agent: ProxyAgent || null });\n\t\n\t /**\n\t * By default, AdvancedSecurityDataCollectionFlag is set to true,\n\t * if no input value is provided.\n\t */\n\t this.advancedSecurityDataCollectionFlag = AdvancedSecurityDataCollectionFlag !== false;\n\t\n\t this.storage = data.Storage || new _StorageHelper2.default().getStorage();\n\t }\n\t\n\t /**\n\t * @returns {string} the user pool id\n\t */\n\t\n\t\n\t CognitoUserPool.prototype.getUserPoolId = function getUserPoolId() {\n\t return this.userPoolId;\n\t };\n\t\n\t /**\n\t * @returns {string} the client id\n\t */\n\t\n\t\n\t CognitoUserPool.prototype.getClientId = function getClientId() {\n\t return this.clientId;\n\t };\n\t\n\t /**\n\t * @typedef {object} SignUpResult\n\t * @property {CognitoUser} user New user.\n\t * @property {bool} userConfirmed If the user is already confirmed.\n\t */\n\t /**\n\t * method for signing up a user\n\t * @param {string} username User's username.\n\t * @param {string} password Plain-text initial password entered by user.\n\t * @param {(AttributeArg[])=} userAttributes New user attributes.\n\t * @param {(AttributeArg[])=} validationData Application metadata.\n\t * @param {nodeCallback} callback Called on error or with the new user.\n\t * @returns {void}\n\t */\n\t\n\t\n\t CognitoUserPool.prototype.signUp = function signUp(username, password, userAttributes, validationData, callback) {\n\t var _this = this;\n\t\n\t var jsonReq = {\n\t ClientId: this.clientId,\n\t Username: username,\n\t Password: password,\n\t UserAttributes: userAttributes,\n\t ValidationData: validationData\n\t };\n\t if (this.getUserContextData(username)) {\n\t jsonReq.UserContextData = this.getUserContextData(username);\n\t }\n\t this.client.request('SignUp', jsonReq, function (err, data) {\n\t if (err) {\n\t return callback(err, null);\n\t }\n\t\n\t var cognitoUser = {\n\t Username: username,\n\t Pool: _this,\n\t Storage: _this.storage\n\t };\n\t\n\t var returnData = {\n\t user: new _CognitoUser2.default(cognitoUser),\n\t userConfirmed: data.UserConfirmed,\n\t userSub: data.UserSub\n\t };\n\t\n\t return callback(null, returnData);\n\t });\n\t };\n\t\n\t /**\n\t * method for getting the current user of the application from the local storage\n\t *\n\t * @returns {CognitoUser} the user retrieved from storage\n\t */\n\t\n\t\n\t CognitoUserPool.prototype.getCurrentUser = function getCurrentUser() {\n\t var lastUserKey = 'CognitoIdentityServiceProvider.' + this.clientId + '.LastAuthUser';\n\t\n\t var lastAuthUser = this.storage.getItem(lastUserKey);\n\t if (lastAuthUser) {\n\t var cognitoUser = {\n\t Username: lastAuthUser,\n\t Pool: this,\n\t Storage: this.storage\n\t };\n\t\n\t return new _CognitoUser2.default(cognitoUser);\n\t }\n\t\n\t return null;\n\t };\n\t\n\t /**\n\t * This method returns the encoded data string used for cognito advanced security feature.\n\t * This would be generated only when developer has included the JS used for collecting the\n\t * data on their client. Please refer to documentation to know more about using AdvancedSecurity\n\t * features\n\t * @param {string} username the username for the context data\n\t * @returns {string} the user context data\n\t **/\n\t\n\t\n\t CognitoUserPool.prototype.getUserContextData = function getUserContextData(username) {\n\t if (typeof AmazonCognitoAdvancedSecurityData === 'undefined') {\n\t return undefined;\n\t }\n\t /* eslint-disable */\n\t var amazonCognitoAdvancedSecurityDataConst = AmazonCognitoAdvancedSecurityData;\n\t /* eslint-enable */\n\t\n\t if (this.advancedSecurityDataCollectionFlag) {\n\t var advancedSecurityData = amazonCognitoAdvancedSecurityDataConst.getData(username, this.userPoolId, this.clientId);\n\t if (advancedSecurityData) {\n\t var userContextData = {\n\t EncodedData: advancedSecurityData\n\t };\n\t return userContextData;\n\t }\n\t }\n\t return {};\n\t };\n\t\n\t return CognitoUserPool;\n\t}();\n\t\n\texports.default = CognitoUserPool;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t\n\tvar _jsCookie = __webpack_require__(27);\n\t\n\tvar Cookies = _interopRequireWildcard(_jsCookie);\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\t/** @class */\n\tvar CookieStorage = function () {\n\t\n\t /**\n\t * Constructs a new CookieStorage object\n\t * @param {object} data Creation options.\n\t * @param {string} data.domain Cookies domain (mandatory).\n\t * @param {string} data.path Cookies path (default: '/')\n\t * @param {integer} data.expires Cookie expiration (in days, default: 365)\n\t * @param {boolean} data.secure Cookie secure flag (default: true)\n\t */\n\t function CookieStorage(data) {\n\t _classCallCheck(this, CookieStorage);\n\t\n\t this.domain = data.domain;\n\t if (data.path) {\n\t this.path = data.path;\n\t } else {\n\t this.path = '/';\n\t }\n\t if (Object.prototype.hasOwnProperty.call(data, 'expires')) {\n\t this.expires = data.expires;\n\t } else {\n\t this.expires = 365;\n\t }\n\t if (Object.prototype.hasOwnProperty.call(data, 'secure')) {\n\t this.secure = data.secure;\n\t } else {\n\t this.secure = true;\n\t }\n\t }\n\t\n\t /**\n\t * This is used to set a specific item in storage\n\t * @param {string} key - the key for the item\n\t * @param {object} value - the value\n\t * @returns {string} value that was set\n\t */\n\t\n\t\n\t CookieStorage.prototype.setItem = function setItem(key, value) {\n\t Cookies.set(key, value, {\n\t path: this.path,\n\t expires: this.expires,\n\t domain: this.domain,\n\t secure: this.secure\n\t });\n\t return Cookies.get(key);\n\t };\n\t\n\t /**\n\t * This is used to get a specific key from storage\n\t * @param {string} key - the key for the item\n\t * This is used to clear the storage\n\t * @returns {string} the data item\n\t */\n\t\n\t\n\t CookieStorage.prototype.getItem = function getItem(key) {\n\t return Cookies.get(key);\n\t };\n\t\n\t /**\n\t * This is used to remove an item from storage\n\t * @param {string} key - the key being set\n\t * @returns {string} value - value that was deleted\n\t */\n\t\n\t\n\t CookieStorage.prototype.removeItem = function removeItem(key) {\n\t return Cookies.remove(key, {\n\t path: this.path,\n\t domain: this.domain,\n\t secure: this.secure\n\t });\n\t };\n\t\n\t /**\n\t * This is used to clear the storage\n\t * @returns {string} nothing\n\t */\n\t\n\t\n\t CookieStorage.prototype.clear = function clear() {\n\t var cookies = Cookies.get();\n\t var index = void 0;\n\t for (index = 0; index < cookies.length; ++index) {\n\t Cookies.remove(cookies[index]);\n\t }\n\t return {};\n\t };\n\t\n\t return CookieStorage;\n\t}();\n\t\n\texports.default = CookieStorage;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\texports.__esModule = true;\n\t// class for defining the amzn user-agent\n\texports.default = UserAgent;\n\t// constructor\n\t\n\tfunction UserAgent() {}\n\t// public\n\tUserAgent.prototype.userAgent = 'aws-amplify/0.1.x js';\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\n\t'use strict'\n\t\n\texports.byteLength = byteLength\n\texports.toByteArray = toByteArray\n\texports.fromByteArray = fromByteArray\n\t\n\tvar lookup = []\n\tvar revLookup = []\n\tvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\t\n\tvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n\tfor (var i = 0, len = code.length; i < len; ++i) {\n\t lookup[i] = code[i]\n\t revLookup[code.charCodeAt(i)] = i\n\t}\n\t\n\t// Support decoding URL-safe base64 strings, as Node.js does.\n\t// See: https://en.wikipedia.org/wiki/Base64#URL_applications\n\trevLookup['-'.charCodeAt(0)] = 62\n\trevLookup['_'.charCodeAt(0)] = 63\n\t\n\tfunction getLens (b64) {\n\t var len = b64.length\n\t\n\t if (len % 4 > 0) {\n\t throw new Error('Invalid string. Length must be a multiple of 4')\n\t }\n\t\n\t // Trim off extra bytes after placeholder bytes are found\n\t // See: https://github.com/beatgammit/base64-js/issues/42\n\t var validLen = b64.indexOf('=')\n\t if (validLen === -1) validLen = len\n\t\n\t var placeHoldersLen = validLen === len\n\t ? 0\n\t : 4 - (validLen % 4)\n\t\n\t return [validLen, placeHoldersLen]\n\t}\n\t\n\t// base64 is 4/3 + up to two characters of the original data\n\tfunction byteLength (b64) {\n\t var lens = getLens(b64)\n\t var validLen = lens[0]\n\t var placeHoldersLen = lens[1]\n\t return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n\t}\n\t\n\tfunction _byteLength (b64, validLen, placeHoldersLen) {\n\t return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n\t}\n\t\n\tfunction toByteArray (b64) {\n\t var tmp\n\t var lens = getLens(b64)\n\t var validLen = lens[0]\n\t var placeHoldersLen = lens[1]\n\t\n\t var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\t\n\t var curByte = 0\n\t\n\t // if there are placeholders, only get up to the last complete 4 chars\n\t var len = placeHoldersLen > 0\n\t ? validLen - 4\n\t : validLen\n\t\n\t for (var i = 0; i < len; i += 4) {\n\t tmp =\n\t (revLookup[b64.charCodeAt(i)] << 18) |\n\t (revLookup[b64.charCodeAt(i + 1)] << 12) |\n\t (revLookup[b64.charCodeAt(i + 2)] << 6) |\n\t revLookup[b64.charCodeAt(i + 3)]\n\t arr[curByte++] = (tmp >> 16) & 0xFF\n\t arr[curByte++] = (tmp >> 8) & 0xFF\n\t arr[curByte++] = tmp & 0xFF\n\t }\n\t\n\t if (placeHoldersLen === 2) {\n\t tmp =\n\t (revLookup[b64.charCodeAt(i)] << 2) |\n\t (revLookup[b64.charCodeAt(i + 1)] >> 4)\n\t arr[curByte++] = tmp & 0xFF\n\t }\n\t\n\t if (placeHoldersLen === 1) {\n\t tmp =\n\t (revLookup[b64.charCodeAt(i)] << 10) |\n\t (revLookup[b64.charCodeAt(i + 1)] << 4) |\n\t (revLookup[b64.charCodeAt(i + 2)] >> 2)\n\t arr[curByte++] = (tmp >> 8) & 0xFF\n\t arr[curByte++] = tmp & 0xFF\n\t }\n\t\n\t return arr\n\t}\n\t\n\tfunction tripletToBase64 (num) {\n\t return lookup[num >> 18 & 0x3F] +\n\t lookup[num >> 12 & 0x3F] +\n\t lookup[num >> 6 & 0x3F] +\n\t lookup[num & 0x3F]\n\t}\n\t\n\tfunction encodeChunk (uint8, start, end) {\n\t var tmp\n\t var output = []\n\t for (var i = start; i < end; i += 3) {\n\t tmp =\n\t ((uint8[i] << 16) & 0xFF0000) +\n\t ((uint8[i + 1] << 8) & 0xFF00) +\n\t (uint8[i + 2] & 0xFF)\n\t output.push(tripletToBase64(tmp))\n\t }\n\t return output.join('')\n\t}\n\t\n\tfunction fromByteArray (uint8) {\n\t var tmp\n\t var len = uint8.length\n\t var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n\t var parts = []\n\t var maxChunkLength = 16383 // must be multiple of 3\n\t\n\t // go through the array every three bytes, we'll deal with trailing stuff later\n\t for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n\t parts.push(encodeChunk(\n\t uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n\t ))\n\t }\n\t\n\t // pad the end with zeros, but make sure to not forget the extra bytes\n\t if (extraBytes === 1) {\n\t tmp = uint8[len - 1]\n\t parts.push(\n\t lookup[tmp >> 2] +\n\t lookup[(tmp << 4) & 0x3F] +\n\t '=='\n\t )\n\t } else if (extraBytes === 2) {\n\t tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n\t parts.push(\n\t lookup[tmp >> 10] +\n\t lookup[(tmp >> 4) & 0x3F] +\n\t lookup[(tmp << 2) & 0x3F] +\n\t '='\n\t )\n\t }\n\t\n\t return parts.join('')\n\t}\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/*\r\n\t * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\r\n\t * Digest Algorithm, as defined in RFC 1321.\r\n\t * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.\r\n\t * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\r\n\t * Distributed under the BSD License\r\n\t * See http://pajhome.org.uk/crypt/md5 for more info.\r\n\t */\r\n\t\r\n\tvar helpers = __webpack_require__(2);\r\n\t\r\n\t/*\r\n\t * Perform a simple self-test to see if the VM is working\r\n\t */\r\n\tfunction md5_vm_test()\r\n\t{\r\n\t return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n\t}\r\n\t\r\n\t/*\r\n\t * Calculate the MD5 of an array of little-endian words, and a bit length\r\n\t */\r\n\tfunction core_md5(x, len)\r\n\t{\r\n\t /* append padding */\r\n\t x[len >> 5] |= 0x80 << ((len) % 32);\r\n\t x[(((len + 64) >>> 9) << 4) + 14] = len;\r\n\t\r\n\t var a = 1732584193;\r\n\t var b = -271733879;\r\n\t var c = -1732584194;\r\n\t var d = 271733878;\r\n\t\r\n\t for(var i = 0; i < x.length; i += 16)\r\n\t {\r\n\t var olda = a;\r\n\t var oldb = b;\r\n\t var oldc = c;\r\n\t var oldd = d;\r\n\t\r\n\t a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\r\n\t d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\r\n\t c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\r\n\t b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\r\n\t a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\r\n\t d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\r\n\t c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\r\n\t b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\r\n\t a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\r\n\t d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\r\n\t c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\r\n\t b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\r\n\t a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\r\n\t d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\r\n\t c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\r\n\t b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\r\n\t\r\n\t a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\r\n\t d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\r\n\t c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\r\n\t b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\r\n\t a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\r\n\t d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\r\n\t c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\r\n\t b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\r\n\t a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\r\n\t d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\r\n\t c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\r\n\t b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\r\n\t a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\r\n\t d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\r\n\t c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\r\n\t b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\r\n\t\r\n\t a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\r\n\t d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\r\n\t c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\r\n\t b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\r\n\t a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\r\n\t d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\r\n\t c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\r\n\t b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\r\n\t a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\r\n\t d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\r\n\t c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\r\n\t b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\r\n\t a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\r\n\t d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\r\n\t c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\r\n\t b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\r\n\t\r\n\t a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\r\n\t d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\r\n\t c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\r\n\t b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\r\n\t a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\r\n\t d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\r\n\t c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\r\n\t b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\r\n\t a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\r\n\t d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\r\n\t c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\r\n\t b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\r\n\t a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\r\n\t d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\r\n\t c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\r\n\t b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\r\n\t\r\n\t a = safe_add(a, olda);\r\n\t b = safe_add(b, oldb);\r\n\t c = safe_add(c, oldc);\r\n\t d = safe_add(d, oldd);\r\n\t }\r\n\t return Array(a, b, c, d);\r\n\t\r\n\t}\r\n\t\r\n\t/*\r\n\t * These functions implement the four basic operations the algorithm uses.\r\n\t */\r\n\tfunction md5_cmn(q, a, b, x, s, t)\r\n\t{\r\n\t return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);\r\n\t}\r\n\tfunction md5_ff(a, b, c, d, x, s, t)\r\n\t{\r\n\t return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);\r\n\t}\r\n\tfunction md5_gg(a, b, c, d, x, s, t)\r\n\t{\r\n\t return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);\r\n\t}\r\n\tfunction md5_hh(a, b, c, d, x, s, t)\r\n\t{\r\n\t return md5_cmn(b ^ c ^ d, a, b, x, s, t);\r\n\t}\r\n\tfunction md5_ii(a, b, c, d, x, s, t)\r\n\t{\r\n\t return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);\r\n\t}\r\n\t\r\n\t/*\r\n\t * Add integers, wrapping at 2^32. This uses 16-bit operations internally\r\n\t * to work around bugs in some JS interpreters.\r\n\t */\r\n\tfunction safe_add(x, y)\r\n\t{\r\n\t var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n\t var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n\t return (msw << 16) | (lsw & 0xFFFF);\r\n\t}\r\n\t\r\n\t/*\r\n\t * Bitwise rotate a 32-bit number to the left.\r\n\t */\r\n\tfunction bit_rol(num, cnt)\r\n\t{\r\n\t return (num << cnt) | (num >>> (32 - cnt));\r\n\t}\r\n\t\r\n\tmodule.exports = function md5(buf) {\r\n\t return helpers.hash(buf, core_md5, 16);\r\n\t};\r\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports) {\n\n\t// Original code adapted from Robert Kieffer.\n\t// details at https://github.com/broofa/node-uuid\n\t(function() {\n\t var _global = this;\n\t\n\t var mathRNG, whatwgRNG;\n\t\n\t // NOTE: Math.random() does not guarantee \"cryptographic quality\"\n\t mathRNG = function(size) {\n\t var bytes = new Array(size);\n\t var r;\n\t\n\t for (var i = 0, r; i < size; i++) {\n\t if ((i & 0x03) == 0) r = Math.random() * 0x100000000;\n\t bytes[i] = r >>> ((i & 0x03) << 3) & 0xff;\n\t }\n\t\n\t return bytes;\n\t }\n\t\n\t if (_global.crypto && crypto.getRandomValues) {\n\t whatwgRNG = function(size) {\n\t var bytes = new Uint8Array(size);\n\t crypto.getRandomValues(bytes);\n\t return bytes;\n\t }\n\t }\n\t\n\t module.exports = whatwgRNG || mathRNG;\n\t\n\t}())\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/*\n\t * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n\t * in FIPS PUB 180-1\n\t * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n\t * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n\t * Distributed under the BSD License\n\t * See http://pajhome.org.uk/crypt/md5 for details.\n\t */\n\t\n\tvar helpers = __webpack_require__(2);\n\t\n\t/*\n\t * Calculate the SHA-1 of an array of big-endian words, and a bit length\n\t */\n\tfunction core_sha1(x, len)\n\t{\n\t /* append padding */\n\t x[len >> 5] |= 0x80 << (24 - len % 32);\n\t x[((len + 64 >> 9) << 4) + 15] = len;\n\t\n\t var w = Array(80);\n\t var a = 1732584193;\n\t var b = -271733879;\n\t var c = -1732584194;\n\t var d = 271733878;\n\t var e = -1009589776;\n\t\n\t for(var i = 0; i < x.length; i += 16)\n\t {\n\t var olda = a;\n\t var oldb = b;\n\t var oldc = c;\n\t var oldd = d;\n\t var olde = e;\n\t\n\t for(var j = 0; j < 80; j++)\n\t {\n\t if(j < 16) w[j] = x[i + j];\n\t else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);\n\t var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)),\n\t safe_add(safe_add(e, w[j]), sha1_kt(j)));\n\t e = d;\n\t d = c;\n\t c = rol(b, 30);\n\t b = a;\n\t a = t;\n\t }\n\t\n\t a = safe_add(a, olda);\n\t b = safe_add(b, oldb);\n\t c = safe_add(c, oldc);\n\t d = safe_add(d, oldd);\n\t e = safe_add(e, olde);\n\t }\n\t return Array(a, b, c, d, e);\n\t\n\t}\n\t\n\t/*\n\t * Perform the appropriate triplet combination function for the current\n\t * iteration\n\t */\n\tfunction sha1_ft(t, b, c, d)\n\t{\n\t if(t < 20) return (b & c) | ((~b) & d);\n\t if(t < 40) return b ^ c ^ d;\n\t if(t < 60) return (b & c) | (b & d) | (c & d);\n\t return b ^ c ^ d;\n\t}\n\t\n\t/*\n\t * Determine the appropriate additive constant for the current iteration\n\t */\n\tfunction sha1_kt(t)\n\t{\n\t return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :\n\t (t < 60) ? -1894007588 : -899497514;\n\t}\n\t\n\t/*\n\t * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n\t * to work around bugs in some JS interpreters.\n\t */\n\tfunction safe_add(x, y)\n\t{\n\t var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t return (msw << 16) | (lsw & 0xFFFF);\n\t}\n\t\n\t/*\n\t * Bitwise rotate a 32-bit number to the left.\n\t */\n\tfunction rol(num, cnt)\n\t{\n\t return (num << cnt) | (num >>> (32 - cnt));\n\t}\n\t\n\tmodule.exports = function sha1(buf) {\n\t return helpers.hash(buf, core_sha1, 20, true);\n\t};\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t\n\t/**\n\t * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n\t * in FIPS 180-2\n\t * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n\t * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n\t *\n\t */\n\t\n\tvar helpers = __webpack_require__(2);\n\t\n\tvar safe_add = function(x, y) {\n\t var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n\t var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n\t return (msw << 16) | (lsw & 0xFFFF);\n\t};\n\t\n\tvar S = function(X, n) {\n\t return (X >>> n) | (X << (32 - n));\n\t};\n\t\n\tvar R = function(X, n) {\n\t return (X >>> n);\n\t};\n\t\n\tvar Ch = function(x, y, z) {\n\t return ((x & y) ^ ((~x) & z));\n\t};\n\t\n\tvar Maj = function(x, y, z) {\n\t return ((x & y) ^ (x & z) ^ (y & z));\n\t};\n\t\n\tvar Sigma0256 = function(x) {\n\t return (S(x, 2) ^ S(x, 13) ^ S(x, 22));\n\t};\n\t\n\tvar Sigma1256 = function(x) {\n\t return (S(x, 6) ^ S(x, 11) ^ S(x, 25));\n\t};\n\t\n\tvar Gamma0256 = function(x) {\n\t return (S(x, 7) ^ S(x, 18) ^ R(x, 3));\n\t};\n\t\n\tvar Gamma1256 = function(x) {\n\t return (S(x, 17) ^ S(x, 19) ^ R(x, 10));\n\t};\n\t\n\tvar core_sha256 = function(m, l) {\n\t var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2);\n\t var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19);\n\t var W = new Array(64);\n\t var a, b, c, d, e, f, g, h, i, j;\n\t var T1, T2;\n\t /* append padding */\n\t m[l >> 5] |= 0x80 << (24 - l % 32);\n\t m[((l + 64 >> 9) << 4) + 15] = l;\n\t for (var i = 0; i < m.length; i += 16) {\n\t a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7];\n\t for (var j = 0; j < 64; j++) {\n\t if (j < 16) {\n\t W[j] = m[j + i];\n\t } else {\n\t W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]);\n\t }\n\t T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]);\n\t T2 = safe_add(Sigma0256(a), Maj(a, b, c));\n\t h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2);\n\t }\n\t HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]);\n\t HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]);\n\t }\n\t return HASH;\n\t};\n\t\n\tmodule.exports = function sha256(buf) {\n\t return helpers.hash(buf, core_sha256, 32, true);\n\t};\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\n\texports.read = function (buffer, offset, isLE, mLen, nBytes) {\n\t var e, m\n\t var eLen = (nBytes * 8) - mLen - 1\n\t var eMax = (1 << eLen) - 1\n\t var eBias = eMax >> 1\n\t var nBits = -7\n\t var i = isLE ? (nBytes - 1) : 0\n\t var d = isLE ? -1 : 1\n\t var s = buffer[offset + i]\n\t\n\t i += d\n\t\n\t e = s & ((1 << (-nBits)) - 1)\n\t s >>= (-nBits)\n\t nBits += eLen\n\t for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\t\n\t m = e & ((1 << (-nBits)) - 1)\n\t e >>= (-nBits)\n\t nBits += mLen\n\t for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\t\n\t if (e === 0) {\n\t e = 1 - eBias\n\t } else if (e === eMax) {\n\t return m ? NaN : ((s ? -1 : 1) * Infinity)\n\t } else {\n\t m = m + Math.pow(2, mLen)\n\t e = e - eBias\n\t }\n\t return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n\t}\n\t\n\texports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n\t var e, m, c\n\t var eLen = (nBytes * 8) - mLen - 1\n\t var eMax = (1 << eLen) - 1\n\t var eBias = eMax >> 1\n\t var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n\t var i = isLE ? 0 : (nBytes - 1)\n\t var d = isLE ? 1 : -1\n\t var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\t\n\t value = Math.abs(value)\n\t\n\t if (isNaN(value) || value === Infinity) {\n\t m = isNaN(value) ? 1 : 0\n\t e = eMax\n\t } else {\n\t e = Math.floor(Math.log(value) / Math.LN2)\n\t if (value * (c = Math.pow(2, -e)) < 1) {\n\t e--\n\t c *= 2\n\t }\n\t if (e + eBias >= 1) {\n\t value += rt / c\n\t } else {\n\t value += rt * Math.pow(2, 1 - eBias)\n\t }\n\t if (value * c >= 2) {\n\t e++\n\t c /= 2\n\t }\n\t\n\t if (e + eBias >= eMax) {\n\t m = 0\n\t e = eMax\n\t } else if (e + eBias >= 1) {\n\t m = ((value * c) - 1) * Math.pow(2, mLen)\n\t e = e + eBias\n\t } else {\n\t m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n\t e = 0\n\t }\n\t }\n\t\n\t for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\t\n\t e = (e << mLen) | m\n\t eLen += mLen\n\t for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\t\n\t buffer[offset + i - d] |= s * 128\n\t}\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports) {\n\n\tvar toString = {}.toString;\n\t\n\tmodule.exports = Array.isArray || function (arr) {\n\t return toString.call(arr) == '[object Array]';\n\t};\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n\t * JavaScript Cookie v2.2.0\n\t * https://github.com/js-cookie/js-cookie\n\t *\n\t * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n\t * Released under the MIT license\n\t */\n\t;(function (factory) {\n\t\tvar registeredInModuleLoader = false;\n\t\tif (true) {\n\t\t\t!(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t\t\tregisteredInModuleLoader = true;\n\t\t}\n\t\tif (true) {\n\t\t\tmodule.exports = factory();\n\t\t\tregisteredInModuleLoader = true;\n\t\t}\n\t\tif (!registeredInModuleLoader) {\n\t\t\tvar OldCookies = window.Cookies;\n\t\t\tvar api = window.Cookies = factory();\n\t\t\tapi.noConflict = function () {\n\t\t\t\twindow.Cookies = OldCookies;\n\t\t\t\treturn api;\n\t\t\t};\n\t\t}\n\t}(function () {\n\t\tfunction extend () {\n\t\t\tvar i = 0;\n\t\t\tvar result = {};\n\t\t\tfor (; i < arguments.length; i++) {\n\t\t\t\tvar attributes = arguments[ i ];\n\t\t\t\tfor (var key in attributes) {\n\t\t\t\t\tresult[key] = attributes[key];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\n\t\tfunction init (converter) {\n\t\t\tfunction api (key, value, attributes) {\n\t\t\t\tvar result;\n\t\t\t\tif (typeof document === 'undefined') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\t// Write\n\t\n\t\t\t\tif (arguments.length > 1) {\n\t\t\t\t\tattributes = extend({\n\t\t\t\t\t\tpath: '/'\n\t\t\t\t\t}, api.defaults, attributes);\n\t\n\t\t\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\t\t\tvar expires = new Date();\n\t\t\t\t\t\texpires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n\t\t\t\t\t\tattributes.expires = expires;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresult = JSON.stringify(value);\n\t\t\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\t\t\tvalue = result;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (e) {}\n\t\n\t\t\t\t\tif (!converter.write) {\n\t\t\t\t\t\tvalue = encodeURIComponent(String(value))\n\t\t\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = converter.write(value, key);\n\t\t\t\t\t}\n\t\n\t\t\t\t\tkey = encodeURIComponent(String(key));\n\t\t\t\t\tkey = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);\n\t\t\t\t\tkey = key.replace(/[\\(\\)]/g, escape);\n\t\n\t\t\t\t\tvar stringifiedAttributes = '';\n\t\n\t\t\t\t\tfor (var attributeName in attributes) {\n\t\t\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName];\n\t\t\t\t\t}\n\t\t\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t\t\t}\n\t\n\t\t\t\t// Read\n\t\n\t\t\t\tif (!key) {\n\t\t\t\t\tresult = {};\n\t\t\t\t}\n\t\n\t\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t\t// in case there are no cookies at all. Also prevents odd result when\n\t\t\t\t// calling \"get()\"\n\t\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\t\tvar rdecode = /(%[0-9A-Z]{2})+/g;\n\t\t\t\tvar i = 0;\n\t\n\t\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\t\tvar cookie = parts.slice(1).join('=');\n\t\n\t\t\t\t\tif (!this.json && cookie.charAt(0) === '\"') {\n\t\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t\t}\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar name = parts[0].replace(rdecode, decodeURIComponent);\n\t\t\t\t\t\tcookie = converter.read ?\n\t\t\t\t\t\t\tconverter.read(cookie, name) : converter(cookie, name) ||\n\t\t\t\t\t\t\tcookie.replace(rdecode, decodeURIComponent);\n\t\n\t\t\t\t\t\tif (this.json) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\t\tresult = cookie;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif (!key) {\n\t\t\t\t\t\t\tresult[name] = cookie;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (e) {}\n\t\t\t\t}\n\t\n\t\t\t\treturn result;\n\t\t\t}\n\t\n\t\t\tapi.set = api;\n\t\t\tapi.get = function (key) {\n\t\t\t\treturn api.call(api, key);\n\t\t\t};\n\t\t\tapi.getJSON = function () {\n\t\t\t\treturn api.apply({\n\t\t\t\t\tjson: true\n\t\t\t\t}, [].slice.call(arguments));\n\t\t\t};\n\t\t\tapi.defaults = {};\n\t\n\t\t\tapi.remove = function (key, attributes) {\n\t\t\t\tapi(key, '', extend(attributes, {\n\t\t\t\t\texpires: -1\n\t\t\t\t}));\n\t\t\t};\n\t\n\t\t\tapi.withConverter = init;\n\t\n\t\t\treturn api;\n\t\t}\n\t\n\t\treturn init(function () {});\n\t}));\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// amazon-cognito-identity.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap f34347463e4243527c48","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { default as AuthenticationDetails } from './AuthenticationDetails';\nexport { default as AuthenticationHelper } from './AuthenticationHelper';\nexport { default as CognitoAccessToken } from './CognitoAccessToken';\nexport { default as CognitoIdToken } from './CognitoIdToken';\nexport { default as CognitoRefreshToken } from './CognitoRefreshToken';\nexport { default as CognitoUser } from './CognitoUser';\nexport { default as CognitoUserAttribute } from './CognitoUserAttribute';\nexport { default as CognitoUserPool } from './CognitoUserPool';\nexport { default as CognitoUserSession } from './CognitoUserSession';\nexport { default as CookieStorage } from './CookieStorage';\nexport { default as DateHelper } from './DateHelper';\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/buffer/index.js\n// module id = 1\n// module chunks = 0","var Buffer = require('buffer').Buffer;\nvar intSize = 4;\nvar zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0);\nvar chrsz = 8;\n\nfunction toArray(buf, bigEndian) {\n if ((buf.length % intSize) !== 0) {\n var len = buf.length + (intSize - (buf.length % intSize));\n buf = Buffer.concat([buf, zeroBuffer], len);\n }\n\n var arr = [];\n var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE;\n for (var i = 0; i < buf.length; i += intSize) {\n arr.push(fn.call(buf, i));\n }\n return arr;\n}\n\nfunction toBuffer(arr, size, bigEndian) {\n var buf = new Buffer(size);\n var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE;\n for (var i = 0; i < arr.length; i++) {\n fn.call(buf, arr[i], i * 4, true);\n }\n return buf;\n}\n\nfunction hash(buf, fn, hashSize, bigEndian) {\n if (!Buffer.isBuffer(buf)) buf = new Buffer(buf);\n var arr = fn(toArray(buf, bigEndian), buf.length * chrsz);\n return toBuffer(arr, hashSize, bigEndian);\n}\n\nmodule.exports = { hash: hash };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/helpers.js\n// module id = 2\n// module chunks = 0","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Buffer } from 'buffer/';\nimport * as crypto from 'crypto-browserify';\nconst createHash = crypto.createHash;\nconst createHmac = crypto.createHmac;\nconst randomBytes = crypto.randomBytes;\n\nimport BigInteger from './BigInteger';\n\nconst initN = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1'\n + '29024E088A67CC74020BBEA63B139B22514A08798E3404DD'\n + 'EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245'\n + 'E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED'\n + 'EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D'\n + 'C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F'\n + '83655D23DCA3AD961C62F356208552BB9ED529077096966D'\n + '670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B'\n + 'E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9'\n + 'DE2BCBF6955817183995497CEA956AE515D2261898FA0510'\n + '15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64'\n + 'ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7'\n + 'ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B'\n + 'F12FFA06D98A0864D87602733EC86A64521F2B18177B200C'\n + 'BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31'\n + '43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF';\n\nconst newPasswordRequiredChallengeUserAttributePrefix = 'userAttributes.';\n\n/** @class */\nexport default class AuthenticationHelper {\n /**\n * Constructs a new AuthenticationHelper object\n * @param {string} PoolName Cognito user pool name.\n */\n constructor(PoolName) {\n this.N = new BigInteger(initN, 16);\n this.g = new BigInteger('2', 16);\n this.k = new BigInteger(this.hexHash(`00${this.N.toString(16)}0${this.g.toString(16)}`), 16);\n\n this.smallAValue = this.generateRandomSmallA();\n this.getLargeAValue(() => {});\n\n this.infoBits = Buffer.from('Caldera Derived Key', 'utf8');\n\n this.poolName = PoolName;\n }\n\n /**\n * @returns {BigInteger} small A, a random number\n */\n getSmallAValue() {\n return this.smallAValue;\n }\n\n /**\n * @param {nodeCallback} callback Called with (err, largeAValue)\n * @returns {void}\n */\n getLargeAValue(callback) {\n if (this.largeAValue) {\n callback(null, this.largeAValue);\n } else {\n this.calculateA(this.smallAValue, (err, largeAValue) => {\n if (err) {\n callback(err, null);\n }\n\n this.largeAValue = largeAValue;\n callback(null, this.largeAValue);\n });\n }\n }\n\n /**\n * helper function to generate a random big integer\n * @returns {BigInteger} a random value.\n * @private\n */\n generateRandomSmallA() {\n const hexRandom = randomBytes(128).toString('hex');\n\n const randomBigInt = new BigInteger(hexRandom, 16);\n const smallABigInt = randomBigInt.mod(this.N);\n\n return smallABigInt;\n }\n\n /**\n * helper function to generate a random string\n * @returns {string} a random value.\n * @private\n */\n generateRandomString() {\n return randomBytes(40).toString('base64');\n }\n\n /**\n * @returns {string} Generated random value included in password hash.\n */\n getRandomPassword() {\n return this.randomPassword;\n }\n\n /**\n * @returns {string} Generated random value included in devices hash.\n */\n getSaltDevices() {\n return this.SaltToHashDevices;\n }\n\n /**\n * @returns {string} Value used to verify devices.\n */\n getVerifierDevices() {\n return this.verifierDevices;\n }\n\n /**\n * Generate salts and compute verifier.\n * @param {string} deviceGroupKey Devices to generate verifier for.\n * @param {string} username User to generate verifier for.\n * @param {nodeCallback} callback Called with (err, null)\n * @returns {void}\n */\n generateHashDevice(deviceGroupKey, username, callback) {\n this.randomPassword = this.generateRandomString();\n const combinedString = `${deviceGroupKey}${username}:${this.randomPassword}`;\n const hashedString = this.hash(combinedString);\n\n const hexRandom = randomBytes(16).toString('hex');\n this.SaltToHashDevices = this.padHex(new BigInteger(hexRandom, 16));\n\n this.g.modPow(\n new BigInteger(this.hexHash(this.SaltToHashDevices + hashedString), 16),\n this.N,\n (err, verifierDevicesNotPadded) => {\n if (err) {\n callback(err, null);\n }\n\n this.verifierDevices = this.padHex(verifierDevicesNotPadded);\n callback(null, null);\n });\n }\n\n /**\n * Calculate the client's public value A = g^a%N\n * with the generated random number a\n * @param {BigInteger} a Randomly generated small A.\n * @param {nodeCallback} callback Called with (err, largeAValue)\n * @returns {void}\n * @private\n */\n calculateA(a, callback) {\n this.g.modPow(a, this.N, (err, A) => {\n if (err) {\n callback(err, null);\n }\n\n if (A.mod(this.N).equals(BigInteger.ZERO)) {\n callback(new Error('Illegal paramater. A mod N cannot be 0.'), null);\n }\n\n callback(null, A);\n });\n }\n\n /**\n * Calculate the client's value U which is the hash of A and B\n * @param {BigInteger} A Large A value.\n * @param {BigInteger} B Server B value.\n * @returns {BigInteger} Computed U value.\n * @private\n */\n calculateU(A, B) {\n this.UHexHash = this.hexHash(this.padHex(A) + this.padHex(B));\n const finalU = new BigInteger(this.UHexHash, 16);\n\n return finalU;\n }\n\n /**\n * Calculate a hash from a bitArray\n * @param {Buffer} buf Value to hash.\n * @returns {String} Hex-encoded hash.\n * @private\n */\n hash(buf) {\n const hashHex = createHash('sha256').update(buf).digest('hex');\n return (new Array(64 - hashHex.length).join('0')) + hashHex;\n }\n\n /**\n * Calculate a hash from a hex string\n * @param {String} hexStr Value to hash.\n * @returns {String} Hex-encoded hash.\n * @private\n */\n hexHash(hexStr) {\n return this.hash(Buffer.from(hexStr, 'hex'));\n }\n\n /**\n * Standard hkdf algorithm\n * @param {Buffer} ikm Input key material.\n * @param {Buffer} salt Salt value.\n * @returns {Buffer} Strong key material.\n * @private\n */\n computehkdf(ikm, salt) {\n const prk = createHmac('sha256', salt).update(ikm).digest();\n const infoBitsUpdate = Buffer.concat([\n this.infoBits,\n Buffer.from(String.fromCharCode(1), 'utf8'),\n ]);\n const hmac = createHmac('sha256', prk).update(infoBitsUpdate).digest();\n return hmac.slice(0, 16);\n }\n\n /**\n * Calculates the final hkdf based on computed S value, and computed U value and the key\n * @param {String} username Username.\n * @param {String} password Password.\n * @param {BigInteger} serverBValue Server B value.\n * @param {BigInteger} salt Generated salt.\n * @param {nodeCallback} callback Called with (err, hkdfValue)\n * @returns {void}\n */\n getPasswordAuthenticationKey(username, password, serverBValue, salt, callback) {\n if (serverBValue.mod(this.N).equals(BigInteger.ZERO)) {\n throw new Error('B cannot be zero.');\n }\n\n this.UValue = this.calculateU(this.largeAValue, serverBValue);\n\n if (this.UValue.equals(BigInteger.ZERO)) {\n throw new Error('U cannot be zero.');\n }\n\n const usernamePassword = `${this.poolName}${username}:${password}`;\n const usernamePasswordHash = this.hash(usernamePassword);\n\n const xValue = new BigInteger(this.hexHash(this.padHex(salt) + usernamePasswordHash), 16);\n this.calculateS(xValue, serverBValue, (err, sValue) => {\n if (err) {\n callback(err, null);\n }\n\n const hkdf = this.computehkdf(\n Buffer.from(this.padHex(sValue), 'hex'),\n Buffer.from(this.padHex(this.UValue.toString(16)), 'hex'));\n\n callback(null, hkdf);\n });\n }\n\n /**\n * Calculates the S value used in getPasswordAuthenticationKey\n * @param {BigInteger} xValue Salted password hash value.\n * @param {BigInteger} serverBValue Server B value.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n calculateS(xValue, serverBValue, callback) {\n this.g.modPow(xValue, this.N, (err, gModPowXN) => {\n if (err) {\n callback(err, null);\n }\n\n const intValue2 = serverBValue.subtract(this.k.multiply(gModPowXN));\n intValue2.modPow(\n this.smallAValue.add(this.UValue.multiply(xValue)),\n this.N,\n (err2, result) => {\n if (err2) {\n callback(err2, null);\n }\n\n callback(null, result.mod(this.N));\n }\n );\n });\n }\n\n /**\n * Return constant newPasswordRequiredChallengeUserAttributePrefix\n * @return {newPasswordRequiredChallengeUserAttributePrefix} constant prefix value\n */\n getNewPasswordRequiredChallengeUserAttributePrefix() {\n return newPasswordRequiredChallengeUserAttributePrefix;\n }\n\n /**\n * Converts a BigInteger (or hex string) to hex format padded with zeroes for hashing\n * @param {BigInteger|String} bigInt Number or string to pad.\n * @returns {String} Padded hex string.\n */\n padHex(bigInt) {\n let hashStr = bigInt.toString(16);\n if (hashStr.length % 2 === 1) {\n hashStr = `0${hashStr}`;\n } else if ('89ABCDEFabcdef'.indexOf(hashStr[0]) !== -1) {\n hashStr = `00${hashStr}`;\n }\n return hashStr;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/AuthenticationHelper.js","// A small implementation of BigInteger based on http://www-cs-students.stanford.edu/~tjw/jsbn/\n//\n// All public methods have been removed except the following:\n// new BigInteger(a, b) (only radix 2, 4, 8, 16 and 32 supported)\n// toString (only radix 2, 4, 8, 16 and 32 supported)\n// negate\n// abs\n// compareTo\n// bitLength\n// mod\n// equals\n// add\n// subtract\n// multiply\n// divide\n// modPow\n\nexport default BigInteger;\n\n/*\n * Copyright (c) 2003-2005 Tom Wu\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY\n * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n *\n * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,\n * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER\n * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF\n * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT\n * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n *\n * In addition, the following condition applies:\n *\n * All redistributions must retain an intact copy of this copyright notice\n * and disclaimer.\n */\n\n// (public) Constructor\nfunction BigInteger(a, b) {\n if (a != null) this.fromString(a, b);\n}\n\n// return new, unset BigInteger\nfunction nbi() {\n return new BigInteger(null);\n}\n\n// Bits per digit\nvar dbits;\n\n// JavaScript engine analysis\nvar canary = 0xdeadbeefcafe;\nvar j_lm = ((canary&0xffffff)==0xefcafe);\n\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\n\n// am1: use a single mult and divide to get the high bits,\n// max digit bits should be 26 because\n// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\nfunction am1(i,x,w,j,c,n) {\n while(--n >= 0) {\n var v = x*this[i++]+w[j]+c;\n c = Math.floor(v/0x4000000);\n w[j++] = v&0x3ffffff;\n }\n return c;\n}\n// am2 avoids a big mult-and-extract completely.\n// Max digit bits should be <= 30 because we do bitwise ops\n// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\nfunction am2(i,x,w,j,c,n) {\n var xl = x&0x7fff, xh = x>>15;\n while(--n >= 0) {\n var l = this[i]&0x7fff;\n var h = this[i++]>>15;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);\n c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);\n w[j++] = l&0x3fffffff;\n }\n return c;\n}\n// Alternately, set max digit bits to 28 since some\n// browsers slow down when dealing with 32-bit numbers.\nfunction am3(i,x,w,j,c,n) {\n var xl = x&0x3fff, xh = x>>14;\n while(--n >= 0) {\n var l = this[i]&0x3fff;\n var h = this[i++]>>14;\n var m = xh*l+h*xl;\n l = xl*l+((m&0x3fff)<<14)+w[j]+c;\n c = (l>>28)+(m>>14)+xh*h;\n w[j++] = l&0xfffffff;\n }\n return c;\n}\nvar inBrowser = typeof navigator !== \"undefined\";\nif(inBrowser && j_lm && (navigator.appName == \"Microsoft Internet Explorer\")) {\n BigInteger.prototype.am = am2;\n dbits = 30;\n}\nelse if(inBrowser && j_lm && (navigator.appName != \"Netscape\")) {\n BigInteger.prototype.am = am1;\n dbits = 26;\n}\nelse { // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n}\n\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = (1 << dbits) - 1;\nBigInteger.prototype.DV = 1 << dbits;\n\nvar BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n\n// Digit conversions\nvar BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\nvar BI_RC = new Array();\nvar rr, vv;\nrr = \"0\".charCodeAt(0);\nfor (vv = 0; vv <= 9; ++vv)\n BI_RC[rr++] = vv;\nrr = \"a\".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv)\n BI_RC[rr++] = vv;\nrr = \"A\".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv)\n BI_RC[rr++] = vv;\n\nfunction int2char(n) {\n return BI_RM.charAt(n);\n}\nfunction intAt(s, i) {\n var c = BI_RC[s.charCodeAt(i)];\n return c == null ? -1 : c;\n}\n\n// (protected) copy this to r\nfunction bnpCopyTo(r) {\n for (var i = this.t - 1; i >= 0; --i)\n r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n}\n\n// (protected) set from integer value x, -DV <= x < DV\nfunction bnpFromInt(x) {\n this.t = 1;\n this.s = x < 0 ? -1 : 0;\n if (x > 0) this[0] = x;\n else if (x < -1) this[0] = x + this.DV;\n else this.t = 0;\n}\n\n// return bigint initialized to value\nfunction nbv(i) {\n var r = nbi();\n\n r.fromInt(i);\n\n return r;\n}\n\n// (protected) set from string and radix\nfunction bnpFromString(s, b) {\n var k;\n if (b == 16) k = 4;\n else if (b == 8) k = 3;\n else if (b == 2) k = 1;\n else if (b == 32) k = 5;\n else if (b == 4) k = 2;\n else throw new Error(\"Only radix 2, 4, 8, 16, 32 are supported\");\n this.t = 0;\n this.s = 0;\n var i = s.length, mi = false, sh = 0;\n while (--i >= 0) {\n var x = intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) == \"-\") mi = true;\n continue;\n }\n mi = false;\n if (sh == 0) this[this.t++] = x;\n else if (sh + k > this.DB) {\n this[this.t - 1] |= (x & (1 << this.DB - sh) - 1) << sh;\n this[this.t++] = x >> this.DB - sh;\n } else this[this.t - 1] |= x << sh;\n sh += k;\n if (sh >= this.DB) sh -= this.DB;\n }\n this.clamp();\n if (mi) BigInteger.ZERO.subTo(this, this);\n}\n\n// (protected) clamp off excess high words\nfunction bnpClamp() {\n var c = this.s & this.DM;\n while (this.t > 0 && this[this.t - 1] == c)\n --this.t;\n}\n\n// (public) return string representation in given radix\nfunction bnToString(b) {\n if (this.s < 0) return \"-\" + this.negate().toString();\n var k;\n if (b == 16) k = 4;\n else if (b == 8) k = 3;\n else if (b == 2) k = 1;\n else if (b == 32) k = 5;\n else if (b == 4) k = 2;\n else throw new Error(\"Only radix 2, 4, 8, 16, 32 are supported\");\n var km = (1 << k) - 1, d, m = false, r = \"\", i = this.t;\n var p = this.DB - i * this.DB % k;\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) > 0) {\n m = true;\n r = int2char(d);\n }\n while (i >= 0) {\n if (p < k) {\n d = (this[i] & (1 << p) - 1) << k - p;\n d |= this[--i] >> (p += this.DB - k);\n } else {\n d = this[i] >> (p -= k) & km;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if (d > 0) m = true;\n if (m) r += int2char(d);\n }\n }\n return m ? r : \"0\";\n}\n\n// (public) -this\nfunction bnNegate() {\n var r = nbi();\n\n BigInteger.ZERO.subTo(this, r);\n\n return r;\n}\n\n// (public) |this|\nfunction bnAbs() {\n return this.s < 0 ? this.negate() : this;\n}\n\n// (public) return + if this > a, - if this < a, 0 if equal\nfunction bnCompareTo(a) {\n var r = this.s - a.s;\n if (r != 0) return r;\n var i = this.t;\n r = i - a.t;\n if (r != 0) return this.s < 0 ? -r : r;\n while (--i >= 0)\n if ((r = this[i] - a[i]) != 0) return r;\n return 0;\n}\n\n// returns bit length of the integer x\nfunction nbits(x) {\n var r = 1, t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}\n\n// (public) return the number of bits in \"this\"\nfunction bnBitLength() {\n if (this.t <= 0) return 0;\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM);\n}\n\n// (protected) r = this << n*DB\nfunction bnpDLShiftTo(n, r) {\n var i;\n for (i = this.t - 1; i >= 0; --i)\n r[i + n] = this[i];\n for (i = n - 1; i >= 0; --i)\n r[i] = 0;\n r.t = this.t + n;\n r.s = this.s;\n}\n\n// (protected) r = this >> n*DB\nfunction bnpDRShiftTo(n, r) {\n for (var i = n; i < this.t; ++i)\n r[i - n] = this[i];\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n}\n\n// (protected) r = this << n\nfunction bnpLShiftTo(n, r) {\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << cbs) - 1;\n var ds = Math.floor(n / this.DB), c = this.s << bs & this.DM, i;\n for (i = this.t - 1; i >= 0; --i) {\n r[i + ds + 1] = this[i] >> cbs | c;\n c = (this[i] & bm) << bs;\n }\n for (i = ds - 1; i >= 0; --i)\n r[i] = 0;\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n}\n\n// (protected) r = this >> n\nfunction bnpRShiftTo(n, r) {\n r.s = this.s;\n var ds = Math.floor(n / this.DB);\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n for (var i = ds + 1; i < this.t; ++i) {\n r[i - ds - 1] |= (this[i] & bm) << cbs;\n r[i - ds] = this[i] >> bs;\n }\n if (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs;\n r.t = this.t - ds;\n r.clamp();\n}\n\n// (protected) r = this - a\nfunction bnpSubTo(a, r) {\n var i = 0, c = 0, m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] - a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c -= a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n } else {\n c += this.s;\n while (i < a.t) {\n c -= a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c < -1) r[i++] = this.DV + c;\n else if (c > 0) r[i++] = c;\n r.t = i;\n r.clamp();\n}\n\n// (protected) r = this * a, r != this,a (HAC 14.12)\n// \"this\" should be the larger one if appropriate.\nfunction bnpMultiplyTo(a, r) {\n var x = this.abs(), y = a.abs();\n var i = x.t;\n r.t = i + y.t;\n while (--i >= 0)\n r[i] = 0;\n for (i = 0; i < y.t; ++i)\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n r.s = 0;\n r.clamp();\n if (this.s != a.s) BigInteger.ZERO.subTo(r, r);\n}\n\n// (protected) r = this^2, r != this (HAC 14.16)\nfunction bnpSquareTo(r) {\n var x = this.abs();\n var i = r.t = 2 * x.t;\n while (--i >= 0)\n r[i] = 0;\n for (i = 0; i < x.t - 1; ++i) {\n var c = x.am(i, x[i], r, 2 * i, 0, 1);\n if (\n (r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >=\n x.DV\n ) {\n r[i + x.t] -= x.DV;\n r[i + x.t + 1] = 1;\n }\n }\n if (r.t > 0) r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n r.s = 0;\n r.clamp();\n}\n\n// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n// r != q, this != m. q or r may be null.\nfunction bnpDivRemTo(m, q, r) {\n var pm = m.abs();\n if (pm.t <= 0) return;\n var pt = this.abs();\n if (pt.t < pm.t) {\n if (q != null) q.fromInt(0);\n if (r != null) this.copyTo(r);\n return;\n }\n if (r == null) r = nbi();\n var y = nbi(), ts = this.s, ms = m.s;\n var nsh = this.DB - nbits(pm[pm.t - 1]);\n // normalize modulus\n if (nsh > 0) {\n pm.lShiftTo(nsh, y);\n pt.lShiftTo(nsh, r);\n } else {\n pm.copyTo(y);\n pt.copyTo(r);\n }\n var ys = y.t;\n var y0 = y[ys - 1];\n if (y0 == 0) return;\n var yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0);\n var d1 = this.FV / yt, d2 = (1 << this.F1) / yt, e = 1 << this.F2;\n var i = r.t, j = i - ys, t = q == null ? nbi() : q;\n y.dlShiftTo(j, t);\n if (r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t, r);\n }\n BigInteger.ONE.dlShiftTo(ys, t);\n t.subTo(y, y);\n // \"negative\" y so we can replace sub with am later\n while (y.t < ys)\n y[y.t++] = 0;\n while (--j >= 0) {\n // Estimate quotient digit\n var qd = r[--i] == y0\n ? this.DM\n : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {\n // Try it out\n y.dlShiftTo(j, t);\n r.subTo(t, r);\n while (r[i] < --qd) r.subTo(t, r);\n }\n }\n if (q != null) {\n r.drShiftTo(ys, q);\n if (ts != ms) BigInteger.ZERO.subTo(q, q);\n }\n r.t = ys;\n r.clamp();\n if (nsh > 0) r.rShiftTo(nsh, r);\n // Denormalize remainder\n if (ts < 0) BigInteger.ZERO.subTo(r, r);\n}\n\n// (public) this mod a\nfunction bnMod(a) {\n var r = nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r);\n return r;\n}\n\n// (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n// justification:\n// xy == 1 (mod m)\n// xy = 1+km\n// xy(2-xy) = (1+km)(1-km)\n// x[y(2-xy)] = 1-k^2m^2\n// x[y(2-xy)] == 1 (mod m^2)\n// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n// JS multiply \"overflows\" differently from C/C++, so care is needed here.\nfunction bnpInvDigit() {\n if (this.t < 1) return 0;\n var x = this[0];\n if ((x & 1) == 0) return 0;\n var y = x & 3;\n // y == 1/x mod 2^2\n y = y * (2 - (x & 0xf) * y) & 0xf;\n // y == 1/x mod 2^4\n y = y * (2 - (x & 0xff) * y) & 0xff;\n // y == 1/x mod 2^8\n y = y * (2 - ((x & 0xffff) * y & 0xffff)) & 0xffff;\n // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = y * (2 - x * y % this.DV) % this.DV;\n // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return y > 0 ? this.DV - y : -y;\n}\n\nfunction bnEquals(a) {\n return this.compareTo(a) == 0;\n}\n\n// (protected) r = this + a\nfunction bnpAddTo(a, r) {\n var i = 0, c = 0, m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] + a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c += a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n } else {\n c += this.s;\n while (i < a.t) {\n c += a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c > 0) r[i++] = c;\n else if (c < -1) r[i++] = this.DV + c;\n r.t = i;\n r.clamp();\n}\n\n// (public) this + a\nfunction bnAdd(a) {\n var r = nbi();\n\n this.addTo(a, r);\n\n return r;\n}\n\n// (public) this - a\nfunction bnSubtract(a) {\n var r = nbi();\n\n this.subTo(a, r);\n\n return r;\n}\n\n// (public) this * a\nfunction bnMultiply(a) {\n var r = nbi();\n\n this.multiplyTo(a, r);\n\n return r;\n}\n\n// (public) this / a\nfunction bnDivide(a) {\n var r = nbi();\n\n this.divRemTo(a, r, null);\n\n return r;\n}\n\n// Montgomery reduction\nfunction Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << m.DB - 15) - 1;\n this.mt2 = 2 * m.t;\n}\n\n// xR mod m\nfunction montConvert(x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t, r);\n r.divRemTo(this.m, null, r);\n if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r);\n return r;\n}\n\n// x/R mod m\nfunction montRevert(x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n}\n\n// x = x/R mod m (HAC 14.32)\nfunction montReduce(x) {\n while (x.t <= this.mt2)\n // pad x so am has enough room later\n x[x.t++] = 0;\n for (var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i] & 0x7fff;\n var u0 = j * this.mpl +\n ((j * this.mph + (x[i] >> 15) * this.mpl & this.um) << 15) &\n x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n // propagate carry\n while (x[j] >= x.DV) {\n x[j] -= x.DV;\n x[++j]++;\n }\n }\n x.clamp();\n x.drShiftTo(this.m.t, x);\n if (x.compareTo(this.m) >= 0) x.subTo(this.m, x);\n}\n\n// r = \"x^2/R mod m\"; x != r\nfunction montSqrTo(x, r) {\n x.squareTo(r);\n\n this.reduce(r);\n}\n\n// r = \"xy/R mod m\"; x,y != r\nfunction montMulTo(x, y, r) {\n x.multiplyTo(y, r);\n\n this.reduce(r);\n}\n\nMontgomery.prototype.convert = montConvert;\nMontgomery.prototype.revert = montRevert;\nMontgomery.prototype.reduce = montReduce;\nMontgomery.prototype.mulTo = montMulTo;\nMontgomery.prototype.sqrTo = montSqrTo;\n\n// (public) this^e % m (HAC 14.85)\nfunction bnModPow(e, m, callback) {\n var i = e.bitLength(), k, r = nbv(1), z = new Montgomery(m);\n if (i <= 0) return r;\n else if (i < 18) k = 1;\n else if (i < 48) k = 3;\n else if (i < 144) k = 4;\n else if (i < 768) k = 5;\n else k = 6;\n\n // precomputation\n var g = new Array(), n = 3, k1 = k - 1, km = (1 << k) - 1;\n g[1] = z.convert(this);\n if (k > 1) {\n var g2 = nbi();\n z.sqrTo(g[1], g2);\n while (n <= km) {\n g[n] = nbi();\n z.mulTo(g2, g[n - 2], g[n]);\n n += 2;\n }\n }\n\n var j = e.t - 1, w, is1 = true, r2 = nbi(), t;\n i = nbits(e[j]) - 1;\n while (j >= 0) {\n if (i >= k1) w = e[j] >> i - k1 & km;\n else {\n w = (e[j] & (1 << i + 1) - 1) << k1 - i;\n if (j > 0) w |= e[j - 1] >> this.DB + i - k1;\n }\n\n n = k;\n while ((w & 1) == 0) {\n w >>= 1;\n --n;\n }\n if ((i -= n) < 0) {\n i += this.DB;\n --j;\n }\n if (is1) {\n // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n } else {\n while (n > 1) {\n z.sqrTo(r, r2);\n z.sqrTo(r2, r);\n n -= 2;\n }\n if (n > 0) z.sqrTo(r, r2);\n else {\n t = r;\n r = r2;\n r2 = t;\n }\n z.mulTo(r2, g[w], r);\n }\n\n while (j >= 0 && (e[j] & 1 << i) == 0) {\n z.sqrTo(r, r2);\n t = r;\n r = r2;\n r2 = t;\n if (--i < 0) {\n i = this.DB - 1;\n --j;\n }\n }\n }\n var result = z.revert(r);\n callback(null, result);\n return result;\n}\n\n// protected\nBigInteger.prototype.copyTo = bnpCopyTo;\nBigInteger.prototype.fromInt = bnpFromInt;\nBigInteger.prototype.fromString = bnpFromString;\nBigInteger.prototype.clamp = bnpClamp;\nBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\nBigInteger.prototype.drShiftTo = bnpDRShiftTo;\nBigInteger.prototype.lShiftTo = bnpLShiftTo;\nBigInteger.prototype.rShiftTo = bnpRShiftTo;\nBigInteger.prototype.subTo = bnpSubTo;\nBigInteger.prototype.multiplyTo = bnpMultiplyTo;\nBigInteger.prototype.squareTo = bnpSquareTo;\nBigInteger.prototype.divRemTo = bnpDivRemTo;\nBigInteger.prototype.invDigit = bnpInvDigit;\nBigInteger.prototype.addTo = bnpAddTo;\n\n// public\nBigInteger.prototype.toString = bnToString;\nBigInteger.prototype.negate = bnNegate;\nBigInteger.prototype.abs = bnAbs;\nBigInteger.prototype.compareTo = bnCompareTo;\nBigInteger.prototype.bitLength = bnBitLength;\nBigInteger.prototype.mod = bnMod;\nBigInteger.prototype.equals = bnEquals;\nBigInteger.prototype.add = bnAdd;\nBigInteger.prototype.subtract = bnSubtract;\nBigInteger.prototype.multiply = bnMultiply;\nBigInteger.prototype.divide = bnDivide;\nBigInteger.prototype.modPow = bnModPow;\n\n// \"constants\"\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/BigInteger.js","/*\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport CognitoJwtToken from './CognitoJwtToken';\n\n/** @class */\nexport default class CognitoAccessToken extends CognitoJwtToken {\n /**\n * Constructs a new CognitoAccessToken object\n * @param {string=} AccessToken The JWT access token.\n */\n constructor({ AccessToken } = {}) {\n super(AccessToken || '');\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoAccessToken.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport CognitoJwtToken from './CognitoJwtToken';\n\n/** @class */\nexport default class CognitoIdToken extends CognitoJwtToken {\n /**\n * Constructs a new CognitoIdToken object\n * @param {string=} IdToken The JWT Id token\n */\n constructor({ IdToken } = {}) {\n super(IdToken || '');\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoIdToken.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Buffer } from 'buffer/';\n\n/** @class */\nexport default class CognitoJwtToken {\n /**\n * Constructs a new CognitoJwtToken object\n * @param {string=} token The JWT token.\n */\n constructor(token) {\n // Assign object\n this.jwtToken = token || '';\n this.payload = this.decodePayload();\n }\n\n /**\n * @returns {string} the record's token.\n */\n getJwtToken() {\n return this.jwtToken;\n }\n\n /**\n * @returns {int} the token's expiration (exp member).\n */\n getExpiration() {\n return this.payload.exp;\n }\n\n /**\n * @returns {int} the token's \"issued at\" (iat member).\n */\n getIssuedAt() {\n return this.payload.iat;\n }\n\n /**\n * @returns {object} the token's payload.\n */\n decodePayload() {\n const payload = this.jwtToken.split('.')[1];\n try {\n return JSON.parse(Buffer.from(payload, 'base64').toString('utf8'));\n } catch (err) {\n return {};\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoJwtToken.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nexport default class CognitoRefreshToken {\n /**\n * Constructs a new CognitoRefreshToken object\n * @param {string=} RefreshToken The JWT refresh token.\n */\n constructor({ RefreshToken } = {}) {\n // Assign object\n this.token = RefreshToken || '';\n }\n\n /**\n * @returns {string} the record's token.\n */\n getToken() {\n return this.token;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoRefreshToken.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Buffer } from 'buffer/';\n//import createHmac from 'create-hmac';\nimport * as crypto from 'crypto-browserify';\nconst createHmac = crypto.createHmac;\n\nimport BigInteger from './BigInteger';\nimport AuthenticationHelper from './AuthenticationHelper';\nimport CognitoAccessToken from './CognitoAccessToken';\nimport CognitoIdToken from './CognitoIdToken';\nimport CognitoRefreshToken from './CognitoRefreshToken';\nimport CognitoUserSession from './CognitoUserSession';\nimport DateHelper from './DateHelper';\nimport CognitoUserAttribute from './CognitoUserAttribute';\nimport StorageHelper from './StorageHelper';\n\n/**\n * @callback nodeCallback\n * @template T result\n * @param {*} err The operation failure reason, or null.\n * @param {T} result The operation result.\n */\n\n/**\n * @callback onFailure\n * @param {*} err Failure reason.\n */\n\n/**\n * @callback onSuccess\n * @template T result\n * @param {T} result The operation result.\n */\n\n/**\n * @callback mfaRequired\n * @param {*} details MFA challenge details.\n */\n\n/**\n * @callback customChallenge\n * @param {*} details Custom challenge details.\n */\n\n/**\n * @callback inputVerificationCode\n * @param {*} data Server response.\n */\n\n/**\n * @callback authSuccess\n * @param {CognitoUserSession} session The new session.\n * @param {bool=} userConfirmationNecessary User must be confirmed.\n */\n\n\n/** @class */\nexport default class CognitoUser {\n /**\n * Constructs a new CognitoUser object\n * @param {object} data Creation options\n * @param {string} data.Username The user's username.\n * @param {CognitoUserPool} data.Pool Pool containing the user.\n * @param {object} data.Storage Optional storage object.\n */\n constructor(data) {\n if (data == null || data.Username == null || data.Pool == null) {\n throw new Error('Username and pool information are required.');\n }\n\n this.username = data.Username || '';\n this.pool = data.Pool;\n this.Session = null;\n\n this.client = data.Pool.client;\n\n this.signInUserSession = null;\n this.authenticationFlowType = 'USER_SRP_AUTH';\n\n this.storage = data.Storage || new StorageHelper().getStorage();\n }\n\n /**\n * Sets the session for this user\n * @param {CognitoUserSession} signInUserSession the session\n * @returns {void}\n */\n setSignInUserSession(signInUserSession) {\n this.clearCachedTokens();\n this.signInUserSession = signInUserSession;\n this.cacheTokens();\n }\n\n /**\n * @returns {CognitoUserSession} the current session for this user\n */\n getSignInUserSession() {\n return this.signInUserSession;\n }\n\n /**\n * @returns {string} the user's username\n */\n getUsername() {\n return this.username;\n }\n\n /**\n * @returns {String} the authentication flow type\n */\n getAuthenticationFlowType() {\n return this.authenticationFlowType;\n }\n\n /**\n * sets authentication flow type\n * @param {string} authenticationFlowType New value.\n * @returns {void}\n */\n setAuthenticationFlowType(authenticationFlowType) {\n this.authenticationFlowType = authenticationFlowType;\n }\n\n\n /**\n * This is used for authenticating the user through the custom authentication flow.\n * @param {AuthenticationDetails} authDetails Contains the authentication data\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n initiateAuth(authDetails, callback) {\n const authParameters = authDetails.getAuthParameters();\n authParameters.USERNAME = this.username;\n\n const jsonReq = {\n AuthFlow: 'CUSTOM_AUTH',\n ClientId: this.pool.getClientId(),\n AuthParameters: authParameters,\n ClientMetadata: authDetails.getValidationData(),\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n\n this.client.request('InitiateAuth', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n const challengeName = data.ChallengeName;\n const challengeParameters = data.ChallengeParameters;\n\n if (challengeName === 'CUSTOM_CHALLENGE') {\n this.Session = data.Session;\n return callback.customChallenge(challengeParameters);\n }\n this.signInUserSession = this.getCognitoUserSession(data.AuthenticationResult);\n this.cacheTokens();\n return callback.onSuccess(this.signInUserSession);\n });\n }\n\n /**\n * This is used for authenticating the user.\n * stuff\n * @param {AuthenticationDetails} authDetails Contains the authentication data\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {newPasswordRequired} callback.newPasswordRequired new\n * password and any required attributes are required to continue\n * @param {mfaRequired} callback.mfaRequired MFA code\n * required to continue.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n authenticateUser(authDetails, callback) {\n if (this.authenticationFlowType === 'USER_PASSWORD_AUTH') {\n return this.authenticateUserPlainUsernamePassword(authDetails, callback);\n } else if (this.authenticationFlowType === 'USER_SRP_AUTH') {\n return this.authenticateUserDefaultAuth(authDetails, callback);\n }\n return callback.onFailure(new Error('Authentication flow type is invalid.'));\n }\n\n /**\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n * It calls the AuthenticationHelper for SRP related\n * stuff\n * @param {AuthenticationDetails} authDetails Contains the authentication data\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {newPasswordRequired} callback.newPasswordRequired new\n * password and any required attributes are required to continue\n * @param {mfaRequired} callback.mfaRequired MFA code\n * required to continue.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n authenticateUserDefaultAuth(authDetails, callback) {\n const authenticationHelper = new AuthenticationHelper(\n this.pool.getUserPoolId().split('_')[1]);\n const dateHelper = new DateHelper();\n\n let serverBValue;\n let salt;\n const authParameters = {};\n\n if (this.deviceKey != null) {\n authParameters.DEVICE_KEY = this.deviceKey;\n }\n\n authParameters.USERNAME = this.username;\n authenticationHelper.getLargeAValue((errOnAValue, aValue) => {\n // getLargeAValue callback start\n if (errOnAValue) {\n callback.onFailure(errOnAValue);\n }\n\n authParameters.SRP_A = aValue.toString(16);\n\n if (this.authenticationFlowType === 'CUSTOM_AUTH') {\n authParameters.CHALLENGE_NAME = 'SRP_A';\n }\n\n const jsonReq = {\n AuthFlow: this.authenticationFlowType,\n ClientId: this.pool.getClientId(),\n AuthParameters: authParameters,\n ClientMetadata: authDetails.getValidationData(),\n };\n if (this.getUserContextData(this.username)) {\n jsonReq.UserContextData = this.getUserContextData(this.username);\n }\n\n this.client.request('InitiateAuth', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n\n const challengeParameters = data.ChallengeParameters;\n\n this.username = challengeParameters.USER_ID_FOR_SRP;\n serverBValue = new BigInteger(challengeParameters.SRP_B, 16);\n salt = new BigInteger(challengeParameters.SALT, 16);\n this.getCachedDeviceKeyAndPassword();\n\n authenticationHelper.getPasswordAuthenticationKey(\n this.username,\n authDetails.getPassword(),\n serverBValue,\n salt,\n (errOnHkdf, hkdf) => {\n // getPasswordAuthenticationKey callback start\n if (errOnHkdf) {\n callback.onFailure(errOnHkdf);\n }\n\n const dateNow = dateHelper.getNowString();\n\n const signatureString = createHmac('sha256', hkdf)\n .update(Buffer.concat([\n Buffer.from(this.pool.getUserPoolId().split('_')[1], 'utf8'),\n Buffer.from(this.username, 'utf8'),\n Buffer.from(challengeParameters.SECRET_BLOCK, 'base64'),\n Buffer.from(dateNow, 'utf8'),\n ]))\n .digest('base64');\n\n const challengeResponses = {};\n\n challengeResponses.USERNAME = this.username;\n challengeResponses.PASSWORD_CLAIM_SECRET_BLOCK = challengeParameters.SECRET_BLOCK;\n challengeResponses.TIMESTAMP = dateNow;\n challengeResponses.PASSWORD_CLAIM_SIGNATURE = signatureString;\n\n if (this.deviceKey != null) {\n challengeResponses.DEVICE_KEY = this.deviceKey;\n }\n\n const respondToAuthChallenge = (challenge, challengeCallback) =>\n this.client.request('RespondToAuthChallenge', challenge,\n (errChallenge, dataChallenge) => {\n if (errChallenge && errChallenge.code === 'ResourceNotFoundException' &&\n errChallenge.message.toLowerCase().indexOf('device') !== -1) {\n challengeResponses.DEVICE_KEY = null;\n this.deviceKey = null;\n this.randomPassword = null;\n this.deviceGroupKey = null;\n this.clearCachedDeviceKeyAndPassword();\n return respondToAuthChallenge(challenge, challengeCallback);\n }\n return challengeCallback(errChallenge, dataChallenge);\n });\n\n const jsonReqResp = {\n ChallengeName: 'PASSWORD_VERIFIER',\n ClientId: this.pool.getClientId(),\n ChallengeResponses: challengeResponses,\n Session: data.Session,\n };\n if (this.getUserContextData()) {\n jsonReqResp.UserContextData = this.getUserContextData();\n }\n respondToAuthChallenge(jsonReqResp, (errAuthenticate, dataAuthenticate) => {\n if (errAuthenticate) {\n return callback.onFailure(errAuthenticate);\n }\n\n const challengeName = dataAuthenticate.ChallengeName;\n if (challengeName === 'NEW_PASSWORD_REQUIRED') {\n this.Session = dataAuthenticate.Session;\n let userAttributes = null;\n let rawRequiredAttributes = null;\n const requiredAttributes = [];\n const userAttributesPrefix = authenticationHelper\n .getNewPasswordRequiredChallengeUserAttributePrefix();\n\n if (dataAuthenticate.ChallengeParameters) {\n userAttributes = JSON.parse(\n dataAuthenticate.ChallengeParameters.userAttributes);\n rawRequiredAttributes = JSON.parse(\n dataAuthenticate.ChallengeParameters.requiredAttributes);\n }\n\n if (rawRequiredAttributes) {\n for (let i = 0; i < rawRequiredAttributes.length; i++) {\n requiredAttributes[i] = rawRequiredAttributes[i].substr(\n userAttributesPrefix.length\n );\n }\n }\n return callback.newPasswordRequired(userAttributes, requiredAttributes);\n }\n return this.authenticateUserInternal(\n dataAuthenticate,\n authenticationHelper,\n callback\n );\n });\n return undefined;\n // getPasswordAuthenticationKey callback end\n });\n return undefined;\n });\n // getLargeAValue callback end\n });\n }\n\n /**\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n * @param {AuthenticationDetails} authDetails Contains the authentication data.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {mfaRequired} callback.mfaRequired MFA code\n * required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n authenticateUserPlainUsernamePassword(authDetails, callback) {\n const authParameters = {};\n authParameters.USERNAME = this.username;\n authParameters.PASSWORD = authDetails.getPassword();\n if (!authParameters.PASSWORD) {\n callback.onFailure(new Error('PASSWORD parameter is required'));\n return;\n }\n const authenticationHelper = new AuthenticationHelper(\n this.pool.getUserPoolId().split('_')[1]);\n this.getCachedDeviceKeyAndPassword();\n if (this.deviceKey != null) {\n authParameters.DEVICE_KEY = this.deviceKey;\n }\n\n const jsonReq = {\n AuthFlow: 'USER_PASSWORD_AUTH',\n ClientId: this.pool.getClientId(),\n AuthParameters: authParameters,\n ClientMetadata: authDetails.getValidationData(),\n };\n if (this.getUserContextData(this.username)) {\n jsonReq.UserContextData = this.getUserContextData(this.username);\n }\n // USER_PASSWORD_AUTH happens in a single round-trip: client sends userName and password,\n // Cognito UserPools verifies password and returns tokens.\n this.client.request('InitiateAuth', jsonReq, (err, authResult) => {\n if (err) {\n return callback.onFailure(err);\n }\n return this.authenticateUserInternal(authResult, authenticationHelper, callback);\n });\n }\n\n /**\n * PRIVATE ONLY: This is an internal only method and should not\n * be directly called by the consumers.\n * @param {object} dataAuthenticate authentication data\n * @param {object} authenticationHelper helper created\n * @param {callback} callback passed on from caller\n * @returns {void}\n */\n authenticateUserInternal(dataAuthenticate, authenticationHelper, callback) {\n const challengeName = dataAuthenticate.ChallengeName;\n const challengeParameters = dataAuthenticate.ChallengeParameters;\n\n if (challengeName === 'SMS_MFA') {\n this.Session = dataAuthenticate.Session;\n return callback.mfaRequired(challengeName, challengeParameters);\n }\n\n if (challengeName === 'SELECT_MFA_TYPE') {\n this.Session = dataAuthenticate.Session;\n return callback.selectMFAType(challengeName, challengeParameters);\n }\n\n if (challengeName === 'MFA_SETUP') {\n this.Session = dataAuthenticate.Session;\n return callback.mfaSetup(challengeName, challengeParameters);\n }\n\n if (challengeName === 'SOFTWARE_TOKEN_MFA') {\n this.Session = dataAuthenticate.Session;\n return callback.totpRequired(challengeName, challengeParameters);\n }\n\n if (challengeName === 'CUSTOM_CHALLENGE') {\n this.Session = dataAuthenticate.Session;\n return callback.customChallenge(challengeParameters);\n }\n\n if (challengeName === 'DEVICE_SRP_AUTH') {\n this.getDeviceResponse(callback);\n return undefined;\n }\n\n this.signInUserSession = this.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n this.cacheTokens();\n\n const newDeviceMetadata = dataAuthenticate.AuthenticationResult.NewDeviceMetadata;\n if (newDeviceMetadata == null) {\n return callback.onSuccess(this.signInUserSession);\n }\n\n authenticationHelper.generateHashDevice(\n dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,\n dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey,\n (errGenHash) => {\n if (errGenHash) {\n return callback.onFailure(errGenHash);\n }\n\n const deviceSecretVerifierConfig = {\n Salt: Buffer.from(\n authenticationHelper.getSaltDevices(), 'hex'\n ).toString('base64'),\n PasswordVerifier: Buffer.from(\n authenticationHelper.getVerifierDevices(), 'hex'\n ).toString('base64'),\n };\n\n this.verifierDevices = deviceSecretVerifierConfig.PasswordVerifier;\n this.deviceGroupKey = newDeviceMetadata.DeviceGroupKey;\n this.randomPassword = authenticationHelper.getRandomPassword();\n\n this.client.request('ConfirmDevice', {\n DeviceKey: newDeviceMetadata.DeviceKey,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n DeviceName: navigator.userAgent,\n }, (errConfirm, dataConfirm) => {\n if (errConfirm) {\n return callback.onFailure(errConfirm);\n }\n\n this.deviceKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey;\n this.cacheDeviceKeyAndPassword();\n if (dataConfirm.UserConfirmationNecessary === true) {\n return callback.onSuccess(\n this.signInUserSession, dataConfirm.UserConfirmationNecessary);\n }\n return callback.onSuccess(this.signInUserSession);\n });\n return undefined;\n });\n return undefined;\n }\n\n /**\n * This method is user to complete the NEW_PASSWORD_REQUIRED challenge.\n * Pass the new password with any new user attributes to be updated.\n * User attribute keys must be of format userAttributes..\n * @param {string} newPassword new password for this user\n * @param {object} requiredAttributeData map with values for all required attributes\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {mfaRequired} callback.mfaRequired MFA code required to continue.\n * @param {customChallenge} callback.customChallenge Custom challenge\n * response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n completeNewPasswordChallenge(newPassword, requiredAttributeData, callback) {\n if (!newPassword) {\n return callback.onFailure(new Error('New password is required.'));\n }\n const authenticationHelper = new AuthenticationHelper(\n this.pool.getUserPoolId().split('_')[1]);\n const userAttributesPrefix = authenticationHelper\n .getNewPasswordRequiredChallengeUserAttributePrefix();\n\n const finalUserAttributes = {};\n if (requiredAttributeData) {\n Object.keys(requiredAttributeData).forEach((key) => {\n finalUserAttributes[userAttributesPrefix + key] = requiredAttributeData[key];\n });\n }\n\n finalUserAttributes.NEW_PASSWORD = newPassword;\n finalUserAttributes.USERNAME = this.username;\n const jsonReq = {\n ChallengeName: 'NEW_PASSWORD_REQUIRED',\n ClientId: this.pool.getClientId(),\n ChallengeResponses: finalUserAttributes,\n Session: this.Session,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n\n this.client.request('RespondToAuthChallenge',\n jsonReq, (errAuthenticate, dataAuthenticate) => {\n if (errAuthenticate) {\n return callback.onFailure(errAuthenticate);\n }\n return this.authenticateUserInternal(dataAuthenticate, authenticationHelper, callback);\n });\n return undefined;\n }\n\n /**\n * This is used to get a session using device authentication. It is called at the end of user\n * authentication\n *\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n * @private\n */\n getDeviceResponse(callback) {\n const authenticationHelper = new AuthenticationHelper(\n this.deviceGroupKey);\n const dateHelper = new DateHelper();\n\n const authParameters = {};\n\n authParameters.USERNAME = this.username;\n authParameters.DEVICE_KEY = this.deviceKey;\n authenticationHelper.getLargeAValue((errAValue, aValue) => {\n // getLargeAValue callback start\n if (errAValue) {\n callback.onFailure(errAValue);\n }\n\n authParameters.SRP_A = aValue.toString(16);\n\n const jsonReq = {\n ChallengeName: 'DEVICE_SRP_AUTH',\n ClientId: this.pool.getClientId(),\n ChallengeResponses: authParameters,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n\n const challengeParameters = data.ChallengeParameters;\n\n const serverBValue = new BigInteger(challengeParameters.SRP_B, 16);\n const salt = new BigInteger(challengeParameters.SALT, 16);\n\n authenticationHelper.getPasswordAuthenticationKey(\n this.deviceKey,\n this.randomPassword,\n serverBValue,\n salt,\n (errHkdf, hkdf) => {\n // getPasswordAuthenticationKey callback start\n if (errHkdf) {\n return callback.onFailure(errHkdf);\n }\n\n const dateNow = dateHelper.getNowString();\n\n const signatureString = createHmac('sha256', hkdf)\n .update(Buffer.concat([\n Buffer.from(this.deviceGroupKey, 'utf8'),\n Buffer.from(this.deviceKey, 'utf8'),\n Buffer.from(challengeParameters.SECRET_BLOCK, 'base64'),\n Buffer.from(dateNow, 'utf8'),\n ]))\n .digest('base64');\n\n const challengeResponses = {};\n\n challengeResponses.USERNAME = this.username;\n challengeResponses.PASSWORD_CLAIM_SECRET_BLOCK = challengeParameters.SECRET_BLOCK;\n challengeResponses.TIMESTAMP = dateNow;\n challengeResponses.PASSWORD_CLAIM_SIGNATURE = signatureString;\n challengeResponses.DEVICE_KEY = this.deviceKey;\n\n const jsonReqResp = {\n ChallengeName: 'DEVICE_PASSWORD_VERIFIER',\n ClientId: this.pool.getClientId(),\n ChallengeResponses: challengeResponses,\n Session: data.Session,\n };\n if (this.getUserContextData()) {\n jsonReqResp.UserContextData = this.getUserContextData();\n }\n\n this.client.request('RespondToAuthChallenge',\n jsonReqResp, (errAuthenticate, dataAuthenticate) => {\n if (errAuthenticate) {\n return callback.onFailure(errAuthenticate);\n }\n\n this.signInUserSession = this.getCognitoUserSession(\n dataAuthenticate.AuthenticationResult\n );\n this.cacheTokens();\n\n return callback.onSuccess(this.signInUserSession);\n });\n return undefined;\n // getPasswordAuthenticationKey callback end\n });\n return undefined;\n });\n // getLargeAValue callback end\n });\n }\n\n /**\n * This is used for a certain user to confirm the registration by using a confirmation code\n * @param {string} confirmationCode Code entered by user.\n * @param {bool} forceAliasCreation Allow migrating from an existing email / phone number.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n confirmRegistration(confirmationCode, forceAliasCreation, callback) {\n const jsonReq = {\n ClientId: this.pool.getClientId(),\n ConfirmationCode: confirmationCode,\n Username: this.username,\n ForceAliasCreation: forceAliasCreation,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('ConfirmSignUp', jsonReq, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n }\n\n /**\n * This is used by the user once he has the responses to a custom challenge\n * @param {string} answerChallenge The custom challange answer.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {customChallenge} callback.customChallenge\n * Custom challenge response required to continue.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n sendCustomChallengeAnswer(answerChallenge, callback) {\n const challengeResponses = {};\n challengeResponses.USERNAME = this.username;\n challengeResponses.ANSWER = answerChallenge;\n\n const authenticationHelper = new AuthenticationHelper(\n this.pool.getUserPoolId().split('_')[1]\n );\n this.getCachedDeviceKeyAndPassword();\n if (this.deviceKey != null) {\n challengeResponses.DEVICE_KEY = this.deviceKey;\n }\n\n const jsonReq = {\n ChallengeName: 'CUSTOM_CHALLENGE',\n ChallengeResponses: challengeResponses,\n ClientId: this.pool.getClientId(),\n Session: this.Session,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n\n return this.authenticateUserInternal(data, authenticationHelper, callback);\n });\n }\n\n /**\n * This is used by the user once he has an MFA code\n * @param {string} confirmationCode The MFA code entered by the user.\n * @param {object} callback Result callback map.\n * @param {string} mfaType The mfa we are replying to.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {authSuccess} callback.onSuccess Called on success with the new session.\n * @returns {void}\n */\n sendMFACode(confirmationCode, callback, mfaType) {\n const challengeResponses = {};\n challengeResponses.USERNAME = this.username;\n challengeResponses.SMS_MFA_CODE = confirmationCode;\n const mfaTypeSelection = mfaType || 'SMS_MFA';\n if (mfaTypeSelection === 'SOFTWARE_TOKEN_MFA') {\n challengeResponses.SOFTWARE_TOKEN_MFA_CODE = confirmationCode;\n }\n\n if (this.deviceKey != null) {\n challengeResponses.DEVICE_KEY = this.deviceKey;\n }\n\n const jsonReq = {\n ChallengeName: mfaTypeSelection,\n ChallengeResponses: challengeResponses,\n ClientId: this.pool.getClientId(),\n Session: this.Session,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n\n this.client.request('RespondToAuthChallenge',\n jsonReq, (err, dataAuthenticate) => {\n if (err) {\n return callback.onFailure(err);\n }\n\n const challengeName = dataAuthenticate.ChallengeName;\n\n if (challengeName === 'DEVICE_SRP_AUTH') {\n this.getDeviceResponse(callback);\n return undefined;\n }\n\n this.signInUserSession =\n this.getCognitoUserSession(dataAuthenticate.AuthenticationResult);\n this.cacheTokens();\n\n if (dataAuthenticate.AuthenticationResult.NewDeviceMetadata == null) {\n return callback.onSuccess(this.signInUserSession);\n }\n\n const authenticationHelper = new AuthenticationHelper(\n this.pool.getUserPoolId().split('_')[1]);\n authenticationHelper.generateHashDevice(\n dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,\n dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey,\n (errGenHash) => {\n if (errGenHash) {\n return callback.onFailure(errGenHash);\n }\n\n const deviceSecretVerifierConfig = {\n Salt: Buffer.from(\n authenticationHelper.getSaltDevices(), 'hex'\n ).toString('base64'),\n PasswordVerifier: Buffer.from(\n authenticationHelper.getVerifierDevices(), 'hex'\n ).toString('base64'),\n };\n\n this.verifierDevices = deviceSecretVerifierConfig.PasswordVerifier;\n this.deviceGroupKey = dataAuthenticate.AuthenticationResult\n .NewDeviceMetadata.DeviceGroupKey;\n this.randomPassword = authenticationHelper.getRandomPassword();\n\n this.client.request('ConfirmDevice', {\n DeviceKey: dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n DeviceName: navigator.userAgent,\n }, (errConfirm, dataConfirm) => {\n if (errConfirm) {\n return callback.onFailure(errConfirm);\n }\n\n this.deviceKey = dataAuthenticate.AuthenticationResult.NewDeviceMetadata.DeviceKey;\n this.cacheDeviceKeyAndPassword();\n if (dataConfirm.UserConfirmationNecessary === true) {\n return callback.onSuccess(\n this.signInUserSession,\n dataConfirm.UserConfirmationNecessary);\n }\n return callback.onSuccess(this.signInUserSession);\n });\n return undefined;\n });\n return undefined;\n });\n }\n\n /**\n * This is used by an authenticated user to change the current password\n * @param {string} oldUserPassword The current password.\n * @param {string} newUserPassword The requested new password.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n changePassword(oldUserPassword, newUserPassword, callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('ChangePassword', {\n PreviousPassword: oldUserPassword,\n ProposedPassword: newUserPassword,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to enable MFA for himself\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n enableMFA(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n const mfaOptions = [];\n const mfaEnabled = {\n DeliveryMedium: 'SMS',\n AttributeName: 'phone_number',\n };\n mfaOptions.push(mfaEnabled);\n\n this.client.request('SetUserSettings', {\n MFAOptions: mfaOptions,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to enable MFA for himself\n * @param {string[]} smsMfaSettings the sms mfa settings\n * @param {string[]} softwareTokenMfaSettings the software token mfa settings\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n setUserMfaPreference(smsMfaSettings, softwareTokenMfaSettings, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('SetUserMFAPreference', {\n SMSMfaSettings: smsMfaSettings,\n SoftwareTokenMfaSettings: softwareTokenMfaSettings,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to disable MFA for himself\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n disableMFA(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n const mfaOptions = [];\n\n this.client.request('SetUserSettings', {\n MFAOptions: mfaOptions,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n\n /**\n * This is used by an authenticated user to delete himself\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n deleteUser(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('DeleteUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n this.clearCachedTokens();\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * @typedef {CognitoUserAttribute | { Name:string, Value:string }} AttributeArg\n */\n /**\n * This is used by an authenticated user to change a list of attributes\n * @param {AttributeArg[]} attributes A list of the new user attributes.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n updateAttributes(attributes, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('UpdateUserAttributes', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n UserAttributes: attributes,\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to get a list of attributes\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n getUserAttributes(callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('GetUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, (err, userData) => {\n if (err) {\n return callback(err, null);\n }\n\n const attributeList = [];\n\n for (let i = 0; i < userData.UserAttributes.length; i++) {\n const attribute = {\n Name: userData.UserAttributes[i].Name,\n Value: userData.UserAttributes[i].Value,\n };\n const userAttribute = new CognitoUserAttribute(attribute);\n attributeList.push(userAttribute);\n }\n\n return callback(null, attributeList);\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to get the MFAOptions\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n getMFAOptions(callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('GetUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, (err, userData) => {\n if (err) {\n return callback(err, null);\n }\n\n return callback(null, userData.MFAOptions);\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated users to get the userData\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n getUserData(callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('GetUser', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, (err, userData) => {\n if (err) {\n return callback(err, null);\n }\n\n return callback(null, userData);\n });\n return undefined;\n }\n\n /**\n * This is used by an authenticated user to delete a list of attributes\n * @param {string[]} attributeList Names of the attributes to delete.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n deleteAttributes(attributeList, callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n return callback(new Error('User is not authenticated'), null);\n }\n\n this.client.request('DeleteUserAttributes', {\n UserAttributeNames: attributeList,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, 'SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used by a user to resend a confirmation code\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n resendConfirmationCode(callback) {\n const jsonReq = {\n ClientId: this.pool.getClientId(),\n Username: this.username,\n };\n\n this.client.request('ResendConfirmationCode', jsonReq, (err, result) => {\n if (err) {\n return callback(err, null);\n }\n return callback(null, result);\n });\n }\n\n /**\n * This is used to get a session, either from the session object\n * or from the local storage, or by using a refresh token\n *\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n getSession(callback) {\n if (this.username == null) {\n return callback(new Error('Username is null. Cannot retrieve a new session'), null);\n }\n\n if (this.signInUserSession != null && this.signInUserSession.isValid()) {\n return callback(null, this.signInUserSession);\n }\n\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}.${this.username}`;\n const idTokenKey = `${keyPrefix}.idToken`;\n const accessTokenKey = `${keyPrefix}.accessToken`;\n const refreshTokenKey = `${keyPrefix}.refreshToken`;\n const clockDriftKey = `${keyPrefix}.clockDrift`;\n\n if (this.storage.getItem(idTokenKey)) {\n const idToken = new CognitoIdToken({\n IdToken: this.storage.getItem(idTokenKey),\n });\n const accessToken = new CognitoAccessToken({\n AccessToken: this.storage.getItem(accessTokenKey),\n });\n const refreshToken = new CognitoRefreshToken({\n RefreshToken: this.storage.getItem(refreshTokenKey),\n });\n const clockDrift = parseInt(this.storage.getItem(clockDriftKey), 0) || 0;\n\n const sessionData = {\n IdToken: idToken,\n AccessToken: accessToken,\n RefreshToken: refreshToken,\n ClockDrift: clockDrift,\n };\n const cachedSession = new CognitoUserSession(sessionData);\n if (cachedSession.isValid()) {\n this.signInUserSession = cachedSession;\n return callback(null, this.signInUserSession);\n }\n\n if (refreshToken.getToken() == null) {\n return callback(new Error('Cannot retrieve a new session. Please authenticate.'), null);\n }\n\n this.refreshSession(refreshToken, callback);\n } else {\n callback(new Error('Local storage is missing an ID Token, Please authenticate'), null);\n }\n\n return undefined;\n }\n\n\n /**\n * This uses the refreshToken to retrieve a new session\n * @param {CognitoRefreshToken} refreshToken A previous session's refresh token.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n refreshSession(refreshToken, callback) {\n const authParameters = {};\n authParameters.REFRESH_TOKEN = refreshToken.getToken();\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}`;\n const lastUserKey = `${keyPrefix}.LastAuthUser`;\n\n if (this.storage.getItem(lastUserKey)) {\n this.username = this.storage.getItem(lastUserKey);\n const deviceKeyKey = `${keyPrefix}.${this.username}.deviceKey`;\n this.deviceKey = this.storage.getItem(deviceKeyKey);\n authParameters.DEVICE_KEY = this.deviceKey;\n }\n\n const jsonReq = {\n ClientId: this.pool.getClientId(),\n AuthFlow: 'REFRESH_TOKEN_AUTH',\n AuthParameters: authParameters,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('InitiateAuth', jsonReq, (err, authResult) => {\n if (err) {\n if (err.code === 'NotAuthorizedException') {\n this.clearCachedTokens();\n }\n return callback(err, null);\n }\n if (authResult) {\n const authenticationResult = authResult.AuthenticationResult;\n if (!Object.prototype.hasOwnProperty.call(authenticationResult, 'RefreshToken')) {\n authenticationResult.RefreshToken = refreshToken.getToken();\n }\n this.signInUserSession = this.getCognitoUserSession(authenticationResult);\n this.cacheTokens();\n return callback(null, this.signInUserSession);\n }\n return undefined;\n });\n }\n\n /**\n * This is used to save the session tokens to local storage\n * @returns {void}\n */\n cacheTokens() {\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}`;\n const idTokenKey = `${keyPrefix}.${this.username}.idToken`;\n const accessTokenKey = `${keyPrefix}.${this.username}.accessToken`;\n const refreshTokenKey = `${keyPrefix}.${this.username}.refreshToken`;\n const clockDriftKey = `${keyPrefix}.${this.username}.clockDrift`;\n const lastUserKey = `${keyPrefix}.LastAuthUser`;\n\n this.storage.setItem(idTokenKey, this.signInUserSession.getIdToken().getJwtToken());\n this.storage.setItem(accessTokenKey, this.signInUserSession.getAccessToken().getJwtToken());\n this.storage.setItem(refreshTokenKey, this.signInUserSession.getRefreshToken().getToken());\n this.storage.setItem(clockDriftKey, `${this.signInUserSession.getClockDrift()}`);\n this.storage.setItem(lastUserKey, this.username);\n }\n\n /**\n * This is used to cache the device key and device group and device password\n * @returns {void}\n */\n cacheDeviceKeyAndPassword() {\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}.${this.username}`;\n const deviceKeyKey = `${keyPrefix}.deviceKey`;\n const randomPasswordKey = `${keyPrefix}.randomPasswordKey`;\n const deviceGroupKeyKey = `${keyPrefix}.deviceGroupKey`;\n\n this.storage.setItem(deviceKeyKey, this.deviceKey);\n this.storage.setItem(randomPasswordKey, this.randomPassword);\n this.storage.setItem(deviceGroupKeyKey, this.deviceGroupKey);\n }\n\n /**\n * This is used to get current device key and device group and device password\n * @returns {void}\n */\n getCachedDeviceKeyAndPassword() {\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}.${this.username}`;\n const deviceKeyKey = `${keyPrefix}.deviceKey`;\n const randomPasswordKey = `${keyPrefix}.randomPasswordKey`;\n const deviceGroupKeyKey = `${keyPrefix}.deviceGroupKey`;\n\n if (this.storage.getItem(deviceKeyKey)) {\n this.deviceKey = this.storage.getItem(deviceKeyKey);\n this.randomPassword = this.storage.getItem(randomPasswordKey);\n this.deviceGroupKey = this.storage.getItem(deviceGroupKeyKey);\n }\n }\n\n /**\n * This is used to clear the device key info from local storage\n * @returns {void}\n */\n clearCachedDeviceKeyAndPassword() {\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}.${this.username}`;\n const deviceKeyKey = `${keyPrefix}.deviceKey`;\n const randomPasswordKey = `${keyPrefix}.randomPasswordKey`;\n const deviceGroupKeyKey = `${keyPrefix}.deviceGroupKey`;\n\n this.storage.removeItem(deviceKeyKey);\n this.storage.removeItem(randomPasswordKey);\n this.storage.removeItem(deviceGroupKeyKey);\n }\n\n /**\n * This is used to clear the session tokens from local storage\n * @returns {void}\n */\n clearCachedTokens() {\n const keyPrefix = `CognitoIdentityServiceProvider.${this.pool.getClientId()}`;\n const idTokenKey = `${keyPrefix}.${this.username}.idToken`;\n const accessTokenKey = `${keyPrefix}.${this.username}.accessToken`;\n const refreshTokenKey = `${keyPrefix}.${this.username}.refreshToken`;\n const lastUserKey = `${keyPrefix}.LastAuthUser`;\n\n this.storage.removeItem(idTokenKey);\n this.storage.removeItem(accessTokenKey);\n this.storage.removeItem(refreshTokenKey);\n this.storage.removeItem(lastUserKey);\n }\n\n /**\n * This is used to build a user session from tokens retrieved in the authentication result\n * @param {object} authResult Successful auth response from server.\n * @returns {CognitoUserSession} The new user session.\n * @private\n */\n getCognitoUserSession(authResult) {\n const idToken = new CognitoIdToken(authResult);\n const accessToken = new CognitoAccessToken(authResult);\n const refreshToken = new CognitoRefreshToken(authResult);\n\n const sessionData = {\n IdToken: idToken,\n AccessToken: accessToken,\n RefreshToken: refreshToken,\n };\n\n return new CognitoUserSession(sessionData);\n }\n\n /**\n * This is used to initiate a forgot password request\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {inputVerificationCode?} callback.inputVerificationCode\n * Optional callback raised instead of onSuccess with response data.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n forgotPassword(callback) {\n const jsonReq = {\n ClientId: this.pool.getClientId(),\n Username: this.username,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('ForgotPassword', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n if (typeof callback.inputVerificationCode === 'function') {\n return callback.inputVerificationCode(data);\n }\n return callback.onSuccess(data);\n });\n }\n\n /**\n * This is used to confirm a new password using a confirmationCode\n * @param {string} confirmationCode Code entered by user.\n * @param {string} newPassword Confirm new password.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n confirmPassword(confirmationCode, newPassword, callback) {\n const jsonReq = {\n ClientId: this.pool.getClientId(),\n Username: this.username,\n ConfirmationCode: confirmationCode,\n Password: newPassword,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('ConfirmForgotPassword', jsonReq, err => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess();\n });\n }\n\n /**\n * This is used to initiate an attribute confirmation request\n * @param {string} attributeName User attribute that needs confirmation.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {inputVerificationCode} callback.inputVerificationCode Called on success.\n * @returns {void}\n */\n getAttributeVerificationCode(attributeName, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('GetUserAttributeVerificationCode', {\n AttributeName: attributeName,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n if (typeof callback.inputVerificationCode === 'function') {\n return callback.inputVerificationCode(data);\n }\n return callback.onSuccess();\n });\n return undefined;\n }\n\n /**\n * This is used to confirm an attribute using a confirmation code\n * @param {string} attributeName Attribute being confirmed.\n * @param {string} confirmationCode Code entered by user.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n verifyAttribute(attributeName, confirmationCode, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('VerifyUserAttribute', {\n AttributeName: attributeName,\n Code: confirmationCode,\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used to get the device information using the current device key\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess<*>} callback.onSuccess Called on success with device data.\n * @returns {void}\n */\n getDevice(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('GetDevice', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: this.deviceKey,\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess(data);\n });\n return undefined;\n }\n\n /**\n * This is used to forget a specific device\n * @param {string} deviceKey Device key.\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n forgetSpecificDevice(deviceKey, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('ForgetDevice', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: deviceKey,\n }, err => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used to forget the current device\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n forgetDevice(callback) {\n this.forgetSpecificDevice(this.deviceKey, {\n onFailure: callback.onFailure,\n onSuccess: result => {\n this.deviceKey = null;\n this.deviceGroupKey = null;\n this.randomPassword = null;\n this.clearCachedDeviceKeyAndPassword();\n return callback.onSuccess(result);\n },\n });\n }\n\n /**\n * This is used to set the device status as remembered\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n setDeviceStatusRemembered(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('UpdateDeviceStatus', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: this.deviceKey,\n DeviceRememberedStatus: 'remembered',\n }, err => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used to set the device status as not remembered\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n setDeviceStatusNotRemembered(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('UpdateDeviceStatus', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n DeviceKey: this.deviceKey,\n DeviceRememberedStatus: 'not_remembered',\n }, err => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used to list all devices for a user\n *\n * @param {int} limit the number of devices returned in a call\n * @param {string} paginationToken the pagination token in case any was returned before\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess<*>} callback.onSuccess Called on success with device list.\n * @returns {void}\n */\n listDevices(limit, paginationToken, callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('ListDevices', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n Limit: limit,\n PaginationToken: paginationToken,\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess(data);\n });\n return undefined;\n }\n\n /**\n * This is used to globally revoke all tokens issued to a user\n * @param {object} callback Result callback map.\n * @param {onFailure} callback.onFailure Called on any error.\n * @param {onSuccess} callback.onSuccess Called on success.\n * @returns {void}\n */\n globalSignOut(callback) {\n if (this.signInUserSession == null || !this.signInUserSession.isValid()) {\n return callback.onFailure(new Error('User is not authenticated'));\n }\n\n this.client.request('GlobalSignOut', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, err => {\n if (err) {\n return callback.onFailure(err);\n }\n this.clearCachedTokens();\n return callback.onSuccess('SUCCESS');\n });\n return undefined;\n }\n\n /**\n * This is used for the user to signOut of the application and clear the cached tokens.\n * @returns {void}\n */\n signOut() {\n this.signInUserSession = null;\n this.clearCachedTokens();\n }\n\n /**\n * This is used by a user trying to select a given MFA\n * @param {string} answerChallenge the mfa the user wants\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n sendMFASelectionAnswer(answerChallenge, callback) {\n const challengeResponses = {};\n challengeResponses.USERNAME = this.username;\n challengeResponses.ANSWER = answerChallenge;\n\n const jsonReq = {\n ChallengeName: 'SELECT_MFA_TYPE',\n ChallengeResponses: challengeResponses,\n ClientId: this.pool.getClientId(),\n Session: this.Session,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge', jsonReq, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n this.Session = data.Session;\n if (answerChallenge === 'SMS_MFA') {\n return callback.mfaRequired(data.challengeName, data.challengeParameters);\n }\n if (answerChallenge === 'SOFTWARE_TOKEN_MFA') {\n return callback.totpRequired(data.challengeName, data.challengeParameters);\n }\n return undefined;\n });\n }\n\n /**\n * This returns the user context data for advanced security feature.\n * @returns {void}\n */\n getUserContextData() {\n const pool = this.pool;\n return pool.getUserContextData(this.username);\n }\n\n /**\n * This is used by an authenticated or a user trying to authenticate to associate a TOTP MFA\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n associateSoftwareToken(callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n this.client.request('AssociateSoftwareToken', {\n Session: this.Session,\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n this.Session = data.Session;\n return callback.associateSecretCode(data.SecretCode);\n });\n } else {\n this.client.request('AssociateSoftwareToken', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.associateSecretCode(data.SecretCode);\n });\n }\n }\n\n /**\n * This is used by an authenticated or a user trying to authenticate to verify a TOTP MFA\n * @param {string} totpCode The MFA code entered by the user.\n * @param {string} friendlyDeviceName The device name we are assigning to the device.\n * @param {nodeCallback} callback Called on success or error.\n * @returns {void}\n */\n verifySoftwareToken(totpCode, friendlyDeviceName, callback) {\n if (!(this.signInUserSession != null && this.signInUserSession.isValid())) {\n this.client.request('VerifySoftwareToken', {\n Session: this.Session,\n UserCode: totpCode,\n FriendlyDeviceName: friendlyDeviceName,\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n this.Session = data.Session;\n const challengeResponses = {};\n challengeResponses.USERNAME = this.username;\n const jsonReq = {\n ChallengeName: 'MFA_SETUP',\n ClientId: this.pool.getClientId(),\n ChallengeResponses: challengeResponses,\n Session: this.Session,\n };\n if (this.getUserContextData()) {\n jsonReq.UserContextData = this.getUserContextData();\n }\n this.client.request('RespondToAuthChallenge',\n jsonReq, (errRespond, dataRespond) => {\n if (errRespond) {\n return callback.onFailure(errRespond);\n }\n this.signInUserSession = this.getCognitoUserSession(dataRespond.AuthenticationResult);\n this.cacheTokens();\n return callback.onSuccess(this.signInUserSession);\n });\n return undefined;\n });\n } else {\n this.client.request('VerifySoftwareToken', {\n AccessToken: this.signInUserSession.getAccessToken().getJwtToken(),\n UserCode: totpCode,\n FriendlyDeviceName: friendlyDeviceName,\n }, (err, data) => {\n if (err) {\n return callback.onFailure(err);\n }\n return callback.onSuccess(data);\n });\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoUser.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nexport default class CognitoUserAttribute {\n /**\n * Constructs a new CognitoUserAttribute object\n * @param {string=} Name The record's name\n * @param {string=} Value The record's value\n */\n constructor({ Name, Value } = {}) {\n this.Name = Name || '';\n this.Value = Value || '';\n }\n\n /**\n * @returns {string} the record's value.\n */\n getValue() {\n return this.Value;\n }\n\n /**\n * Sets the record's value.\n * @param {string} value The new value.\n * @returns {CognitoUserAttribute} The record for method chaining.\n */\n setValue(value) {\n this.Value = value;\n return this;\n }\n\n /**\n * @returns {string} the record's name.\n */\n getName() {\n return this.Name;\n }\n\n /**\n * Sets the record's name\n * @param {string} name The new name.\n * @returns {CognitoUserAttribute} The record for method chaining.\n */\n setName(name) {\n this.Name = name;\n return this;\n }\n\n /**\n * @returns {string} a string representation of the record.\n */\n toString() {\n return JSON.stringify(this);\n }\n\n /**\n * @returns {object} a flat object representing the record.\n */\n toJSON() {\n return {\n Name: this.Name,\n Value: this.Value,\n };\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoUserAttribute.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nexport default class CognitoUserSession {\n /**\n * Constructs a new CognitoUserSession object\n * @param {CognitoIdToken} IdToken The session's Id token.\n * @param {CognitoRefreshToken=} RefreshToken The session's refresh token.\n * @param {CognitoAccessToken} AccessToken The session's access token.\n * @param {int} ClockDrift The saved computer's clock drift or undefined to force calculation.\n */\n constructor({ IdToken, RefreshToken, AccessToken, ClockDrift } = {}) {\n if (AccessToken == null || IdToken == null) {\n throw new Error('Id token and Access Token must be present.');\n }\n\n this.idToken = IdToken;\n this.refreshToken = RefreshToken;\n this.accessToken = AccessToken;\n this.clockDrift = ClockDrift === undefined ? this.calculateClockDrift() : ClockDrift;\n }\n\n /**\n * @returns {CognitoIdToken} the session's Id token\n */\n getIdToken() {\n return this.idToken;\n }\n\n /**\n * @returns {CognitoRefreshToken} the session's refresh token\n */\n getRefreshToken() {\n return this.refreshToken;\n }\n\n /**\n * @returns {CognitoAccessToken} the session's access token\n */\n getAccessToken() {\n return this.accessToken;\n }\n\n /**\n * @returns {int} the session's clock drift\n */\n getClockDrift() {\n return this.clockDrift;\n }\n\n /**\n * @returns {int} the computer's clock drift\n */\n calculateClockDrift() {\n const now = Math.floor(new Date() / 1000);\n const iat = Math.min(this.accessToken.getIssuedAt(), this.idToken.getIssuedAt());\n\n return now - iat;\n }\n\n /**\n * Checks to see if the session is still valid based on session expiry information found\n * in tokens and the current time (adjusted with clock drift)\n * @returns {boolean} if the session is still valid\n */\n isValid() {\n const now = Math.floor(new Date() / 1000);\n const adjusted = now - this.clockDrift;\n\n return adjusted < this.accessToken.getExpiration() && adjusted < this.idToken.getExpiration();\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoUserSession.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst monthNames =\n ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\nconst weekNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\n\n/** @class */\nexport default class DateHelper {\n /**\n * @returns {string} The current time in \"ddd MMM D HH:mm:ss UTC YYYY\" format.\n */\n getNowString() {\n const now = new Date();\n\n const weekDay = weekNames[now.getUTCDay()];\n const month = monthNames[now.getUTCMonth()];\n const day = now.getUTCDate();\n\n let hours = now.getUTCHours();\n if (hours < 10) {\n hours = `0${hours}`;\n }\n\n let minutes = now.getUTCMinutes();\n if (minutes < 10) {\n minutes = `0${minutes}`;\n }\n\n let seconds = now.getUTCSeconds();\n if (seconds < 10) {\n seconds = `0${seconds}`;\n }\n\n const year = now.getUTCFullYear();\n\n // ddd MMM D HH:mm:ss UTC YYYY\n const dateNow = `${weekDay} ${month} ${day} ${hours}:${minutes}:${seconds} UTC ${year}`;\n\n return dateNow;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/DateHelper.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet dataMemory = {};\n\n/** @class */\nclass MemoryStorage {\n\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n static setItem(key, value) {\n dataMemory[key] = value;\n return dataMemory[key];\n }\n\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n static getItem(key) {\n return Object.prototype.hasOwnProperty.call(dataMemory, key) ? dataMemory[key] : undefined;\n }\n\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n static removeItem(key) {\n return delete dataMemory[key];\n }\n\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n static clear() {\n dataMemory = {};\n return dataMemory;\n }\n}\n\n/** @class */\nexport default class StorageHelper {\n\n /**\n * This is used to get a storage object\n * @returns {object} the storage\n */\n constructor() {\n try {\n this.storageWindow = window.localStorage;\n this.storageWindow.setItem('aws.cognito.test-ls', 1);\n this.storageWindow.removeItem('aws.cognito.test-ls');\n } catch (exception) {\n this.storageWindow = MemoryStorage;\n }\n }\n\n /**\n * This is used to return the storage\n * @returns {object} the storage\n */\n getStorage() {\n return this.storageWindow;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/StorageHelper.js","var Buffer = require('buffer').Buffer\nvar sha = require('./sha')\nvar sha256 = require('./sha256')\nvar rng = require('./rng')\nvar md5 = require('./md5')\n\nvar algorithms = {\n sha1: sha,\n sha256: sha256,\n md5: md5\n}\n\nvar blocksize = 64\nvar zeroBuffer = new Buffer(blocksize); zeroBuffer.fill(0)\nfunction hmac(fn, key, data) {\n if(!Buffer.isBuffer(key)) key = new Buffer(key)\n if(!Buffer.isBuffer(data)) data = new Buffer(data)\n\n if(key.length > blocksize) {\n key = fn(key)\n } else if(key.length < blocksize) {\n key = Buffer.concat([key, zeroBuffer], blocksize)\n }\n\n var ipad = new Buffer(blocksize), opad = new Buffer(blocksize)\n for(var i = 0; i < blocksize; i++) {\n ipad[i] = key[i] ^ 0x36\n opad[i] = key[i] ^ 0x5C\n }\n\n var hash = fn(Buffer.concat([ipad, data]))\n return fn(Buffer.concat([opad, hash]))\n}\n\nfunction hash(alg, key) {\n alg = alg || 'sha1'\n var fn = algorithms[alg]\n var bufs = []\n var length = 0\n if(!fn) error('algorithm:', alg, 'is not yet supported')\n return {\n update: function (data) {\n if(!Buffer.isBuffer(data)) data = new Buffer(data)\n \n bufs.push(data)\n length += data.length\n return this\n },\n digest: function (enc) {\n var buf = Buffer.concat(bufs)\n var r = key ? hmac(fn, key, buf) : fn(buf)\n bufs = null\n return enc ? r.toString(enc) : r\n }\n }\n}\n\nfunction error () {\n var m = [].slice.call(arguments).join(' ')\n throw new Error([\n m,\n 'we accept pull requests',\n 'http://github.com/dominictarr/crypto-browserify'\n ].join('\\n'))\n}\n\nexports.createHash = function (alg) { return hash(alg) }\nexports.createHmac = function (alg, key) { return hash(alg, key) }\nexports.randomBytes = function(size, callback) {\n if (callback && callback.call) {\n try {\n callback.call(this, undefined, new Buffer(rng(size)))\n } catch (err) { callback(err) }\n } else {\n return new Buffer(rng(size))\n }\n}\n\nfunction each(a, f) {\n for(var i in a)\n f(a[i], i)\n}\n\n// the least I can do is make error messages for the rest of the node.js/crypto api.\neach(['createCredentials'\n, 'createCipher'\n, 'createCipheriv'\n, 'createDecipher'\n, 'createDecipheriv'\n, 'createSign'\n, 'createVerify'\n, 'createDiffieHellman'\n, 'pbkdf2'], function (name) {\n exports[name] = function () {\n error('sorry,', name, 'is not implemented yet')\n }\n})\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/index.js\n// module id = 14\n// module chunks = 0","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @class */\nexport default class AuthenticationDetails {\n /**\n * Constructs a new AuthenticationDetails object\n * @param {object=} data Creation options.\n * @param {string} data.Username User being authenticated.\n * @param {string} data.Password Plain-text password to authenticate with.\n * @param {(AttributeArg[])?} data.ValidationData Application extra metadata.\n * @param {(AttributeArg[])?} data.AuthParamaters Authentication paramaters for custom auth.\n */\n constructor(data) {\n const { ValidationData, Username, Password, AuthParameters } = data || {};\n this.validationData = ValidationData || {};\n this.authParameters = AuthParameters || {};\n this.username = Username;\n this.password = Password;\n }\n\n /**\n * @returns {string} the record's username\n */\n getUsername() {\n return this.username;\n }\n\n /**\n * @returns {string} the record's password\n */\n getPassword() {\n return this.password;\n }\n\n /**\n * @returns {Array} the record's validationData\n */\n getValidationData() {\n return this.validationData;\n }\n\n /**\n * @returns {Array} the record's authParameters\n */\n getAuthParameters() {\n return this.authParameters;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/AuthenticationDetails.js","import UserAgent from './UserAgent';\n/** @class */\nexport default class Client {\n /**\n * Constructs a new AWS Cognito Identity Provider client object\n * @param {string} region AWS region\n * @param {string} endpoint endpoint\n */\n constructor(region, endpoint, options) {\n this.endpoint = endpoint || `https://cognito-idp.${region}.amazonaws.com/`;\n this.userAgent = UserAgent.prototype.userAgent || 'aws-amplify/0.1.x js';\n this.options = options || {};\n }\n\n /**\n * Makes an unauthenticated request on AWS Cognito Identity Provider API\n * using fetch\n * @param {string} operation API operation\n * @param {object} params Input parameters\n * @param {function} callback Callback called when a response is returned\n * @returns {void}\n */\n request(operation, params, callback) {\n const headers = {\n 'Content-Type': 'application/x-amz-json-1.1',\n 'X-Amz-Target': `AWSCognitoIdentityProviderService.${operation}`,\n 'X-Amz-User-Agent': this.userAgent,\n };\n\n const options = Object.assign(\n this.options,\n {\n headers,\n method: 'POST',\n mode: 'cors',\n cache: 'no-cache',\n body: JSON.stringify(params),\n }\n );\n\n let response;\n\n fetch(this.endpoint, options)\n .then(resp => {\n response = resp;\n return resp;\n }, err => {\n // If error happens here, the request failed\n // if it is TypeError throw network error\n if (err instanceof TypeError) {\n throw new Error('Network error');\n }\n throw err;\n })\n .then(resp => resp.json().catch(() => ({})))\n .then(data => {\n if (response.ok) return callback(null, data);\n\n // Taken from aws-sdk-js/lib/protocol/json.js\n // eslint-disable-next-line no-underscore-dangle\n const code = (data.__type || data.code).split('#').pop();\n const error = {\n code,\n name: code,\n message: (data.message || data.Message || null),\n };\n return callback(error);\n })\n .catch(err => {\n // default to return 'UnknownError'\n let error = { code: 'UnknownError', message: 'Unkown error' };\n\n // first check if we have a service error\n if (response && response.headers && response.headers.get('x-amzn-errortype')) {\n try {\n const code = (response.headers.get('x-amz-errortype')).split(':')[0];\n error = {\n code,\n name: code,\n statusCode: response.status,\n message: (response.status) ? response.status.toString() : null,\n };\n } catch (ex) {\n // pass through so it doesn't get swallowed if we can't parse it\n }\n // otherwise check if error is Network error\n } else if (err instanceof Error && err.message === 'Network error') {\n error = {\n code: 'NetworkError',\n name: err.name,\n message: err.message,\n };\n }\n return callback(error);\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Client.js","/*!\n * Copyright 2016 Amazon.com,\n * Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Amazon Software License (the \"License\").\n * You may not use this file except in compliance with the\n * License. A copy of the License is located at\n *\n * http://aws.amazon.com/asl/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n * CONDITIONS OF ANY KIND, express or implied. See the License\n * for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Client from './Client';\nimport CognitoUser from './CognitoUser';\nimport StorageHelper from './StorageHelper';\n\n/** @class */\nexport default class CognitoUserPool {\n /**\n * Constructs a new CognitoUserPool object\n * @param {object} data Creation options.\n * @param {string} data.UserPoolId Cognito user pool id.\n * @param {string} data.ClientId User pool application client id.\n * @param {object} data.Storage Optional storage object.\n * @param {boolean} data.AdvancedSecurityDataCollectionFlag Optional:\n * boolean flag indicating if the data collection is enabled\n * to support cognito advanced security features. By default, this\n * flag is set to true.\n */\n constructor(data) {\n const {\n UserPoolId,\n ClientId,\n ProxyAgent,\n endpoint,\n AdvancedSecurityDataCollectionFlag\n } = data || {};\n if (!UserPoolId || !ClientId) {\n throw new Error('Both UserPoolId and ClientId are required.');\n }\n if (!/^[\\w-]+_.+$/.test(UserPoolId)) {\n throw new Error('Invalid UserPoolId format.');\n }\n const region = UserPoolId.split('_')[0];\n\n this.userPoolId = UserPoolId;\n this.clientId = ClientId;\n\n this.client = new Client(region, endpoint, { agent: ProxyAgent || null });\n\n /**\n * By default, AdvancedSecurityDataCollectionFlag is set to true,\n * if no input value is provided.\n */\n this.advancedSecurityDataCollectionFlag = AdvancedSecurityDataCollectionFlag !== false;\n\n this.storage = data.Storage || new StorageHelper().getStorage();\n }\n\n /**\n * @returns {string} the user pool id\n */\n getUserPoolId() {\n return this.userPoolId;\n }\n\n /**\n * @returns {string} the client id\n */\n getClientId() {\n return this.clientId;\n }\n\n /**\n * @typedef {object} SignUpResult\n * @property {CognitoUser} user New user.\n * @property {bool} userConfirmed If the user is already confirmed.\n */\n /**\n * method for signing up a user\n * @param {string} username User's username.\n * @param {string} password Plain-text initial password entered by user.\n * @param {(AttributeArg[])=} userAttributes New user attributes.\n * @param {(AttributeArg[])=} validationData Application metadata.\n * @param {nodeCallback} callback Called on error or with the new user.\n * @returns {void}\n */\n signUp(username, password, userAttributes, validationData, callback) {\n const jsonReq = {\n ClientId: this.clientId,\n Username: username,\n Password: password,\n UserAttributes: userAttributes,\n ValidationData: validationData,\n };\n if (this.getUserContextData(username)) {\n jsonReq.UserContextData = this.getUserContextData(username);\n }\n this.client.request('SignUp', jsonReq, (err, data) => {\n if (err) {\n return callback(err, null);\n }\n\n const cognitoUser = {\n Username: username,\n Pool: this,\n Storage: this.storage,\n };\n\n const returnData = {\n user: new CognitoUser(cognitoUser),\n userConfirmed: data.UserConfirmed,\n userSub: data.UserSub,\n };\n\n return callback(null, returnData);\n });\n }\n\n\n /**\n * method for getting the current user of the application from the local storage\n *\n * @returns {CognitoUser} the user retrieved from storage\n */\n getCurrentUser() {\n const lastUserKey = `CognitoIdentityServiceProvider.${this.clientId}.LastAuthUser`;\n\n const lastAuthUser = this.storage.getItem(lastUserKey);\n if (lastAuthUser) {\n const cognitoUser = {\n Username: lastAuthUser,\n Pool: this,\n Storage: this.storage,\n };\n\n return new CognitoUser(cognitoUser);\n }\n\n return null;\n }\n\n /**\n * This method returns the encoded data string used for cognito advanced security feature.\n * This would be generated only when developer has included the JS used for collecting the\n * data on their client. Please refer to documentation to know more about using AdvancedSecurity\n * features\n * @param {string} username the username for the context data\n * @returns {string} the user context data\n **/\n getUserContextData(username) {\n if (typeof AmazonCognitoAdvancedSecurityData === 'undefined') {\n return undefined;\n }\n /* eslint-disable */\n const amazonCognitoAdvancedSecurityDataConst = AmazonCognitoAdvancedSecurityData;\n /* eslint-enable */\n\n if (this.advancedSecurityDataCollectionFlag) {\n const advancedSecurityData = amazonCognitoAdvancedSecurityDataConst.getData(username,\n this.userPoolId, this.clientId);\n if (advancedSecurityData) {\n const userContextData = {\n EncodedData: advancedSecurityData,\n };\n return userContextData;\n }\n }\n return {};\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CognitoUserPool.js","\nimport * as Cookies from 'js-cookie';\n\n/** @class */\nexport default class CookieStorage {\n\n /**\n * Constructs a new CookieStorage object\n * @param {object} data Creation options.\n * @param {string} data.domain Cookies domain (mandatory).\n * @param {string} data.path Cookies path (default: '/')\n * @param {integer} data.expires Cookie expiration (in days, default: 365)\n * @param {boolean} data.secure Cookie secure flag (default: true)\n */\n constructor(data) {\n this.domain = data.domain;\n if (data.path) {\n this.path = data.path;\n } else {\n this.path = '/';\n }\n if (Object.prototype.hasOwnProperty.call(data, 'expires')) {\n this.expires = data.expires;\n } else {\n this.expires = 365;\n }\n if (Object.prototype.hasOwnProperty.call(data, 'secure')) {\n this.secure = data.secure;\n } else {\n this.secure = true;\n }\n }\n\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n setItem(key, value) {\n Cookies.set(key, value, {\n path: this.path,\n expires: this.expires,\n domain: this.domain,\n secure: this.secure,\n }\n );\n return Cookies.get(key);\n }\n\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n getItem(key) {\n return Cookies.get(key);\n }\n\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n removeItem(key) {\n return Cookies.remove(key, {\n path: this.path,\n domain: this.domain,\n secure: this.secure,\n }\n );\n }\n\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n clear() {\n const cookies = Cookies.get();\n let index;\n for (index = 0; index < cookies.length; ++index) {\n Cookies.remove(cookies[index]);\n }\n return {};\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/CookieStorage.js","// class for defining the amzn user-agent\nexport default UserAgent;\n// constructor\nfunction UserAgent() {}\n// public\nUserAgent.prototype.userAgent = 'aws-amplify/0.1.x js';\n\n\n// WEBPACK FOOTER //\n// ./src/UserAgent.js","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/base64-js/index.js\n// module id = 20\n// module chunks = 0","/*\r\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\r\n * Digest Algorithm, as defined in RFC 1321.\r\n * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.\r\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\r\n * Distributed under the BSD License\r\n * See http://pajhome.org.uk/crypt/md5 for more info.\r\n */\r\n\r\nvar helpers = require('./helpers');\r\n\r\n/*\r\n * Perform a simple self-test to see if the VM is working\r\n */\r\nfunction md5_vm_test()\r\n{\r\n return hex_md5(\"abc\") == \"900150983cd24fb0d6963f7d28e17f72\";\r\n}\r\n\r\n/*\r\n * Calculate the MD5 of an array of little-endian words, and a bit length\r\n */\r\nfunction core_md5(x, len)\r\n{\r\n /* append padding */\r\n x[len >> 5] |= 0x80 << ((len) % 32);\r\n x[(((len + 64) >>> 9) << 4) + 14] = len;\r\n\r\n var a = 1732584193;\r\n var b = -271733879;\r\n var c = -1732584194;\r\n var d = 271733878;\r\n\r\n for(var i = 0; i < x.length; i += 16)\r\n {\r\n var olda = a;\r\n var oldb = b;\r\n var oldc = c;\r\n var oldd = d;\r\n\r\n a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);\r\n d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);\r\n c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);\r\n b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);\r\n a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);\r\n d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);\r\n c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);\r\n b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);\r\n a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);\r\n d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);\r\n c = md5_ff(c, d, a, b, x[i+10], 17, -42063);\r\n b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);\r\n a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);\r\n d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);\r\n c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);\r\n b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);\r\n\r\n a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);\r\n d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);\r\n c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);\r\n b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);\r\n a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);\r\n d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);\r\n c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);\r\n b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);\r\n a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);\r\n d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);\r\n c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);\r\n b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);\r\n a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);\r\n d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);\r\n c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);\r\n b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);\r\n\r\n a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);\r\n d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);\r\n c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);\r\n b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);\r\n a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);\r\n d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);\r\n c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);\r\n b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);\r\n a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);\r\n d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);\r\n c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);\r\n b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);\r\n a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);\r\n d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);\r\n c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);\r\n b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);\r\n\r\n a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);\r\n d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);\r\n c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);\r\n b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);\r\n a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);\r\n d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);\r\n c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);\r\n b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);\r\n a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);\r\n d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);\r\n c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);\r\n b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);\r\n a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);\r\n d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);\r\n c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);\r\n b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);\r\n\r\n a = safe_add(a, olda);\r\n b = safe_add(b, oldb);\r\n c = safe_add(c, oldc);\r\n d = safe_add(d, oldd);\r\n }\r\n return Array(a, b, c, d);\r\n\r\n}\r\n\r\n/*\r\n * These functions implement the four basic operations the algorithm uses.\r\n */\r\nfunction md5_cmn(q, a, b, x, s, t)\r\n{\r\n return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);\r\n}\r\nfunction md5_ff(a, b, c, d, x, s, t)\r\n{\r\n return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);\r\n}\r\nfunction md5_gg(a, b, c, d, x, s, t)\r\n{\r\n return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);\r\n}\r\nfunction md5_hh(a, b, c, d, x, s, t)\r\n{\r\n return md5_cmn(b ^ c ^ d, a, b, x, s, t);\r\n}\r\nfunction md5_ii(a, b, c, d, x, s, t)\r\n{\r\n return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);\r\n}\r\n\r\n/*\r\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\r\n * to work around bugs in some JS interpreters.\r\n */\r\nfunction safe_add(x, y)\r\n{\r\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\r\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\r\n return (msw << 16) | (lsw & 0xFFFF);\r\n}\r\n\r\n/*\r\n * Bitwise rotate a 32-bit number to the left.\r\n */\r\nfunction bit_rol(num, cnt)\r\n{\r\n return (num << cnt) | (num >>> (32 - cnt));\r\n}\r\n\r\nmodule.exports = function md5(buf) {\r\n return helpers.hash(buf, core_md5, 16);\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/md5.js\n// module id = 21\n// module chunks = 0","// Original code adapted from Robert Kieffer.\n// details at https://github.com/broofa/node-uuid\n(function() {\n var _global = this;\n\n var mathRNG, whatwgRNG;\n\n // NOTE: Math.random() does not guarantee \"cryptographic quality\"\n mathRNG = function(size) {\n var bytes = new Array(size);\n var r;\n\n for (var i = 0, r; i < size; i++) {\n if ((i & 0x03) == 0) r = Math.random() * 0x100000000;\n bytes[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return bytes;\n }\n\n if (_global.crypto && crypto.getRandomValues) {\n whatwgRNG = function(size) {\n var bytes = new Uint8Array(size);\n crypto.getRandomValues(bytes);\n return bytes;\n }\n }\n\n module.exports = whatwgRNG || mathRNG;\n\n}())\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/rng.js\n// module id = 22\n// module chunks = 0","/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar helpers = require('./helpers');\n\n/*\n * Calculate the SHA-1 of an array of big-endian words, and a bit length\n */\nfunction core_sha1(x, len)\n{\n /* append padding */\n x[len >> 5] |= 0x80 << (24 - len % 32);\n x[((len + 64 >> 9) << 4) + 15] = len;\n\n var w = Array(80);\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n var e = -1009589776;\n\n for(var i = 0; i < x.length; i += 16)\n {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n var olde = e;\n\n for(var j = 0; j < 80; j++)\n {\n if(j < 16) w[j] = x[i + j];\n else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);\n var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)),\n safe_add(safe_add(e, w[j]), sha1_kt(j)));\n e = d;\n d = c;\n c = rol(b, 30);\n b = a;\n a = t;\n }\n\n a = safe_add(a, olda);\n b = safe_add(b, oldb);\n c = safe_add(c, oldc);\n d = safe_add(d, oldd);\n e = safe_add(e, olde);\n }\n return Array(a, b, c, d, e);\n\n}\n\n/*\n * Perform the appropriate triplet combination function for the current\n * iteration\n */\nfunction sha1_ft(t, b, c, d)\n{\n if(t < 20) return (b & c) | ((~b) & d);\n if(t < 40) return b ^ c ^ d;\n if(t < 60) return (b & c) | (b & d) | (c & d);\n return b ^ c ^ d;\n}\n\n/*\n * Determine the appropriate additive constant for the current iteration\n */\nfunction sha1_kt(t)\n{\n return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :\n (t < 60) ? -1894007588 : -899497514;\n}\n\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\nfunction safe_add(x, y)\n{\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n}\n\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\nfunction rol(num, cnt)\n{\n return (num << cnt) | (num >>> (32 - cnt));\n}\n\nmodule.exports = function sha1(buf) {\n return helpers.hash(buf, core_sha1, 20, true);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/sha.js\n// module id = 23\n// module chunks = 0","\n/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar helpers = require('./helpers');\n\nvar safe_add = function(x, y) {\n var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return (msw << 16) | (lsw & 0xFFFF);\n};\n\nvar S = function(X, n) {\n return (X >>> n) | (X << (32 - n));\n};\n\nvar R = function(X, n) {\n return (X >>> n);\n};\n\nvar Ch = function(x, y, z) {\n return ((x & y) ^ ((~x) & z));\n};\n\nvar Maj = function(x, y, z) {\n return ((x & y) ^ (x & z) ^ (y & z));\n};\n\nvar Sigma0256 = function(x) {\n return (S(x, 2) ^ S(x, 13) ^ S(x, 22));\n};\n\nvar Sigma1256 = function(x) {\n return (S(x, 6) ^ S(x, 11) ^ S(x, 25));\n};\n\nvar Gamma0256 = function(x) {\n return (S(x, 7) ^ S(x, 18) ^ R(x, 3));\n};\n\nvar Gamma1256 = function(x) {\n return (S(x, 17) ^ S(x, 19) ^ R(x, 10));\n};\n\nvar core_sha256 = function(m, l) {\n var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2);\n var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19);\n var W = new Array(64);\n var a, b, c, d, e, f, g, h, i, j;\n var T1, T2;\n /* append padding */\n m[l >> 5] |= 0x80 << (24 - l % 32);\n m[((l + 64 >> 9) << 4) + 15] = l;\n for (var i = 0; i < m.length; i += 16) {\n a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7];\n for (var j = 0; j < 64; j++) {\n if (j < 16) {\n W[j] = m[j + i];\n } else {\n W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]);\n }\n T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]);\n T2 = safe_add(Sigma0256(a), Maj(a, b, c));\n h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2);\n }\n HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]);\n HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]);\n }\n return HASH;\n};\n\nmodule.exports = function sha256(buf) {\n return helpers.hash(buf, core_sha256, 32, true);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/crypto-browserify/sha256.js\n// module id = 24\n// module chunks = 0","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ieee754/index.js\n// module id = 25\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/isarray/index.js\n// module id = 26\n// module chunks = 0","/*!\n * JavaScript Cookie v2.2.0\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader = false;\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api (key, value, attributes) {\n\t\t\tvar result;\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Write\n\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tattributes = extend({\n\t\t\t\t\tpath: '/'\n\t\t\t\t}, api.defaults, attributes);\n\n\t\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\t\tvar expires = new Date();\n\t\t\t\t\texpires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n\t\t\t\t\tattributes.expires = expires;\n\t\t\t\t}\n\n\t\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\t\ttry {\n\t\t\t\t\tresult = JSON.stringify(value);\n\t\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\t\tvalue = result;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\n\t\t\t\tif (!converter.write) {\n\t\t\t\t\tvalue = encodeURIComponent(String(value))\n\t\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\t\t\t\t} else {\n\t\t\t\t\tvalue = converter.write(value, key);\n\t\t\t\t}\n\n\t\t\t\tkey = encodeURIComponent(String(key));\n\t\t\t\tkey = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);\n\t\t\t\tkey = key.replace(/[\\(\\)]/g, escape);\n\n\t\t\t\tvar stringifiedAttributes = '';\n\n\t\t\t\tfor (var attributeName in attributes) {\n\t\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName];\n\t\t\t\t}\n\t\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t\t}\n\n\t\t\t// Read\n\n\t\t\tif (!key) {\n\t\t\t\tresult = {};\n\t\t\t}\n\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all. Also prevents odd result when\n\t\t\t// calling \"get()\"\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar rdecode = /(%[0-9A-Z]{2})+/g;\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!this.json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = parts[0].replace(rdecode, decodeURIComponent);\n\t\t\t\t\tcookie = converter.read ?\n\t\t\t\t\t\tconverter.read(cookie, name) : converter(cookie, name) ||\n\t\t\t\t\t\tcookie.replace(rdecode, decodeURIComponent);\n\n\t\t\t\t\tif (this.json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tresult = cookie;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!key) {\n\t\t\t\t\t\tresult[name] = cookie;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tapi.set = api;\n\t\tapi.get = function (key) {\n\t\t\treturn api.call(api, key);\n\t\t};\n\t\tapi.getJSON = function () {\n\t\t\treturn api.apply({\n\t\t\t\tjson: true\n\t\t\t}, [].slice.call(arguments));\n\t\t};\n\t\tapi.defaults = {};\n\n\t\tapi.remove = function (key, attributes) {\n\t\t\tapi(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/js-cookie/src/js.cookie.js\n// module id = 27\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/packages/amazon-cognito-identity-js/es/Client.js b/packages/amazon-cognito-identity-js/es/Client.js index 312bf885f73..4d001a3d552 100644 --- a/packages/amazon-cognito-identity-js/es/Client.js +++ b/packages/amazon-cognito-identity-js/es/Client.js @@ -9,11 +9,12 @@ var Client = function () { * @param {string} region AWS region * @param {string} endpoint endpoint */ - function Client(region, endpoint) { + function Client(region, endpoint, options) { _classCallCheck(this, Client); this.endpoint = endpoint || 'https://cognito-idp.' + region + '.amazonaws.com/'; this.userAgent = UserAgent.prototype.userAgent || 'aws-amplify/0.1.x js'; + this.options = options || {}; } /** @@ -33,13 +34,13 @@ var Client = function () { 'X-Amz-User-Agent': this.userAgent }; - var options = { + var options = Object.assign(this.options, { headers: headers, method: 'POST', mode: 'cors', cache: 'no-cache', body: JSON.stringify(params) - }; + }); var response = void 0; diff --git a/packages/amazon-cognito-identity-js/es/CognitoUserPool.js b/packages/amazon-cognito-identity-js/es/CognitoUserPool.js index 98e49a1dfb7..19b5d96dabe 100644 --- a/packages/amazon-cognito-identity-js/es/CognitoUserPool.js +++ b/packages/amazon-cognito-identity-js/es/CognitoUserPool.js @@ -41,6 +41,7 @@ var CognitoUserPool = function () { var _ref = data || {}, UserPoolId = _ref.UserPoolId, ClientId = _ref.ClientId, + ProxyAgent = _ref.ProxyAgent, endpoint = _ref.endpoint, AdvancedSecurityDataCollectionFlag = _ref.AdvancedSecurityDataCollectionFlag; @@ -55,7 +56,7 @@ var CognitoUserPool = function () { this.userPoolId = UserPoolId; this.clientId = ClientId; - this.client = new Client(region, endpoint); + this.client = new Client(region, endpoint, { agent: ProxyAgent || null }); /** * By default, AdvancedSecurityDataCollectionFlag is set to true, diff --git a/packages/amazon-cognito-identity-js/lib/Client.js b/packages/amazon-cognito-identity-js/lib/Client.js index 184fd4d7ba4..190ed5a6170 100644 --- a/packages/amazon-cognito-identity-js/lib/Client.js +++ b/packages/amazon-cognito-identity-js/lib/Client.js @@ -17,11 +17,12 @@ var Client = function () { * @param {string} region AWS region * @param {string} endpoint endpoint */ - function Client(region, endpoint) { + function Client(region, endpoint, options) { _classCallCheck(this, Client); this.endpoint = endpoint || 'https://cognito-idp.' + region + '.amazonaws.com/'; this.userAgent = _UserAgent2.default.prototype.userAgent || 'aws-amplify/0.1.x js'; + this.options = options || {}; } /** @@ -41,13 +42,13 @@ var Client = function () { 'X-Amz-User-Agent': this.userAgent }; - var options = { + var options = Object.assign(this.options, { headers: headers, method: 'POST', mode: 'cors', cache: 'no-cache', body: JSON.stringify(params) - }; + }); var response = void 0; diff --git a/packages/amazon-cognito-identity-js/lib/CognitoUserPool.js b/packages/amazon-cognito-identity-js/lib/CognitoUserPool.js index ceab62673f3..f309afa936a 100644 --- a/packages/amazon-cognito-identity-js/lib/CognitoUserPool.js +++ b/packages/amazon-cognito-identity-js/lib/CognitoUserPool.js @@ -52,6 +52,7 @@ var CognitoUserPool = function () { var _ref = data || {}, UserPoolId = _ref.UserPoolId, ClientId = _ref.ClientId, + ProxyAgent = _ref.ProxyAgent, endpoint = _ref.endpoint, AdvancedSecurityDataCollectionFlag = _ref.AdvancedSecurityDataCollectionFlag; @@ -66,7 +67,7 @@ var CognitoUserPool = function () { this.userPoolId = UserPoolId; this.clientId = ClientId; - this.client = new _Client2.default(region, endpoint); + this.client = new _Client2.default(region, endpoint, { agent: ProxyAgent || null }); /** * By default, AdvancedSecurityDataCollectionFlag is set to true, diff --git a/packages/amazon-cognito-identity-js/package-lock.json b/packages/amazon-cognito-identity-js/package-lock.json index d1b15342a76..65530bb2c85 100644 --- a/packages/amazon-cognito-identity-js/package-lock.json +++ b/packages/amazon-cognito-identity-js/package-lock.json @@ -1,13 +1,7902 @@ { "name": "amazon-cognito-identity-js", - "version": "1.29.0", + "version": "2.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { - "crypto-js": { - "version": "3.1.9-1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", - "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" + "absolute-path": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/absolute-path/-/absolute-path-0.0.0.tgz", + "integrity": "sha1-p4di+9rftSl76ZsV01p4Wy8JW/c=", + "dev": true + }, + "accepts": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz", + "integrity": "sha1-5fHzkoxtlf2WVYw27D2dDeSm7Oo=", + "dev": true, + "requires": { + "mime-types": "2.1.11", + "negotiator": "0.5.3" + } + }, + "acorn": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", + "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", + "dev": true + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "requires": { + "acorn": "3.3.0" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "dev": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ajv-keywords": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", + "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz", + "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE=", + "dev": true + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, + "are-we-there-yet": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", + "dev": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "1.0.3" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-filter": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", + "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=", + "dev": true + }, + "array-find": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz", + "integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=", + "dev": true + }, + "array-map": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz", + "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=", + "dev": true + }, + "array-reduce": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", + "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "1.0.3" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "art": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/art/-/art-0.10.2.tgz", + "integrity": "sha512-0F3cb+pWScVwrbAi3b/GINGTZ4DKMcaKqzBIt57whlpkgCiJXA0vXR9fdlcvCnA/UzWJYSAFEslRXZQDypiW6A==", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "dev": true, + "requires": { + "lodash": "4.17.9" + } + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", + "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "dev": true + }, + "babel-cli": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", + "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-polyfill": "6.26.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "chokidar": "1.7.0", + "commander": "2.15.1", + "convert-source-map": "1.5.1", + "fs-readdir-recursive": "1.1.0", + "glob": "7.1.2", + "lodash": "4.17.9", + "output-file-sync": "1.1.2", + "path-is-absolute": "1.0.1", + "slash": "1.0.0", + "source-map": "0.5.7", + "v8flags": "2.1.1" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-core": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.1", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.1", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.9", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.9", + "source-map": "0.5.7", + "trim-right": "1.0.1" + } + }, + "babel-helper-bindify-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", + "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "dev": true, + "requires": { + "babel-helper-explode-assignable-expression": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-builder-react-jsx": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz", + "integrity": "sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "esutils": "2.0.2" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true, + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.9" + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-explode-class": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", + "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", + "dev": true, + "requires": { + "babel-helper-bindify-decorators": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true, + "requires": { + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.9" + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "dev": true, + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true, + "requires": { + "babel-helper-optimise-call-expression": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-loader": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-6.4.1.tgz", + "integrity": "sha1-CzQRLVsHSKjc2/Uaz2+b1C1QuMo=", + "dev": true, + "requires": { + "find-cache-dir": "0.1.1", + "loader-utils": "0.2.17", + "mkdirp": "0.5.1", + "object-assign": "4.1.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-external-helpers": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz", + "integrity": "sha1-IoX0iwK9Xe3oUXXK+MYuhq3M76E=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-react-transform": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/babel-plugin-react-transform/-/babel-plugin-react-transform-2.0.2.tgz", + "integrity": "sha1-UVu/qZaJOYEULZCx+bFjXeKZUQk=", + "dev": true, + "requires": { + "lodash": "4.17.9" + } + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", + "dev": true + }, + "babel-plugin-syntax-async-generators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", + "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=", + "dev": true + }, + "babel-plugin-syntax-class-properties": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", + "dev": true + }, + "babel-plugin-syntax-decorators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", + "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=", + "dev": true + }, + "babel-plugin-syntax-dynamic-import": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", + "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", + "dev": true + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", + "dev": true + }, + "babel-plugin-syntax-flow": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", + "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=", + "dev": true + }, + "babel-plugin-syntax-jsx": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", + "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=", + "dev": true + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", + "dev": true + }, + "babel-plugin-transform-async-generator-functions": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", + "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-generators": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-class-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", + "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", + "dev": true, + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-plugin-syntax-class-properties": "6.13.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-plugin-transform-decorators": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", + "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", + "dev": true, + "requires": { + "babel-helper-explode-class": "6.24.1", + "babel-plugin-syntax-decorators": "6.13.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.9" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true, + "requires": { + "babel-helper-define-map": "6.26.0", + "babel-helper-function-name": "6.24.1", + "babel-helper-optimise-call-expression": "6.24.1", + "babel-helper-replace-supers": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true, + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", + "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", + "dev": true, + "requires": { + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true, + "requires": { + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true, + "requires": { + "babel-helper-replace-supers": "6.24.1", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true, + "requires": { + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true, + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true, + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "regexpu-core": "2.0.0" + } + }, + "babel-plugin-transform-es3-member-expression-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es3-member-expression-literals/-/babel-plugin-transform-es3-member-expression-literals-6.22.0.tgz", + "integrity": "sha1-cz00RPPsxBvvjtGmpOCWV7iWnrs=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es3-property-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es3-property-literals/-/babel-plugin-transform-es3-property-literals-6.22.0.tgz", + "integrity": "sha1-sgeNWELiKr9A9z6M3pzTcRq9V1g=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "dev": true, + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", + "babel-plugin-syntax-exponentiation-operator": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-flow-strip-types": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", + "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", + "dev": true, + "requires": { + "babel-plugin-syntax-flow": "6.18.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-object-assign": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-assign/-/babel-plugin-transform-object-assign-6.22.0.tgz", + "integrity": "sha1-+Z0vZvGgsNSY40bFNZaEdAyqILo=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-object-rest-spread": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", + "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-react-display-name": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz", + "integrity": "sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-react-jsx": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz", + "integrity": "sha1-hAoCjn30YN/DotKfDA2R9jduZqM=", + "dev": true, + "requires": { + "babel-helper-builder-react-jsx": "6.26.0", + "babel-plugin-syntax-jsx": "6.18.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-react-jsx-self": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz", + "integrity": "sha1-322AqdomEqEh5t3XVYvL7PBuY24=", + "dev": true, + "requires": { + "babel-plugin-syntax-jsx": "6.18.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-react-jsx-source": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz", + "integrity": "sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY=", + "dev": true, + "requires": { + "babel-plugin-syntax-jsx": "6.18.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true, + "requires": { + "regenerator-transform": "0.10.1" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "core-js": "2.5.5", + "regenerator-runtime": "0.10.5" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + } + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", + "babel-plugin-transform-es2015-modules-umd": "6.24.1", + "babel-plugin-transform-es2015-object-super": "6.24.1", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-regenerator": "6.26.0" + } + }, + "babel-preset-es2015-node": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-preset-es2015-node/-/babel-preset-es2015-node-6.1.1.tgz", + "integrity": "sha1-YLIxVwJLDP6/OmNVTLBe4DW05V8=", + "dev": true, + "requires": { + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "semver": "5.5.0" + } + }, + "babel-preset-fbjs": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/babel-preset-fbjs/-/babel-preset-fbjs-2.1.4.tgz", + "integrity": "sha512-6XVQwlO26V5/0P9s2Eje8Epqkv/ihaMJ798+W98ktOA8fCn2IFM6wEi7CDW3fTbKFZ/8fDGvGZH01B6GSuNiWA==", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-syntax-class-properties": "6.13.0", + "babel-plugin-syntax-flow": "6.18.0", + "babel-plugin-syntax-jsx": "6.18.0", + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-class-properties": "6.24.1", + "babel-plugin-transform-es2015-arrow-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-object-super": "6.24.1", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-es3-member-expression-literals": "6.22.0", + "babel-plugin-transform-es3-property-literals": "6.22.0", + "babel-plugin-transform-flow-strip-types": "6.22.0", + "babel-plugin-transform-object-rest-spread": "6.26.0", + "babel-plugin-transform-react-display-name": "6.25.0", + "babel-plugin-transform-react-jsx": "6.24.1" + } + }, + "babel-preset-flow": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz", + "integrity": "sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0=", + "dev": true, + "requires": { + "babel-plugin-transform-flow-strip-types": "6.22.0" + } + }, + "babel-preset-react": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz", + "integrity": "sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A=", + "dev": true, + "requires": { + "babel-plugin-syntax-jsx": "6.18.0", + "babel-plugin-transform-react-display-name": "6.25.0", + "babel-plugin-transform-react-jsx": "6.24.1", + "babel-plugin-transform-react-jsx-self": "6.22.0", + "babel-plugin-transform-react-jsx-source": "6.22.0", + "babel-preset-flow": "6.23.0" + } + }, + "babel-preset-react-native": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/babel-preset-react-native/-/babel-preset-react-native-1.9.2.tgz", + "integrity": "sha1-sird0uNV/zs5Zxt5voB+Ut+hRfI=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-react-transform": "2.0.2", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-plugin-syntax-class-properties": "6.13.0", + "babel-plugin-syntax-flow": "6.18.0", + "babel-plugin-syntax-jsx": "6.18.0", + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-class-properties": "6.24.1", + "babel-plugin-transform-es2015-arrow-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-flow-strip-types": "6.22.0", + "babel-plugin-transform-object-assign": "6.22.0", + "babel-plugin-transform-object-rest-spread": "6.26.0", + "babel-plugin-transform-react-display-name": "6.25.0", + "babel-plugin-transform-react-jsx": "6.24.1", + "babel-plugin-transform-react-jsx-source": "6.22.0", + "babel-plugin-transform-regenerator": "6.26.0", + "react-transform-hmr": "1.0.4" + } + }, + "babel-preset-stage-2": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", + "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", + "dev": true, + "requires": { + "babel-plugin-syntax-dynamic-import": "6.18.0", + "babel-plugin-transform-class-properties": "6.24.1", + "babel-plugin-transform-decorators": "6.24.1", + "babel-preset-stage-3": "6.24.1" + } + }, + "babel-preset-stage-3": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", + "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", + "dev": true, + "requires": { + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-generator-functions": "6.24.1", + "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-exponentiation-operator": "6.24.1", + "babel-plugin-transform-object-rest-spread": "6.26.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-runtime": "6.26.0", + "core-js": "2.5.5", + "home-or-tmp": "2.0.0", + "lodash": "4.17.9", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "2.5.5", + "regenerator-runtime": "0.11.1" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.9" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.9" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.9", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" + }, + "base64-url": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/base64-url/-/base64-url-1.2.1.tgz", + "integrity": "sha1-GZ/WYXAqDnt9yubgaYuwicUvbXg=", + "dev": true + }, + "basic-auth": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.0.4.tgz", + "integrity": "sha1-Awk1sB3nyblKgksp8/zLdQ06UpA=", + "dev": true + }, + "basic-auth-connect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz", + "integrity": "sha1-/bC0OWLKe0BFanwrtI/hc9otISI=", + "dev": true + }, + "batch": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.5.3.tgz", + "integrity": "sha1-PzQU84AyF0O/wQQvmoP/HVgk1GQ=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, + "big-integer": { + "version": "1.6.28", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.28.tgz", + "integrity": "sha512-OJT3rzgtsYca/5WmmEuFJDPMwROVh5SSjoEX9wIrpfbbWJ4KqRzShs8Cj6jWHaatBYAeWngBA+kmmrcHSklT1g==", + "dev": true + }, + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "body-parser": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.13.3.tgz", + "integrity": "sha1-wIzzMMM1jhUQFqBXRvE/ApyX+pc=", + "dev": true, + "requires": { + "bytes": "2.1.0", + "content-type": "1.0.4", + "debug": "2.2.0", + "depd": "1.0.1", + "http-errors": "1.3.1", + "iconv-lite": "0.4.11", + "on-finished": "2.3.0", + "qs": "4.0.0", + "raw-body": "2.1.7", + "type-is": "1.6.16" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "iconv-lite": { + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.11.tgz", + "integrity": "sha1-LstC/SlHRJIiCaLnxATayHk9it4=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "dev": true, + "requires": { + "hoek": "4.2.1" + }, + "dependencies": { + "hoek": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", + "dev": true + } + } + }, + "bplist-creator": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.7.tgz", + "integrity": "sha1-N98VNgkoJLh8QvlXsBNEEXNyrkU=", + "dev": true, + "requires": { + "stream-buffers": "2.2.0" + } + }, + "bplist-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", + "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", + "dev": true, + "requires": { + "big-integer": "1.6.28" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "1.2.0", + "browserify-des": "1.0.1", + "evp_bytestokey": "1.0.3" + } + }, + "browserify-des": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", + "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "des.js": "1.0.0", + "inherits": "2.0.3" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "randombytes": "2.0.6" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "elliptic": "6.4.0", + "inherits": "2.0.3", + "parse-asn1": "5.1.1" + } + }, + "browserify-zlib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", + "dev": true, + "requires": { + "pako": "0.2.9" + } + }, + "bser": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bser/-/bser-1.0.3.tgz", + "integrity": "sha1-1j2hnuFzMKDiYNKjRCKyGolSAxc=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "requires": { + "base64-js": "1.3.0", + "ieee754": "1.1.11", + "isarray": "1.0.0" + } + }, + "buffer-from": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "bytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.1.0.tgz", + "integrity": "sha1-rJPEEOL/ycx89LRks4KJBn9eR7Q=", + "dev": true + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true, + "requires": { + "callsites": "0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "catharsis": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz", + "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", + "dev": true, + "requires": { + "underscore-contrib": "0.3.0" + } + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.2.2", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "dev": true, + "requires": { + "restore-cursor": "1.0.1" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "dev": true + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "compressible": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz", + "integrity": "sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k=", + "dev": true, + "requires": { + "mime-db": "1.33.0" + } + }, + "compression": { + "version": "1.5.2", + "resolved": "http://registry.npmjs.org/compression/-/compression-1.5.2.tgz", + "integrity": "sha1-sDuNhub4rSloPLqN+R3cb/x3s5U=", + "dev": true, + "requires": { + "accepts": "1.2.13", + "bytes": "2.1.0", + "compressible": "2.0.13", + "debug": "2.2.0", + "on-headers": "1.0.1", + "vary": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "1.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "typedarray": "0.0.6" + } + }, + "connect": { + "version": "2.30.2", + "resolved": "https://registry.npmjs.org/connect/-/connect-2.30.2.tgz", + "integrity": "sha1-jam8vooFTT0xjXTf7JA7XDmhtgk=", + "dev": true, + "requires": { + "basic-auth-connect": "1.0.0", + "body-parser": "1.13.3", + "bytes": "2.1.0", + "compression": "1.5.2", + "connect-timeout": "1.6.2", + "content-type": "1.0.4", + "cookie": "0.1.3", + "cookie-parser": "1.3.5", + "cookie-signature": "1.0.6", + "csurf": "1.8.3", + "debug": "2.2.0", + "depd": "1.0.1", + "errorhandler": "1.4.3", + "express-session": "1.11.3", + "finalhandler": "0.4.0", + "fresh": "0.3.0", + "http-errors": "1.3.1", + "method-override": "2.3.10", + "morgan": "1.6.1", + "multiparty": "3.3.2", + "on-headers": "1.0.1", + "parseurl": "1.3.2", + "pause": "0.1.0", + "qs": "4.0.0", + "response-time": "2.3.2", + "serve-favicon": "2.3.2", + "serve-index": "1.7.3", + "serve-static": "1.10.3", + "type-is": "1.6.16", + "utils-merge": "1.0.0", + "vhost": "3.0.2" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "connect-timeout": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/connect-timeout/-/connect-timeout-1.6.2.tgz", + "integrity": "sha1-3ppexh4zoStu2qt7XwYumMWZuI4=", + "dev": true, + "requires": { + "debug": "2.2.0", + "http-errors": "1.3.1", + "ms": "0.7.1", + "on-headers": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "cookie": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.3.tgz", + "integrity": "sha1-5zSlwUF/zkctWu+Cw4HKu2TRpDU=", + "dev": true + }, + "cookie-parser": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.5.tgz", + "integrity": "sha1-nXVVcPtdF4kHcSJ6AjFNm+fPg1Y=", + "dev": true, + "requires": { + "cookie": "0.1.3", + "cookie-signature": "1.0.6" + } + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "core-js": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", + "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "crc": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.3.0.tgz", + "integrity": "sha1-+mIuG8OIvyVzCQgta2UgDOZwkLo=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.1.tgz", + "integrity": "sha512-iZvCCg8XqHQZ1ioNBTzXS/cQSkqkqcPs8xSX4upNB+DAk9Ht3uzQf2J32uAHNCne8LDmKr29AgZrEs4oIrwLuQ==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "elliptic": "6.4.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "md5.js": "1.3.4", + "ripemd160": "2.0.2", + "sha.js": "2.4.11" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "1.0.4", + "create-hash": "1.2.0", + "inherits": "2.0.3", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.1", + "sha.js": "2.4.11" + } + }, + "cross-env": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-3.2.4.tgz", + "integrity": "sha1-ngWF8neGTtQhznVvgamA/w1piro=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "is-windows": "1.0.2" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "dev": true, + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "dev": true, + "requires": { + "hoek": "4.2.1" + } + }, + "hoek": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", + "dev": true + } + } + }, + "crypto-browserify": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz", + "integrity": "sha1-zFRJaF37hesRyYKKzHy4erW7/MA=" + }, + "csrf": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/csrf/-/csrf-3.0.6.tgz", + "integrity": "sha1-thEg3c7q/JHnbtUxO7XAsmZ7cQo=", + "dev": true, + "requires": { + "rndm": "1.2.0", + "tsscmp": "1.0.5", + "uid-safe": "2.1.4" + } + }, + "csurf": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/csurf/-/csurf-1.8.3.tgz", + "integrity": "sha1-I/KhO/HY/OHQyZZYg5RELLqGpWo=", + "dev": true, + "requires": { + "cookie": "0.1.3", + "cookie-signature": "1.0.6", + "csrf": "3.0.6", + "http-errors": "1.3.1" + } + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "0.10.42" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "dateformat": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", + "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true, + "requires": { + "globby": "5.0.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.1", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.2" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "denodeify": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", + "integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=", + "dev": true + }, + "depd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.0.1.tgz", + "integrity": "sha1-gK7GTJ1tl+ZcwqnKqTwKpqv3Oqo=", + "dev": true + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "miller-rabin": "4.0.1", + "randombytes": "2.0.6" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "2.0.2" + } + }, + "dom-walk": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", + "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=", + "dev": true + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "dev": true, + "requires": { + "readable-stream": "1.1.14" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "dev": true, + "requires": { + "iconv-lite": "0.4.21" + } + }, + "enhanced-resolve": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", + "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "memory-fs": "0.2.0", + "tapable": "0.1.10" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "1.0.1" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "errorhandler": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.4.3.tgz", + "integrity": "sha1-t7cO2PNZ6duICS8tIMD4MUIK2D8=", + "dev": true, + "requires": { + "accepts": "1.3.5", + "escape-html": "1.0.3" + }, + "dependencies": { + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "dev": true, + "requires": { + "mime-types": "2.1.18", + "negotiator": "0.6.1" + } + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "requires": { + "mime-db": "1.33.0" + } + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", + "dev": true + } + } + }, + "es5-ext": { + "version": "0.10.42", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz", + "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==", + "dev": true, + "requires": { + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "next-tick": "1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-symbol": "3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", + "es6-set": "0.1.5", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42", + "es6-iterator": "2.0.3", + "es6-symbol": "3.1.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "dev": true, + "requires": { + "es6-map": "0.1.5", + "es6-weak-map": "2.0.2", + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "eslint": { + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", + "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "chalk": "1.1.3", + "concat-stream": "1.6.2", + "debug": "2.6.9", + "doctrine": "2.1.0", + "escope": "3.6.0", + "espree": "3.5.4", + "esquery": "1.0.1", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "glob": "7.1.2", + "globals": "9.18.0", + "ignore": "3.3.7", + "imurmurhash": "0.1.4", + "inquirer": "0.12.0", + "is-my-json-valid": "2.17.2", + "is-resolvable": "1.1.0", + "js-yaml": "3.11.0", + "json-stable-stringify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.9", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "1.2.1", + "progress": "1.1.8", + "require-uncached": "1.0.3", + "shelljs": "0.7.8", + "strip-bom": "3.0.0", + "strip-json-comments": "2.0.1", + "table": "3.8.3", + "text-table": "0.2.0", + "user-home": "2.0.0" + }, + "dependencies": { + "user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "dev": true, + "requires": { + "os-homedir": "1.0.2" + } + } + } + }, + "eslint-config-airbnb-base": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-5.0.3.tgz", + "integrity": "sha1-lxSsNews1/qw1E0Uip+R2ylEB00=", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "dev": true, + "requires": { + "debug": "2.6.9", + "resolve": "1.7.1" + } + }, + "eslint-import-resolver-webpack": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.5.1.tgz", + "integrity": "sha1-wYbXtC+qnTNSRV6EGldI8ZCQldA=", + "dev": true, + "requires": { + "array-find": "1.0.0", + "debug": "2.6.9", + "enhanced-resolve": "0.9.1", + "find-root": "0.1.2", + "interpret": "1.1.0", + "is-absolute": "0.2.6", + "lodash.get": "3.7.0", + "node-libs-browser": "1.1.1", + "object-assign": "4.1.1", + "resolve": "1.7.1", + "semver": "5.5.0" + } + }, + "eslint-module-utils": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", + "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", + "dev": true, + "requires": { + "debug": "2.6.9", + "pkg-dir": "1.0.0" + } + }, + "eslint-plugin-import": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.11.0.tgz", + "integrity": "sha1-Fa7qN6Z0mdhI6OmBgG1GJ7VQOBY=", + "dev": true, + "requires": { + "contains-path": "0.1.0", + "debug": "2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "0.3.2", + "eslint-module-utils": "2.2.0", + "has": "1.0.1", + "lodash": "4.17.9", + "minimatch": "3.0.4", + "read-pkg-up": "2.0.0", + "resolve": "1.7.1" + }, + "dependencies": { + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "2.0.2", + "isarray": "1.0.0" + } + } + } + }, + "eslint-plugin-node": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-5.2.1.tgz", + "integrity": "sha512-xhPXrh0Vl/b7870uEbaumb2Q+LxaEcOQ3kS1jtIXanBAwpMre1l5q/l2l/hESYJGEFKuI78bp6Uw50hlpr7B+g==", + "dev": true, + "requires": { + "ignore": "3.3.7", + "minimatch": "3.0.4", + "resolve": "1.7.1", + "semver": "5.3.0" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + } + } + }, + "eslint-plugin-promise": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.7.0.tgz", + "integrity": "sha512-2WO+ZFh7vxUKRfR0cOIMrWgYKdR6S1AlOezw6pC52B6oYpd5WFghN+QHxvrRdZMtbo8h3dfUZ2o1rWb0UPbKtg==", + "dev": true + }, + "eslint-plugin-standard": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz", + "integrity": "sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI=", + "dev": true + }, + "espree": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "dev": true, + "requires": { + "acorn": "5.5.3", + "acorn-jsx": "3.0.1" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "4.2.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "etag": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.7.0.tgz", + "integrity": "sha1-A9MLX2fdbmMtKUXTDWZScxo01dg=", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.42" + } + }, + "event-target-shim": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-1.1.1.tgz", + "integrity": "sha1-qG5e5r2qFgVEddp5fM3fDFVphJE=", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "1.3.4", + "safe-buffer": "5.1.1" + } + }, + "exec-sh": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.1.tgz", + "integrity": "sha512-aLt95pexaugVtQerpmE51+4QfWrNc304uez7jvj6fWnN8GeEHpttB8F36n8N7uVhUMbH/1enbxQ9HImZ4w/9qg==", + "dev": true, + "requires": { + "merge": "1.2.0" + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "express-session": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.11.3.tgz", + "integrity": "sha1-XMmPP1/4Ttg1+Ry/CqvQxxB0AK8=", + "dev": true, + "requires": { + "cookie": "0.1.3", + "cookie-signature": "1.0.6", + "crc": "3.3.0", + "debug": "2.2.0", + "depd": "1.0.1", + "on-headers": "1.0.1", + "parseurl": "1.3.2", + "uid-safe": "2.0.0", + "utils-merge": "1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "uid-safe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.0.0.tgz", + "integrity": "sha1-p/PGymSh9qXQTsDvPkw9U2cxcTc=", + "dev": true, + "requires": { + "base64-url": "1.2.1" + } + } + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fancy-log": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz", + "integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=", + "dev": true, + "requires": { + "ansi-gray": "0.1.1", + "color-support": "1.1.3", + "time-stamp": "1.1.0" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fb-watchman": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", + "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", + "dev": true, + "requires": { + "bser": "2.0.0" + }, + "dependencies": { + "bser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", + "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + } + } + }, + "fbjs": { + "version": "0.8.16", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz", + "integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=", + "dev": true, + "requires": { + "core-js": "1.2.7", + "isomorphic-fetch": "2.2.1", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "promise": "7.3.1", + "setimmediate": "1.0.5", + "ua-parser-js": "0.7.17" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", + "dev": true + } + } + }, + "fbjs-scripts": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/fbjs-scripts/-/fbjs-scripts-0.7.1.tgz", + "integrity": "sha1-TxFeIY4kPjrdvw7dqsHjxi9wP6w=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-preset-fbjs": "1.0.0", + "core-js": "1.2.7", + "cross-spawn": "3.0.1", + "gulp-util": "3.0.8", + "object-assign": "4.1.1", + "semver": "5.5.0", + "through2": "2.0.3" + }, + "dependencies": { + "babel-preset-fbjs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-fbjs/-/babel-preset-fbjs-1.0.0.tgz", + "integrity": "sha1-yXLlybMB1OyeeXH0rsPhSsAXqLA=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-syntax-flow": "6.18.0", + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-class-properties": "6.24.1", + "babel-plugin-transform-es2015-arrow-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-object-super": "6.24.1", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-es3-member-expression-literals": "6.22.0", + "babel-plugin-transform-es3-property-literals": "6.22.0", + "babel-plugin-transform-flow-strip-types": "6.22.0", + "babel-plugin-transform-object-rest-spread": "6.26.0", + "object-assign": "4.1.1" + } + }, + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", + "dev": true + }, + "cross-spawn": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", + "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", + "dev": true, + "requires": { + "lru-cache": "4.1.2", + "which": "1.3.0" + } + } + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true, + "requires": { + "flat-cache": "1.3.0", + "object-assign": "4.1.1" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "finalhandler": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.4.0.tgz", + "integrity": "sha1-llpS2ejQXSuFdUhUH7ibU6JJfZs=", + "dev": true, + "requires": { + "debug": "2.2.0", + "escape-html": "1.0.2", + "on-finished": "2.3.0", + "unpipe": "1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "escape-html": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.2.tgz", + "integrity": "sha1-130y+pjjjC9BroXpJ44ODmuhAiw=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "find-cache-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz", + "integrity": "sha1-yN765XyKUqinhPnjHFfHQumToLk=", + "dev": true, + "requires": { + "commondir": "1.0.1", + "mkdirp": "0.5.1", + "pkg-dir": "1.0.0" + } + }, + "find-root": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-0.1.2.tgz", + "integrity": "sha1-mNImfP8ZFsyvJ0OzoO6oHXnX3NE=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.6", + "mime-types": "2.1.18" + }, + "dependencies": { + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "requires": { + "mime-db": "1.33.0" + } + } + } + }, + "fresh": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.3.0.tgz", + "integrity": "sha1-ZR+DjiJCTnVm3hYdg1jKoZn4PU8=", + "dev": true + }, + "fs-extra": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz", + "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "2.4.0", + "klaw": "1.3.1" + }, + "dependencies": { + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + } + } + }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.2.tgz", + "integrity": "sha512-iownA+hC4uHFp+7gwP/y5SzaiUo7m2vpa0dhpzw8YuKtiZsz7cIXsFbXpLEeBM6WuCQyw1MH4RRe6XI8GFUctQ==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.10.0", + "node-pre-gyp": "0.9.1" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.9.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.0", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.6", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.5" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true, + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true, + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gauge": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-1.2.7.tgz", + "integrity": "sha1-6c7FSD09TuDvRLYKfZnkk14TbZM=", + "dev": true, + "requires": { + "ansi": "0.3.1", + "has-unicode": "2.0.1", + "lodash.pad": "4.5.1", + "lodash.padend": "4.6.1", + "lodash.padstart": "4.6.1" + } + }, + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", + "dev": true + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "dev": true, + "requires": { + "is-property": "1.0.2" + } + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "global": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "dev": true, + "requires": { + "min-document": "2.19.0", + "process": "0.5.2" + }, + "dependencies": { + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=", + "dev": true + } + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "glogg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.1.tgz", + "integrity": "sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw==", + "dev": true, + "requires": { + "sparkles": "1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "dev": true, + "requires": { + "array-differ": "1.0.0", + "array-uniq": "1.0.3", + "beeper": "1.1.1", + "chalk": "1.1.3", + "dateformat": "2.2.0", + "fancy-log": "1.3.2", + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash._reescape": "3.0.0", + "lodash._reevaluate": "3.0.0", + "lodash._reinterpolate": "3.0.0", + "lodash.template": "3.6.2", + "minimist": "1.2.0", + "multipipe": "0.1.2", + "object-assign": "3.0.0", + "replace-ext": "0.0.1", + "through2": "2.0.3", + "vinyl": "0.5.3" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", + "dev": true + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "1.0.1" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "dev": true, + "requires": { + "ajv": "5.5.2", + "har-schema": "2.0.0" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + } + } + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "dev": true, + "requires": { + "function-bind": "1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "dev": true, + "requires": { + "sparkles": "1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.1" + } + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "dev": true, + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.1", + "sntp": "2.1.0" + }, + "dependencies": { + "hoek": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", + "dev": true + } + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.1", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", + "dev": true + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "hosted-git-info": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", + "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", + "dev": true + }, + "http-errors": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz", + "integrity": "sha1-GX4izevUGYWF6GlO9nhhl7ke2UI=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "statuses": "1.5.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.14.1" + } + }, + "https-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", + "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", + "dev": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ieee754": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.11.tgz", + "integrity": "sha512-VhDzCKN7K8ufStx/CLj5/PDTMgph+qwN5Pkd5i0sGnVwk56zJ0lkT8Qzi1xqWLS0Wp29DgDtNeS7v8/wMoZeHg==" + }, + "ignore": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", + "dev": true + }, + "image-size": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.3.5.tgz", + "integrity": "sha1-gyQOqy+1sAsEqrjHSwRx6cunrYw=", + "dev": true + }, + "immutable": { + "version": "3.7.6", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz", + "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "inquirer": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", + "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", + "dev": true, + "requires": { + "ansi-escapes": "1.4.0", + "ansi-regex": "2.1.1", + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-width": "2.2.0", + "figures": "1.7.0", + "lodash": "4.17.9", + "readline2": "1.0.1", + "run-async": "0.1.0", + "rx-lite": "3.1.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "through": "2.3.8" + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "dev": true, + "requires": { + "is-relative": "0.2.1", + "is-windows": "0.2.0" + }, + "dependencies": { + "is-windows": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=", + "dev": true + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "1.11.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-my-ip-valid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", + "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", + "dev": true + }, + "is-my-json-valid": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", + "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", + "dev": true, + "requires": { + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "is-my-ip-valid": "1.0.0", + "jsonpointer": "4.0.1", + "xtend": "4.0.1" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "dev": true, + "requires": { + "is-path-inside": "1.0.1" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true, + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", + "dev": true + }, + "is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "dev": true, + "requires": { + "is-unc-path": "0.1.2" + } + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "dev": true, + "requires": { + "unc-path-regex": "0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isemail": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", + "integrity": "sha1-vgPfjMPineTSxd9lASY/H6RZXpo=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "dev": true, + "requires": { + "node-fetch": "1.7.3", + "whatwg-fetch": "2.0.4" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "jest-docblock": { + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-20.0.3.tgz", + "integrity": "sha1-F76phDQswz2DxQ++FUXqDvqkRxI=", + "dev": true + }, + "jest-haste-map": { + "version": "20.0.5", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-20.0.5.tgz", + "integrity": "sha512-0IKAQjUvuZjMCNi/0VNQQF74/H9KB67hsHJqGiwTWQC6XO5Azs7kLWm+6Q/dwuhvDUvABDOBMFK2/FwZ3sZ07Q==", + "dev": true, + "requires": { + "fb-watchman": "2.0.0", + "graceful-fs": "4.1.11", + "jest-docblock": "20.0.3", + "micromatch": "2.3.11", + "sane": "1.6.0", + "worker-farm": "1.6.0" + }, + "dependencies": { + "bser": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bser/-/bser-1.0.2.tgz", + "integrity": "sha1-OBEWlwsqbe6lZG3RXdcnhES1YWk=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "sane": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-1.6.0.tgz", + "integrity": "sha1-lhDEUjB6E10pwf3+JUcDQYDEZ3U=", + "dev": true, + "requires": { + "anymatch": "1.3.2", + "exec-sh": "0.2.1", + "fb-watchman": "1.9.2", + "minimatch": "3.0.4", + "minimist": "1.2.0", + "walker": "1.0.7", + "watch": "0.10.0" + }, + "dependencies": { + "fb-watchman": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-1.9.2.tgz", + "integrity": "sha1-okz0eCf4LTj7Waaa1wt247auc4M=", + "dev": true, + "requires": { + "bser": "1.0.2" + } + } + } + } + } + }, + "joi": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", + "integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=", + "dev": true, + "requires": { + "hoek": "2.16.3", + "isemail": "1.2.0", + "moment": "2.22.1", + "topo": "1.1.0" + } + }, + "js-cookie": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.0.tgz", + "integrity": "sha1-Gywnmm7s44ChIWi5JIUmWzWx7/s=" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", + "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", + "dev": true, + "requires": { + "argparse": "1.0.10", + "esprima": "4.0.0" + } + }, + "js2xmlparser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-3.0.0.tgz", + "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=", + "dev": true, + "requires": { + "xmlcreate": "1.0.2" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jsdoc": { + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", + "integrity": "sha512-6PxB65TAU4WO0Wzyr/4/YhlGovXl0EVYfpKbpSroSj0qBxT4/xod/l40Opkm38dRHRdQgdeY836M0uVnJQG7kg==", + "dev": true, + "requires": { + "babylon": "7.0.0-beta.19", + "bluebird": "3.5.1", + "catharsis": "0.8.9", + "escape-string-regexp": "1.0.5", + "js2xmlparser": "3.0.0", + "klaw": "2.0.0", + "marked": "0.3.19", + "mkdirp": "0.5.1", + "requizzle": "0.2.1", + "strip-json-comments": "2.0.1", + "taffydb": "2.6.2", + "underscore": "1.8.3" + }, + "dependencies": { + "babylon": { + "version": "7.0.0-beta.19", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.19.tgz", + "integrity": "sha512-Vg0C9s/REX6/WIXN37UKpv5ZhRi6A4pjHlpkE34+8/a6c2W1Q692n3hmc+SZG5lKRnaExLUbxtJ1SVT+KaCQ/A==", + "dev": true + } + } + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + }, + "klaw": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.0.0.tgz", + "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "left-pad": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", + "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" + } + }, + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "3.2.0", + "emojis-list": "2.1.0", + "json5": "0.5.1", + "object-assign": "4.1.1" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.9", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.9.tgz", + "integrity": "sha512-vuRLquvot5sKUldMBumG0YqLvX6m/RGBBOmqb3CWR/MC/QvvD1cTH1fOqxz2FJAQeoExeUdX5Gu9vP2EP6ik+Q==", + "dev": true + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._baseget": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/lodash._baseget/-/lodash._baseget-3.7.2.tgz", + "integrity": "sha1-G2rh1frPPCVTI1ChPBGXy4u2dPQ=", + "dev": true + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", + "dev": true + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", + "dev": true + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", + "dev": true + }, + "lodash._topath": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/lodash._topath/-/lodash._topath-3.8.1.tgz", + "integrity": "sha1-PsXiYGAU9MuX91X+aRTt2L/ADqw=", + "dev": true, + "requires": { + "lodash.isarray": "3.0.4" + } + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "dev": true, + "requires": { + "lodash._root": "3.0.1" + } + }, + "lodash.get": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-3.7.0.tgz", + "integrity": "sha1-POaK4skWg7KBzFOUEoMDy/deaR8=", + "dev": true, + "requires": { + "lodash._baseget": "3.7.2", + "lodash._topath": "3.8.1" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash.pad": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz", + "integrity": "sha1-QzCUmoM6fI2iLMIPaibE1Z3runA=", + "dev": true + }, + "lodash.padend": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", + "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=", + "dev": true + }, + "lodash.padstart": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padstart/-/lodash.padstart-4.6.1.tgz", + "integrity": "sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs=", + "dev": true + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", + "dev": true + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "dev": true, + "requires": { + "lodash._basecopy": "3.0.1", + "lodash._basetostring": "3.0.1", + "lodash._basevalues": "3.0.0", + "lodash._isiterateecall": "3.0.9", + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0", + "lodash.keys": "3.1.2", + "lodash.restparam": "3.6.1", + "lodash.templatesettings": "3.1.1" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "dev": true, + "requires": { + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0" + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true, + "requires": { + "js-tokens": "3.0.2" + } + }, + "lru-cache": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.4" + } + }, + "marked": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", + "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", + "dev": true + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "memory-fs": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", + "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=", + "dev": true + }, + "merge": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz", + "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=", + "dev": true + }, + "method-override": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/method-override/-/method-override-2.3.10.tgz", + "integrity": "sha1-49r41d7hDdLc59SuiNYrvud0drQ=", + "dev": true, + "requires": { + "debug": "2.6.9", + "methods": "1.1.2", + "parseurl": "1.3.2", + "vary": "1.1.2" + }, + "dependencies": { + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + } + } + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "brorand": "1.1.0" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz", + "integrity": "sha1-wlnEcb2oCKhdbNGTtDCl+uRHOzw=", + "dev": true, + "requires": { + "mime-db": "1.23.0" + }, + "dependencies": { + "mime-db": { + "version": "1.23.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz", + "integrity": "sha1-oxtAcK2uon1zLqMzdApk0OyaZlk=", + "dev": true + } + } + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "dev": true, + "requires": { + "dom-walk": "0.1.1" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "moment": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.1.tgz", + "integrity": "sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ==", + "dev": true + }, + "morgan": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.6.1.tgz", + "integrity": "sha1-X9gYOYxoGcuiinzWZk8pL+HAu/I=", + "dev": true, + "requires": { + "basic-auth": "1.0.4", + "debug": "2.2.0", + "depd": "1.0.1", + "on-finished": "2.3.0", + "on-headers": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multiparty": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/multiparty/-/multiparty-3.3.2.tgz", + "integrity": "sha1-Nd5oBNwZZD5SSfPT473GyM4wHT8=", + "dev": true, + "requires": { + "readable-stream": "1.1.14", + "stream-counter": "0.2.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "dev": true, + "requires": { + "duplexer2": "0.0.2" + } + }, + "mute-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", + "dev": true + }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "dev": true, + "optional": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "negotiator": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.5.3.tgz", + "integrity": "sha1-Jp1cR2gQ7JLtvntsLygxY4T5p+g=", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true, + "requires": { + "encoding": "0.1.12", + "is-stream": "1.1.0" + } + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-libs-browser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-1.1.1.tgz", + "integrity": "sha1-KjgkOr7dff/NB6l8mspWaJdab+o=", + "dev": true, + "requires": { + "assert": "1.4.1", + "browserify-zlib": "0.1.4", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.12.0", + "domain-browser": "1.2.0", + "events": "1.1.1", + "https-browserify": "0.0.1", + "os-browserify": "0.2.1", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.6", + "stream-browserify": "2.0.1", + "stream-http": "2.8.1", + "string_decoder": "0.10.31", + "timers-browserify": "1.4.2", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "1.0.1", + "browserify-sign": "4.0.4", + "create-ecdh": "4.0.1", + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "diffie-hellman": "5.0.3", + "inherits": "2.0.3", + "pbkdf2": "3.0.16", + "public-encrypt": "4.0.2", + "randombytes": "2.0.6", + "randomfill": "1.0.4" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.6.0", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "npmlog": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-2.0.4.tgz", + "integrity": "sha1-mLUlMPJRTKkNCexbIsiEZyI3VpI=", + "dev": true, + "requires": { + "ansi": "0.3.1", + "are-we-there-yet": "1.1.4", + "gauge": "1.2.7" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", + "dev": true + }, + "opn": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/opn/-/opn-3.0.3.tgz", + "integrity": "sha1-ttmec5n3jWXDuq/+8fsojpuFJDo=", + "dev": true, + "requires": { + "object-assign": "4.1.1" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "0.0.8", + "wordwrap": "0.0.3" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + } + }, + "options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", + "dev": true + }, + "os-browserify": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.2.1.tgz", + "integrity": "sha1-Y/xMzuXS13Y9Jrv4YBB45sLgBE8=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "output-file-sync": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", + "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "mkdirp": "0.5.1", + "object-assign": "4.1.1" + } + }, + "p-limit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", + "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", + "dev": true, + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.2.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", + "dev": true + }, + "parse-asn1": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "dev": true, + "requires": { + "asn1.js": "4.10.1", + "browserify-aes": "1.2.0", + "create-hash": "1.2.0", + "evp_bytestokey": "1.0.3", + "pbkdf2": "3.0.16" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, + "pause": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/pause/-/pause-0.1.0.tgz", + "integrity": "sha1-68ikqGGf8LioGsFRPDQ0/0af23Q=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", + "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "dev": true, + "requires": { + "create-hash": "1.2.0", + "create-hmac": "1.1.7", + "ripemd160": "2.0.2", + "safe-buffer": "5.1.1", + "sha.js": "2.4.11" + } + }, + "pbkdf2-compat": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz", + "integrity": "sha1-tuDI+plJTZTgURV1gCpZpcFC8og=", + "dev": true + }, + "pegjs": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz", + "integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "dev": true, + "requires": { + "find-up": "1.1.2" + } + }, + "plist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/plist/-/plist-1.2.0.tgz", + "integrity": "sha1-CEtQk93JJQbiWfh0uNmxr7jHlZM=", + "dev": true, + "requires": { + "base64-js": "0.0.8", + "util-deprecate": "1.0.2", + "xmlbuilder": "4.0.0", + "xmldom": "0.1.27" + }, + "dependencies": { + "base64-js": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", + "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=", + "dev": true + } + } + }, + "pluralize": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", + "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-format": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-4.3.1.tgz", + "integrity": "sha1-UwvlxCs8BbNkFKeipDN6qArNDo0=", + "dev": true + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "progress": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", + "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "requires": { + "asap": "2.0.6" + } + }, + "prop-types": { + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz", + "integrity": "sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ==", + "dev": true, + "requires": { + "fbjs": "0.8.16", + "loose-envify": "1.3.1", + "object-assign": "4.1.1" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "browserify-rsa": "4.0.1", + "create-hash": "1.2.0", + "parse-asn1": "5.1.1", + "randombytes": "2.0.6" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "qs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-4.0.0.tgz", + "integrity": "sha1-wx2bdOwn33XlQ6hseHKO2NRiNgc=", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "random-bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", + "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=", + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "2.0.6", + "safe-buffer": "5.1.1" + } + }, + "range-parser": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.3.tgz", + "integrity": "sha1-aHKCNTXGkuLCoBA4Jq/YLC4P8XU=", + "dev": true + }, + "raw-body": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz", + "integrity": "sha1-rf6s4uT7MJgFgBTQjActzFl1h3Q=", + "dev": true, + "requires": { + "bytes": "2.4.0", + "iconv-lite": "0.4.13", + "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", + "integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", + "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=", + "dev": true + } + } + }, + "react": { + "version": "16.3.2", + "resolved": "https://registry.npmjs.org/react/-/react-16.3.2.tgz", + "integrity": "sha512-o5GPdkhciQ3cEph6qgvYB7LTOHw/GB0qRI6ZFNugj49qJCFfgHwVNjZ5u+b7nif4vOeMIOuYj3CeYe2IBD74lg==", + "dev": true, + "requires": { + "fbjs": "0.8.16", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "prop-types": "15.6.1" + } + }, + "react-clone-referenced-element": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/react-clone-referenced-element/-/react-clone-referenced-element-1.0.1.tgz", + "integrity": "sha1-K7qMaUBMXkqUQ5hgC8xMlB+GBoI=", + "dev": true + }, + "react-deep-force-update": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/react-deep-force-update/-/react-deep-force-update-1.1.1.tgz", + "integrity": "sha1-vNMUeAJ7ZLMznxCJIatSC0MT3Cw=", + "dev": true + }, + "react-devtools-core": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/react-devtools-core/-/react-devtools-core-2.5.2.tgz", + "integrity": "sha1-+XvsWvrl2TGNFneAZeDCFMTVcUw=", + "dev": true, + "requires": { + "shell-quote": "1.6.1", + "ws": "2.3.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=", + "dev": true + }, + "ws": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-2.3.1.tgz", + "integrity": "sha1-a5Sz5EfLajY/eF6vlK9jWejoHIA=", + "dev": true, + "requires": { + "safe-buffer": "5.0.1", + "ultron": "1.1.1" + } + } + } + }, + "react-native": { + "version": "0.44.3", + "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.44.3.tgz", + "integrity": "sha1-BFUOHN/GGacS8/WWnWjNfC3EwHM=", + "dev": true, + "requires": { + "absolute-path": "0.0.0", + "art": "0.10.2", + "async": "2.6.0", + "babel-core": "6.26.0", + "babel-generator": "6.26.1", + "babel-plugin-external-helpers": "6.22.0", + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-to-generator": "6.16.0", + "babel-plugin-transform-flow-strip-types": "6.22.0", + "babel-plugin-transform-object-rest-spread": "6.26.0", + "babel-polyfill": "6.26.0", + "babel-preset-es2015-node": "6.1.1", + "babel-preset-fbjs": "2.1.4", + "babel-preset-react-native": "1.9.2", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "base64-js": "1.3.0", + "bser": "1.0.3", + "chalk": "1.1.3", + "commander": "2.15.1", + "concat-stream": "1.6.2", + "connect": "2.30.2", + "core-js": "2.5.5", + "debug": "2.6.9", + "denodeify": "1.2.1", + "event-target-shim": "1.1.1", + "fbjs": "0.8.16", + "fbjs-scripts": "0.7.1", + "form-data": "2.3.2", + "fs-extra": "1.0.0", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "image-size": "0.3.5", + "immutable": "3.7.6", + "imurmurhash": "0.1.4", + "inquirer": "0.12.0", + "jest-haste-map": "20.0.5", + "joi": "6.10.1", + "json-stable-stringify": "1.0.1", + "json5": "0.4.0", + "left-pad": "1.3.0", + "lodash": "4.17.9", + "mime": "1.6.0", + "mime-types": "2.1.11", + "minimist": "1.2.0", + "mkdirp": "0.5.1", + "node-fetch": "1.7.3", + "npmlog": "2.0.4", + "opn": "3.0.3", + "optimist": "0.6.1", + "plist": "1.2.0", + "pretty-format": "4.3.1", + "promise": "7.3.1", + "react-clone-referenced-element": "1.0.1", + "react-devtools-core": "2.5.2", + "react-timer-mixin": "0.13.3", + "react-transform-hmr": "1.0.4", + "rebound": "0.0.13", + "regenerator-runtime": "0.9.6", + "request": "2.85.0", + "rimraf": "2.6.2", + "sane": "1.4.1", + "semver": "5.5.0", + "shell-quote": "1.6.1", + "source-map": "0.5.7", + "stacktrace-parser": "0.1.4", + "temp": "0.8.3", + "throat": "3.2.0", + "uglify-js": "2.7.5", + "whatwg-fetch": "1.1.1", + "wordwrap": "1.0.0", + "worker-farm": "1.6.0", + "write-file-atomic": "1.3.4", + "ws": "1.1.5", + "xcode": "0.9.3", + "xmldoc": "0.4.0", + "xpipe": "1.0.5", + "yargs": "6.6.0" + }, + "dependencies": { + "babel-plugin-transform-async-to-generator": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.16.0.tgz", + "integrity": "sha1-Gew2yxSGtZ+fRorfpCzhOQjKKZk=", + "dev": true, + "requires": { + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "json5": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz", + "integrity": "sha1-BUNS5MTIDIbAkjh31EneF2pzLI0=", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "regenerator-runtime": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz", + "integrity": "sha1-0z65XQ0gAaS+OWWXB8UbDLcc4Ck=", + "dev": true + }, + "whatwg-fetch": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-1.1.1.tgz", + "integrity": "sha1-rDydOfMgxtzlM5lp0FTvQ90zMxk=", + "dev": true + } + } + }, + "react-proxy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/react-proxy/-/react-proxy-1.1.8.tgz", + "integrity": "sha1-nb/Z2SdSjDqp9ETkVYw3gwq4wmo=", + "dev": true, + "requires": { + "lodash": "4.17.9", + "react-deep-force-update": "1.1.1" + } + }, + "react-timer-mixin": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/react-timer-mixin/-/react-timer-mixin-0.13.3.tgz", + "integrity": "sha1-Dai5+AfsB9w+hU0ILHN8ZWBbPSI=", + "dev": true + }, + "react-transform-hmr": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/react-transform-hmr/-/react-transform-hmr-1.0.4.tgz", + "integrity": "sha1-4aQL0Krvxy6N/Xp82gmvhQZjl7s=", + "dev": true, + "requires": { + "global": "4.3.2", + "react-proxy": "1.1.8" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "2.0.0", + "normalize-package-data": "2.4.0", + "path-type": "2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" + } + }, + "readline2": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", + "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "mute-stream": "0.0.5" + } + }, + "rebound": { + "version": "0.0.13", + "resolved": "https://registry.npmjs.org/rebound/-/rebound-0.0.13.tgz", + "integrity": "sha1-SiJSVMr32nVnl7GcWBe/enlB+sE=", + "dev": true + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "1.7.1" + } + }, + "regenerate": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "private": "0.1.8" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true, + "requires": { + "regenerate": "1.3.3", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "requires": { + "jsesc": "0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", + "dev": true + }, + "request": { + "version": "2.85.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", + "integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==", + "dev": true, + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.7.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + }, + "dependencies": { + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "requires": { + "mime-db": "1.33.0" + } + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true, + "requires": { + "caller-path": "0.1.0", + "resolve-from": "1.0.1" + } + }, + "requizzle": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz", + "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", + "dev": true, + "requires": { + "underscore": "1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, + "resolve": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", + "dev": true, + "requires": { + "path-parse": "1.0.5" + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "response-time": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/response-time/-/response-time-2.3.2.tgz", + "integrity": "sha1-/6cbq5UtYvfB1Jt0NDVfvGjf/Fo=", + "dev": true, + "requires": { + "depd": "1.1.2", + "on-headers": "1.0.1" + }, + "dependencies": { + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + } + } + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "dev": true, + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + } + }, + "rndm": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz", + "integrity": "sha1-8z/pz7Urv9UgqhgyO8ZdsRCht2w=", + "dev": true + }, + "run-async": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", + "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "dev": true, + "requires": { + "once": "1.4.0" + } + }, + "rx-lite": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", + "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sane": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sane/-/sane-1.4.1.tgz", + "integrity": "sha1-iPdj10BA9fDCVrYWPbOZvxEKxxU=", + "dev": true, + "requires": { + "exec-sh": "0.2.1", + "fb-watchman": "1.9.2", + "minimatch": "3.0.4", + "minimist": "1.2.0", + "walker": "1.0.7", + "watch": "0.10.0" + }, + "dependencies": { + "bser": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bser/-/bser-1.0.2.tgz", + "integrity": "sha1-OBEWlwsqbe6lZG3RXdcnhES1YWk=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + }, + "fb-watchman": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-1.9.2.tgz", + "integrity": "sha1-okz0eCf4LTj7Waaa1wt247auc4M=", + "dev": true, + "requires": { + "bser": "1.0.2" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "sax": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.1.6.tgz", + "integrity": "sha1-XWFr6KXmB9VOEUr65Vt+ry/MMkA=", + "dev": true + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "send": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.13.2.tgz", + "integrity": "sha1-dl52B8gFVFK7pvCwUllTUJhgNt4=", + "dev": true, + "requires": { + "debug": "2.2.0", + "depd": "1.1.2", + "destroy": "1.0.4", + "escape-html": "1.0.3", + "etag": "1.7.0", + "fresh": "0.3.0", + "http-errors": "1.3.1", + "mime": "1.3.4", + "ms": "0.7.1", + "on-finished": "2.3.0", + "range-parser": "1.0.3", + "statuses": "1.2.1" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "mime": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "statuses": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.2.1.tgz", + "integrity": "sha1-3e1FzBglbVHtQK7BQkidXGECbSg=", + "dev": true + } + } + }, + "serve-favicon": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.3.2.tgz", + "integrity": "sha1-3UGeJo3gEqtysxnTN/IQUBP5OB8=", + "dev": true, + "requires": { + "etag": "1.7.0", + "fresh": "0.3.0", + "ms": "0.7.2", + "parseurl": "1.3.2" + }, + "dependencies": { + "ms": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz", + "integrity": "sha1-riXPJRKziFodldfwN4aNhDESR2U=", + "dev": true + } + } + }, + "serve-index": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.7.3.tgz", + "integrity": "sha1-egV/xu4o3GP2RWbl+lexEahq7NI=", + "dev": true, + "requires": { + "accepts": "1.2.13", + "batch": "0.5.3", + "debug": "2.2.0", + "escape-html": "1.0.3", + "http-errors": "1.3.1", + "mime-types": "2.1.11", + "parseurl": "1.3.2" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "serve-static": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.10.3.tgz", + "integrity": "sha1-zlpuzTEB/tXsCYJ9rCKpwpv7BTU=", + "dev": true, + "requires": { + "escape-html": "1.0.3", + "parseurl": "1.3.2", + "send": "0.13.2" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz", + "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=", + "dev": true, + "requires": { + "array-filter": "0.0.1", + "array-map": "0.0.0", + "array-reduce": "0.0.0", + "jsonify": "0.0.0" + } + }, + "shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "dev": true, + "requires": { + "glob": "7.1.2", + "interpret": "1.1.0", + "rechoir": "0.6.2" + } + }, + "simple-plist": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-0.2.1.tgz", + "integrity": "sha1-cXZts1IyaSjPOoByQrp2IyJjZyM=", + "dev": true, + "requires": { + "bplist-creator": "0.0.7", + "bplist-parser": "0.1.1", + "plist": "2.0.1" + }, + "dependencies": { + "base64-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.1.2.tgz", + "integrity": "sha1-1kAMrBxMZgl22Q0HoENR2JOV9eg=", + "dev": true + }, + "plist": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/plist/-/plist-2.0.1.tgz", + "integrity": "sha1-CjLKlIGxw2TpLhjcVch23p0B2os=", + "dev": true, + "requires": { + "base64-js": "1.1.2", + "xmlbuilder": "8.2.2", + "xmldom": "0.1.27" + } + }, + "xmlbuilder": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-8.2.2.tgz", + "integrity": "sha1-aSSGc0ELS6QuGmE2VR0pIjNap3M=", + "dev": true + } + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "dev": true, + "requires": { + "hoek": "4.2.1" + }, + "dependencies": { + "hoek": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==", + "dev": true + } + } + }, + "source-list-map": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", + "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "sparkles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", + "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", + "dev": true + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", + "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", + "dev": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + } + }, + "stacktrace-parser": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.4.tgz", + "integrity": "sha1-ATl5IuX2Ls8whFUiyVxP4dJefU4=", + "dev": true + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.6" + } + }, + "stream-buffers": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", + "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=", + "dev": true + }, + "stream-counter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/stream-counter/-/stream-counter-0.2.0.tgz", + "integrity": "sha1-3tJmVWMZyLDiIoErnPOyb6fZR94=", + "dev": true, + "requires": { + "readable-stream": "1.1.14" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "stream-http": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.1.tgz", + "integrity": "sha512-cQ0jo17BLca2r0GfRdZKYAGLU6JRoIWxqSOakUMuKOT6MOK7AAlE856L33QuDmAy/eeOrhLee3dZKX0Uadu93A==", + "dev": true, + "requires": { + "builtin-status-codes": "3.0.0", + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "to-arraybuffer": "1.0.1", + "xtend": "4.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "table": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", + "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", + "dev": true, + "requires": { + "ajv": "4.11.8", + "ajv-keywords": "1.5.1", + "chalk": "1.1.3", + "lodash": "4.17.9", + "slice-ansi": "0.0.4", + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + } + } + }, + "taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", + "dev": true + }, + "tapable": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", + "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=", + "dev": true + }, + "temp": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", + "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2", + "rimraf": "2.2.8" + }, + "dependencies": { + "rimraf": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", + "dev": true + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "throat": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-3.2.0.tgz", + "integrity": "sha512-/EY8VpvlqJ+sFtLPeOgc8Pl7kQVOWv0woD87KTXVHPIAE842FGT+rokxIhe8xIUP1cfgrkt0as0vDLjDiMtr8w==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "2.3.6", + "xtend": "4.0.1" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "dev": true, + "requires": { + "process": "0.11.10" + } + }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "topo": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", + "integrity": "sha1-6ddRYV0buH3IZdsYL6HKCl71NtU=", + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "dev": true, + "requires": { + "punycode": "1.4.1" + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tsscmp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.5.tgz", + "integrity": "sha1-fcSjOvcVgatDN9qR2FylQn69mpc=", + "dev": true + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "2.1.18" + }, + "dependencies": { + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "dev": true, + "requires": { + "mime-db": "1.33.0" + } + } + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "ua-parser-js": { + "version": "0.7.17", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz", + "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==", + "dev": true + }, + "uglify-js": { + "version": "2.7.5", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.7.5.tgz", + "integrity": "sha1-RhLAx7qu4rp8SH3kkErhIgefLKg=", + "dev": true, + "requires": { + "async": "0.2.10", + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true + }, + "uid-safe": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.4.tgz", + "integrity": "sha1-Otbzg2jG1MjHXsF2I/t5qh0HHYE=", + "dev": true, + "requires": { + "random-bytes": "1.0.0" + } + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "underscore-contrib": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz", + "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=", + "dev": true, + "requires": { + "underscore": "1.6.0" + }, + "dependencies": { + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", + "dev": true + } + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "utils-merge": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=", + "dev": true + }, + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", + "dev": true + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true, + "requires": { + "user-home": "1.1.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "dev": true, + "requires": { + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" + } + }, + "vary": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.0.1.tgz", + "integrity": "sha1-meSYFWaihhGN+yuBc1ffeZM3bRA=", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + } + }, + "vhost": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/vhost/-/vhost-3.0.2.tgz", + "integrity": "sha1-L7HezUxGaqiLD5NBrzPcGv8keNU=", + "dev": true + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "dev": true, + "requires": { + "clone": "1.0.4", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.11" + } + }, + "watch": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/watch/-/watch-0.10.0.tgz", + "integrity": "sha1-d3mLLaD5kQ1ZXxrOWwwiWFIfIdw=", + "dev": true + }, + "watchpack": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz", + "integrity": "sha1-Yuqkq15bo1/fwBgnVibjwPXj+ws=", + "dev": true, + "requires": { + "async": "0.9.2", + "chokidar": "1.7.0", + "graceful-fs": "4.1.11" + }, + "dependencies": { + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=", + "dev": true + } + } + }, + "webpack": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-1.15.0.tgz", + "integrity": "sha1-T/MfU9sDM55VFkqdRo7gMklo/pg=", + "dev": true, + "requires": { + "acorn": "3.3.0", + "async": "1.5.2", + "clone": "1.0.4", + "enhanced-resolve": "0.9.1", + "interpret": "0.6.6", + "loader-utils": "0.2.17", + "memory-fs": "0.3.0", + "mkdirp": "0.5.1", + "node-libs-browser": "0.7.0", + "optimist": "0.6.1", + "supports-color": "3.2.3", + "tapable": "0.1.10", + "uglify-js": "2.7.5", + "watchpack": "0.2.9", + "webpack-core": "0.6.9" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "browserify-aes": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-0.4.0.tgz", + "integrity": "sha1-BnFJtmjfMcS1hTPgLQHoBthgjiw=", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "crypto-browserify": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.3.0.tgz", + "integrity": "sha1-ufx1u0oO1h3PHNXa6W6zDJw+UGw=", + "dev": true, + "requires": { + "browserify-aes": "0.4.0", + "pbkdf2-compat": "2.0.1", + "ripemd160": "0.2.0", + "sha.js": "2.2.6" + } + }, + "interpret": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz", + "integrity": "sha1-/s16GOfOXKar+5U+H4YhOknxYls=", + "dev": true + }, + "memory-fs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz", + "integrity": "sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA=", + "dev": true, + "requires": { + "errno": "0.1.7", + "readable-stream": "2.3.6" + } + }, + "node-libs-browser": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-0.7.0.tgz", + "integrity": "sha1-PicsCBnjCJNeJmdECNevDhSRuDs=", + "dev": true, + "requires": { + "assert": "1.4.1", + "browserify-zlib": "0.1.4", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "1.0.0", + "crypto-browserify": "3.3.0", + "domain-browser": "1.2.0", + "events": "1.1.1", + "https-browserify": "0.0.1", + "os-browserify": "0.2.1", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "2.3.6", + "stream-browserify": "2.0.1", + "stream-http": "2.8.1", + "string_decoder": "0.10.31", + "timers-browserify": "2.0.10", + "tty-browserify": "0.0.0", + "url": "0.11.0", + "util": "0.10.3", + "vm-browserify": "0.0.4" + } + }, + "ripemd160": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz", + "integrity": "sha1-K/GYveFnys+lHAqSjoS2i74XH84=", + "dev": true + }, + "sha.js": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz", + "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo=", + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + }, + "timers-browserify": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", + "dev": true, + "requires": { + "setimmediate": "1.0.5" + } + } + } + }, + "webpack-core": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", + "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", + "dev": true, + "requires": { + "source-list-map": "0.1.8", + "source-map": "0.4.4" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "whatwg-fetch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==", + "dev": true + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "worker-farm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz", + "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", + "dev": true, + "requires": { + "errno": "0.1.7" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true, + "requires": { + "mkdirp": "0.5.1" + } + }, + "write-file-atomic": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", + "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "imurmurhash": "0.1.4", + "slide": "1.1.6" + } + }, + "ws": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", + "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", + "dev": true, + "requires": { + "options": "0.0.6", + "ultron": "1.0.2" + }, + "dependencies": { + "ultron": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", + "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=", + "dev": true + } + } + }, + "xcode": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/xcode/-/xcode-0.9.3.tgz", + "integrity": "sha1-kQqJwWrubMC0LKgFptC0z4chHPM=", + "dev": true, + "requires": { + "pegjs": "0.10.0", + "simple-plist": "0.2.1", + "uuid": "3.0.1" + }, + "dependencies": { + "uuid": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=", + "dev": true + } + } + }, + "xmlbuilder": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.0.0.tgz", + "integrity": "sha1-mLj2UcowqmJANvEn0RzGbce5B6M=", + "dev": true, + "requires": { + "lodash": "3.10.1" + }, + "dependencies": { + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", + "dev": true + } + } + }, + "xmlcreate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-1.0.2.tgz", + "integrity": "sha1-+mv3YqYKQT+z3Y9LA8WyaSONMI8=", + "dev": true + }, + "xmldoc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/xmldoc/-/xmldoc-0.4.0.tgz", + "integrity": "sha1-0lciS+g5PqrL+DfvIn/Y7CWzaIg=", + "dev": true, + "requires": { + "sax": "1.1.6" + } + }, + "xmldom": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", + "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=", + "dev": true + }, + "xpipe": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/xpipe/-/xpipe-1.0.5.tgz", + "integrity": "sha1-jdi/Rfw/f1Xw4FS4ePQ6YmFNr98=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", + "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "dev": true, + "requires": { + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "y18n": "3.2.1", + "yargs-parser": "4.2.1" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + } + } + }, + "yargs-parser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", + "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "dev": true, + "requires": { + "camelcase": "3.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + } + } } } } diff --git a/packages/amazon-cognito-identity-js/src/Client.js b/packages/amazon-cognito-identity-js/src/Client.js index 8b4120b0a66..c839489dd36 100644 --- a/packages/amazon-cognito-identity-js/src/Client.js +++ b/packages/amazon-cognito-identity-js/src/Client.js @@ -6,9 +6,10 @@ export default class Client { * @param {string} region AWS region * @param {string} endpoint endpoint */ - constructor(region, endpoint) { + constructor(region, endpoint, options) { this.endpoint = endpoint || `https://cognito-idp.${region}.amazonaws.com/`; this.userAgent = UserAgent.prototype.userAgent || 'aws-amplify/0.1.x js'; + this.options = options || {}; } /** @@ -26,13 +27,16 @@ export default class Client { 'X-Amz-User-Agent': this.userAgent, }; - const options = { - headers, - method: 'POST', - mode: 'cors', - cache: 'no-cache', - body: JSON.stringify(params), - }; + const options = Object.assign( + this.options, + { + headers, + method: 'POST', + mode: 'cors', + cache: 'no-cache', + body: JSON.stringify(params), + } + ); let response; diff --git a/packages/amazon-cognito-identity-js/src/CognitoUserPool.js b/packages/amazon-cognito-identity-js/src/CognitoUserPool.js index d0826ac6c9a..a812f9bb99c 100644 --- a/packages/amazon-cognito-identity-js/src/CognitoUserPool.js +++ b/packages/amazon-cognito-identity-js/src/CognitoUserPool.js @@ -33,7 +33,13 @@ export default class CognitoUserPool { * flag is set to true. */ constructor(data) { - const { UserPoolId, ClientId, endpoint, AdvancedSecurityDataCollectionFlag } = data || {}; + const { + UserPoolId, + ClientId, + ProxyAgent, + endpoint, + AdvancedSecurityDataCollectionFlag + } = data || {}; if (!UserPoolId || !ClientId) { throw new Error('Both UserPoolId and ClientId are required.'); } @@ -45,7 +51,7 @@ export default class CognitoUserPool { this.userPoolId = UserPoolId; this.clientId = ClientId; - this.client = new Client(region, endpoint); + this.client = new Client(region, endpoint, { agent: ProxyAgent || null }); /** * By default, AdvancedSecurityDataCollectionFlag is set to true,