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
crAccessibility.js264 linesDownload Raw Back to chromium
1"use strict";2var __defProp = Object.defineProperty;3var __getOwnPropDesc = Object.getOwnPropertyDescriptor;4var __getOwnPropNames = Object.getOwnPropertyNames;5var __hasOwnProp = Object.prototype.hasOwnProperty;6var __export = (target, all) => {7  for (var name in all)8    __defProp(target, name, { get: all[name], enumerable: true });9};10var __copyProps = (to, from, except, desc) => {11  if (from && typeof from === "object" || typeof from === "function") {12    for (let key of __getOwnPropNames(from))13      if (!__hasOwnProp.call(to, key) && key !== except)14        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });15  }16  return to;17};18var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);19var crAccessibility_exports = {};20__export(crAccessibility_exports, {21  getAccessibilityTree: () => getAccessibilityTree22});23module.exports = __toCommonJS(crAccessibility_exports);24async function getAccessibilityTree(client, needle) {25  const { nodes } = await client.send("Accessibility.getFullAXTree");26  const tree = CRAXNode.createTree(client, nodes);27  return {28    tree,29    needle: needle ? await tree._findElement(needle) : null30  };31}32class CRAXNode {33  constructor(client, payload) {34    this._children = [];35    this._richlyEditable = false;36    this._editable = false;37    this._focusable = false;38    this._expanded = false;39    this._hidden = false;40    this._client = client;41    this._payload = payload;42    this._name = this._payload.name ? this._payload.name.value : "";43    this._role = this._payload.role ? this._payload.role.value : "Unknown";44    for (const property of this._payload.properties || []) {45      if (property.name === "editable") {46        this._richlyEditable = property.value.value === "richtext";47        this._editable = true;48      }49      if (property.name === "focusable")50        this._focusable = property.value.value;51      if (property.name === "expanded")52        this._expanded = property.value.value;53      if (property.name === "hidden")54        this._hidden = property.value.value;55    }56  }57  _isPlainTextField() {58    if (this._richlyEditable)59      return false;60    if (this._editable)61      return true;62    return this._role === "textbox" || this._role === "ComboBox" || this._role === "searchbox";63  }64  _isTextOnlyObject() {65    const role = this._role;66    return role === "LineBreak" || role === "text" || role === "InlineTextBox" || role === "StaticText";67  }68  _hasFocusableChild() {69    if (this._cachedHasFocusableChild === void 0) {70      this._cachedHasFocusableChild = false;71      for (const child of this._children) {72        if (child._focusable || child._hasFocusableChild()) {73          this._cachedHasFocusableChild = true;74          break;75        }76      }77    }78    return this._cachedHasFocusableChild;79  }80  children() {81    return this._children;82  }83  async _findElement(element) {84    const objectId = element._objectId;85    const { node: { backendNodeId } } = await this._client.send("DOM.describeNode", { objectId });86    const needle = this.find((node) => node._payload.backendDOMNodeId === backendNodeId);87    return needle || null;88  }89  find(predicate) {90    if (predicate(this))91      return this;92    for (const child of this._children) {93      const result = child.find(predicate);94      if (result)95        return result;96    }97    return null;98  }99  isLeafNode() {100    if (!this._children.length)101      return true;102    if (this._isPlainTextField() || this._isTextOnlyObject())103      return true;104    switch (this._role) {105      case "doc-cover":106      case "graphics-symbol":107      case "img":108      case "Meter":109      case "scrollbar":110      case "slider":111      case "separator":112      case "progressbar":113        return true;114      default:115        break;116    }117    if (this._hasFocusableChild())118      return false;119    if (this._focusable && this._role !== "WebArea" && this._role !== "RootWebArea" && this._name)120      return true;121    if (this._role === "heading" && this._name)122      return true;123    return false;124  }125  isControl() {126    switch (this._role) {127      case "button":128      case "checkbox":129      case "ColorWell":130      case "combobox":131      case "DisclosureTriangle":132      case "listbox":133      case "menu":134      case "menubar":135      case "menuitem":136      case "menuitemcheckbox":137      case "menuitemradio":138      case "radio":139      case "scrollbar":140      case "searchbox":141      case "slider":142      case "spinbutton":143      case "switch":144      case "tab":145      case "textbox":146      case "tree":147        return true;148      default:149        return false;150    }151  }152  isInteresting(insideControl) {153    const role = this._role;154    if (role === "Ignored" || this._hidden)155      return false;156    if (this._focusable || this._richlyEditable)157      return true;158    if (this.isControl())159      return true;160    if (insideControl)161      return false;162    return this.isLeafNode() && !!this._name;163  }164  normalizedRole() {165    switch (this._role) {166      case "RootWebArea":167        return "WebArea";168      case "StaticText":169        return "text";170      default:171        return this._role;172    }173  }174  serialize() {175    const properties = /* @__PURE__ */ new Map();176    for (const property of this._payload.properties || [])177      properties.set(property.name.toLowerCase(), property.value.value);178    if (this._payload.description)179      properties.set("description", this._payload.description.value);180    const node = {181      role: this.normalizedRole(),182      name: this._payload.name ? this._payload.name.value || "" : ""183    };184    const userStringProperties = [185      "description",186      "keyshortcuts",187      "roledescription",188      "valuetext"189    ];190    for (const userStringProperty of userStringProperties) {191      if (!properties.has(userStringProperty))192        continue;193      node[userStringProperty] = properties.get(userStringProperty);194    }195    const booleanProperties = [196      "disabled",197      "expanded",198      "focused",199      "modal",200      "multiline",201      "multiselectable",202      "readonly",203      "required",204      "selected"205    ];206    for (const booleanProperty of booleanProperties) {207      if (booleanProperty === "focused" && (this._role === "WebArea" || this._role === "RootWebArea"))208        continue;209      const value = properties.get(booleanProperty);210      if (!value)211        continue;212      node[booleanProperty] = value;213    }214    const numericalProperties = [215      "level",216      "valuemax",217      "valuemin"218    ];219    for (const numericalProperty of numericalProperties) {220      if (!properties.has(numericalProperty))221        continue;222      node[numericalProperty] = properties.get(numericalProperty);223    }224    const tokenProperties = [225      "autocomplete",226      "haspopup",227      "invalid",228      "orientation"229    ];230    for (const tokenProperty of tokenProperties) {231      const value = properties.get(tokenProperty);232      if (!value || value === "false")233        continue;234      node[tokenProperty] = value;235    }236    const axNode = node;237    if (this._payload.value) {238      if (typeof this._payload.value.value === "string")239        axNode.valueString = this._payload.value.value;240      if (typeof this._payload.value.value === "number")241        axNode.valueNumber = this._payload.value.value;242    }243    if (properties.has("checked"))244      axNode.checked = properties.get("checked") === "true" ? "checked" : properties.get("checked") === "false" ? "unchecked" : "mixed";245    if (properties.has("pressed"))246      axNode.pressed = properties.get("pressed") === "true" ? "pressed" : properties.get("pressed") === "false" ? "released" : "mixed";247    return axNode;248  }249  static createTree(client, payloads) {250    const nodeById = /* @__PURE__ */ new Map();251    for (const payload of payloads)252      nodeById.set(payload.nodeId, new CRAXNode(client, payload));253    for (const node of nodeById.values()) {254      for (const childId of node._payload.childIds || [])255        node._children.push(nodeById.get(childId));256    }257    return nodeById.values().next().value;258  }259}260// Annotate the CommonJS export names for ESM import in node:2610 && (module.exports = {262  getAccessibilityTree263});264 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai