Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
index.mjs18794 linesDownload Raw Back to prettier
1import { createRequire as __prettierCreateRequire } from "module";2import { fileURLToPath as __prettierFileUrlToPath } from "url";3import { dirname as __prettierDirname } from "path";4const require = __prettierCreateRequire(import.meta.url);5const __filename = __prettierFileUrlToPath(import.meta.url);6const __dirname = __prettierDirname(__filename);7 8var __create = Object.create;9var __defProp = Object.defineProperty;10var __getOwnPropDesc = Object.getOwnPropertyDescriptor;11var __getOwnPropNames = Object.getOwnPropertyNames;12var __getProtoOf = Object.getPrototypeOf;13var __hasOwnProp = Object.prototype.hasOwnProperty;14var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {15  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]16}) : x)(function(x) {17  if (typeof require !== "undefined") return require.apply(this, arguments);18  throw Error('Dynamic require of "' + x + '" is not supported');19});20var __commonJS = (cb, mod) => function __require2() {21  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;22};23var __export = (target, all) => {24  for (var name in all)25    __defProp(target, name, { get: all[name], enumerable: true });26};27var __copyProps = (to, from, except, desc) => {28  if (from && typeof from === "object" || typeof from === "function") {29    for (let key2 of __getOwnPropNames(from))30      if (!__hasOwnProp.call(to, key2) && key2 !== except)31        __defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });32  }33  return to;34};35var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(36  // If the importer is in node compatibility mode or this is not an ESM37  // file that has been converted to a CommonJS file using a Babel-38  // compatible transform (i.e. "__esModule" has not been set), then set39  // "default" to the CommonJS "module.exports" for node compatibility.40  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,41  mod42));43 44// node_modules/fast-glob/out/utils/array.js45var require_array = __commonJS({46  "node_modules/fast-glob/out/utils/array.js"(exports) {47    "use strict";48    Object.defineProperty(exports, "__esModule", { value: true });49    exports.splitWhen = exports.flatten = void 0;50    function flatten(items) {51      return items.reduce((collection, item) => [].concat(collection, item), []);52    }53    exports.flatten = flatten;54    function splitWhen(items, predicate) {55      const result = [[]];56      let groupIndex = 0;57      for (const item of items) {58        if (predicate(item)) {59          groupIndex++;60          result[groupIndex] = [];61        } else {62          result[groupIndex].push(item);63        }64      }65      return result;66    }67    exports.splitWhen = splitWhen;68  }69});70 71// node_modules/fast-glob/out/utils/errno.js72var require_errno = __commonJS({73  "node_modules/fast-glob/out/utils/errno.js"(exports) {74    "use strict";75    Object.defineProperty(exports, "__esModule", { value: true });76    exports.isEnoentCodeError = void 0;77    function isEnoentCodeError(error) {78      return error.code === "ENOENT";79    }80    exports.isEnoentCodeError = isEnoentCodeError;81  }82});83 84// node_modules/fast-glob/out/utils/fs.js85var require_fs = __commonJS({86  "node_modules/fast-glob/out/utils/fs.js"(exports) {87    "use strict";88    Object.defineProperty(exports, "__esModule", { value: true });89    exports.createDirentFromStats = void 0;90    var DirentFromStats = class {91      constructor(name, stats) {92        this.name = name;93        this.isBlockDevice = stats.isBlockDevice.bind(stats);94        this.isCharacterDevice = stats.isCharacterDevice.bind(stats);95        this.isDirectory = stats.isDirectory.bind(stats);96        this.isFIFO = stats.isFIFO.bind(stats);97        this.isFile = stats.isFile.bind(stats);98        this.isSocket = stats.isSocket.bind(stats);99        this.isSymbolicLink = stats.isSymbolicLink.bind(stats);100      }101    };102    function createDirentFromStats(name, stats) {103      return new DirentFromStats(name, stats);104    }105    exports.createDirentFromStats = createDirentFromStats;106  }107});108 109// node_modules/fast-glob/out/utils/path.js110var require_path = __commonJS({111  "node_modules/fast-glob/out/utils/path.js"(exports) {112    "use strict";113    Object.defineProperty(exports, "__esModule", { value: true });114    exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;115    var os = __require("os");116    var path15 = __require("path");117    var IS_WINDOWS_PLATFORM = os.platform() === "win32";118    var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;119    var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;120    var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g;121    var DOS_DEVICE_PATH_RE = /^\\\\([.?])/;122    var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g;123    function unixify(filepath) {124      return filepath.replace(/\\/g, "/");125    }126    exports.unixify = unixify;127    function makeAbsolute(cwd, filepath) {128      return path15.resolve(cwd, filepath);129    }130    exports.makeAbsolute = makeAbsolute;131    function removeLeadingDotSegment(entry) {132      if (entry.charAt(0) === ".") {133        const secondCharactery = entry.charAt(1);134        if (secondCharactery === "/" || secondCharactery === "\\") {135          return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);136        }137      }138      return entry;139    }140    exports.removeLeadingDotSegment = removeLeadingDotSegment;141    exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;142    function escapeWindowsPath(pattern) {143      return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");144    }145    exports.escapeWindowsPath = escapeWindowsPath;146    function escapePosixPath(pattern) {147      return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");148    }149    exports.escapePosixPath = escapePosixPath;150    exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;151    function convertWindowsPathToPattern(filepath) {152      return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/");153    }154    exports.convertWindowsPathToPattern = convertWindowsPathToPattern;155    function convertPosixPathToPattern(filepath) {156      return escapePosixPath(filepath);157    }158    exports.convertPosixPathToPattern = convertPosixPathToPattern;159  }160});161 162// node_modules/is-extglob/index.js163var require_is_extglob = __commonJS({164  "node_modules/is-extglob/index.js"(exports, module) {165    module.exports = function isExtglob(str) {166      if (typeof str !== "string" || str === "") {167        return false;168      }169      var match;170      while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) {171        if (match[2]) return true;172        str = str.slice(match.index + match[0].length);173      }174      return false;175    };176  }177});178 179// node_modules/is-glob/index.js180var require_is_glob = __commonJS({181  "node_modules/is-glob/index.js"(exports, module) {182    var isExtglob = require_is_extglob();183    var chars = { "{": "}", "(": ")", "[": "]" };184    var strictCheck = function(str) {185      if (str[0] === "!") {186        return true;187      }188      var index = 0;189      var pipeIndex = -2;190      var closeSquareIndex = -2;191      var closeCurlyIndex = -2;192      var closeParenIndex = -2;193      var backSlashIndex = -2;194      while (index < str.length) {195        if (str[index] === "*") {196          return true;197        }198        if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) {199          return true;200        }201        if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") {202          if (closeSquareIndex < index) {203            closeSquareIndex = str.indexOf("]", index);204          }205          if (closeSquareIndex > index) {206            if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {207              return true;208            }209            backSlashIndex = str.indexOf("\\", index);210            if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {211              return true;212            }213          }214        }215        if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") {216          closeCurlyIndex = str.indexOf("}", index);217          if (closeCurlyIndex > index) {218            backSlashIndex = str.indexOf("\\", index);219            if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {220              return true;221            }222          }223        }224        if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") {225          closeParenIndex = str.indexOf(")", index);226          if (closeParenIndex > index) {227            backSlashIndex = str.indexOf("\\", index);228            if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {229              return true;230            }231          }232        }233        if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") {234          if (pipeIndex < index) {235            pipeIndex = str.indexOf("|", index);236          }237          if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") {238            closeParenIndex = str.indexOf(")", pipeIndex);239            if (closeParenIndex > pipeIndex) {240              backSlashIndex = str.indexOf("\\", pipeIndex);241              if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {242                return true;243              }244            }245          }246        }247        if (str[index] === "\\") {248          var open = str[index + 1];249          index += 2;250          var close = chars[open];251          if (close) {252            var n = str.indexOf(close, index);253            if (n !== -1) {254              index = n + 1;255            }256          }257          if (str[index] === "!") {258            return true;259          }260        } else {261          index++;262        }263      }264      return false;265    };266    var relaxedCheck = function(str) {267      if (str[0] === "!") {268        return true;269      }270      var index = 0;271      while (index < str.length) {272        if (/[*?{}()[\]]/.test(str[index])) {273          return true;274        }275        if (str[index] === "\\") {276          var open = str[index + 1];277          index += 2;278          var close = chars[open];279          if (close) {280            var n = str.indexOf(close, index);281            if (n !== -1) {282              index = n + 1;283            }284          }285          if (str[index] === "!") {286            return true;287          }288        } else {289          index++;290        }291      }292      return false;293    };294    module.exports = function isGlob(str, options8) {295      if (typeof str !== "string" || str === "") {296        return false;297      }298      if (isExtglob(str)) {299        return true;300      }301      var check2 = strictCheck;302      if (options8 && options8.strict === false) {303        check2 = relaxedCheck;304      }305      return check2(str);306    };307  }308});309 310// node_modules/fast-glob/node_modules/glob-parent/index.js311var require_glob_parent = __commonJS({312  "node_modules/fast-glob/node_modules/glob-parent/index.js"(exports, module) {313    "use strict";314    var isGlob = require_is_glob();315    var pathPosixDirname = __require("path").posix.dirname;316    var isWin32 = __require("os").platform() === "win32";317    var slash2 = "/";318    var backslash = /\\/g;319    var enclosure = /[\{\[].*[\}\]]$/;320    var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;321    var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;322    module.exports = function globParent(str, opts) {323      var options8 = Object.assign({ flipBackslashes: true }, opts);324      if (options8.flipBackslashes && isWin32 && str.indexOf(slash2) < 0) {325        str = str.replace(backslash, slash2);326      }327      if (enclosure.test(str)) {328        str += slash2;329      }330      str += "a";331      do {332        str = pathPosixDirname(str);333      } while (isGlob(str) || globby.test(str));334      return str.replace(escaped, "$1");335    };336  }337});338 339// node_modules/braces/lib/utils.js340var require_utils = __commonJS({341  "node_modules/braces/lib/utils.js"(exports) {342    "use strict";343    exports.isInteger = (num) => {344      if (typeof num === "number") {345        return Number.isInteger(num);346      }347      if (typeof num === "string" && num.trim() !== "") {348        return Number.isInteger(Number(num));349      }350      return false;351    };352    exports.find = (node, type) => node.nodes.find((node2) => node2.type === type);353    exports.exceedsLimit = (min, max, step = 1, limit) => {354      if (limit === false) return false;355      if (!exports.isInteger(min) || !exports.isInteger(max)) return false;356      return (Number(max) - Number(min)) / Number(step) >= limit;357    };358    exports.escapeNode = (block, n = 0, type) => {359      const node = block.nodes[n];360      if (!node) return;361      if (type && node.type === type || node.type === "open" || node.type === "close") {362        if (node.escaped !== true) {363          node.value = "\\" + node.value;364          node.escaped = true;365        }366      }367    };368    exports.encloseBrace = (node) => {369      if (node.type !== "brace") return false;370      if (node.commas >> 0 + node.ranges >> 0 === 0) {371        node.invalid = true;372        return true;373      }374      return false;375    };376    exports.isInvalidBrace = (block) => {377      if (block.type !== "brace") return false;378      if (block.invalid === true || block.dollar) return true;379      if (block.commas >> 0 + block.ranges >> 0 === 0) {380        block.invalid = true;381        return true;382      }383      if (block.open !== true || block.close !== true) {384        block.invalid = true;385        return true;386      }387      return false;388    };389    exports.isOpenOrClose = (node) => {390      if (node.type === "open" || node.type === "close") {391        return true;392      }393      return node.open === true || node.close === true;394    };395    exports.reduce = (nodes) => nodes.reduce((acc, node) => {396      if (node.type === "text") acc.push(node.value);397      if (node.type === "range") node.type = "text";398      return acc;399    }, []);400    exports.flatten = (...args) => {401      const result = [];402      const flat = (arr) => {403        for (let i = 0; i < arr.length; i++) {404          const ele = arr[i];405          if (Array.isArray(ele)) {406            flat(ele);407            continue;408          }409          if (ele !== void 0) {410            result.push(ele);411          }412        }413        return result;414      };415      flat(args);416      return result;417    };418  }419});420 421// node_modules/braces/lib/stringify.js422var require_stringify = __commonJS({423  "node_modules/braces/lib/stringify.js"(exports, module) {424    "use strict";425    var utils = require_utils();426    module.exports = (ast, options8 = {}) => {427      const stringify2 = (node, parent = {}) => {428        const invalidBlock = options8.escapeInvalid && utils.isInvalidBrace(parent);429        const invalidNode = node.invalid === true && options8.escapeInvalid === true;430        let output = "";431        if (node.value) {432          if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {433            return "\\" + node.value;434          }435          return node.value;436        }437        if (node.value) {438          return node.value;439        }440        if (node.nodes) {441          for (const child of node.nodes) {442            output += stringify2(child);443          }444        }445        return output;446      };447      return stringify2(ast);448    };449  }450});451 452// node_modules/is-number/index.js453var require_is_number = __commonJS({454  "node_modules/is-number/index.js"(exports, module) {455    "use strict";456    module.exports = function(num) {457      if (typeof num === "number") {458        return num - num === 0;459      }460      if (typeof num === "string" && num.trim() !== "") {461        return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);462      }463      return false;464    };465  }466});467 468// node_modules/to-regex-range/index.js469var require_to_regex_range = __commonJS({470  "node_modules/to-regex-range/index.js"(exports, module) {471    "use strict";472    var isNumber = require_is_number();473    var toRegexRange = (min, max, options8) => {474      if (isNumber(min) === false) {475        throw new TypeError("toRegexRange: expected the first argument to be a number");476      }477      if (max === void 0 || min === max) {478        return String(min);479      }480      if (isNumber(max) === false) {481        throw new TypeError("toRegexRange: expected the second argument to be a number.");482      }483      let opts = { relaxZeros: true, ...options8 };484      if (typeof opts.strictZeros === "boolean") {485        opts.relaxZeros = opts.strictZeros === false;486      }487      let relax = String(opts.relaxZeros);488      let shorthand = String(opts.shorthand);489      let capture = String(opts.capture);490      let wrap = String(opts.wrap);491      let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;492      if (toRegexRange.cache.hasOwnProperty(cacheKey)) {493        return toRegexRange.cache[cacheKey].result;494      }495      let a = Math.min(min, max);496      let b = Math.max(min, max);497      if (Math.abs(a - b) === 1) {498        let result = min + "|" + max;499        if (opts.capture) {500          return `(${result})`;501        }502        if (opts.wrap === false) {503          return result;504        }505        return `(?:${result})`;506      }507      let isPadded = hasPadding(min) || hasPadding(max);508      let state = { min, max, a, b };509      let positives = [];510      let negatives = [];511      if (isPadded) {512        state.isPadded = isPadded;513        state.maxLen = String(state.max).length;514      }515      if (a < 0) {516        let newMin = b < 0 ? Math.abs(b) : 1;517        negatives = splitToPatterns(newMin, Math.abs(a), state, opts);518        a = state.a = 0;519      }520      if (b >= 0) {521        positives = splitToPatterns(a, b, state, opts);522      }523      state.negatives = negatives;524      state.positives = positives;525      state.result = collatePatterns(negatives, positives, opts);526      if (opts.capture === true) {527        state.result = `(${state.result})`;528      } else if (opts.wrap !== false && positives.length + negatives.length > 1) {529        state.result = `(?:${state.result})`;530      }531      toRegexRange.cache[cacheKey] = state;532      return state.result;533    };534    function collatePatterns(neg, pos2, options8) {535      let onlyNegative = filterPatterns(neg, pos2, "-", false, options8) || [];536      let onlyPositive = filterPatterns(pos2, neg, "", false, options8) || [];537      let intersected = filterPatterns(neg, pos2, "-?", true, options8) || [];538      let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);539      return subpatterns.join("|");540    }541    function splitToRanges(min, max) {542      let nines = 1;543      let zeros = 1;544      let stop = countNines(min, nines);545      let stops = /* @__PURE__ */ new Set([max]);546      while (min <= stop && stop <= max) {547        stops.add(stop);548        nines += 1;549        stop = countNines(min, nines);550      }551      stop = countZeros(max + 1, zeros) - 1;552      while (min < stop && stop <= max) {553        stops.add(stop);554        zeros += 1;555        stop = countZeros(max + 1, zeros) - 1;556      }557      stops = [...stops];558      stops.sort(compare);559      return stops;560    }561    function rangeToPattern(start, stop, options8) {562      if (start === stop) {563        return { pattern: start, count: [], digits: 0 };564      }565      let zipped = zip(start, stop);566      let digits = zipped.length;567      let pattern = "";568      let count = 0;569      for (let i = 0; i < digits; i++) {570        let [startDigit, stopDigit] = zipped[i];571        if (startDigit === stopDigit) {572          pattern += startDigit;573        } else if (startDigit !== "0" || stopDigit !== "9") {574          pattern += toCharacterClass(startDigit, stopDigit, options8);575        } else {576          count++;577        }578      }579      if (count) {580        pattern += options8.shorthand === true ? "\\d" : "[0-9]";581      }582      return { pattern, count: [count], digits };583    }584    function splitToPatterns(min, max, tok, options8) {585      let ranges = splitToRanges(min, max);586      let tokens = [];587      let start = min;588      let prev;589      for (let i = 0; i < ranges.length; i++) {590        let max2 = ranges[i];591        let obj = rangeToPattern(String(start), String(max2), options8);592        let zeros = "";593        if (!tok.isPadded && prev && prev.pattern === obj.pattern) {594          if (prev.count.length > 1) {595            prev.count.pop();596          }597          prev.count.push(obj.count[0]);598          prev.string = prev.pattern + toQuantifier(prev.count);599          start = max2 + 1;600          continue;601        }602        if (tok.isPadded) {603          zeros = padZeros(max2, tok, options8);604        }605        obj.string = zeros + obj.pattern + toQuantifier(obj.count);606        tokens.push(obj);607        start = max2 + 1;608        prev = obj;609      }610      return tokens;611    }612    function filterPatterns(arr, comparison, prefix, intersection, options8) {613      let result = [];614      for (let ele of arr) {615        let { string } = ele;616        if (!intersection && !contains(comparison, "string", string)) {617          result.push(prefix + string);618        }619        if (intersection && contains(comparison, "string", string)) {620          result.push(prefix + string);621        }622      }623      return result;624    }625    function zip(a, b) {626      let arr = [];627      for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);628      return arr;629    }630    function compare(a, b) {631      return a > b ? 1 : b > a ? -1 : 0;632    }633    function contains(arr, key2, val) {634      return arr.some((ele) => ele[key2] === val);635    }636    function countNines(min, len) {637      return Number(String(min).slice(0, -len) + "9".repeat(len));638    }639    function countZeros(integer, zeros) {640      return integer - integer % Math.pow(10, zeros);641    }642    function toQuantifier(digits) {643      let [start = 0, stop = ""] = digits;644      if (stop || start > 1) {645        return `{${start + (stop ? "," + stop : "")}}`;646      }647      return "";648    }649    function toCharacterClass(a, b, options8) {650      return `[${a}${b - a === 1 ? "" : "-"}${b}]`;651    }652    function hasPadding(str) {653      return /^-?(0+)\d/.test(str);654    }655    function padZeros(value, tok, options8) {656      if (!tok.isPadded) {657        return value;658      }659      let diff = Math.abs(tok.maxLen - String(value).length);660      let relax = options8.relaxZeros !== false;661      switch (diff) {662        case 0:663          return "";664        case 1:665          return relax ? "0?" : "0";666        case 2:667          return relax ? "0{0,2}" : "00";668        default: {669          return relax ? `0{0,${diff}}` : `0{${diff}}`;670        }671      }672    }673    toRegexRange.cache = {};674    toRegexRange.clearCache = () => toRegexRange.cache = {};675    module.exports = toRegexRange;676  }677});678 679// node_modules/fill-range/index.js680var require_fill_range = __commonJS({681  "node_modules/fill-range/index.js"(exports, module) {682    "use strict";683    var util2 = __require("util");684    var toRegexRange = require_to_regex_range();685    var isObject2 = (val) => val !== null && typeof val === "object" && !Array.isArray(val);686    var transform = (toNumber) => {687      return (value) => toNumber === true ? Number(value) : String(value);688    };689    var isValidValue = (value) => {690      return typeof value === "number" || typeof value === "string" && value !== "";691    };692    var isNumber = (num) => Number.isInteger(+num);693    var zeros = (input) => {694      let value = `${input}`;695      let index = -1;696      if (value[0] === "-") value = value.slice(1);697      if (value === "0") return false;698      while (value[++index] === "0") ;699      return index > 0;700    };701    var stringify2 = (start, end, options8) => {702      if (typeof start === "string" || typeof end === "string") {703        return true;704      }705      return options8.stringify === true;706    };707    var pad = (input, maxLength, toNumber) => {708      if (maxLength > 0) {709        let dash = input[0] === "-" ? "-" : "";710        if (dash) input = input.slice(1);711        input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");712      }713      if (toNumber === false) {714        return String(input);715      }716      return input;717    };718    var toMaxLen = (input, maxLength) => {719      let negative = input[0] === "-" ? "-" : "";720      if (negative) {721        input = input.slice(1);722        maxLength--;723      }724      while (input.length < maxLength) input = "0" + input;725      return negative ? "-" + input : input;726    };727    var toSequence = (parts, options8, maxLen) => {728      parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);729      parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);730      let prefix = options8.capture ? "" : "?:";731      let positives = "";732      let negatives = "";733      let result;734      if (parts.positives.length) {735        positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|");736      }737      if (parts.negatives.length) {738        negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`;739      }740      if (positives && negatives) {741        result = `${positives}|${negatives}`;742      } else {743        result = positives || negatives;744      }745      if (options8.wrap) {746        return `(${prefix}${result})`;747      }748      return result;749    };750    var toRange = (a, b, isNumbers, options8) => {751      if (isNumbers) {752        return toRegexRange(a, b, { wrap: false, ...options8 });753      }754      let start = String.fromCharCode(a);755      if (a === b) return start;756      let stop = String.fromCharCode(b);757      return `[${start}-${stop}]`;758    };759    var toRegex = (start, end, options8) => {760      if (Array.isArray(start)) {761        let wrap = options8.wrap === true;762        let prefix = options8.capture ? "" : "?:";763        return wrap ? `(${prefix}${start.join("|")})` : start.join("|");764      }765      return toRegexRange(start, end, options8);766    };767    var rangeError = (...args) => {768      return new RangeError("Invalid range arguments: " + util2.inspect(...args));769    };770    var invalidRange = (start, end, options8) => {771      if (options8.strictRanges === true) throw rangeError([start, end]);772      return [];773    };774    var invalidStep = (step, options8) => {775      if (options8.strictRanges === true) {776        throw new TypeError(`Expected step "${step}" to be a number`);777      }778      return [];779    };780    var fillNumbers = (start, end, step = 1, options8 = {}) => {781      let a = Number(start);782      let b = Number(end);783      if (!Number.isInteger(a) || !Number.isInteger(b)) {784        if (options8.strictRanges === true) throw rangeError([start, end]);785        return [];786      }787      if (a === 0) a = 0;788      if (b === 0) b = 0;789      let descending = a > b;790      let startString = String(start);791      let endString = String(end);792      let stepString = String(step);793      step = Math.max(Math.abs(step), 1);794      let padded = zeros(startString) || zeros(endString) || zeros(stepString);795      let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;796      let toNumber = padded === false && stringify2(start, end, options8) === false;797      let format3 = options8.transform || transform(toNumber);798      if (options8.toRegex && step === 1) {799        return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options8);800      }801      let parts = { negatives: [], positives: [] };802      let push2 = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num));803      let range = [];804      let index = 0;805      while (descending ? a >= b : a <= b) {806        if (options8.toRegex === true && step > 1) {807          push2(a);808        } else {809          range.push(pad(format3(a, index), maxLen, toNumber));810        }811        a = descending ? a - step : a + step;812        index++;813      }814      if (options8.toRegex === true) {815        return step > 1 ? toSequence(parts, options8, maxLen) : toRegex(range, null, { wrap: false, ...options8 });816      }817      return range;818    };819    var fillLetters = (start, end, step = 1, options8 = {}) => {820      if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {821        return invalidRange(start, end, options8);822      }823      let format3 = options8.transform || ((val) => String.fromCharCode(val));824      let a = `${start}`.charCodeAt(0);825      let b = `${end}`.charCodeAt(0);826      let descending = a > b;827      let min = Math.min(a, b);828      let max = Math.max(a, b);829      if (options8.toRegex && step === 1) {830        return toRange(min, max, false, options8);831      }832      let range = [];833      let index = 0;834      while (descending ? a >= b : a <= b) {835        range.push(format3(a, index));836        a = descending ? a - step : a + step;837        index++;838      }839      if (options8.toRegex === true) {840        return toRegex(range, null, { wrap: false, options: options8 });841      }842      return range;843    };844    var fill = (start, end, step, options8 = {}) => {845      if (end == null && isValidValue(start)) {846        return [start];847      }848      if (!isValidValue(start) || !isValidValue(end)) {849        return invalidRange(start, end, options8);850      }851      if (typeof step === "function") {852        return fill(start, end, 1, { transform: step });853      }854      if (isObject2(step)) {855        return fill(start, end, 0, step);856      }857      let opts = { ...options8 };858      if (opts.capture === true) opts.wrap = true;859      step = step || opts.step || 1;860      if (!isNumber(step)) {861        if (step != null && !isObject2(step)) return invalidStep(step, opts);862        return fill(start, end, 1, step);863      }864      if (isNumber(start) && isNumber(end)) {865        return fillNumbers(start, end, step, opts);866      }867      return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);868    };869    module.exports = fill;870  }871});872 873// node_modules/braces/lib/compile.js874var require_compile = __commonJS({875  "node_modules/braces/lib/compile.js"(exports, module) {876    "use strict";877    var fill = require_fill_range();878    var utils = require_utils();879    var compile = (ast, options8 = {}) => {880      const walk = (node, parent = {}) => {881        const invalidBlock = utils.isInvalidBrace(parent);882        const invalidNode = node.invalid === true && options8.escapeInvalid === true;883        const invalid = invalidBlock === true || invalidNode === true;884        const prefix = options8.escapeInvalid === true ? "\\" : "";885        let output = "";886        if (node.isOpen === true) {887          return prefix + node.value;888        }889        if (node.isClose === true) {890          console.log("node.isClose", prefix, node.value);891          return prefix + node.value;892        }893        if (node.type === "open") {894          return invalid ? prefix + node.value : "(";895        }896        if (node.type === "close") {897          return invalid ? prefix + node.value : ")";898        }899        if (node.type === "comma") {900          return node.prev.type === "comma" ? "" : invalid ? node.value : "|";901        }902        if (node.value) {903          return node.value;904        }905        if (node.nodes && node.ranges > 0) {906          const args = utils.reduce(node.nodes);907          const range = fill(...args, { ...options8, wrap: false, toRegex: true, strictZeros: true });908          if (range.length !== 0) {909            return args.length > 1 && range.length > 1 ? `(${range})` : range;910          }911        }912        if (node.nodes) {913          for (const child of node.nodes) {914            output += walk(child, node);915          }916        }917        return output;918      };919      return walk(ast);920    };921    module.exports = compile;922  }923});924 925// node_modules/braces/lib/expand.js926var require_expand = __commonJS({927  "node_modules/braces/lib/expand.js"(exports, module) {928    "use strict";929    var fill = require_fill_range();930    var stringify2 = require_stringify();931    var utils = require_utils();932    var append = (queue = "", stash = "", enclose = false) => {933      const result = [];934      queue = [].concat(queue);935      stash = [].concat(stash);936      if (!stash.length) return queue;937      if (!queue.length) {938        return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;939      }940      for (const item of queue) {941        if (Array.isArray(item)) {942          for (const value of item) {943            result.push(append(value, stash, enclose));944          }945        } else {946          for (let ele of stash) {947            if (enclose === true && typeof ele === "string") ele = `{${ele}}`;948            result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);949          }950        }951      }952      return utils.flatten(result);953    };954    var expand = (ast, options8 = {}) => {955      const rangeLimit = options8.rangeLimit === void 0 ? 1e3 : options8.rangeLimit;956      const walk = (node, parent = {}) => {957        node.queue = [];958        let p = parent;959        let q = parent.queue;960        while (p.type !== "brace" && p.type !== "root" && p.parent) {961          p = p.parent;962          q = p.queue;963        }964        if (node.invalid || node.dollar) {965          q.push(append(q.pop(), stringify2(node, options8)));966          return;967        }968        if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {969          q.push(append(q.pop(), ["{}"]));970          return;971        }972        if (node.nodes && node.ranges > 0) {973          const args = utils.reduce(node.nodes);974          if (utils.exceedsLimit(...args, options8.step, rangeLimit)) {975            throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");976          }977          let range = fill(...args, options8);978          if (range.length === 0) {979            range = stringify2(node, options8);980          }981          q.push(append(q.pop(), range));982          node.nodes = [];983          return;984        }985        const enclose = utils.encloseBrace(node);986        let queue = node.queue;987        let block = node;988        while (block.type !== "brace" && block.type !== "root" && block.parent) {989          block = block.parent;990          queue = block.queue;991        }992        for (let i = 0; i < node.nodes.length; i++) {993          const child = node.nodes[i];994          if (child.type === "comma" && node.type === "brace") {995            if (i === 1) queue.push("");996            queue.push("");997            continue;998          }999          if (child.type === "close") {1000            q.push(append(q.pop(), queue, enclose));1001            continue;1002          }1003          if (child.value && child.type !== "open") {1004            queue.push(append(queue.pop(), child.value));1005            continue;1006          }1007          if (child.nodes) {1008            walk(child, node);1009          }1010        }1011        return queue;1012      };1013      return utils.flatten(walk(ast));1014    };1015    module.exports = expand;1016  }1017});1018 1019// node_modules/braces/lib/constants.js1020var require_constants = __commonJS({1021  "node_modules/braces/lib/constants.js"(exports, module) {1022    "use strict";1023    module.exports = {1024      MAX_LENGTH: 1e4,1025      // Digits1026      CHAR_0: "0",1027      /* 0 */1028      CHAR_9: "9",1029      /* 9 */1030      // Alphabet chars.1031      CHAR_UPPERCASE_A: "A",1032      /* A */1033      CHAR_LOWERCASE_A: "a",1034      /* a */1035      CHAR_UPPERCASE_Z: "Z",1036      /* Z */1037      CHAR_LOWERCASE_Z: "z",1038      /* z */1039      CHAR_LEFT_PARENTHESES: "(",1040      /* ( */1041      CHAR_RIGHT_PARENTHESES: ")",1042      /* ) */1043      CHAR_ASTERISK: "*",1044      /* * */1045      // Non-alphabetic chars.1046      CHAR_AMPERSAND: "&",1047      /* & */1048      CHAR_AT: "@",1049      /* @ */1050      CHAR_BACKSLASH: "\\",1051      /* \ */1052      CHAR_BACKTICK: "`",1053      /* ` */1054      CHAR_CARRIAGE_RETURN: "\r",1055      /* \r */1056      CHAR_CIRCUMFLEX_ACCENT: "^",1057      /* ^ */1058      CHAR_COLON: ":",1059      /* : */1060      CHAR_COMMA: ",",1061      /* , */1062      CHAR_DOLLAR: "$",1063      /* . */1064      CHAR_DOT: ".",1065      /* . */1066      CHAR_DOUBLE_QUOTE: '"',1067      /* " */1068      CHAR_EQUAL: "=",1069      /* = */1070      CHAR_EXCLAMATION_MARK: "!",1071      /* ! */1072      CHAR_FORM_FEED: "\f",1073      /* \f */1074      CHAR_FORWARD_SLASH: "/",1075      /* / */1076      CHAR_HASH: "#",1077      /* # */1078      CHAR_HYPHEN_MINUS: "-",1079      /* - */1080      CHAR_LEFT_ANGLE_BRACKET: "<",1081      /* < */1082      CHAR_LEFT_CURLY_BRACE: "{",1083      /* { */1084      CHAR_LEFT_SQUARE_BRACKET: "[",1085      /* [ */1086      CHAR_LINE_FEED: "\n",1087      /* \n */1088      CHAR_NO_BREAK_SPACE: "\xA0",1089      /* \u00A0 */1090      CHAR_PERCENT: "%",1091      /* % */1092      CHAR_PLUS: "+",1093      /* + */1094      CHAR_QUESTION_MARK: "?",1095      /* ? */1096      CHAR_RIGHT_ANGLE_BRACKET: ">",1097      /* > */1098      CHAR_RIGHT_CURLY_BRACE: "}",1099      /* } */1100      CHAR_RIGHT_SQUARE_BRACKET: "]",1101      /* ] */1102      CHAR_SEMICOLON: ";",1103      /* ; */1104      CHAR_SINGLE_QUOTE: "'",1105      /* ' */1106      CHAR_SPACE: " ",1107      /*   */1108      CHAR_TAB: "	",1109      /* \t */1110      CHAR_UNDERSCORE: "_",1111      /* _ */1112      CHAR_VERTICAL_LINE: "|",1113      /* | */1114      CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"1115      /* \uFEFF */1116    };1117  }1118});1119 1120// node_modules/braces/lib/parse.js1121var require_parse = __commonJS({1122  "node_modules/braces/lib/parse.js"(exports, module) {1123    "use strict";1124    var stringify2 = require_stringify();1125    var {1126      MAX_LENGTH,1127      CHAR_BACKSLASH,1128      /* \ */1129      CHAR_BACKTICK,1130      /* ` */1131      CHAR_COMMA,1132      /* , */1133      CHAR_DOT,1134      /* . */1135      CHAR_LEFT_PARENTHESES,1136      /* ( */1137      CHAR_RIGHT_PARENTHESES,1138      /* ) */1139      CHAR_LEFT_CURLY_BRACE,1140      /* { */1141      CHAR_RIGHT_CURLY_BRACE,1142      /* } */1143      CHAR_LEFT_SQUARE_BRACKET,1144      /* [ */1145      CHAR_RIGHT_SQUARE_BRACKET,1146      /* ] */1147      CHAR_DOUBLE_QUOTE,1148      /* " */1149      CHAR_SINGLE_QUOTE,1150      /* ' */1151      CHAR_NO_BREAK_SPACE,1152      CHAR_ZERO_WIDTH_NOBREAK_SPACE1153    } = require_constants();1154    var parse7 = (input, options8 = {}) => {1155      if (typeof input !== "string") {1156        throw new TypeError("Expected a string");1157      }1158      const opts = options8 || {};1159      const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;1160      if (input.length > max) {1161        throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);1162      }1163      const ast = { type: "root", input, nodes: [] };1164      const stack2 = [ast];1165      let block = ast;1166      let prev = ast;1167      let brackets = 0;1168      const length = input.length;1169      let index = 0;1170      let depth = 0;1171      let value;1172      const advance = () => input[index++];1173      const push2 = (node) => {1174        if (node.type === "text" && prev.type === "dot") {1175          prev.type = "text";1176        }1177        if (prev && prev.type === "text" && node.type === "text") {1178          prev.value += node.value;1179          return;1180        }1181        block.nodes.push(node);1182        node.parent = block;1183        node.prev = prev;1184        prev = node;1185        return node;1186      };1187      push2({ type: "bos" });1188      while (index < length) {1189        block = stack2[stack2.length - 1];1190        value = advance();1191        if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {1192          continue;1193        }1194        if (value === CHAR_BACKSLASH) {1195          push2({ type: "text", value: (options8.keepEscaping ? value : "") + advance() });1196          continue;1197        }1198        if (value === CHAR_RIGHT_SQUARE_BRACKET) {1199          push2({ type: "text", value: "\\" + value });1200          continue;

Showing the first 1,200 of 18794 lines. Download the file for the rest.

Brunobkr/llama.cpp_AlgMor24_github · Team Ai