{"dependencies":[],"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 Object.defineProperty(exports, \"SI_MID\", {\n enumerable: true,\n get: function () {\n return SI_MID;\n }\n });\n Object.defineProperty(exports, \"SI\", {\n enumerable: true,\n get: function () {\n return SI;\n }\n });\n exports.findSi = findSi;\n exports.calcSi = calcSi;\n /** @internal */\n const SI_MID = 8;\n /** @internal */\n const SI = [{\n power: -24,\n text: 'yocto',\n value: 'y'\n }, {\n power: -21,\n text: 'zepto',\n value: 'z'\n }, {\n power: -18,\n text: 'atto',\n value: 'a'\n }, {\n power: -15,\n text: 'femto',\n value: 'f'\n }, {\n power: -12,\n text: 'pico',\n value: 'p'\n }, {\n power: -9,\n text: 'nano',\n value: 'n'\n }, {\n power: -6,\n text: 'micro',\n value: 'ยต'\n }, {\n power: -3,\n text: 'milli',\n value: 'm'\n }, {\n power: 0,\n text: 'Unit',\n value: '-'\n },\n // position 8\n {\n power: 3,\n text: 'Kilo',\n value: 'k'\n }, {\n power: 6,\n text: 'Mill',\n value: 'M'\n },\n // Mega, M\n {\n power: 9,\n text: 'Bill',\n value: 'B'\n },\n // Giga, G\n {\n power: 12,\n text: 'Tril',\n value: 'T'\n },\n // Tera, T\n {\n power: 15,\n text: 'Peta',\n value: 'P'\n }, {\n power: 18,\n text: 'Exa',\n value: 'E'\n }, {\n power: 21,\n text: 'Zeta',\n value: 'Z'\n }, {\n power: 24,\n text: 'Yotta',\n value: 'Y'\n }];\n /** @internal */\n function findSi(type) {\n // use a loop here, better RN support (which doesn't have [].find)\n for (let i = 0, count = SI.length; i < count; i++) {\n if (SI[i].value === type) {\n return SI[i];\n }\n }\n return SI[SI_MID];\n }\n /** @internal */\n function calcSi(text, decimals, forceUnit) {\n if (forceUnit) {\n return findSi(forceUnit);\n }\n const siDefIndex = SI_MID - 1 + Math.ceil((text.length - decimals) / 3);\n return SI[siDefIndex] || SI[siDefIndex < 0 ? 0 : SI.length - 1];\n }\n});","lineCount":119,"map":[[7,2,2,0,"Object"],[7,8,2,0],[7,9,2,0,"defineProperty"],[7,23,2,0],[7,24,2,0,"exports"],[7,31,2,0],[8,4,2,0,"enumerable"],[8,14,2,0],[9,4,2,0,"get"],[9,7,2,0],[9,18,2,0,"get"],[9,19,2,0],[10,6,2,0],[10,13,2,0,"SI_MID"],[10,19,2,0],[11,4,2,0],[12,2,2,0],[13,2,4,0,"Object"],[13,8,4,0],[13,9,4,0,"defineProperty"],[13,23,4,0],[13,24,4,0,"exports"],[13,31,4,0],[14,4,4,0,"enumerable"],[14,14,4,0],[15,4,4,0,"get"],[15,7,4,0],[15,18,4,0,"get"],[15,19,4,0],[16,6,4,0],[16,13,4,0,"SI"],[16,15,4,0],[17,4,4,0],[18,2,4,0],[19,2,24,0,"exports"],[19,9,24,0],[19,10,24,0,"findSi"],[19,16,24,0],[19,19,24,0,"findSi"],[19,25,24,0],[20,2,34,0,"exports"],[20,9,34,0],[20,10,34,0,"calcSi"],[20,16,34,0],[20,19,34,0,"calcSi"],[20,25,34,0],[21,2,1,0],[22,2,2,7],[22,8,2,13,"SI_MID"],[22,14,2,19],[22,17,2,22],[22,18,2,23],[23,2,3,0],[24,2,4,7],[24,8,4,13,"SI"],[24,10,4,15],[24,13,4,18],[24,14,5,4],[25,4,5,6,"power"],[25,9,5,11],[25,11,5,13],[25,12,5,14],[25,14,5,16],[26,4,5,18,"text"],[26,8,5,22],[26,10,5,24],[26,17,5,31],[27,4,5,33,"value"],[27,9,5,38],[27,11,5,40],[28,2,5,44],[28,3,5,45],[28,5,6,4],[29,4,6,6,"power"],[29,9,6,11],[29,11,6,13],[29,12,6,14],[29,14,6,16],[30,4,6,18,"text"],[30,8,6,22],[30,10,6,24],[30,17,6,31],[31,4,6,33,"value"],[31,9,6,38],[31,11,6,40],[32,2,6,44],[32,3,6,45],[32,5,7,4],[33,4,7,6,"power"],[33,9,7,11],[33,11,7,13],[33,12,7,14],[33,14,7,16],[34,4,7,18,"text"],[34,8,7,22],[34,10,7,24],[34,16,7,30],[35,4,7,32,"value"],[35,9,7,37],[35,11,7,39],[36,2,7,43],[36,3,7,44],[36,5,8,4],[37,4,8,6,"power"],[37,9,8,11],[37,11,8,13],[37,12,8,14],[37,14,8,16],[38,4,8,18,"text"],[38,8,8,22],[38,10,8,24],[38,17,8,31],[39,4,8,33,"value"],[39,9,8,38],[39,11,8,40],[40,2,8,44],[40,3,8,45],[40,5,9,4],[41,4,9,6,"power"],[41,9,9,11],[41,11,9,13],[41,12,9,14],[41,14,9,16],[42,4,9,18,"text"],[42,8,9,22],[42,10,9,24],[42,16,9,30],[43,4,9,32,"value"],[43,9,9,37],[43,11,9,39],[44,2,9,43],[44,3,9,44],[44,5,10,4],[45,4,10,6,"power"],[45,9,10,11],[45,11,10,13],[45,12,10,14],[45,13,10,15],[46,4,10,17,"text"],[46,8,10,21],[46,10,10,23],[46,16,10,29],[47,4,10,31,"value"],[47,9,10,36],[47,11,10,38],[48,2,10,42],[48,3,10,43],[48,5,11,4],[49,4,11,6,"power"],[49,9,11,11],[49,11,11,13],[49,12,11,14],[49,13,11,15],[50,4,11,17,"text"],[50,8,11,21],[50,10,11,23],[50,17,11,30],[51,4,11,32,"value"],[51,9,11,37],[51,11,11,39],[52,2,11,43],[52,3,11,44],[52,5,12,4],[53,4,12,6,"power"],[53,9,12,11],[53,11,12,13],[53,12,12,14],[53,13,12,15],[54,4,12,17,"text"],[54,8,12,21],[54,10,12,23],[54,17,12,30],[55,4,12,32,"value"],[55,9,12,37],[55,11,12,39],[56,2,12,43],[56,3,12,44],[56,5,13,4],[57,4,13,6,"power"],[57,9,13,11],[57,11,13,13],[57,12,13,14],[58,4,13,16,"text"],[58,8,13,20],[58,10,13,22],[58,16,13,28],[59,4,13,30,"value"],[59,9,13,35],[59,11,13,37],[60,2,13,41],[60,3,13,42],[61,2,13,44],[62,2,14,4],[63,4,14,6,"power"],[63,9,14,11],[63,11,14,13],[63,12,14,14],[64,4,14,16,"text"],[64,8,14,20],[64,10,14,22],[64,16,14,28],[65,4,14,30,"value"],[65,9,14,35],[65,11,14,37],[66,2,14,41],[66,3,14,42],[66,5,15,4],[67,4,15,6,"power"],[67,9,15,11],[67,11,15,13],[67,12,15,14],[68,4,15,16,"text"],[68,8,15,20],[68,10,15,22],[68,16,15,28],[69,4,15,30,"value"],[69,9,15,35],[69,11,15,37],[70,2,15,41],[70,3,15,42],[71,2,15,44],[72,2,16,4],[73,4,16,6,"power"],[73,9,16,11],[73,11,16,13],[73,12,16,14],[74,4,16,16,"text"],[74,8,16,20],[74,10,16,22],[74,16,16,28],[75,4,16,30,"value"],[75,9,16,35],[75,11,16,37],[76,2,16,41],[76,3,16,42],[77,2,16,44],[78,2,17,4],[79,4,17,6,"power"],[79,9,17,11],[79,11,17,13],[79,13,17,15],[80,4,17,17,"text"],[80,8,17,21],[80,10,17,23],[80,16,17,29],[81,4,17,31,"value"],[81,9,17,36],[81,11,17,38],[82,2,17,42],[82,3,17,43],[83,2,17,45],[84,2,18,4],[85,4,18,6,"power"],[85,9,18,11],[85,11,18,13],[85,13,18,15],[86,4,18,17,"text"],[86,8,18,21],[86,10,18,23],[86,16,18,29],[87,4,18,31,"value"],[87,9,18,36],[87,11,18,38],[88,2,18,42],[88,3,18,43],[88,5,19,4],[89,4,19,6,"power"],[89,9,19,11],[89,11,19,13],[89,13,19,15],[90,4,19,17,"text"],[90,8,19,21],[90,10,19,23],[90,15,19,28],[91,4,19,30,"value"],[91,9,19,35],[91,11,19,37],[92,2,19,41],[92,3,19,42],[92,5,20,4],[93,4,20,6,"power"],[93,9,20,11],[93,11,20,13],[93,13,20,15],[94,4,20,17,"text"],[94,8,20,21],[94,10,20,23],[94,16,20,29],[95,4,20,31,"value"],[95,9,20,36],[95,11,20,38],[96,2,20,42],[96,3,20,43],[96,5,21,4],[97,4,21,6,"power"],[97,9,21,11],[97,11,21,13],[97,13,21,15],[98,4,21,17,"text"],[98,8,21,21],[98,10,21,23],[98,17,21,30],[99,4,21,32,"value"],[99,9,21,37],[99,11,21,39],[100,2,21,43],[100,3,21,44],[100,4,22,1],[101,2,23,0],[102,2,24,7],[102,11,24,16,"findSi"],[102,17,24,22,"findSi"],[102,18,24,23,"type"],[102,22,24,27],[102,24,24,29],[103,4,25,4],[104,4,26,4],[104,9,26,9],[104,13,26,13,"i"],[104,14,26,14],[104,17,26,17],[104,18,26,18],[104,20,26,20,"count"],[104,25,26,25],[104,28,26,28,"SI"],[104,30,26,30],[104,31,26,31,"length"],[104,37,26,37],[104,39,26,39,"i"],[104,40,26,40],[104,43,26,43,"count"],[104,48,26,48],[104,50,26,50,"i"],[104,51,26,51],[104,53,26,53],[104,55,26,55],[105,6,27,8],[105,10,27,12,"SI"],[105,12,27,14],[105,13,27,15,"i"],[105,14,27,16],[105,15,27,17],[105,16,27,18,"value"],[105,21,27,23],[105,26,27,28,"type"],[105,30,27,32],[105,32,27,34],[106,8,28,12],[106,15,28,19,"SI"],[106,17,28,21],[106,18,28,22,"i"],[106,19,28,23],[106,20,28,24],[107,6,29,8],[108,4,30,4],[109,4,31,4],[109,11,31,11,"SI"],[109,13,31,13],[109,14,31,14,"SI_MID"],[109,20,31,20],[109,21,31,21],[110,2,32,0],[111,2,33,0],[112,2,34,7],[112,11,34,16,"calcSi"],[112,17,34,22,"calcSi"],[112,18,34,23,"text"],[112,22,34,27],[112,24,34,29,"decimals"],[112,32,34,37],[112,34,34,39,"forceUnit"],[112,43,34,48],[112,45,34,50],[113,4,35,4],[113,8,35,8,"forceUnit"],[113,17,35,17],[113,19,35,19],[114,6,36,8],[114,13,36,15,"findSi"],[114,19,36,21],[114,20,36,22,"forceUnit"],[114,29,36,31],[114,30,36,32],[115,4,37,4],[116,4,38,4],[116,10,38,10,"siDefIndex"],[116,20,38,20],[116,23,38,24,"SI_MID"],[116,29,38,30],[116,32,38,33],[116,33,38,34],[116,36,38,38,"Math"],[116,40,38,42],[116,41,38,43,"ceil"],[116,45,38,47],[116,46,38,48],[116,47,38,49,"text"],[116,51,38,53],[116,52,38,54,"length"],[116,58,38,60],[116,61,38,63,"decimals"],[116,69,38,71],[116,73,38,75],[116,74,38,76],[116,75,38,77],[117,4,39,4],[117,11,39,11,"SI"],[117,13,39,13],[117,14,39,14,"siDefIndex"],[117,24,39,24],[117,25,39,25],[117,29,39,29,"SI"],[117,31,39,31],[117,32,39,32,"siDefIndex"],[117,42,39,42],[117,45,39,45],[117,46,39,46],[117,49,39,49],[117,50,39,50],[117,53,39,53,"SI"],[117,55,39,55],[117,56,39,56,"length"],[117,62,39,62],[117,65,39,65],[117,66,39,66],[117,67,39,67],[118,2,40,0],[119,0,40,1],[119,3]],"functionMap":{"names":["","findSi","calcSi"],"mappings":"AAA;OCuB;CDQ;OEE;CFM"},"hasCjsExports":false},"type":"js/module"}]}