mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 15:41:01 +00:00
1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"dependencies":[{"name":"../bn/bn.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":16,"index":120},"end":{"line":4,"column":38,"index":142}}],"key":"94jLUD3K1mDUvWzcKqzUyJN5xw0=","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 bn_js_1 = 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 bn_js_1.BN(0);\n case 1:\n return new bn_js_1.BN((value[0] ^ 0x0000_00ff) * -1 - 1);\n case 2:\n return new bn_js_1.BN((value[0] + (value[1] << 8) ^ 0x0000_ffff) * -1 - 1);\n case 3:\n return new bn_js_1.BN((value[0] + (value[1] << 8) + (value[2] << 16) ^ 0x00ff_ffff) * -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 bn_js_1.BN((value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1_00_00_00 ^ 0xffff_ffff) * -1 - 1);\n case 5:\n return new bn_js_1.BN(((value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1_00_00_00 ^ 0xffff_ffff) + (value[4] ^ 0xff) * 0x1_00_00_00_00) * -1 - 1);\n case 6:\n return new bn_js_1.BN(((value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1_00_00_00 ^ 0xffff_ffff) + (value[4] + (value[5] << 8) ^ 0x0000_ffff) * 0x1_00_00_00_00) * -1 - 1);\n default:\n return new bn_js_1.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 bn_js_1.BN(0);\n case 1:\n return new bn_js_1.BN(value[0]);\n case 2:\n return new bn_js_1.BN(value[0] + (value[1] << 8));\n case 3:\n return new bn_js_1.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 bn_js_1.BN(value[0] + (value[1] << 8) + (value[2] << 16) + value[3] * 0x1_00_00_00);\n case 5:\n return new bn_js_1.BN(value[0] + (value[1] << 8) + (value[2] << 16) + (value[3] + (value[4] << 8)) * 0x1_00_00_00);\n case 6:\n return new bn_js_1.BN(value[0] + (value[1] << 8) + (value[2] << 16) + (value[3] + (value[4] << 8) + (value[5] << 16)) * 0x1_00_00_00);\n default:\n return new bn_js_1.BN(value, 'le');\n }\n }\n});","lineCount":91,"map":[[2,2,1,0],[2,14,1,12],[4,2,2,0,"Object"],[4,8,2,6],[4,9,2,7,"defineProperty"],[4,23,2,21],[4,24,2,22,"exports"],[4,31,2,29],[4,33,2,31],[4,45,2,43],[4,47,2,45],[5,4,2,47,"value"],[5,9,2,52],[5,11,2,54],[6,2,2,59],[6,3,2,60],[6,4,2,61],[7,2,3,0,"exports"],[7,9,3,7],[7,10,3,8,"u8aToBn"],[7,17,3,15],[7,20,3,18,"u8aToBn"],[7,27,3,25],[8,2,4,0],[8,6,4,6,"bn_js_1"],[8,13,4,13],[8,16,4,16,"require"],[8,23,4,23],[8,24,4,23,"_dependencyMap"],[8,38,4,23],[8,56,4,37],[8,57,4,38],[9,2,5,0],[10,0,6,0],[11,0,7,0],[12,0,8,0],[13,0,9,0],[14,0,10,0],[15,0,11,0],[16,0,12,0],[17,0,13,0],[18,0,14,0],[19,0,15,0],[20,0,16,0],[21,0,17,0],[22,0,18,0],[23,0,19,0],[24,0,20,0],[25,0,21,0],[26,0,22,0],[27,2,23,0],[27,11,23,9,"u8aToBn"],[27,18,23,16,"u8aToBn"],[27,19,23,17,"value"],[27,24,23,22],[27,26,23,66],[28,4,23,66],[28,8,23,66,"_ref"],[28,12,23,66],[28,15,23,66,"arguments"],[28,24,23,66],[28,25,23,66,"length"],[28,31,23,66],[28,39,23,66,"arguments"],[28,48,23,66],[28,56,23,66,"undefined"],[28,65,23,66],[28,68,23,66,"arguments"],[28,77,23,66],[28,83,23,62],[28,84,23,63],[28,85,23,64],[29,6,23,64,"_ref$isLe"],[29,15,23,64],[29,18,23,64,"_ref"],[29,22,23,64],[29,23,23,26,"isLe"],[29,27,23,30],[30,6,23,26,"isLe"],[30,10,23,30],[30,13,23,30,"_ref$isLe"],[30,22,23,30],[30,36,23,33],[30,40,23,37],[30,43,23,37,"_ref$isLe"],[30,52,23,37],[31,6,23,37,"_ref$isNegative"],[31,21,23,37],[31,24,23,37,"_ref"],[31,28,23,37],[31,29,23,39,"isNegative"],[31,39,23,49],[32,6,23,39,"isNegative"],[32,16,23,49],[32,19,23,49,"_ref$isNegative"],[32,34,23,49],[32,48,23,52],[32,53,23,57],[32,56,23,57,"_ref$isNegative"],[32,71,23,57],[33,4,24,4],[34,4,25,4],[35,4,26,4],[35,8,26,8],[35,9,26,9,"isLe"],[35,13,26,13],[35,15,26,15],[36,6,27,8,"value"],[36,11,27,13],[36,14,27,16,"value"],[36,19,27,21],[36,20,27,22,"slice"],[36,25,27,27],[36,26,27,28],[36,27,27,29],[36,28,27,30,"reverse"],[36,35,27,37],[36,36,27,38],[36,37,27,39],[37,4,28,4],[38,4,29,4],[38,8,29,10,"count"],[38,13,29,15],[38,16,29,18,"value"],[38,21,29,23],[38,22,29,24,"length"],[38,28,29,30],[39,4,30,4],[40,4,31,4],[41,4,32,4],[41,8,32,8,"isNegative"],[41,18,32,18],[41,22,32,22,"count"],[41,27,32,27],[41,31,32,32,"value"],[41,36,32,37],[41,37,32,38,"count"],[41,42,32,43],[41,45,32,46],[41,46,32,47],[41,47,32,48],[41,50,32,51],[41,54,32,56],[41,56,32,58],[42,6,33,8],[43,6,34,8],[44,6,35,8],[44,14,35,16,"count"],[44,19,35,21],[45,8,36,12],[45,13,36,17],[45,14,36,18],[46,10,37,16],[46,17,37,23],[46,21,37,27,"bn_js_1"],[46,28,37,34],[46,29,37,35,"BN"],[46,31,37,37],[46,32,37,38],[46,33,37,39],[46,34,37,40],[47,8,38,12],[47,13,38,17],[47,14,38,18],[48,10,39,16],[48,17,39,23],[48,21,39,27,"bn_js_1"],[48,28,39,34],[48,29,39,35,"BN"],[48,31,39,37],[48,32,39,39],[48,33,39,40,"value"],[48,38,39,45],[48,39,39,46],[48,40,39,47],[48,41,39,48],[48,44,39,51],[48,55,39,62],[48,59,39,66],[48,60,39,67],[48,61,39,68],[48,64,39,72],[48,65,39,73],[48,66,39,74],[49,8,40,12],[49,13,40,17],[49,14,40,18],[50,10,41,16],[50,17,41,23],[50,21,41,27,"bn_js_1"],[50,28,41,34],[50,29,41,35,"BN"],[50,31,41,37],[50,32,41,39],[50,33,41,41,"value"],[50,38,41,46],[50,39,41,47],[50,40,41,48],[50,41,41,49],[50,45,41,53,"value"],[50,50,41,58],[50,51,41,59],[50,52,41,60],[50,53,41,61],[50,57,41,65],[50,58,41,66],[50,59,41,67],[50,62,41,71],[50,73,41,82],[50,77,41,86],[50,78,41,87],[50,79,41,88],[50,82,41,92],[50,83,41,93],[50,84,41,94],[51,8,42,12],[51,13,42,17],[51,14,42,18],[52,10,43,16],[52,17,43,23],[52,21,43,27,"bn_js_1"],[52,28,43,34],[52,29,43,35,"BN"],[52,31,43,37],[52,32,43,39],[52,33,43,41,"value"],[52,38,43,46],[52,39,43,47],[52,40,43,48],[52,41,43,49],[52,45,43,53,"value"],[52,50,43,58],[52,51,43,59],[52,52,43,60],[52,53,43,61],[52,57,43,65],[52,58,43,66],[52,59,43,67],[52,63,43,71,"value"],[52,68,43,76],[52,69,43,77],[52,70,43,78],[52,71,43,79],[52,75,43,83],[52,77,43,85],[52,78,43,86],[52,81,43,90],[52,92,43,101],[52,96,43,105],[52,97,43,106],[52,98,43,107],[52,101,43,111],[52,102,43,112],[52,103,43,113],[53,8,44,12],[53,13,44,17],[53,14,44,18],[54,10,45,16],[55,10,46,16],[56,10,47,16],[56,17,47,23],[56,21,47,27,"bn_js_1"],[56,28,47,34],[56,29,47,35,"BN"],[56,31,47,37],[56,32,47,39],[56,33,47,41,"value"],[56,38,47,46],[56,39,47,47],[56,40,47,48],[56,41,47,49],[56,45,47,53,"value"],[56,50,47,58],[56,51,47,59],[56,52,47,60],[56,53,47,61],[56,57,47,65],[56,58,47,66],[56,59,47,67],[56,63,47,71,"value"],[56,68,47,76],[56,69,47,77],[56,70,47,78],[56,71,47,79],[56,75,47,83],[56,77,47,85],[56,78,47,86],[56,81,47,90,"value"],[56,86,47,95],[56,87,47,96],[56,88,47,97],[56,89,47,98],[56,92,47,101],[56,104,47,114],[56,107,47,118],[56,118,47,129],[56,122,47,133],[56,123,47,134],[56,124,47,135],[56,127,47,139],[56,128,47,140],[56,129,47,141],[57,8,48,12],[57,13,48,17],[57,14,48,18],[58,10,49,16],[58,17,49,23],[58,21,49,27,"bn_js_1"],[58,28,49,34],[58,29,49,35,"BN"],[58,31,49,37],[58,32,49,39],[58,33,49,40],[58,34,49,42,"value"],[58,39,49,47],[58,40,49,48],[58,41,49,49],[58,42,49,50],[58,46,49,54,"value"],[58,51,49,59],[58,52,49,60],[58,53,49,61],[58,54,49,62],[58,58,49,66],[58,59,49,67],[58,60,49,68],[58,64,49,72,"value"],[58,69,49,77],[58,70,49,78],[58,71,49,79],[58,72,49,80],[58,76,49,84],[58,78,49,86],[58,79,49,87],[58,82,49,91,"value"],[58,87,49,96],[58,88,49,97],[58,89,49,98],[58,90,49,99],[58,93,49,102],[58,105,49,115],[58,108,49,119],[58,119,49,130],[58,123,49,135],[58,124,49,136,"value"],[58,129,49,141],[58,130,49,142],[58,131,49,143],[58,132,49,144],[58,135,49,147],[58,139,49,151],[58,143,49,155],[58,158,49,171],[58,162,49,175],[58,163,49,176],[58,164,49,177],[58,167,49,181],[58,168,49,182],[58,169,49,183],[59,8,50,12],[59,13,50,17],[59,14,50,18],[60,10,51,16],[60,17,51,23],[60,21,51,27,"bn_js_1"],[60,28,51,34],[60,29,51,35,"BN"],[60,31,51,37],[60,32,51,39],[60,33,51,40],[60,34,51,42,"value"],[60,39,51,47],[60,40,51,48],[60,41,51,49],[60,42,51,50],[60,46,51,54,"value"],[60,51,51,59],[60,52,51,60],[60,53,51,61],[60,54,51,62],[60,58,51,66],[60,59,51,67],[60,60,51,68],[60,64,51,72,"value"],[60,69,51,77],[60,70,51,78],[60,71,51,79],[60,72,51,80],[60,76,51,84],[60,78,51,86],[60,79,51,87],[60,82,51,91,"value"],[60,87,51,96],[60,88,51,97],[60,89,51,98],[60,90,51,99],[60,93,51,102],[60,105,51,115],[60,108,51,119],[60,119,51,130],[60,123,51,135],[60,124,51,137,"value"],[60,129,51,142],[60,130,51,143],[60,131,51,144],[60,132,51,145],[60,136,51,149,"value"],[60,141,51,154],[60,142,51,155],[60,143,51,156],[60,144,51,157],[60,148,51,161],[60,149,51,162],[60,150,51,163],[60,153,51,167],[60,164,51,178],[60,168,51,182],[60,183,51,198],[60,187,51,202],[60,188,51,203],[60,189,51,204],[60,192,51,208],[60,193,51,209],[60,194,51,210],[61,8,52,12],[62,10,53,16],[62,17,53,23],[62,21,53,27,"bn_js_1"],[62,28,53,34],[62,29,53,35,"BN"],[62,31,53,37],[62,32,53,38,"value"],[62,37,53,43],[62,39,53,45],[62,43,53,49],[62,44,53,50],[62,45,53,51,"fromTwos"],[62,53,53,59],[62,54,53,60,"count"],[62,59,53,65],[62,62,53,68],[62,63,53,69],[62,64,53,70],[63,6,54,8],[64,4,55,4],[65,4,56,4],[66,4,57,4],[67,4,58,4],[68,4,59,4],[69,4,60,4],[70,4,61,4],[70,12,61,12,"count"],[70,17,61,17],[71,6,62,8],[71,11,62,13],[71,12,62,14],[72,8,63,12],[72,15,63,19],[72,19,63,23,"bn_js_1"],[72,26,63,30],[72,27,63,31,"BN"],[72,29,63,33],[72,30,63,34],[72,31,63,35],[72,32,63,36],[73,6,64,8],[73,11,64,13],[73,12,64,14],[74,8,65,12],[74,15,65,19],[74,19,65,23,"bn_js_1"],[74,26,65,30],[74,27,65,31,"BN"],[74,29,65,33],[74,30,65,34,"value"],[74,35,65,39],[74,36,65,40],[74,37,65,41],[74,38,65,42],[74,39,65,43],[75,6,66,8],[75,11,66,13],[75,12,66,14],[76,8,67,12],[76,15,67,19],[76,19,67,23,"bn_js_1"],[76,26,67,30],[76,27,67,31,"BN"],[76,29,67,33],[76,30,67,34,"value"],[76,35,67,39],[76,36,67,40],[76,37,67,41],[76,38,67,42],[76,42,67,46,"value"],[76,47,67,51],[76,48,67,52],[76,49,67,53],[76,50,67,54],[76,54,67,58],[76,55,67,59],[76,56,67,60],[76,57,67,61],[77,6,68,8],[77,11,68,13],[77,12,68,14],[78,8,69,12],[78,15,69,19],[78,19,69,23,"bn_js_1"],[78,26,69,30],[78,27,69,31,"BN"],[78,29,69,33],[78,30,69,34,"value"],[78,35,69,39],[78,36,69,40],[78,37,69,41],[78,38,69,42],[78,42,69,46,"value"],[78,47,69,51],[78,48,69,52],[78,49,69,53],[78,50,69,54],[78,54,69,58],[78,55,69,59],[78,56,69,60],[78,60,69,64,"value"],[78,65,69,69],[78,66,69,70],[78,67,69,71],[78,68,69,72],[78,72,69,76],[78,74,69,78],[78,75,69,79],[78,76,69,80],[79,6,70,8],[79,11,70,13],[79,12,70,14],[80,8,71,12],[81,8,72,12],[82,8,73,12],[82,15,73,19],[82,19,73,23,"bn_js_1"],[82,26,73,30],[82,27,73,31,"BN"],[82,29,73,33],[82,30,73,34,"value"],[82,35,73,39],[82,36,73,40],[82,37,73,41],[82,38,73,42],[82,42,73,46,"value"],[82,47,73,51],[82,48,73,52],[82,49,73,53],[82,50,73,54],[82,54,73,58],[82,55,73,59],[82,56,73,60],[82,60,73,64,"value"],[82,65,73,69],[82,66,73,70],[82,67,73,71],[82,68,73,72],[82,72,73,76],[82,74,73,78],[82,75,73,79],[82,78,73,83,"value"],[82,83,73,88],[82,84,73,89],[82,85,73,90],[82,86,73,91],[82,89,73,94],[82,101,73,107],[82,102,73,108],[83,6,74,8],[83,11,74,13],[83,12,74,14],[84,8,75,12],[84,15,75,19],[84,19,75,23,"bn_js_1"],[84,26,75,30],[84,27,75,31,"BN"],[84,29,75,33],[84,30,75,34,"value"],[84,35,75,39],[84,36,75,40],[84,37,75,41],[84,38,75,42],[84,42,75,46,"value"],[84,47,75,51],[84,48,75,52],[84,49,75,53],[84,50,75,54],[84,54,75,58],[84,55,75,59],[84,56,75,60],[84,60,75,64,"value"],[84,65,75,69],[84,66,75,70],[84,67,75,71],[84,68,75,72],[84,72,75,76],[84,74,75,78],[84,75,75,79],[84,78,75,83],[84,79,75,84,"value"],[84,84,75,89],[84,85,75,90],[84,86,75,91],[84,87,75,92],[84,91,75,96,"value"],[84,96,75,101],[84,97,75,102],[84,98,75,103],[84,99,75,104],[84,103,75,108],[84,104,75,109],[84,105,75,110],[84,109,75,114],[84,121,75,127],[84,122,75,128],[85,6,76,8],[85,11,76,13],[85,12,76,14],[86,8,77,12],[86,15,77,19],[86,19,77,23,"bn_js_1"],[86,26,77,30],[86,27,77,31,"BN"],[86,29,77,33],[86,30,77,34,"value"],[86,35,77,39],[86,36,77,40],[86,37,77,41],[86,38,77,42],[86,42,77,46,"value"],[86,47,77,51],[86,48,77,52],[86,49,77,53],[86,50,77,54],[86,54,77,58],[86,55,77,59],[86,56,77,60],[86,60,77,64,"value"],[86,65,77,69],[86,66,77,70],[86,67,77,71],[86,68,77,72],[86,72,77,76],[86,74,77,78],[86,75,77,79],[86,78,77,83],[86,79,77,84,"value"],[86,84,77,89],[86,85,77,90],[86,86,77,91],[86,87,77,92],[86,91,77,96,"value"],[86,96,77,101],[86,97,77,102],[86,98,77,103],[86,99,77,104],[86,103,77,108],[86,104,77,109],[86,105,77,110],[86,109,77,114,"value"],[86,114,77,119],[86,115,77,120],[86,116,77,121],[86,117,77,122],[86,121,77,126],[86,123,77,128],[86,124,77,129],[86,128,77,133],[86,140,77,146],[86,141,77,147],[87,6,78,8],[88,8,79,12],[88,15,79,19],[88,19,79,23,"bn_js_1"],[88,26,79,30],[88,27,79,31,"BN"],[88,29,79,33],[88,30,79,34,"value"],[88,35,79,39],[88,37,79,41],[88,41,79,45],[88,42,79,46],[89,4,80,4],[90,2,81,0],[91,0,81,1],[91,3]],"functionMap":{"names":["<global>","u8aToBn"],"mappings":"AAA;ACsB;CD0D"},"hasCjsExports":true},"type":"js/module"}]} |