mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 06:31:03 +00:00
1 line
8.0 KiB
Plaintext
1 line
8.0 KiB
Plaintext
{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":125},"end":{"line":4,"column":30,"index":140}}],"key":"atDzfUGaJNRNtwyVumomzH/5ygw=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":19,"index":161},"end":{"line":5,"column":46,"index":188}}],"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.candidates = candidates;\n const rxjs_1 = require(_dependencyMap[0], \"rxjs\");\n const index_js_1 = require(_dependencyMap[1], \"../util/index.js\");\n function getPrev(api) {\n return api.query.society.candidates().pipe((0, rxjs_1.switchMap)(candidates => (0, rxjs_1.combineLatest)([(0, rxjs_1.of)(candidates), api.query.society['suspendedCandidates'].multi(candidates.map(({\n who\n }) => who))])), (0, rxjs_1.map)(([candidates, suspended]) => candidates.map(({\n kind,\n value,\n who\n }, index) => ({\n accountId: who,\n isSuspended: suspended[index].isSome,\n kind,\n value\n }))));\n }\n function getCurr(api) {\n return api.query.society.candidates.entries().pipe((0, rxjs_1.map)(entries => entries.filter(([, opt]) => opt.isSome).map(([{\n args: [accountId]\n }, opt]) => [accountId, opt.unwrap()])\n // FIXME We are missing the new fields from the candidate record\n .map(([accountId, {\n bid,\n kind\n }]) => ({\n accountId,\n isSuspended: false,\n kind,\n value: bid\n }))));\n }\n /**\n * @name candidate\n * @description Retrieves the list of candidates for the society module.\n * @example\n * ```javascript\n * const societyCandidates = await api.derive.society.candidates();\n * console.log(societyCandidates);\n * ```\n */\n function candidates(instanceId, api) {\n return (0, index_js_1.memo)(instanceId, () => api.query.society['suspendedCandidates'] && api.query.society.candidates.creator.meta.type.isPlain ? getPrev(api) : getCurr(api));\n }\n});","lineCount":51,"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,"candidates"],[7,20,3,18],[7,23,3,21,"candidates"],[7,33,3,31],[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,"index_js_1"],[9,18,5,16],[9,21,5,19,"require"],[9,28,5,26],[9,29,5,26,"_dependencyMap"],[9,43,5,26],[9,66,5,45],[9,67,5,46],[10,2,6,0],[10,11,6,9,"getPrev"],[10,18,6,16,"getPrev"],[10,19,6,17,"api"],[10,22,6,20],[10,24,6,22],[11,4,7,4],[11,11,7,11,"api"],[11,14,7,14],[11,15,7,15,"query"],[11,20,7,20],[11,21,7,21,"society"],[11,28,7,28],[11,29,7,29,"candidates"],[11,39,7,39],[11,40,7,40],[11,41,7,41],[11,42,7,42,"pipe"],[11,46,7,46],[11,47,7,47],[11,48,7,48],[11,49,7,49],[11,51,7,51,"rxjs_1"],[11,57,7,57],[11,58,7,58,"switchMap"],[11,67,7,67],[11,69,7,70,"candidates"],[11,79,7,80],[11,83,7,85],[11,84,7,86],[11,85,7,87],[11,87,7,89,"rxjs_1"],[11,93,7,95],[11,94,7,96,"combineLatest"],[11,107,7,109],[11,109,7,111],[11,110,8,8],[11,111,8,9],[11,112,8,10],[11,114,8,12,"rxjs_1"],[11,120,8,18],[11,121,8,19,"of"],[11,123,8,21],[11,125,8,23,"candidates"],[11,135,8,33],[11,136,8,34],[11,138,9,8,"api"],[11,141,9,11],[11,142,9,12,"query"],[11,147,9,17],[11,148,9,18,"society"],[11,155,9,25],[11,156,9,26],[11,177,9,47],[11,178,9,48],[11,179,9,49,"multi"],[11,184,9,54],[11,185,9,55,"candidates"],[11,195,9,65],[11,196,9,66,"map"],[11,199,9,69],[11,200,9,70],[11,201,9,71],[12,6,9,73,"who"],[13,4,9,77],[13,5,9,78],[13,10,9,83,"who"],[13,13,9,86],[13,14,9,87],[13,15,9,88],[13,16,10,5],[13,17,10,6],[13,18,10,7],[13,20,10,9],[13,21,10,10],[13,22,10,11],[13,24,10,13,"rxjs_1"],[13,30,10,19],[13,31,10,20,"map"],[13,34,10,23],[13,36,10,25],[13,37,10,26],[13,38,10,27,"candidates"],[13,48,10,37],[13,50,10,39,"suspended"],[13,59,10,48],[13,60,10,49],[13,65,10,54,"candidates"],[13,75,10,64],[13,76,10,65,"map"],[13,79,10,68],[13,80,10,69],[13,81,10,70],[14,6,10,72,"kind"],[14,10,10,76],[15,6,10,78,"value"],[15,11,10,83],[16,6,10,85,"who"],[17,4,10,89],[17,5,10,90],[17,7,10,92,"index"],[17,12,10,97],[17,18,10,103],[18,6,11,8,"accountId"],[18,15,11,17],[18,17,11,19,"who"],[18,20,11,22],[19,6,12,8,"isSuspended"],[19,17,12,19],[19,19,12,21,"suspended"],[19,28,12,30],[19,29,12,31,"index"],[19,34,12,36],[19,35,12,37],[19,36,12,38,"isSome"],[19,42,12,44],[20,6,13,8,"kind"],[20,10,13,12],[21,6,14,8,"value"],[22,4,15,4],[22,5,15,5],[22,6,15,6],[22,7,15,7],[22,8,15,8],[22,9,15,9],[23,2,16,0],[24,2,17,0],[24,11,17,9,"getCurr"],[24,18,17,16,"getCurr"],[24,19,17,17,"api"],[24,22,17,20],[24,24,17,22],[25,4,18,4],[25,11,18,11,"api"],[25,14,18,14],[25,15,18,15,"query"],[25,20,18,20],[25,21,18,21,"society"],[25,28,18,28],[25,29,18,29,"candidates"],[25,39,18,39],[25,40,18,40,"entries"],[25,47,18,47],[25,48,18,48],[25,49,18,49],[25,50,18,50,"pipe"],[25,54,18,54],[25,55,18,55],[25,56,18,56],[25,57,18,57],[25,59,18,59,"rxjs_1"],[25,65,18,65],[25,66,18,66,"map"],[25,69,18,69],[25,71,18,72,"entries"],[25,78,18,79],[25,82,18,84,"entries"],[25,89,18,91],[25,90,19,9,"filter"],[25,96,19,15],[25,97,19,16],[25,98,19,17],[25,101,19,20,"opt"],[25,104,19,23],[25,105,19,24],[25,110,19,29,"opt"],[25,113,19,32],[25,114,19,33,"isSome"],[25,120,19,39],[25,121,19,40],[25,122,20,9,"map"],[25,125,20,12],[25,126,20,13],[25,127,20,14],[25,128,20,15],[26,6,20,17,"args"],[26,10,20,21],[26,12,20,23],[26,13,20,24,"accountId"],[26,22,20,33],[27,4,20,35],[27,5,20,36],[27,7,20,38,"opt"],[27,10,20,41],[27,11,20,42],[27,16,20,47],[27,17,20,48,"accountId"],[27,26,20,57],[27,28,20,59,"opt"],[27,31,20,62],[27,32,20,63,"unwrap"],[27,38,20,69],[27,39,20,70],[27,40,20,71],[27,41,20,72],[28,4,21,8],[29,4,21,8],[29,5,22,9,"map"],[29,8,22,12],[29,9,22,13],[29,10,22,14],[29,11,22,15,"accountId"],[29,20,22,24],[29,22,22,26],[30,6,22,28,"bid"],[30,9,22,31],[31,6,22,33,"kind"],[32,4,22,38],[32,5,22,39],[32,6,22,40],[32,12,22,46],[33,6,23,8,"accountId"],[33,15,23,17],[34,6,24,8,"isSuspended"],[34,17,24,19],[34,19,24,21],[34,24,24,26],[35,6,25,8,"kind"],[35,10,25,12],[36,6,26,8,"value"],[36,11,26,13],[36,13,26,15,"bid"],[37,4,27,4],[37,5,27,5],[37,6,27,6],[37,7,27,7],[37,8,27,8],[37,9,27,9],[38,2,28,0],[39,2,29,0],[40,0,30,0],[41,0,31,0],[42,0,32,0],[43,0,33,0],[44,0,34,0],[45,0,35,0],[46,0,36,0],[47,0,37,0],[48,2,38,0],[48,11,38,9,"candidates"],[48,21,38,19,"candidates"],[48,22,38,20,"instanceId"],[48,32,38,30],[48,34,38,32,"api"],[48,37,38,35],[48,39,38,37],[49,4,39,4],[49,11,39,11],[49,12,39,12],[49,13,39,13],[49,15,39,15,"index_js_1"],[49,25,39,25],[49,26,39,26,"memo"],[49,30,39,30],[49,32,39,32,"instanceId"],[49,42,39,42],[49,44,39,44],[49,50,39,50,"api"],[49,53,39,53],[49,54,39,54,"query"],[49,59,39,59],[49,60,39,60,"society"],[49,67,39,67],[49,68,39,68],[49,89,39,89],[49,90,39,90],[49,94,39,94,"api"],[49,97,39,97],[49,98,39,98,"query"],[49,103,39,103],[49,104,39,104,"society"],[49,111,39,111],[49,112,39,112,"candidates"],[49,122,39,122],[49,123,39,123,"creator"],[49,130,39,130],[49,131,39,131,"meta"],[49,135,39,135],[49,136,39,136,"type"],[49,140,39,140],[49,141,39,141,"isPlain"],[49,148,39,148],[49,151,40,10,"getPrev"],[49,158,40,17],[49,159,40,18,"api"],[49,162,40,21],[49,163,40,22],[49,166,41,10,"getCurr"],[49,173,41,17],[49,174,41,18,"api"],[49,177,41,21],[49,178,41,22],[49,179,41,23],[50,2,42,0],[51,0,42,1],[51,3]],"functionMap":{"names":["<global>","getPrev","<anonymous>","map$argument_0","getCurr","entries.filter$argument_0","entries.filter.map$argument_0","entries.filter.map.map$argument_0","candidates"],"mappings":"AAA;ACK;qECC;sECE,gBD;MDC,mBC,4CC;MDK,CD;CDC;AIC;uEFC;gBGC,uBH;aIC,2DJ;aKE;MLK,CE;CJC;AQU;4CNC;sBME;CRC"},"hasCjsExports":true},"type":"js/module"}]} |