mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 14:31:02 +00:00
1 line
16 KiB
Plaintext
1 line
16 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":115},"end":{"line":4,"column":40,"index":140}}],"key":"u0mzEw2nilnHoUWtEdZl0JKHutA=","exportNames":["*"],"imports":1}},{"name":"./Raw.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":17,"index":159},"end":{"line":5,"column":36,"index":178}}],"key":"C0tTtpoS7J5/GyXpuz1yDNLzmTw=","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.Text = void 0;\n const util_1 = require(_dependencyMap[0], \"@polkadot/util\");\n const Raw_js_1 = require(_dependencyMap[1], \"./Raw.js\");\n const MAX_LENGTH = 128 * 1024;\n /** @internal */\n function decodeText(value) {\n if ((0, util_1.isU8a)(value)) {\n if (!value.length) {\n return ['', 0];\n }\n // for Raw, the internal buffer does not have an internal length\n // (the same applies in e.g. Bytes, where length is added at encoding-time)\n if (value instanceof Raw_js_1.Raw) {\n return [(0, util_1.u8aToString)(value), 0];\n }\n const [offset, length] = (0, util_1.compactFromU8aLim)(value);\n const total = offset + length;\n if (length > MAX_LENGTH) {\n throw new Error(`Text: length ${length.toString()} exceeds ${MAX_LENGTH}`);\n } else if (total > value.length) {\n throw new Error(`Text: required length less than remainder, expected at least ${total}, found ${value.length}`);\n }\n return [(0, util_1.u8aToString)(value.subarray(offset, total)), total];\n } else if ((0, util_1.isHex)(value)) {\n return [(0, util_1.u8aToString)((0, util_1.hexToU8a)(value)), 0];\n }\n return [value ? value.toString() : '', 0];\n }\n /**\n * @name Text\n * @description\n * This is a string wrapper, along with the length. It is used both for strings as well\n * as items such as documentation. It simply extends the standard JS `String` built-in\n * object, inheriting all methods exposed from `String`.\n * @noInheritDoc\n */\n class Text extends String {\n #override = null;\n constructor(registry, value) {\n const [str, decodedLength] = decodeText(value);\n super(str);\n this.registry = registry;\n this.initialU8aLength = decodedLength;\n }\n /**\n * @description The length of the value when encoded as a Uint8Array\n */\n get encodedLength() {\n return this.toU8a().length;\n }\n /**\n * @description returns a hash of the contents\n */\n get hash() {\n return this.registry.hash(this.toU8a());\n }\n /**\n * @description Checks if the value is an empty value\n */\n get isEmpty() {\n return this.length === 0;\n }\n /**\n * @description The length of the value\n */\n get length() {\n // only included here since we ignore inherited docs\n return super.length;\n }\n /**\n * @description Compares the value of the input to see if there is a match\n */\n eq(other) {\n return (0, util_1.isString)(other) ? this.toString() === other.toString() : false;\n }\n /**\n * @description Returns a breakdown of the hex encoding for this Codec\n */\n inspect() {\n const value = (0, util_1.stringToU8a)(super.toString());\n return {\n outer: value.length ? [(0, util_1.compactToU8a)(value.length), value] : [(0, util_1.compactToU8a)(value.length)]\n };\n }\n /**\n * @description Set an override value for this\n */\n setOverride(override) {\n this.#override = override;\n }\n /**\n * @description Returns a hex string representation of the value\n */\n toHex() {\n // like with Vec<u8>, when we are encoding to hex, we don't actually add\n // the length prefix (it is already implied by the actual string length)\n return (0, util_1.u8aToHex)(this.toU8a(true));\n }\n /**\n * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information\n */\n toHuman() {\n return this.toJSON();\n }\n /**\n * @description Converts the Object to JSON, typically used for RPC transfers\n */\n toJSON() {\n return this.toString();\n }\n /**\n * @description Converts the value in a best-fit primitive form\n */\n toPrimitive() {\n return this.toJSON();\n }\n /**\n * @description Returns the base runtime type name for this instance\n */\n toRawType() {\n return 'Text';\n }\n /**\n * @description Returns the string representation of the value\n */\n toString() {\n return this.#override || super.toString();\n }\n /**\n * @description Encodes the value as a Uint8Array as per the SCALE specifications\n * @param isBare true when the value has none of the type-specific prefixes (internal)\n */\n toU8a(isBare) {\n // NOTE Here we use the super toString (we are not taking overrides into account,\n // rather encoding the original value the string was constructed with)\n const encoded = (0, util_1.stringToU8a)(super.toString());\n return isBare ? encoded : (0, util_1.compactAddLength)(encoded);\n }\n }\n exports.Text = Text;\n});","lineCount":147,"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,"Text"],[7,14,3,12],[7,17,3,15],[7,22,3,20],[7,23,3,21],[8,2,4,0],[8,8,4,6,"util_1"],[8,14,4,12],[8,17,4,15,"require"],[8,24,4,22],[8,25,4,22,"_dependencyMap"],[8,39,4,22],[8,60,4,39],[8,61,4,40],[9,2,5,0],[9,8,5,6,"Raw_js_1"],[9,16,5,14],[9,19,5,17,"require"],[9,26,5,24],[9,27,5,24,"_dependencyMap"],[9,41,5,24],[9,56,5,35],[9,57,5,36],[10,2,6,0],[10,8,6,6,"MAX_LENGTH"],[10,18,6,16],[10,21,6,19],[10,24,6,22],[10,27,6,25],[10,31,6,29],[11,2,7,0],[12,2,8,0],[12,11,8,9,"decodeText"],[12,21,8,19,"decodeText"],[12,22,8,20,"value"],[12,27,8,25],[12,29,8,27],[13,4,9,4],[13,8,9,8],[13,9,9,9],[13,10,9,10],[13,12,9,12,"util_1"],[13,18,9,18],[13,19,9,19,"isU8a"],[13,24,9,24],[13,26,9,26,"value"],[13,31,9,31],[13,32,9,32],[13,34,9,34],[14,6,10,8],[14,10,10,12],[14,11,10,13,"value"],[14,16,10,18],[14,17,10,19,"length"],[14,23,10,25],[14,25,10,27],[15,8,11,12],[15,15,11,19],[15,16,11,20],[15,18,11,22],[15,20,11,24],[15,21,11,25],[15,22,11,26],[16,6,12,8],[17,6,13,8],[18,6,14,8],[19,6,15,8],[19,10,15,12,"value"],[19,15,15,17],[19,27,15,29,"Raw_js_1"],[19,35,15,37],[19,36,15,38,"Raw"],[19,39,15,41],[19,41,15,43],[20,8,16,12],[20,15,16,19],[20,16,16,20],[20,17,16,21],[20,18,16,22],[20,20,16,24,"util_1"],[20,26,16,30],[20,27,16,31,"u8aToString"],[20,38,16,42],[20,40,16,44,"value"],[20,45,16,49],[20,46,16,50],[20,48,16,52],[20,49,16,53],[20,50,16,54],[21,6,17,8],[22,6,18,8],[22,12,18,14],[22,13,18,15,"offset"],[22,19,18,21],[22,21,18,23,"length"],[22,27,18,29],[22,28,18,30],[22,31,18,33],[22,32,18,34],[22,33,18,35],[22,35,18,37,"util_1"],[22,41,18,43],[22,42,18,44,"compactFromU8aLim"],[22,59,18,61],[22,61,18,63,"value"],[22,66,18,68],[22,67,18,69],[23,6,19,8],[23,12,19,14,"total"],[23,17,19,19],[23,20,19,22,"offset"],[23,26,19,28],[23,29,19,31,"length"],[23,35,19,37],[24,6,20,8],[24,10,20,12,"length"],[24,16,20,18],[24,19,20,21,"MAX_LENGTH"],[24,29,20,31],[24,31,20,33],[25,8,21,12],[25,14,21,18],[25,18,21,22,"Error"],[25,23,21,27],[25,24,21,28],[25,40,21,44,"length"],[25,46,21,50],[25,47,21,51,"toString"],[25,55,21,59],[25,56,21,60],[25,57,21,61],[25,69,21,73,"MAX_LENGTH"],[25,79,21,83],[25,81,21,85],[25,82,21,86],[26,6,22,8],[26,7,22,9],[26,13,23,13],[26,17,23,17,"total"],[26,22,23,22],[26,25,23,25,"value"],[26,30,23,30],[26,31,23,31,"length"],[26,37,23,37],[26,39,23,39],[27,8,24,12],[27,14,24,18],[27,18,24,22,"Error"],[27,23,24,27],[27,24,24,28],[27,88,24,92,"total"],[27,93,24,97],[27,104,24,108,"value"],[27,109,24,113],[27,110,24,114,"length"],[27,116,24,120],[27,118,24,122],[27,119,24,123],[28,6,25,8],[29,6,26,8],[29,13,26,15],[29,14,26,16],[29,15,26,17],[29,16,26,18],[29,18,26,20,"util_1"],[29,24,26,26],[29,25,26,27,"u8aToString"],[29,36,26,38],[29,38,26,40,"value"],[29,43,26,45],[29,44,26,46,"subarray"],[29,52,26,54],[29,53,26,55,"offset"],[29,59,26,61],[29,61,26,63,"total"],[29,66,26,68],[29,67,26,69],[29,68,26,70],[29,70,26,72,"total"],[29,75,26,77],[29,76,26,78],[30,4,27,4],[30,5,27,5],[30,11,28,9],[30,15,28,13],[30,16,28,14],[30,17,28,15],[30,19,28,17,"util_1"],[30,25,28,23],[30,26,28,24,"isHex"],[30,31,28,29],[30,33,28,31,"value"],[30,38,28,36],[30,39,28,37],[30,41,28,39],[31,6,29,8],[31,13,29,15],[31,14,29,16],[31,15,29,17],[31,16,29,18],[31,18,29,20,"util_1"],[31,24,29,26],[31,25,29,27,"u8aToString"],[31,36,29,38],[31,38,29,40],[31,39,29,41],[31,40,29,42],[31,42,29,44,"util_1"],[31,48,29,50],[31,49,29,51,"hexToU8a"],[31,57,29,59],[31,59,29,61,"value"],[31,64,29,66],[31,65,29,67],[31,66,29,68],[31,68,29,70],[31,69,29,71],[31,70,29,72],[32,4,30,4],[33,4,31,4],[33,11,31,11],[33,12,31,12,"value"],[33,17,31,17],[33,20,31,20,"value"],[33,25,31,25],[33,26,31,26,"toString"],[33,34,31,34],[33,35,31,35],[33,36,31,36],[33,39,31,39],[33,41,31,41],[33,43,31,43],[33,44,31,44],[33,45,31,45],[34,2,32,0],[35,2,33,0],[36,0,34,0],[37,0,35,0],[38,0,36,0],[39,0,37,0],[40,0,38,0],[41,0,39,0],[42,0,40,0],[43,2,41,0],[43,8,41,6,"Text"],[43,12,41,10],[43,21,41,19,"String"],[43,27,41,25],[43,28,41,26],[44,4,46,4],[44,5,46,5,"override"],[44,13,46,13],[44,16,46,16],[44,20,46,20],[45,4,47,4,"constructor"],[45,15,47,15,"constructor"],[45,16,47,16,"registry"],[45,24,47,24],[45,26,47,26,"value"],[45,31,47,31],[45,33,47,33],[46,6,48,8],[46,12,48,14],[46,13,48,15,"str"],[46,16,48,18],[46,18,48,20,"decodedLength"],[46,31,48,33],[46,32,48,34],[46,35,48,37,"decodeText"],[46,45,48,47],[46,46,48,48,"value"],[46,51,48,53],[46,52,48,54],[47,6,49,8],[47,11,49,13],[47,12,49,14,"str"],[47,15,49,17],[47,16,49,18],[48,6,50,8],[48,10,50,12],[48,11,50,13,"registry"],[48,19,50,21],[48,22,50,24,"registry"],[48,30,50,32],[49,6,51,8],[49,10,51,12],[49,11,51,13,"initialU8aLength"],[49,27,51,29],[49,30,51,32,"decodedLength"],[49,43,51,45],[50,4,52,4],[51,4,53,4],[52,0,54,0],[53,0,55,0],[54,4,56,4],[54,8,56,8,"encodedLength"],[54,21,56,21,"encodedLength"],[54,22,56,21],[54,24,56,24],[55,6,57,8],[55,13,57,15],[55,17,57,19],[55,18,57,20,"toU8a"],[55,23,57,25],[55,24,57,26],[55,25,57,27],[55,26,57,28,"length"],[55,32,57,34],[56,4,58,4],[57,4,59,4],[58,0,60,0],[59,0,61,0],[60,4,62,4],[60,8,62,8,"hash"],[60,12,62,12,"hash"],[60,13,62,12],[60,15,62,15],[61,6,63,8],[61,13,63,15],[61,17,63,19],[61,18,63,20,"registry"],[61,26,63,28],[61,27,63,29,"hash"],[61,31,63,33],[61,32,63,34],[61,36,63,38],[61,37,63,39,"toU8a"],[61,42,63,44],[61,43,63,45],[61,44,63,46],[61,45,63,47],[62,4,64,4],[63,4,65,4],[64,0,66,0],[65,0,67,0],[66,4,68,4],[66,8,68,8,"isEmpty"],[66,15,68,15,"isEmpty"],[66,16,68,15],[66,18,68,18],[67,6,69,8],[67,13,69,15],[67,17,69,19],[67,18,69,20,"length"],[67,24,69,26],[67,29,69,31],[67,30,69,32],[68,4,70,4],[69,4,71,4],[70,0,72,0],[71,0,73,0],[72,4,74,4],[72,8,74,8,"length"],[72,14,74,14,"length"],[72,15,74,14],[72,17,74,17],[73,6,75,8],[74,6,76,8],[74,13,76,15],[74,18,76,20],[74,19,76,21,"length"],[74,25,76,27],[75,4,77,4],[76,4,78,4],[77,0,79,0],[78,0,80,0],[79,4,81,4,"eq"],[79,6,81,6,"eq"],[79,7,81,7,"other"],[79,12,81,12],[79,14,81,14],[80,6,82,8],[80,13,82,15],[80,14,82,16],[80,15,82,17],[80,17,82,19,"util_1"],[80,23,82,25],[80,24,82,26,"isString"],[80,32,82,34],[80,34,82,36,"other"],[80,39,82,41],[80,40,82,42],[80,43,83,14],[80,47,83,18],[80,48,83,19,"toString"],[80,56,83,27],[80,57,83,28],[80,58,83,29],[80,63,83,34,"other"],[80,68,83,39],[80,69,83,40,"toString"],[80,77,83,48],[80,78,83,49],[80,79,83,50],[80,82,84,14],[80,87,84,19],[81,4,85,4],[82,4,86,4],[83,0,87,0],[84,0,88,0],[85,4,89,4,"inspect"],[85,11,89,11,"inspect"],[85,12,89,11],[85,14,89,14],[86,6,90,8],[86,12,90,14,"value"],[86,17,90,19],[86,20,90,22],[86,21,90,23],[86,22,90,24],[86,24,90,26,"util_1"],[86,30,90,32],[86,31,90,33,"stringToU8a"],[86,42,90,44],[86,44,90,46],[86,49,90,51],[86,50,90,52,"toString"],[86,58,90,60],[86,59,90,61],[86,60,90,62],[86,61,90,63],[87,6,91,8],[87,13,91,15],[88,8,92,12,"outer"],[88,13,92,17],[88,15,92,19,"value"],[88,20,92,24],[88,21,92,25,"length"],[88,27,92,31],[88,30,93,18],[88,31,93,19],[88,32,93,20],[88,33,93,21],[88,35,93,23,"util_1"],[88,41,93,29],[88,42,93,30,"compactToU8a"],[88,54,93,42],[88,56,93,44,"value"],[88,61,93,49],[88,62,93,50,"length"],[88,68,93,56],[88,69,93,57],[88,71,93,59,"value"],[88,76,93,64],[88,77,93,65],[88,80,94,18],[88,81,94,19],[88,82,94,20],[88,83,94,21],[88,85,94,23,"util_1"],[88,91,94,29],[88,92,94,30,"compactToU8a"],[88,104,94,42],[88,106,94,44,"value"],[88,111,94,49],[88,112,94,50,"length"],[88,118,94,56],[88,119,94,57],[89,6,95,8],[89,7,95,9],[90,4,96,4],[91,4,97,4],[92,0,98,0],[93,0,99,0],[94,4,100,4,"setOverride"],[94,15,100,15,"setOverride"],[94,16,100,16,"override"],[94,24,100,24],[94,26,100,26],[95,6,101,8],[95,10,101,12],[95,11,101,13],[95,12,101,14,"override"],[95,20,101,22],[95,23,101,25,"override"],[95,31,101,33],[96,4,102,4],[97,4,103,4],[98,0,104,0],[99,0,105,0],[100,4,106,4,"toHex"],[100,9,106,9,"toHex"],[100,10,106,9],[100,12,106,12],[101,6,107,8],[102,6,108,8],[103,6,109,8],[103,13,109,15],[103,14,109,16],[103,15,109,17],[103,17,109,19,"util_1"],[103,23,109,25],[103,24,109,26,"u8aToHex"],[103,32,109,34],[103,34,109,36],[103,38,109,40],[103,39,109,41,"toU8a"],[103,44,109,46],[103,45,109,47],[103,49,109,51],[103,50,109,52],[103,51,109,53],[104,4,110,4],[105,4,111,4],[106,0,112,0],[107,0,113,0],[108,4,114,4,"toHuman"],[108,11,114,11,"toHuman"],[108,12,114,11],[108,14,114,14],[109,6,115,8],[109,13,115,15],[109,17,115,19],[109,18,115,20,"toJSON"],[109,24,115,26],[109,25,115,27],[109,26,115,28],[110,4,116,4],[111,4,117,4],[112,0,118,0],[113,0,119,0],[114,4,120,4,"toJSON"],[114,10,120,10,"toJSON"],[114,11,120,10],[114,13,120,13],[115,6,121,8],[115,13,121,15],[115,17,121,19],[115,18,121,20,"toString"],[115,26,121,28],[115,27,121,29],[115,28,121,30],[116,4,122,4],[117,4,123,4],[118,0,124,0],[119,0,125,0],[120,4,126,4,"toPrimitive"],[120,15,126,15,"toPrimitive"],[120,16,126,15],[120,18,126,18],[121,6,127,8],[121,13,127,15],[121,17,127,19],[121,18,127,20,"toJSON"],[121,24,127,26],[121,25,127,27],[121,26,127,28],[122,4,128,4],[123,4,129,4],[124,0,130,0],[125,0,131,0],[126,4,132,4,"toRawType"],[126,13,132,13,"toRawType"],[126,14,132,13],[126,16,132,16],[127,6,133,8],[127,13,133,15],[127,19,133,21],[128,4,134,4],[129,4,135,4],[130,0,136,0],[131,0,137,0],[132,4,138,4,"toString"],[132,12,138,12,"toString"],[132,13,138,12],[132,15,138,15],[133,6,139,8],[133,13,139,15],[133,17,139,19],[133,18,139,20],[133,19,139,21,"override"],[133,27,139,29],[133,31,139,33],[133,36,139,38],[133,37,139,39,"toString"],[133,45,139,47],[133,46,139,48],[133,47,139,49],[134,4,140,4],[135,4,141,4],[136,0,142,0],[137,0,143,0],[138,0,144,0],[139,4,145,4,"toU8a"],[139,9,145,9,"toU8a"],[139,10,145,10,"isBare"],[139,16,145,16],[139,18,145,18],[140,6,146,8],[141,6,147,8],[142,6,148,8],[142,12,148,14,"encoded"],[142,19,148,21],[142,22,148,24],[142,23,148,25],[142,24,148,26],[142,26,148,28,"util_1"],[142,32,148,34],[142,33,148,35,"stringToU8a"],[142,44,148,46],[142,46,148,48],[142,51,148,53],[142,52,148,54,"toString"],[142,60,148,62],[142,61,148,63],[142,62,148,64],[142,63,148,65],[143,6,149,8],[143,13,149,15,"isBare"],[143,19,149,21],[143,22,150,14,"encoded"],[143,29,150,21],[143,32,151,14],[143,33,151,15],[143,34,151,16],[143,36,151,18,"util_1"],[143,42,151,24],[143,43,151,25,"compactAddLength"],[143,59,151,41],[143,61,151,43,"encoded"],[143,68,151,50],[143,69,151,51],[144,4,152,4],[145,2,153,0],[146,2,154,0,"exports"],[146,9,154,7],[146,10,154,8,"Text"],[146,14,154,12],[146,17,154,15,"Text"],[146,21,154,19],[147,0,154,20],[147,3]],"functionMap":{"names":["<global>","decodeText","Text","constructor","get__encodedLength","get__hash","get__isEmpty","get__length","eq","inspect","setOverride","toHex","toHuman","toJSON","toPrimitive","toRawType","toString","toU8a"],"mappings":"AAA;ACO;CDwB;AES;ICM;KDK;IEI;KFE;IGI;KHE;III;KJE;IKI;KLG;IMI;KNI;IOI;KPO;IQI;KRE;ISI;KTI;IUI;KVE;IWI;KXE;IYI;KZE;IaI;KbE;IcI;KdE;IeK;KfO;CFC"},"hasCjsExports":true},"type":"js/module"}]} |