mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 01:51:03 +00:00
1 line
9.8 KiB
Plaintext
1 line
9.8 KiB
Plaintext
{"dependencies":[{"name":"boolbase","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":32,"index":32}}],"key":"0NOX8eQTjRnr/BoMAee+Ac81wCc=","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 function _interopDefault(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n exports.compile = compile;\n exports.generate = generate;\n var _boolbase = require(_dependencyMap[0], \"boolbase\");\n var boolbase = _interopDefault(_boolbase);\n /**\n * Returns a function that checks if an elements index matches the given rule\n * highly optimized to return the fastest solution.\n *\n * @param parsed A tuple [a, b], as returned by `parse`.\n * @returns A highly optimized function that returns whether an index matches the nth-check.\n * @example\n *\n * ```js\n * const check = nthCheck.compile([2, 3]);\n *\n * check(0); // `false`\n * check(1); // `false`\n * check(2); // `true`\n * check(3); // `false`\n * check(4); // `true`\n * check(5); // `false`\n * check(6); // `true`\n * ```\n */\n function compile(parsed) {\n var a = parsed[0];\n // Subtract 1 from `b`, to convert from one- to zero-indexed.\n var b = parsed[1] - 1;\n /*\n * When `b <= 0`, `a * n` won't be lead to any matches for `a < 0`.\n * Besides, the specification states that no elements are\n * matched when `a` and `b` are 0.\n *\n * `b < 0` here as we subtracted 1 from `b` above.\n */\n if (b < 0 && a <= 0) return boolbase.default.falseFunc;\n // When `a` is in the range -1..1, it matches any element (so only `b` is checked).\n if (a === -1) return index => index <= b;\n if (a === 0) return index => index === b;\n // When `b <= 0` and `a === 1`, they match any element.\n if (a === 1) return b < 0 ? boolbase.default.trueFunc : index => index >= b;\n /*\n * Otherwise, modulo can be used to check if there is a match.\n *\n * Modulo doesn't care about the sign, so let's use `a`s absolute value.\n */\n var absA = Math.abs(a);\n // Get `b mod a`, + a if this is negative.\n var bMod = (b % absA + absA) % absA;\n return a > 1 ? index => index >= b && index % absA === bMod : index => index <= b && index % absA === bMod;\n }\n /**\n * Returns a function that produces a monotonously increasing sequence of indices.\n *\n * If the sequence has an end, the returned function will return `null` after\n * the last index in the sequence.\n *\n * @param parsed A tuple [a, b], as returned by `parse`.\n * @returns A function that produces a sequence of indices.\n * @example <caption>Always increasing (2n+3)</caption>\n *\n * ```js\n * const gen = nthCheck.generate([2, 3])\n *\n * gen() // `1`\n * gen() // `3`\n * gen() // `5`\n * gen() // `8`\n * gen() // `11`\n * ```\n *\n * @example <caption>With end value (-2n+10)</caption>\n *\n * ```js\n *\n * const gen = nthCheck.generate([-2, 5]);\n *\n * gen() // 0\n * gen() // 2\n * gen() // 4\n * gen() // null\n * ```\n */\n function generate(parsed) {\n var a = parsed[0];\n // Subtract 1 from `b`, to convert from one- to zero-indexed.\n var b = parsed[1] - 1;\n var n = 0;\n // Make sure to always return an increasing sequence\n if (a < 0) {\n var aPos = -a;\n // Get `b mod a`\n var minValue = (b % aPos + aPos) % aPos;\n return () => {\n var val = minValue + aPos * n++;\n return val > b ? null : val;\n };\n }\n if (a === 0) return b < 0 ?\n // There are no result — always return `null`\n () => null :\n // Return `b` exactly once\n () => n++ === 0 ? b : null;\n if (b < 0) {\n b += a * Math.ceil(-b / a);\n }\n return () => a * n++ + b;\n }\n});","lineCount":120,"map":[[12,2,22,0,"exports"],[12,9,22,0],[12,10,22,0,"compile"],[12,17,22,0],[12,20,22,0,"compile"],[12,27,22,0],[13,2,87,0,"exports"],[13,9,87,0],[13,10,87,0,"generate"],[13,18,87,0],[13,21,87,0,"generate"],[13,29,87,0],[14,2,1,0],[14,6,1,0,"_boolbase"],[14,15,1,0],[14,18,1,0,"require"],[14,25,1,0],[14,26,1,0,"_dependencyMap"],[14,40,1,0],[15,2,1,0],[15,6,1,0,"boolbase"],[15,14,1,0],[15,17,1,0,"_interopDefault"],[15,32,1,0],[15,33,1,0,"_boolbase"],[15,42,1,0],[16,2,2,0],[17,0,3,0],[18,0,4,0],[19,0,5,0],[20,0,6,0],[21,0,7,0],[22,0,8,0],[23,0,9,0],[24,0,10,0],[25,0,11,0],[26,0,12,0],[27,0,13,0],[28,0,14,0],[29,0,15,0],[30,0,16,0],[31,0,17,0],[32,0,18,0],[33,0,19,0],[34,0,20,0],[35,0,21,0],[36,2,22,7],[36,11,22,16,"compile"],[36,18,22,23,"compile"],[36,19,22,24,"parsed"],[36,25,22,30],[36,27,22,32],[37,4,23,4],[37,8,23,10,"a"],[37,9,23,11],[37,12,23,14,"parsed"],[37,18,23,20],[37,19,23,21],[37,20,23,22],[37,21,23,23],[38,4,24,4],[39,4,25,4],[39,8,25,10,"b"],[39,9,25,11],[39,12,25,14,"parsed"],[39,18,25,20],[39,19,25,21],[39,20,25,22],[39,21,25,23],[39,24,25,26],[39,25,25,27],[40,4,26,4],[41,0,27,0],[42,0,28,0],[43,0,29,0],[44,0,30,0],[45,0,31,0],[46,0,32,0],[47,4,33,4],[47,8,33,8,"b"],[47,9,33,9],[47,12,33,12],[47,13,33,13],[47,17,33,17,"a"],[47,18,33,18],[47,22,33,22],[47,23,33,23],[47,25,34,8],[47,32,34,15,"boolbase"],[47,40,34,23],[47,41,34,23,"default"],[47,48,34,23],[47,49,34,24,"falseFunc"],[47,58,34,33],[48,4,35,4],[49,4,36,4],[49,8,36,8,"a"],[49,9,36,9],[49,14,36,14],[49,15,36,15],[49,16,36,16],[49,18,37,8],[49,25,37,16,"index"],[49,30,37,21],[49,34,37,26,"index"],[49,39,37,31],[49,43,37,35,"b"],[49,44,37,36],[50,4,38,4],[50,8,38,8,"a"],[50,9,38,9],[50,14,38,14],[50,15,38,15],[50,17,39,8],[50,24,39,16,"index"],[50,29,39,21],[50,33,39,26,"index"],[50,38,39,31],[50,43,39,36,"b"],[50,44,39,37],[51,4,40,4],[52,4,41,4],[52,8,41,8,"a"],[52,9,41,9],[52,14,41,14],[52,15,41,15],[52,17,42,8],[52,24,42,15,"b"],[52,25,42,16],[52,28,42,19],[52,29,42,20],[52,32,42,23,"boolbase"],[52,40,42,31],[52,41,42,31,"default"],[52,48,42,31],[52,49,42,32,"trueFunc"],[52,57,42,40],[52,60,42,44,"index"],[52,65,42,49],[52,69,42,54,"index"],[52,74,42,59],[52,78,42,63,"b"],[52,79,42,64],[53,4,43,4],[54,0,44,0],[55,0,45,0],[56,0,46,0],[57,0,47,0],[58,4,48,4],[58,8,48,10,"absA"],[58,12,48,14],[58,15,48,17,"Math"],[58,19,48,21],[58,20,48,22,"abs"],[58,23,48,25],[58,24,48,26,"a"],[58,25,48,27],[58,26,48,28],[59,4,49,4],[60,4,50,4],[60,8,50,10,"bMod"],[60,12,50,14],[60,15,50,17],[60,16,50,19,"b"],[60,17,50,20],[60,20,50,23,"absA"],[60,24,50,27],[60,27,50,31,"absA"],[60,31,50,35],[60,35,50,39,"absA"],[60,39,50,43],[61,4,51,4],[61,11,51,11,"a"],[61,12,51,12],[61,15,51,15],[61,16,51,16],[61,19,52,11,"index"],[61,24,52,16],[61,28,52,21,"index"],[61,33,52,26],[61,37,52,30,"b"],[61,38,52,31],[61,42,52,35,"index"],[61,47,52,40],[61,50,52,43,"absA"],[61,54,52,47],[61,59,52,52,"bMod"],[61,63,52,56],[61,66,53,11,"index"],[61,71,53,16],[61,75,53,21,"index"],[61,80,53,26],[61,84,53,30,"b"],[61,85,53,31],[61,89,53,35,"index"],[61,94,53,40],[61,97,53,43,"absA"],[61,101,53,47],[61,106,53,52,"bMod"],[61,110,53,56],[62,2,54,0],[63,2,55,0],[64,0,56,0],[65,0,57,0],[66,0,58,0],[67,0,59,0],[68,0,60,0],[69,0,61,0],[70,0,62,0],[71,0,63,0],[72,0,64,0],[73,0,65,0],[74,0,66,0],[75,0,67,0],[76,0,68,0],[77,0,69,0],[78,0,70,0],[79,0,71,0],[80,0,72,0],[81,0,73,0],[82,0,74,0],[83,0,75,0],[84,0,76,0],[85,0,77,0],[86,0,78,0],[87,0,79,0],[88,0,80,0],[89,0,81,0],[90,0,82,0],[91,0,83,0],[92,0,84,0],[93,0,85,0],[94,0,86,0],[95,2,87,7],[95,11,87,16,"generate"],[95,19,87,24,"generate"],[95,20,87,25,"parsed"],[95,26,87,31],[95,28,87,33],[96,4,88,4],[96,8,88,10,"a"],[96,9,88,11],[96,12,88,14,"parsed"],[96,18,88,20],[96,19,88,21],[96,20,88,22],[96,21,88,23],[97,4,89,4],[98,4,90,4],[98,8,90,8,"b"],[98,9,90,9],[98,12,90,12,"parsed"],[98,18,90,18],[98,19,90,19],[98,20,90,20],[98,21,90,21],[98,24,90,24],[98,25,90,25],[99,4,91,4],[99,8,91,8,"n"],[99,9,91,9],[99,12,91,12],[99,13,91,13],[100,4,92,4],[101,4,93,4],[101,8,93,8,"a"],[101,9,93,9],[101,12,93,12],[101,13,93,13],[101,15,93,15],[102,6,94,8],[102,10,94,14,"aPos"],[102,14,94,18],[102,17,94,21],[102,18,94,22,"a"],[102,19,94,23],[103,6,95,8],[104,6,96,8],[104,10,96,14,"minValue"],[104,18,96,22],[104,21,96,25],[104,22,96,27,"b"],[104,23,96,28],[104,26,96,31,"aPos"],[104,30,96,35],[104,33,96,39,"aPos"],[104,37,96,43],[104,41,96,47,"aPos"],[104,45,96,51],[105,6,97,8],[105,13,97,15],[105,19,97,21],[106,8,98,12],[106,12,98,18,"val"],[106,15,98,21],[106,18,98,24,"minValue"],[106,26,98,32],[106,29,98,35,"aPos"],[106,33,98,39],[106,36,98,42,"n"],[106,37,98,43],[106,39,98,45],[107,8,99,12],[107,15,99,19,"val"],[107,18,99,22],[107,21,99,25,"b"],[107,22,99,26],[107,25,99,29],[107,29,99,33],[107,32,99,36,"val"],[107,35,99,39],[108,6,100,8],[108,7,100,9],[109,4,101,4],[110,4,102,4],[110,8,102,8,"a"],[110,9,102,9],[110,14,102,14],[110,15,102,15],[110,17,103,8],[110,24,103,15,"b"],[110,25,103,16],[110,28,103,19],[110,29,103,20],[111,4,104,14],[112,4,105,16],[112,10,105,22],[112,14,105,26],[113,4,106,14],[114,4,107,16],[114,10,107,23,"n"],[114,11,107,24],[114,13,107,26],[114,18,107,31],[114,19,107,32],[114,22,107,35,"b"],[114,23,107,36],[114,26,107,39],[114,30,107,44],[115,4,108,4],[115,8,108,8,"b"],[115,9,108,9],[115,12,108,12],[115,13,108,13],[115,15,108,15],[116,6,109,8,"b"],[116,7,109,9],[116,11,109,13,"a"],[116,12,109,14],[116,15,109,17,"Math"],[116,19,109,21],[116,20,109,22,"ceil"],[116,24,109,26],[116,25,109,27],[116,26,109,28,"b"],[116,27,109,29],[116,30,109,32,"a"],[116,31,109,33],[116,32,109,34],[117,4,110,4],[118,4,111,4],[118,11,111,11],[118,17,111,17,"a"],[118,18,111,18],[118,21,111,21,"n"],[118,22,111,22],[118,24,111,24],[118,27,111,27,"b"],[118,28,111,28],[119,2,112,0],[120,0,112,1],[120,3]],"functionMap":{"names":["<global>","compile","<anonymous>","generate"],"mappings":"AAA;OCqB;eCe,qBD;eCE,sBD;2CCG,qBD;UCU,8CD;UCC,8CD;CDC;OGiC;eDU;SCG;gBDK,UC;gBDE,4BC;WDI,iBC;CHC"},"hasCjsExports":false},"type":"js/module"}]} |