mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 18:01:02 +00:00
1 line
16 KiB
Plaintext
1 line
16 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":104,"index":104}}],"key":"ISHU1ovvPMrCldqRjtd1JhW9dyo=","exportNames":["*"],"imports":1}},{"name":"../abstract/Array.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":105},"end":{"line":2,"column":53,"index":158}}],"key":"+rrStDZXBVBeKkHtHTajAdhokwk=","exportNames":["*"],"imports":1}},{"name":"../utils/index.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":159},"end":{"line":3,"column":68,"index":227}}],"key":"yx9DX+1vet++JoKlU5V/nikNahM=","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.decodeVec = decodeVec;\n Object.defineProperty(exports, \"Vec\", {\n enumerable: true,\n get: function () {\n return Vec;\n }\n });\n var _polkadotUtil = require(_dependencyMap[0], \"@polkadot/util\");\n var _abstractArrayJs = require(_dependencyMap[1], \"../abstract/Array.js\");\n var _utilsIndexJs = require(_dependencyMap[2], \"../utils/index.js\");\n const MAX_LENGTH = 512 * 1024;\n const l = (0, _polkadotUtil.logger)('Vec');\n function decodeVecLength(value) {\n if (Array.isArray(value)) {\n return [value, value.length, 0];\n } else if ((0, _polkadotUtil.isU8a)(value) || (0, _polkadotUtil.isHex)(value)) {\n const u8a = (0, _polkadotUtil.u8aToU8a)(value);\n const [startAt, length] = (0, _polkadotUtil.compactFromU8aLim)(u8a);\n if (length > MAX_LENGTH) {\n throw new Error(`Vec length ${length.toString()} exceeds ${MAX_LENGTH}`);\n }\n return [u8a, length, startAt];\n } else if (!value) {\n return [null, 0, 0];\n }\n throw new Error(`Expected array/hex input to Vec<*> decoding, found ${typeof value}: ${(0, _polkadotUtil.stringify)(value)}`);\n }\n function decodeVec(registry, result, value, startAt, Type) {\n if (Array.isArray(value)) {\n const count = result.length;\n for (let i = 0; i < count; i++) {\n // 26/08/2022 this is actually a false positive - after recent eslint upgdates\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const entry = value[i];\n try {\n result[i] = entry instanceof Type ? entry : new Type(registry, entry);\n } catch (error) {\n l.error(`Unable to decode on index ${i}`, error.message);\n throw error;\n }\n }\n return [0, 0];\n } else if (!value) {\n return [0, 0];\n }\n // we don't need more checks, we already limited it via the length decoding\n return (0, _utilsIndexJs.decodeU8aVec)(registry, result, (0, _polkadotUtil.u8aToU8a)(value), startAt, Type);\n }\n /**\n * @name Vec\n * @description\n * This manages codec arrays. Internally it keeps track of the length (as decoded) and allows\n * construction with the passed `Type` in the constructor. It is an extension to Array, providing\n * specific encoding/decoding on top of the base type.\n */\n class Vec extends _abstractArrayJs.AbstractArray {\n #Type;\n constructor(registry, Type, value = [], {\n definition,\n setDefinition = _polkadotUtil.identity\n } = {}) {\n const [decodeFrom, length, startAt] = decodeVecLength(value);\n super(registry, length);\n this.#Type = definition || setDefinition((0, _utilsIndexJs.typeToConstructor)(registry, Type));\n this.initialU8aLength = ((0, _polkadotUtil.isU8a)(decodeFrom) ? (0, _utilsIndexJs.decodeU8aVec)(registry, this, decodeFrom, startAt, this.#Type) : decodeVec(registry, this, decodeFrom, startAt, this.#Type))[0];\n }\n static with(Type) {\n let definition;\n // eslint-disable-next-line no-return-assign\n const setDefinition = d => definition = d;\n return class extends Vec {\n constructor(registry, value) {\n super(registry, Type, value, {\n definition,\n setDefinition\n });\n }\n };\n }\n /**\n * @description The type for the items\n */\n get Type() {\n return this.#Type.name;\n }\n /**\n * @description Finds the index of the value in the array\n */\n indexOf(other) {\n // convert type first, this removes overhead from the eq\n const check = other instanceof this.#Type ? other : new this.#Type(this.registry, other);\n for (let i = 0, count = this.length; i < count; i++) {\n if (check.eq(this[i])) {\n return i;\n }\n }\n return -1;\n }\n /**\n * @description Returns the base runtime type name for this instance\n */\n toRawType() {\n return `Vec<${this.registry.getClassName(this.#Type) || new this.#Type(this.registry).toRawType()}>`;\n }\n }\n});","lineCount":112,"map":[[7,2,23,0,"exports"],[7,9,23,0],[7,10,23,0,"decodeVec"],[7,19,23,0],[7,22,23,0,"decodeVec"],[7,31,23,0],[8,2,55,0,"Object"],[8,8,55,0],[8,9,55,0,"defineProperty"],[8,23,55,0],[8,24,55,0,"exports"],[8,31,55,0],[9,4,55,0,"enumerable"],[9,14,55,0],[10,4,55,0,"get"],[10,7,55,0],[10,18,55,0,"get"],[10,19,55,0],[11,6,55,0],[11,13,55,0,"Vec"],[11,16,55,0],[12,4,55,0],[13,2,55,0],[14,2,1,0],[14,6,1,0,"_polkadotUtil"],[14,19,1,0],[14,22,1,0,"require"],[14,29,1,0],[14,30,1,0,"_dependencyMap"],[14,44,1,0],[15,2,2,0],[15,6,2,0,"_abstractArrayJs"],[15,22,2,0],[15,25,2,0,"require"],[15,32,2,0],[15,33,2,0,"_dependencyMap"],[15,47,2,0],[16,2,3,0],[16,6,3,0,"_utilsIndexJs"],[16,19,3,0],[16,22,3,0,"require"],[16,29,3,0],[16,30,3,0,"_dependencyMap"],[16,44,3,0],[17,2,4,0],[17,8,4,6,"MAX_LENGTH"],[17,18,4,16],[17,21,4,19],[17,24,4,22],[17,27,4,25],[17,31,4,29],[18,2,5,0],[18,8,5,6,"l"],[18,9,5,7],[18,12,5,10],[18,16,5,10,"logger"],[18,29,5,16],[18,30,5,16,"logger"],[18,36,5,16],[18,38,5,17],[18,43,5,22],[18,44,5,23],[19,2,6,0],[19,11,6,9,"decodeVecLength"],[19,26,6,24,"decodeVecLength"],[19,27,6,25,"value"],[19,32,6,30],[19,34,6,32],[20,4,7,4],[20,8,7,8,"Array"],[20,13,7,13],[20,14,7,14,"isArray"],[20,21,7,21],[20,22,7,22,"value"],[20,27,7,27],[20,28,7,28],[20,30,7,30],[21,6,8,8],[21,13,8,15],[21,14,8,16,"value"],[21,19,8,21],[21,21,8,23,"value"],[21,26,8,28],[21,27,8,29,"length"],[21,33,8,35],[21,35,8,37],[21,36,8,38],[21,37,8,39],[22,4,9,4],[22,5,9,5],[22,11,10,9],[22,15,10,13],[22,19,10,13,"isU8a"],[22,32,10,18],[22,33,10,18,"isU8a"],[22,38,10,18],[22,40,10,19,"value"],[22,45,10,24],[22,46,10,25],[22,50,10,29],[22,54,10,29,"isHex"],[22,67,10,34],[22,68,10,34,"isHex"],[22,73,10,34],[22,75,10,35,"value"],[22,80,10,40],[22,81,10,41],[22,83,10,43],[23,6,11,8],[23,12,11,14,"u8a"],[23,15,11,17],[23,18,11,20],[23,22,11,20,"u8aToU8a"],[23,35,11,28],[23,36,11,28,"u8aToU8a"],[23,44,11,28],[23,46,11,29,"value"],[23,51,11,34],[23,52,11,35],[24,6,12,8],[24,12,12,14],[24,13,12,15,"startAt"],[24,20,12,22],[24,22,12,24,"length"],[24,28,12,30],[24,29,12,31],[24,32,12,34],[24,36,12,34,"compactFromU8aLim"],[24,49,12,51],[24,50,12,51,"compactFromU8aLim"],[24,67,12,51],[24,69,12,52,"u8a"],[24,72,12,55],[24,73,12,56],[25,6,13,8],[25,10,13,12,"length"],[25,16,13,18],[25,19,13,21,"MAX_LENGTH"],[25,29,13,31],[25,31,13,33],[26,8,14,12],[26,14,14,18],[26,18,14,22,"Error"],[26,23,14,27],[26,24,14,28],[26,38,14,42,"length"],[26,44,14,48],[26,45,14,49,"toString"],[26,53,14,57],[26,54,14,58],[26,55,14,59],[26,67,14,71,"MAX_LENGTH"],[26,77,14,81],[26,79,14,83],[26,80,14,84],[27,6,15,8],[28,6,16,8],[28,13,16,15],[28,14,16,16,"u8a"],[28,17,16,19],[28,19,16,21,"length"],[28,25,16,27],[28,27,16,29,"startAt"],[28,34,16,36],[28,35,16,37],[29,4,17,4],[29,5,17,5],[29,11,18,9],[29,15,18,13],[29,16,18,14,"value"],[29,21,18,19],[29,23,18,21],[30,6,19,8],[30,13,19,15],[30,14,19,16],[30,18,19,20],[30,20,19,22],[30,21,19,23],[30,23,19,25],[30,24,19,26],[30,25,19,27],[31,4,20,4],[32,4,21,4],[32,10,21,10],[32,14,21,14,"Error"],[32,19,21,19],[32,20,21,20],[32,74,21,74],[32,81,21,81,"value"],[32,86,21,86],[32,91,21,91],[32,95,21,91,"stringify"],[32,108,21,100],[32,109,21,100,"stringify"],[32,118,21,100],[32,120,21,101,"value"],[32,125,21,106],[32,126,21,107],[32,128,21,109],[32,129,21,110],[33,2,22,0],[34,2,23,7],[34,11,23,16,"decodeVec"],[34,20,23,25,"decodeVec"],[34,21,23,26,"registry"],[34,29,23,34],[34,31,23,36,"result"],[34,37,23,42],[34,39,23,44,"value"],[34,44,23,49],[34,46,23,51,"startAt"],[34,53,23,58],[34,55,23,60,"Type"],[34,59,23,64],[34,61,23,66],[35,4,24,4],[35,8,24,8,"Array"],[35,13,24,13],[35,14,24,14,"isArray"],[35,21,24,21],[35,22,24,22,"value"],[35,27,24,27],[35,28,24,28],[35,30,24,30],[36,6,25,8],[36,12,25,14,"count"],[36,17,25,19],[36,20,25,22,"result"],[36,26,25,28],[36,27,25,29,"length"],[36,33,25,35],[37,6,26,8],[37,11,26,13],[37,15,26,17,"i"],[37,16,26,18],[37,19,26,21],[37,20,26,22],[37,22,26,24,"i"],[37,23,26,25],[37,26,26,28,"count"],[37,31,26,33],[37,33,26,35,"i"],[37,34,26,36],[37,36,26,38],[37,38,26,40],[38,8,27,12],[39,8,28,12],[40,8,29,12],[40,14,29,18,"entry"],[40,19,29,23],[40,22,29,26,"value"],[40,27,29,31],[40,28,29,32,"i"],[40,29,29,33],[40,30,29,34],[41,8,30,12],[41,12,30,16],[42,10,31,16,"result"],[42,16,31,22],[42,17,31,23,"i"],[42,18,31,24],[42,19,31,25],[42,22,31,28,"entry"],[42,27,31,33],[42,39,31,45,"Type"],[42,43,31,49],[42,46,32,22,"entry"],[42,51,32,27],[42,54,33,22],[42,58,33,26,"Type"],[42,62,33,30],[42,63,33,31,"registry"],[42,71,33,39],[42,73,33,41,"entry"],[42,78,33,46],[42,79,33,47],[43,8,34,12],[43,9,34,13],[43,10,35,12],[43,17,35,19,"error"],[43,22,35,24],[43,24,35,26],[44,10,36,16,"l"],[44,11,36,17],[44,12,36,18,"error"],[44,17,36,23],[44,18,36,24],[44,47,36,53,"i"],[44,48,36,54],[44,50,36,56],[44,52,36,58,"error"],[44,57,36,63],[44,58,36,64,"message"],[44,65,36,71],[44,66,36,72],[45,10,37,16],[45,16,37,22,"error"],[45,21,37,27],[46,8,38,12],[47,6,39,8],[48,6,40,8],[48,13,40,15],[48,14,40,16],[48,15,40,17],[48,17,40,19],[48,18,40,20],[48,19,40,21],[49,4,41,4],[49,5,41,5],[49,11,42,9],[49,15,42,13],[49,16,42,14,"value"],[49,21,42,19],[49,23,42,21],[50,6,43,8],[50,13,43,15],[50,14,43,16],[50,15,43,17],[50,17,43,19],[50,18,43,20],[50,19,43,21],[51,4,44,4],[52,4,45,4],[53,4,46,4],[53,11,46,11],[53,15,46,11,"decodeU8aVec"],[53,28,46,23],[53,29,46,23,"decodeU8aVec"],[53,41,46,23],[53,43,46,24,"registry"],[53,51,46,32],[53,53,46,34,"result"],[53,59,46,40],[53,61,46,42],[53,65,46,42,"u8aToU8a"],[53,78,46,50],[53,79,46,50,"u8aToU8a"],[53,87,46,50],[53,89,46,51,"value"],[53,94,46,56],[53,95,46,57],[53,97,46,59,"startAt"],[53,104,46,66],[53,106,46,68,"Type"],[53,110,46,72],[53,111,46,73],[54,2,47,0],[55,2,48,0],[56,0,49,0],[57,0,50,0],[58,0,51,0],[59,0,52,0],[60,0,53,0],[61,0,54,0],[62,2,55,7],[62,8,55,13,"Vec"],[62,11,55,16],[62,20,55,25,"AbstractArray"],[62,36,55,38],[62,37,55,38,"AbstractArray"],[62,50,55,38],[62,51,55,39],[63,4,56,4],[63,5,56,5,"Type"],[63,9,56,9],[64,4,57,4,"constructor"],[64,15,57,15,"constructor"],[64,16,57,16,"registry"],[64,24,57,24],[64,26,57,26,"Type"],[64,30,57,30],[64,32,57,32,"value"],[64,37,57,37],[64,40,57,40],[64,42,57,42],[64,44,57,44],[65,6,57,46,"definition"],[65,16,57,56],[66,6,57,58,"setDefinition"],[66,19,57,71],[66,22,57,74,"identity"],[66,35,57,82],[66,36,57,82,"identity"],[67,4,57,83],[67,5,57,84],[67,8,57,87],[67,9,57,88],[67,10,57,89],[67,12,57,91],[68,6,58,8],[68,12,58,14],[68,13,58,15,"decodeFrom"],[68,23,58,25],[68,25,58,27,"length"],[68,31,58,33],[68,33,58,35,"startAt"],[68,40,58,42],[68,41,58,43],[68,44,58,46,"decodeVecLength"],[68,59,58,61],[68,60,58,62,"value"],[68,65,58,67],[68,66,58,68],[69,6,59,8],[69,11,59,13],[69,12,59,14,"registry"],[69,20,59,22],[69,22,59,24,"length"],[69,28,59,30],[69,29,59,31],[70,6,60,8],[70,10,60,12],[70,11,60,13],[70,12,60,14,"Type"],[70,16,60,18],[70,19,60,21,"definition"],[70,29,60,31],[70,33,60,35,"setDefinition"],[70,46,60,48],[70,47,60,49],[70,51,60,49,"typeToConstructor"],[70,64,60,66],[70,65,60,66,"typeToConstructor"],[70,82,60,66],[70,84,60,67,"registry"],[70,92,60,75],[70,94,60,77,"Type"],[70,98,60,81],[70,99,60,82],[70,100,60,83],[71,6,61,8],[71,10,61,12],[71,11,61,13,"initialU8aLength"],[71,27,61,29],[71,30,61,32],[71,31,61,33],[71,35,61,33,"isU8a"],[71,48,61,38],[71,49,61,38,"isU8a"],[71,54,61,38],[71,56,61,39,"decodeFrom"],[71,66,61,49],[71,67,61,50],[71,70,62,14],[71,74,62,14,"decodeU8aVec"],[71,87,62,26],[71,88,62,26,"decodeU8aVec"],[71,100,62,26],[71,102,62,27,"registry"],[71,110,62,35],[71,112,62,37],[71,116,62,41],[71,118,62,43,"decodeFrom"],[71,128,62,53],[71,130,62,55,"startAt"],[71,137,62,62],[71,139,62,64],[71,143,62,68],[71,144,62,69],[71,145,62,70,"Type"],[71,149,62,74],[71,150,62,75],[71,153,63,14,"decodeVec"],[71,162,63,23],[71,163,63,24,"registry"],[71,171,63,32],[71,173,63,34],[71,177,63,38],[71,179,63,40,"decodeFrom"],[71,189,63,50],[71,191,63,52,"startAt"],[71,198,63,59],[71,200,63,61],[71,204,63,65],[71,205,63,66],[71,206,63,67,"Type"],[71,210,63,71],[71,211,63,72],[71,213,63,74],[71,214,63,75],[71,215,63,76],[72,4,64,4],[73,4,65,4],[73,11,65,11,"with"],[73,15,65,15,"with"],[73,16,65,16,"Type"],[73,20,65,20],[73,22,65,22],[74,6,66,8],[74,10,66,12,"definition"],[74,20,66,22],[75,6,67,8],[76,6,68,8],[76,12,68,14,"setDefinition"],[76,25,68,27],[76,28,68,31,"d"],[76,29,68,32],[76,33,68,38,"definition"],[76,43,68,48],[76,46,68,51,"d"],[76,47,68,53],[77,6,69,8],[77,13,69,15],[77,27,69,29,"Vec"],[77,30,69,32],[77,31,69,33],[78,8,70,12,"constructor"],[78,19,70,23,"constructor"],[78,20,70,24,"registry"],[78,28,70,32],[78,30,70,34,"value"],[78,35,70,39],[78,37,70,41],[79,10,71,16],[79,15,71,21],[79,16,71,22,"registry"],[79,24,71,30],[79,26,71,32,"Type"],[79,30,71,36],[79,32,71,38,"value"],[79,37,71,43],[79,39,71,45],[80,12,71,47,"definition"],[80,22,71,57],[81,12,71,59,"setDefinition"],[82,10,71,73],[82,11,71,74],[82,12,71,75],[83,8,72,12],[84,6,73,8],[84,7,73,9],[85,4,74,4],[86,4,75,4],[87,0,76,0],[88,0,77,0],[89,4,78,4],[89,8,78,8,"Type"],[89,12,78,12,"Type"],[89,13,78,12],[89,15,78,15],[90,6,79,8],[90,13,79,15],[90,17,79,19],[90,18,79,20],[90,19,79,21,"Type"],[90,23,79,25],[90,24,79,26,"name"],[90,28,79,30],[91,4,80,4],[92,4,81,4],[93,0,82,0],[94,0,83,0],[95,4,84,4,"indexOf"],[95,11,84,11,"indexOf"],[95,12,84,12,"other"],[95,17,84,17],[95,19,84,19],[96,6,85,8],[97,6,86,8],[97,12,86,14,"check"],[97,17,86,19],[97,20,86,22,"other"],[97,25,86,27],[97,37,86,39],[97,41,86,43],[97,42,86,44],[97,43,86,45,"Type"],[97,47,86,49],[97,50,87,14,"other"],[97,55,87,19],[97,58,88,14],[97,62,88,18],[97,66,88,22],[97,67,88,23],[97,68,88,24,"Type"],[97,72,88,28],[97,73,88,29],[97,77,88,33],[97,78,88,34,"registry"],[97,86,88,42],[97,88,88,44,"other"],[97,93,88,49],[97,94,88,50],[98,6,89,8],[98,11,89,13],[98,15,89,17,"i"],[98,16,89,18],[98,19,89,21],[98,20,89,22],[98,22,89,24,"count"],[98,27,89,29],[98,30,89,32],[98,34,89,36],[98,35,89,37,"length"],[98,41,89,43],[98,43,89,45,"i"],[98,44,89,46],[98,47,89,49,"count"],[98,52,89,54],[98,54,89,56,"i"],[98,55,89,57],[98,57,89,59],[98,59,89,61],[99,8,90,12],[99,12,90,16,"check"],[99,17,90,21],[99,18,90,22,"eq"],[99,20,90,24],[99,21,90,25],[99,25,90,29],[99,26,90,30,"i"],[99,27,90,31],[99,28,90,32],[99,29,90,33],[99,31,90,35],[100,10,91,16],[100,17,91,23,"i"],[100,18,91,24],[101,8,92,12],[102,6,93,8],[103,6,94,8],[103,13,94,15],[103,14,94,16],[103,15,94,17],[104,4,95,4],[105,4,96,4],[106,0,97,0],[107,0,98,0],[108,4,99,4,"toRawType"],[108,13,99,13,"toRawType"],[108,14,99,13],[108,16,99,16],[109,6,100,8],[109,13,100,15],[109,20,100,22],[109,24,100,26],[109,25,100,27,"registry"],[109,33,100,35],[109,34,100,36,"getClassName"],[109,46,100,48],[109,47,100,49],[109,51,100,53],[109,52,100,54],[109,53,100,55,"Type"],[109,57,100,59],[109,58,100,60],[109,62,100,64],[109,66,100,68],[109,70,100,72],[109,71,100,73],[109,72,100,74,"Type"],[109,76,100,78],[109,77,100,79],[109,81,100,83],[109,82,100,84,"registry"],[109,90,100,92],[109,91,100,93],[109,92,100,94,"toRawType"],[109,101,100,103],[109,102,100,104],[109,103,100,105],[109,106,100,108],[110,4,101,4],[111,2,102,0],[112,0,102,1],[112,3]],"functionMap":{"names":["<global>","decodeVecLength","decodeVec","Vec","constructor","_with","setDefinition","<anonymous>","get__Type","indexOf","toRawType"],"mappings":"AAA;ACK;CDgB;OEC;CFwB;OGQ;ICE;KDO;IEC;8BCG,uBD;eEC;YHC;aGE;SFC;KFC;IKI;KLE;IMI;KNW;IOI;KPE;CHC"},"hasCjsExports":false},"type":"js/module"}]} |