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/** @import { Source } from '#client' */2import { derived } from '../internal/client/index.js';3import { set, state } from '../internal/client/reactivity/sources.js';4import { tag } from '../internal/client/dev/tracing.js';5import { active_reaction, get, set_active_reaction } from '../internal/client/runtime.js';6import { DEV } from 'esm-env';7 8var inited = false;9 10/**11 * A reactive version of the built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) object.12 * Reading the date (whether with methods like `date.getTime()` or `date.toString()`, or via things like [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat))13 * in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived)14 * will cause it to be re-evaluated when the value of the date changes.15 *16 * ```svelte17 * <script>18 * import { SvelteDate } from 'svelte/reactivity';19 *20 * const date = new SvelteDate();21 *22 * const formatter = new Intl.DateTimeFormat(undefined, {23 * hour: 'numeric',24 * minute: 'numeric',25 * second: 'numeric'26 * });27 *28 * $effect(() => {29 * const interval = setInterval(() => {30 * date.setTime(Date.now());31 * }, 1000);32 *33 * return () => {34 * clearInterval(interval);35 * };36 * });37 * </script>38 *39 * <p>The time is {formatter.format(date)}</p>40 * ```41 */42export class SvelteDate extends Date {43 #time = state(super.getTime());44 45 /** @type {Map<keyof Date, Source<unknown>>} */46 #deriveds = new Map();47 48 #reaction = active_reaction;49 50 /** @param {any[]} params */51 constructor(...params) {52 // @ts-ignore53 super(...params);54 55 if (DEV) {56 tag(this.#time, 'SvelteDate.#time');57 }58 59 if (!inited) this.#init();60 }61 62 #init() {63 inited = true;64 65 var proto = SvelteDate.prototype;66 var date_proto = Date.prototype;67 68 var methods = /** @type {Array<keyof Date & string>} */ (69 Object.getOwnPropertyNames(date_proto)70 );71 72 for (const method of methods) {73 if (method.startsWith('get') || method.startsWith('to') || method === 'valueOf') {74 // @ts-ignore75 proto[method] = function (...args) {76 // don't memoize if there are arguments77 // @ts-ignore78 if (args.length > 0) {79 get(this.#time);80 // @ts-ignore81 return date_proto[method].apply(this, args);82 }83 84 var d = this.#deriveds.get(method);85 86 if (d === undefined) {87 // lazily create the derived, but as though it were being88 // created at the same time as the class instance89 const reaction = active_reaction;90 set_active_reaction(this.#reaction);91 92 d = derived(() => {93 get(this.#time);94 // @ts-ignore95 return date_proto[method].apply(this, args);96 });97 98 if (DEV) {99 tag(d, `SvelteDate.${method}()`);100 }101 102 this.#deriveds.set(method, d);103 104 set_active_reaction(reaction);105 }106 107 return get(d);108 };109 }110 111 if (method.startsWith('set')) {112 // @ts-ignore113 proto[method] = function (...args) {114 // @ts-ignore115 var result = date_proto[method].apply(this, args);116 set(this.#time, date_proto.getTime.call(this));117 return result;118 };119 }120 }121 }122}123 