mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 18:01:02 +00:00
1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":46,"index":46}}],"key":"PnOMrhZAPWoeW3ygrvUJ7ff768Y=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":47},"end":{"line":2,"column":46,"index":93}}],"key":"ISHU1ovvPMrCldqRjtd1JhW9dyo=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":94},"end":{"line":3,"column":40,"index":134}}],"key":"GRJlO1cmIj14nBxcasNpiq30og4=","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.info = info;\n var _rxjs = require(_dependencyMap[0], \"rxjs\");\n var _polkadotUtil = require(_dependencyMap[1], \"@polkadot/util\");\n var _utilIndexJs = require(_dependencyMap[2], \"../util/index.js\");\n function isSeatHolder(value) {\n return !Array.isArray(value);\n }\n function isCandidateTuple(value) {\n return Array.isArray(value);\n }\n function getAccountTuple(value) {\n return isSeatHolder(value) ? [value.who, value.stake] : value;\n }\n function getCandidate(value) {\n return isCandidateTuple(value) ? value[0] : value;\n }\n function sortAccounts([, balanceA], [, balanceB]) {\n return balanceB.cmp(balanceA);\n }\n function getConstants(api, elections) {\n return elections ? {\n candidacyBond: api.consts[elections].candidacyBond,\n desiredRunnersUp: api.consts[elections].desiredRunnersUp,\n desiredSeats: api.consts[elections].desiredMembers,\n termDuration: api.consts[elections].termDuration,\n votingBond: api.consts[elections]['votingBond'],\n votingBondBase: api.consts[elections].votingBondBase,\n votingBondFactor: api.consts[elections].votingBondFactor\n } : {};\n }\n function getModules(api) {\n const [council] = api.registry.getModuleInstances(api.runtimeVersion.specName, 'council') || ['council'];\n const elections = api.query['phragmenElection'] ? 'phragmenElection' : api.query['electionsPhragmen'] ? 'electionsPhragmen' : api.query.elections ? 'elections' : null;\n // In some cases council here can refer to `generalCouncil` depending on what the chain specific override is.\n // Therefore, we check to see if it exists in the query field. If it does not we default to `council`.\n const resolvedCouncil = api.query[council] ? council : 'council';\n return [resolvedCouncil, elections];\n }\n function queryAll(api, council, elections) {\n return api.queryMulti([api.query[council].members, api.query[elections].candidates, api.query[elections].members, api.query[elections].runnersUp]);\n }\n function queryCouncil(api, council) {\n return (0, _rxjs.combineLatest)([api.query[council].members(), (0, _rxjs.of)([]), (0, _rxjs.of)([]), (0, _rxjs.of)([])]);\n }\n /**\n * @name info\n * @description An object containing the combined results of the storage queries for all relevant election module properties.\n * @example\n * ```javascript\n * api.derive.elections.info(({ members, candidates }) => {\n * console.log(`There are currently ${members.length} council members and ${candidates.length} prospective council candidates.`);\n * });\n * ```\n */\n function info(instanceId, api) {\n return (0, _utilIndexJs.memo)(instanceId, () => {\n const [council, elections] = getModules(api);\n return (elections ? queryAll(api, council, elections) : queryCouncil(api, council)).pipe((0, _rxjs.map)(([councilMembers, candidates, members, runnersUp]) => (0, _polkadotUtil.objectSpread)({}, getConstants(api, elections), {\n candidateCount: api.registry.createType('u32', candidates.length),\n candidates: candidates.map(getCandidate),\n members: members.length ? members.map(getAccountTuple).sort(sortAccounts) : councilMembers.map(a => [a, api.registry.createType('Balance')]),\n runnersUp: runnersUp.map(getAccountTuple).sort(sortAccounts)\n })));\n });\n }\n});","lineCount":72,"map":[[7,2,76,0,"exports"],[7,9,76,0],[7,10,76,0,"info"],[7,14,76,0],[7,17,76,0,"info"],[7,21,76,0],[8,2,1,0],[8,6,1,0,"_rxjs"],[8,11,1,0],[8,14,1,0,"require"],[8,21,1,0],[8,22,1,0,"_dependencyMap"],[8,36,1,0],[9,2,2,0],[9,6,2,0,"_polkadotUtil"],[9,19,2,0],[9,22,2,0,"require"],[9,29,2,0],[9,30,2,0,"_dependencyMap"],[9,44,2,0],[10,2,3,0],[10,6,3,0,"_utilIndexJs"],[10,18,3,0],[10,21,3,0,"require"],[10,28,3,0],[10,29,3,0,"_dependencyMap"],[10,43,3,0],[11,2,4,0],[11,11,4,9,"isSeatHolder"],[11,23,4,21,"isSeatHolder"],[11,24,4,22,"value"],[11,29,4,27],[11,31,4,29],[12,4,5,4],[12,11,5,11],[12,12,5,12,"Array"],[12,17,5,17],[12,18,5,18,"isArray"],[12,25,5,25],[12,26,5,26,"value"],[12,31,5,31],[12,32,5,32],[13,2,6,0],[14,2,7,0],[14,11,7,9,"isCandidateTuple"],[14,27,7,25,"isCandidateTuple"],[14,28,7,26,"value"],[14,33,7,31],[14,35,7,33],[15,4,8,4],[15,11,8,11,"Array"],[15,16,8,16],[15,17,8,17,"isArray"],[15,24,8,24],[15,25,8,25,"value"],[15,30,8,30],[15,31,8,31],[16,2,9,0],[17,2,10,0],[17,11,10,9,"getAccountTuple"],[17,26,10,24,"getAccountTuple"],[17,27,10,25,"value"],[17,32,10,30],[17,34,10,32],[18,4,11,4],[18,11,11,11,"isSeatHolder"],[18,23,11,23],[18,24,11,24,"value"],[18,29,11,29],[18,30,11,30],[18,33,12,10],[18,34,12,11,"value"],[18,39,12,16],[18,40,12,17,"who"],[18,43,12,20],[18,45,12,22,"value"],[18,50,12,27],[18,51,12,28,"stake"],[18,56,12,33],[18,57,12,34],[18,60,13,10,"value"],[18,65,13,15],[19,2,14,0],[20,2,15,0],[20,11,15,9,"getCandidate"],[20,23,15,21,"getCandidate"],[20,24,15,22,"value"],[20,29,15,27],[20,31,15,29],[21,4,16,4],[21,11,16,11,"isCandidateTuple"],[21,27,16,27],[21,28,16,28,"value"],[21,33,16,33],[21,34,16,34],[21,37,17,10,"value"],[21,42,17,15],[21,43,17,16],[21,44,17,17],[21,45,17,18],[21,48,18,10,"value"],[21,53,18,15],[22,2,19,0],[23,2,20,0],[23,11,20,9,"sortAccounts"],[23,23,20,21,"sortAccounts"],[23,24,20,22],[23,27,20,25,"balanceA"],[23,35,20,33],[23,36,20,34],[23,38,20,36],[23,41,20,39,"balanceB"],[23,49,20,47],[23,50,20,48],[23,52,20,50],[24,4,21,4],[24,11,21,11,"balanceB"],[24,19,21,19],[24,20,21,20,"cmp"],[24,23,21,23],[24,24,21,24,"balanceA"],[24,32,21,32],[24,33,21,33],[25,2,22,0],[26,2,23,0],[26,11,23,9,"getConstants"],[26,23,23,21,"getConstants"],[26,24,23,22,"api"],[26,27,23,25],[26,29,23,27,"elections"],[26,38,23,36],[26,40,23,38],[27,4,24,4],[27,11,24,11,"elections"],[27,20,24,20],[27,23,25,10],[28,6,26,12,"candidacyBond"],[28,19,26,25],[28,21,26,27,"api"],[28,24,26,30],[28,25,26,31,"consts"],[28,31,26,37],[28,32,26,38,"elections"],[28,41,26,47],[28,42,26,48],[28,43,26,49,"candidacyBond"],[28,56,26,62],[29,6,27,12,"desiredRunnersUp"],[29,22,27,28],[29,24,27,30,"api"],[29,27,27,33],[29,28,27,34,"consts"],[29,34,27,40],[29,35,27,41,"elections"],[29,44,27,50],[29,45,27,51],[29,46,27,52,"desiredRunnersUp"],[29,62,27,68],[30,6,28,12,"desiredSeats"],[30,18,28,24],[30,20,28,26,"api"],[30,23,28,29],[30,24,28,30,"consts"],[30,30,28,36],[30,31,28,37,"elections"],[30,40,28,46],[30,41,28,47],[30,42,28,48,"desiredMembers"],[30,56,28,62],[31,6,29,12,"termDuration"],[31,18,29,24],[31,20,29,26,"api"],[31,23,29,29],[31,24,29,30,"consts"],[31,30,29,36],[31,31,29,37,"elections"],[31,40,29,46],[31,41,29,47],[31,42,29,48,"termDuration"],[31,54,29,60],[32,6,30,12,"votingBond"],[32,16,30,22],[32,18,30,24,"api"],[32,21,30,27],[32,22,30,28,"consts"],[32,28,30,34],[32,29,30,35,"elections"],[32,38,30,44],[32,39,30,45],[32,40,30,46],[32,52,30,58],[32,53,30,59],[33,6,31,12,"votingBondBase"],[33,20,31,26],[33,22,31,28,"api"],[33,25,31,31],[33,26,31,32,"consts"],[33,32,31,38],[33,33,31,39,"elections"],[33,42,31,48],[33,43,31,49],[33,44,31,50,"votingBondBase"],[33,58,31,64],[34,6,32,12,"votingBondFactor"],[34,22,32,28],[34,24,32,30,"api"],[34,27,32,33],[34,28,32,34,"consts"],[34,34,32,40],[34,35,32,41,"elections"],[34,44,32,50],[34,45,32,51],[34,46,32,52,"votingBondFactor"],[35,4,33,8],[35,5,33,9],[35,8,34,10],[35,9,34,11],[35,10,34,12],[36,2,35,0],[37,2,36,0],[37,11,36,9,"getModules"],[37,21,36,19,"getModules"],[37,22,36,20,"api"],[37,25,36,23],[37,27,36,25],[38,4,37,4],[38,10,37,10],[38,11,37,11,"council"],[38,18,37,18],[38,19,37,19],[38,22,37,22,"api"],[38,25,37,25],[38,26,37,26,"registry"],[38,34,37,34],[38,35,37,35,"getModuleInstances"],[38,53,37,53],[38,54,37,54,"api"],[38,57,37,57],[38,58,37,58,"runtimeVersion"],[38,72,37,72],[38,73,37,73,"specName"],[38,81,37,81],[38,83,37,83],[38,92,37,92],[38,93,37,93],[38,97,37,97],[38,98,37,98],[38,107,37,107],[38,108,37,108],[39,4,38,4],[39,10,38,10,"elections"],[39,19,38,19],[39,22,38,22,"api"],[39,25,38,25],[39,26,38,26,"query"],[39,31,38,31],[39,32,38,32],[39,50,38,50],[39,51,38,51],[39,54,39,10],[39,72,39,28],[39,75,40,10,"api"],[39,78,40,13],[39,79,40,14,"query"],[39,84,40,19],[39,85,40,20],[39,104,40,39],[39,105,40,40],[39,108,41,14],[39,127,41,33],[39,130,42,14,"api"],[39,133,42,17],[39,134,42,18,"query"],[39,139,42,23],[39,140,42,24,"elections"],[39,149,42,33],[39,152,43,18],[39,163,43,29],[39,166,44,18],[39,170,44,22],[40,4,45,4],[41,4,46,4],[42,4,47,4],[42,10,47,10,"resolvedCouncil"],[42,25,47,25],[42,28,47,28,"api"],[42,31,47,31],[42,32,47,32,"query"],[42,37,47,37],[42,38,47,38,"council"],[42,45,47,45],[42,46,47,46],[42,49,47,49,"council"],[42,56,47,56],[42,59,47,59],[42,68,47,68],[43,4,48,4],[43,11,48,11],[43,12,48,12,"resolvedCouncil"],[43,27,48,27],[43,29,48,29,"elections"],[43,38,48,38],[43,39,48,39],[44,2,49,0],[45,2,50,0],[45,11,50,9,"queryAll"],[45,19,50,17,"queryAll"],[45,20,50,18,"api"],[45,23,50,21],[45,25,50,23,"council"],[45,32,50,30],[45,34,50,32,"elections"],[45,43,50,41],[45,45,50,43],[46,4,51,4],[46,11,51,11,"api"],[46,14,51,14],[46,15,51,15,"queryMulti"],[46,25,51,25],[46,26,51,26],[46,27,52,8,"api"],[46,30,52,11],[46,31,52,12,"query"],[46,36,52,17],[46,37,52,18,"council"],[46,44,52,25],[46,45,52,26],[46,46,52,27,"members"],[46,53,52,34],[46,55,53,8,"api"],[46,58,53,11],[46,59,53,12,"query"],[46,64,53,17],[46,65,53,18,"elections"],[46,74,53,27],[46,75,53,28],[46,76,53,29,"candidates"],[46,86,53,39],[46,88,54,8,"api"],[46,91,54,11],[46,92,54,12,"query"],[46,97,54,17],[46,98,54,18,"elections"],[46,107,54,27],[46,108,54,28],[46,109,54,29,"members"],[46,116,54,36],[46,118,55,8,"api"],[46,121,55,11],[46,122,55,12,"query"],[46,127,55,17],[46,128,55,18,"elections"],[46,137,55,27],[46,138,55,28],[46,139,55,29,"runnersUp"],[46,148,55,38],[46,149,56,5],[46,150,56,6],[47,2,57,0],[48,2,58,0],[48,11,58,9,"queryCouncil"],[48,23,58,21,"queryCouncil"],[48,24,58,22,"api"],[48,27,58,25],[48,29,58,27,"council"],[48,36,58,34],[48,38,58,36],[49,4,59,4],[49,11,59,11],[49,15,59,11,"combineLatest"],[49,20,59,24],[49,21,59,24,"combineLatest"],[49,34,59,24],[49,36,59,25],[49,37,60,8,"api"],[49,40,60,11],[49,41,60,12,"query"],[49,46,60,17],[49,47,60,18,"council"],[49,54,60,25],[49,55,60,26],[49,56,60,27,"members"],[49,63,60,34],[49,64,60,35],[49,65,60,36],[49,67,61,8],[49,71,61,8,"of"],[49,76,61,10],[49,77,61,10,"of"],[49,79,61,10],[49,81,61,11],[49,83,61,13],[49,84,61,14],[49,86,62,8],[49,90,62,8,"of"],[49,95,62,10],[49,96,62,10,"of"],[49,98,62,10],[49,100,62,11],[49,102,62,13],[49,103,62,14],[49,105,63,8],[49,109,63,8,"of"],[49,114,63,10],[49,115,63,10,"of"],[49,117,63,10],[49,119,63,11],[49,121,63,13],[49,122,63,14],[49,123,64,5],[49,124,64,6],[50,2,65,0],[51,2,66,0],[52,0,67,0],[53,0,68,0],[54,0,69,0],[55,0,70,0],[56,0,71,0],[57,0,72,0],[58,0,73,0],[59,0,74,0],[60,0,75,0],[61,2,76,7],[61,11,76,16,"info"],[61,15,76,20,"info"],[61,16,76,21,"instanceId"],[61,26,76,31],[61,28,76,33,"api"],[61,31,76,36],[61,33,76,38],[62,4,77,4],[62,11,77,11],[62,15,77,11,"memo"],[62,27,77,15],[62,28,77,15,"memo"],[62,32,77,15],[62,34,77,16,"instanceId"],[62,44,77,26],[62,46,77,28],[62,52,77,34],[63,6,78,8],[63,12,78,14],[63,13,78,15,"council"],[63,20,78,22],[63,22,78,24,"elections"],[63,31,78,33],[63,32,78,34],[63,35,78,37,"getModules"],[63,45,78,47],[63,46,78,48,"api"],[63,49,78,51],[63,50,78,52],[64,6,79,8],[64,13,79,15],[64,14,79,16,"elections"],[64,23,79,25],[64,26,80,14,"queryAll"],[64,34,80,22],[64,35,80,23,"api"],[64,38,80,26],[64,40,80,28,"council"],[64,47,80,35],[64,49,80,37,"elections"],[64,58,80,46],[64,59,80,47],[64,62,81,14,"queryCouncil"],[64,74,81,26],[64,75,81,27,"api"],[64,78,81,30],[64,80,81,32,"council"],[64,87,81,39],[64,88,81,40],[64,90,81,42,"pipe"],[64,94,81,46],[64,95,81,47],[64,99,81,47,"map"],[64,104,81,50],[64,105,81,50,"map"],[64,108,81,50],[64,110,81,51],[64,111,81,52],[64,112,81,53,"councilMembers"],[64,126,81,67],[64,128,81,69,"candidates"],[64,138,81,79],[64,140,81,81,"members"],[64,147,81,88],[64,149,81,90,"runnersUp"],[64,158,81,99],[64,159,81,100],[64,164,81,105],[64,168,81,105,"objectSpread"],[64,181,81,117],[64,182,81,117,"objectSpread"],[64,194,81,117],[64,196,81,118],[64,197,81,119],[64,198,81,120],[64,200,81,122,"getConstants"],[64,212,81,134],[64,213,81,135,"api"],[64,216,81,138],[64,218,81,140,"elections"],[64,227,81,149],[64,228,81,150],[64,230,81,152],[65,8,82,12,"candidateCount"],[65,22,82,26],[65,24,82,28,"api"],[65,27,82,31],[65,28,82,32,"registry"],[65,36,82,40],[65,37,82,41,"createType"],[65,47,82,51],[65,48,82,52],[65,53,82,57],[65,55,82,59,"candidates"],[65,65,82,69],[65,66,82,70,"length"],[65,72,82,76],[65,73,82,77],[66,8,83,12,"candidates"],[66,18,83,22],[66,20,83,24,"candidates"],[66,30,83,34],[66,31,83,35,"map"],[66,34,83,38],[66,35,83,39,"getCandidate"],[66,47,83,51],[66,48,83,52],[67,8,84,12,"members"],[67,15,84,19],[67,17,84,21,"members"],[67,24,84,28],[67,25,84,29,"length"],[67,31,84,35],[67,34,85,18,"members"],[67,41,85,25],[67,42,85,26,"map"],[67,45,85,29],[67,46,85,30,"getAccountTuple"],[67,61,85,45],[67,62,85,46],[67,63,85,47,"sort"],[67,67,85,51],[67,68,85,52,"sortAccounts"],[67,80,85,64],[67,81,85,65],[67,84,86,18,"councilMembers"],[67,98,86,32],[67,99,86,33,"map"],[67,102,86,36],[67,103,86,38,"a"],[67,104,86,39],[67,108,86,44],[67,109,86,45,"a"],[67,110,86,46],[67,112,86,48,"api"],[67,115,86,51],[67,116,86,52,"registry"],[67,124,86,60],[67,125,86,61,"createType"],[67,135,86,71],[67,136,86,72],[67,145,86,81],[67,146,86,82],[67,147,86,83],[67,148,86,84],[68,8,87,12,"runnersUp"],[68,17,87,21],[68,19,87,23,"runnersUp"],[68,28,87,32],[68,29,87,33,"map"],[68,32,87,36],[68,33,87,37,"getAccountTuple"],[68,48,87,52],[68,49,87,53],[68,50,87,54,"sort"],[68,54,87,58],[68,55,87,59,"sortAccounts"],[68,67,87,71],[69,6,88,8],[69,7,88,9],[69,8,88,10],[69,9,88,11],[69,10,88,12],[70,4,89,4],[70,5,89,5],[70,6,89,6],[71,2,90,0],[72,0,90,1],[72,3]],"functionMap":{"names":["<global>","isSeatHolder","isCandidateTuple","getAccountTuple","getCandidate","sortAccounts","getConstants","getModules","queryAll","queryCouncil","info","memo$argument_1","map$argument_0","councilMembers.map$argument_0"],"mappings":"AAA;ACG;CDE;AEC;CFE;AGC;CHI;AIC;CJI;AKC;CLE;AMC;CNY;AOC;CPa;AQC;CRO;ASC;CTO;OUW;4BCC;mDCI;qCCK,8CD;UDE;KDC;CVC"},"hasCjsExports":false},"type":"js/module"}]} |