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.
03.1k
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 locator_exports = {};20__export(locator_exports, {21 FrameLocator: () => FrameLocator,22 Locator: () => Locator,23 setTestIdAttribute: () => setTestIdAttribute,24 testIdAttributeName: () => testIdAttributeName25});26module.exports = __toCommonJS(locator_exports);27var import_elementHandle = require("./elementHandle");28var import_locatorGenerators = require("../utils/isomorphic/locatorGenerators");29var import_locatorUtils = require("../utils/isomorphic/locatorUtils");30var import_stringUtils = require("../utils/isomorphic/stringUtils");31var import_rtti = require("../utils/isomorphic/rtti");32var import_time = require("../utils/isomorphic/time");33class Locator {34 constructor(frame, selector, options) {35 this._frame = frame;36 this._selector = selector;37 if (options?.hasText)38 this._selector += ` >> internal:has-text=${(0, import_stringUtils.escapeForTextSelector)(options.hasText, false)}`;39 if (options?.hasNotText)40 this._selector += ` >> internal:has-not-text=${(0, import_stringUtils.escapeForTextSelector)(options.hasNotText, false)}`;41 if (options?.has) {42 const locator = options.has;43 if (locator._frame !== frame)44 throw new Error(`Inner "has" locator must belong to the same frame.`);45 this._selector += ` >> internal:has=` + JSON.stringify(locator._selector);46 }47 if (options?.hasNot) {48 const locator = options.hasNot;49 if (locator._frame !== frame)50 throw new Error(`Inner "hasNot" locator must belong to the same frame.`);51 this._selector += ` >> internal:has-not=` + JSON.stringify(locator._selector);52 }53 if (options?.visible !== void 0)54 this._selector += ` >> visible=${options.visible ? "true" : "false"}`;55 if (this._frame._platform.inspectCustom)56 this[this._frame._platform.inspectCustom] = () => this._inspect();57 }58 async _withElement(task, options) {59 const timeout = this._frame._timeout({ timeout: options.timeout });60 const deadline = timeout ? (0, import_time.monotonicTime)() + timeout : 0;61 return await this._frame._wrapApiCall(async () => {62 const result = await this._frame._channel.waitForSelector({ selector: this._selector, strict: true, state: "attached", timeout });63 const handle = import_elementHandle.ElementHandle.fromNullable(result.element);64 if (!handle)65 throw new Error(`Could not resolve ${this._selector} to DOM Element`);66 try {67 return await task(handle, deadline ? deadline - (0, import_time.monotonicTime)() : 0);68 } finally {69 await handle.dispose();70 }71 }, { title: options.title, internal: options.internal });72 }73 _equals(locator) {74 return this._frame === locator._frame && this._selector === locator._selector;75 }76 page() {77 return this._frame.page();78 }79 async boundingBox(options) {80 return await this._withElement((h) => h.boundingBox(), { title: "Bounding box", timeout: options?.timeout });81 }82 async check(options = {}) {83 return await this._frame.check(this._selector, { strict: true, ...options });84 }85 async click(options = {}) {86 return await this._frame.click(this._selector, { strict: true, ...options });87 }88 async dblclick(options = {}) {89 await this._frame.dblclick(this._selector, { strict: true, ...options });90 }91 async dispatchEvent(type, eventInit = {}, options) {92 return await this._frame.dispatchEvent(this._selector, type, eventInit, { strict: true, ...options });93 }94 async dragTo(target, options = {}) {95 return await this._frame.dragAndDrop(this._selector, target._selector, {96 strict: true,97 ...options98 });99 }100 async evaluate(pageFunction, arg, options) {101 return await this._withElement((h) => h.evaluate(pageFunction, arg), { title: "Evaluate", timeout: options?.timeout });102 }103 async _evaluateFunction(functionDeclaration, options) {104 return await this._withElement((h) => h._evaluateFunction(functionDeclaration), { title: "Evaluate", timeout: options?.timeout });105 }106 async evaluateAll(pageFunction, arg) {107 return await this._frame.$$eval(this._selector, pageFunction, arg);108 }109 async evaluateHandle(pageFunction, arg, options) {110 return await this._withElement((h) => h.evaluateHandle(pageFunction, arg), { title: "Evaluate", timeout: options?.timeout });111 }112 async fill(value, options = {}) {113 return await this._frame.fill(this._selector, value, { strict: true, ...options });114 }115 async clear(options = {}) {116 await this._frame._wrapApiCall(() => this.fill("", options), { title: "Clear" });117 }118 async _highlight() {119 return await this._frame._highlight(this._selector);120 }121 async highlight() {122 return await this._frame._highlight(this._selector);123 }124 locator(selectorOrLocator, options) {125 if ((0, import_rtti.isString)(selectorOrLocator))126 return new Locator(this._frame, this._selector + " >> " + selectorOrLocator, options);127 if (selectorOrLocator._frame !== this._frame)128 throw new Error(`Locators must belong to the same frame.`);129 return new Locator(this._frame, this._selector + " >> internal:chain=" + JSON.stringify(selectorOrLocator._selector), options);130 }131 getByTestId(testId) {132 return this.locator((0, import_locatorUtils.getByTestIdSelector)(testIdAttributeName(), testId));133 }134 getByAltText(text, options) {135 return this.locator((0, import_locatorUtils.getByAltTextSelector)(text, options));136 }137 getByLabel(text, options) {138 return this.locator((0, import_locatorUtils.getByLabelSelector)(text, options));139 }140 getByPlaceholder(text, options) {141 return this.locator((0, import_locatorUtils.getByPlaceholderSelector)(text, options));142 }143 getByText(text, options) {144 return this.locator((0, import_locatorUtils.getByTextSelector)(text, options));145 }146 getByTitle(text, options) {147 return this.locator((0, import_locatorUtils.getByTitleSelector)(text, options));148 }149 getByRole(role, options = {}) {150 return this.locator((0, import_locatorUtils.getByRoleSelector)(role, options));151 }152 frameLocator(selector) {153 return new FrameLocator(this._frame, this._selector + " >> " + selector);154 }155 filter(options) {156 return new Locator(this._frame, this._selector, options);157 }158 async elementHandle(options) {159 return await this._frame.waitForSelector(this._selector, { strict: true, state: "attached", ...options });160 }161 async elementHandles() {162 return await this._frame.$$(this._selector);163 }164 contentFrame() {165 return new FrameLocator(this._frame, this._selector);166 }167 describe(description) {168 return new Locator(this._frame, this._selector + " >> internal:describe=" + JSON.stringify(description));169 }170 first() {171 return new Locator(this._frame, this._selector + " >> nth=0");172 }173 last() {174 return new Locator(this._frame, this._selector + ` >> nth=-1`);175 }176 nth(index) {177 return new Locator(this._frame, this._selector + ` >> nth=${index}`);178 }179 and(locator) {180 if (locator._frame !== this._frame)181 throw new Error(`Locators must belong to the same frame.`);182 return new Locator(this._frame, this._selector + ` >> internal:and=` + JSON.stringify(locator._selector));183 }184 or(locator) {185 if (locator._frame !== this._frame)186 throw new Error(`Locators must belong to the same frame.`);187 return new Locator(this._frame, this._selector + ` >> internal:or=` + JSON.stringify(locator._selector));188 }189 async focus(options) {190 return await this._frame.focus(this._selector, { strict: true, ...options });191 }192 async blur(options) {193 await this._frame._channel.blur({ selector: this._selector, strict: true, ...options, timeout: this._frame._timeout(options) });194 }195 // options are only here for testing196 async count(_options) {197 return await this._frame._queryCount(this._selector, _options);198 }199 async _resolveSelector() {200 return await this._frame._channel.resolveSelector({ selector: this._selector });201 }202 async getAttribute(name, options) {203 return await this._frame.getAttribute(this._selector, name, { strict: true, ...options });204 }205 async hover(options = {}) {206 return await this._frame.hover(this._selector, { strict: true, ...options });207 }208 async innerHTML(options) {209 return await this._frame.innerHTML(this._selector, { strict: true, ...options });210 }211 async innerText(options) {212 return await this._frame.innerText(this._selector, { strict: true, ...options });213 }214 async inputValue(options) {215 return await this._frame.inputValue(this._selector, { strict: true, ...options });216 }217 async isChecked(options) {218 return await this._frame.isChecked(this._selector, { strict: true, ...options });219 }220 async isDisabled(options) {221 return await this._frame.isDisabled(this._selector, { strict: true, ...options });222 }223 async isEditable(options) {224 return await this._frame.isEditable(this._selector, { strict: true, ...options });225 }226 async isEnabled(options) {227 return await this._frame.isEnabled(this._selector, { strict: true, ...options });228 }229 async isHidden(options) {230 return await this._frame.isHidden(this._selector, { strict: true, ...options });231 }232 async isVisible(options) {233 return await this._frame.isVisible(this._selector, { strict: true, ...options });234 }235 async press(key, options = {}) {236 return await this._frame.press(this._selector, key, { strict: true, ...options });237 }238 async screenshot(options = {}) {239 const mask = options.mask;240 return await this._withElement((h, timeout) => h.screenshot({ ...options, mask, timeout }), { title: "Screenshot", timeout: options.timeout });241 }242 async ariaSnapshot(options) {243 const result = await this._frame._channel.ariaSnapshot({ ...options, selector: this._selector, timeout: this._frame._timeout(options) });244 return result.snapshot;245 }246 async scrollIntoViewIfNeeded(options = {}) {247 return await this._withElement((h, timeout) => h.scrollIntoViewIfNeeded({ ...options, timeout }), { title: "Scroll into view", timeout: options.timeout });248 }249 async selectOption(values, options = {}) {250 return await this._frame.selectOption(this._selector, values, { strict: true, ...options });251 }252 async selectText(options = {}) {253 return await this._withElement((h, timeout) => h.selectText({ ...options, timeout }), { title: "Select text", timeout: options.timeout });254 }255 async setChecked(checked, options) {256 if (checked)257 await this.check(options);258 else259 await this.uncheck(options);260 }261 async setInputFiles(files, options = {}) {262 return await this._frame.setInputFiles(this._selector, files, { strict: true, ...options });263 }264 async tap(options = {}) {265 return await this._frame.tap(this._selector, { strict: true, ...options });266 }267 async textContent(options) {268 return await this._frame.textContent(this._selector, { strict: true, ...options });269 }270 async type(text, options = {}) {271 return await this._frame.type(this._selector, text, { strict: true, ...options });272 }273 async pressSequentially(text, options = {}) {274 return await this.type(text, options);275 }276 async uncheck(options = {}) {277 return await this._frame.uncheck(this._selector, { strict: true, ...options });278 }279 async all() {280 return new Array(await this.count()).fill(0).map((e, i) => this.nth(i));281 }282 async allInnerTexts() {283 return await this._frame.$$eval(this._selector, (ee) => ee.map((e) => e.innerText));284 }285 async allTextContents() {286 return await this._frame.$$eval(this._selector, (ee) => ee.map((e) => e.textContent || ""));287 }288 async waitFor(options) {289 await this._frame._channel.waitForSelector({ selector: this._selector, strict: true, omitReturnValue: true, ...options, timeout: this._frame._timeout(options) });290 }291 async _expect(expression, options) {292 return this._frame._expect(expression, {293 ...options,294 selector: this._selector295 });296 }297 _inspect() {298 return this.toString();299 }300 toString() {301 return (0, import_locatorGenerators.asLocator)("javascript", this._selector);302 }303}304class FrameLocator {305 constructor(frame, selector) {306 this._frame = frame;307 this._frameSelector = selector;308 }309 locator(selectorOrLocator, options) {310 if ((0, import_rtti.isString)(selectorOrLocator))311 return new Locator(this._frame, this._frameSelector + " >> internal:control=enter-frame >> " + selectorOrLocator, options);312 if (selectorOrLocator._frame !== this._frame)313 throw new Error(`Locators must belong to the same frame.`);314 return new Locator(this._frame, this._frameSelector + " >> internal:control=enter-frame >> " + selectorOrLocator._selector, options);315 }316 getByTestId(testId) {317 return this.locator((0, import_locatorUtils.getByTestIdSelector)(testIdAttributeName(), testId));318 }319 getByAltText(text, options) {320 return this.locator((0, import_locatorUtils.getByAltTextSelector)(text, options));321 }322 getByLabel(text, options) {323 return this.locator((0, import_locatorUtils.getByLabelSelector)(text, options));324 }325 getByPlaceholder(text, options) {326 return this.locator((0, import_locatorUtils.getByPlaceholderSelector)(text, options));327 }328 getByText(text, options) {329 return this.locator((0, import_locatorUtils.getByTextSelector)(text, options));330 }331 getByTitle(text, options) {332 return this.locator((0, import_locatorUtils.getByTitleSelector)(text, options));333 }334 getByRole(role, options = {}) {335 return this.locator((0, import_locatorUtils.getByRoleSelector)(role, options));336 }337 owner() {338 return new Locator(this._frame, this._frameSelector);339 }340 frameLocator(selector) {341 return new FrameLocator(this._frame, this._frameSelector + " >> internal:control=enter-frame >> " + selector);342 }343 first() {344 return new FrameLocator(this._frame, this._frameSelector + " >> nth=0");345 }346 last() {347 return new FrameLocator(this._frame, this._frameSelector + ` >> nth=-1`);348 }349 nth(index) {350 return new FrameLocator(this._frame, this._frameSelector + ` >> nth=${index}`);351 }352}353let _testIdAttributeName = "data-testid";354function testIdAttributeName() {355 return _testIdAttributeName;356}357function setTestIdAttribute(attributeName) {358 _testIdAttributeName = attributeName;359}360// Annotate the CommonJS export names for ESM import in node:3610 && (module.exports = {362 FrameLocator,363 Locator,364 setTestIdAttribute,365 testIdAttributeName366});367 