mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 20:21:01 +00:00
1 line
3.9 KiB
Plaintext
1 line
3.9 KiB
Plaintext
{"dependencies":[{"name":"../bn/toBn.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":39,"index":39}}],"key":"GG20BlFCryFXR+uOINYlStTZiEg=","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.formatElapsed = formatElapsed;\n var _bnToBnJs = require(_dependencyMap[0], \"../bn/toBn.js\");\n /** @internal */\n function formatValue(elapsed) {\n if (elapsed < 15) {\n return `${elapsed.toFixed(1)}s`;\n } else if (elapsed < 60) {\n return `${elapsed | 0}s`;\n } else if (elapsed < 3600) {\n return `${elapsed / 60 | 0}m`;\n }\n return `${elapsed / 3600 | 0}h`;\n }\n /**\n * @name formatElapsed\n * @description Formats an elapsed value into s, m, h or day segments\n */\n function formatElapsed(now, value) {\n const tsNow = now?.getTime() || 0;\n const tsValue = value instanceof Date ? value.getTime() : (0, _bnToBnJs.bnToBn)(value).toNumber();\n return tsNow && tsValue ? formatValue(Math.max(Math.abs(tsNow - tsValue), 0) / 1000) : '0.0s';\n }\n});","lineCount":29,"map":[[7,2,19,0,"exports"],[7,9,19,0],[7,10,19,0,"formatElapsed"],[7,23,19,0],[7,26,19,0,"formatElapsed"],[7,39,19,0],[8,2,1,0],[8,6,1,0,"_bnToBnJs"],[8,15,1,0],[8,18,1,0,"require"],[8,25,1,0],[8,26,1,0,"_dependencyMap"],[8,40,1,0],[9,2,2,0],[10,2,3,0],[10,11,3,9,"formatValue"],[10,22,3,20,"formatValue"],[10,23,3,21,"elapsed"],[10,30,3,28],[10,32,3,30],[11,4,4,4],[11,8,4,8,"elapsed"],[11,15,4,15],[11,18,4,18],[11,20,4,20],[11,22,4,22],[12,6,5,8],[12,13,5,15],[12,16,5,18,"elapsed"],[12,23,5,25],[12,24,5,26,"toFixed"],[12,31,5,33],[12,32,5,34],[12,33,5,35],[12,34,5,36],[12,37,5,39],[13,4,6,4],[13,5,6,5],[13,11,7,9],[13,15,7,13,"elapsed"],[13,22,7,20],[13,25,7,23],[13,27,7,25],[13,29,7,27],[14,6,8,8],[14,13,8,15],[14,16,8,18,"elapsed"],[14,23,8,25],[14,26,8,28],[14,27,8,29],[14,30,8,32],[15,4,9,4],[15,5,9,5],[15,11,10,9],[15,15,10,13,"elapsed"],[15,22,10,20],[15,25,10,23],[15,29,10,27],[15,31,10,29],[16,6,11,8],[16,13,11,15],[16,16,11,18,"elapsed"],[16,23,11,25],[16,26,11,28],[16,28,11,30],[16,31,11,33],[16,32,11,34],[16,35,11,37],[17,4,12,4],[18,4,13,4],[18,11,13,11],[18,14,13,14,"elapsed"],[18,21,13,21],[18,24,13,24],[18,28,13,28],[18,31,13,31],[18,32,13,32],[18,35,13,35],[19,2,14,0],[20,2,15,0],[21,0,16,0],[22,0,17,0],[23,0,18,0],[24,2,19,7],[24,11,19,16,"formatElapsed"],[24,24,19,29,"formatElapsed"],[24,25,19,30,"now"],[24,28,19,33],[24,30,19,35,"value"],[24,35,19,40],[24,37,19,42],[25,4,20,4],[25,10,20,10,"tsNow"],[25,15,20,15],[25,18,20,18,"now"],[25,21,20,21],[25,23,20,23,"getTime"],[25,30,20,30],[25,31,20,31],[25,32,20,32],[25,36,20,36],[25,37,20,37],[26,4,21,4],[26,10,21,10,"tsValue"],[26,17,21,17],[26,20,21,20,"value"],[26,25,21,25],[26,37,21,37,"Date"],[26,41,21,41],[26,44,22,10,"value"],[26,49,22,15],[26,50,22,16,"getTime"],[26,57,22,23],[26,58,22,24],[26,59,22,25],[26,62,23,10],[26,66,23,10,"bnToBn"],[26,75,23,16],[26,76,23,16,"bnToBn"],[26,82,23,16],[26,84,23,17,"value"],[26,89,23,22],[26,90,23,23],[26,91,23,24,"toNumber"],[26,99,23,32],[26,100,23,33],[26,101,23,34],[27,4,24,4],[27,11,24,12,"tsNow"],[27,16,24,17],[27,20,24,21,"tsValue"],[27,27,24,28],[27,30,25,10,"formatValue"],[27,41,25,21],[27,42,25,22,"Math"],[27,46,25,26],[27,47,25,27,"max"],[27,50,25,30],[27,51,25,31,"Math"],[27,55,25,35],[27,56,25,36,"abs"],[27,59,25,39],[27,60,25,40,"tsNow"],[27,65,25,45],[27,68,25,48,"tsValue"],[27,75,25,55],[27,76,25,56],[27,78,25,58],[27,79,25,59],[27,80,25,60],[27,83,25,63],[27,87,25,67],[27,88,25,68],[27,91,26,10],[27,97,26,16],[28,2,27,0],[29,0,27,1],[29,3]],"functionMap":{"names":["<global>","formatValue","formatElapsed"],"mappings":"AAA;ACE;CDW;OEK;CFQ"},"hasCjsExports":false},"type":"js/module"}]} |