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-client.js256 linesDownload Raw Back to src
1/** @import { ComponentContext, ComponentContextLegacy } from '#client' */2/** @import { EventDispatcher } from './index.js' */3/** @import { NotFunction } from './internal/types.js' */4import { active_reaction, untrack } from './internal/client/runtime.js';5import { is_array } from './internal/shared/utils.js';6import { user_effect } from './internal/client/index.js';7import * as e from './internal/client/errors.js';8import { legacy_mode_flag } from './internal/flags/index.js';9import { component_context } from './internal/client/context.js';10import { DEV } from 'esm-env';11 12if (DEV) {13	/**14	 * @param {string} rune15	 */16	function throw_rune_error(rune) {17		if (!(rune in globalThis)) {18			// TODO if people start adjusting the "this can contain runes" config through v-p-s more, adjust this message19			/** @type {any} */20			let value; // let's hope noone modifies this global, but belts and braces21			Object.defineProperty(globalThis, rune, {22				configurable: true,23				// eslint-disable-next-line getter-return24				get: () => {25					if (value !== undefined) {26						return value;27					}28 29					e.rune_outside_svelte(rune);30				},31				set: (v) => {32					value = v;33				}34			});35		}36	}37 38	throw_rune_error('$state');39	throw_rune_error('$effect');40	throw_rune_error('$derived');41	throw_rune_error('$inspect');42	throw_rune_error('$props');43	throw_rune_error('$bindable');44}45 46/**47 * Returns an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that aborts when the current [derived](https://svelte.dev/docs/svelte/$derived) or [effect](https://svelte.dev/docs/svelte/$effect) re-runs or is destroyed.48 *49 * Must be called while a derived or effect is running.50 *51 * ```svelte52 * <script>53 * 	import { getAbortSignal } from 'svelte';54 *55 * 	let { id } = $props();56 *57 * 	async function getData(id) {58 * 		const response = await fetch(`/items/${id}`, {59 * 			signal: getAbortSignal()60 * 		});61 *62 * 		return await response.json();63 * 	}64 *65 * 	const data = $derived(await getData(id));66 * </script>67 * ```68 */69export function getAbortSignal() {70	if (active_reaction === null) {71		e.get_abort_signal_outside_reaction();72	}73 74	return (active_reaction.ac ??= new AbortController()).signal;75}76 77/**78 * `onMount`, like [`$effect`](https://svelte.dev/docs/svelte/$effect), schedules a function to run as soon as the component has been mounted to the DOM.79 * Unlike `$effect`, the provided function only runs once.80 *81 * It must be called during the component's initialisation (but doesn't need to live _inside_ the component;82 * it can be called from an external module). If a function is returned _synchronously_ from `onMount`,83 * it will be called when the component is unmounted.84 *85 * `onMount` functions do not run during [server-side rendering](https://svelte.dev/docs/svelte/svelte-server#render).86 *87 * @template T88 * @param {() => NotFunction<T> | Promise<NotFunction<T>> | (() => any)} fn89 * @returns {void}90 */91export function onMount(fn) {92	if (component_context === null) {93		e.lifecycle_outside_component('onMount');94	}95 96	if (legacy_mode_flag && component_context.l !== null) {97		init_update_callbacks(component_context).m.push(fn);98	} else {99		user_effect(() => {100			const cleanup = untrack(fn);101			if (typeof cleanup === 'function') return /** @type {() => void} */ (cleanup);102		});103	}104}105 106/**107 * Schedules a callback to run immediately before the component is unmounted.108 *109 * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the110 * only one that runs inside a server-side component.111 *112 * @param {() => any} fn113 * @returns {void}114 */115export function onDestroy(fn) {116	if (component_context === null) {117		e.lifecycle_outside_component('onDestroy');118	}119 120	onMount(() => () => untrack(fn));121}122 123/**124 * @template [T=any]125 * @param {string} type126 * @param {T} [detail]127 * @param {any}params_0128 * @returns {CustomEvent<T>}129 */130function create_custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {131	return new CustomEvent(type, { detail, bubbles, cancelable });132}133 134/**135 * Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs/svelte/legacy-on#Component-events).136 * Event dispatchers are functions that can take two arguments: `name` and `detail`.137 *138 * Component events created with `createEventDispatcher` create a139 * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).140 * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).141 * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)142 * property and can contain any type of data.143 *144 * The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument:145 * ```ts146 * const dispatch = createEventDispatcher<{147 *  loaded: null; // does not take a detail argument148 *  change: string; // takes a detail argument of type string, which is required149 *  optional: number | null; // takes an optional detail argument of type number150 * }>();151 * ```152 *153 * @deprecated Use callback props and/or the `$host()` rune instead — see [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events)154 * @template {Record<string, any>} [EventMap = any]155 * @returns {EventDispatcher<EventMap>}156 */157export function createEventDispatcher() {158	const active_component_context = component_context;159	if (active_component_context === null) {160		e.lifecycle_outside_component('createEventDispatcher');161	}162 163	/**164	 * @param [detail]165	 * @param [options]166	 */167	return (type, detail, options) => {168		const events = /** @type {Record<string, Function | Function[]>} */ (169			active_component_context.s.$$events170		)?.[/** @type {string} */ (type)];171 172		if (events) {173			const callbacks = is_array(events) ? events.slice() : [events];174			// TODO are there situations where events could be dispatched175			// in a server (non-DOM) environment?176			const event = create_custom_event(/** @type {string} */ (type), detail, options);177			for (const fn of callbacks) {178				fn.call(active_component_context.x, event);179			}180			return !event.defaultPrevented;181		}182 183		return true;184	};185}186 187// TODO mark beforeUpdate and afterUpdate as deprecated in Svelte 6188 189/**190 * Schedules a callback to run immediately before the component is updated after any state change.191 *192 * The first time the callback runs will be before the initial `onMount`.193 *194 * In runes mode use `$effect.pre` instead.195 *196 * @deprecated Use [`$effect.pre`](https://svelte.dev/docs/svelte/$effect#$effect.pre) instead197 * @param {() => void} fn198 * @returns {void}199 */200export function beforeUpdate(fn) {201	if (component_context === null) {202		e.lifecycle_outside_component('beforeUpdate');203	}204 205	if (component_context.l === null) {206		e.lifecycle_legacy_only('beforeUpdate');207	}208 209	init_update_callbacks(component_context).b.push(fn);210}211 212/**213 * Schedules a callback to run immediately after the component has been updated.214 *215 * The first time the callback runs will be after the initial `onMount`.216 *217 * In runes mode use `$effect` instead.218 *219 * @deprecated Use [`$effect`](https://svelte.dev/docs/svelte/$effect) instead220 * @param {() => void} fn221 * @returns {void}222 */223export function afterUpdate(fn) {224	if (component_context === null) {225		e.lifecycle_outside_component('afterUpdate');226	}227 228	if (component_context.l === null) {229		e.lifecycle_legacy_only('afterUpdate');230	}231 232	init_update_callbacks(component_context).a.push(fn);233}234 235/**236 * Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate237 * @param {ComponentContext} context238 */239function init_update_callbacks(context) {240	var l = /** @type {ComponentContextLegacy} */ (context).l;241	return (l.u ??= { a: [], b: [], m: [] });242}243 244export { flushSync, fork } from './internal/client/reactivity/batch.js';245export {246	createContext,247	getContext,248	getAllContexts,249	hasContext,250	setContext251} from './internal/client/context.js';252export { hydratable } from './internal/client/hydratable.js';253export { hydrate, mount, unmount } from './internal/client/render.js';254export { tick, untrack, settled } from './internal/client/runtime.js';255export { createRawSnippet } from './internal/client/dom/blocks/snippet.js';256 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai