mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 14:31:02 +00:00
1 line
9.9 KiB
Plaintext
1 line
9.9 KiB
Plaintext
{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":57,"index":57}}],"key":"PnOMrhZAPWoeW3ygrvUJ7ff768Y=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":58},"end":{"line":2,"column":40,"index":98}}],"key":"GRJlO1cmIj14nBxcasNpiq30og4=","exportNames":["*"],"imports":1}},{"name":"./helpers/filterBountyProposals.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":99},"end":{"line":3,"column":77,"index":176}}],"key":"kPQQZWS1bMoUV9rCt9VFLKti8AI=","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.bounties = bounties;\n var _rxjs = require(_dependencyMap[0], \"rxjs\");\n var _utilIndexJs = require(_dependencyMap[1], \"../util/index.js\");\n var _helpersFilterBountyProposalsJs = require(_dependencyMap[2], \"./helpers/filterBountyProposals.js\");\n function parseResult([maybeBounties, maybeDescriptions, ids, bountyProposals]) {\n const bounties = [];\n maybeBounties.forEach((bounty, index) => {\n if (bounty.isSome) {\n bounties.push({\n bounty: bounty.unwrap(),\n description: maybeDescriptions[index].unwrapOrDefault().toUtf8(),\n index: ids[index],\n proposals: bountyProposals.filter(bountyProposal => bountyProposal.proposal && ids[index].eq(bountyProposal.proposal.args[0]))\n });\n }\n });\n return bounties;\n }\n /**\n * @name bounties\n * @descrive Retrieves all active bounties, their descriptions, and associated proposals.\n * @example\n * ```javascript\n * const bounties = await api.derive.bounties();\n * console.log(\"Active bounties:\", bounties);\n * ```\n */\n function bounties(instanceId, api) {\n const bountyBase = api.query.bounties || api.query.treasury;\n return (0, _utilIndexJs.memo)(instanceId, () => bountyBase.bounties ? (0, _rxjs.combineLatest)([bountyBase.bountyCount(), api.query.council ? api.query.council.proposalCount() : (0, _rxjs.of)(0)]).pipe((0, _rxjs.switchMap)(() => (0, _rxjs.combineLatest)([bountyBase.bounties.keys(), api.derive.council ? api.derive.council.proposals() : (0, _rxjs.of)([])])), (0, _rxjs.switchMap)(([keys, proposals]) => {\n const ids = keys.map(({\n args: [id]\n }) => id);\n return (0, _rxjs.combineLatest)([bountyBase.bounties.multi(ids), bountyBase.bountyDescriptions.multi(ids), (0, _rxjs.of)(ids), (0, _rxjs.of)((0, _helpersFilterBountyProposalsJs.filterBountiesProposals)(api, proposals))]);\n }), (0, _rxjs.map)(parseResult)) : (0, _rxjs.of)(parseResult([[], [], [], []])));\n }\n});","lineCount":43,"map":[[7,2,27,0,"exports"],[7,9,27,0],[7,10,27,0,"bounties"],[7,18,27,0],[7,21,27,0,"bounties"],[7,29,27,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,"_utilIndexJs"],[9,18,2,0],[9,21,2,0,"require"],[9,28,2,0],[9,29,2,0,"_dependencyMap"],[9,43,2,0],[10,2,3,0],[10,6,3,0,"_helpersFilterBountyProposalsJs"],[10,37,3,0],[10,40,3,0,"require"],[10,47,3,0],[10,48,3,0,"_dependencyMap"],[10,62,3,0],[11,2,4,0],[11,11,4,9,"parseResult"],[11,22,4,20,"parseResult"],[11,23,4,21],[11,24,4,22,"maybeBounties"],[11,37,4,35],[11,39,4,37,"maybeDescriptions"],[11,56,4,54],[11,58,4,56,"ids"],[11,61,4,59],[11,63,4,61,"bountyProposals"],[11,78,4,76],[11,79,4,77],[11,81,4,79],[12,4,5,4],[12,10,5,10,"bounties"],[12,18,5,18],[12,21,5,21],[12,23,5,23],[13,4,6,4,"maybeBounties"],[13,17,6,17],[13,18,6,18,"forEach"],[13,25,6,25],[13,26,6,26],[13,27,6,27,"bounty"],[13,33,6,33],[13,35,6,35,"index"],[13,40,6,40],[13,45,6,45],[14,6,7,8],[14,10,7,12,"bounty"],[14,16,7,18],[14,17,7,19,"isSome"],[14,23,7,25],[14,25,7,27],[15,8,8,12,"bounties"],[15,16,8,20],[15,17,8,21,"push"],[15,21,8,25],[15,22,8,26],[16,10,9,16,"bounty"],[16,16,9,22],[16,18,9,24,"bounty"],[16,24,9,30],[16,25,9,31,"unwrap"],[16,31,9,37],[16,32,9,38],[16,33,9,39],[17,10,10,16,"description"],[17,21,10,27],[17,23,10,29,"maybeDescriptions"],[17,40,10,46],[17,41,10,47,"index"],[17,46,10,52],[17,47,10,53],[17,48,10,54,"unwrapOrDefault"],[17,63,10,69],[17,64,10,70],[17,65,10,71],[17,66,10,72,"toUtf8"],[17,72,10,78],[17,73,10,79],[17,74,10,80],[18,10,11,16,"index"],[18,15,11,21],[18,17,11,23,"ids"],[18,20,11,26],[18,21,11,27,"index"],[18,26,11,32],[18,27,11,33],[19,10,12,16,"proposals"],[19,19,12,25],[19,21,12,27,"bountyProposals"],[19,36,12,42],[19,37,12,43,"filter"],[19,43,12,49],[19,44,12,51,"bountyProposal"],[19,58,12,65],[19,62,12,70,"bountyProposal"],[19,76,12,84],[19,77,12,85,"proposal"],[19,85,12,93],[19,89,12,97,"ids"],[19,92,12,100],[19,93,12,101,"index"],[19,98,12,106],[19,99,12,107],[19,100,12,108,"eq"],[19,102,12,110],[19,103,12,111,"bountyProposal"],[19,117,12,125],[19,118,12,126,"proposal"],[19,126,12,134],[19,127,12,135,"args"],[19,131,12,139],[19,132,12,140],[19,133,12,141],[19,134,12,142],[19,135,12,143],[20,8,13,12],[20,9,13,13],[20,10,13,14],[21,6,14,8],[22,4,15,4],[22,5,15,5],[22,6,15,6],[23,4,16,4],[23,11,16,11,"bounties"],[23,19,16,19],[24,2,17,0],[25,2,18,0],[26,0,19,0],[27,0,20,0],[28,0,21,0],[29,0,22,0],[30,0,23,0],[31,0,24,0],[32,0,25,0],[33,0,26,0],[34,2,27,7],[34,11,27,16,"bounties"],[34,19,27,24,"bounties"],[34,20,27,25,"instanceId"],[34,30,27,35],[34,32,27,37,"api"],[34,35,27,40],[34,37,27,42],[35,4,28,4],[35,10,28,10,"bountyBase"],[35,20,28,20],[35,23,28,23,"api"],[35,26,28,26],[35,27,28,27,"query"],[35,32,28,32],[35,33,28,33,"bounties"],[35,41,28,41],[35,45,28,45,"api"],[35,48,28,48],[35,49,28,49,"query"],[35,54,28,54],[35,55,28,55,"treasury"],[35,63,28,63],[36,4,29,4],[36,11,29,11],[36,15,29,11,"memo"],[36,27,29,15],[36,28,29,15,"memo"],[36,32,29,15],[36,34,29,16,"instanceId"],[36,44,29,26],[36,46,29,28],[36,52,29,34,"bountyBase"],[36,62,29,44],[36,63,29,45,"bounties"],[36,71,29,53],[36,74,30,10],[36,78,30,10,"combineLatest"],[36,83,30,23],[36,84,30,23,"combineLatest"],[36,97,30,23],[36,99,30,24],[36,100,31,12,"bountyBase"],[36,110,31,22],[36,111,31,23,"bountyCount"],[36,122,31,34],[36,123,31,35],[36,124,31,36],[36,126,32,12,"api"],[36,129,32,15],[36,130,32,16,"query"],[36,135,32,21],[36,136,32,22,"council"],[36,143,32,29],[36,146,33,18,"api"],[36,149,33,21],[36,150,33,22,"query"],[36,155,33,27],[36,156,33,28,"council"],[36,163,33,35],[36,164,33,36,"proposalCount"],[36,177,33,49],[36,178,33,50],[36,179,33,51],[36,182,34,18],[36,186,34,18,"of"],[36,191,34,20],[36,192,34,20,"of"],[36,194,34,20],[36,196,34,21],[36,197,34,22],[36,198,34,23],[36,199,35,9],[36,200,35,10],[36,201,35,11,"pipe"],[36,205,35,15],[36,206,35,16],[36,210,35,16,"switchMap"],[36,215,35,25],[36,216,35,25,"switchMap"],[36,225,35,25],[36,227,35,26],[36,233,35,32],[36,237,35,32,"combineLatest"],[36,242,35,45],[36,243,35,45,"combineLatest"],[36,256,35,45],[36,258,35,46],[36,259,36,12,"bountyBase"],[36,269,36,22],[36,270,36,23,"bounties"],[36,278,36,31],[36,279,36,32,"keys"],[36,283,36,36],[36,284,36,37],[36,285,36,38],[36,287,37,12,"api"],[36,290,37,15],[36,291,37,16,"derive"],[36,297,37,22],[36,298,37,23,"council"],[36,305,37,30],[36,308,38,18,"api"],[36,311,38,21],[36,312,38,22,"derive"],[36,318,38,28],[36,319,38,29,"council"],[36,326,38,36],[36,327,38,37,"proposals"],[36,336,38,46],[36,337,38,47],[36,338,38,48],[36,341,39,18],[36,345,39,18,"of"],[36,350,39,20],[36,351,39,20,"of"],[36,353,39,20],[36,355,39,21],[36,357,39,23],[36,358,39,24],[36,359,40,9],[36,360,40,10],[36,361,40,11],[36,363,40,13],[36,367,40,13,"switchMap"],[36,372,40,22],[36,373,40,22,"switchMap"],[36,382,40,22],[36,384,40,23],[36,385,40,24],[36,386,40,25,"keys"],[36,390,40,29],[36,392,40,31,"proposals"],[36,401,40,40],[36,402,40,41],[36,407,40,46],[37,6,41,12],[37,12,41,18,"ids"],[37,15,41,21],[37,18,41,24,"keys"],[37,22,41,28],[37,23,41,29,"map"],[37,26,41,32],[37,27,41,33],[37,28,41,34],[38,8,41,36,"args"],[38,12,41,40],[38,14,41,42],[38,15,41,43,"id"],[38,17,41,45],[39,6,41,47],[39,7,41,48],[39,12,41,53,"id"],[39,14,41,55],[39,15,41,56],[40,6,42,12],[40,13,42,19],[40,17,42,19,"combineLatest"],[40,22,42,32],[40,23,42,32,"combineLatest"],[40,36,42,32],[40,38,42,33],[40,39,43,16,"bountyBase"],[40,49,43,26],[40,50,43,27,"bounties"],[40,58,43,35],[40,59,43,36,"multi"],[40,64,43,41],[40,65,43,42,"ids"],[40,68,43,45],[40,69,43,46],[40,71,44,16,"bountyBase"],[40,81,44,26],[40,82,44,27,"bountyDescriptions"],[40,100,44,45],[40,101,44,46,"multi"],[40,106,44,51],[40,107,44,52,"ids"],[40,110,44,55],[40,111,44,56],[40,113,45,16],[40,117,45,16,"of"],[40,122,45,18],[40,123,45,18,"of"],[40,125,45,18],[40,127,45,19,"ids"],[40,130,45,22],[40,131,45,23],[40,133,46,16],[40,137,46,16,"of"],[40,142,46,18],[40,143,46,18,"of"],[40,145,46,18],[40,147,46,19],[40,151,46,19,"filterBountiesProposals"],[40,182,46,42],[40,183,46,42,"filterBountiesProposals"],[40,206,46,42],[40,208,46,43,"api"],[40,211,46,46],[40,213,46,48,"proposals"],[40,222,46,57],[40,223,46,58],[40,224,46,59],[40,225,47,13],[40,226,47,14],[41,4,48,8],[41,5,48,9],[41,6,48,10],[41,8,48,12],[41,12,48,12,"map"],[41,17,48,15],[41,18,48,15,"map"],[41,21,48,15],[41,23,48,16,"parseResult"],[41,34,48,27],[41,35,48,28],[41,36,48,29],[41,39,49,10],[41,43,49,10,"of"],[41,48,49,12],[41,49,49,12,"of"],[41,51,49,12],[41,53,49,13,"parseResult"],[41,64,49,24],[41,65,49,25],[41,66,49,26],[41,68,49,28],[41,70,49,30],[41,72,49,32],[41,74,49,34],[41,76,49,36],[41,78,49,38],[41,80,49,40],[41,81,49,41],[41,82,49,42],[41,83,49,43],[41,84,49,44],[42,2,50,0],[43,0,50,1],[43,3]],"functionMap":{"names":["<global>","parseResult","maybeBounties.forEach$argument_0","bountyProposals.filter$argument_0","bounties","memo$argument_1","switchMap$argument_0","keys.map$argument_0"],"mappings":"AAA;ACG;0BCE;kDCM,6FD;KDG;CDE;OIU;4BCE;0BCM;UDK,aC;iCCC,sBD;SDO;2CDC;CJC"},"hasCjsExports":false},"type":"js/module"}]} |