mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 19:11:02 +00:00
1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"dependencies":[{"name":"../bn/bn.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":33,"index":33}}],"key":"pRz0ltMTvp81oHyR6ilywDAbGkE=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n exports.u8aToBn = u8aToBn;\n var _bnBnJs = require(_dependencyMap[0], \"../bn/bn.js\");\n /**\n * @name u8aToBn\n * @summary Creates a BN from a Uint8Array object.\n * @description\n * `UInt8Array` input values return the actual BN. `null` or `undefined` values returns an `0x0` value.\n * @param value The value to convert\n * @param options Options to pass while converting\n * @param options.isLe Convert using Little Endian (default)\n * @param options.isNegative Convert using two's complement\n * @example\n * <BR>\n *\n * ```javascript\n * import { u8aToBn } from '@polkadot/util';\n *\n * u8aToHex(new Uint8Array([0x68, 0x65, 0x6c, 0x6c, 0xf])); // 0x68656c0f\n * ```\n */\n function u8aToBn(value) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$isLe = _ref.isLe,\n isLe = _ref$isLe === void 0 ? true : _ref$isLe,\n _ref$isNegative = _ref.isNegative,\n isNegative = _ref$isNegative === void 0 ? false : _ref$isNegative;\n // slice + reverse is expensive, however SCALE is LE by default so this is the path\n // we are most interested in (the BE is added for the sake of being comprehensive)\n if (!isLe) {\n value = value.slice().reverse();\n }\n var count = value.length;\n // shortcut for <= u48 values - in this case the manual conversion\n // here seems to be more efficient than passing the full array\n if (isNegative && count && value[count - 1] & 0x80) {\n // Most common case i{8, 16, 32} default LE SCALE-encoded\n // For <= 32, we also optimize the xor to a single op\n switch (count) {\n case 0:\n return new _bnBnJs.BN(0);\n case 1:\n return new _bnBnJs.BN((value[0] ^ 0x000000ff) * -1 - 1);\n case 2:\n return new _bnBnJs.BN((value[0] + (value[1] << 8) ^ 0x0000ffff) * -1 - 1);\n case 3:\n return new _bnBnJs.BN((value[0] + (value[1] << 8) + (value[2] << 16) ^ 0x00ffffff) * -1 - 1);\n case 4:\n // for the 3rd byte, we don't << 24 - since JS converts all bitwise operators to\n // 32-bit, in the case where the top-most bit is set this yields a negative value\n return new _bnBnJs.BN((value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000 ^ 0xffffffff) * -1 - 1);\n case 5:\n return new _bnBnJs.BN(((value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000 ^ 0xffffffff) + (value[4] ^ 0xff) * 0x100000000) * -1 - 1);\n case 6:\n return new _bnBnJs.BN(((value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000 ^ 0xffffffff) + (value[4] + (value[5] << 8) ^ 0x0000ffff) * 0x100000000) * -1 - 1);\n default:\n return new _bnBnJs.BN(value, 'le').fromTwos(count * 8);\n }\n }\n // Most common case - u{8, 16, 32} default LE SCALE-encoded\n //\n // There are some slight benefits in unrolling this specific loop,\n // however it comes with diminishing returns since here the actual\n // `new BN` does seem to take up the bulk of the time\n switch (count) {\n case 0:\n return new _bnBnJs.BN(0);\n case 1:\n return new _bnBnJs.BN(value[0]);\n case 2:\n return new _bnBnJs.BN(value[0] + (value[1] << 8));\n case 3:\n return new _bnBnJs.BN(value[0] + (value[1] << 8) + (value[2] << 16));\n case 4:\n // for the 3rd byte, we don't << 24 - since JS converts all bitwise operators to\n // 32-bit, in the case where the top-most bit is set this yields a negative value\n return new _bnBnJs.BN(value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1000000);\n case 5:\n return new _bnBnJs.BN(value[0] + (value[1] << 8) + (value[2] << 16) + (value[3] + (value[4] << 8)) * 0x1000000);\n case 6:\n return new _bnBnJs.BN(value[0] + (value[1] << 8) + (value[2] << 16) + (value[3] + (value[4] << 8) + (value[5] << 16)) * 0x1000000);\n default:\n return new _bnBnJs.BN(value, 'le');\n }\n }\n});","lineCount":91,"map":[[7,2,20,0,"exports"],[7,9,20,0],[7,10,20,0,"u8aToBn"],[7,17,20,0],[7,20,20,0,"u8aToBn"],[7,27,20,0],[8,2,1,0],[8,6,1,0,"_bnBnJs"],[8,13,1,0],[8,16,1,0,"require"],[8,23,1,0],[8,24,1,0,"_dependencyMap"],[8,38,1,0],[9,2,2,0],[10,0,3,0],[11,0,4,0],[12,0,5,0],[13,0,6,0],[14,0,7,0],[15,0,8,0],[16,0,9,0],[17,0,10,0],[18,0,11,0],[19,0,12,0],[20,0,13,0],[21,0,14,0],[22,0,15,0],[23,0,16,0],[24,0,17,0],[25,0,18,0],[26,0,19,0],[27,2,20,7],[27,11,20,16,"u8aToBn"],[27,18,20,23,"u8aToBn"],[27,19,20,24,"value"],[27,24,20,29],[27,26,20,73],[28,4,20,73],[28,8,20,73,"_ref"],[28,12,20,73],[28,15,20,73,"arguments"],[28,24,20,73],[28,25,20,73,"length"],[28,31,20,73],[28,39,20,73,"arguments"],[28,48,20,73],[28,56,20,73,"undefined"],[28,65,20,73],[28,68,20,73,"arguments"],[28,77,20,73],[28,83,20,69],[28,84,20,70],[28,85,20,71],[29,6,20,71,"_ref$isLe"],[29,15,20,71],[29,18,20,71,"_ref"],[29,22,20,71],[29,23,20,33,"isLe"],[29,27,20,37],[30,6,20,33,"isLe"],[30,10,20,37],[30,13,20,37,"_ref$isLe"],[30,22,20,37],[30,36,20,40],[30,40,20,44],[30,43,20,44,"_ref$isLe"],[30,52,20,44],[31,6,20,44,"_ref$isNegative"],[31,21,20,44],[31,24,20,44,"_ref"],[31,28,20,44],[31,29,20,46,"isNegative"],[31,39,20,56],[32,6,20,46,"isNegative"],[32,16,20,56],[32,19,20,56,"_ref$isNegative"],[32,34,20,56],[32,48,20,59],[32,53,20,64],[32,56,20,64,"_ref$isNegative"],[32,71,20,64],[33,4,21,4],[34,4,22,4],[35,4,23,4],[35,8,23,8],[35,9,23,9,"isLe"],[35,13,23,13],[35,15,23,15],[36,6,24,8,"value"],[36,11,24,13],[36,14,24,16,"value"],[36,19,24,21],[36,20,24,22,"slice"],[36,25,24,27],[36,26,24,28],[36,27,24,29],[36,28,24,30,"reverse"],[36,35,24,37],[36,36,24,38],[36,37,24,39],[37,4,25,4],[38,4,26,4],[38,8,26,10,"count"],[38,13,26,15],[38,16,26,18,"value"],[38,21,26,23],[38,22,26,24,"length"],[38,28,26,30],[39,4,27,4],[40,4,28,4],[41,4,29,4],[41,8,29,8,"isNegative"],[41,18,29,18],[41,22,29,22,"count"],[41,27,29,27],[41,31,29,32,"value"],[41,36,29,37],[41,37,29,38,"count"],[41,42,29,43],[41,45,29,46],[41,46,29,47],[41,47,29,48],[41,50,29,51],[41,54,29,56],[41,56,29,58],[42,6,30,8],[43,6,31,8],[44,6,32,8],[44,14,32,16,"count"],[44,19,32,21],[45,8,33,12],[45,13,33,17],[45,14,33,18],[46,10,34,16],[46,17,34,23],[46,21,34,27,"BN"],[46,28,34,29],[46,29,34,29,"BN"],[46,31,34,29],[46,32,34,30],[46,33,34,31],[46,34,34,32],[47,8,35,12],[47,13,35,17],[47,14,35,18],[48,10,36,16],[48,17,36,23],[48,21,36,27,"BN"],[48,28,36,29],[48,29,36,29,"BN"],[48,31,36,29],[48,32,36,31],[48,33,36,32,"value"],[48,38,36,37],[48,39,36,38],[48,40,36,39],[48,41,36,40],[48,44,36,43],[48,54,36,54],[48,58,36,58],[48,59,36,59],[48,60,36,60],[48,63,36,64],[48,64,36,65],[48,65,36,66],[49,8,37,12],[49,13,37,17],[49,14,37,18],[50,10,38,16],[50,17,38,23],[50,21,38,27,"BN"],[50,28,38,29],[50,29,38,29,"BN"],[50,31,38,29],[50,32,38,31],[50,33,38,33,"value"],[50,38,38,38],[50,39,38,39],[50,40,38,40],[50,41,38,41],[50,45,38,45,"value"],[50,50,38,50],[50,51,38,51],[50,52,38,52],[50,53,38,53],[50,57,38,57],[50,58,38,58],[50,59,38,59],[50,62,38,63],[50,72,38,74],[50,76,38,78],[50,77,38,79],[50,78,38,80],[50,81,38,84],[50,82,38,85],[50,83,38,86],[51,8,39,12],[51,13,39,17],[51,14,39,18],[52,10,40,16],[52,17,40,23],[52,21,40,27,"BN"],[52,28,40,29],[52,29,40,29,"BN"],[52,31,40,29],[52,32,40,31],[52,33,40,33,"value"],[52,38,40,38],[52,39,40,39],[52,40,40,40],[52,41,40,41],[52,45,40,45,"value"],[52,50,40,50],[52,51,40,51],[52,52,40,52],[52,53,40,53],[52,57,40,57],[52,58,40,58],[52,59,40,59],[52,63,40,63,"value"],[52,68,40,68],[52,69,40,69],[52,70,40,70],[52,71,40,71],[52,75,40,75],[52,77,40,77],[52,78,40,78],[52,81,40,82],[52,91,40,93],[52,95,40,97],[52,96,40,98],[52,97,40,99],[52,100,40,103],[52,101,40,104],[52,102,40,105],[53,8,41,12],[53,13,41,17],[53,14,41,18],[54,10,42,16],[55,10,43,16],[56,10,44,16],[56,17,44,23],[56,21,44,27,"BN"],[56,28,44,29],[56,29,44,29,"BN"],[56,31,44,29],[56,32,44,31],[56,33,44,33,"value"],[56,38,44,38],[56,39,44,39],[56,40,44,40],[56,41,44,41],[56,45,44,45,"value"],[56,50,44,50],[56,51,44,51],[56,52,44,52],[56,53,44,53],[56,57,44,57],[56,58,44,58],[56,59,44,59],[56,63,44,63,"value"],[56,68,44,68],[56,69,44,69],[56,70,44,70],[56,71,44,71],[56,75,44,75],[56,77,44,77],[56,78,44,78],[56,81,44,82,"value"],[56,86,44,87],[56,87,44,88],[56,88,44,89],[56,89,44,90],[56,92,44,93],[56,101,44,106],[56,104,44,110],[56,114,44,121],[56,118,44,125],[56,119,44,126],[56,120,44,127],[56,123,44,131],[56,124,44,132],[56,125,44,133],[57,8,45,12],[57,13,45,17],[57,14,45,18],[58,10,46,16],[58,17,46,23],[58,21,46,27,"BN"],[58,28,46,29],[58,29,46,29,"BN"],[58,31,46,29],[58,32,46,31],[58,33,46,32],[58,34,46,34,"value"],[58,39,46,39],[58,40,46,40],[58,41,46,41],[58,42,46,42],[58,46,46,46,"value"],[58,51,46,51],[58,52,46,52],[58,53,46,53],[58,54,46,54],[58,58,46,58],[58,59,46,59],[58,60,46,60],[58,64,46,64,"value"],[58,69,46,69],[58,70,46,70],[58,71,46,71],[58,72,46,72],[58,76,46,76],[58,78,46,78],[58,79,46,79],[58,82,46,83,"value"],[58,87,46,88],[58,88,46,89],[58,89,46,90],[58,90,46,91],[58,93,46,94],[58,102,46,107],[58,105,46,111],[58,115,46,122],[58,119,46,127],[58,120,46,128,"value"],[58,125,46,133],[58,126,46,134],[58,127,46,135],[58,128,46,136],[58,131,46,139],[58,135,46,143],[58,139,46,147],[58,150,46,163],[58,154,46,167],[58,155,46,168],[58,156,46,169],[58,159,46,173],[58,160,46,174],[58,161,46,175],[59,8,47,12],[59,13,47,17],[59,14,47,18],[60,10,48,16],[60,17,48,23],[60,21,48,27,"BN"],[60,28,48,29],[60,29,48,29,"BN"],[60,31,48,29],[60,32,48,31],[60,33,48,32],[60,34,48,34,"value"],[60,39,48,39],[60,40,48,40],[60,41,48,41],[60,42,48,42],[60,46,48,46,"value"],[60,51,48,51],[60,52,48,52],[60,53,48,53],[60,54,48,54],[60,58,48,58],[60,59,48,59],[60,60,48,60],[60,64,48,64,"value"],[60,69,48,69],[60,70,48,70],[60,71,48,71],[60,72,48,72],[60,76,48,76],[60,78,48,78],[60,79,48,79],[60,82,48,83,"value"],[60,87,48,88],[60,88,48,89],[60,89,48,90],[60,90,48,91],[60,93,48,94],[60,102,48,107],[60,105,48,111],[60,115,48,122],[60,119,48,127],[60,120,48,129,"value"],[60,125,48,134],[60,126,48,135],[60,127,48,136],[60,128,48,137],[60,132,48,141,"value"],[60,137,48,146],[60,138,48,147],[60,139,48,148],[60,140,48,149],[60,144,48,153],[60,145,48,154],[60,146,48,155],[60,149,48,159],[60,159,48,170],[60,163,48,174],[60,174,48,190],[60,178,48,194],[60,179,48,195],[60,180,48,196],[60,183,48,200],[60,184,48,201],[60,185,48,202],[61,8,49,12],[62,10,50,16],[62,17,50,23],[62,21,50,27,"BN"],[62,28,50,29],[62,29,50,29,"BN"],[62,31,50,29],[62,32,50,30,"value"],[62,37,50,35],[62,39,50,37],[62,43,50,41],[62,44,50,42],[62,45,50,43,"fromTwos"],[62,53,50,51],[62,54,50,52,"count"],[62,59,50,57],[62,62,50,60],[62,63,50,61],[62,64,50,62],[63,6,51,8],[64,4,52,4],[65,4,53,4],[66,4,54,4],[67,4,55,4],[68,4,56,4],[69,4,57,4],[70,4,58,4],[70,12,58,12,"count"],[70,17,58,17],[71,6,59,8],[71,11,59,13],[71,12,59,14],[72,8,60,12],[72,15,60,19],[72,19,60,23,"BN"],[72,26,60,25],[72,27,60,25,"BN"],[72,29,60,25],[72,30,60,26],[72,31,60,27],[72,32,60,28],[73,6,61,8],[73,11,61,13],[73,12,61,14],[74,8,62,12],[74,15,62,19],[74,19,62,23,"BN"],[74,26,62,25],[74,27,62,25,"BN"],[74,29,62,25],[74,30,62,26,"value"],[74,35,62,31],[74,36,62,32],[74,37,62,33],[74,38,62,34],[74,39,62,35],[75,6,63,8],[75,11,63,13],[75,12,63,14],[76,8,64,12],[76,15,64,19],[76,19,64,23,"BN"],[76,26,64,25],[76,27,64,25,"BN"],[76,29,64,25],[76,30,64,26,"value"],[76,35,64,31],[76,36,64,32],[76,37,64,33],[76,38,64,34],[76,42,64,38,"value"],[76,47,64,43],[76,48,64,44],[76,49,64,45],[76,50,64,46],[76,54,64,50],[76,55,64,51],[76,56,64,52],[76,57,64,53],[77,6,65,8],[77,11,65,13],[77,12,65,14],[78,8,66,12],[78,15,66,19],[78,19,66,23,"BN"],[78,26,66,25],[78,27,66,25,"BN"],[78,29,66,25],[78,30,66,26,"value"],[78,35,66,31],[78,36,66,32],[78,37,66,33],[78,38,66,34],[78,42,66,38,"value"],[78,47,66,43],[78,48,66,44],[78,49,66,45],[78,50,66,46],[78,54,66,50],[78,55,66,51],[78,56,66,52],[78,60,66,56,"value"],[78,65,66,61],[78,66,66,62],[78,67,66,63],[78,68,66,64],[78,72,66,68],[78,74,66,70],[78,75,66,71],[78,76,66,72],[79,6,67,8],[79,11,67,13],[79,12,67,14],[80,8,68,12],[81,8,69,12],[82,8,70,12],[82,15,70,19],[82,19,70,23,"BN"],[82,26,70,25],[82,27,70,25,"BN"],[82,29,70,25],[82,30,70,26,"value"],[82,35,70,31],[82,36,70,32],[82,37,70,33],[82,38,70,34],[82,42,70,38,"value"],[82,47,70,43],[82,48,70,44],[82,49,70,45],[82,50,70,46],[82,54,70,50],[82,55,70,51],[82,56,70,52],[82,60,70,56,"value"],[82,65,70,61],[82,66,70,62],[82,67,70,63],[82,68,70,64],[82,72,70,68],[82,74,70,70],[82,75,70,71],[82,78,70,75,"value"],[82,83,70,80],[82,84,70,81],[82,85,70,82],[82,86,70,83],[82,89,70,86],[82,98,70,99],[82,99,70,100],[83,6,71,8],[83,11,71,13],[83,12,71,14],[84,8,72,12],[84,15,72,19],[84,19,72,23,"BN"],[84,26,72,25],[84,27,72,25,"BN"],[84,29,72,25],[84,30,72,26,"value"],[84,35,72,31],[84,36,72,32],[84,37,72,33],[84,38,72,34],[84,42,72,38,"value"],[84,47,72,43],[84,48,72,44],[84,49,72,45],[84,50,72,46],[84,54,72,50],[84,55,72,51],[84,56,72,52],[84,60,72,56,"value"],[84,65,72,61],[84,66,72,62],[84,67,72,63],[84,68,72,64],[84,72,72,68],[84,74,72,70],[84,75,72,71],[84,78,72,75],[84,79,72,76,"value"],[84,84,72,81],[84,85,72,82],[84,86,72,83],[84,87,72,84],[84,91,72,88,"value"],[84,96,72,93],[84,97,72,94],[84,98,72,95],[84,99,72,96],[84,103,72,100],[84,104,72,101],[84,105,72,102],[84,109,72,106],[84,118,72,119],[84,119,72,120],[85,6,73,8],[85,11,73,13],[85,12,73,14],[86,8,74,12],[86,15,74,19],[86,19,74,23,"BN"],[86,26,74,25],[86,27,74,25,"BN"],[86,29,74,25],[86,30,74,26,"value"],[86,35,74,31],[86,36,74,32],[86,37,74,33],[86,38,74,34],[86,42,74,38,"value"],[86,47,74,43],[86,48,74,44],[86,49,74,45],[86,50,74,46],[86,54,74,50],[86,55,74,51],[86,56,74,52],[86,60,74,56,"value"],[86,65,74,61],[86,66,74,62],[86,67,74,63],[86,68,74,64],[86,72,74,68],[86,74,74,70],[86,75,74,71],[86,78,74,75],[86,79,74,76,"value"],[86,84,74,81],[86,85,74,82],[86,86,74,83],[86,87,74,84],[86,91,74,88,"value"],[86,96,74,93],[86,97,74,94],[86,98,74,95],[86,99,74,96],[86,103,74,100],[86,104,74,101],[86,105,74,102],[86,109,74,106,"value"],[86,114,74,111],[86,115,74,112],[86,116,74,113],[86,117,74,114],[86,121,74,118],[86,123,74,120],[86,124,74,121],[86,128,74,125],[86,137,74,138],[86,138,74,139],[87,6,75,8],[88,8,76,12],[88,15,76,19],[88,19,76,23,"BN"],[88,26,76,25],[88,27,76,25,"BN"],[88,29,76,25],[88,30,76,26,"value"],[88,35,76,31],[88,37,76,33],[88,41,76,37],[88,42,76,38],[89,4,77,4],[90,2,78,0],[91,0,78,1],[91,3]],"functionMap":{"names":["<global>","u8aToBn"],"mappings":"AAA;OCmB;CD0D"},"hasCjsExports":false},"type":"js/module"}]} |