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';2 3var chunk2JY7EID6_cjs = require('./chunk-2JY7EID6.cjs');4 5// src/config.js6var defaultConfig = {7 twMerge: true,8 twMergeConfig: {}9};10 11// src/state.js12function createState() {13 let cachedTwMerge = null;14 let cachedTwMergeConfig = {};15 let didTwMergeConfigChange = false;16 return {17 get cachedTwMerge() {18 return cachedTwMerge;19 },20 set cachedTwMerge(value) {21 cachedTwMerge = value;22 },23 get cachedTwMergeConfig() {24 return cachedTwMergeConfig;25 },26 set cachedTwMergeConfig(value) {27 cachedTwMergeConfig = value;28 },29 get didTwMergeConfigChange() {30 return didTwMergeConfigChange;31 },32 set didTwMergeConfigChange(value) {33 didTwMergeConfigChange = value;34 },35 reset() {36 cachedTwMerge = null;37 cachedTwMergeConfig = {};38 didTwMergeConfigChange = false;39 }40 };41}42var state = createState();43 44// src/core.js45var getTailwindVariants = (cn) => {46 const tv = (options, configProp) => {47 const {48 extend = null,49 slots: slotProps = {},50 variants: variantsProps = {},51 compoundVariants: compoundVariantsProps = [],52 compoundSlots = [],53 defaultVariants: defaultVariantsProps = {}54 } = options;55 const config = { ...defaultConfig, ...configProp };56 const base = extend?.base ? chunk2JY7EID6_cjs.cx(extend.base, options?.base) : options?.base;57 const variants = extend?.variants && !chunk2JY7EID6_cjs.isEmptyObject(extend.variants) ? chunk2JY7EID6_cjs.mergeObjects(variantsProps, extend.variants) : variantsProps;58 const defaultVariants = extend?.defaultVariants && !chunk2JY7EID6_cjs.isEmptyObject(extend.defaultVariants) ? { ...extend.defaultVariants, ...defaultVariantsProps } : defaultVariantsProps;59 if (!chunk2JY7EID6_cjs.isEmptyObject(config.twMergeConfig) && !chunk2JY7EID6_cjs.isEqual(config.twMergeConfig, state.cachedTwMergeConfig)) {60 state.didTwMergeConfigChange = true;61 state.cachedTwMergeConfig = config.twMergeConfig;62 }63 const isExtendedSlotsEmpty = chunk2JY7EID6_cjs.isEmptyObject(extend?.slots);64 const componentSlots = !chunk2JY7EID6_cjs.isEmptyObject(slotProps) ? {65 // add "base" to the slots object66 base: chunk2JY7EID6_cjs.cx(options?.base, isExtendedSlotsEmpty && extend?.base),67 ...slotProps68 } : {};69 const slots = isExtendedSlotsEmpty ? componentSlots : chunk2JY7EID6_cjs.joinObjects(70 { ...extend?.slots },71 chunk2JY7EID6_cjs.isEmptyObject(componentSlots) ? { base: options?.base } : componentSlots72 );73 const compoundVariants = chunk2JY7EID6_cjs.isEmptyObject(extend?.compoundVariants) ? compoundVariantsProps : chunk2JY7EID6_cjs.flatMergeArrays(extend?.compoundVariants, compoundVariantsProps);74 const component = (props) => {75 if (chunk2JY7EID6_cjs.isEmptyObject(variants) && chunk2JY7EID6_cjs.isEmptyObject(slotProps) && isExtendedSlotsEmpty) {76 return cn(base, props?.class, props?.className)(config);77 }78 if (compoundVariants && !Array.isArray(compoundVariants)) {79 throw new TypeError(80 `The "compoundVariants" prop must be an array. Received: ${typeof compoundVariants}`81 );82 }83 if (compoundSlots && !Array.isArray(compoundSlots)) {84 throw new TypeError(85 `The "compoundSlots" prop must be an array. Received: ${typeof compoundSlots}`86 );87 }88 const getVariantValue = (variant, vrs = variants, _slotKey = null, slotProps2 = null) => {89 const variantObj = vrs[variant];90 if (!variantObj || chunk2JY7EID6_cjs.isEmptyObject(variantObj)) {91 return null;92 }93 const variantProp = slotProps2?.[variant] ?? props?.[variant];94 if (variantProp === null) return null;95 const variantKey = chunk2JY7EID6_cjs.falsyToString(variantProp);96 if (typeof variantKey === "object") {97 return null;98 }99 const defaultVariantProp = defaultVariants?.[variant];100 const key = variantKey != null ? variantKey : chunk2JY7EID6_cjs.falsyToString(defaultVariantProp);101 const value = variantObj[key || "false"];102 return value;103 };104 const getVariantClassNames = () => {105 if (!variants) return null;106 const keys = Object.keys(variants);107 const result = [];108 for (let i = 0; i < keys.length; i++) {109 const value = getVariantValue(keys[i], variants);110 if (value) result.push(value);111 }112 return result;113 };114 const getVariantClassNamesBySlotKey = (slotKey, slotProps2) => {115 if (!variants || typeof variants !== "object") return null;116 const result = [];117 for (const variant in variants) {118 const variantValue = getVariantValue(variant, variants, slotKey, slotProps2);119 const value = slotKey === "base" && typeof variantValue === "string" ? variantValue : variantValue && variantValue[slotKey];120 if (value) result.push(value);121 }122 return result;123 };124 const propsWithoutUndefined = {};125 for (const prop in props) {126 const value = props[prop];127 if (value !== void 0) propsWithoutUndefined[prop] = value;128 }129 const getCompleteProps = (key, slotProps2) => {130 const initialProp = typeof props?.[key] === "object" ? {131 [key]: props[key]?.initial132 } : {};133 return {134 ...defaultVariants,135 ...propsWithoutUndefined,136 ...initialProp,137 ...slotProps2138 };139 };140 const getCompoundVariantsValue = (cv = [], slotProps2) => {141 const result = [];142 const cvLength = cv.length;143 for (let i = 0; i < cvLength; i++) {144 const { class: tvClass, className: tvClassName, ...compoundVariantOptions } = cv[i];145 let isValid = true;146 const completeProps = getCompleteProps(null, slotProps2);147 for (const key in compoundVariantOptions) {148 const value = compoundVariantOptions[key];149 const completePropsValue = completeProps[key];150 if (Array.isArray(value)) {151 if (!value.includes(completePropsValue)) {152 isValid = false;153 break;154 }155 } else {156 if ((value == null || value === false) && (completePropsValue == null || completePropsValue === false))157 continue;158 if (completePropsValue !== value) {159 isValid = false;160 break;161 }162 }163 }164 if (isValid) {165 if (tvClass) result.push(tvClass);166 if (tvClassName) result.push(tvClassName);167 }168 }169 return result;170 };171 const getCompoundVariantClassNamesBySlot = (slotProps2) => {172 const compoundClassNames = getCompoundVariantsValue(compoundVariants, slotProps2);173 if (!Array.isArray(compoundClassNames)) return compoundClassNames;174 const result = {};175 const cnFn = cn;176 for (let i = 0; i < compoundClassNames.length; i++) {177 const className = compoundClassNames[i];178 if (typeof className === "string") {179 result.base = cnFn(result.base, className)(config);180 } else if (typeof className === "object") {181 for (const slot in className) {182 result[slot] = cnFn(result[slot], className[slot])(config);183 }184 }185 }186 return result;187 };188 const getCompoundSlotClassNameBySlot = (slotProps2) => {189 if (compoundSlots.length < 1) return null;190 const result = {};191 const completeProps = getCompleteProps(null, slotProps2);192 for (let i = 0; i < compoundSlots.length; i++) {193 const {194 slots: slots2 = [],195 class: slotClass,196 className: slotClassName,197 ...slotVariants198 } = compoundSlots[i];199 if (!chunk2JY7EID6_cjs.isEmptyObject(slotVariants)) {200 let isValid = true;201 for (const key in slotVariants) {202 const completePropsValue = completeProps[key];203 const slotVariantValue = slotVariants[key];204 if (completePropsValue === void 0 || (Array.isArray(slotVariantValue) ? !slotVariantValue.includes(completePropsValue) : slotVariantValue !== completePropsValue)) {205 isValid = false;206 break;207 }208 }209 if (!isValid) continue;210 }211 for (let j = 0; j < slots2.length; j++) {212 const slotName = slots2[j];213 if (!result[slotName]) result[slotName] = [];214 result[slotName].push([slotClass, slotClassName]);215 }216 }217 return result;218 };219 if (!chunk2JY7EID6_cjs.isEmptyObject(slotProps) || !isExtendedSlotsEmpty) {220 const slotsFns = {};221 if (typeof slots === "object" && !chunk2JY7EID6_cjs.isEmptyObject(slots)) {222 const cnFn = cn;223 for (const slotKey in slots) {224 slotsFns[slotKey] = (slotProps2) => {225 const compoundVariantClasses = getCompoundVariantClassNamesBySlot(slotProps2);226 const compoundSlotClasses = getCompoundSlotClassNameBySlot(slotProps2);227 return cnFn(228 slots[slotKey],229 getVariantClassNamesBySlotKey(slotKey, slotProps2),230 compoundVariantClasses ? compoundVariantClasses[slotKey] : void 0,231 compoundSlotClasses ? compoundSlotClasses[slotKey] : void 0,232 slotProps2?.class,233 slotProps2?.className234 )(config);235 };236 }237 }238 return slotsFns;239 }240 return cn(241 base,242 getVariantClassNames(),243 getCompoundVariantsValue(compoundVariants),244 props?.class,245 props?.className246 )(config);247 };248 const getVariantKeys = () => {249 if (!variants || typeof variants !== "object") return;250 return Object.keys(variants);251 };252 component.variantKeys = getVariantKeys();253 component.extend = extend;254 component.base = base;255 component.slots = slots;256 component.variants = variants;257 component.defaultVariants = defaultVariants;258 component.compoundSlots = compoundSlots;259 component.compoundVariants = compoundVariants;260 return component;261 };262 const createTV = (configProp) => {263 return (options, config) => tv(options, config ? chunk2JY7EID6_cjs.mergeObjects(configProp, config) : configProp);264 };265 return {266 tv,267 createTV268 };269};270 271exports.defaultConfig = defaultConfig;272exports.getTailwindVariants = getTailwindVariants;273exports.state = state;274 