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
elementRoleMap.js151 linesDownload Raw Back to lib
1"use strict";2 3Object.defineProperty(exports, "__esModule", {4  value: true5});6exports.default = void 0;7var _iterationDecorator = _interopRequireDefault(require("./util/iterationDecorator"));8var _rolesMap = _interopRequireDefault(require("./rolesMap"));9function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }10function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }11function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }12function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }13function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; }14function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }15function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }16var elementRoles = [];17var keys = _rolesMap.default.keys();18for (var i = 0; i < keys.length; i++) {19  var key = keys[i];20  var role = _rolesMap.default.get(key);21  if (role) {22    var concepts = [].concat(role.baseConcepts, role.relatedConcepts);23    for (var k = 0; k < concepts.length; k++) {24      var relation = concepts[k];25      if (relation.module === 'HTML') {26        (function () {27          var concept = relation.concept;28          if (concept) {29            var elementRoleRelation = elementRoles.find(function (relation) {30              return ariaRoleRelationConceptEquals(relation[0], concept);31            });32            var roles;33            if (elementRoleRelation) {34              roles = elementRoleRelation[1];35            } else {36              roles = [];37            }38            var isUnique = true;39            for (var _i = 0; _i < roles.length; _i++) {40              if (roles[_i] === key) {41                isUnique = false;42                break;43              }44            }45            if (isUnique) {46              roles.push(key);47            }48            if (!elementRoleRelation) {49              elementRoles.push([concept, roles]);50            }51          }52        })();53      }54    }55  }56}57var elementRoleMap = {58  entries: function entries() {59    return elementRoles;60  },61  forEach: function forEach(fn) {62    var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;63    for (var _i2 = 0, _elementRoles = elementRoles; _i2 < _elementRoles.length; _i2++) {64      var _elementRoles$_i = _slicedToArray(_elementRoles[_i2], 2),65        _key = _elementRoles$_i[0],66        values = _elementRoles$_i[1];67      fn.call(thisArg, values, _key, elementRoles);68    }69  },70  get: function get(key) {71    var item = elementRoles.find(function (tuple) {72      return key.name === tuple[0].name && ariaRoleRelationConceptAttributeEquals(key.attributes, tuple[0].attributes);73    });74    return item && item[1];75  },76  has: function has(key) {77    return !!elementRoleMap.get(key);78  },79  keys: function keys() {80    return elementRoles.map(function (_ref) {81      var _ref2 = _slicedToArray(_ref, 1),82        key = _ref2[0];83      return key;84    });85  },86  values: function values() {87    return elementRoles.map(function (_ref3) {88      var _ref4 = _slicedToArray(_ref3, 2),89        values = _ref4[1];90      return values;91    });92  }93};94function ariaRoleRelationConceptEquals(a, b) {95  return a.name === b.name && ariaRoleRelationConstraintsEquals(a.constraints, b.constraints) && ariaRoleRelationConceptAttributeEquals(a.attributes, b.attributes);96}97function ariaRoleRelationConstraintsEquals(a, b) {98  if (a === undefined && b !== undefined) {99    return false;100  }101  if (a !== undefined && b === undefined) {102    return false;103  }104  if (a !== undefined && b !== undefined) {105    if (a.length !== b.length) {106      return false;107    }108    for (var _i3 = 0; _i3 < a.length; _i3++) {109      if (a[_i3] !== b[_i3]) {110        return false;111      }112    }113  }114  return true;115}116function ariaRoleRelationConceptAttributeEquals(a, b) {117  if (a === undefined && b !== undefined) {118    return false;119  }120  if (a !== undefined && b === undefined) {121    return false;122  }123  if (a !== undefined && b !== undefined) {124    if (a.length !== b.length) {125      return false;126    }127    for (var _i4 = 0; _i4 < a.length; _i4++) {128      if (a[_i4].name !== b[_i4].name || a[_i4].value !== b[_i4].value) {129        return false;130      }131      if (a[_i4].constraints === undefined && b[_i4].constraints !== undefined) {132        return false;133      }134      if (a[_i4].constraints !== undefined && b[_i4].constraints === undefined) {135        return false;136      }137      if (a[_i4].constraints !== undefined && b[_i4].constraints !== undefined) {138        if (a[_i4].constraints.length !== b[_i4].constraints.length) {139          return false;140        }141        for (var j = 0; j < a[_i4].constraints.length; j++) {142          if (a[_i4].constraints[j] !== b[_i4].constraints[j]) {143            return false;144          }145        }146      }147    }148  }149  return true;150}151var _default = exports.default = (0, _iterationDecorator.default)(elementRoleMap, elementRoleMap.entries());
Brunobkr/llama.cpp_AlgMor24_github · Team Ai