diff --git a/bower.json b/bower.json index f403aec..561d54b 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "i18next-text", "description": "Using i18next translations without having the `key` as strings, you do not need to worry about i18n key naming.", - "version": "0.3.1", + "version": "0.4.0", "main": [ "dist/*" ], diff --git a/dist/i18next-text.custom.js b/dist/i18next-text.custom.js index add7e4f..ceb723c 100644 --- a/dist/i18next-text.custom.js +++ b/dist/i18next-text.custom.js @@ -1,7 +1,7 @@ /** * i18next-text - Using i18next translations without having the `key` as strings, you do not need to worry about i18n key naming. * Cheton Wu - * Version 0.3.1 + * Version 0.4.0 * MIT Licensed */ (function(root, factory) { diff --git a/dist/i18next-text.custom.min.js b/dist/i18next-text.custom.min.js index 163fc3e..48ecc30 100644 --- a/dist/i18next-text.custom.min.js +++ b/dist/i18next-text.custom.min.js @@ -1,7 +1,7 @@ /** * i18next-text - Using i18next translations without having the `key` as strings, you do not need to worry about i18n key naming. * Cheton Wu - * Version 0.3.1 + * Version 0.4.0 * MIT Licensed */ !function(e,n){"function"==typeof define&&define.amd?define(["exports","i18next"],function(t,i){e.i18nText=e.i18nText||{},n(t=e.i18nText,i)}):"undefined"!=typeof exports?(exports.hash=require("../lib/hash"),n(exports,require("i18next"))):(e.i18nText=e.i18nText||{},n(e.i18nText,e.i18n))}(this,function(e,n){n=n||{},e.hash=e.hash||{};var t=function(e){return e},i=function(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error("i18next-text:",e)},o=function(e){s.debug&&"undefined"!=typeof console&&"function"==typeof console.log&&console.log("i18next-text:",e)},f="sha1",s={debug:!1,hash:e.hash[f]||t};return e.init=function(n){n=n||{},s.hash="function"==typeof n.hash&&n.hash||"string"==typeof n.hash&&e.hash[n.hash]||t,s.debug=!!n.debug},e.key=function(e){return s.hash(e)},e.exists=function(e,t){var f;return"string"!=typeof e?!1:(t=t||{},f=t.defaultKey,"undefined"==typeof f&&(f=s.hash(e),o("hash("+JSON.stringify(e)+")="+JSON.stringify(f))),"function"!=typeof n.exists?(i("i18next library is not loaded"),!1):n.exists(f,t))},e._=e.text=function(e,t){var f,r;if("string"==typeof e)return t=t||{},t.defaultValue=t.defaultValue||e,f=t.defaultKey,"undefined"==typeof f&&(f=s.hash(e),o("hash("+JSON.stringify(e)+")="+JSON.stringify(f))),r=n.t||n.translate,"function"!=typeof r?void i("i18next library is not loaded"):r(f,t)},e}); \ No newline at end of file diff --git a/dist/i18next-text.hash.js b/dist/i18next-text.hash.js index 32f3e72..4fe2d84 100644 --- a/dist/i18next-text.hash.js +++ b/dist/i18next-text.hash.js @@ -10,13 +10,14 @@ } }(this, function(exports) { - exports.sha1 = require('./sha1'); exports.crc32 = require('./crc32'); + exports.md5 = require('./md5'); + exports.sha1 = require('./sha1'); return exports; })); -},{"./crc32":2,"./sha1":3}],2:[function(require,module,exports){ +},{"./crc32":2,"./md5":3,"./sha1":4}],2:[function(require,module,exports){ var crc32 = require('crc-32'); var pad = function(n, width, z) { z = z || '0'; @@ -30,10 +31,310 @@ module.exports = function(str) { return pad((checksum >>> 0).toString(16), 8); }; -},{"crc-32":8}],3:[function(require,module,exports){ +},{"crc-32":12}],3:[function(require,module,exports){ +module.exports = require('MD5'); + +},{"MD5":5}],4:[function(require,module,exports){ module.exports = require('sha1'); -},{"sha1":11}],4:[function(require,module,exports){ +},{"sha1":15}],5:[function(require,module,exports){ +(function (Buffer){ +(function(){ + var crypt = require('crypt'), + utf8 = require('charenc').utf8, + bin = require('charenc').bin, + + // The core + md5 = function (message, options) { + // Convert to byte array + if (message.constructor == String) + if (options && options.encoding === 'binary') + message = bin.stringToBytes(message); + else + message = utf8.stringToBytes(message); + else if (typeof Buffer != 'undefined' && + typeof Buffer.isBuffer == 'function' && Buffer.isBuffer(message)) + message = Array.prototype.slice.call(message, 0); + else if (!Array.isArray(message)) + message = message.toString(); + // else, assume byte array already + + var m = crypt.bytesToWords(message), + l = message.length * 8, + a = 1732584193, + b = -271733879, + c = -1732584194, + d = 271733878; + + // Swap endian + for (var i = 0; i < m.length; i++) { + m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF | + ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00; + } + + // Padding + m[l >>> 5] |= 0x80 << (l % 32); + m[(((l + 64) >>> 9) << 4) + 14] = l; + + // Method shortcuts + var FF = md5._ff, + GG = md5._gg, + HH = md5._hh, + II = md5._ii; + + for (var i = 0; i < m.length; i += 16) { + + var aa = a, + bb = b, + cc = c, + dd = d; + + a = FF(a, b, c, d, m[i+ 0], 7, -680876936); + d = FF(d, a, b, c, m[i+ 1], 12, -389564586); + c = FF(c, d, a, b, m[i+ 2], 17, 606105819); + b = FF(b, c, d, a, m[i+ 3], 22, -1044525330); + a = FF(a, b, c, d, m[i+ 4], 7, -176418897); + d = FF(d, a, b, c, m[i+ 5], 12, 1200080426); + c = FF(c, d, a, b, m[i+ 6], 17, -1473231341); + b = FF(b, c, d, a, m[i+ 7], 22, -45705983); + a = FF(a, b, c, d, m[i+ 8], 7, 1770035416); + d = FF(d, a, b, c, m[i+ 9], 12, -1958414417); + c = FF(c, d, a, b, m[i+10], 17, -42063); + b = FF(b, c, d, a, m[i+11], 22, -1990404162); + a = FF(a, b, c, d, m[i+12], 7, 1804603682); + d = FF(d, a, b, c, m[i+13], 12, -40341101); + c = FF(c, d, a, b, m[i+14], 17, -1502002290); + b = FF(b, c, d, a, m[i+15], 22, 1236535329); + + a = GG(a, b, c, d, m[i+ 1], 5, -165796510); + d = GG(d, a, b, c, m[i+ 6], 9, -1069501632); + c = GG(c, d, a, b, m[i+11], 14, 643717713); + b = GG(b, c, d, a, m[i+ 0], 20, -373897302); + a = GG(a, b, c, d, m[i+ 5], 5, -701558691); + d = GG(d, a, b, c, m[i+10], 9, 38016083); + c = GG(c, d, a, b, m[i+15], 14, -660478335); + b = GG(b, c, d, a, m[i+ 4], 20, -405537848); + a = GG(a, b, c, d, m[i+ 9], 5, 568446438); + d = GG(d, a, b, c, m[i+14], 9, -1019803690); + c = GG(c, d, a, b, m[i+ 3], 14, -187363961); + b = GG(b, c, d, a, m[i+ 8], 20, 1163531501); + a = GG(a, b, c, d, m[i+13], 5, -1444681467); + d = GG(d, a, b, c, m[i+ 2], 9, -51403784); + c = GG(c, d, a, b, m[i+ 7], 14, 1735328473); + b = GG(b, c, d, a, m[i+12], 20, -1926607734); + + a = HH(a, b, c, d, m[i+ 5], 4, -378558); + d = HH(d, a, b, c, m[i+ 8], 11, -2022574463); + c = HH(c, d, a, b, m[i+11], 16, 1839030562); + b = HH(b, c, d, a, m[i+14], 23, -35309556); + a = HH(a, b, c, d, m[i+ 1], 4, -1530992060); + d = HH(d, a, b, c, m[i+ 4], 11, 1272893353); + c = HH(c, d, a, b, m[i+ 7], 16, -155497632); + b = HH(b, c, d, a, m[i+10], 23, -1094730640); + a = HH(a, b, c, d, m[i+13], 4, 681279174); + d = HH(d, a, b, c, m[i+ 0], 11, -358537222); + c = HH(c, d, a, b, m[i+ 3], 16, -722521979); + b = HH(b, c, d, a, m[i+ 6], 23, 76029189); + a = HH(a, b, c, d, m[i+ 9], 4, -640364487); + d = HH(d, a, b, c, m[i+12], 11, -421815835); + c = HH(c, d, a, b, m[i+15], 16, 530742520); + b = HH(b, c, d, a, m[i+ 2], 23, -995338651); + + a = II(a, b, c, d, m[i+ 0], 6, -198630844); + d = II(d, a, b, c, m[i+ 7], 10, 1126891415); + c = II(c, d, a, b, m[i+14], 15, -1416354905); + b = II(b, c, d, a, m[i+ 5], 21, -57434055); + a = II(a, b, c, d, m[i+12], 6, 1700485571); + d = II(d, a, b, c, m[i+ 3], 10, -1894986606); + c = II(c, d, a, b, m[i+10], 15, -1051523); + b = II(b, c, d, a, m[i+ 1], 21, -2054922799); + a = II(a, b, c, d, m[i+ 8], 6, 1873313359); + d = II(d, a, b, c, m[i+15], 10, -30611744); + c = II(c, d, a, b, m[i+ 6], 15, -1560198380); + b = II(b, c, d, a, m[i+13], 21, 1309151649); + a = II(a, b, c, d, m[i+ 4], 6, -145523070); + d = II(d, a, b, c, m[i+11], 10, -1120210379); + c = II(c, d, a, b, m[i+ 2], 15, 718787259); + b = II(b, c, d, a, m[i+ 9], 21, -343485551); + + a = (a + aa) >>> 0; + b = (b + bb) >>> 0; + c = (c + cc) >>> 0; + d = (d + dd) >>> 0; + } + + return crypt.endian([a, b, c, d]); + }; + + // Auxiliary functions + md5._ff = function (a, b, c, d, x, s, t) { + var n = a + (b & c | ~b & d) + (x >>> 0) + t; + return ((n << s) | (n >>> (32 - s))) + b; + }; + md5._gg = function (a, b, c, d, x, s, t) { + var n = a + (b & d | c & ~d) + (x >>> 0) + t; + return ((n << s) | (n >>> (32 - s))) + b; + }; + md5._hh = function (a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + (x >>> 0) + t; + return ((n << s) | (n >>> (32 - s))) + b; + }; + md5._ii = function (a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + (x >>> 0) + t; + return ((n << s) | (n >>> (32 - s))) + b; + }; + + // Package private blocksize + md5._blocksize = 16; + md5._digestsize = 16; + + module.exports = function (message, options) { + if(typeof message == 'undefined') + return; + + var digestbytes = crypt.wordsToBytes(md5(message, options)); + return options && options.asBytes ? digestbytes : + options && options.asString ? bin.bytesToString(digestbytes) : + crypt.bytesToHex(digestbytes); + }; + +})(); + +}).call(this,require("buffer").Buffer) +},{"buffer":8,"charenc":6,"crypt":7}],6:[function(require,module,exports){ +var charenc = { + // UTF-8 encoding + utf8: { + // Convert a string to a byte array + stringToBytes: function(str) { + return charenc.bin.stringToBytes(unescape(encodeURIComponent(str))); + }, + + // Convert a byte array to a string + bytesToString: function(bytes) { + return decodeURIComponent(escape(charenc.bin.bytesToString(bytes))); + } + }, + + // Binary encoding + bin: { + // Convert a string to a byte array + stringToBytes: function(str) { + for (var bytes = [], i = 0; i < str.length; i++) + bytes.push(str.charCodeAt(i) & 0xFF); + return bytes; + }, + + // Convert a byte array to a string + bytesToString: function(bytes) { + for (var str = [], i = 0; i < bytes.length; i++) + str.push(String.fromCharCode(bytes[i])); + return str.join(''); + } + } +}; + +module.exports = charenc; + +},{}],7:[function(require,module,exports){ +(function() { + var base64map + = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + + crypt = { + // Bit-wise rotation left + rotl: function(n, b) { + return (n << b) | (n >>> (32 - b)); + }, + + // Bit-wise rotation right + rotr: function(n, b) { + return (n << (32 - b)) | (n >>> b); + }, + + // Swap big-endian to little-endian and vice versa + endian: function(n) { + // If number given, swap endian + if (n.constructor == Number) { + return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00; + } + + // Else, assume array and swap all items + for (var i = 0; i < n.length; i++) + n[i] = crypt.endian(n[i]); + return n; + }, + + // Generate an array of any length of random bytes + randomBytes: function(n) { + for (var bytes = []; n > 0; n--) + bytes.push(Math.floor(Math.random() * 256)); + return bytes; + }, + + // Convert a byte array to big-endian 32-bit words + bytesToWords: function(bytes) { + for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8) + words[b >>> 5] |= bytes[i] << (24 - b % 32); + return words; + }, + + // Convert big-endian 32-bit words to a byte array + wordsToBytes: function(words) { + for (var bytes = [], b = 0; b < words.length * 32; b += 8) + bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF); + return bytes; + }, + + // Convert a byte array to a hex string + bytesToHex: function(bytes) { + for (var hex = [], i = 0; i < bytes.length; i++) { + hex.push((bytes[i] >>> 4).toString(16)); + hex.push((bytes[i] & 0xF).toString(16)); + } + return hex.join(''); + }, + + // Convert a hex string to a byte array + hexToBytes: function(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)); + return bytes; + }, + + // Convert a byte array to a base-64 string + bytesToBase64: function(bytes) { + for (var base64 = [], i = 0; i < bytes.length; i += 3) { + var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]; + for (var j = 0; j < 4; j++) + if (i * 8 + j * 6 <= bytes.length * 8) + base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F)); + else + base64.push('='); + } + return base64.join(''); + }, + + // Convert a base-64 string to a byte array + base64ToBytes: function(base64) { + // Remove non-base-64 characters + base64 = base64.replace(/[^A-Z0-9+\/]/ig, ''); + + for (var bytes = [], i = 0, imod4 = 0; i < base64.length; + imod4 = ++i % 4) { + if (imod4 == 0) continue; + bytes.push(((base64map.indexOf(base64.charAt(i - 1)) + & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2)) + | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2))); + } + return bytes; + } + }; + + module.exports = crypt; +})(); + +},{}],8:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -1369,7 +1670,7 @@ function decodeUtf8Char (str) { } } -},{"base64-js":5,"ieee754":6,"is-array":7}],5:[function(require,module,exports){ +},{"base64-js":9,"ieee754":10,"is-array":11}],9:[function(require,module,exports){ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; ;(function (exports) { @@ -1495,7 +1796,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; exports.fromByteArray = uint8ToBase64 }(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) -},{}],6:[function(require,module,exports){ +},{}],10:[function(require,module,exports){ exports.read = function(buffer, offset, isLE, mLen, nBytes) { var e, m, eLen = nBytes * 8 - mLen - 1, @@ -1581,7 +1882,7 @@ exports.write = function(buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128; }; -},{}],7:[function(require,module,exports){ +},{}],11:[function(require,module,exports){ /** * isArray @@ -1616,7 +1917,7 @@ module.exports = isArray || function (val) { return !! val && '[object Array]' == str.call(val); }; -},{}],8:[function(require,module,exports){ +},{}],12:[function(require,module,exports){ (function (Buffer){ /* crc32.js (C) 2014 SheetJS -- http://sheetjs.com */ /* vim: set ts=2: */ @@ -1714,140 +2015,11 @@ CRC32.str = crc32_str; })(typeof exports !== "undefined" && typeof DO_NOT_EXPORT_CRC === 'undefined' ? exports : CRC32); }).call(this,require("buffer").Buffer) -},{"buffer":4}],9:[function(require,module,exports){ -var charenc = { - // UTF-8 encoding - utf8: { - // Convert a string to a byte array - stringToBytes: function(str) { - return charenc.bin.stringToBytes(unescape(encodeURIComponent(str))); - }, - - // Convert a byte array to a string - bytesToString: function(bytes) { - return decodeURIComponent(escape(charenc.bin.bytesToString(bytes))); - } - }, - - // Binary encoding - bin: { - // Convert a string to a byte array - stringToBytes: function(str) { - for (var bytes = [], i = 0; i < str.length; i++) - bytes.push(str.charCodeAt(i) & 0xFF); - return bytes; - }, - - // Convert a byte array to a string - bytesToString: function(bytes) { - for (var str = [], i = 0; i < bytes.length; i++) - str.push(String.fromCharCode(bytes[i])); - return str.join(''); - } - } -}; - -module.exports = charenc; - -},{}],10:[function(require,module,exports){ -(function() { - var base64map - = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', - - crypt = { - // Bit-wise rotation left - rotl: function(n, b) { - return (n << b) | (n >>> (32 - b)); - }, - - // Bit-wise rotation right - rotr: function(n, b) { - return (n << (32 - b)) | (n >>> b); - }, - - // Swap big-endian to little-endian and vice versa - endian: function(n) { - // If number given, swap endian - if (n.constructor == Number) { - return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00; - } - - // Else, assume array and swap all items - for (var i = 0; i < n.length; i++) - n[i] = crypt.endian(n[i]); - return n; - }, - - // Generate an array of any length of random bytes - randomBytes: function(n) { - for (var bytes = []; n > 0; n--) - bytes.push(Math.floor(Math.random() * 256)); - return bytes; - }, - - // Convert a byte array to big-endian 32-bit words - bytesToWords: function(bytes) { - for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8) - words[b >>> 5] |= bytes[i] << (24 - b % 32); - return words; - }, - - // Convert big-endian 32-bit words to a byte array - wordsToBytes: function(words) { - for (var bytes = [], b = 0; b < words.length * 32; b += 8) - bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF); - return bytes; - }, - - // Convert a byte array to a hex string - bytesToHex: function(bytes) { - for (var hex = [], i = 0; i < bytes.length; i++) { - hex.push((bytes[i] >>> 4).toString(16)); - hex.push((bytes[i] & 0xF).toString(16)); - } - return hex.join(''); - }, - - // Convert a hex string to a byte array - hexToBytes: function(hex) { - for (var bytes = [], c = 0; c < hex.length; c += 2) - bytes.push(parseInt(hex.substr(c, 2), 16)); - return bytes; - }, - - // Convert a byte array to a base-64 string - bytesToBase64: function(bytes) { - for (var base64 = [], i = 0; i < bytes.length; i += 3) { - var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]; - for (var j = 0; j < 4; j++) - if (i * 8 + j * 6 <= bytes.length * 8) - base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F)); - else - base64.push('='); - } - return base64.join(''); - }, - - // Convert a base-64 string to a byte array - base64ToBytes: function(base64) { - // Remove non-base-64 characters - base64 = base64.replace(/[^A-Z0-9+\/]/ig, ''); - - for (var bytes = [], i = 0, imod4 = 0; i < base64.length; - imod4 = ++i % 4) { - if (imod4 == 0) continue; - bytes.push(((base64map.indexOf(base64.charAt(i - 1)) - & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2)) - | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2))); - } - return bytes; - } - }; - - module.exports = crypt; -})(); - -},{}],11:[function(require,module,exports){ +},{"buffer":8}],13:[function(require,module,exports){ +arguments[4][6][0].apply(exports,arguments) +},{"dup":6}],14:[function(require,module,exports){ +arguments[4][7][0].apply(exports,arguments) +},{"dup":7}],15:[function(require,module,exports){ (function (Buffer){ (function() { var crypt = require('crypt'), @@ -1933,4 +2105,4 @@ module.exports = charenc; })(); }).call(this,require("buffer").Buffer) -},{"buffer":4,"charenc":9,"crypt":10}]},{},[1]); +},{"buffer":8,"charenc":13,"crypt":14}]},{},[1]); diff --git a/dist/i18next-text.hash.min.js b/dist/i18next-text.hash.min.js index 0c7952d..a6077d1 100644 --- a/dist/i18next-text.hash.min.js +++ b/dist/i18next-text.hash.min.js @@ -1 +1 @@ -!function t(r,e,n){function i(a,u){if(!e[a]){if(!r[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var h=e[a]={exports:{}};r[a][0].call(h.exports,function(t){var e=r[a][1][t];return i(e?e:t)},h,h.exports,t,r,e,n)}return e[a].exports}for(var o="function"==typeof require&&require,a=0;a=r?t:new Array(r-t.length+1).join(e)+t};r.exports=function(t){var r=e.str(t);return n((r>>>0).toString(16),8)}},{"crc-32":8}],3:[function(t,r){r.exports=t("sha1")},{sha1:11}],4:[function(t,r,e){function n(t,r){var e=this;if(!(e instanceof n))return new n(t,r);var i,o=typeof t;if("number"===o)i=+t;else if("string"===o)i=n.byteLength(t,r);else{if("object"!==o||null===t)throw new TypeError("must start with number, buffer, array or string");"Buffer"===t.type&&O(t.data)&&(t=t.data),i=+t.length}if(i>D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");0>i?i=0:i>>>=0,n.TYPED_ARRAY_SUPPORT?e=n._augment(new Uint8Array(i)):(e.length=i,e._isBuffer=!0);var a;if(n.TYPED_ARRAY_SUPPORT&&"number"==typeof t.byteLength)e._set(t);else if(R(t))if(n.isBuffer(t))for(a=0;i>a;a++)e[a]=t.readUInt8(a);else for(a=0;i>a;a++)e[a]=(t[a]%256+256)%256;else if("string"===o)e.write(t,0,r);else if("number"===o&&!n.TYPED_ARRAY_SUPPORT)for(a=0;i>a;a++)e[a]=0;return i>0&&i<=n.poolSize&&(e.parent=N),e}function i(t,r){if(!(this instanceof i))return new i(t,r);var e=new n(t,r);return delete e.parent,e}function o(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;n>a;a++){var u=parseInt(r.substr(2*a,2),16);if(isNaN(u))throw new Error("Invalid hex string");t[e+a]=u}return a}function a(t,r,e,n){var i=x(S(r,t.length-e),t,e,n);return i}function u(t,r,e,n){var i=x(L(r),t,e,n);return i}function s(t,r,e,n){return u(t,r,e,n)}function f(t,r,e,n){var i=x(_(r),t,e,n);return i}function h(t,r,e,n){var i=x(P(r,t.length-e),t,e,n);return i}function c(t,r,e){return Y.fromByteArray(0===r&&e===t.length?t:t.slice(r,e))}function l(t,r,e){var n="",i="";e=Math.min(t.length,e);for(var o=r;e>o;o++)t[o]<=127?(n+=C(i)+String.fromCharCode(t[o]),i=""):i+="%"+t[o].toString(16);return n+C(i)}function p(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;e>i;i++)n+=String.fromCharCode(127&t[i]);return n}function g(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;e>i;i++)n+=String.fromCharCode(t[i]);return n}function d(t,r,e){var n=t.length;(!r||0>r)&&(r=0),(!e||0>e||e>n)&&(e=n);for(var i="",o=r;e>o;o++)i+=m(t[o]);return i}function w(t,r,e){for(var n=t.slice(r,e),i="",o=0;ot)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function E(t,r,e,i,o,a){if(!n.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(r>o||a>r)throw new RangeError("value is out of bounds");if(e+i>t.length)throw new RangeError("index out of range")}function v(t,r,e,n){0>r&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);o>i;i++)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function b(t,r,e,n){0>r&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);o>i;i++)t[e+i]=r>>>8*(n?i:3-i)&255}function A(t,r,e,n,i,o){if(r>i||o>r)throw new RangeError("value is out of bounds");if(e+n>t.length)throw new RangeError("index out of range");if(0>e)throw new RangeError("index out of range")}function I(t,r,e,n,i){return i||A(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),M.write(t,r,e,n,23,4),e+4}function B(t,r,e,n,i){return i||A(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),M.write(t,r,e,n,52,8),e+8}function U(t){if(t=T(t).replace(F,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function T(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function R(t){return O(t)||n.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function m(t){return 16>t?"0"+t.toString(16):t.toString(16)}function S(t,r){r=r||1/0;for(var e,n=t.length,i=null,o=[],a=0;n>a;a++){if(e=t.charCodeAt(a),e>55295&&57344>e){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(56320>e){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=i-55296<<10|e-56320|65536,i=null}else i&&((r-=3)>-1&&o.push(239,191,189),i=null);if(128>e){if((r-=1)<0)break;o.push(e)}else if(2048>e){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(65536>e){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(2097152>e))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function L(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function _(t){return Y.toByteArray(U(t))}function x(t,r,e,n){for(var i=0;n>i&&!(i+e>=r.length||i>=t.length);i++)r[i+e]=t[i];return i}function C(t){try{return decodeURIComponent(t)}catch(r){return String.fromCharCode(65533)}}var Y=t("base64-js"),M=t("ieee754"),O=t("is-array");e.Buffer=n,e.SlowBuffer=i,e.INSPECT_MAX_BYTES=50,n.poolSize=8192;var D=1073741823,N={};n.TYPED_ARRAY_SUPPORT=function(){try{var t=new ArrayBuffer(0),r=new Uint8Array(t);return r.foo=function(){return 42},42===r.foo()&&"function"==typeof r.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(e){return!1}}(),n.isBuffer=function(t){return!(null==t||!t._isBuffer)},n.compare=function(t,r){if(!n.isBuffer(t)||!n.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,i=r.length,o=0,a=Math.min(e,i);a>o&&t[o]===r[o];o++);return o!==a&&(e=t[o],i=r[o]),i>e?-1:e>i?1:0},n.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(t,r){if(!O(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new n(0);if(1===t.length)return t[0];var e;if(void 0===r)for(r=0,e=0;e>>1;break;case"utf8":case"utf-8":e=S(t).length;break;case"base64":e=_(t).length;break;default:e=t.length}return e},n.prototype.length=void 0,n.prototype.parent=void 0,n.prototype.toString=function(t,r,e){var n=!1;if(r>>>=0,e=void 0===e||1/0===e?this.length:e>>>0,t||(t="utf8"),0>r&&(r=0),e>this.length&&(e=this.length),r>=e)return"";for(;;)switch(t){case"hex":return d(this,r,e);case"utf8":case"utf-8":return l(this,r,e);case"ascii":return p(this,r,e);case"binary":return g(this,r,e);case"base64":return c(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}},n.prototype.equals=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===n.compare(this,t)},n.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},n.prototype.compare=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:n.compare(this,t)},n.prototype.indexOf=function(t,r){function e(t,r,e){for(var n=-1,i=0;e+i2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,r);if(n.isBuffer(t))return e(this,t,r);if("number"==typeof t)return n.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,r):e(this,[t],r);throw new TypeError("val must be string, number or Buffer")},n.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},n.prototype.set=function(t,r){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,r)},n.prototype.write=function(t,r,e,n){if(isFinite(r))isFinite(e)||(n=e,e=void 0);else{var i=n;n=r,r=e,e=i}if(r=Number(r)||0,0>e||0>r||r>this.length)throw new RangeError("attempt to write outside buffer bounds");var c=this.length-r;e?(e=Number(e),e>c&&(e=c)):e=c,n=String(n||"utf8").toLowerCase();var l;switch(n){case"hex":l=o(this,t,r,e);break;case"utf8":case"utf-8":l=a(this,t,r,e);break;case"ascii":l=u(this,t,r,e);break;case"binary":l=s(this,t,r,e);break;case"base64":l=f(this,t,r,e);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":l=h(this,t,r,e);break;default:throw new TypeError("Unknown encoding: "+n)}return l},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(t,r){var e=this.length;t=~~t,r=void 0===r?e:~~r,0>t?(t+=e,0>t&&(t=0)):t>e&&(t=e),0>r?(r+=e,0>r&&(r=0)):r>e&&(r=e),t>r&&(r=t);var i;if(n.TYPED_ARRAY_SUPPORT)i=n._augment(this.subarray(t,r));else{var o=r-t;i=new n(o,void 0);for(var a=0;o>a;a++)i[a]=this[a+t]}return i.length&&(i.parent=this.parent||this),i},n.prototype.readUIntLE=function(t,r,e){t>>>=0,r>>>=0,e||y(t,r,this.length);for(var n=this[t],i=1,o=0;++o>>=0,r>>>=0,e||y(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},n.prototype.readUInt8=function(t,r){return r||y(t,1,this.length),this[t]},n.prototype.readUInt16LE=function(t,r){return r||y(t,2,this.length),this[t]|this[t+1]<<8},n.prototype.readUInt16BE=function(t,r){return r||y(t,2,this.length),this[t]<<8|this[t+1]},n.prototype.readUInt32LE=function(t,r){return r||y(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},n.prototype.readUInt32BE=function(t,r){return r||y(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},n.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||y(t,r,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*r)),n},n.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||y(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o},n.prototype.readInt8=function(t,r){return r||y(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,r){r||y(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt16BE=function(t,r){r||y(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt32LE=function(t,r){return r||y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},n.prototype.readInt32BE=function(t,r){return r||y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},n.prototype.readFloatLE=function(t,r){return r||y(t,4,this.length),M.read(this,t,!0,23,4)},n.prototype.readFloatBE=function(t,r){return r||y(t,4,this.length),M.read(this,t,!1,23,4)},n.prototype.readDoubleLE=function(t,r){return r||y(t,8,this.length),M.read(this,t,!0,52,8)},n.prototype.readDoubleBE=function(t,r){return r||y(t,8,this.length),M.read(this,t,!1,52,8)},n.prototype.writeUIntLE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||E(this,t,r,e,Math.pow(2,8*e),0);var i=1,o=0;for(this[r]=255&t;++o>>0&255;return r+e},n.prototype.writeUIntBE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||E(this,t,r,e,Math.pow(2,8*e),0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o>>>0&255;return r+e},n.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,1,255,0),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t,r+1},n.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8):v(this,t,r,!0),r+2},n.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t):v(this,t,r,!1),r+2},n.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t):b(this,t,r,!0),r+4},n.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t):b(this,t,r,!1),r+4},n.prototype.writeIntLE=function(t,r,e,n){t=+t,r>>>=0,n||E(this,t,r,e,Math.pow(2,8*e-1)-1,-Math.pow(2,8*e-1));var i=0,o=1,a=0>t?1:0;for(this[r]=255&t;++i>0)-a&255;return r+e},n.prototype.writeIntBE=function(t,r,e,n){t=+t,r>>>=0,n||E(this,t,r,e,Math.pow(2,8*e-1)-1,-Math.pow(2,8*e-1));var i=e-1,o=1,a=0>t?1:0;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=(t/o>>0)-a&255;return r+e},n.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,1,127,-128),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[r]=t,r+1},n.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8):v(this,t,r,!0),r+2},n.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t):v(this,t,r,!1),r+2},n.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):b(this,t,r,!0),r+4},n.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t):b(this,t,r,!1),r+4},n.prototype.writeFloatLE=function(t,r,e){return I(this,t,r,!0,e)},n.prototype.writeFloatBE=function(t,r,e){return I(this,t,r,!1,e)},n.prototype.writeDoubleLE=function(t,r,e){return B(this,t,r,!0,e)},n.prototype.writeDoubleBE=function(t,r,e){return B(this,t,r,!1,e)},n.prototype.copy=function(t,r,e,i){var o=this;if(e||(e=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&e>i&&(i=e),i===e)return 0;if(0===t.length||0===o.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>e||e>=o.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-ra||!n.TYPED_ARRAY_SUPPORT)for(var u=0;a>u;u++)t[u+r]=this[u+e];else t._set(this.subarray(e,e+a),r);return a},n.prototype.fill=function(t,r,e){if(t||(t=0),r||(r=0),e||(e=this.length),r>e)throw new RangeError("end < start");if(e!==r&&0!==this.length){if(0>r||r>=this.length)throw new RangeError("start out of bounds");if(0>e||e>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=r;e>n;n++)this[n]=t;else{var i=S(t.toString()),o=i.length;for(n=r;e>n;n++)this[n]=i[n%o]}return this}},n.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(n.TYPED_ARRAY_SUPPORT)return new n(this).buffer;for(var t=new Uint8Array(this.length),r=0,e=t.length;e>r;r+=1)t[r]=this[r];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var k=n.prototype;n._augment=function(t){return t.constructor=n,t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=k.get,t.set=k.set,t.write=k.write,t.toString=k.toString,t.toLocaleString=k.toString,t.toJSON=k.toJSON,t.equals=k.equals,t.compare=k.compare,t.indexOf=k.indexOf,t.copy=k.copy,t.slice=k.slice,t.readUIntLE=k.readUIntLE,t.readUIntBE=k.readUIntBE,t.readUInt8=k.readUInt8,t.readUInt16LE=k.readUInt16LE,t.readUInt16BE=k.readUInt16BE,t.readUInt32LE=k.readUInt32LE,t.readUInt32BE=k.readUInt32BE,t.readIntLE=k.readIntLE,t.readIntBE=k.readIntBE,t.readInt8=k.readInt8,t.readInt16LE=k.readInt16LE,t.readInt16BE=k.readInt16BE,t.readInt32LE=k.readInt32LE,t.readInt32BE=k.readInt32BE,t.readFloatLE=k.readFloatLE,t.readFloatBE=k.readFloatBE,t.readDoubleLE=k.readDoubleLE,t.readDoubleBE=k.readDoubleBE,t.writeUInt8=k.writeUInt8,t.writeUIntLE=k.writeUIntLE,t.writeUIntBE=k.writeUIntBE,t.writeUInt16LE=k.writeUInt16LE,t.writeUInt16BE=k.writeUInt16BE,t.writeUInt32LE=k.writeUInt32LE,t.writeUInt32BE=k.writeUInt32BE,t.writeIntLE=k.writeIntLE,t.writeIntBE=k.writeIntBE,t.writeInt8=k.writeInt8,t.writeInt16LE=k.writeInt16LE,t.writeInt16BE=k.writeInt16BE,t.writeInt32LE=k.writeInt32LE,t.writeInt32BE=k.writeInt32BE,t.writeFloatLE=k.writeFloatLE,t.writeFloatBE=k.writeFloatBE,t.writeDoubleLE=k.writeDoubleLE,t.writeDoubleBE=k.writeDoubleBE,t.fill=k.fill,t.inspect=k.inspect,t.toArrayBuffer=k.toArrayBuffer,t};var F=/[^+\/0-9A-z\-]/g},{"base64-js":5,ieee754:6,"is-array":7}],5:[function(t,r,e){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function r(t){var r=t.charCodeAt(0);return r===a||r===c?62:r===u||r===l?63:s>r?-1:s+10>r?r-s+26+26:h+26>r?r-h:f+26>r?r-f+26:void 0}function e(t){function e(t){f[c++]=t}var n,i,a,u,s,f;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.length;s="="===t.charAt(h-2)?2:"="===t.charAt(h-1)?1:0,f=new o(3*t.length/4-s),a=s>0?t.length-4:t.length;var c=0;for(n=0,i=0;a>n;n+=4,i+=3)u=r(t.charAt(n))<<18|r(t.charAt(n+1))<<12|r(t.charAt(n+2))<<6|r(t.charAt(n+3)),e((16711680&u)>>16),e((65280&u)>>8),e(255&u);return 2===s?(u=r(t.charAt(n))<<2|r(t.charAt(n+1))>>4,e(255&u)):1===s&&(u=r(t.charAt(n))<<10|r(t.charAt(n+1))<<4|r(t.charAt(n+2))>>2,e(u>>8&255),e(255&u)),f}function i(t){function r(t){return n.charAt(t)}function e(t){return r(t>>18&63)+r(t>>12&63)+r(t>>6&63)+r(63&t)}var i,o,a,u=t.length%3,s="";for(i=0,a=t.length-u;a>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],s+=e(o);switch(u){case 1:o=t[t.length-1],s+=r(o>>2),s+=r(o<<4&63),s+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],s+=r(o>>10),s+=r(o>>4&63),s+=r(o<<2&63),s+="="}return s}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),u="/".charCodeAt(0),s="0".charCodeAt(0),f="a".charCodeAt(0),h="A".charCodeAt(0),c="-".charCodeAt(0),l="_".charCodeAt(0);t.toByteArray=e,t.fromByteArray=i}("undefined"==typeof e?this.base64js={}:e)},{}],6:[function(t,r,e){e.read=function(t,r,e,n,i){var o,a,u=8*i-n-1,s=(1<>1,h=-7,c=e?i-1:0,l=e?-1:1,p=t[r+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=u;h>0;o=256*o+t[r+c],c+=l,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+t[r+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===s)return a?0/0:1/0*(p?-1:1);a+=Math.pow(2,n),o-=f}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,r,e,n,i,o){var a,u,s,f=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,d=0>r||0===r&&0>1/r?1:0;for(r=Math.abs(r),isNaN(r)||1/0===r?(u=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-a))<1&&(a--,s*=2),r+=a+c>=1?l/s:l*Math.pow(2,1-c),r*s>=2&&(a++,s/=2),a+c>=h?(u=0,a=h):a+c>=1?(u=(r*s-1)*Math.pow(2,i),a+=c):(u=r*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[e+p]=255&u,p+=g,u/=256,i-=8);for(a=a<0;t[e+p]=255&a,p+=g,a/=256,f-=8);t[e+p-g]|=128*d}},{}],7:[function(t,r){var e=Array.isArray,n=Object.prototype.toString;r.exports=e||function(t){return!!t&&"[object Array]"==n.call(t)}},{}],8:[function(t,r,e){(function(t){var r={};!function(r){function e(){for(var t,r=new Array(256),e=0;256!=e;++e)t=e,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,r[e]=t;return"undefined"!=typeof Int32Array?new Int32Array(r):r}function n(r){if(r.length>32768&&s)return o(t(r));for(var e=-1,n=r.length-1,i=0;n>i;)e=u[255&(e^r.charCodeAt(i++))]^e>>>8,e=u[255&(e^r.charCodeAt(i++))]^e>>>8;return i===n&&(e=e>>>8^u[255&(e^r.charCodeAt(i))]),-1^e}function i(t){if(t.length>1e4)return o(t);for(var r=-1,e=0,n=t.length-3;n>e;)r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])];for(;n+3>e;)r=r>>>8^u[255&(r^t[e++])];return-1^r}function o(t){for(var r=-1,e=0,n=t.length-7;n>e;)r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])];for(;n+7>e;)r=r>>>8^u[255&(r^t[e++])];return-1^r}function a(t){for(var r,e,n=-1,i=0,o=t.length;o>i;)r=t.charCodeAt(i++),128>r?n=n>>>8^u[255&(n^r)]:2048>r?(n=n>>>8^u[255&(n^(192|r>>6&31))],n=n>>>8^u[255&(n^(128|63&r))]):r>=55296&&57344>r?(r=(1023&r)+64,e=1023&t.charCodeAt(i++),n=n>>>8^u[255&(n^(240|r>>8&7))],n=n>>>8^u[255&(n^(128|r>>2&63))],n=n>>>8^u[255&(n^(128|e>>6&15|3&r))],n=n>>>8^u[255&(n^(128|63&e))]):(n=n>>>8^u[255&(n^(224|r>>12&15))],n=n>>>8^u[255&(n^(128|r>>6&63))],n=n>>>8^u[255&(n^(128|63&r))]);return-1^n}r.version="0.2.2";var u=e(),s="undefined"!=typeof t;r.table=u,r.bstr=n,r.buf=i,r.str=a}("undefined"!=typeof e&&"undefined"==typeof DO_NOT_EXPORT_CRC?e:r)}).call(this,t("buffer").Buffer)},{buffer:4}],9:[function(t,r){var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],e=0;e>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&e.rotl(t,8)|4278255360&e.rotl(t,24);for(var r=0;r0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],e=0,n=0;e>>5]|=t[e]<<24-n%32;return r},wordsToBytes:function(t){for(var r=[],e=0;e<32*t.length;e+=8)r.push(t[e>>>5]>>>24-e%32&255);return r},bytesToHex:function(t){for(var r=[],e=0;e>>4).toString(16)),r.push((15&t[e]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],e=0;eo;o++)e.push(8*n+6*o<=8*r.length?t.charAt(i>>>6*(3-o)&63):"=");return e.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,i=0;n>>6-2*i);return e}};r.exports=e}()},{}],11:[function(t,r){(function(e){!function(){var n=t("crypt"),i=t("charenc").utf8,o=t("charenc").bin,a=function(t){t.constructor==String?t=i.stringToBytes(t):"undefined"!=typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());var r=n.bytesToWords(t),o=8*t.length,a=[],u=1732584193,s=-271733879,f=-1732584194,h=271733878,c=-1009589776;r[o>>5]|=128<<24-o%32,r[(o+64>>>9<<4)+15]=o;for(var l=0;lE;E++){if(16>E)a[E]=r[l+E];else{var v=a[E-3]^a[E-8]^a[E-14]^a[E-16];a[E]=v<<1|v>>>31}var b=(u<<5|u>>>27)+c+(a[E]>>>0)+(20>E?(s&f|~s&h)+1518500249:40>E?(s^f^h)+1859775393:60>E?(s&f|s&h|f&h)-1894007588:(s^f^h)-899497514);c=h,h=f,f=s<<30|s>>>2,s=u,u=b}u+=p,s+=g,f+=d,h+=w,c+=y}return[u,s,f,h,c]},u=function(t,r){var e=n.wordsToBytes(a(t));return r&&r.asBytes?e:r&&r.asString?o.bytesToString(e):n.bytesToHex(e)};u._blocksize=16,u._digestsize=20,r.exports=u}()}).call(this,t("buffer").Buffer)},{buffer:4,charenc:9,crypt:10}]},{},[1]); \ No newline at end of file +!function t(r,e,n){function i(a,u){if(!e[a]){if(!r[a]){var f="function"==typeof require&&require;if(!u&&f)return f(a,!0);if(o)return o(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var h=e[a]={exports:{}};r[a][0].call(h.exports,function(t){var e=r[a][1][t];return i(e?e:t)},h,h.exports,t,r,e,n)}return e[a].exports}for(var o="function"==typeof require&&require,a=0;a=r?t:new Array(r-t.length+1).join(e)+t};r.exports=function(t){var r=e.str(t);return n((r>>>0).toString(16),8)}},{"crc-32":12}],3:[function(t,r){r.exports=t("MD5")},{MD5:5}],4:[function(t,r){r.exports=t("sha1")},{sha1:15}],5:[function(t,r){(function(e){!function(){var n=t("crypt"),i=t("charenc").utf8,o=t("charenc").bin,a=function(t,r){t.constructor==String?t=r&&"binary"===r.encoding?o.stringToBytes(t):i.stringToBytes(t):"undefined"!=typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());for(var u=n.bytesToWords(t),f=8*t.length,s=1732584193,h=-271733879,c=-1732584194,l=271733878,p=0;p>>24)|4278255360&(u[p]<<24|u[p]>>>8);u[f>>>5]|=128<>>9<<4)+14]=f;for(var g=a._ff,y=a._gg,d=a._hh,w=a._ii,p=0;p>>0,h=h+v>>>0,c=c+b>>>0,l=l+A>>>0}return n.endian([s,h,c,l])};a._ff=function(t,r,e,n,i,o,a){var u=t+(r&e|~r&n)+(i>>>0)+a;return(u<>>32-o)+r},a._gg=function(t,r,e,n,i,o,a){var u=t+(r&n|e&~n)+(i>>>0)+a;return(u<>>32-o)+r},a._hh=function(t,r,e,n,i,o,a){var u=t+(r^e^n)+(i>>>0)+a;return(u<>>32-o)+r},a._ii=function(t,r,e,n,i,o,a){var u=t+(e^(r|~n))+(i>>>0)+a;return(u<>>32-o)+r},a._blocksize=16,a._digestsize=16,r.exports=function(t,r){if("undefined"!=typeof t){var e=n.wordsToBytes(a(t,r));return r&&r.asBytes?e:r&&r.asString?o.bytesToString(e):n.bytesToHex(e)}}}()}).call(this,t("buffer").Buffer)},{buffer:8,charenc:6,crypt:7}],6:[function(t,r){var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],e=0;e>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&e.rotl(t,8)|4278255360&e.rotl(t,24);for(var r=0;r0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],e=0,n=0;e>>5]|=t[e]<<24-n%32;return r},wordsToBytes:function(t){for(var r=[],e=0;e<32*t.length;e+=8)r.push(t[e>>>5]>>>24-e%32&255);return r},bytesToHex:function(t){for(var r=[],e=0;e>>4).toString(16)),r.push((15&t[e]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],e=0;eo;o++)e.push(8*n+6*o<=8*r.length?t.charAt(i>>>6*(3-o)&63):"=");return e.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,i=0;n>>6-2*i);return e}};r.exports=e}()},{}],8:[function(t,r,e){function n(t,r){var e=this;if(!(e instanceof n))return new n(t,r);var i,o=typeof t;if("number"===o)i=+t;else if("string"===o)i=n.byteLength(t,r);else{if("object"!==o||null===t)throw new TypeError("must start with number, buffer, array or string");"Buffer"===t.type&&O(t.data)&&(t=t.data),i=+t.length}if(i>D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");0>i?i=0:i>>>=0,n.TYPED_ARRAY_SUPPORT?e=n._augment(new Uint8Array(i)):(e.length=i,e._isBuffer=!0);var a;if(n.TYPED_ARRAY_SUPPORT&&"number"==typeof t.byteLength)e._set(t);else if(R(t))if(n.isBuffer(t))for(a=0;i>a;a++)e[a]=t.readUInt8(a);else for(a=0;i>a;a++)e[a]=(t[a]%256+256)%256;else if("string"===o)e.write(t,0,r);else if("number"===o&&!n.TYPED_ARRAY_SUPPORT)for(a=0;i>a;a++)e[a]=0;return i>0&&i<=n.poolSize&&(e.parent=k),e}function i(t,r){if(!(this instanceof i))return new i(t,r);var e=new n(t,r);return delete e.parent,e}function o(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;n>a;a++){var u=parseInt(r.substr(2*a,2),16);if(isNaN(u))throw new Error("Invalid hex string");t[e+a]=u}return a}function a(t,r,e,n){var i=x(_(r,t.length-e),t,e,n);return i}function u(t,r,e,n){var i=x(S(r),t,e,n);return i}function f(t,r,e,n){return u(t,r,e,n)}function s(t,r,e,n){var i=x(P(r),t,e,n);return i}function h(t,r,e,n){var i=x(L(r,t.length-e),t,e,n);return i}function c(t,r,e){return M.fromByteArray(0===r&&e===t.length?t:t.slice(r,e))}function l(t,r,e){var n="",i="";e=Math.min(t.length,e);for(var o=r;e>o;o++)t[o]<=127?(n+=C(i)+String.fromCharCode(t[o]),i=""):i+="%"+t[o].toString(16);return n+C(i)}function p(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;e>i;i++)n+=String.fromCharCode(127&t[i]);return n}function g(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;e>i;i++)n+=String.fromCharCode(t[i]);return n}function y(t,r,e){var n=t.length;(!r||0>r)&&(r=0),(!e||0>e||e>n)&&(e=n);for(var i="",o=r;e>o;o++)i+=m(t[o]);return i}function d(t,r,e){for(var n=t.slice(r,e),i="",o=0;ot)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function E(t,r,e,i,o,a){if(!n.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(r>o||a>r)throw new RangeError("value is out of bounds");if(e+i>t.length)throw new RangeError("index out of range")}function v(t,r,e,n){0>r&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);o>i;i++)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function b(t,r,e,n){0>r&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);o>i;i++)t[e+i]=r>>>8*(n?i:3-i)&255}function A(t,r,e,n,i,o){if(r>i||o>r)throw new RangeError("value is out of bounds");if(e+n>t.length)throw new RangeError("index out of range");if(0>e)throw new RangeError("index out of range")}function B(t,r,e,n,i){return i||A(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),Y.write(t,r,e,n,23,4),e+4}function I(t,r,e,n,i){return i||A(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),Y.write(t,r,e,n,52,8),e+8}function T(t){if(t=U(t).replace(F,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function U(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function R(t){return O(t)||n.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function m(t){return 16>t?"0"+t.toString(16):t.toString(16)}function _(t,r){r=r||1/0;for(var e,n=t.length,i=null,o=[],a=0;n>a;a++){if(e=t.charCodeAt(a),e>55295&&57344>e){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(56320>e){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=i-55296<<10|e-56320|65536,i=null}else i&&((r-=3)>-1&&o.push(239,191,189),i=null);if(128>e){if((r-=1)<0)break;o.push(e)}else if(2048>e){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(65536>e){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(2097152>e))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function S(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function P(t){return M.toByteArray(T(t))}function x(t,r,e,n){for(var i=0;n>i&&!(i+e>=r.length||i>=t.length);i++)r[i+e]=t[i];return i}function C(t){try{return decodeURIComponent(t)}catch(r){return String.fromCharCode(65533)}}var M=t("base64-js"),Y=t("ieee754"),O=t("is-array");e.Buffer=n,e.SlowBuffer=i,e.INSPECT_MAX_BYTES=50,n.poolSize=8192;var D=1073741823,k={};n.TYPED_ARRAY_SUPPORT=function(){try{var t=new ArrayBuffer(0),r=new Uint8Array(t);return r.foo=function(){return 42},42===r.foo()&&"function"==typeof r.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(e){return!1}}(),n.isBuffer=function(t){return!(null==t||!t._isBuffer)},n.compare=function(t,r){if(!n.isBuffer(t)||!n.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,i=r.length,o=0,a=Math.min(e,i);a>o&&t[o]===r[o];o++);return o!==a&&(e=t[o],i=r[o]),i>e?-1:e>i?1:0},n.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(t,r){if(!O(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new n(0);if(1===t.length)return t[0];var e;if(void 0===r)for(r=0,e=0;e>>1;break;case"utf8":case"utf-8":e=_(t).length;break;case"base64":e=P(t).length;break;default:e=t.length}return e},n.prototype.length=void 0,n.prototype.parent=void 0,n.prototype.toString=function(t,r,e){var n=!1;if(r>>>=0,e=void 0===e||1/0===e?this.length:e>>>0,t||(t="utf8"),0>r&&(r=0),e>this.length&&(e=this.length),r>=e)return"";for(;;)switch(t){case"hex":return y(this,r,e);case"utf8":case"utf-8":return l(this,r,e);case"ascii":return p(this,r,e);case"binary":return g(this,r,e);case"base64":return c(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}},n.prototype.equals=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===n.compare(this,t)},n.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},n.prototype.compare=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:n.compare(this,t)},n.prototype.indexOf=function(t,r){function e(t,r,e){for(var n=-1,i=0;e+i2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,r);if(n.isBuffer(t))return e(this,t,r);if("number"==typeof t)return n.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,r):e(this,[t],r);throw new TypeError("val must be string, number or Buffer")},n.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},n.prototype.set=function(t,r){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,r)},n.prototype.write=function(t,r,e,n){if(isFinite(r))isFinite(e)||(n=e,e=void 0);else{var i=n;n=r,r=e,e=i}if(r=Number(r)||0,0>e||0>r||r>this.length)throw new RangeError("attempt to write outside buffer bounds");var c=this.length-r;e?(e=Number(e),e>c&&(e=c)):e=c,n=String(n||"utf8").toLowerCase();var l;switch(n){case"hex":l=o(this,t,r,e);break;case"utf8":case"utf-8":l=a(this,t,r,e);break;case"ascii":l=u(this,t,r,e);break;case"binary":l=f(this,t,r,e);break;case"base64":l=s(this,t,r,e);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":l=h(this,t,r,e);break;default:throw new TypeError("Unknown encoding: "+n)}return l},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(t,r){var e=this.length;t=~~t,r=void 0===r?e:~~r,0>t?(t+=e,0>t&&(t=0)):t>e&&(t=e),0>r?(r+=e,0>r&&(r=0)):r>e&&(r=e),t>r&&(r=t);var i;if(n.TYPED_ARRAY_SUPPORT)i=n._augment(this.subarray(t,r));else{var o=r-t;i=new n(o,void 0);for(var a=0;o>a;a++)i[a]=this[a+t]}return i.length&&(i.parent=this.parent||this),i},n.prototype.readUIntLE=function(t,r,e){t>>>=0,r>>>=0,e||w(t,r,this.length);for(var n=this[t],i=1,o=0;++o>>=0,r>>>=0,e||w(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},n.prototype.readUInt8=function(t,r){return r||w(t,1,this.length),this[t]},n.prototype.readUInt16LE=function(t,r){return r||w(t,2,this.length),this[t]|this[t+1]<<8},n.prototype.readUInt16BE=function(t,r){return r||w(t,2,this.length),this[t]<<8|this[t+1]},n.prototype.readUInt32LE=function(t,r){return r||w(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},n.prototype.readUInt32BE=function(t,r){return r||w(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},n.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||w(t,r,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*r)),n},n.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||w(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o},n.prototype.readInt8=function(t,r){return r||w(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,r){r||w(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt16BE=function(t,r){r||w(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt32LE=function(t,r){return r||w(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},n.prototype.readInt32BE=function(t,r){return r||w(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},n.prototype.readFloatLE=function(t,r){return r||w(t,4,this.length),Y.read(this,t,!0,23,4)},n.prototype.readFloatBE=function(t,r){return r||w(t,4,this.length),Y.read(this,t,!1,23,4)},n.prototype.readDoubleLE=function(t,r){return r||w(t,8,this.length),Y.read(this,t,!0,52,8)},n.prototype.readDoubleBE=function(t,r){return r||w(t,8,this.length),Y.read(this,t,!1,52,8)},n.prototype.writeUIntLE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||E(this,t,r,e,Math.pow(2,8*e),0);var i=1,o=0;for(this[r]=255&t;++o>>0&255;return r+e},n.prototype.writeUIntBE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||E(this,t,r,e,Math.pow(2,8*e),0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o>>>0&255;return r+e},n.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,1,255,0),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t,r+1},n.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8):v(this,t,r,!0),r+2},n.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t):v(this,t,r,!1),r+2},n.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t):b(this,t,r,!0),r+4},n.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t):b(this,t,r,!1),r+4},n.prototype.writeIntLE=function(t,r,e,n){t=+t,r>>>=0,n||E(this,t,r,e,Math.pow(2,8*e-1)-1,-Math.pow(2,8*e-1));var i=0,o=1,a=0>t?1:0;for(this[r]=255&t;++i>0)-a&255;return r+e},n.prototype.writeIntBE=function(t,r,e,n){t=+t,r>>>=0,n||E(this,t,r,e,Math.pow(2,8*e-1)-1,-Math.pow(2,8*e-1));var i=e-1,o=1,a=0>t?1:0;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=(t/o>>0)-a&255;return r+e},n.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,1,127,-128),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[r]=t,r+1},n.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8):v(this,t,r,!0),r+2},n.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t):v(this,t,r,!1),r+2},n.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):b(this,t,r,!0),r+4},n.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t):b(this,t,r,!1),r+4},n.prototype.writeFloatLE=function(t,r,e){return B(this,t,r,!0,e)},n.prototype.writeFloatBE=function(t,r,e){return B(this,t,r,!1,e)},n.prototype.writeDoubleLE=function(t,r,e){return I(this,t,r,!0,e)},n.prototype.writeDoubleBE=function(t,r,e){return I(this,t,r,!1,e)},n.prototype.copy=function(t,r,e,i){var o=this;if(e||(e=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&e>i&&(i=e),i===e)return 0;if(0===t.length||0===o.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>e||e>=o.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-ra||!n.TYPED_ARRAY_SUPPORT)for(var u=0;a>u;u++)t[u+r]=this[u+e];else t._set(this.subarray(e,e+a),r);return a},n.prototype.fill=function(t,r,e){if(t||(t=0),r||(r=0),e||(e=this.length),r>e)throw new RangeError("end < start");if(e!==r&&0!==this.length){if(0>r||r>=this.length)throw new RangeError("start out of bounds");if(0>e||e>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=r;e>n;n++)this[n]=t;else{var i=_(t.toString()),o=i.length;for(n=r;e>n;n++)this[n]=i[n%o]}return this}},n.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(n.TYPED_ARRAY_SUPPORT)return new n(this).buffer;for(var t=new Uint8Array(this.length),r=0,e=t.length;e>r;r+=1)t[r]=this[r];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var N=n.prototype;n._augment=function(t){return t.constructor=n,t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=N.get,t.set=N.set,t.write=N.write,t.toString=N.toString,t.toLocaleString=N.toString,t.toJSON=N.toJSON,t.equals=N.equals,t.compare=N.compare,t.indexOf=N.indexOf,t.copy=N.copy,t.slice=N.slice,t.readUIntLE=N.readUIntLE,t.readUIntBE=N.readUIntBE,t.readUInt8=N.readUInt8,t.readUInt16LE=N.readUInt16LE,t.readUInt16BE=N.readUInt16BE,t.readUInt32LE=N.readUInt32LE,t.readUInt32BE=N.readUInt32BE,t.readIntLE=N.readIntLE,t.readIntBE=N.readIntBE,t.readInt8=N.readInt8,t.readInt16LE=N.readInt16LE,t.readInt16BE=N.readInt16BE,t.readInt32LE=N.readInt32LE,t.readInt32BE=N.readInt32BE,t.readFloatLE=N.readFloatLE,t.readFloatBE=N.readFloatBE,t.readDoubleLE=N.readDoubleLE,t.readDoubleBE=N.readDoubleBE,t.writeUInt8=N.writeUInt8,t.writeUIntLE=N.writeUIntLE,t.writeUIntBE=N.writeUIntBE,t.writeUInt16LE=N.writeUInt16LE,t.writeUInt16BE=N.writeUInt16BE,t.writeUInt32LE=N.writeUInt32LE,t.writeUInt32BE=N.writeUInt32BE,t.writeIntLE=N.writeIntLE,t.writeIntBE=N.writeIntBE,t.writeInt8=N.writeInt8,t.writeInt16LE=N.writeInt16LE,t.writeInt16BE=N.writeInt16BE,t.writeInt32LE=N.writeInt32LE,t.writeInt32BE=N.writeInt32BE,t.writeFloatLE=N.writeFloatLE,t.writeFloatBE=N.writeFloatBE,t.writeDoubleLE=N.writeDoubleLE,t.writeDoubleBE=N.writeDoubleBE,t.fill=N.fill,t.inspect=N.inspect,t.toArrayBuffer=N.toArrayBuffer,t};var F=/[^+\/0-9A-z\-]/g},{"base64-js":9,ieee754:10,"is-array":11}],9:[function(t,r,e){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function r(t){var r=t.charCodeAt(0);return r===a||r===c?62:r===u||r===l?63:f>r?-1:f+10>r?r-f+26+26:h+26>r?r-h:s+26>r?r-s+26:void 0}function e(t){function e(t){s[c++]=t}var n,i,a,u,f,s;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.length;f="="===t.charAt(h-2)?2:"="===t.charAt(h-1)?1:0,s=new o(3*t.length/4-f),a=f>0?t.length-4:t.length;var c=0;for(n=0,i=0;a>n;n+=4,i+=3)u=r(t.charAt(n))<<18|r(t.charAt(n+1))<<12|r(t.charAt(n+2))<<6|r(t.charAt(n+3)),e((16711680&u)>>16),e((65280&u)>>8),e(255&u);return 2===f?(u=r(t.charAt(n))<<2|r(t.charAt(n+1))>>4,e(255&u)):1===f&&(u=r(t.charAt(n))<<10|r(t.charAt(n+1))<<4|r(t.charAt(n+2))>>2,e(u>>8&255),e(255&u)),s}function i(t){function r(t){return n.charAt(t)}function e(t){return r(t>>18&63)+r(t>>12&63)+r(t>>6&63)+r(63&t)}var i,o,a,u=t.length%3,f="";for(i=0,a=t.length-u;a>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],f+=e(o);switch(u){case 1:o=t[t.length-1],f+=r(o>>2),f+=r(o<<4&63),f+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],f+=r(o>>10),f+=r(o>>4&63),f+=r(o<<2&63),f+="="}return f}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),u="/".charCodeAt(0),f="0".charCodeAt(0),s="a".charCodeAt(0),h="A".charCodeAt(0),c="-".charCodeAt(0),l="_".charCodeAt(0);t.toByteArray=e,t.fromByteArray=i}("undefined"==typeof e?this.base64js={}:e)},{}],10:[function(t,r,e){e.read=function(t,r,e,n,i){var o,a,u=8*i-n-1,f=(1<>1,h=-7,c=e?i-1:0,l=e?-1:1,p=t[r+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=u;h>0;o=256*o+t[r+c],c+=l,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+t[r+c],c+=l,h-=8);if(0===o)o=1-s;else{if(o===f)return a?0/0:1/0*(p?-1:1);a+=Math.pow(2,n),o-=s}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,r,e,n,i,o){var a,u,f,s=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,y=0>r||0===r&&0>1/r?1:0;for(r=Math.abs(r),isNaN(r)||1/0===r?(u=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),r+=a+c>=1?l/f:l*Math.pow(2,1-c),r*f>=2&&(a++,f/=2),a+c>=h?(u=0,a=h):a+c>=1?(u=(r*f-1)*Math.pow(2,i),a+=c):(u=r*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[e+p]=255&u,p+=g,u/=256,i-=8);for(a=a<0;t[e+p]=255&a,p+=g,a/=256,s-=8);t[e+p-g]|=128*y}},{}],11:[function(t,r){var e=Array.isArray,n=Object.prototype.toString;r.exports=e||function(t){return!!t&&"[object Array]"==n.call(t)}},{}],12:[function(t,r,e){(function(t){var r={};!function(r){function e(){for(var t,r=new Array(256),e=0;256!=e;++e)t=e,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,r[e]=t;return"undefined"!=typeof Int32Array?new Int32Array(r):r}function n(r){if(r.length>32768&&f)return o(t(r));for(var e=-1,n=r.length-1,i=0;n>i;)e=u[255&(e^r.charCodeAt(i++))]^e>>>8,e=u[255&(e^r.charCodeAt(i++))]^e>>>8;return i===n&&(e=e>>>8^u[255&(e^r.charCodeAt(i))]),-1^e}function i(t){if(t.length>1e4)return o(t);for(var r=-1,e=0,n=t.length-3;n>e;)r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])];for(;n+3>e;)r=r>>>8^u[255&(r^t[e++])];return-1^r}function o(t){for(var r=-1,e=0,n=t.length-7;n>e;)r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])];for(;n+7>e;)r=r>>>8^u[255&(r^t[e++])];return-1^r}function a(t){for(var r,e,n=-1,i=0,o=t.length;o>i;)r=t.charCodeAt(i++),128>r?n=n>>>8^u[255&(n^r)]:2048>r?(n=n>>>8^u[255&(n^(192|r>>6&31))],n=n>>>8^u[255&(n^(128|63&r))]):r>=55296&&57344>r?(r=(1023&r)+64,e=1023&t.charCodeAt(i++),n=n>>>8^u[255&(n^(240|r>>8&7))],n=n>>>8^u[255&(n^(128|r>>2&63))],n=n>>>8^u[255&(n^(128|e>>6&15|3&r))],n=n>>>8^u[255&(n^(128|63&e))]):(n=n>>>8^u[255&(n^(224|r>>12&15))],n=n>>>8^u[255&(n^(128|r>>6&63))],n=n>>>8^u[255&(n^(128|63&r))]);return-1^n}r.version="0.2.2";var u=e(),f="undefined"!=typeof t;r.table=u,r.bstr=n,r.buf=i,r.str=a}("undefined"!=typeof e&&"undefined"==typeof DO_NOT_EXPORT_CRC?e:r)}).call(this,t("buffer").Buffer)},{buffer:8}],13:[function(t,r,e){arguments[4][6][0].apply(e,arguments)},{dup:6}],14:[function(t,r,e){arguments[4][7][0].apply(e,arguments)},{dup:7}],15:[function(t,r){(function(e){!function(){var n=t("crypt"),i=t("charenc").utf8,o=t("charenc").bin,a=function(t){t.constructor==String?t=i.stringToBytes(t):"undefined"!=typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());var r=n.bytesToWords(t),o=8*t.length,a=[],u=1732584193,f=-271733879,s=-1732584194,h=271733878,c=-1009589776;r[o>>5]|=128<<24-o%32,r[(o+64>>>9<<4)+15]=o;for(var l=0;lE;E++){if(16>E)a[E]=r[l+E];else{var v=a[E-3]^a[E-8]^a[E-14]^a[E-16];a[E]=v<<1|v>>>31}var b=(u<<5|u>>>27)+c+(a[E]>>>0)+(20>E?(f&s|~f&h)+1518500249:40>E?(f^s^h)+1859775393:60>E?(f&s|f&h|s&h)-1894007588:(f^s^h)-899497514);c=h,h=s,s=f<<30|f>>>2,f=u,u=b}u+=p,f+=g,s+=y,h+=d,c+=w}return[u,f,s,h,c]},u=function(t,r){var e=n.wordsToBytes(a(t));return r&&r.asBytes?e:r&&r.asString?o.bytesToString(e):n.bytesToHex(e)};u._blocksize=16,u._digestsize=20,r.exports=u}()}).call(this,t("buffer").Buffer)},{buffer:8,charenc:13,crypt:14}]},{},[1]); \ No newline at end of file diff --git a/dist/i18next-text.js b/dist/i18next-text.js index d6d93bc..9e50f7a 100644 --- a/dist/i18next-text.js +++ b/dist/i18next-text.js @@ -1,7 +1,7 @@ /** * i18next-text - Using i18next translations without having the `key` as strings, you do not need to worry about i18n key naming. * Cheton Wu - * Version 0.3.1 + * Version 0.4.0 * MIT Licensed */ (function e(t, n, r) { @@ -39,13 +39,15 @@ factory(root.i18nText.hash); } })(this, function(exports) { - exports.sha1 = require("./sha1"); exports.crc32 = require("./crc32"); + exports.md5 = require("./md5"); + exports.sha1 = require("./sha1"); return exports; }); }, { "./crc32": 2, - "./sha1": 3 + "./md5": 3, + "./sha1": 4 } ], 2: [ function(require, module, exports) { var crc32 = require("crc-32"); @@ -60,14 +62,242 @@ return pad((checksum >>> 0).toString(16), 8); }; }, { - "crc-32": 8 + "crc-32": 12 } ], 3: [ function(require, module, exports) { - module.exports = require("sha1"); + module.exports = require("MD5"); }, { - sha1: 11 + MD5: 5 } ], 4: [ function(require, module, exports) { + module.exports = require("sha1"); + }, { + sha1: 15 + } ], + 5: [ function(require, module, exports) { + (function(Buffer) { + (function() { + var crypt = require("crypt"), utf8 = require("charenc").utf8, bin = require("charenc").bin, // The core + md5 = function(message, options) { + // Convert to byte array + if (message.constructor == String) if (options && options.encoding === "binary") message = bin.stringToBytes(message); else message = utf8.stringToBytes(message); else if (typeof Buffer != "undefined" && typeof Buffer.isBuffer == "function" && Buffer.isBuffer(message)) message = Array.prototype.slice.call(message, 0); else if (!Array.isArray(message)) message = message.toString(); + // else, assume byte array already + var m = crypt.bytesToWords(message), l = message.length * 8, a = 1732584193, b = -271733879, c = -1732584194, d = 271733878; + // Swap endian + for (var i = 0; i < m.length; i++) { + m[i] = (m[i] << 8 | m[i] >>> 24) & 16711935 | (m[i] << 24 | m[i] >>> 8) & 4278255360; + } + // Padding + m[l >>> 5] |= 128 << l % 32; + m[(l + 64 >>> 9 << 4) + 14] = l; + // Method shortcuts + var FF = md5._ff, GG = md5._gg, HH = md5._hh, II = md5._ii; + for (var i = 0; i < m.length; i += 16) { + var aa = a, bb = b, cc = c, dd = d; + a = FF(a, b, c, d, m[i + 0], 7, -680876936); + d = FF(d, a, b, c, m[i + 1], 12, -389564586); + c = FF(c, d, a, b, m[i + 2], 17, 606105819); + b = FF(b, c, d, a, m[i + 3], 22, -1044525330); + a = FF(a, b, c, d, m[i + 4], 7, -176418897); + d = FF(d, a, b, c, m[i + 5], 12, 1200080426); + c = FF(c, d, a, b, m[i + 6], 17, -1473231341); + b = FF(b, c, d, a, m[i + 7], 22, -45705983); + a = FF(a, b, c, d, m[i + 8], 7, 1770035416); + d = FF(d, a, b, c, m[i + 9], 12, -1958414417); + c = FF(c, d, a, b, m[i + 10], 17, -42063); + b = FF(b, c, d, a, m[i + 11], 22, -1990404162); + a = FF(a, b, c, d, m[i + 12], 7, 1804603682); + d = FF(d, a, b, c, m[i + 13], 12, -40341101); + c = FF(c, d, a, b, m[i + 14], 17, -1502002290); + b = FF(b, c, d, a, m[i + 15], 22, 1236535329); + a = GG(a, b, c, d, m[i + 1], 5, -165796510); + d = GG(d, a, b, c, m[i + 6], 9, -1069501632); + c = GG(c, d, a, b, m[i + 11], 14, 643717713); + b = GG(b, c, d, a, m[i + 0], 20, -373897302); + a = GG(a, b, c, d, m[i + 5], 5, -701558691); + d = GG(d, a, b, c, m[i + 10], 9, 38016083); + c = GG(c, d, a, b, m[i + 15], 14, -660478335); + b = GG(b, c, d, a, m[i + 4], 20, -405537848); + a = GG(a, b, c, d, m[i + 9], 5, 568446438); + d = GG(d, a, b, c, m[i + 14], 9, -1019803690); + c = GG(c, d, a, b, m[i + 3], 14, -187363961); + b = GG(b, c, d, a, m[i + 8], 20, 1163531501); + a = GG(a, b, c, d, m[i + 13], 5, -1444681467); + d = GG(d, a, b, c, m[i + 2], 9, -51403784); + c = GG(c, d, a, b, m[i + 7], 14, 1735328473); + b = GG(b, c, d, a, m[i + 12], 20, -1926607734); + a = HH(a, b, c, d, m[i + 5], 4, -378558); + d = HH(d, a, b, c, m[i + 8], 11, -2022574463); + c = HH(c, d, a, b, m[i + 11], 16, 1839030562); + b = HH(b, c, d, a, m[i + 14], 23, -35309556); + a = HH(a, b, c, d, m[i + 1], 4, -1530992060); + d = HH(d, a, b, c, m[i + 4], 11, 1272893353); + c = HH(c, d, a, b, m[i + 7], 16, -155497632); + b = HH(b, c, d, a, m[i + 10], 23, -1094730640); + a = HH(a, b, c, d, m[i + 13], 4, 681279174); + d = HH(d, a, b, c, m[i + 0], 11, -358537222); + c = HH(c, d, a, b, m[i + 3], 16, -722521979); + b = HH(b, c, d, a, m[i + 6], 23, 76029189); + a = HH(a, b, c, d, m[i + 9], 4, -640364487); + d = HH(d, a, b, c, m[i + 12], 11, -421815835); + c = HH(c, d, a, b, m[i + 15], 16, 530742520); + b = HH(b, c, d, a, m[i + 2], 23, -995338651); + a = II(a, b, c, d, m[i + 0], 6, -198630844); + d = II(d, a, b, c, m[i + 7], 10, 1126891415); + c = II(c, d, a, b, m[i + 14], 15, -1416354905); + b = II(b, c, d, a, m[i + 5], 21, -57434055); + a = II(a, b, c, d, m[i + 12], 6, 1700485571); + d = II(d, a, b, c, m[i + 3], 10, -1894986606); + c = II(c, d, a, b, m[i + 10], 15, -1051523); + b = II(b, c, d, a, m[i + 1], 21, -2054922799); + a = II(a, b, c, d, m[i + 8], 6, 1873313359); + d = II(d, a, b, c, m[i + 15], 10, -30611744); + c = II(c, d, a, b, m[i + 6], 15, -1560198380); + b = II(b, c, d, a, m[i + 13], 21, 1309151649); + a = II(a, b, c, d, m[i + 4], 6, -145523070); + d = II(d, a, b, c, m[i + 11], 10, -1120210379); + c = II(c, d, a, b, m[i + 2], 15, 718787259); + b = II(b, c, d, a, m[i + 9], 21, -343485551); + a = a + aa >>> 0; + b = b + bb >>> 0; + c = c + cc >>> 0; + d = d + dd >>> 0; + } + return crypt.endian([ a, b, c, d ]); + }; + // Auxiliary functions + md5._ff = function(a, b, c, d, x, s, t) { + var n = a + (b & c | ~b & d) + (x >>> 0) + t; + return (n << s | n >>> 32 - s) + b; + }; + md5._gg = function(a, b, c, d, x, s, t) { + var n = a + (b & d | c & ~d) + (x >>> 0) + t; + return (n << s | n >>> 32 - s) + b; + }; + md5._hh = function(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + (x >>> 0) + t; + return (n << s | n >>> 32 - s) + b; + }; + md5._ii = function(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + (x >>> 0) + t; + return (n << s | n >>> 32 - s) + b; + }; + // Package private blocksize + md5._blocksize = 16; + md5._digestsize = 16; + module.exports = function(message, options) { + if (typeof message == "undefined") return; + var digestbytes = crypt.wordsToBytes(md5(message, options)); + return options && options.asBytes ? digestbytes : options && options.asString ? bin.bytesToString(digestbytes) : crypt.bytesToHex(digestbytes); + }; + })(); + }).call(this, require("buffer").Buffer); + }, { + buffer: 8, + charenc: 6, + crypt: 7 + } ], + 6: [ function(require, module, exports) { + var charenc = { + // UTF-8 encoding + utf8: { + // Convert a string to a byte array + stringToBytes: function(str) { + return charenc.bin.stringToBytes(unescape(encodeURIComponent(str))); + }, + // Convert a byte array to a string + bytesToString: function(bytes) { + return decodeURIComponent(escape(charenc.bin.bytesToString(bytes))); + } + }, + // Binary encoding + bin: { + // Convert a string to a byte array + stringToBytes: function(str) { + for (var bytes = [], i = 0; i < str.length; i++) bytes.push(str.charCodeAt(i) & 255); + return bytes; + }, + // Convert a byte array to a string + bytesToString: function(bytes) { + for (var str = [], i = 0; i < bytes.length; i++) str.push(String.fromCharCode(bytes[i])); + return str.join(""); + } + } + }; + module.exports = charenc; + }, {} ], + 7: [ function(require, module, exports) { + (function() { + var base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", crypt = { + // Bit-wise rotation left + rotl: function(n, b) { + return n << b | n >>> 32 - b; + }, + // Bit-wise rotation right + rotr: function(n, b) { + return n << 32 - b | n >>> b; + }, + // Swap big-endian to little-endian and vice versa + endian: function(n) { + // If number given, swap endian + if (n.constructor == Number) { + return crypt.rotl(n, 8) & 16711935 | crypt.rotl(n, 24) & 4278255360; + } + // Else, assume array and swap all items + for (var i = 0; i < n.length; i++) n[i] = crypt.endian(n[i]); + return n; + }, + // Generate an array of any length of random bytes + randomBytes: function(n) { + for (var bytes = []; n > 0; n--) bytes.push(Math.floor(Math.random() * 256)); + return bytes; + }, + // Convert a byte array to big-endian 32-bit words + bytesToWords: function(bytes) { + for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8) words[b >>> 5] |= bytes[i] << 24 - b % 32; + return words; + }, + // Convert big-endian 32-bit words to a byte array + wordsToBytes: function(words) { + for (var bytes = [], b = 0; b < words.length * 32; b += 8) bytes.push(words[b >>> 5] >>> 24 - b % 32 & 255); + return bytes; + }, + // Convert a byte array to a hex string + bytesToHex: function(bytes) { + for (var hex = [], i = 0; i < bytes.length; i++) { + hex.push((bytes[i] >>> 4).toString(16)); + hex.push((bytes[i] & 15).toString(16)); + } + return hex.join(""); + }, + // Convert a hex string to a byte array + hexToBytes: function(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) bytes.push(parseInt(hex.substr(c, 2), 16)); + return bytes; + }, + // Convert a byte array to a base-64 string + bytesToBase64: function(bytes) { + for (var base64 = [], i = 0; i < bytes.length; i += 3) { + var triplet = bytes[i] << 16 | bytes[i + 1] << 8 | bytes[i + 2]; + for (var j = 0; j < 4; j++) if (i * 8 + j * 6 <= bytes.length * 8) base64.push(base64map.charAt(triplet >>> 6 * (3 - j) & 63)); else base64.push("="); + } + return base64.join(""); + }, + // Convert a base-64 string to a byte array + base64ToBytes: function(base64) { + // Remove non-base-64 characters + base64 = base64.replace(/[^A-Z0-9+\/]/gi, ""); + for (var bytes = [], i = 0, imod4 = 0; i < base64.length; imod4 = ++i % 4) { + if (imod4 == 0) continue; + bytes.push((base64map.indexOf(base64.charAt(i - 1)) & Math.pow(2, -2 * imod4 + 8) - 1) << imod4 * 2 | base64map.indexOf(base64.charAt(i)) >>> 6 - imod4 * 2); + } + return bytes; + } + }; + module.exports = crypt; + })(); + }, {} ], + 8: [ function(require, module, exports) { /*! * The buffer module from node.js, for the browser. * @@ -1205,11 +1435,11 @@ } } }, { - "base64-js": 5, - ieee754: 6, - "is-array": 7 + "base64-js": 9, + ieee754: 10, + "is-array": 11 } ], - 5: [ function(require, module, exports) { + 9: [ function(require, module, exports) { var lookup = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; (function(exports) { "use strict"; @@ -1306,7 +1536,7 @@ exports.fromByteArray = uint8ToBase64; })(typeof exports === "undefined" ? this.base64js = {} : exports); }, {} ], - 6: [ function(require, module, exports) { + 10: [ function(require, module, exports) { exports.read = function(buffer, offset, isLE, mLen, nBytes) { var e, m, eLen = nBytes * 8 - mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1, nBits = -7, i = isLE ? nBytes - 1 : 0, d = isLE ? -1 : 1, s = buffer[offset + i]; i += d; @@ -1367,7 +1597,7 @@ buffer[offset + i - d] |= s * 128; }; }, {} ], - 7: [ function(require, module, exports) { + 11: [ function(require, module, exports) { /** * isArray */ @@ -1396,7 +1626,7 @@ return !!val && "[object Array]" == str.call(val); }; }, {} ], - 8: [ function(require, module, exports) { + 12: [ function(require, module, exports) { (function(Buffer) { /* crc32.js (C) 2014 SheetJS -- http://sheetjs.com */ /* vim: set ts=2: */ @@ -1489,109 +1719,19 @@ })(typeof exports !== "undefined" && typeof DO_NOT_EXPORT_CRC === "undefined" ? exports : CRC32); }).call(this, require("buffer").Buffer); }, { - buffer: 4 + buffer: 8 } ], - 9: [ function(require, module, exports) { - var charenc = { - // UTF-8 encoding - utf8: { - // Convert a string to a byte array - stringToBytes: function(str) { - return charenc.bin.stringToBytes(unescape(encodeURIComponent(str))); - }, - // Convert a byte array to a string - bytesToString: function(bytes) { - return decodeURIComponent(escape(charenc.bin.bytesToString(bytes))); - } - }, - // Binary encoding - bin: { - // Convert a string to a byte array - stringToBytes: function(str) { - for (var bytes = [], i = 0; i < str.length; i++) bytes.push(str.charCodeAt(i) & 255); - return bytes; - }, - // Convert a byte array to a string - bytesToString: function(bytes) { - for (var str = [], i = 0; i < bytes.length; i++) str.push(String.fromCharCode(bytes[i])); - return str.join(""); - } - } - }; - module.exports = charenc; - }, {} ], - 10: [ function(require, module, exports) { - (function() { - var base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", crypt = { - // Bit-wise rotation left - rotl: function(n, b) { - return n << b | n >>> 32 - b; - }, - // Bit-wise rotation right - rotr: function(n, b) { - return n << 32 - b | n >>> b; - }, - // Swap big-endian to little-endian and vice versa - endian: function(n) { - // If number given, swap endian - if (n.constructor == Number) { - return crypt.rotl(n, 8) & 16711935 | crypt.rotl(n, 24) & 4278255360; - } - // Else, assume array and swap all items - for (var i = 0; i < n.length; i++) n[i] = crypt.endian(n[i]); - return n; - }, - // Generate an array of any length of random bytes - randomBytes: function(n) { - for (var bytes = []; n > 0; n--) bytes.push(Math.floor(Math.random() * 256)); - return bytes; - }, - // Convert a byte array to big-endian 32-bit words - bytesToWords: function(bytes) { - for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8) words[b >>> 5] |= bytes[i] << 24 - b % 32; - return words; - }, - // Convert big-endian 32-bit words to a byte array - wordsToBytes: function(words) { - for (var bytes = [], b = 0; b < words.length * 32; b += 8) bytes.push(words[b >>> 5] >>> 24 - b % 32 & 255); - return bytes; - }, - // Convert a byte array to a hex string - bytesToHex: function(bytes) { - for (var hex = [], i = 0; i < bytes.length; i++) { - hex.push((bytes[i] >>> 4).toString(16)); - hex.push((bytes[i] & 15).toString(16)); - } - return hex.join(""); - }, - // Convert a hex string to a byte array - hexToBytes: function(hex) { - for (var bytes = [], c = 0; c < hex.length; c += 2) bytes.push(parseInt(hex.substr(c, 2), 16)); - return bytes; - }, - // Convert a byte array to a base-64 string - bytesToBase64: function(bytes) { - for (var base64 = [], i = 0; i < bytes.length; i += 3) { - var triplet = bytes[i] << 16 | bytes[i + 1] << 8 | bytes[i + 2]; - for (var j = 0; j < 4; j++) if (i * 8 + j * 6 <= bytes.length * 8) base64.push(base64map.charAt(triplet >>> 6 * (3 - j) & 63)); else base64.push("="); - } - return base64.join(""); - }, - // Convert a base-64 string to a byte array - base64ToBytes: function(base64) { - // Remove non-base-64 characters - base64 = base64.replace(/[^A-Z0-9+\/]/gi, ""); - for (var bytes = [], i = 0, imod4 = 0; i < base64.length; imod4 = ++i % 4) { - if (imod4 == 0) continue; - bytes.push((base64map.indexOf(base64.charAt(i - 1)) & Math.pow(2, -2 * imod4 + 8) - 1) << imod4 * 2 | base64map.indexOf(base64.charAt(i)) >>> 6 - imod4 * 2); - } - return bytes; - } - }; - module.exports = crypt; - })(); - }, {} ], - 11: [ function(require, module, exports) { + 13: [ function(require, module, exports) { + arguments[4][6][0].apply(exports, arguments); + }, { + dup: 6 + } ], + 14: [ function(require, module, exports) { + arguments[4][7][0].apply(exports, arguments); + }, { + dup: 7 + } ], + 15: [ function(require, module, exports) { (function(Buffer) { (function() { var crypt = require("crypt"), utf8 = require("charenc").utf8, bin = require("charenc").bin, // The core @@ -1635,9 +1775,9 @@ })(); }).call(this, require("buffer").Buffer); }, { - buffer: 4, - charenc: 9, - crypt: 10 + buffer: 8, + charenc: 13, + crypt: 14 } ] }, {}, [ 1 ]); (function(root, factory) { diff --git a/dist/i18next-text.min.js b/dist/i18next-text.min.js index f7264f5..791ebb6 100644 --- a/dist/i18next-text.min.js +++ b/dist/i18next-text.min.js @@ -1,8 +1,8 @@ /** * i18next-text - Using i18next translations without having the `key` as strings, you do not need to worry about i18n key naming. * Cheton Wu - * Version 0.3.1 + * Version 0.4.0 * MIT Licensed */ -!function t(r,e,n){function i(a,u){if(!e[a]){if(!r[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var h=e[a]={exports:{}};r[a][0].call(h.exports,function(t){var e=r[a][1][t];return i(e?e:t)},h,h.exports,t,r,e,n)}return e[a].exports}for(var o="function"==typeof require&&require,a=0;a=r?t:new Array(r-t.length+1).join(e)+t};r.exports=function(t){var r=e.str(t);return n((r>>>0).toString(16),8)}},{"crc-32":8}],3:[function(t,r){r.exports=t("sha1")},{sha1:11}],4:[function(t,r,e){function n(t,r){var e=this;if(!(e instanceof n))return new n(t,r);var i,o=typeof t;if("number"===o)i=+t;else if("string"===o)i=n.byteLength(t,r);else{if("object"!==o||null===t)throw new TypeError("must start with number, buffer, array or string");"Buffer"===t.type&&O(t.data)&&(t=t.data),i=+t.length}if(i>D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");0>i?i=0:i>>>=0,n.TYPED_ARRAY_SUPPORT?e=n._augment(new Uint8Array(i)):(e.length=i,e._isBuffer=!0);var a;if(n.TYPED_ARRAY_SUPPORT&&"number"==typeof t.byteLength)e._set(t);else if(R(t))if(n.isBuffer(t))for(a=0;i>a;a++)e[a]=t.readUInt8(a);else for(a=0;i>a;a++)e[a]=(t[a]%256+256)%256;else if("string"===o)e.write(t,0,r);else if("number"===o&&!n.TYPED_ARRAY_SUPPORT)for(a=0;i>a;a++)e[a]=0;return i>0&&i<=n.poolSize&&(e.parent=N),e}function i(t,r){if(!(this instanceof i))return new i(t,r);var e=new n(t,r);return delete e.parent,e}function o(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;n>a;a++){var u=parseInt(r.substr(2*a,2),16);if(isNaN(u))throw new Error("Invalid hex string");t[e+a]=u}return a}function a(t,r,e,n){var i=x(S(r,t.length-e),t,e,n);return i}function u(t,r,e,n){var i=x(L(r),t,e,n);return i}function s(t,r,e,n){return u(t,r,e,n)}function f(t,r,e,n){var i=x(_(r),t,e,n);return i}function h(t,r,e,n){var i=x(P(r,t.length-e),t,e,n);return i}function c(t,r,e){return Y.fromByteArray(0===r&&e===t.length?t:t.slice(r,e))}function l(t,r,e){var n="",i="";e=Math.min(t.length,e);for(var o=r;e>o;o++)t[o]<=127?(n+=C(i)+String.fromCharCode(t[o]),i=""):i+="%"+t[o].toString(16);return n+C(i)}function p(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;e>i;i++)n+=String.fromCharCode(127&t[i]);return n}function g(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;e>i;i++)n+=String.fromCharCode(t[i]);return n}function d(t,r,e){var n=t.length;(!r||0>r)&&(r=0),(!e||0>e||e>n)&&(e=n);for(var i="",o=r;e>o;o++)i+=m(t[o]);return i}function w(t,r,e){for(var n=t.slice(r,e),i="",o=0;ot)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function E(t,r,e,i,o,a){if(!n.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(r>o||a>r)throw new RangeError("value is out of bounds");if(e+i>t.length)throw new RangeError("index out of range")}function v(t,r,e,n){0>r&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);o>i;i++)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function b(t,r,e,n){0>r&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);o>i;i++)t[e+i]=r>>>8*(n?i:3-i)&255}function A(t,r,e,n,i,o){if(r>i||o>r)throw new RangeError("value is out of bounds");if(e+n>t.length)throw new RangeError("index out of range");if(0>e)throw new RangeError("index out of range")}function I(t,r,e,n,i){return i||A(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),M.write(t,r,e,n,23,4),e+4}function B(t,r,e,n,i){return i||A(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),M.write(t,r,e,n,52,8),e+8}function U(t){if(t=T(t).replace(F,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function T(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function R(t){return O(t)||n.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function m(t){return 16>t?"0"+t.toString(16):t.toString(16)}function S(t,r){r=r||1/0;for(var e,n=t.length,i=null,o=[],a=0;n>a;a++){if(e=t.charCodeAt(a),e>55295&&57344>e){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(56320>e){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=i-55296<<10|e-56320|65536,i=null}else i&&((r-=3)>-1&&o.push(239,191,189),i=null);if(128>e){if((r-=1)<0)break;o.push(e)}else if(2048>e){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(65536>e){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(2097152>e))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function L(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function _(t){return Y.toByteArray(U(t))}function x(t,r,e,n){for(var i=0;n>i&&!(i+e>=r.length||i>=t.length);i++)r[i+e]=t[i];return i}function C(t){try{return decodeURIComponent(t)}catch(r){return String.fromCharCode(65533)}}var Y=t("base64-js"),M=t("ieee754"),O=t("is-array");e.Buffer=n,e.SlowBuffer=i,e.INSPECT_MAX_BYTES=50,n.poolSize=8192;var D=1073741823,N={};n.TYPED_ARRAY_SUPPORT=function(){try{var t=new ArrayBuffer(0),r=new Uint8Array(t);return r.foo=function(){return 42},42===r.foo()&&"function"==typeof r.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(e){return!1}}(),n.isBuffer=function(t){return!(null==t||!t._isBuffer)},n.compare=function(t,r){if(!n.isBuffer(t)||!n.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,i=r.length,o=0,a=Math.min(e,i);a>o&&t[o]===r[o];o++);return o!==a&&(e=t[o],i=r[o]),i>e?-1:e>i?1:0},n.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(t,r){if(!O(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new n(0);if(1===t.length)return t[0];var e;if(void 0===r)for(r=0,e=0;e>>1;break;case"utf8":case"utf-8":e=S(t).length;break;case"base64":e=_(t).length;break;default:e=t.length}return e},n.prototype.length=void 0,n.prototype.parent=void 0,n.prototype.toString=function(t,r,e){var n=!1;if(r>>>=0,e=void 0===e||1/0===e?this.length:e>>>0,t||(t="utf8"),0>r&&(r=0),e>this.length&&(e=this.length),r>=e)return"";for(;;)switch(t){case"hex":return d(this,r,e);case"utf8":case"utf-8":return l(this,r,e);case"ascii":return p(this,r,e);case"binary":return g(this,r,e);case"base64":return c(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}},n.prototype.equals=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===n.compare(this,t)},n.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},n.prototype.compare=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:n.compare(this,t)},n.prototype.indexOf=function(t,r){function e(t,r,e){for(var n=-1,i=0;e+i2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,r);if(n.isBuffer(t))return e(this,t,r);if("number"==typeof t)return n.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,r):e(this,[t],r);throw new TypeError("val must be string, number or Buffer")},n.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},n.prototype.set=function(t,r){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,r)},n.prototype.write=function(t,r,e,n){if(isFinite(r))isFinite(e)||(n=e,e=void 0);else{var i=n;n=r,r=e,e=i}if(r=Number(r)||0,0>e||0>r||r>this.length)throw new RangeError("attempt to write outside buffer bounds");var c=this.length-r;e?(e=Number(e),e>c&&(e=c)):e=c,n=String(n||"utf8").toLowerCase();var l;switch(n){case"hex":l=o(this,t,r,e);break;case"utf8":case"utf-8":l=a(this,t,r,e);break;case"ascii":l=u(this,t,r,e);break;case"binary":l=s(this,t,r,e);break;case"base64":l=f(this,t,r,e);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":l=h(this,t,r,e);break;default:throw new TypeError("Unknown encoding: "+n)}return l},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(t,r){var e=this.length;t=~~t,r=void 0===r?e:~~r,0>t?(t+=e,0>t&&(t=0)):t>e&&(t=e),0>r?(r+=e,0>r&&(r=0)):r>e&&(r=e),t>r&&(r=t);var i;if(n.TYPED_ARRAY_SUPPORT)i=n._augment(this.subarray(t,r));else{var o=r-t;i=new n(o,void 0);for(var a=0;o>a;a++)i[a]=this[a+t]}return i.length&&(i.parent=this.parent||this),i},n.prototype.readUIntLE=function(t,r,e){t>>>=0,r>>>=0,e||y(t,r,this.length);for(var n=this[t],i=1,o=0;++o>>=0,r>>>=0,e||y(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},n.prototype.readUInt8=function(t,r){return r||y(t,1,this.length),this[t]},n.prototype.readUInt16LE=function(t,r){return r||y(t,2,this.length),this[t]|this[t+1]<<8},n.prototype.readUInt16BE=function(t,r){return r||y(t,2,this.length),this[t]<<8|this[t+1]},n.prototype.readUInt32LE=function(t,r){return r||y(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},n.prototype.readUInt32BE=function(t,r){return r||y(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},n.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||y(t,r,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*r)),n},n.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||y(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o},n.prototype.readInt8=function(t,r){return r||y(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,r){r||y(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt16BE=function(t,r){r||y(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt32LE=function(t,r){return r||y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},n.prototype.readInt32BE=function(t,r){return r||y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},n.prototype.readFloatLE=function(t,r){return r||y(t,4,this.length),M.read(this,t,!0,23,4)},n.prototype.readFloatBE=function(t,r){return r||y(t,4,this.length),M.read(this,t,!1,23,4)},n.prototype.readDoubleLE=function(t,r){return r||y(t,8,this.length),M.read(this,t,!0,52,8)},n.prototype.readDoubleBE=function(t,r){return r||y(t,8,this.length),M.read(this,t,!1,52,8)},n.prototype.writeUIntLE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||E(this,t,r,e,Math.pow(2,8*e),0);var i=1,o=0;for(this[r]=255&t;++o>>0&255;return r+e},n.prototype.writeUIntBE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||E(this,t,r,e,Math.pow(2,8*e),0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o>>>0&255;return r+e},n.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,1,255,0),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t,r+1},n.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8):v(this,t,r,!0),r+2},n.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t):v(this,t,r,!1),r+2},n.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t):b(this,t,r,!0),r+4},n.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t):b(this,t,r,!1),r+4},n.prototype.writeIntLE=function(t,r,e,n){t=+t,r>>>=0,n||E(this,t,r,e,Math.pow(2,8*e-1)-1,-Math.pow(2,8*e-1));var i=0,o=1,a=0>t?1:0;for(this[r]=255&t;++i>0)-a&255;return r+e},n.prototype.writeIntBE=function(t,r,e,n){t=+t,r>>>=0,n||E(this,t,r,e,Math.pow(2,8*e-1)-1,-Math.pow(2,8*e-1));var i=e-1,o=1,a=0>t?1:0;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=(t/o>>0)-a&255;return r+e},n.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,1,127,-128),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[r]=t,r+1},n.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8):v(this,t,r,!0),r+2},n.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t):v(this,t,r,!1),r+2},n.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):b(this,t,r,!0),r+4},n.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t):b(this,t,r,!1),r+4},n.prototype.writeFloatLE=function(t,r,e){return I(this,t,r,!0,e)},n.prototype.writeFloatBE=function(t,r,e){return I(this,t,r,!1,e)},n.prototype.writeDoubleLE=function(t,r,e){return B(this,t,r,!0,e)},n.prototype.writeDoubleBE=function(t,r,e){return B(this,t,r,!1,e)},n.prototype.copy=function(t,r,e,i){var o=this;if(e||(e=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&e>i&&(i=e),i===e)return 0;if(0===t.length||0===o.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>e||e>=o.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-ra||!n.TYPED_ARRAY_SUPPORT)for(var u=0;a>u;u++)t[u+r]=this[u+e];else t._set(this.subarray(e,e+a),r);return a},n.prototype.fill=function(t,r,e){if(t||(t=0),r||(r=0),e||(e=this.length),r>e)throw new RangeError("end < start");if(e!==r&&0!==this.length){if(0>r||r>=this.length)throw new RangeError("start out of bounds");if(0>e||e>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=r;e>n;n++)this[n]=t;else{var i=S(t.toString()),o=i.length;for(n=r;e>n;n++)this[n]=i[n%o]}return this}},n.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(n.TYPED_ARRAY_SUPPORT)return new n(this).buffer;for(var t=new Uint8Array(this.length),r=0,e=t.length;e>r;r+=1)t[r]=this[r];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var k=n.prototype;n._augment=function(t){return t.constructor=n,t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=k.get,t.set=k.set,t.write=k.write,t.toString=k.toString,t.toLocaleString=k.toString,t.toJSON=k.toJSON,t.equals=k.equals,t.compare=k.compare,t.indexOf=k.indexOf,t.copy=k.copy,t.slice=k.slice,t.readUIntLE=k.readUIntLE,t.readUIntBE=k.readUIntBE,t.readUInt8=k.readUInt8,t.readUInt16LE=k.readUInt16LE,t.readUInt16BE=k.readUInt16BE,t.readUInt32LE=k.readUInt32LE,t.readUInt32BE=k.readUInt32BE,t.readIntLE=k.readIntLE,t.readIntBE=k.readIntBE,t.readInt8=k.readInt8,t.readInt16LE=k.readInt16LE,t.readInt16BE=k.readInt16BE,t.readInt32LE=k.readInt32LE,t.readInt32BE=k.readInt32BE,t.readFloatLE=k.readFloatLE,t.readFloatBE=k.readFloatBE,t.readDoubleLE=k.readDoubleLE,t.readDoubleBE=k.readDoubleBE,t.writeUInt8=k.writeUInt8,t.writeUIntLE=k.writeUIntLE,t.writeUIntBE=k.writeUIntBE,t.writeUInt16LE=k.writeUInt16LE,t.writeUInt16BE=k.writeUInt16BE,t.writeUInt32LE=k.writeUInt32LE,t.writeUInt32BE=k.writeUInt32BE,t.writeIntLE=k.writeIntLE,t.writeIntBE=k.writeIntBE,t.writeInt8=k.writeInt8,t.writeInt16LE=k.writeInt16LE,t.writeInt16BE=k.writeInt16BE,t.writeInt32LE=k.writeInt32LE,t.writeInt32BE=k.writeInt32BE,t.writeFloatLE=k.writeFloatLE,t.writeFloatBE=k.writeFloatBE,t.writeDoubleLE=k.writeDoubleLE,t.writeDoubleBE=k.writeDoubleBE,t.fill=k.fill,t.inspect=k.inspect,t.toArrayBuffer=k.toArrayBuffer,t};var F=/[^+\/0-9A-z\-]/g},{"base64-js":5,ieee754:6,"is-array":7}],5:[function(t,r,e){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function r(t){var r=t.charCodeAt(0);return r===a||r===c?62:r===u||r===l?63:s>r?-1:s+10>r?r-s+26+26:h+26>r?r-h:f+26>r?r-f+26:void 0}function e(t){function e(t){f[c++]=t}var n,i,a,u,s,f;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.length;s="="===t.charAt(h-2)?2:"="===t.charAt(h-1)?1:0,f=new o(3*t.length/4-s),a=s>0?t.length-4:t.length;var c=0;for(n=0,i=0;a>n;n+=4,i+=3)u=r(t.charAt(n))<<18|r(t.charAt(n+1))<<12|r(t.charAt(n+2))<<6|r(t.charAt(n+3)),e((16711680&u)>>16),e((65280&u)>>8),e(255&u);return 2===s?(u=r(t.charAt(n))<<2|r(t.charAt(n+1))>>4,e(255&u)):1===s&&(u=r(t.charAt(n))<<10|r(t.charAt(n+1))<<4|r(t.charAt(n+2))>>2,e(u>>8&255),e(255&u)),f}function i(t){function r(t){return n.charAt(t)}function e(t){return r(t>>18&63)+r(t>>12&63)+r(t>>6&63)+r(63&t)}var i,o,a,u=t.length%3,s="";for(i=0,a=t.length-u;a>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],s+=e(o);switch(u){case 1:o=t[t.length-1],s+=r(o>>2),s+=r(o<<4&63),s+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],s+=r(o>>10),s+=r(o>>4&63),s+=r(o<<2&63),s+="="}return s}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),u="/".charCodeAt(0),s="0".charCodeAt(0),f="a".charCodeAt(0),h="A".charCodeAt(0),c="-".charCodeAt(0),l="_".charCodeAt(0);t.toByteArray=e,t.fromByteArray=i}("undefined"==typeof e?this.base64js={}:e)},{}],6:[function(t,r,e){e.read=function(t,r,e,n,i){var o,a,u=8*i-n-1,s=(1<>1,h=-7,c=e?i-1:0,l=e?-1:1,p=t[r+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=u;h>0;o=256*o+t[r+c],c+=l,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+t[r+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===s)return a?0/0:1/0*(p?-1:1);a+=Math.pow(2,n),o-=f}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,r,e,n,i,o){var a,u,s,f=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,d=0>r||0===r&&0>1/r?1:0;for(r=Math.abs(r),isNaN(r)||1/0===r?(u=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-a))<1&&(a--,s*=2),r+=a+c>=1?l/s:l*Math.pow(2,1-c),r*s>=2&&(a++,s/=2),a+c>=h?(u=0,a=h):a+c>=1?(u=(r*s-1)*Math.pow(2,i),a+=c):(u=r*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[e+p]=255&u,p+=g,u/=256,i-=8);for(a=a<0;t[e+p]=255&a,p+=g,a/=256,f-=8);t[e+p-g]|=128*d}},{}],7:[function(t,r){var e=Array.isArray,n=Object.prototype.toString;r.exports=e||function(t){return!!t&&"[object Array]"==n.call(t)}},{}],8:[function(t,r,e){(function(t){var r={};!function(r){function e(){for(var t,r=new Array(256),e=0;256!=e;++e)t=e,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,r[e]=t;return"undefined"!=typeof Int32Array?new Int32Array(r):r}function n(r){if(r.length>32768&&s)return o(t(r));for(var e=-1,n=r.length-1,i=0;n>i;)e=u[255&(e^r.charCodeAt(i++))]^e>>>8,e=u[255&(e^r.charCodeAt(i++))]^e>>>8;return i===n&&(e=e>>>8^u[255&(e^r.charCodeAt(i))]),-1^e}function i(t){if(t.length>1e4)return o(t);for(var r=-1,e=0,n=t.length-3;n>e;)r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])];for(;n+3>e;)r=r>>>8^u[255&(r^t[e++])];return-1^r}function o(t){for(var r=-1,e=0,n=t.length-7;n>e;)r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])];for(;n+7>e;)r=r>>>8^u[255&(r^t[e++])];return-1^r}function a(t){for(var r,e,n=-1,i=0,o=t.length;o>i;)r=t.charCodeAt(i++),128>r?n=n>>>8^u[255&(n^r)]:2048>r?(n=n>>>8^u[255&(n^(192|r>>6&31))],n=n>>>8^u[255&(n^(128|63&r))]):r>=55296&&57344>r?(r=(1023&r)+64,e=1023&t.charCodeAt(i++),n=n>>>8^u[255&(n^(240|r>>8&7))],n=n>>>8^u[255&(n^(128|r>>2&63))],n=n>>>8^u[255&(n^(128|e>>6&15|3&r))],n=n>>>8^u[255&(n^(128|63&e))]):(n=n>>>8^u[255&(n^(224|r>>12&15))],n=n>>>8^u[255&(n^(128|r>>6&63))],n=n>>>8^u[255&(n^(128|63&r))]);return-1^n}r.version="0.2.2";var u=e(),s="undefined"!=typeof t;r.table=u,r.bstr=n,r.buf=i,r.str=a}("undefined"!=typeof e&&"undefined"==typeof DO_NOT_EXPORT_CRC?e:r)}).call(this,t("buffer").Buffer)},{buffer:4}],9:[function(t,r){var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],e=0;e>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&e.rotl(t,8)|4278255360&e.rotl(t,24);for(var r=0;r0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],e=0,n=0;e>>5]|=t[e]<<24-n%32;return r},wordsToBytes:function(t){for(var r=[],e=0;e<32*t.length;e+=8)r.push(t[e>>>5]>>>24-e%32&255);return r},bytesToHex:function(t){for(var r=[],e=0;e>>4).toString(16)),r.push((15&t[e]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],e=0;eo;o++)e.push(8*n+6*o<=8*r.length?t.charAt(i>>>6*(3-o)&63):"=");return e.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,i=0;n>>6-2*i);return e}};r.exports=e}()},{}],11:[function(t,r){(function(e){!function(){var n=t("crypt"),i=t("charenc").utf8,o=t("charenc").bin,a=function(t){t.constructor==String?t=i.stringToBytes(t):"undefined"!=typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());var r=n.bytesToWords(t),o=8*t.length,a=[],u=1732584193,s=-271733879,f=-1732584194,h=271733878,c=-1009589776;r[o>>5]|=128<<24-o%32,r[(o+64>>>9<<4)+15]=o;for(var l=0;lE;E++){if(16>E)a[E]=r[l+E];else{var v=a[E-3]^a[E-8]^a[E-14]^a[E-16];a[E]=v<<1|v>>>31}var b=(u<<5|u>>>27)+c+(a[E]>>>0)+(20>E?(s&f|~s&h)+1518500249:40>E?(s^f^h)+1859775393:60>E?(s&f|s&h|f&h)-1894007588:(s^f^h)-899497514);c=h,h=f,f=s<<30|s>>>2,s=u,u=b}u+=p,s+=g,f+=d,h+=w,c+=y}return[u,s,f,h,c]},u=function(t,r){var e=n.wordsToBytes(a(t));return r&&r.asBytes?e:r&&r.asString?o.bytesToString(e):n.bytesToHex(e)};u._blocksize=16,u._digestsize=20,r.exports=u}()}).call(this,t("buffer").Buffer)},{buffer:4,charenc:9,crypt:10}]},{},[1]); +!function t(r,e,n){function i(a,u){if(!e[a]){if(!r[a]){var f="function"==typeof require&&require;if(!u&&f)return f(a,!0);if(o)return o(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var h=e[a]={exports:{}};r[a][0].call(h.exports,function(t){var e=r[a][1][t];return i(e?e:t)},h,h.exports,t,r,e,n)}return e[a].exports}for(var o="function"==typeof require&&require,a=0;a=r?t:new Array(r-t.length+1).join(e)+t};r.exports=function(t){var r=e.str(t);return n((r>>>0).toString(16),8)}},{"crc-32":12}],3:[function(t,r){r.exports=t("MD5")},{MD5:5}],4:[function(t,r){r.exports=t("sha1")},{sha1:15}],5:[function(t,r){(function(e){!function(){var n=t("crypt"),i=t("charenc").utf8,o=t("charenc").bin,a=function(t,r){t.constructor==String?t=r&&"binary"===r.encoding?o.stringToBytes(t):i.stringToBytes(t):"undefined"!=typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());for(var u=n.bytesToWords(t),f=8*t.length,s=1732584193,h=-271733879,c=-1732584194,l=271733878,p=0;p>>24)|4278255360&(u[p]<<24|u[p]>>>8);u[f>>>5]|=128<>>9<<4)+14]=f;for(var g=a._ff,y=a._gg,d=a._hh,w=a._ii,p=0;p>>0,h=h+v>>>0,c=c+b>>>0,l=l+A>>>0}return n.endian([s,h,c,l])};a._ff=function(t,r,e,n,i,o,a){var u=t+(r&e|~r&n)+(i>>>0)+a;return(u<>>32-o)+r},a._gg=function(t,r,e,n,i,o,a){var u=t+(r&n|e&~n)+(i>>>0)+a;return(u<>>32-o)+r},a._hh=function(t,r,e,n,i,o,a){var u=t+(r^e^n)+(i>>>0)+a;return(u<>>32-o)+r},a._ii=function(t,r,e,n,i,o,a){var u=t+(e^(r|~n))+(i>>>0)+a;return(u<>>32-o)+r},a._blocksize=16,a._digestsize=16,r.exports=function(t,r){if("undefined"!=typeof t){var e=n.wordsToBytes(a(t,r));return r&&r.asBytes?e:r&&r.asString?o.bytesToString(e):n.bytesToHex(e)}}}()}).call(this,t("buffer").Buffer)},{buffer:8,charenc:6,crypt:7}],6:[function(t,r){var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],e=0;e>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&e.rotl(t,8)|4278255360&e.rotl(t,24);for(var r=0;r0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],e=0,n=0;e>>5]|=t[e]<<24-n%32;return r},wordsToBytes:function(t){for(var r=[],e=0;e<32*t.length;e+=8)r.push(t[e>>>5]>>>24-e%32&255);return r},bytesToHex:function(t){for(var r=[],e=0;e>>4).toString(16)),r.push((15&t[e]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],e=0;eo;o++)e.push(8*n+6*o<=8*r.length?t.charAt(i>>>6*(3-o)&63):"=");return e.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,i=0;n>>6-2*i);return e}};r.exports=e}()},{}],8:[function(t,r,e){function n(t,r){var e=this;if(!(e instanceof n))return new n(t,r);var i,o=typeof t;if("number"===o)i=+t;else if("string"===o)i=n.byteLength(t,r);else{if("object"!==o||null===t)throw new TypeError("must start with number, buffer, array or string");"Buffer"===t.type&&O(t.data)&&(t=t.data),i=+t.length}if(i>D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");0>i?i=0:i>>>=0,n.TYPED_ARRAY_SUPPORT?e=n._augment(new Uint8Array(i)):(e.length=i,e._isBuffer=!0);var a;if(n.TYPED_ARRAY_SUPPORT&&"number"==typeof t.byteLength)e._set(t);else if(R(t))if(n.isBuffer(t))for(a=0;i>a;a++)e[a]=t.readUInt8(a);else for(a=0;i>a;a++)e[a]=(t[a]%256+256)%256;else if("string"===o)e.write(t,0,r);else if("number"===o&&!n.TYPED_ARRAY_SUPPORT)for(a=0;i>a;a++)e[a]=0;return i>0&&i<=n.poolSize&&(e.parent=k),e}function i(t,r){if(!(this instanceof i))return new i(t,r);var e=new n(t,r);return delete e.parent,e}function o(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=r.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;n>a;a++){var u=parseInt(r.substr(2*a,2),16);if(isNaN(u))throw new Error("Invalid hex string");t[e+a]=u}return a}function a(t,r,e,n){var i=x(_(r,t.length-e),t,e,n);return i}function u(t,r,e,n){var i=x(S(r),t,e,n);return i}function f(t,r,e,n){return u(t,r,e,n)}function s(t,r,e,n){var i=x(P(r),t,e,n);return i}function h(t,r,e,n){var i=x(L(r,t.length-e),t,e,n);return i}function c(t,r,e){return M.fromByteArray(0===r&&e===t.length?t:t.slice(r,e))}function l(t,r,e){var n="",i="";e=Math.min(t.length,e);for(var o=r;e>o;o++)t[o]<=127?(n+=C(i)+String.fromCharCode(t[o]),i=""):i+="%"+t[o].toString(16);return n+C(i)}function p(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;e>i;i++)n+=String.fromCharCode(127&t[i]);return n}function g(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;e>i;i++)n+=String.fromCharCode(t[i]);return n}function y(t,r,e){var n=t.length;(!r||0>r)&&(r=0),(!e||0>e||e>n)&&(e=n);for(var i="",o=r;e>o;o++)i+=m(t[o]);return i}function d(t,r,e){for(var n=t.slice(r,e),i="",o=0;ot)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function E(t,r,e,i,o,a){if(!n.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(r>o||a>r)throw new RangeError("value is out of bounds");if(e+i>t.length)throw new RangeError("index out of range")}function v(t,r,e,n){0>r&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);o>i;i++)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function b(t,r,e,n){0>r&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);o>i;i++)t[e+i]=r>>>8*(n?i:3-i)&255}function A(t,r,e,n,i,o){if(r>i||o>r)throw new RangeError("value is out of bounds");if(e+n>t.length)throw new RangeError("index out of range");if(0>e)throw new RangeError("index out of range")}function B(t,r,e,n,i){return i||A(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),Y.write(t,r,e,n,23,4),e+4}function I(t,r,e,n,i){return i||A(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),Y.write(t,r,e,n,52,8),e+8}function T(t){if(t=U(t).replace(F,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function U(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function R(t){return O(t)||n.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function m(t){return 16>t?"0"+t.toString(16):t.toString(16)}function _(t,r){r=r||1/0;for(var e,n=t.length,i=null,o=[],a=0;n>a;a++){if(e=t.charCodeAt(a),e>55295&&57344>e){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(56320>e){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=i-55296<<10|e-56320|65536,i=null}else i&&((r-=3)>-1&&o.push(239,191,189),i=null);if(128>e){if((r-=1)<0)break;o.push(e)}else if(2048>e){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(65536>e){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(2097152>e))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function S(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function P(t){return M.toByteArray(T(t))}function x(t,r,e,n){for(var i=0;n>i&&!(i+e>=r.length||i>=t.length);i++)r[i+e]=t[i];return i}function C(t){try{return decodeURIComponent(t)}catch(r){return String.fromCharCode(65533)}}var M=t("base64-js"),Y=t("ieee754"),O=t("is-array");e.Buffer=n,e.SlowBuffer=i,e.INSPECT_MAX_BYTES=50,n.poolSize=8192;var D=1073741823,k={};n.TYPED_ARRAY_SUPPORT=function(){try{var t=new ArrayBuffer(0),r=new Uint8Array(t);return r.foo=function(){return 42},42===r.foo()&&"function"==typeof r.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(e){return!1}}(),n.isBuffer=function(t){return!(null==t||!t._isBuffer)},n.compare=function(t,r){if(!n.isBuffer(t)||!n.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,i=r.length,o=0,a=Math.min(e,i);a>o&&t[o]===r[o];o++);return o!==a&&(e=t[o],i=r[o]),i>e?-1:e>i?1:0},n.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(t,r){if(!O(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new n(0);if(1===t.length)return t[0];var e;if(void 0===r)for(r=0,e=0;e>>1;break;case"utf8":case"utf-8":e=_(t).length;break;case"base64":e=P(t).length;break;default:e=t.length}return e},n.prototype.length=void 0,n.prototype.parent=void 0,n.prototype.toString=function(t,r,e){var n=!1;if(r>>>=0,e=void 0===e||1/0===e?this.length:e>>>0,t||(t="utf8"),0>r&&(r=0),e>this.length&&(e=this.length),r>=e)return"";for(;;)switch(t){case"hex":return y(this,r,e);case"utf8":case"utf-8":return l(this,r,e);case"ascii":return p(this,r,e);case"binary":return g(this,r,e);case"base64":return c(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}},n.prototype.equals=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===n.compare(this,t)},n.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},n.prototype.compare=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:n.compare(this,t)},n.prototype.indexOf=function(t,r){function e(t,r,e){for(var n=-1,i=0;e+i2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,r);if(n.isBuffer(t))return e(this,t,r);if("number"==typeof t)return n.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,r):e(this,[t],r);throw new TypeError("val must be string, number or Buffer")},n.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},n.prototype.set=function(t,r){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,r)},n.prototype.write=function(t,r,e,n){if(isFinite(r))isFinite(e)||(n=e,e=void 0);else{var i=n;n=r,r=e,e=i}if(r=Number(r)||0,0>e||0>r||r>this.length)throw new RangeError("attempt to write outside buffer bounds");var c=this.length-r;e?(e=Number(e),e>c&&(e=c)):e=c,n=String(n||"utf8").toLowerCase();var l;switch(n){case"hex":l=o(this,t,r,e);break;case"utf8":case"utf-8":l=a(this,t,r,e);break;case"ascii":l=u(this,t,r,e);break;case"binary":l=f(this,t,r,e);break;case"base64":l=s(this,t,r,e);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":l=h(this,t,r,e);break;default:throw new TypeError("Unknown encoding: "+n)}return l},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(t,r){var e=this.length;t=~~t,r=void 0===r?e:~~r,0>t?(t+=e,0>t&&(t=0)):t>e&&(t=e),0>r?(r+=e,0>r&&(r=0)):r>e&&(r=e),t>r&&(r=t);var i;if(n.TYPED_ARRAY_SUPPORT)i=n._augment(this.subarray(t,r));else{var o=r-t;i=new n(o,void 0);for(var a=0;o>a;a++)i[a]=this[a+t]}return i.length&&(i.parent=this.parent||this),i},n.prototype.readUIntLE=function(t,r,e){t>>>=0,r>>>=0,e||w(t,r,this.length);for(var n=this[t],i=1,o=0;++o>>=0,r>>>=0,e||w(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},n.prototype.readUInt8=function(t,r){return r||w(t,1,this.length),this[t]},n.prototype.readUInt16LE=function(t,r){return r||w(t,2,this.length),this[t]|this[t+1]<<8},n.prototype.readUInt16BE=function(t,r){return r||w(t,2,this.length),this[t]<<8|this[t+1]},n.prototype.readUInt32LE=function(t,r){return r||w(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},n.prototype.readUInt32BE=function(t,r){return r||w(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},n.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||w(t,r,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*r)),n},n.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||w(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o},n.prototype.readInt8=function(t,r){return r||w(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,r){r||w(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt16BE=function(t,r){r||w(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt32LE=function(t,r){return r||w(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},n.prototype.readInt32BE=function(t,r){return r||w(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},n.prototype.readFloatLE=function(t,r){return r||w(t,4,this.length),Y.read(this,t,!0,23,4)},n.prototype.readFloatBE=function(t,r){return r||w(t,4,this.length),Y.read(this,t,!1,23,4)},n.prototype.readDoubleLE=function(t,r){return r||w(t,8,this.length),Y.read(this,t,!0,52,8)},n.prototype.readDoubleBE=function(t,r){return r||w(t,8,this.length),Y.read(this,t,!1,52,8)},n.prototype.writeUIntLE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||E(this,t,r,e,Math.pow(2,8*e),0);var i=1,o=0;for(this[r]=255&t;++o>>0&255;return r+e},n.prototype.writeUIntBE=function(t,r,e,n){t=+t,r>>>=0,e>>>=0,n||E(this,t,r,e,Math.pow(2,8*e),0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o>>>0&255;return r+e},n.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,1,255,0),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=t,r+1},n.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8):v(this,t,r,!0),r+2},n.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t):v(this,t,r,!1),r+2},n.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t):b(this,t,r,!0),r+4},n.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t):b(this,t,r,!1),r+4},n.prototype.writeIntLE=function(t,r,e,n){t=+t,r>>>=0,n||E(this,t,r,e,Math.pow(2,8*e-1)-1,-Math.pow(2,8*e-1));var i=0,o=1,a=0>t?1:0;for(this[r]=255&t;++i>0)-a&255;return r+e},n.prototype.writeIntBE=function(t,r,e,n){t=+t,r>>>=0,n||E(this,t,r,e,Math.pow(2,8*e-1)-1,-Math.pow(2,8*e-1));var i=e-1,o=1,a=0>t?1:0;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=(t/o>>0)-a&255;return r+e},n.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,1,127,-128),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[r]=t,r+1},n.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8):v(this,t,r,!0),r+2},n.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=t):v(this,t,r,!1),r+2},n.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[r]=t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):b(this,t,r,!0),r+4},n.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||E(this,t,r,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),n.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t):b(this,t,r,!1),r+4},n.prototype.writeFloatLE=function(t,r,e){return B(this,t,r,!0,e)},n.prototype.writeFloatBE=function(t,r,e){return B(this,t,r,!1,e)},n.prototype.writeDoubleLE=function(t,r,e){return I(this,t,r,!0,e)},n.prototype.writeDoubleBE=function(t,r,e){return I(this,t,r,!1,e)},n.prototype.copy=function(t,r,e,i){var o=this;if(e||(e=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&e>i&&(i=e),i===e)return 0;if(0===t.length||0===o.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>e||e>=o.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-ra||!n.TYPED_ARRAY_SUPPORT)for(var u=0;a>u;u++)t[u+r]=this[u+e];else t._set(this.subarray(e,e+a),r);return a},n.prototype.fill=function(t,r,e){if(t||(t=0),r||(r=0),e||(e=this.length),r>e)throw new RangeError("end < start");if(e!==r&&0!==this.length){if(0>r||r>=this.length)throw new RangeError("start out of bounds");if(0>e||e>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=r;e>n;n++)this[n]=t;else{var i=_(t.toString()),o=i.length;for(n=r;e>n;n++)this[n]=i[n%o]}return this}},n.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(n.TYPED_ARRAY_SUPPORT)return new n(this).buffer;for(var t=new Uint8Array(this.length),r=0,e=t.length;e>r;r+=1)t[r]=this[r];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var N=n.prototype;n._augment=function(t){return t.constructor=n,t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=N.get,t.set=N.set,t.write=N.write,t.toString=N.toString,t.toLocaleString=N.toString,t.toJSON=N.toJSON,t.equals=N.equals,t.compare=N.compare,t.indexOf=N.indexOf,t.copy=N.copy,t.slice=N.slice,t.readUIntLE=N.readUIntLE,t.readUIntBE=N.readUIntBE,t.readUInt8=N.readUInt8,t.readUInt16LE=N.readUInt16LE,t.readUInt16BE=N.readUInt16BE,t.readUInt32LE=N.readUInt32LE,t.readUInt32BE=N.readUInt32BE,t.readIntLE=N.readIntLE,t.readIntBE=N.readIntBE,t.readInt8=N.readInt8,t.readInt16LE=N.readInt16LE,t.readInt16BE=N.readInt16BE,t.readInt32LE=N.readInt32LE,t.readInt32BE=N.readInt32BE,t.readFloatLE=N.readFloatLE,t.readFloatBE=N.readFloatBE,t.readDoubleLE=N.readDoubleLE,t.readDoubleBE=N.readDoubleBE,t.writeUInt8=N.writeUInt8,t.writeUIntLE=N.writeUIntLE,t.writeUIntBE=N.writeUIntBE,t.writeUInt16LE=N.writeUInt16LE,t.writeUInt16BE=N.writeUInt16BE,t.writeUInt32LE=N.writeUInt32LE,t.writeUInt32BE=N.writeUInt32BE,t.writeIntLE=N.writeIntLE,t.writeIntBE=N.writeIntBE,t.writeInt8=N.writeInt8,t.writeInt16LE=N.writeInt16LE,t.writeInt16BE=N.writeInt16BE,t.writeInt32LE=N.writeInt32LE,t.writeInt32BE=N.writeInt32BE,t.writeFloatLE=N.writeFloatLE,t.writeFloatBE=N.writeFloatBE,t.writeDoubleLE=N.writeDoubleLE,t.writeDoubleBE=N.writeDoubleBE,t.fill=N.fill,t.inspect=N.inspect,t.toArrayBuffer=N.toArrayBuffer,t};var F=/[^+\/0-9A-z\-]/g},{"base64-js":9,ieee754:10,"is-array":11}],9:[function(t,r,e){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function r(t){var r=t.charCodeAt(0);return r===a||r===c?62:r===u||r===l?63:f>r?-1:f+10>r?r-f+26+26:h+26>r?r-h:s+26>r?r-s+26:void 0}function e(t){function e(t){s[c++]=t}var n,i,a,u,f,s;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.length;f="="===t.charAt(h-2)?2:"="===t.charAt(h-1)?1:0,s=new o(3*t.length/4-f),a=f>0?t.length-4:t.length;var c=0;for(n=0,i=0;a>n;n+=4,i+=3)u=r(t.charAt(n))<<18|r(t.charAt(n+1))<<12|r(t.charAt(n+2))<<6|r(t.charAt(n+3)),e((16711680&u)>>16),e((65280&u)>>8),e(255&u);return 2===f?(u=r(t.charAt(n))<<2|r(t.charAt(n+1))>>4,e(255&u)):1===f&&(u=r(t.charAt(n))<<10|r(t.charAt(n+1))<<4|r(t.charAt(n+2))>>2,e(u>>8&255),e(255&u)),s}function i(t){function r(t){return n.charAt(t)}function e(t){return r(t>>18&63)+r(t>>12&63)+r(t>>6&63)+r(63&t)}var i,o,a,u=t.length%3,f="";for(i=0,a=t.length-u;a>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],f+=e(o);switch(u){case 1:o=t[t.length-1],f+=r(o>>2),f+=r(o<<4&63),f+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],f+=r(o>>10),f+=r(o>>4&63),f+=r(o<<2&63),f+="="}return f}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),u="/".charCodeAt(0),f="0".charCodeAt(0),s="a".charCodeAt(0),h="A".charCodeAt(0),c="-".charCodeAt(0),l="_".charCodeAt(0);t.toByteArray=e,t.fromByteArray=i}("undefined"==typeof e?this.base64js={}:e)},{}],10:[function(t,r,e){e.read=function(t,r,e,n,i){var o,a,u=8*i-n-1,f=(1<>1,h=-7,c=e?i-1:0,l=e?-1:1,p=t[r+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=u;h>0;o=256*o+t[r+c],c+=l,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=n;h>0;a=256*a+t[r+c],c+=l,h-=8);if(0===o)o=1-s;else{if(o===f)return a?0/0:1/0*(p?-1:1);a+=Math.pow(2,n),o-=s}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,r,e,n,i,o){var a,u,f,s=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,y=0>r||0===r&&0>1/r?1:0;for(r=Math.abs(r),isNaN(r)||1/0===r?(u=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-a))<1&&(a--,f*=2),r+=a+c>=1?l/f:l*Math.pow(2,1-c),r*f>=2&&(a++,f/=2),a+c>=h?(u=0,a=h):a+c>=1?(u=(r*f-1)*Math.pow(2,i),a+=c):(u=r*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[e+p]=255&u,p+=g,u/=256,i-=8);for(a=a<0;t[e+p]=255&a,p+=g,a/=256,s-=8);t[e+p-g]|=128*y}},{}],11:[function(t,r){var e=Array.isArray,n=Object.prototype.toString;r.exports=e||function(t){return!!t&&"[object Array]"==n.call(t)}},{}],12:[function(t,r,e){(function(t){var r={};!function(r){function e(){for(var t,r=new Array(256),e=0;256!=e;++e)t=e,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,t=1&t?-306674912^t>>>1:t>>>1,r[e]=t;return"undefined"!=typeof Int32Array?new Int32Array(r):r}function n(r){if(r.length>32768&&f)return o(t(r));for(var e=-1,n=r.length-1,i=0;n>i;)e=u[255&(e^r.charCodeAt(i++))]^e>>>8,e=u[255&(e^r.charCodeAt(i++))]^e>>>8;return i===n&&(e=e>>>8^u[255&(e^r.charCodeAt(i))]),-1^e}function i(t){if(t.length>1e4)return o(t);for(var r=-1,e=0,n=t.length-3;n>e;)r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])];for(;n+3>e;)r=r>>>8^u[255&(r^t[e++])];return-1^r}function o(t){for(var r=-1,e=0,n=t.length-7;n>e;)r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])],r=r>>>8^u[255&(r^t[e++])];for(;n+7>e;)r=r>>>8^u[255&(r^t[e++])];return-1^r}function a(t){for(var r,e,n=-1,i=0,o=t.length;o>i;)r=t.charCodeAt(i++),128>r?n=n>>>8^u[255&(n^r)]:2048>r?(n=n>>>8^u[255&(n^(192|r>>6&31))],n=n>>>8^u[255&(n^(128|63&r))]):r>=55296&&57344>r?(r=(1023&r)+64,e=1023&t.charCodeAt(i++),n=n>>>8^u[255&(n^(240|r>>8&7))],n=n>>>8^u[255&(n^(128|r>>2&63))],n=n>>>8^u[255&(n^(128|e>>6&15|3&r))],n=n>>>8^u[255&(n^(128|63&e))]):(n=n>>>8^u[255&(n^(224|r>>12&15))],n=n>>>8^u[255&(n^(128|r>>6&63))],n=n>>>8^u[255&(n^(128|63&r))]);return-1^n}r.version="0.2.2";var u=e(),f="undefined"!=typeof t;r.table=u,r.bstr=n,r.buf=i,r.str=a}("undefined"!=typeof e&&"undefined"==typeof DO_NOT_EXPORT_CRC?e:r)}).call(this,t("buffer").Buffer)},{buffer:8}],13:[function(t,r,e){arguments[4][6][0].apply(e,arguments)},{dup:6}],14:[function(t,r,e){arguments[4][7][0].apply(e,arguments)},{dup:7}],15:[function(t,r){(function(e){!function(){var n=t("crypt"),i=t("charenc").utf8,o=t("charenc").bin,a=function(t){t.constructor==String?t=i.stringToBytes(t):"undefined"!=typeof e&&"function"==typeof e.isBuffer&&e.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());var r=n.bytesToWords(t),o=8*t.length,a=[],u=1732584193,f=-271733879,s=-1732584194,h=271733878,c=-1009589776;r[o>>5]|=128<<24-o%32,r[(o+64>>>9<<4)+15]=o;for(var l=0;lE;E++){if(16>E)a[E]=r[l+E];else{var v=a[E-3]^a[E-8]^a[E-14]^a[E-16];a[E]=v<<1|v>>>31}var b=(u<<5|u>>>27)+c+(a[E]>>>0)+(20>E?(f&s|~f&h)+1518500249:40>E?(f^s^h)+1859775393:60>E?(f&s|f&h|s&h)-1894007588:(f^s^h)-899497514);c=h,h=s,s=f<<30|f>>>2,f=u,u=b}u+=p,f+=g,s+=y,h+=d,c+=w}return[u,f,s,h,c]},u=function(t,r){var e=n.wordsToBytes(a(t));return r&&r.asBytes?e:r&&r.asString?o.bytesToString(e):n.bytesToHex(e)};u._blocksize=16,u._digestsize=20,r.exports=u}()}).call(this,t("buffer").Buffer)},{buffer:8,charenc:13,crypt:14}]},{},[1]); !function(e,n){"function"==typeof define&&define.amd?define(["exports","i18next"],function(t,i){e.i18nText=e.i18nText||{},n(t=e.i18nText,i)}):"undefined"!=typeof exports?(exports.hash=require("../lib/hash"),n(exports,require("i18next"))):(e.i18nText=e.i18nText||{},n(e.i18nText,e.i18n))}(this,function(e,n){n=n||{},e.hash=e.hash||{};var t=function(e){return e},i=function(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error("i18next-text:",e)},o=function(e){s.debug&&"undefined"!=typeof console&&"function"==typeof console.log&&console.log("i18next-text:",e)},f="sha1",s={debug:!1,hash:e.hash[f]||t};return e.init=function(n){n=n||{},s.hash="function"==typeof n.hash&&n.hash||"string"==typeof n.hash&&e.hash[n.hash]||t,s.debug=!!n.debug},e.key=function(e){return s.hash(e)},e.exists=function(e,t){var f;return"string"!=typeof e?!1:(t=t||{},f=t.defaultKey,"undefined"==typeof f&&(f=s.hash(e),o("hash("+JSON.stringify(e)+")="+JSON.stringify(f))),"function"!=typeof n.exists?(i("i18next library is not loaded"),!1):n.exists(f,t))},e._=e.text=function(e,t){var f,r;if("string"==typeof e)return t=t||{},t.defaultValue=t.defaultValue||e,f=t.defaultKey,"undefined"==typeof f&&(f=s.hash(e),o("hash("+JSON.stringify(e)+")="+JSON.stringify(f))),r=n.t||n.translate,"function"!=typeof r?void i("i18next library is not loaded"):r(f,t)},e}); \ No newline at end of file