Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/98/67f0edaaa7e468be09fb3d1061d523037e8dac4c2e1d279813a121e0f980c22f7dfedd
T
2025-11-07 20:14:32 +00:00

1 line
15 KiB
Plaintext

{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":113},"end":{"line":4,"column":30,"index":128}}],"key":"atDzfUGaJNRNtwyVumomzH/5ygw=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":15,"index":145},"end":{"line":5,"column":40,"index":170}}],"key":"u0mzEw2nilnHoUWtEdZl0JKHutA=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":19,"index":191},"end":{"line":6,"column":46,"index":218}}],"key":"H94lp+EitftSFqDHaenrSs5zKB0=","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 const rxjs_1 = require(_dependencyMap[0], \"rxjs\");\n const util_1 = require(_dependencyMap[1], \"@polkadot/util\");\n const index_js_1 = 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_1.combineLatest)([api.query[council].members(), (0, rxjs_1.of)([]), (0, rxjs_1.of)([]), (0, rxjs_1.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, index_js_1.memo)(instanceId, () => {\n const [council, elections] = getModules(api);\n return (elections ? queryAll(api, council, elections) : queryCouncil(api, council)).pipe((0, rxjs_1.map)(([councilMembers, candidates, members, runnersUp]) => (0, util_1.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":[[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,"info"],[7,14,3,12],[7,17,3,15,"info"],[7,21,3,19],[8,2,4,0],[8,8,4,6,"rxjs_1"],[8,14,4,12],[8,17,4,15,"require"],[8,24,4,22],[8,25,4,22,"_dependencyMap"],[8,39,4,22],[8,50,4,29],[8,51,4,30],[9,2,5,0],[9,8,5,6,"util_1"],[9,14,5,12],[9,17,5,15,"require"],[9,24,5,22],[9,25,5,22,"_dependencyMap"],[9,39,5,22],[9,60,5,39],[9,61,5,40],[10,2,6,0],[10,8,6,6,"index_js_1"],[10,18,6,16],[10,21,6,19,"require"],[10,28,6,26],[10,29,6,26,"_dependencyMap"],[10,43,6,26],[10,66,6,45],[10,67,6,46],[11,2,7,0],[11,11,7,9,"isSeatHolder"],[11,23,7,21,"isSeatHolder"],[11,24,7,22,"value"],[11,29,7,27],[11,31,7,29],[12,4,8,4],[12,11,8,11],[12,12,8,12,"Array"],[12,17,8,17],[12,18,8,18,"isArray"],[12,25,8,25],[12,26,8,26,"value"],[12,31,8,31],[12,32,8,32],[13,2,9,0],[14,2,10,0],[14,11,10,9,"isCandidateTuple"],[14,27,10,25,"isCandidateTuple"],[14,28,10,26,"value"],[14,33,10,31],[14,35,10,33],[15,4,11,4],[15,11,11,11,"Array"],[15,16,11,16],[15,17,11,17,"isArray"],[15,24,11,24],[15,25,11,25,"value"],[15,30,11,30],[15,31,11,31],[16,2,12,0],[17,2,13,0],[17,11,13,9,"getAccountTuple"],[17,26,13,24,"getAccountTuple"],[17,27,13,25,"value"],[17,32,13,30],[17,34,13,32],[18,4,14,4],[18,11,14,11,"isSeatHolder"],[18,23,14,23],[18,24,14,24,"value"],[18,29,14,29],[18,30,14,30],[18,33,15,10],[18,34,15,11,"value"],[18,39,15,16],[18,40,15,17,"who"],[18,43,15,20],[18,45,15,22,"value"],[18,50,15,27],[18,51,15,28,"stake"],[18,56,15,33],[18,57,15,34],[18,60,16,10,"value"],[18,65,16,15],[19,2,17,0],[20,2,18,0],[20,11,18,9,"getCandidate"],[20,23,18,21,"getCandidate"],[20,24,18,22,"value"],[20,29,18,27],[20,31,18,29],[21,4,19,4],[21,11,19,11,"isCandidateTuple"],[21,27,19,27],[21,28,19,28,"value"],[21,33,19,33],[21,34,19,34],[21,37,20,10,"value"],[21,42,20,15],[21,43,20,16],[21,44,20,17],[21,45,20,18],[21,48,21,10,"value"],[21,53,21,15],[22,2,22,0],[23,2,23,0],[23,11,23,9,"sortAccounts"],[23,23,23,21,"sortAccounts"],[23,24,23,22],[23,27,23,25,"balanceA"],[23,35,23,33],[23,36,23,34],[23,38,23,36],[23,41,23,39,"balanceB"],[23,49,23,47],[23,50,23,48],[23,52,23,50],[24,4,24,4],[24,11,24,11,"balanceB"],[24,19,24,19],[24,20,24,20,"cmp"],[24,23,24,23],[24,24,24,24,"balanceA"],[24,32,24,32],[24,33,24,33],[25,2,25,0],[26,2,26,0],[26,11,26,9,"getConstants"],[26,23,26,21,"getConstants"],[26,24,26,22,"api"],[26,27,26,25],[26,29,26,27,"elections"],[26,38,26,36],[26,40,26,38],[27,4,27,4],[27,11,27,11,"elections"],[27,20,27,20],[27,23,28,10],[28,6,29,12,"candidacyBond"],[28,19,29,25],[28,21,29,27,"api"],[28,24,29,30],[28,25,29,31,"consts"],[28,31,29,37],[28,32,29,38,"elections"],[28,41,29,47],[28,42,29,48],[28,43,29,49,"candidacyBond"],[28,56,29,62],[29,6,30,12,"desiredRunnersUp"],[29,22,30,28],[29,24,30,30,"api"],[29,27,30,33],[29,28,30,34,"consts"],[29,34,30,40],[29,35,30,41,"elections"],[29,44,30,50],[29,45,30,51],[29,46,30,52,"desiredRunnersUp"],[29,62,30,68],[30,6,31,12,"desiredSeats"],[30,18,31,24],[30,20,31,26,"api"],[30,23,31,29],[30,24,31,30,"consts"],[30,30,31,36],[30,31,31,37,"elections"],[30,40,31,46],[30,41,31,47],[30,42,31,48,"desiredMembers"],[30,56,31,62],[31,6,32,12,"termDuration"],[31,18,32,24],[31,20,32,26,"api"],[31,23,32,29],[31,24,32,30,"consts"],[31,30,32,36],[31,31,32,37,"elections"],[31,40,32,46],[31,41,32,47],[31,42,32,48,"termDuration"],[31,54,32,60],[32,6,33,12,"votingBond"],[32,16,33,22],[32,18,33,24,"api"],[32,21,33,27],[32,22,33,28,"consts"],[32,28,33,34],[32,29,33,35,"elections"],[32,38,33,44],[32,39,33,45],[32,40,33,46],[32,52,33,58],[32,53,33,59],[33,6,34,12,"votingBondBase"],[33,20,34,26],[33,22,34,28,"api"],[33,25,34,31],[33,26,34,32,"consts"],[33,32,34,38],[33,33,34,39,"elections"],[33,42,34,48],[33,43,34,49],[33,44,34,50,"votingBondBase"],[33,58,34,64],[34,6,35,12,"votingBondFactor"],[34,22,35,28],[34,24,35,30,"api"],[34,27,35,33],[34,28,35,34,"consts"],[34,34,35,40],[34,35,35,41,"elections"],[34,44,35,50],[34,45,35,51],[34,46,35,52,"votingBondFactor"],[35,4,36,8],[35,5,36,9],[35,8,37,10],[35,9,37,11],[35,10,37,12],[36,2,38,0],[37,2,39,0],[37,11,39,9,"getModules"],[37,21,39,19,"getModules"],[37,22,39,20,"api"],[37,25,39,23],[37,27,39,25],[38,4,40,4],[38,10,40,10],[38,11,40,11,"council"],[38,18,40,18],[38,19,40,19],[38,22,40,22,"api"],[38,25,40,25],[38,26,40,26,"registry"],[38,34,40,34],[38,35,40,35,"getModuleInstances"],[38,53,40,53],[38,54,40,54,"api"],[38,57,40,57],[38,58,40,58,"runtimeVersion"],[38,72,40,72],[38,73,40,73,"specName"],[38,81,40,81],[38,83,40,83],[38,92,40,92],[38,93,40,93],[38,97,40,97],[38,98,40,98],[38,107,40,107],[38,108,40,108],[39,4,41,4],[39,10,41,10,"elections"],[39,19,41,19],[39,22,41,22,"api"],[39,25,41,25],[39,26,41,26,"query"],[39,31,41,31],[39,32,41,32],[39,50,41,50],[39,51,41,51],[39,54,42,10],[39,72,42,28],[39,75,43,10,"api"],[39,78,43,13],[39,79,43,14,"query"],[39,84,43,19],[39,85,43,20],[39,104,43,39],[39,105,43,40],[39,108,44,14],[39,127,44,33],[39,130,45,14,"api"],[39,133,45,17],[39,134,45,18,"query"],[39,139,45,23],[39,140,45,24,"elections"],[39,149,45,33],[39,152,46,18],[39,163,46,29],[39,166,47,18],[39,170,47,22],[40,4,48,4],[41,4,49,4],[42,4,50,4],[42,10,50,10,"resolvedCouncil"],[42,25,50,25],[42,28,50,28,"api"],[42,31,50,31],[42,32,50,32,"query"],[42,37,50,37],[42,38,50,38,"council"],[42,45,50,45],[42,46,50,46],[42,49,50,49,"council"],[42,56,50,56],[42,59,50,59],[42,68,50,68],[43,4,51,4],[43,11,51,11],[43,12,51,12,"resolvedCouncil"],[43,27,51,27],[43,29,51,29,"elections"],[43,38,51,38],[43,39,51,39],[44,2,52,0],[45,2,53,0],[45,11,53,9,"queryAll"],[45,19,53,17,"queryAll"],[45,20,53,18,"api"],[45,23,53,21],[45,25,53,23,"council"],[45,32,53,30],[45,34,53,32,"elections"],[45,43,53,41],[45,45,53,43],[46,4,54,4],[46,11,54,11,"api"],[46,14,54,14],[46,15,54,15,"queryMulti"],[46,25,54,25],[46,26,54,26],[46,27,55,8,"api"],[46,30,55,11],[46,31,55,12,"query"],[46,36,55,17],[46,37,55,18,"council"],[46,44,55,25],[46,45,55,26],[46,46,55,27,"members"],[46,53,55,34],[46,55,56,8,"api"],[46,58,56,11],[46,59,56,12,"query"],[46,64,56,17],[46,65,56,18,"elections"],[46,74,56,27],[46,75,56,28],[46,76,56,29,"candidates"],[46,86,56,39],[46,88,57,8,"api"],[46,91,57,11],[46,92,57,12,"query"],[46,97,57,17],[46,98,57,18,"elections"],[46,107,57,27],[46,108,57,28],[46,109,57,29,"members"],[46,116,57,36],[46,118,58,8,"api"],[46,121,58,11],[46,122,58,12,"query"],[46,127,58,17],[46,128,58,18,"elections"],[46,137,58,27],[46,138,58,28],[46,139,58,29,"runnersUp"],[46,148,58,38],[46,149,59,5],[46,150,59,6],[47,2,60,0],[48,2,61,0],[48,11,61,9,"queryCouncil"],[48,23,61,21,"queryCouncil"],[48,24,61,22,"api"],[48,27,61,25],[48,29,61,27,"council"],[48,36,61,34],[48,38,61,36],[49,4,62,4],[49,11,62,11],[49,12,62,12],[49,13,62,13],[49,15,62,15,"rxjs_1"],[49,21,62,21],[49,22,62,22,"combineLatest"],[49,35,62,35],[49,37,62,37],[49,38,63,8,"api"],[49,41,63,11],[49,42,63,12,"query"],[49,47,63,17],[49,48,63,18,"council"],[49,55,63,25],[49,56,63,26],[49,57,63,27,"members"],[49,64,63,34],[49,65,63,35],[49,66,63,36],[49,68,64,8],[49,69,64,9],[49,70,64,10],[49,72,64,12,"rxjs_1"],[49,78,64,18],[49,79,64,19,"of"],[49,81,64,21],[49,83,64,23],[49,85,64,25],[49,86,64,26],[49,88,65,8],[49,89,65,9],[49,90,65,10],[49,92,65,12,"rxjs_1"],[49,98,65,18],[49,99,65,19,"of"],[49,101,65,21],[49,103,65,23],[49,105,65,25],[49,106,65,26],[49,108,66,8],[49,109,66,9],[49,110,66,10],[49,112,66,12,"rxjs_1"],[49,118,66,18],[49,119,66,19,"of"],[49,121,66,21],[49,123,66,23],[49,125,66,25],[49,126,66,26],[49,127,67,5],[49,128,67,6],[50,2,68,0],[51,2,69,0],[52,0,70,0],[53,0,71,0],[54,0,72,0],[55,0,73,0],[56,0,74,0],[57,0,75,0],[58,0,76,0],[59,0,77,0],[60,0,78,0],[61,2,79,0],[61,11,79,9,"info"],[61,15,79,13,"info"],[61,16,79,14,"instanceId"],[61,26,79,24],[61,28,79,26,"api"],[61,31,79,29],[61,33,79,31],[62,4,80,4],[62,11,80,11],[62,12,80,12],[62,13,80,13],[62,15,80,15,"index_js_1"],[62,25,80,25],[62,26,80,26,"memo"],[62,30,80,30],[62,32,80,32,"instanceId"],[62,42,80,42],[62,44,80,44],[62,50,80,50],[63,6,81,8],[63,12,81,14],[63,13,81,15,"council"],[63,20,81,22],[63,22,81,24,"elections"],[63,31,81,33],[63,32,81,34],[63,35,81,37,"getModules"],[63,45,81,47],[63,46,81,48,"api"],[63,49,81,51],[63,50,81,52],[64,6,82,8],[64,13,82,15],[64,14,82,16,"elections"],[64,23,82,25],[64,26,83,14,"queryAll"],[64,34,83,22],[64,35,83,23,"api"],[64,38,83,26],[64,40,83,28,"council"],[64,47,83,35],[64,49,83,37,"elections"],[64,58,83,46],[64,59,83,47],[64,62,84,14,"queryCouncil"],[64,74,84,26],[64,75,84,27,"api"],[64,78,84,30],[64,80,84,32,"council"],[64,87,84,39],[64,88,84,40],[64,90,84,42,"pipe"],[64,94,84,46],[64,95,84,47],[64,96,84,48],[64,97,84,49],[64,99,84,51,"rxjs_1"],[64,105,84,57],[64,106,84,58,"map"],[64,109,84,61],[64,111,84,63],[64,112,84,64],[64,113,84,65,"councilMembers"],[64,127,84,79],[64,129,84,81,"candidates"],[64,139,84,91],[64,141,84,93,"members"],[64,148,84,100],[64,150,84,102,"runnersUp"],[64,159,84,111],[64,160,84,112],[64,165,84,117],[64,166,84,118],[64,167,84,119],[64,169,84,121,"util_1"],[64,175,84,127],[64,176,84,128,"objectSpread"],[64,188,84,140],[64,190,84,142],[64,191,84,143],[64,192,84,144],[64,194,84,146,"getConstants"],[64,206,84,158],[64,207,84,159,"api"],[64,210,84,162],[64,212,84,164,"elections"],[64,221,84,173],[64,222,84,174],[64,224,84,176],[65,8,85,12,"candidateCount"],[65,22,85,26],[65,24,85,28,"api"],[65,27,85,31],[65,28,85,32,"registry"],[65,36,85,40],[65,37,85,41,"createType"],[65,47,85,51],[65,48,85,52],[65,53,85,57],[65,55,85,59,"candidates"],[65,65,85,69],[65,66,85,70,"length"],[65,72,85,76],[65,73,85,77],[66,8,86,12,"candidates"],[66,18,86,22],[66,20,86,24,"candidates"],[66,30,86,34],[66,31,86,35,"map"],[66,34,86,38],[66,35,86,39,"getCandidate"],[66,47,86,51],[66,48,86,52],[67,8,87,12,"members"],[67,15,87,19],[67,17,87,21,"members"],[67,24,87,28],[67,25,87,29,"length"],[67,31,87,35],[67,34,88,18,"members"],[67,41,88,25],[67,42,88,26,"map"],[67,45,88,29],[67,46,88,30,"getAccountTuple"],[67,61,88,45],[67,62,88,46],[67,63,88,47,"sort"],[67,67,88,51],[67,68,88,52,"sortAccounts"],[67,80,88,64],[67,81,88,65],[67,84,89,18,"councilMembers"],[67,98,89,32],[67,99,89,33,"map"],[67,102,89,36],[67,103,89,38,"a"],[67,104,89,39],[67,108,89,44],[67,109,89,45,"a"],[67,110,89,46],[67,112,89,48,"api"],[67,115,89,51],[67,116,89,52,"registry"],[67,124,89,60],[67,125,89,61,"createType"],[67,135,89,71],[67,136,89,72],[67,145,89,81],[67,146,89,82],[67,147,89,83],[67,148,89,84],[68,8,90,12,"runnersUp"],[68,17,90,21],[68,19,90,23,"runnersUp"],[68,28,90,32],[68,29,90,33,"map"],[68,32,90,36],[68,33,90,37,"getAccountTuple"],[68,48,90,52],[68,49,90,53],[68,50,90,54,"sort"],[68,54,90,58],[68,55,90,59,"sortAccounts"],[68,67,90,71],[69,6,91,8],[69,7,91,9],[69,8,91,10],[69,9,91,11],[69,10,91,12],[70,4,92,4],[70,5,92,5],[70,6,92,6],[71,2,93,0],[72,0,93,1],[72,3]],"functionMap":{"names":["<global>","isSeatHolder","isCandidateTuple","getAccountTuple","getCandidate","sortAccounts","getConstants","getModules","queryAll","queryCouncil","info","<anonymous>","councilMembers.map$argument_0"],"mappings":"AAA;ACM;CDE;AEC;CFE;AGC;CHI;AIC;CJI;AKC;CLE;AMC;CNY;AOC;CPa;AQC;CRO;ASC;CTO;AUW;4CCC;qCCS,8CD;KDG;CVC"},"hasCjsExports":true},"type":"js/module"}]}