diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/README.md new file mode 100644 index 0000000000000000000000000000000000000000..deb43df6f3d2c7f763d7570fd7bdad23916ba1b6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/README.md @@ -0,0 +1,15 @@ +# Storybook Accessibility Addon + +The @storybook/addon-a11y package provides accessibility testing for Storybook stories. It uses axe-core to run the tests. + +## Getting Started + +### Add the addon to an existing Storybook + +```bash +npx storybook add @storybook/addon-a11y +``` + +[More on getting started with the accessibility addon](https://storybook.js.org/docs/writing-tests/accessibility-testing#accessibility-checks-with-a11y-addon?ref=readme) + +Learn more about Storybook at [storybook.js.org](https://storybook.js.org/?ref=readme). diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/chunk-2FVV6YOY.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/chunk-2FVV6YOY.js new file mode 100644 index 0000000000000000000000000000000000000000..dfa0f8ea50fe90b4a569dd6541e93532396dc5f5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/chunk-2FVV6YOY.js @@ -0,0 +1,186 @@ +import { + EVENTS, + PANEL_ID, + filterDefs, + filters +} from "./chunk-7OPMK7TU.js"; +import { + __export +} from "./chunk-4BE7D4DS.js"; + +// src/preview.tsx +var preview_exports = {}; +__export(preview_exports, { + afterEach: () => afterEach, + decorators: () => decorators, + initialGlobals: () => initialGlobals, + parameters: () => parameters +}); +import { expect } from "storybook/test"; + +// src/a11yRunner.ts +import { ElementA11yParameterError } from "storybook/internal/preview-errors"; +import { global as global2 } from "@storybook/global"; +import { addons, waitForAnimations } from "storybook/preview-api"; + +// src/a11yRunnerUtils.ts +import { global } from "@storybook/global"; +var { document: document2 } = global, withLinkPaths = (results, storyId) => { + let pathname = document2.location.pathname.replace(/iframe\.html$/, ""), enhancedResults = { ...results }; + return ["incomplete", "passes", "violations"].forEach((key) => { + Array.isArray(results[key]) && (enhancedResults[key] = results[key].map((result) => ({ + ...result, + nodes: result.nodes.map((node, index) => { + let id = `${key}.${result.id}.${index + 1}`, linkPath = `${pathname}?path=/story/${storyId}&addonPanel=${PANEL_ID}&a11ySelection=${id}`; + return { id, ...node, linkPath }; + }) + }))); + }), enhancedResults; +}; + +// src/a11yRunner.ts +var { document: document3 } = global2, channel = addons.getChannel(), DEFAULT_PARAMETERS = { config: {}, options: {} }, DISABLED_RULES = [ + // In component testing, landmarks are not always present + // and the rule check can cause false positives + "region" +], queue = [], isRunning = !1, runNext = async () => { + if (queue.length === 0) { + isRunning = !1; + return; + } + isRunning = !0; + let next = queue.shift(); + next && await next(), runNext(); +}, run = async (input = DEFAULT_PARAMETERS, storyId) => { + let axe = (await import("axe-core"))?.default || globalThis.axe, { config = {}, options = {} } = input; + if (input.element) + throw new ElementA11yParameterError(); + let context = { + include: document3?.body, + exclude: [".sb-wrapper", "#storybook-docs", "#storybook-highlights-root"] + // Internal Storybook elements that are always in the document + }; + if (input.context) { + let hasInclude = typeof input.context == "object" && "include" in input.context && input.context.include !== void 0, hasExclude = typeof input.context == "object" && "exclude" in input.context && input.context.exclude !== void 0; + hasInclude ? context.include = input.context.include : !hasInclude && !hasExclude && (context.include = input.context), hasExclude && (context.exclude = context.exclude.concat(input.context.exclude)); + } + axe.reset(); + let configWithDefault = { + ...config, + rules: [...DISABLED_RULES.map((id) => ({ id, enabled: !1 })), ...config?.rules ?? []] + }; + return axe.configure(configWithDefault), new Promise((resolve, reject) => { + let highlightsRoot = document3?.getElementById("storybook-highlights-root"); + highlightsRoot && (highlightsRoot.style.display = "none"); + let task = async () => { + try { + let result = await axe.run(context, options), resultWithLinks = withLinkPaths(result, storyId); + resolve(resultWithLinks); + } catch (error) { + reject(error); + } + }; + queue.push(task), isRunning || runNext(), highlightsRoot && (highlightsRoot.style.display = ""); + }); +}; +channel.on(EVENTS.MANUAL, async (storyId, input = DEFAULT_PARAMETERS) => { + try { + await waitForAnimations(); + let result = await run(input, storyId), resultJson = JSON.parse(JSON.stringify(result)); + channel.emit(EVENTS.RESULT, resultJson, storyId); + } catch (error) { + channel.emit(EVENTS.ERROR, error); + } +}); + +// src/utils.ts +function getIsVitestStandaloneRun() { + try { + return import.meta.env.VITEST_STORYBOOK === "false"; + } catch { + return !1; + } +} + +// src/withVisionSimulator.ts +import { useCallback, useEffect } from "storybook/preview-api"; +var knownFilters = Object.values(filters).map((f) => f.filter), knownFiltersRegExp = new RegExp(`\\b(${knownFilters.join("|")})\\b`, "g"), withVisionSimulator = (StoryFn, { globals }) => { + let { vision } = globals, applyVisionFilter = useCallback(() => { + let existingFilters = document.body.style.filter.replaceAll(knownFiltersRegExp, "").trim(), visionFilter = filters[vision]?.filter; + return visionFilter && document.body.classList.contains("sb-show-main") ? !existingFilters || existingFilters === "none" ? document.body.style.filter = visionFilter : document.body.style.filter = `${existingFilters} ${visionFilter}` : document.body.style.filter = existingFilters || "none", () => document.body.style.filter = existingFilters || "none"; + }, [vision]); + return useEffect(() => { + let cleanup = applyVisionFilter(), observer = new MutationObserver(() => applyVisionFilter()); + return observer.observe(document.body, { attributeFilter: ["class"] }), () => { + cleanup(), observer.disconnect(); + }; + }, [applyVisionFilter]), useEffect(() => (document.body.insertAdjacentHTML("beforeend", filterDefs), () => { + let filterDefsElement = document.getElementById("storybook-a11y-vision-filters"); + filterDefsElement?.parentElement?.removeChild(filterDefsElement); + }), []), StoryFn(); +}; + +// src/preview.tsx +var vitestMatchersExtended = !1, decorators = [withVisionSimulator], afterEach = async ({ + id: storyId, + reporting, + parameters: parameters2, + globals, + viewMode +}) => { + let a11yParameter = parameters2.a11y, a11yGlobals = globals.a11y, shouldRunEnvironmentIndependent = !!!globals.ghostStories && a11yParameter?.disable !== !0 && a11yParameter?.test !== "off" && a11yGlobals?.manual !== !0, getMode = () => { + switch (a11yParameter?.test) { + case "todo": + return "warning"; + case "error": + default: + return "failed"; + } + }; + if (shouldRunEnvironmentIndependent && viewMode === "story") + try { + let result = await run(a11yParameter, storyId); + if (result) { + let hasViolations = (result?.violations.length ?? 0) > 0; + if (reporting.addReport({ + type: "a11y", + version: 1, + result, + status: hasViolations ? getMode() : "passed" + }), getIsVitestStandaloneRun() && hasViolations && getMode() === "failed") { + if (!vitestMatchersExtended) { + let { toHaveNoViolations } = await import("./matchers-5TDFFDYO.js"); + expect.extend({ toHaveNoViolations }), vitestMatchersExtended = !0; + } + expect(result).toHaveNoViolations(); + } + } + } catch (e) { + if (reporting.addReport({ + type: "a11y", + version: 1, + result: { + error: e + }, + status: "failed" + }), getIsVitestStandaloneRun()) + throw e; + } +}, initialGlobals = { + a11y: { + manual: !1 + }, + vision: void 0 +}, parameters = { + a11y: { + test: "todo" + } +}; + +export { + decorators, + afterEach, + initialGlobals, + parameters, + preview_exports +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/chunk-4BE7D4DS.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/chunk-4BE7D4DS.js new file mode 100644 index 0000000000000000000000000000000000000000..bb44e6e612b9969eaee09b7ba70fbdc61056d5f9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/chunk-4BE7D4DS.js @@ -0,0 +1,9 @@ +var __defProp = Object.defineProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: !0 }); +}; + +export { + __export +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/chunk-7OPMK7TU.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/chunk-7OPMK7TU.js new file mode 100644 index 0000000000000000000000000000000000000000..367cd04a6444dd9552b22b014cb8dbd49255a981 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/chunk-7OPMK7TU.js @@ -0,0 +1,116 @@ +// src/constants.ts +var ADDON_ID = "storybook/a11y", PANEL_ID = `${ADDON_ID}/panel`, PARAM_KEY = "a11y", VISION_GLOBAL_KEY = "vision", UI_STATE_ID = `${ADDON_ID}/ui`, RESULT = `${ADDON_ID}/result`, REQUEST = `${ADDON_ID}/request`, RUNNING = `${ADDON_ID}/running`, ERROR = `${ADDON_ID}/error`, MANUAL = `${ADDON_ID}/manual`, SELECT = `${ADDON_ID}/select`, DOCUMENTATION_LINK = "writing-tests/accessibility-testing", DOCUMENTATION_DISCREPANCY_LINK = `${DOCUMENTATION_LINK}#why-are-my-tests-failing-in-different-environments`; +var EVENTS = { RESULT, REQUEST, RUNNING, ERROR, MANUAL, SELECT }, STATUS_TYPE_ID_COMPONENT_TEST = "storybook/component-test", STATUS_TYPE_ID_A11Y = "storybook/a11y"; + +// src/visionSimulatorFilters.ts +var filters = { + blurred: { + label: "Blurred vision", + filter: "blur(2px)", + percentage: 22.9 + }, + deuteranomaly: { + label: "Deuteranomaly", + filter: 'url("#storybook-a11y-vision-deuteranomaly")', + percentage: 2.7 + }, + deuteranopia: { + label: "Deuteranopia", + filter: 'url("#storybook-a11y-vision-deuteranopia")', + percentage: 0.56 + }, + protanomaly: { + label: "Protanomaly", + filter: 'url("#storybook-a11y-vision-protanomaly")', + percentage: 0.66 + }, + protanopia: { + label: "Protanopia", + filter: 'url("#storybook-a11y-vision-protanopia")', + percentage: 0.59 + }, + tritanomaly: { + label: "Tritanomaly", + filter: 'url("#storybook-a11y-vision-tritanomaly")', + percentage: 0.01 + }, + tritanopia: { + label: "Tritanopia", + filter: 'url("#storybook-a11y-vision-tritanopia")', + percentage: 0.016 + }, + achromatopsia: { + label: "Achromatopsia", + filter: 'url("#storybook-a11y-vision-achromatopsia")', + percentage: 1e-4 + }, + grayscale: { + label: "Grayscale", + filter: "grayscale(100%)" + } +}, filterDefs = ` + + + + + + + + + + + + + + + + + + + + + + + +`; + +export { + ADDON_ID, + PANEL_ID, + PARAM_KEY, + VISION_GLOBAL_KEY, + DOCUMENTATION_DISCREPANCY_LINK, + EVENTS, + STATUS_TYPE_ID_COMPONENT_TEST, + STATUS_TYPE_ID_A11Y, + filters, + filterDefs +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/matchers-5TDFFDYO.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/matchers-5TDFFDYO.js new file mode 100644 index 0000000000000000000000000000000000000000..9b1c0d8b40b7a4bb3342940733abb1c7cfd1eebe --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/_browser-chunks/matchers-5TDFFDYO.js @@ -0,0 +1,1263 @@ +import "./chunk-4BE7D4DS.js"; + +// ../../../node_modules/vitest-axe/node_modules/chalk/source/vendor/ansi-styles/index.js +var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + overline: [53, 55], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + // Bright color + blackBright: [90, 39], + gray: [90, 39], + // Alias of `blackBright` + grey: [90, 39], + // Alias of `blackBright` + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + // Bright color + bgBlackBright: [100, 49], + bgGray: [100, 49], + // Alias of `bgBlackBright` + bgGrey: [100, 49], + // Alias of `bgBlackBright` + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } +}, modifierNames = Object.keys(styles.modifier), foregroundColorNames = Object.keys(styles.color), backgroundColorNames = Object.keys(styles.bgColor), colorNames = [...foregroundColorNames, ...backgroundColorNames]; +function assembleStyles() { + let codes = /* @__PURE__ */ new Map(); + for (let [groupName, group] of Object.entries(styles)) { + for (let [styleName, style] of Object.entries(group)) + styles[styleName] = { + open: `\x1B[${style[0]}m`, + close: `\x1B[${style[1]}m` + }, group[styleName] = styles[styleName], codes.set(style[0], style[1]); + Object.defineProperty(styles, groupName, { + value: group, + enumerable: !1 + }); + } + return Object.defineProperty(styles, "codes", { + value: codes, + enumerable: !1 + }), styles.color.close = "\x1B[39m", styles.bgColor.close = "\x1B[49m", styles.color.ansi = wrapAnsi16(), styles.color.ansi256 = wrapAnsi256(), styles.color.ansi16m = wrapAnsi16m(), styles.bgColor.ansi = wrapAnsi16(10), styles.bgColor.ansi256 = wrapAnsi256(10), styles.bgColor.ansi16m = wrapAnsi16m(10), Object.defineProperties(styles, { + rgbToAnsi256: { + value(red, green, blue) { + return red === green && green === blue ? red < 8 ? 16 : red > 248 ? 231 : Math.round((red - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5); + }, + enumerable: !1 + }, + hexToRgb: { + value(hex) { + let matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); + if (!matches) + return [0, 0, 0]; + let [colorString] = matches; + colorString.length === 3 && (colorString = [...colorString].map((character) => character + character).join("")); + let integer = Number.parseInt(colorString, 16); + return [ + /* eslint-disable no-bitwise */ + integer >> 16 & 255, + integer >> 8 & 255, + integer & 255 + /* eslint-enable no-bitwise */ + ]; + }, + enumerable: !1 + }, + hexToAnsi256: { + value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), + enumerable: !1 + }, + ansi256ToAnsi: { + value(code) { + if (code < 8) + return 30 + code; + if (code < 16) + return 90 + (code - 8); + let red, green, blue; + if (code >= 232) + red = ((code - 232) * 10 + 8) / 255, green = red, blue = red; + else { + code -= 16; + let remainder = code % 36; + red = Math.floor(code / 36) / 5, green = Math.floor(remainder / 6) / 5, blue = remainder % 6 / 5; + } + let value = Math.max(red, green, blue) * 2; + if (value === 0) + return 30; + let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red)); + return value === 2 && (result += 60), result; + }, + enumerable: !1 + }, + rgbToAnsi: { + value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), + enumerable: !1 + }, + hexToAnsi: { + value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), + enumerable: !1 + } + }), styles; +} +var ansiStyles = assembleStyles(), ansi_styles_default = ansiStyles; + +// ../../../node_modules/vitest-axe/node_modules/chalk/source/vendor/supports-color/browser.js +var level = (() => { + if (!("navigator" in globalThis)) + return 0; + if (globalThis.navigator.userAgentData) { + let brand = navigator.userAgentData.brands.find(({ brand: brand2 }) => brand2 === "Chromium"); + if (brand && brand.version > 93) + return 3; + } + return /\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent) ? 1 : 0; +})(), colorSupport = level !== 0 && { + level, + hasBasic: !0, + has256: level >= 2, + has16m: level >= 3 +}, supportsColor = { + stdout: colorSupport, + stderr: colorSupport +}, browser_default = supportsColor; + +// ../../../node_modules/vitest-axe/node_modules/chalk/source/utilities.js +function stringReplaceAll(string, substring, replacer) { + let index = string.indexOf(substring); + if (index === -1) + return string; + let substringLength = substring.length, endIndex = 0, returnValue = ""; + do + returnValue += string.slice(endIndex, index) + substring + replacer, endIndex = index + substringLength, index = string.indexOf(substring, endIndex); + while (index !== -1); + return returnValue += string.slice(endIndex), returnValue; +} +function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) { + let endIndex = 0, returnValue = ""; + do { + let gotCR = string[index - 1] === "\r"; + returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r +` : ` +`) + postfix, endIndex = index + 1, index = string.indexOf(` +`, endIndex); + } while (index !== -1); + return returnValue += string.slice(endIndex), returnValue; +} + +// ../../../node_modules/vitest-axe/node_modules/chalk/source/index.js +var { stdout: stdoutColor, stderr: stderrColor } = browser_default, GENERATOR = Symbol("GENERATOR"), STYLER = Symbol("STYLER"), IS_EMPTY = Symbol("IS_EMPTY"), levelMapping = [ + "ansi", + "ansi", + "ansi256", + "ansi16m" +], styles2 = /* @__PURE__ */ Object.create(null), applyOptions = (object, options = {}) => { + if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) + throw new Error("The `level` option should be an integer from 0 to 3"); + let colorLevel = stdoutColor ? stdoutColor.level : 0; + object.level = options.level === void 0 ? colorLevel : options.level; +}; +var chalkFactory = (options) => { + let chalk2 = (...strings) => strings.join(" "); + return applyOptions(chalk2, options), Object.setPrototypeOf(chalk2, createChalk.prototype), chalk2; +}; +function createChalk(options) { + return chalkFactory(options); +} +Object.setPrototypeOf(createChalk.prototype, Function.prototype); +for (let [styleName, style] of Object.entries(ansi_styles_default)) + styles2[styleName] = { + get() { + let builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]); + return Object.defineProperty(this, styleName, { value: builder }), builder; + } + }; +styles2.visible = { + get() { + let builder = createBuilder(this, this[STYLER], !0); + return Object.defineProperty(this, "visible", { value: builder }), builder; + } +}; +var getModelAnsi = (model, level2, type, ...arguments_) => model === "rgb" ? level2 === "ansi16m" ? ansi_styles_default[type].ansi16m(...arguments_) : level2 === "ansi256" ? ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_)) : ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_)) : model === "hex" ? getModelAnsi("rgb", level2, type, ...ansi_styles_default.hexToRgb(...arguments_)) : ansi_styles_default[type][model](...arguments_), usedModels = ["rgb", "hex", "ansi256"]; +for (let model of usedModels) { + styles2[model] = { + get() { + let { level: level2 } = this; + return function(...arguments_) { + let styler = createStyler(getModelAnsi(model, levelMapping[level2], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]); + return createBuilder(this, styler, this[IS_EMPTY]); + }; + } + }; + let bgModel = "bg" + model[0].toUpperCase() + model.slice(1); + styles2[bgModel] = { + get() { + let { level: level2 } = this; + return function(...arguments_) { + let styler = createStyler(getModelAnsi(model, levelMapping[level2], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]); + return createBuilder(this, styler, this[IS_EMPTY]); + }; + } + }; +} +var proto = Object.defineProperties(() => { +}, { + ...styles2, + level: { + enumerable: !0, + get() { + return this[GENERATOR].level; + }, + set(level2) { + this[GENERATOR].level = level2; + } + } +}), createStyler = (open, close, parent) => { + let openAll, closeAll; + return parent === void 0 ? (openAll = open, closeAll = close) : (openAll = parent.openAll + open, closeAll = close + parent.closeAll), { + open, + close, + openAll, + closeAll, + parent + }; +}, createBuilder = (self, _styler, _isEmpty) => { + let builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" ")); + return Object.setPrototypeOf(builder, proto), builder[GENERATOR] = self, builder[STYLER] = _styler, builder[IS_EMPTY] = _isEmpty, builder; +}, applyStyle = (self, string) => { + if (self.level <= 0 || !string) + return self[IS_EMPTY] ? "" : string; + let styler = self[STYLER]; + if (styler === void 0) + return string; + let { openAll, closeAll } = styler; + if (string.includes("\x1B")) + for (; styler !== void 0; ) + string = stringReplaceAll(string, styler.close, styler.open), styler = styler.parent; + let lfIndex = string.indexOf(` +`); + return lfIndex !== -1 && (string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex)), openAll + string + closeAll; +}; +Object.defineProperties(createChalk.prototype, styles2); +var chalk = createChalk(), chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 }); +var source_default = chalk; + +// ../../../node_modules/vitest-axe/dist/chunk-X4FZIUYL.js +var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJS = (cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}, __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}, __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, mod)), require_ansi_styles = __commonJS({ + "node_modules/pretty-format/node_modules/ansi-styles/index.js"(exports, module) { + "use strict"; + var ANSI_BACKGROUND_OFFSET = 10, wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`; + function assembleStyles2() { + let codes = /* @__PURE__ */ new Map(), styles3 = { + modifier: { + reset: [0, 0], + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + overline: [53, 55], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + styles3.color.gray = styles3.color.blackBright, styles3.bgColor.bgGray = styles3.bgColor.bgBlackBright, styles3.color.grey = styles3.color.blackBright, styles3.bgColor.bgGrey = styles3.bgColor.bgBlackBright; + for (let [groupName, group] of Object.entries(styles3)) { + for (let [styleName, style] of Object.entries(group)) + styles3[styleName] = { + open: `\x1B[${style[0]}m`, + close: `\x1B[${style[1]}m` + }, group[styleName] = styles3[styleName], codes.set(style[0], style[1]); + Object.defineProperty(styles3, groupName, { + value: group, + enumerable: !1 + }); + } + return Object.defineProperty(styles3, "codes", { + value: codes, + enumerable: !1 + }), styles3.color.close = "\x1B[39m", styles3.bgColor.close = "\x1B[49m", styles3.color.ansi256 = wrapAnsi2562(), styles3.color.ansi16m = wrapAnsi16m2(), styles3.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET), styles3.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET), Object.defineProperties(styles3, { + rgbToAnsi256: { + value: (red, green, blue) => red === green && green === blue ? red < 8 ? 16 : red > 248 ? 231 : Math.round((red - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5), + enumerable: !1 + }, + hexToRgb: { + value: (hex) => { + let matches = /(?[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16)); + if (!matches) + return [0, 0, 0]; + let { colorString } = matches.groups; + colorString.length === 3 && (colorString = colorString.split("").map((character) => character + character).join("")); + let integer = Number.parseInt(colorString, 16); + return [ + integer >> 16 & 255, + integer >> 8 & 255, + integer & 255 + ]; + }, + enumerable: !1 + }, + hexToAnsi256: { + value: (hex) => styles3.rgbToAnsi256(...styles3.hexToRgb(hex)), + enumerable: !1 + } + }), styles3; + } + Object.defineProperty(module, "exports", { + enumerable: !0, + get: assembleStyles2 + }); + } +}), require_collections = __commonJS({ + "node_modules/pretty-format/build/collections.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.printIteratorEntries = printIteratorEntries, exports.printIteratorValues = printIteratorValues, exports.printListItems = printListItems, exports.printObjectProperties = printObjectProperties; + var getKeysOfEnumerableProperties = (object, compareKeys) => { + let keys = Object.keys(object).sort(compareKeys); + return Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(object).forEach((symbol) => { + Object.getOwnPropertyDescriptor(object, symbol).enumerable && keys.push(symbol); + }), keys; + }; + function printIteratorEntries(iterator, config, indentation, depth, refs, printer, separator = ": ") { + let result = "", width = 0, current = iterator.next(); + if (!current.done) { + result += config.spacingOuter; + let indentationNext = indentation + config.indent; + for (; !current.done; ) { + if (result += indentationNext, width++ === config.maxWidth) { + result += "\u2026"; + break; + } + let name = printer(current.value[0], config, indentationNext, depth, refs), value = printer(current.value[1], config, indentationNext, depth, refs); + result += name + separator + value, current = iterator.next(), current.done ? config.min || (result += ",") : result += `,${config.spacingInner}`; + } + result += config.spacingOuter + indentation; + } + return result; + } + function printIteratorValues(iterator, config, indentation, depth, refs, printer) { + let result = "", width = 0, current = iterator.next(); + if (!current.done) { + result += config.spacingOuter; + let indentationNext = indentation + config.indent; + for (; !current.done; ) { + if (result += indentationNext, width++ === config.maxWidth) { + result += "\u2026"; + break; + } + result += printer(current.value, config, indentationNext, depth, refs), current = iterator.next(), current.done ? config.min || (result += ",") : result += `,${config.spacingInner}`; + } + result += config.spacingOuter + indentation; + } + return result; + } + function printListItems(list, config, indentation, depth, refs, printer) { + let result = ""; + if (list.length) { + result += config.spacingOuter; + let indentationNext = indentation + config.indent; + for (let i = 0; i < list.length; i++) { + if (result += indentationNext, i === config.maxWidth) { + result += "\u2026"; + break; + } + i in list && (result += printer(list[i], config, indentationNext, depth, refs)), i < list.length - 1 ? result += `,${config.spacingInner}` : config.min || (result += ","); + } + result += config.spacingOuter + indentation; + } + return result; + } + function printObjectProperties(val, config, indentation, depth, refs, printer) { + let result = "", keys = getKeysOfEnumerableProperties(val, config.compareKeys); + if (keys.length) { + result += config.spacingOuter; + let indentationNext = indentation + config.indent; + for (let i = 0; i < keys.length; i++) { + let key = keys[i], name = printer(key, config, indentationNext, depth, refs), value = printer(val[key], config, indentationNext, depth, refs); + result += `${indentationNext + name}: ${value}`, i < keys.length - 1 ? result += `,${config.spacingInner}` : config.min || (result += ","); + } + result += config.spacingOuter + indentation; + } + return result; + } + } +}), require_AsymmetricMatcher = __commonJS({ + "node_modules/pretty-format/build/plugins/AsymmetricMatcher.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.test = exports.serialize = exports.default = void 0; + var _collections = require_collections(), Symbol2 = globalThis["jest-symbol-do-not-touch"] || globalThis.Symbol, asymmetricMatcher = typeof Symbol2 == "function" && Symbol2.for ? Symbol2.for("jest.asymmetricMatcher") : 1267621, SPACE = " ", serialize = (val, config, indentation, depth, refs, printer) => { + let stringedValue = val.toString(); + if (stringedValue === "ArrayContaining" || stringedValue === "ArrayNotContaining") + return ++depth > config.maxDepth ? `[${stringedValue}]` : `${stringedValue + SPACE}[${(0, _collections.printListItems)(val.sample, config, indentation, depth, refs, printer)}]`; + if (stringedValue === "ObjectContaining" || stringedValue === "ObjectNotContaining") + return ++depth > config.maxDepth ? `[${stringedValue}]` : `${stringedValue + SPACE}{${(0, _collections.printObjectProperties)(val.sample, config, indentation, depth, refs, printer)}}`; + if (stringedValue === "StringMatching" || stringedValue === "StringNotMatching" || stringedValue === "StringContaining" || stringedValue === "StringNotContaining") + return stringedValue + SPACE + printer(val.sample, config, indentation, depth, refs); + if (typeof val.toAsymmetricMatcher != "function") + throw new Error(`Asymmetric matcher ${val.constructor.name} does not implement toAsymmetricMatcher()`); + return val.toAsymmetricMatcher(); + }; + exports.serialize = serialize; + var test = (val) => val && val.$$typeof === asymmetricMatcher; + exports.test = test; + var plugin = { + serialize, + test + }, _default = plugin; + exports.default = _default; + } +}), require_ansi_regex = __commonJS({ + "node_modules/ansi-regex/index.js"(exports, module) { + "use strict"; + module.exports = ({ onlyFirst = !1 } = {}) => { + let pattern = [ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" + ].join("|"); + return new RegExp(pattern, onlyFirst ? void 0 : "g"); + }; + } +}), require_ConvertAnsi = __commonJS({ + "node_modules/pretty-format/build/plugins/ConvertAnsi.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.test = exports.serialize = exports.default = void 0; + var _ansiRegex = _interopRequireDefault(require_ansi_regex()), _ansiStyles = _interopRequireDefault(require_ansi_styles()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var toHumanReadableAnsi = (text) => text.replace((0, _ansiRegex.default)(), (match) => { + switch (match) { + case _ansiStyles.default.red.close: + case _ansiStyles.default.green.close: + case _ansiStyles.default.cyan.close: + case _ansiStyles.default.gray.close: + case _ansiStyles.default.white.close: + case _ansiStyles.default.yellow.close: + case _ansiStyles.default.bgRed.close: + case _ansiStyles.default.bgGreen.close: + case _ansiStyles.default.bgYellow.close: + case _ansiStyles.default.inverse.close: + case _ansiStyles.default.dim.close: + case _ansiStyles.default.bold.close: + case _ansiStyles.default.reset.open: + case _ansiStyles.default.reset.close: + return ""; + case _ansiStyles.default.red.open: + return ""; + case _ansiStyles.default.green.open: + return ""; + case _ansiStyles.default.cyan.open: + return ""; + case _ansiStyles.default.gray.open: + return ""; + case _ansiStyles.default.white.open: + return ""; + case _ansiStyles.default.yellow.open: + return ""; + case _ansiStyles.default.bgRed.open: + return ""; + case _ansiStyles.default.bgGreen.open: + return ""; + case _ansiStyles.default.bgYellow.open: + return ""; + case _ansiStyles.default.inverse.open: + return ""; + case _ansiStyles.default.dim.open: + return ""; + case _ansiStyles.default.bold.open: + return ""; + default: + return ""; + } + }), test = (val) => typeof val == "string" && !!val.match((0, _ansiRegex.default)()); + exports.test = test; + var serialize = (val, config, indentation, depth, refs, printer) => printer(toHumanReadableAnsi(val), config, indentation, depth, refs); + exports.serialize = serialize; + var plugin = { + serialize, + test + }, _default = plugin; + exports.default = _default; + } +}), require_DOMCollection = __commonJS({ + "node_modules/pretty-format/build/plugins/DOMCollection.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.test = exports.serialize = exports.default = void 0; + var _collections = require_collections(), SPACE = " ", OBJECT_NAMES = ["DOMStringMap", "NamedNodeMap"], ARRAY_REGEXP = /^(HTML\w*Collection|NodeList)$/, testName = (name) => OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name), test = (val) => val && val.constructor && !!val.constructor.name && testName(val.constructor.name); + exports.test = test; + var isNamedNodeMap = (collection) => collection.constructor.name === "NamedNodeMap", serialize = (collection, config, indentation, depth, refs, printer) => { + let name = collection.constructor.name; + return ++depth > config.maxDepth ? `[${name}]` : (config.min ? "" : name + SPACE) + (OBJECT_NAMES.indexOf(name) !== -1 ? `{${(0, _collections.printObjectProperties)(isNamedNodeMap(collection) ? Array.from(collection).reduce((props, attribute) => (props[attribute.name] = attribute.value, props), {}) : { ...collection }, config, indentation, depth, refs, printer)}}` : `[${(0, _collections.printListItems)(Array.from(collection), config, indentation, depth, refs, printer)}]`); + }; + exports.serialize = serialize; + var plugin = { + serialize, + test + }, _default = plugin; + exports.default = _default; + } +}), require_escapeHTML = __commonJS({ + "node_modules/pretty-format/build/plugins/lib/escapeHTML.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.default = escapeHTML; + function escapeHTML(str) { + return str.replace(//g, ">"); + } + } +}), require_markup = __commonJS({ + "node_modules/pretty-format/build/plugins/lib/markup.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.printText = exports.printProps = exports.printElementAsLeaf = exports.printElement = exports.printComment = exports.printChildren = void 0; + var _escapeHTML = _interopRequireDefault(require_escapeHTML()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var printProps = (keys, props, config, indentation, depth, refs, printer) => { + let indentationNext = indentation + config.indent, colors = config.colors; + return keys.map((key) => { + let value = props[key], printed = printer(value, config, indentationNext, depth, refs); + return typeof value != "string" && (printed.indexOf(` +`) !== -1 && (printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation), printed = `{${printed}}`), `${config.spacingInner + indentation + colors.prop.open + key + colors.prop.close}=${colors.value.open}${printed}${colors.value.close}`; + }).join(""); + }; + exports.printProps = printProps; + var printChildren = (children, config, indentation, depth, refs, printer) => children.map((child) => config.spacingOuter + indentation + (typeof child == "string" ? printText(child, config) : printer(child, config, indentation, depth, refs))).join(""); + exports.printChildren = printChildren; + var printText = (text, config) => { + let contentColor = config.colors.content; + return contentColor.open + (0, _escapeHTML.default)(text) + contentColor.close; + }; + exports.printText = printText; + var printComment = (comment, config) => { + let commentColor = config.colors.comment; + return `${commentColor.open}${commentColor.close}`; + }; + exports.printComment = printComment; + var printElement = (type, printedProps, printedChildren, config, indentation) => { + let tagColor = config.colors.tag; + return `${tagColor.open}<${type}${printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open}${printedChildren ? `>${tagColor.close}${printedChildren}${config.spacingOuter}${indentation}${tagColor.open}${tagColor.close}`; + }; + exports.printElement = printElement; + var printElementAsLeaf = (type, config) => { + let tagColor = config.colors.tag; + return `${tagColor.open}<${type}${tagColor.close} \u2026${tagColor.open} />${tagColor.close}`; + }; + exports.printElementAsLeaf = printElementAsLeaf; + } +}), require_DOMElement = __commonJS({ + "node_modules/pretty-format/build/plugins/DOMElement.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.test = exports.serialize = exports.default = void 0; + var _markup = require_markup(), ELEMENT_NODE = 1, TEXT_NODE = 3, COMMENT_NODE = 8, FRAGMENT_NODE = 11, ELEMENT_REGEXP = /^((HTML|SVG)\w*)?Element$/, testHasAttribute = (val) => { + try { + return typeof val.hasAttribute == "function" && val.hasAttribute("is"); + } catch { + return !1; + } + }, testNode = (val) => { + let constructorName = val.constructor.name, { nodeType, tagName } = val, isCustomElement = typeof tagName == "string" && tagName.includes("-") || testHasAttribute(val); + return nodeType === ELEMENT_NODE && (ELEMENT_REGEXP.test(constructorName) || isCustomElement) || nodeType === TEXT_NODE && constructorName === "Text" || nodeType === COMMENT_NODE && constructorName === "Comment" || nodeType === FRAGMENT_NODE && constructorName === "DocumentFragment"; + }, test = (val) => { + var _val$constructor; + return (val == null || (_val$constructor = val.constructor) === null || _val$constructor === void 0 ? void 0 : _val$constructor.name) && testNode(val); + }; + exports.test = test; + function nodeIsText(node) { + return node.nodeType === TEXT_NODE; + } + function nodeIsComment(node) { + return node.nodeType === COMMENT_NODE; + } + function nodeIsFragment(node) { + return node.nodeType === FRAGMENT_NODE; + } + var serialize = (node, config, indentation, depth, refs, printer) => { + if (nodeIsText(node)) + return (0, _markup.printText)(node.data, config); + if (nodeIsComment(node)) + return (0, _markup.printComment)(node.data, config); + let type = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase(); + return ++depth > config.maxDepth ? (0, _markup.printElementAsLeaf)(type, config) : (0, _markup.printElement)(type, (0, _markup.printProps)(nodeIsFragment(node) ? [] : Array.from(node.attributes).map((attr) => attr.name).sort(), nodeIsFragment(node) ? {} : Array.from(node.attributes).reduce((props, attribute) => (props[attribute.name] = attribute.value, props), {}), config, indentation + config.indent, depth, refs, printer), (0, _markup.printChildren)(Array.prototype.slice.call(node.childNodes || node.children), config, indentation + config.indent, depth, refs, printer), config, indentation); + }; + exports.serialize = serialize; + var plugin = { + serialize, + test + }, _default = plugin; + exports.default = _default; + } +}), require_Immutable = __commonJS({ + "node_modules/pretty-format/build/plugins/Immutable.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.test = exports.serialize = exports.default = void 0; + var _collections = require_collections(), IS_ITERABLE_SENTINEL = "@@__IMMUTABLE_ITERABLE__@@", IS_LIST_SENTINEL = "@@__IMMUTABLE_LIST__@@", IS_KEYED_SENTINEL = "@@__IMMUTABLE_KEYED__@@", IS_MAP_SENTINEL = "@@__IMMUTABLE_MAP__@@", IS_ORDERED_SENTINEL = "@@__IMMUTABLE_ORDERED__@@", IS_RECORD_SENTINEL = "@@__IMMUTABLE_RECORD__@@", IS_SEQ_SENTINEL = "@@__IMMUTABLE_SEQ__@@", IS_SET_SENTINEL = "@@__IMMUTABLE_SET__@@", IS_STACK_SENTINEL = "@@__IMMUTABLE_STACK__@@", getImmutableName = (name) => `Immutable.${name}`, printAsLeaf = (name) => `[${name}]`, SPACE = " ", LAZY = "\u2026", printImmutableEntries = (val, config, indentation, depth, refs, printer, type) => ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}{${(0, _collections.printIteratorEntries)(val.entries(), config, indentation, depth, refs, printer)}}`; + function getRecordEntries(val) { + let i = 0; + return { + next() { + if (i < val._keys.length) { + let key = val._keys[i++]; + return { + done: !1, + value: [key, val.get(key)] + }; + } + return { + done: !0, + value: void 0 + }; + } + }; + } + var printImmutableRecord = (val, config, indentation, depth, refs, printer) => { + let name = getImmutableName(val._name || "Record"); + return ++depth > config.maxDepth ? printAsLeaf(name) : `${name + SPACE}{${(0, _collections.printIteratorEntries)(getRecordEntries(val), config, indentation, depth, refs, printer)}}`; + }, printImmutableSeq = (val, config, indentation, depth, refs, printer) => { + let name = getImmutableName("Seq"); + return ++depth > config.maxDepth ? printAsLeaf(name) : val[IS_KEYED_SENTINEL] ? `${name + SPACE}{${val._iter || val._object ? (0, _collections.printIteratorEntries)(val.entries(), config, indentation, depth, refs, printer) : LAZY}}` : `${name + SPACE}[${val._iter || val._array || val._collection || val._iterable ? (0, _collections.printIteratorValues)(val.values(), config, indentation, depth, refs, printer) : LAZY}]`; + }, printImmutableValues = (val, config, indentation, depth, refs, printer, type) => ++depth > config.maxDepth ? printAsLeaf(getImmutableName(type)) : `${getImmutableName(type) + SPACE}[${(0, _collections.printIteratorValues)(val.values(), config, indentation, depth, refs, printer)}]`, serialize = (val, config, indentation, depth, refs, printer) => val[IS_MAP_SENTINEL] ? printImmutableEntries(val, config, indentation, depth, refs, printer, val[IS_ORDERED_SENTINEL] ? "OrderedMap" : "Map") : val[IS_LIST_SENTINEL] ? printImmutableValues(val, config, indentation, depth, refs, printer, "List") : val[IS_SET_SENTINEL] ? printImmutableValues(val, config, indentation, depth, refs, printer, val[IS_ORDERED_SENTINEL] ? "OrderedSet" : "Set") : val[IS_STACK_SENTINEL] ? printImmutableValues(val, config, indentation, depth, refs, printer, "Stack") : val[IS_SEQ_SENTINEL] ? printImmutableSeq(val, config, indentation, depth, refs, printer) : printImmutableRecord(val, config, indentation, depth, refs, printer); + exports.serialize = serialize; + var test = (val) => val && (val[IS_ITERABLE_SENTINEL] === !0 || val[IS_RECORD_SENTINEL] === !0); + exports.test = test; + var plugin = { + serialize, + test + }, _default = plugin; + exports.default = _default; + } +}), require_react_is_production_min = __commonJS({ + "node_modules/react-is/cjs/react-is.production.min.js"(exports) { + "use strict"; + var b = Symbol.for("react.element"), c = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), e = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), h = Symbol.for("react.context"), k = Symbol.for("react.server_context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), t = Symbol.for("react.offscreen"), u; + u = Symbol.for("react.module.reference"); + function v(a) { + if (typeof a == "object" && a !== null) { + var r = a.$$typeof; + switch (r) { + case b: + switch (a = a.type, a) { + case d: + case f: + case e: + case m: + case n: + return a; + default: + switch (a = a && a.$$typeof, a) { + case k: + case h: + case l: + case q: + case p: + case g: + return a; + default: + return r; + } + } + case c: + return r; + } + } + } + exports.ContextConsumer = h, exports.ContextProvider = g, exports.Element = b, exports.ForwardRef = l, exports.Fragment = d, exports.Lazy = q, exports.Memo = p, exports.Portal = c, exports.Profiler = f, exports.StrictMode = e, exports.Suspense = m, exports.SuspenseList = n, exports.isAsyncMode = function() { + return !1; + }, exports.isConcurrentMode = function() { + return !1; + }, exports.isContextConsumer = function(a) { + return v(a) === h; + }, exports.isContextProvider = function(a) { + return v(a) === g; + }, exports.isElement = function(a) { + return typeof a == "object" && a !== null && a.$$typeof === b; + }, exports.isForwardRef = function(a) { + return v(a) === l; + }, exports.isFragment = function(a) { + return v(a) === d; + }, exports.isLazy = function(a) { + return v(a) === q; + }, exports.isMemo = function(a) { + return v(a) === p; + }, exports.isPortal = function(a) { + return v(a) === c; + }, exports.isProfiler = function(a) { + return v(a) === f; + }, exports.isStrictMode = function(a) { + return v(a) === e; + }, exports.isSuspense = function(a) { + return v(a) === m; + }, exports.isSuspenseList = function(a) { + return v(a) === n; + }, exports.isValidElementType = function(a) { + return typeof a == "string" || typeof a == "function" || a === d || a === f || a === e || a === m || a === n || a === t || typeof a == "object" && a !== null && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u || a.getModuleId !== void 0); + }, exports.typeOf = v; + } +}), require_react_is_development = __commonJS({ + "node_modules/react-is/cjs/react-is.development.js"(exports) { + "use strict"; + process.env.NODE_ENV !== "production" && (function() { + "use strict"; + var REACT_ELEMENT_TYPE = Symbol.for("react.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), enableScopeAPI = !1, enableCacheElement = !1, enableTransitionTracing = !1, enableLegacyHidden = !1, enableDebugTracing = !1, REACT_MODULE_REFERENCE; + REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); + function isValidElementType(type) { + return !!(typeof type == "string" || typeof type == "function" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing || typeof type == "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0)); + } + function typeOf(object) { + if (typeof object == "object" && object !== null) { + var $$typeof = object.$$typeof; + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + switch (type) { + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + case REACT_SUSPENSE_LIST_TYPE: + return type; + default: + var $$typeofType = type && type.$$typeof; + switch ($$typeofType) { + case REACT_SERVER_CONTEXT_TYPE: + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + default: + return $$typeof; + } + } + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + } + var ContextConsumer = REACT_CONTEXT_TYPE, ContextProvider = REACT_PROVIDER_TYPE, Element = REACT_ELEMENT_TYPE, ForwardRef = REACT_FORWARD_REF_TYPE, Fragment = REACT_FRAGMENT_TYPE, Lazy = REACT_LAZY_TYPE, Memo = REACT_MEMO_TYPE, Portal = REACT_PORTAL_TYPE, Profiler = REACT_PROFILER_TYPE, StrictMode = REACT_STRICT_MODE_TYPE, Suspense = REACT_SUSPENSE_TYPE, SuspenseList = REACT_SUSPENSE_LIST_TYPE, hasWarnedAboutDeprecatedIsAsyncMode = !1, hasWarnedAboutDeprecatedIsConcurrentMode = !1; + function isAsyncMode(object) { + return hasWarnedAboutDeprecatedIsAsyncMode || (hasWarnedAboutDeprecatedIsAsyncMode = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1; + } + function isConcurrentMode(object) { + return hasWarnedAboutDeprecatedIsConcurrentMode || (hasWarnedAboutDeprecatedIsConcurrentMode = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1; + } + function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; + } + function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; + } + function isElement(object) { + return typeof object == "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; + } + function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; + } + function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; + } + function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; + } + function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; + } + function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; + } + function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; + } + function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; + } + function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; + } + function isSuspenseList(object) { + return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; + } + exports.ContextConsumer = ContextConsumer, exports.ContextProvider = ContextProvider, exports.Element = Element, exports.ForwardRef = ForwardRef, exports.Fragment = Fragment, exports.Lazy = Lazy, exports.Memo = Memo, exports.Portal = Portal, exports.Profiler = Profiler, exports.StrictMode = StrictMode, exports.Suspense = Suspense, exports.SuspenseList = SuspenseList, exports.isAsyncMode = isAsyncMode, exports.isConcurrentMode = isConcurrentMode, exports.isContextConsumer = isContextConsumer, exports.isContextProvider = isContextProvider, exports.isElement = isElement, exports.isForwardRef = isForwardRef, exports.isFragment = isFragment, exports.isLazy = isLazy, exports.isMemo = isMemo, exports.isPortal = isPortal, exports.isProfiler = isProfiler, exports.isStrictMode = isStrictMode, exports.isSuspense = isSuspense, exports.isSuspenseList = isSuspenseList, exports.isValidElementType = isValidElementType, exports.typeOf = typeOf; + })(); + } +}), require_react_is = __commonJS({ + "node_modules/react-is/index.js"(exports, module) { + "use strict"; + process.env.NODE_ENV === "production" ? module.exports = require_react_is_production_min() : module.exports = require_react_is_development(); + } +}), require_ReactElement = __commonJS({ + "node_modules/pretty-format/build/plugins/ReactElement.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.test = exports.serialize = exports.default = void 0; + var ReactIs = _interopRequireWildcard(require_react_is()), _markup = require_markup(); + function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap != "function") + return null; + var cacheBabelInterop = /* @__PURE__ */ new WeakMap(), cacheNodeInterop = /* @__PURE__ */ new WeakMap(); + return (_getRequireWildcardCache = function(nodeInterop2) { + return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); + } + function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) + return obj; + if (obj === null || typeof obj != "object" && typeof obj != "function") + return { default: obj }; + var cache = _getRequireWildcardCache(nodeInterop); + if (cache && cache.has(obj)) + return cache.get(obj); + var newObj = {}, hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var key in obj) + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + desc && (desc.get || desc.set) ? Object.defineProperty(newObj, key, desc) : newObj[key] = obj[key]; + } + return newObj.default = obj, cache && cache.set(obj, newObj), newObj; + } + var getChildren = (arg, children = []) => (Array.isArray(arg) ? arg.forEach((item) => { + getChildren(item, children); + }) : arg != null && arg !== !1 && children.push(arg), children), getType = (element) => { + let type = element.type; + if (typeof type == "string") + return type; + if (typeof type == "function") + return type.displayName || type.name || "Unknown"; + if (ReactIs.isFragment(element)) + return "React.Fragment"; + if (ReactIs.isSuspense(element)) + return "React.Suspense"; + if (typeof type == "object" && type !== null) { + if (ReactIs.isContextProvider(element)) + return "Context.Provider"; + if (ReactIs.isContextConsumer(element)) + return "Context.Consumer"; + if (ReactIs.isForwardRef(element)) { + if (type.displayName) + return type.displayName; + let functionName = type.render.displayName || type.render.name || ""; + return functionName !== "" ? `ForwardRef(${functionName})` : "ForwardRef"; + } + if (ReactIs.isMemo(element)) { + let functionName = type.displayName || type.type.displayName || type.type.name || ""; + return functionName !== "" ? `Memo(${functionName})` : "Memo"; + } + } + return "UNDEFINED"; + }, getPropKeys = (element) => { + let { props } = element; + return Object.keys(props).filter((key) => key !== "children" && props[key] !== void 0).sort(); + }, serialize = (element, config, indentation, depth, refs, printer) => ++depth > config.maxDepth ? (0, _markup.printElementAsLeaf)(getType(element), config) : (0, _markup.printElement)(getType(element), (0, _markup.printProps)(getPropKeys(element), element.props, config, indentation + config.indent, depth, refs, printer), (0, _markup.printChildren)(getChildren(element.props.children), config, indentation + config.indent, depth, refs, printer), config, indentation); + exports.serialize = serialize; + var test = (val) => val != null && ReactIs.isElement(val); + exports.test = test; + var plugin = { + serialize, + test + }, _default = plugin; + exports.default = _default; + } +}), require_ReactTestComponent = __commonJS({ + "node_modules/pretty-format/build/plugins/ReactTestComponent.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.test = exports.serialize = exports.default = void 0; + var _markup = require_markup(), Symbol2 = globalThis["jest-symbol-do-not-touch"] || globalThis.Symbol, testSymbol = typeof Symbol2 == "function" && Symbol2.for ? Symbol2.for("react.test.json") : 245830487, getPropKeys = (object) => { + let { props } = object; + return props ? Object.keys(props).filter((key) => props[key] !== void 0).sort() : []; + }, serialize = (object, config, indentation, depth, refs, printer) => ++depth > config.maxDepth ? (0, _markup.printElementAsLeaf)(object.type, config) : (0, _markup.printElement)(object.type, object.props ? (0, _markup.printProps)(getPropKeys(object), object.props, config, indentation + config.indent, depth, refs, printer) : "", object.children ? (0, _markup.printChildren)(object.children, config, indentation + config.indent, depth, refs, printer) : "", config, indentation); + exports.serialize = serialize; + var test = (val) => val && val.$$typeof === testSymbol; + exports.test = test; + var plugin = { + serialize, + test + }, _default = plugin; + exports.default = _default; + } +}), require_build = __commonJS({ + "node_modules/pretty-format/build/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: !0 + }), exports.default = exports.DEFAULT_OPTIONS = void 0, exports.format = format, exports.plugins = void 0; + var _ansiStyles = _interopRequireDefault(require_ansi_styles()), _collections = require_collections(), _AsymmetricMatcher = _interopRequireDefault(require_AsymmetricMatcher()), _ConvertAnsi = _interopRequireDefault(require_ConvertAnsi()), _DOMCollection = _interopRequireDefault(require_DOMCollection()), _DOMElement = _interopRequireDefault(require_DOMElement()), _Immutable = _interopRequireDefault(require_Immutable()), _ReactElement = _interopRequireDefault(require_ReactElement()), _ReactTestComponent = _interopRequireDefault(require_ReactTestComponent()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var toString = Object.prototype.toString, toISOString = Date.prototype.toISOString, errorToString = Error.prototype.toString, regExpToString = RegExp.prototype.toString, getConstructorName = (val) => typeof val.constructor == "function" && val.constructor.name || "Object", isWindow = (val) => typeof window < "u" && val === window, SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/, NEWLINE_REGEXP = /\n/gi, PrettyFormatPluginError = class extends Error { + constructor(message, stack) { + super(message), this.stack = stack, this.name = this.constructor.name; + } + }; + function isToStringedArrayType(toStringed) { + return toStringed === "[object Array]" || toStringed === "[object ArrayBuffer]" || toStringed === "[object DataView]" || toStringed === "[object Float32Array]" || toStringed === "[object Float64Array]" || toStringed === "[object Int8Array]" || toStringed === "[object Int16Array]" || toStringed === "[object Int32Array]" || toStringed === "[object Uint8Array]" || toStringed === "[object Uint8ClampedArray]" || toStringed === "[object Uint16Array]" || toStringed === "[object Uint32Array]"; + } + function printNumber(val) { + return Object.is(val, -0) ? "-0" : String(val); + } + function printBigInt(val) { + return `${val}n`; + } + function printFunction(val, printFunctionName) { + return printFunctionName ? `[Function ${val.name || "anonymous"}]` : "[Function]"; + } + function printSymbol(val) { + return String(val).replace(SYMBOL_REGEXP, "Symbol($1)"); + } + function printError(val) { + return `[${errorToString.call(val)}]`; + } + function printBasicValue(val, printFunctionName, escapeRegex, escapeString) { + if (val === !0 || val === !1) + return `${val}`; + if (val === void 0) + return "undefined"; + if (val === null) + return "null"; + let typeOf = typeof val; + if (typeOf === "number") + return printNumber(val); + if (typeOf === "bigint") + return printBigInt(val); + if (typeOf === "string") + return escapeString ? `"${val.replace(/"|\\/g, "\\$&")}"` : `"${val}"`; + if (typeOf === "function") + return printFunction(val, printFunctionName); + if (typeOf === "symbol") + return printSymbol(val); + let toStringed = toString.call(val); + return toStringed === "[object WeakMap]" ? "WeakMap {}" : toStringed === "[object WeakSet]" ? "WeakSet {}" : toStringed === "[object Function]" || toStringed === "[object GeneratorFunction]" ? printFunction(val, printFunctionName) : toStringed === "[object Symbol]" ? printSymbol(val) : toStringed === "[object Date]" ? isNaN(+val) ? "Date { NaN }" : toISOString.call(val) : toStringed === "[object Error]" ? printError(val) : toStringed === "[object RegExp]" ? escapeRegex ? regExpToString.call(val).replace(/[\\^$*+?.()|[\]{}]/g, "\\$&") : regExpToString.call(val) : val instanceof Error ? printError(val) : null; + } + function printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON) { + if (refs.indexOf(val) !== -1) + return "[Circular]"; + refs = refs.slice(), refs.push(val); + let hitMaxDepth = ++depth > config.maxDepth, min = config.min; + if (config.callToJSON && !hitMaxDepth && val.toJSON && typeof val.toJSON == "function" && !hasCalledToJSON) + return printer(val.toJSON(), config, indentation, depth, refs, !0); + let toStringed = toString.call(val); + return toStringed === "[object Arguments]" ? hitMaxDepth ? "[Arguments]" : `${min ? "" : "Arguments "}[${(0, _collections.printListItems)(val, config, indentation, depth, refs, printer)}]` : isToStringedArrayType(toStringed) ? hitMaxDepth ? `[${val.constructor.name}]` : `${min || !config.printBasicPrototype && val.constructor.name === "Array" ? "" : `${val.constructor.name} `}[${(0, _collections.printListItems)(val, config, indentation, depth, refs, printer)}]` : toStringed === "[object Map]" ? hitMaxDepth ? "[Map]" : `Map {${(0, _collections.printIteratorEntries)(val.entries(), config, indentation, depth, refs, printer, " => ")}}` : toStringed === "[object Set]" ? hitMaxDepth ? "[Set]" : `Set {${(0, _collections.printIteratorValues)(val.values(), config, indentation, depth, refs, printer)}}` : hitMaxDepth || isWindow(val) ? `[${getConstructorName(val)}]` : `${min || !config.printBasicPrototype && getConstructorName(val) === "Object" ? "" : `${getConstructorName(val)} `}{${(0, _collections.printObjectProperties)(val, config, indentation, depth, refs, printer)}}`; + } + function isNewPlugin(plugin) { + return plugin.serialize != null; + } + function printPlugin(plugin, val, config, indentation, depth, refs) { + let printed; + try { + printed = isNewPlugin(plugin) ? plugin.serialize(val, config, indentation, depth, refs, printer) : plugin.print(val, (valChild) => printer(valChild, config, indentation, depth, refs), (str) => { + let indentationNext = indentation + config.indent; + return indentationNext + str.replace(NEWLINE_REGEXP, ` +${indentationNext}`); + }, { + edgeSpacing: config.spacingOuter, + min: config.min, + spacing: config.spacingInner + }, config.colors); + } catch (error) { + throw new PrettyFormatPluginError(error.message, error.stack); + } + if (typeof printed != "string") + throw new Error(`pretty-format: Plugin must return type "string" but instead returned "${typeof printed}".`); + return printed; + } + function findPlugin(plugins2, val) { + for (let p = 0; p < plugins2.length; p++) + try { + if (plugins2[p].test(val)) + return plugins2[p]; + } catch (error) { + throw new PrettyFormatPluginError(error.message, error.stack); + } + return null; + } + function printer(val, config, indentation, depth, refs, hasCalledToJSON) { + let plugin = findPlugin(config.plugins, val); + if (plugin !== null) + return printPlugin(plugin, val, config, indentation, depth, refs); + let basicResult = printBasicValue(val, config.printFunctionName, config.escapeRegex, config.escapeString); + return basicResult !== null ? basicResult : printComplexValue(val, config, indentation, depth, refs, hasCalledToJSON); + } + var DEFAULT_THEME = { + comment: "gray", + content: "reset", + prop: "yellow", + tag: "cyan", + value: "green" + }, DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME), DEFAULT_OPTIONS = { + callToJSON: !0, + compareKeys: void 0, + escapeRegex: !1, + escapeString: !0, + highlight: !1, + indent: 2, + maxDepth: 1 / 0, + maxWidth: 1 / 0, + min: !1, + plugins: [], + printBasicPrototype: !0, + printFunctionName: !0, + theme: DEFAULT_THEME + }; + exports.DEFAULT_OPTIONS = DEFAULT_OPTIONS; + function validateOptions(options) { + if (Object.keys(options).forEach((key) => { + if (!Object.prototype.hasOwnProperty.call(DEFAULT_OPTIONS, key)) + throw new Error(`pretty-format: Unknown option "${key}".`); + }), options.min && options.indent !== void 0 && options.indent !== 0) + throw new Error('pretty-format: Options "min" and "indent" cannot be used together.'); + if (options.theme !== void 0) { + if (options.theme === null) + throw new Error('pretty-format: Option "theme" must not be null.'); + if (typeof options.theme != "object") + throw new Error(`pretty-format: Option "theme" must be of type "object" but instead received "${typeof options.theme}".`); + } + } + var getColorsHighlight = (options) => DEFAULT_THEME_KEYS.reduce((colors, key) => { + let value = options.theme && options.theme[key] !== void 0 ? options.theme[key] : DEFAULT_THEME[key], color = value && _ansiStyles.default[value]; + if (color && typeof color.close == "string" && typeof color.open == "string") + colors[key] = color; + else + throw new Error(`pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`); + return colors; + }, /* @__PURE__ */ Object.create(null)), getColorsEmpty = () => DEFAULT_THEME_KEYS.reduce((colors, key) => (colors[key] = { + close: "", + open: "" + }, colors), /* @__PURE__ */ Object.create(null)), getPrintFunctionName = (options) => { + var _options$printFunctio; + return (_options$printFunctio = options?.printFunctionName) !== null && _options$printFunctio !== void 0 ? _options$printFunctio : DEFAULT_OPTIONS.printFunctionName; + }, getEscapeRegex = (options) => { + var _options$escapeRegex; + return (_options$escapeRegex = options?.escapeRegex) !== null && _options$escapeRegex !== void 0 ? _options$escapeRegex : DEFAULT_OPTIONS.escapeRegex; + }, getEscapeString = (options) => { + var _options$escapeString; + return (_options$escapeString = options?.escapeString) !== null && _options$escapeString !== void 0 ? _options$escapeString : DEFAULT_OPTIONS.escapeString; + }, getConfig = (options) => { + var _options$callToJSON, _options$indent, _options$maxDepth, _options$maxWidth, _options$min, _options$plugins, _options$printBasicPr; + return { + callToJSON: (_options$callToJSON = options?.callToJSON) !== null && _options$callToJSON !== void 0 ? _options$callToJSON : DEFAULT_OPTIONS.callToJSON, + colors: options != null && options.highlight ? getColorsHighlight(options) : getColorsEmpty(), + compareKeys: typeof options?.compareKeys == "function" ? options.compareKeys : DEFAULT_OPTIONS.compareKeys, + escapeRegex: getEscapeRegex(options), + escapeString: getEscapeString(options), + indent: options != null && options.min ? "" : createIndent((_options$indent = options?.indent) !== null && _options$indent !== void 0 ? _options$indent : DEFAULT_OPTIONS.indent), + maxDepth: (_options$maxDepth = options?.maxDepth) !== null && _options$maxDepth !== void 0 ? _options$maxDepth : DEFAULT_OPTIONS.maxDepth, + maxWidth: (_options$maxWidth = options?.maxWidth) !== null && _options$maxWidth !== void 0 ? _options$maxWidth : DEFAULT_OPTIONS.maxWidth, + min: (_options$min = options?.min) !== null && _options$min !== void 0 ? _options$min : DEFAULT_OPTIONS.min, + plugins: (_options$plugins = options?.plugins) !== null && _options$plugins !== void 0 ? _options$plugins : DEFAULT_OPTIONS.plugins, + printBasicPrototype: (_options$printBasicPr = options?.printBasicPrototype) !== null && _options$printBasicPr !== void 0 ? _options$printBasicPr : !0, + printFunctionName: getPrintFunctionName(options), + spacingInner: options != null && options.min ? " " : ` +`, + spacingOuter: options != null && options.min ? "" : ` +` + }; + }; + function createIndent(indent) { + return new Array(indent + 1).join(" "); + } + function format(val, options) { + if (options && (validateOptions(options), options.plugins)) { + let plugin = findPlugin(options.plugins, val); + if (plugin !== null) + return printPlugin(plugin, val, getConfig(options), "", 0, []); + } + let basicResult = printBasicValue(val, getPrintFunctionName(options), getEscapeRegex(options), getEscapeString(options)); + return basicResult !== null ? basicResult : printComplexValue(val, getConfig(options), "", 0, []); + } + var plugins = { + AsymmetricMatcher: _AsymmetricMatcher.default, + ConvertAnsi: _ConvertAnsi.default, + DOMCollection: _DOMCollection.default, + DOMElement: _DOMElement.default, + Immutable: _Immutable.default, + ReactElement: _ReactElement.default, + ReactTestComponent: _ReactTestComponent.default + }; + exports.plugins = plugins; + var _default = format; + exports.default = _default; + } +}), import_pretty_format = __toESM(require_build(), 1), { + AsymmetricMatcher, + DOMCollection, + DOMElement, + Immutable, + ReactElement, + ReactTestComponent +} = import_pretty_format.plugins, PLUGINS = [ + ReactTestComponent, + ReactElement, + DOMElement, + DOMCollection, + Immutable, + AsymmetricMatcher +], DIM_COLOR = source_default.dim, EXPECTED_COLOR = source_default.green, RECEIVED_COLOR = source_default.red, SPACE_SYMBOL = "\xB7"; +function stringify(object, maxDepth = 10, maxWidth = 10) { + let MAX_LENGTH = 1e4, result; + try { + result = (0, import_pretty_format.format)(object, { + maxDepth, + maxWidth, + min: !0, + plugins: PLUGINS + }); + } catch { + result = (0, import_pretty_format.format)(object, { + callToJSON: !1, + maxDepth, + maxWidth, + min: !0, + plugins: PLUGINS + }); + } + return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify(object, Math.floor(maxDepth / 2), maxWidth) : result.length >= MAX_LENGTH && maxWidth > 1 ? stringify(object, maxDepth, Math.floor(maxWidth / 2)) : result; +} +function replaceTrailingSpaces(text) { + return text.replace(/\s+$/gm, (spaces) => SPACE_SYMBOL.repeat(spaces.length)); +} +function printReceived(object) { + return RECEIVED_COLOR(replaceTrailingSpaces(stringify(object))); +} +function matcherHint(matcherName, received = "received", expected = "expected", options = {}) { + let { + comment = "", + expectedColor = EXPECTED_COLOR, + isDirectExpectCall = !1, + isNot = !1, + promise = "", + receivedColor = RECEIVED_COLOR, + secondArgument = "", + secondArgumentColor = EXPECTED_COLOR + } = options, hint = "", dimString = "expect"; + return !isDirectExpectCall && received !== "" && (hint += DIM_COLOR(`${dimString}(`) + receivedColor(received), dimString = ")"), promise !== "" && (hint += DIM_COLOR(`${dimString}.`) + promise, dimString = ""), isNot && (hint += `${DIM_COLOR(`${dimString}.`)}not`, dimString = ""), matcherName.includes(".") ? dimString += matcherName : (hint += DIM_COLOR(`${dimString}.`) + matcherName, dimString = ""), expected === "" ? dimString += "()" : (hint += DIM_COLOR(`${dimString}(`) + expectedColor(expected), secondArgument && (hint += DIM_COLOR(", ") + secondArgumentColor(secondArgument)), dimString = ")"), comment !== "" && (dimString += ` // ${comment}`), dimString !== "" && (hint += DIM_COLOR(dimString)), hint; +} + +// ../../../node_modules/vitest-axe/dist/matchers.js +function toHaveNoViolations(results) { + if (typeof results.violations > "u") + throw new Error("No violations found in aXe results object"); + let violations = filterViolations(results.violations, results.toolOptions ? results.toolOptions.impactLevels : []); + function reporter(violations2) { + if (violations2.length === 0) + return []; + let lineBreak = ` + +`; + return violations2.map((violation) => violation.nodes.map((node) => `Expected the HTML found at $('${node.target.join(", ")}') to have no violations:` + lineBreak + source_default.grey(node.html) + lineBreak + "Received:" + lineBreak + printReceived(`${violation.help} (${violation.id})`) + lineBreak + source_default.yellow(node.failureSummary) + lineBreak + (violation.helpUrl ? `You can find more information on this issue here: +${source_default.blue(violation.helpUrl)}` : "")).join(lineBreak)).join(lineBreak + "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500" + lineBreak); + } + let formatedViolations = reporter(violations), pass = formatedViolations.length === 0; + function message() { + if (!pass) + return matcherHint(".toHaveNoViolations") + ` + +${formatedViolations}`; + } + return { actual: violations, message, pass }; +} +function filterViolations(violations, impactLevels) { + return impactLevels && impactLevels.length > 0 ? violations.filter((v) => impactLevels.includes(v.impact)) : violations; +} +export { + toHaveNoViolations +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f1d40d62f6e0313ce90b686ae38e3b9e831aef14 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/index.d.ts @@ -0,0 +1,73 @@ +import * as storybook_internal_csf from 'storybook/internal/csf'; +import { Selector, SelectorList, RunOptions, Spec } from 'axe-core'; + +type SelectorWithoutNode = Omit | Omit; +type ContextObjectWithoutNode = { + include: SelectorWithoutNode; + exclude?: SelectorWithoutNode; +} | { + exclude: SelectorWithoutNode; + include?: SelectorWithoutNode; +}; +type ContextSpecWithoutNode = SelectorWithoutNode | ContextObjectWithoutNode; +type A11yTest = 'off' | 'todo' | 'error'; +interface A11yParameters$1 { + /** + * Context parameter for axe-core's run function, except without support for passing Nodes and + * NodeLists directly. + * + * @see https://github.com/dequelabs/axe-core/blob/develop/doc/context.md + */ + context?: ContextSpecWithoutNode; + /** + * Options for running axe-core. + * + * @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter + */ + options?: RunOptions; + /** + * Configuration object for axe-core. + * + * @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure + */ + config?: Spec; + /** Whether to disable accessibility tests. */ + disable?: boolean; + /** Defines how accessibility violations should be handled: 'off', 'todo', or 'error'. */ + test?: A11yTest; +} + +interface A11yParameters { + /** + * Accessibility configuration + * + * @see https://storybook.js.org/docs/writing-tests/accessibility-testing + */ + a11y?: A11yParameters$1; +} +interface A11yGlobals { + /** + * Accessibility configuration + * + * @see https://storybook.js.org/docs/writing-tests/accessibility-testing + */ + a11y?: { + /** + * Prevent the addon from executing automated accessibility checks upon visiting a story. You + * can still trigger the checks from the addon panel. + * + * @see https://storybook.js.org/docs/writing-tests/accessibility-testing#disable-automated-checks + */ + manual?: boolean; + }; +} +interface A11yTypes { + parameters: A11yParameters; + globals: A11yGlobals; +} + +declare const PARAM_KEY = "a11y"; + +declare const _default: () => storybook_internal_csf.PreviewAddon; + +export { type A11yGlobals, type A11yParameters$1 as A11yParameters, type A11yTypes, type ContextObjectWithoutNode, type ContextSpecWithoutNode, PARAM_KEY, type SelectorWithoutNode, _default as default }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..22ccb4a8f60248779ac243638711c0b8d582be69 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/index.js @@ -0,0 +1,15 @@ +import { + preview_exports +} from "./_browser-chunks/chunk-2FVV6YOY.js"; +import { + PARAM_KEY +} from "./_browser-chunks/chunk-7OPMK7TU.js"; +import "./_browser-chunks/chunk-4BE7D4DS.js"; + +// src/index.ts +import { definePreviewAddon } from "storybook/internal/csf"; +var index_default = () => definePreviewAddon(preview_exports); +export { + PARAM_KEY, + index_default as default +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/manager.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/manager.js new file mode 100644 index 0000000000000000000000000000000000000000..4cd3ab3f196fc2b883637e106c3c343f5a1cbbb3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/addon-a11y/dist/manager.js @@ -0,0 +1,2181 @@ +import { + ADDON_ID, + DOCUMENTATION_DISCREPANCY_LINK, + EVENTS, + PANEL_ID, + PARAM_KEY, + STATUS_TYPE_ID_A11Y, + STATUS_TYPE_ID_COMPONENT_TEST, + VISION_GLOBAL_KEY, + filterDefs, + filters +} from "./_browser-chunks/chunk-7OPMK7TU.js"; +import "./_browser-chunks/chunk-4BE7D4DS.js"; + +// src/manager.tsx +import React8 from "react"; +import { Badge as Badge3 } from "storybook/internal/components"; +import { addons, types, useAddonState as useAddonState2, useStorybookApi as useStorybookApi3 } from "storybook/manager-api"; + +// src/components/A11YPanel.tsx +import React6, { useMemo as useMemo3 } from "react"; +import { Badge as Badge2, Button as Button4 } from "storybook/internal/components"; +import { SyncIcon as SyncIcon2 } from "@storybook/icons"; +import { styled as styled5 } from "storybook/theming"; + +// src/types.ts +var RuleType = { + VIOLATION: "violations", + PASS: "passes", + INCOMPLETION: "incomplete" +}; + +// src/components/A11yContext.tsx +import React, { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react"; +import { + STORY_CHANGED, + STORY_FINISHED, + STORY_HOT_UPDATED, + STORY_RENDER_PHASE_CHANGED +} from "storybook/internal/core-events"; +import { HIGHLIGHT, REMOVE_HIGHLIGHT, SCROLL_INTO_VIEW } from "storybook/highlight"; +import { + experimental_getStatusStore, + experimental_useStatusStore, + useAddonState, + useChannel, + useGlobals, + useParameter, + useStorybookApi, + useStorybookState +} from "storybook/manager-api"; +import { convert, themes } from "storybook/theming"; + +// src/AccessibilityRuleMaps.ts +var axeRuleMapping_wcag_2_0_a_aa = { + "area-alt": { + title: " alt text", + axeSummary: "Ensure elements of image maps have alternative text", + friendlySummary: "Add alt text to all elements of image maps." + }, + "aria-allowed-attr": { + title: "Supported ARIA attributes", + axeSummary: "Ensure an element's role supports its ARIA attributes", + friendlySummary: "Only use ARIA attributes that are permitted for the element's role." + }, + "aria-braille-equivalent": { + title: "Braille equivalent", + axeSummary: "Ensure aria-braillelabel and aria-brailleroledescription have a non-braille equivalent", + friendlySummary: "If you use braille ARIA labels, also provide a matching non-braille label." + }, + "aria-command-name": { + title: "ARIA command name", + axeSummary: "Ensure every ARIA button, link and menuitem has an accessible name", + friendlySummary: "Every ARIA button, link, or menuitem needs a label or accessible name." + }, + "aria-conditional-attr": { + title: "ARIA attribute valid for role", + axeSummary: "Ensure ARIA attributes are used as described in the specification of the element's role", + friendlySummary: "Follow the element role's specification when using ARIA attributes." + }, + "aria-deprecated-role": { + title: "Deprecated ARIA role", + axeSummary: "Ensure elements do not use deprecated roles", + friendlySummary: "Don't use deprecated ARIA roles on elements." + }, + "aria-hidden-body": { + title: "Hidden body", + axeSummary: 'Ensure aria-hidden="true" is not present on the document ', + friendlySummary: 'Never set aria-hidden="true" on the element.' + }, + "aria-hidden-focus": { + title: "Hidden element focus", + axeSummary: "Ensure aria-hidden elements are not focusable nor contain focusable elements", + friendlySummary: "Elements marked hidden (aria-hidden) should not be focusable or contain focusable items." + }, + "aria-input-field-name": { + title: "ARIA input field name", + axeSummary: "Ensure every ARIA input field has an accessible name", + friendlySummary: "Give each ARIA text input or field a label or accessible name." + }, + "aria-meter-name": { + title: "ARIA meter name", + axeSummary: "Ensure every ARIA meter node has an accessible name", + friendlySummary: 'Give each element with role="meter" a label or accessible name.' + }, + "aria-progressbar-name": { + title: "ARIA progressbar name", + axeSummary: "Ensure every ARIA progressbar node has an accessible name", + friendlySummary: 'Give each element with role="progressbar" a label or accessible name.' + }, + "aria-prohibited-attr": { + title: "ARIA prohibited attributes", + axeSummary: "Ensure ARIA attributes are not prohibited for an element's role", + friendlySummary: "Don't use ARIA attributes that are forbidden for that element's role." + }, + "aria-required-attr": { + title: "ARIA required attributes", + axeSummary: "Ensure elements with ARIA roles have all required ARIA attributes", + friendlySummary: "Include all required ARIA attributes for elements with that ARIA role." + }, + "aria-required-children": { + title: "ARIA required children", + axeSummary: "Ensure elements with an ARIA role that require child roles contain them", + friendlySummary: "If an ARIA role requires specific child roles, include those child elements." + }, + "aria-required-parent": { + title: "ARIA required parent", + axeSummary: "Ensure elements with an ARIA role that require parent roles are contained by them", + friendlySummary: "Place elements with certain ARIA roles inside the required parent role element." + }, + "aria-roles": { + title: "ARIA role value", + axeSummary: "Ensure all elements with a role attribute use a valid value", + friendlySummary: "Use only valid values in the role attribute (no typos or invalid roles)." + }, + "aria-toggle-field-name": { + title: "ARIA toggle field name", + axeSummary: "Ensure every ARIA toggle field has an accessible name", + friendlySummary: "Every ARIA toggle field (elements with the checkbox, radio, or switch roles) needs an accessible name." + }, + "aria-tooltip-name": { + title: "ARIA tooltip name", + axeSummary: "Ensure every ARIA tooltip node has an accessible name", + friendlySummary: 'Give each element with role="tooltip" a descriptive accessible name.' + }, + "aria-valid-attr-value": { + title: "ARIA attribute values valid", + axeSummary: "Ensure all ARIA attributes have valid values", + friendlySummary: "Use only valid values for ARIA attributes (no typos or invalid values)." + }, + "aria-valid-attr": { + title: "ARIA attribute valid", + axeSummary: "Ensure attributes that begin with aria- are valid ARIA attributes", + friendlySummary: "Use only valid aria-* attributes (make sure the attribute name is correct)." + }, + blink: { + title: " element", + axeSummary: "Ensure elements are not used", + friendlySummary: "Don't use the deprecated element." + }, + "button-name": { + title: "Button name", + axeSummary: "Ensure buttons have discernible text", + friendlySummary: "Every ; +export const emoji = () => ; +``` + +💎 **Simple.** Writing component "stories" is as easy as exporting ES6 functions using a clean, widely-used format. + +🚚 **Non-proprietary.** CSF doesn't require any vendor-specific libraries. Component stories are easily consumed anywhere ES6 modules live, including your favourite testing tools like Jest and Cypress. + +☝️ **Declarative.** The declarative syntax is isomorphic to higher-level formats like MDX, enabling clean, verifiable transformations. + +🔥 **Optimized.** Component stories don't need any libraries other than your components. And because they're ES6 modules, they're even tree-shakeable! + +### Who uses CSF? + +**Tools:** [Storybook](https://storybook.js.org), [WebComponents.dev](https://webcomponents.dev), [Components.studio](https://components.studio), [RedwoodJS](https://redwoodjs.com/), [UXPin](https://www.uxpin.com/) + +**Compatible with:** [Jest](https://jestjs.io/), [Enzyme](https://enzymejs.github.io/enzyme), [Testing Library](https://testing-library.com), [Cypress](https://www.cypress.io/), [Playwright](https://playwright.dev/), [Mocha](https://mochajs.org), etc. + + +## CSF utilities + +A minimal set of utility functions for dealing with [Component Story Format (CSF)](https://storybook.js.org/docs/formats/component-story-format/). + + +### Install + +```sh +yarn add @storybook/csf +``` + +### API + +See package source for function definitions and types: + +- `storyNameFromExport(key)` - Enhance export name (`key`) of the story. Implemented to have parity with [startCase](https://lodash.com/docs/4.17.11#startCase). + +- `isExportStory(key, { includeStories, excludeStories })` - Does a named export match CSF inclusion/exclusion options? + +- `parseKind(kind, { rootSeparator, groupSeparator })` - Parse out the component/kind name from a path, using the given separator config. + +- `sanitize(string)` - Remove punctuation and illegal characters from a story ID. + +- `toId(kind, name)` - Generate a storybook ID from a component/kind and story name. + +## Contributing + +If you have any suggestions, please open an issue or a PR. + +All contributions are welcome! + +### run tests: + +```sh +yarn test +``` diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/dist/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c7790a70a13c8c9c74d250497b1290c648cf0f35 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/dist/index.d.ts @@ -0,0 +1,541 @@ +import { Simplify, RemoveIndexSignature, UnionToIntersection } from 'type-fest'; + +interface SBBaseType { + required?: boolean; + raw?: string; +} +type SBScalarType = SBBaseType & { + name: 'boolean' | 'string' | 'number' | 'function' | 'symbol'; +}; +type SBArrayType = SBBaseType & { + name: 'array'; + value: SBType; +}; +type SBObjectType = SBBaseType & { + name: 'object'; + value: Record; +}; +type SBEnumType = SBBaseType & { + name: 'enum'; + value: (string | number)[]; +}; +type SBIntersectionType = SBBaseType & { + name: 'intersection'; + value: SBType[]; +}; +type SBUnionType = SBBaseType & { + name: 'union'; + value: SBType[]; +}; +type SBOtherType = SBBaseType & { + name: 'other'; + value: string; +}; +type SBType = SBScalarType | SBEnumType | SBArrayType | SBObjectType | SBIntersectionType | SBUnionType | SBOtherType; + +type StoryId = string; +type ComponentId = string; +type ComponentTitle = string; +type StoryName = string; +/** @deprecated */ +type StoryKind = ComponentTitle; +type Tag = string; +interface StoryIdentifier { + componentId: ComponentId; + title: ComponentTitle; + /** @deprecated */ + kind: ComponentTitle; + id: StoryId; + name: StoryName; + /** @deprecated */ + story: StoryName; + tags: Tag[]; +} +interface Parameters { + [name: string]: any; +} +interface StrictParameters { + [name: string]: unknown; +} +type ControlType = 'object' | 'boolean' | 'check' | 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select' | 'number' | 'range' | 'file' | 'color' | 'date' | 'text'; +type ConditionalTest = { + truthy?: boolean; +} | { + exists: boolean; +} | { + eq: any; +} | { + neq: any; +}; +type ConditionalValue = { + arg: string; +} | { + global: string; +}; +type Conditional = ConditionalValue & ConditionalTest; +interface ControlBase { + [key: string]: any; + /** + * @see https://storybook.js.org/docs/api/arg-types#controltype + */ + type?: ControlType; + disable?: boolean; +} +interface Report { + type: string; + version?: number; + result: unknown; + status: 'failed' | 'passed' | 'warning'; +} +interface ReportingAPI { + reports: Report[]; + addReport: (report: Report) => void; +} +type Control = ControlType | false | (ControlBase & (ControlBase | { + type: 'color'; + /** + * @see https://storybook.js.org/docs/api/arg-types#controlpresetcolors + */ + presetColors?: string[]; +} | { + type: 'file'; + /** + * @see https://storybook.js.org/docs/api/arg-types#controlaccept + */ + accept?: string; +} | { + type: 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select'; + /** + * @see https://storybook.js.org/docs/api/arg-types#controllabels + */ + labels?: { + [options: string]: string; + }; +} | { + type: 'number' | 'range'; + /** + * @see https://storybook.js.org/docs/api/arg-types#controlmax + */ + max?: number; + /** + * @see https://storybook.js.org/docs/api/arg-types#controlmin + */ + min?: number; + /** + * @see https://storybook.js.org/docs/api/arg-types#controlstep + */ + step?: number; +})); +interface InputType { + /** + * @see https://storybook.js.org/docs/api/arg-types#control + */ + control?: Control; + /** + * @see https://storybook.js.org/docs/api/arg-types#description + */ + description?: string; + /** + * @see https://storybook.js.org/docs/api/arg-types#if + */ + if?: Conditional; + /** + * @see https://storybook.js.org/docs/api/arg-types#mapping + */ + mapping?: { + [key: string]: any; + }; + /** + * @see https://storybook.js.org/docs/api/arg-types#name + */ + name?: string; + /** + * @see https://storybook.js.org/docs/api/arg-types#options + */ + options?: readonly any[]; + /** + * @see https://storybook.js.org/docs/api/arg-types#table + */ + table?: { + [key: string]: unknown; + /** + * @see https://storybook.js.org/docs/api/arg-types#tablecategory + */ + category?: string; + /** + * @see https://storybook.js.org/docs/api/arg-types#tabledefaultvalue + */ + defaultValue?: { + summary?: string; + detail?: string; + }; + /** + * @see https://storybook.js.org/docs/api/arg-types#tabledisable + */ + disable?: boolean; + /** + * @see https://storybook.js.org/docs/api/arg-types#tablesubcategory + */ + subcategory?: string; + /** + * @see https://storybook.js.org/docs/api/arg-types#tabletype + */ + type?: { + summary?: string; + detail?: string; + }; + }; + /** + * @see https://storybook.js.org/docs/api/arg-types#type + */ + type?: SBType | SBScalarType['name']; + /** + * @see https://storybook.js.org/docs/api/arg-types#defaultvalue + * + * @deprecated Use `table.defaultValue.summary` instead. + */ + defaultValue?: any; + [key: string]: any; +} +interface StrictInputType extends InputType { + name: string; + type?: SBType; +} +interface Args { + [name: string]: any; +} +interface StrictArgs { + [name: string]: unknown; +} +/** + * @see https://storybook.js.org/docs/api/arg-types#argtypes + */ +type ArgTypes = { + [name in keyof TArgs]: InputType; +}; +type StrictArgTypes = { + [name in keyof TArgs]: StrictInputType; +}; +interface Globals { + [name: string]: any; +} +interface GlobalTypes { + [name: string]: InputType; +} +interface StrictGlobalTypes { + [name: string]: StrictInputType; +} +interface Renderer { + /** What is the type of the `component` annotation in this renderer? */ + component: unknown; + /** What does the story function return in this renderer? */ + storyResult: unknown; + /** What type of element does this renderer render to? */ + canvasElement: unknown; + mount(): Promise; + T?: unknown; +} +/** @deprecated - use `Renderer` */ +type AnyFramework = Renderer; +interface StoryContextForEnhancers extends StoryIdentifier { + component?: (TRenderer & { + T: any; + })['component']; + subcomponents?: Record; + parameters: Parameters; + initialArgs: TArgs; + argTypes: StrictArgTypes; +} +type ArgsEnhancer = (context: StoryContextForEnhancers) => TArgs; +type ArgTypesEnhancer = ((context: StoryContextForEnhancers) => StrictArgTypes) & { + secondPass?: boolean; +}; +interface StoryContextUpdate { + args?: TArgs; + globals?: Globals; + [key: string]: any; +} +type ViewMode = 'story' | 'docs'; +type LoaderFunction = (context: StoryContextForLoaders) => Promise | void> | Record | void; +type Awaitable = T | PromiseLike; +type CleanupCallback = () => Awaitable; +type BeforeAll = () => Awaitable; +type BeforeEach = (context: StoryContext) => Awaitable; +type AfterEach = (context: StoryContext) => Awaitable; +interface Canvas { +} +interface StoryContext extends StoryContextForEnhancers, Required> { + loaded: Record; + abortSignal: AbortSignal; + canvasElement: TRenderer['canvasElement']; + hooks: unknown; + originalStoryFn: StoryFn; + viewMode: ViewMode; + step: StepFunction; + context: this; + canvas: Canvas; + mount: TRenderer['mount']; + reporting: ReportingAPI; +} +/** @deprecated Use {@link StoryContext} instead. */ +interface StoryContextForLoaders extends StoryContext { +} +/** @deprecated Use {@link StoryContext} instead. */ +interface PlayFunctionContext extends StoryContext { +} +type StepLabel = string; +type StepFunction = (label: StepLabel, play: PlayFunction) => Promise | void; +type PlayFunction = (context: PlayFunctionContext) => Promise | void; +type PartialStoryFn = (update?: StoryContextUpdate>) => TRenderer['storyResult']; +type LegacyStoryFn = (context: StoryContext) => TRenderer['storyResult']; +type ArgsStoryFn = (args: TArgs, context: StoryContext) => (TRenderer & { + T: TArgs; +})['storyResult']; +type StoryFn = LegacyStoryFn | ArgsStoryFn; +type DecoratorFunction = (fn: PartialStoryFn, c: StoryContext) => TRenderer['storyResult']; +type DecoratorApplicator = (storyFn: LegacyStoryFn, decorators: DecoratorFunction[]) => LegacyStoryFn; +type StepRunner = (label: StepLabel, play: PlayFunction, context: StoryContext) => Promise; +interface BaseAnnotations { + /** + * Wrapper components or Storybook decorators that wrap a story. + * + * Decorators defined in Meta will be applied to every story variation. + * @see [Decorators](https://storybook.js.org/docs/writing-stories/decorators) + */ + decorators?: DecoratorFunction>[] | DecoratorFunction>; + /** + * Custom metadata for a story. + * @see [Parameters](https://storybook.js.org/docs/writing-stories/parameters) + */ + parameters?: Parameters; + /** + * Dynamic data that are provided (and possibly updated by) Storybook and its addons. + * @see [Args](https://storybook.js.org/docs/writing-stories/args) + */ + args?: Partial; + /** + * ArgTypes encode basic metadata for args, such as `name`, `description`, `defaultValue` for an arg. These get automatically filled in by Storybook Docs. + * @see [ArgTypes](https://storybook.js.org/docs/api/arg-types) + */ + argTypes?: Partial>; + /** + * Asynchronous functions which provide data for a story. + * @see [Loaders](https://storybook.js.org/docs/writing-stories/loaders) + */ + loaders?: LoaderFunction[] | LoaderFunction; + /** + * Function to be called before each story. When the function is async, it will be awaited. + * + * `beforeEach` can be added to preview, the default export and to a specific story. + * They are run (and awaited) in the order: preview, default export, story + * + * A cleanup function can be returned. + */ + beforeEach?: BeforeEach[] | BeforeEach; + /** + * Function to be called after each play function for post-test assertions. + * Don't use this function for cleaning up state. + * You can use the return callback of `beforeEach` for that, which is run when switching stories. + * When the function is async, it will be awaited. + * + * `afterEach` can be added to preview, the default export and to a specific story. + * They are run (and awaited) reverse order: preview, default export, story + */ + experimental_afterEach?: AfterEach[] | AfterEach; + /** + * Define a custom render function for the story(ies). If not passed, a default render function by the renderer will be used. + */ + render?: ArgsStoryFn; + /** + * Named tags for a story, used to filter stories in different contexts. + */ + tags?: Tag[]; + mount?: (context: StoryContext) => TRenderer['mount']; +} +interface ProjectAnnotations extends BaseAnnotations { + argsEnhancers?: ArgsEnhancer[]; + argTypesEnhancers?: ArgTypesEnhancer[]; + /** + * Lifecycle hook which runs once, before any loaders, decorators or stories, and may rerun when configuration changes or when reinitializing (e.g. between test runs). + * The function may be synchronous or asynchronous, and may return a cleanup function which may also be synchronous or asynchronous. + * The cleanup function is not guaranteed to run (e.g. when the browser closes), but runs when configuration changes or when reinitializing. + * This hook may only be defined globally (i.e. not on component or story level). + * When multiple hooks are specified, they are to be executed sequentially (and awaited) in the following order: + * - Addon hooks (in order of addons array in e.g. .storybook/main.js) + * - Annotation hooks (in order of previewAnnotations array in e.g. .storybook/main.js) + * - Preview hook (via e.g. .storybook/preview.js) + * Cleanup functions are executed sequentially in reverse order of initialization. + */ + beforeAll?: BeforeAll; + /** + * @deprecated Project `globals` renamed to `initiaGlobals` + */ + globals?: Globals; + initialGlobals?: Globals; + globalTypes?: GlobalTypes; + applyDecorators?: DecoratorApplicator; + runStep?: StepRunner; +} +type StoryDescriptor$1 = string[] | RegExp; +interface ComponentAnnotations extends BaseAnnotations { + /** + * Title of the component which will be presented in the navigation. **Should be unique.** + * + * Components can be organized in a nested structure using "/" as a separator. + * + * Since CSF 3.0 this property is optional -- it can be inferred from the filesystem path + * + * @example + * export default { + * ... + * title: 'Design System/Atoms/Button' + * } + * + * @see [Story Hierarchy](https://storybook.js.org/docs/writing-stories/naming-components-and-hierarchy#structure-and-hierarchy) + */ + title?: ComponentTitle; + /** + * Id of the component (prefix of the story id) which is used for URLs. + * + * By default is inferred from sanitizing the title + * + * @see [Permalink to stories](https://storybook.js.org/docs/configure/sidebar-and-urls#permalink-to-stories) + */ + id?: ComponentId; + /** + * Used to only include certain named exports as stories. Useful when you want to have non-story exports such as mock data or ignore a few stories. + * @example + * includeStories: ['SimpleStory', 'ComplexStory'] + * includeStories: /.*Story$/ + * + * @see [Non-story exports](https://storybook.js.org/docs/api/csf#non-story-exports) + */ + includeStories?: StoryDescriptor$1; + /** + * Used to exclude certain named exports. Useful when you want to have non-story exports such as mock data or ignore a few stories. + * @example + * excludeStories: ['simpleData', 'complexData'] + * excludeStories: /.*Data$/ + * + * @see [Non-story exports](https://storybook.js.org/docs/api/csf#non-story-exports) + */ + excludeStories?: StoryDescriptor$1; + /** + * The primary component for your story. + * + * Used by addons for automatic prop table generation and display of other component metadata. + */ + component?: (TRenderer & { + T: Record extends Required ? any : TArgs; + })['component']; + /** + * Auxiliary subcomponents that are part of the stories. + * + * Used by addons for automatic prop table generation and display of other component metadata. + * + * @example + * import { Button, ButtonGroup } from './components'; + * + * export default { + * ... + * subcomponents: { Button, ButtonGroup } + * } + * + * By defining them each component will have its tab in the args table. + */ + subcomponents?: Record; + /** + * Function that is executed after the story is rendered. + */ + play?: PlayFunction; + /** + * Override the globals values for all stories in this component + */ + globals?: Globals; +} +type StoryAnnotations> = BaseAnnotations & { + /** + * Override the display name in the UI (CSF v3) + */ + name?: StoryName; + /** + * Override the display name in the UI (CSF v2) + */ + storyName?: StoryName; + /** + * Function that is executed after the story is rendered. + */ + play?: PlayFunction; + /** + * Override the globals values for this story + */ + globals?: Globals; + /** @deprecated */ + story?: Omit, 'story'>; +} & ({} extends TRequiredArgs ? { + args?: TRequiredArgs; +} : { + args: TRequiredArgs; +}); +type LegacyAnnotatedStoryFn = StoryFn & StoryAnnotations; +type LegacyStoryAnnotationsOrFn = LegacyAnnotatedStoryFn | StoryAnnotations; +type AnnotatedStoryFn = ArgsStoryFn & StoryAnnotations; +type StoryAnnotationsOrFn = AnnotatedStoryFn | StoryAnnotations; +type ArgsFromMeta = Meta extends { + render?: ArgsStoryFn; + loaders?: (infer Loaders)[] | infer Loaders; + decorators?: (infer Decorators)[] | infer Decorators; +} ? Simplify & LoaderArgs>> : unknown; +type DecoratorsArgs = UnionToIntersection ? TArgs : unknown>; +type LoaderArgs = UnionToIntersection ? TArgs : unknown>; + +/** + * Helper function to include/exclude an arg based on the value of other other args + * aka "conditional args" + */ +declare const includeConditionalArg: (argType: InputType, args: Args, globals: Globals) => any; + +/** + * Remove punctuation and illegal characters from a story ID. + * + * See https://gist.github.com/davidjrice/9d2af51100e41c6c4b4a + */ +declare const sanitize: (string: string) => string; +/** + * Generate a storybook ID from a component/kind and story name. + */ +declare const toId: (kind: string, name?: string) => string; +/** + * Transform a CSF named export into a readable story name + */ +declare const storyNameFromExport: (key: string) => string; +type StoryDescriptor = string[] | RegExp; +interface IncludeExcludeOptions { + includeStories?: StoryDescriptor; + excludeStories?: StoryDescriptor; +} +/** + * Does a named export match CSF inclusion/exclusion options? + */ +declare function isExportStory(key: string, { includeStories, excludeStories }: IncludeExcludeOptions): boolean | null; +interface SeparatorOptions { + rootSeparator: string | RegExp; + groupSeparator: string | RegExp; +} +/** + * Parse out the component/kind name from a path, using the given separator config. + */ +declare const parseKind: (kind: string, { rootSeparator, groupSeparator }: SeparatorOptions) => { + root: string | null; + groups: string[]; +}; +/** + * Combine a set of project / meta / story tags, removing duplicates and handling negations. + */ +declare const combineTags: (...tags: string[]) => string[]; + +export { AfterEach, AnnotatedStoryFn, AnyFramework, ArgTypes, ArgTypesEnhancer, Args, ArgsEnhancer, ArgsFromMeta, ArgsStoryFn, BaseAnnotations, BeforeAll, BeforeEach, Canvas, CleanupCallback, ComponentAnnotations, ComponentId, ComponentTitle, Conditional, DecoratorApplicator, DecoratorFunction, GlobalTypes, Globals, IncludeExcludeOptions, InputType, LegacyAnnotatedStoryFn, LegacyStoryAnnotationsOrFn, LegacyStoryFn, LoaderFunction, Parameters, PartialStoryFn, PlayFunction, PlayFunctionContext, ProjectAnnotations, Renderer, SBArrayType, SBEnumType, SBIntersectionType, SBObjectType, SBOtherType, SBScalarType, SBType, SBUnionType, SeparatorOptions, StepFunction, StepLabel, StepRunner, StoryAnnotations, StoryAnnotationsOrFn, StoryContext, StoryContextForEnhancers, StoryContextForLoaders, StoryContextUpdate, StoryFn, StoryId, StoryIdentifier, StoryKind, StoryName, StrictArgTypes, StrictArgs, StrictGlobalTypes, StrictInputType, StrictParameters, Tag, ViewMode, combineTags, includeConditionalArg, isExportStory, parseKind, sanitize, storyNameFromExport, toId }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/dist/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..36875029f137c238eb55a517f24d105f756b13a3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/dist/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var C=Object.create;var u=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var E=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var v=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of F(e))!w.call(r,a)&&a!==n&&u(r,a,{get:()=>e[a],enumerable:!(t=B(e,a))||t.enumerable});return r};var I=(r,e,n)=>(n=r!=null?C(h(r)):{},v(e||!r||!r.__esModule?u(n,"default",{value:r,enumerable:!0}):n,r));var x=E(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var r=Object.prototype.toString,e=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:Object.keys;return function(t,a){return function i(o,s,p){var g,y,d,c=r.call(o),b=r.call(s);if(o===s)return !0;if(o==null||s==null)return !1;if(p.indexOf(o)>-1&&p.indexOf(s)>-1)return !0;if(p.push(o,s),c!=b||(g=n(o),y=n(s),g.length!=y.length||g.some(function(A){return !i(o[A],s[A],p)})))return !1;switch(c.slice(8,-1)){case"Symbol":return o.valueOf()==s.valueOf();case"Date":case"Number":return +o==+s||+o!=+o&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+o==""+s;case"Set":case"Map":g=o.entries(),y=s.entries();do if(!i((d=g.next()).value,y.next().value,p))return !1;while(!d.done);return !0;case"ArrayBuffer":o=new Uint8Array(o),s=new Uint8Array(s);case"DataView":o=new Uint8Array(o.buffer),s=new Uint8Array(s.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o.length!=s.length)return !1;for(d=0;d`${n} ${t}${a}`).replace(/([a-z])([A-Z])/g,(e,n,t)=>`${n} ${t}`).replace(/([a-z])([0-9])/gi,(e,n,t)=>`${n} ${t}`).replace(/([0-9])([a-z])/gi,(e,n,t)=>`${n} ${t}`).replace(/(\s|^)(\w)/g,(e,n,t)=>`${n}${t.toUpperCase()}`).replace(/ +/g," ").trim()}var l=I(x()),S=r=>r.map(e=>typeof e<"u").filter(Boolean).length,k=(r,e)=>{let{exists:n,eq:t,neq:a,truthy:i}=r;if(S([n,t,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:t,neq:a})}`);if(typeof t<"u")return (0, l.isEqual)(e,t);if(typeof a<"u")return !(0, l.isEqual)(e,a);if(typeof n<"u"){let s=typeof e<"u";return n?s:!s}return (typeof i>"u"?!0:i)?!!e:!e},P=(r,e,n)=>{if(!r.if)return !0;let{arg:t,global:a}=r.if;if(S([t,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:t,global:a})}`);let i=t?e[t]:n[a];return k(r.if,i)};var O=r=>r.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),f=(r,e)=>{let n=O(r);if(n==="")throw new Error(`Invalid ${e} '${r}', must include alphanumeric characters`);return n},G=(r,e)=>`${f(r,"kind")}${e?`--${f(e,"name")}`:""}`,N=r=>R(r);function m(r,e){return Array.isArray(e)?e.includes(r):r.match(e)}function M(r,{includeStories:e,excludeStories:n}){return r!=="__esModule"&&(!e||m(r,e))&&(!n||!m(r,n))}var V=(r,{rootSeparator:e,groupSeparator:n})=>{let[t,a]=r.split(e,2),i=(a||r).split(n).filter(o=>!!o);return {root:a?t:null,groups:i}},z=(...r)=>{let e=r.reduce((n,t)=>(t.startsWith("!")?n.delete(t.slice(1)):n.add(t),n),new Set);return Array.from(e)}; + +exports.combineTags = z; +exports.includeConditionalArg = P; +exports.isExportStory = M; +exports.parseKind = V; +exports.sanitize = O; +exports.storyNameFromExport = N; +exports.toId = G; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/dist/index.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fdf9da551bfb8aa1227a66d4c46c5ba6116c4d45 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/dist/index.mjs @@ -0,0 +1,3 @@ +var C=Object.create;var u=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var E=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var v=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of F(e))!w.call(r,a)&&a!==n&&u(r,a,{get:()=>e[a],enumerable:!(t=B(e,a))||t.enumerable});return r};var I=(r,e,n)=>(n=r!=null?C(h(r)):{},v(e||!r||!r.__esModule?u(n,"default",{value:r,enumerable:!0}):n,r));var x=E(T=>{Object.defineProperty(T,"__esModule",{value:!0}),T.isEqual=function(){var r=Object.prototype.toString,e=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:Object.keys;return function(t,a){return function i(o,s,p){var g,y,d,c=r.call(o),b=r.call(s);if(o===s)return !0;if(o==null||s==null)return !1;if(p.indexOf(o)>-1&&p.indexOf(s)>-1)return !0;if(p.push(o,s),c!=b||(g=n(o),y=n(s),g.length!=y.length||g.some(function(A){return !i(o[A],s[A],p)})))return !1;switch(c.slice(8,-1)){case"Symbol":return o.valueOf()==s.valueOf();case"Date":case"Number":return +o==+s||+o!=+o&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+o==""+s;case"Set":case"Map":g=o.entries(),y=s.entries();do if(!i((d=g.next()).value,y.next().value,p))return !1;while(!d.done);return !0;case"ArrayBuffer":o=new Uint8Array(o),s=new Uint8Array(s);case"DataView":o=new Uint8Array(o.buffer),s=new Uint8Array(s.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o.length!=s.length)return !1;for(d=0;d`${n} ${t}${a}`).replace(/([a-z])([A-Z])/g,(e,n,t)=>`${n} ${t}`).replace(/([a-z])([0-9])/gi,(e,n,t)=>`${n} ${t}`).replace(/([0-9])([a-z])/gi,(e,n,t)=>`${n} ${t}`).replace(/(\s|^)(\w)/g,(e,n,t)=>`${n}${t.toUpperCase()}`).replace(/ +/g," ").trim()}var l=I(x()),S=r=>r.map(e=>typeof e<"u").filter(Boolean).length,k=(r,e)=>{let{exists:n,eq:t,neq:a,truthy:i}=r;if(S([n,t,a,i])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:t,neq:a})}`);if(typeof t<"u")return (0, l.isEqual)(e,t);if(typeof a<"u")return !(0, l.isEqual)(e,a);if(typeof n<"u"){let s=typeof e<"u";return n?s:!s}return (typeof i>"u"?!0:i)?!!e:!e},P=(r,e,n)=>{if(!r.if)return !0;let{arg:t,global:a}=r.if;if(S([t,a])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:t,global:a})}`);let i=t?e[t]:n[a];return k(r.if,i)};var O=r=>r.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),f=(r,e)=>{let n=O(r);if(n==="")throw new Error(`Invalid ${e} '${r}', must include alphanumeric characters`);return n},G=(r,e)=>`${f(r,"kind")}${e?`--${f(e,"name")}`:""}`,N=r=>R(r);function m(r,e){return Array.isArray(e)?e.includes(r):r.match(e)}function M(r,{includeStories:e,excludeStories:n}){return r!=="__esModule"&&(!e||m(r,e))&&(!n||!m(r,n))}var V=(r,{rootSeparator:e,groupSeparator:n})=>{let[t,a]=r.split(e,2),i=(a||r).split(n).filter(o=>!!o);return {root:a?t:null,groups:i}},z=(...r)=>{let e=r.reduce((n,t)=>(t.startsWith("!")?n.delete(t.slice(1)):n.add(t),n),new Set);return Array.from(e)}; + +export { z as combineTags, P as includeConditionalArg, M as isExportStory, V as parseKind, O as sanitize, N as storyNameFromExport, G as toId }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/package.json new file mode 100644 index 0000000000000000000000000000000000000000..74855a8fc5522a5bd87589ba0304b3f59f347221 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/csf/package.json @@ -0,0 +1,136 @@ +{ + "name": "@storybook/csf", + "version": "0.1.13", + "description": "Component Story Format (CSF) utilities", + "keywords": [ + "storybook", + "component story format", + "csf", + "stories" + ], + "homepage": "https://github.com/ComponentDriven/csf", + "bugs": { + "url": "https://github.com/ComponentDriven/csf/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/ComponentDriven/csf.git" + }, + "author": "Storybook Bot ", + "license": "MIT", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js", + "browser": "./dist/index.mjs", + "node": "./dist/index.js" + } + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "build": "tsup ./src/index.ts --format esm,cjs --dts --treeshake --minify", + "check": "tsc", + "lint": "eslint src --ext .ts", + "release": "yarn build && auto shipit", + "test": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-vm-modules jest" + }, + "prettier": "@storybook/linter-config/prettier.config", + "eslintConfig": { + "parserOptions": { + "project": [ + "./tsconfig.json" + ] + }, + "settings": { + "import/resolver": { + "typescript": { + "project": [ + "./tsconfig.json" + ] + } + } + }, + "extends": [ + "@storybook/eslint-config-storybook" + ], + "rules": { + "@typescript-eslint/no-empty-interface": "off", + "import/no-unresolved": "error", + "jest/expect-expect": [ + "warn", + { + "assertFunctionNames": [ + "expect", + "expectTypeOf" + ] + } + ] + } + }, + "jest": { + "extensionsToTreatAsEsm": [ + ".ts" + ], + "moduleNameMapper": { + "^(\\.{1,2}/.*)\\.js$": "$1" + }, + "preset": "ts-jest/presets/default-esm", + "roots": [ + "/src" + ], + "testEnvironment": "node", + "transform": { + "^.+\\.tsx?$": [ + "ts-jest", + { + "useESM": true + } + ] + } + }, + "dependencies": { + "type-fest": "^2.19.0" + }, + "devDependencies": { + "@auto-it/released": "^11.1.1", + "@ngard/tiny-isequal": "^1.1.0", + "@storybook/eslint-config-storybook": "^3.1.2", + "@types/jest": "^29.2.0", + "@types/node": "^18.11.0", + "@typescript-eslint/eslint-plugin": "^5.42.1", + "@typescript-eslint/parser": "^5.42.1", + "auto": "^11.1.1", + "common-tags": "^1.8.0", + "eslint": "^8.27.0", + "eslint-import-resolver-typescript": "^3.5.2", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-jest": "^27.1.4", + "expect-type": "^0.14.2", + "jest": "^29.3.1", + "lodash": "^4.17.21", + "@types/lodash": "^4.14.191", + "prettier": "^2.7.1", + "ts-jest": "^29.0.3", + "tsup": "^6.4.0", + "typescript": "^4.8.4" + }, + "publishConfig": { + "access": "public" + }, + "auto": { + "plugins": [ + "npm", + "released" + ] + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..7ae945ef11d23b7852658f4796aa636a2e3623fa --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2022 Norbert de Langen. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9d7b9a76c786a617981eb7d45dd16c244a91fb3f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/README.md @@ -0,0 +1,13 @@ +# global + +Require global variables + +## Example + +```js +import { global } from "global"; +``` + +## Installation + +`yarn add @storybook/global` diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/dist/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2672d980ee80bd21c48f89cbfcc103b1414de0e2 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/dist/index.d.ts @@ -0,0 +1,3 @@ +declare const scope: typeof globalThis; + +export { scope as global }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/dist/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e66746c67d60fc9ffdcb6042b61fdb151cd2dd11 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/dist/index.js @@ -0,0 +1,44 @@ +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + global: () => scope +}); +module.exports = __toCommonJS(src_exports); +var scope = (() => { + let win; + if (typeof window !== "undefined") { + win = window; + } else if (typeof globalThis !== "undefined") { + win = globalThis; + } else if (typeof global !== "undefined") { + win = global; + } else if (typeof self !== "undefined") { + win = self; + } else { + win = {}; + } + return win; +})(); +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + global +}); diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/dist/index.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b9c4573842c6fc980e980e94a2d9639f17282016 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/dist/index.mjs @@ -0,0 +1,19 @@ +// src/index.ts +var scope = (() => { + let win; + if (typeof window !== "undefined") { + win = window; + } else if (typeof globalThis !== "undefined") { + win = globalThis; + } else if (typeof global !== "undefined") { + win = global; + } else if (typeof self !== "undefined") { + win = self; + } else { + win = {}; + } + return win; +})(); +export { + scope as global +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/package.json new file mode 100644 index 0000000000000000000000000000000000000000..1e3900f44d1434bbc3d2e991c979563fb4e8443f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/global/package.json @@ -0,0 +1,45 @@ +{ + "name": "@storybook/global", + "version": "5.0.0", + "description": "Require global variables", + "keywords": [], + "homepage": "https://github.com/storybookjs/global", + "repository": "git://github.com/storybookjs/global.git", + "license": "MIT", + "author": "Norbert ", + "sideEffects": false, + "exports": { + ".": { + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "prep": "tsup ./src/index.ts " + }, + "devDependencies": { + "@types/node": "^18.11.10", + "@typescript-eslint/eslint-plugin": "^5.45.0", + "@typescript-eslint/parser": "^5.45.0", + "eslint": "^8.29.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", + "prettier": "^2.8.0", + "tsup": "^6.5.0", + "typescript": "^4.9.3" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/LICENSE.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..a855494d1120b4a2e0b034bd120c1b5b35eae68a --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Tim Mikeladze + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/README.md new file mode 100644 index 0000000000000000000000000000000000000000..eef140ad31583b6a2f85ef09dbc9fffe33999d2d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/README.md @@ -0,0 +1,64 @@ +# Icons + + + +This library contains the icons used in Storybook and Chromatic apps and marketing sites. They are 14x14. To view the list of all available icons, please go to https://main--64b56e737c0aeefed9d5e675.chromatic.com/ + +## Install + +npm: + +```console +npm install @storybook/icons +``` + +yarn: + +```console +yarn add @storybook/icons +``` + +pnpm: + +```console +pnpm add @storybook/icons +``` + +## To Do + +- [x] Export every single icon instead of a single component +- [x] Add stories for each component + +## Generating new icons from Figma + +First, set local environment variables: + +```console +FIGMA_API_TOKEN= +FIGMA_FILE_ID= +FIGMA_CANVAS=Icons +``` + +Then, fetch all icons from Figma locally and create React components + stories automatically: + +```console +pnpm generate-icons +``` + +Inspired by [this article](https://blog.certa.dev/generating-react-icon-components-from-figma). + +## Developing + +Watch and rebuild code with `tsup` and run Storybook to preview your UI during development: + +```console +pnpm storybook +``` + +## Building + +Build package with `tsup` for production: + +```console +pnpm build +``` diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..43cf25ed9acc3b10e0ba32d26b14200fdcff2a2c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/index.d.ts @@ -0,0 +1,525 @@ +import * as React from 'react'; +import React__default from 'react'; + +declare const iconList: { + name: string; + icons: string[]; +}[]; + +interface IconProps extends React__default.SVGAttributes { + children?: never; + color?: string; + size?: number; +} + +declare const PhotoIcon: React.ForwardRefExoticComponent>; + +declare const ComponentIcon: React.ForwardRefExoticComponent>; + +declare const GridIcon: React.ForwardRefExoticComponent>; + +declare const OutlineIcon: React.ForwardRefExoticComponent>; + +declare const PhotoDragIcon: React.ForwardRefExoticComponent>; + +declare const PhotoStabilizeIcon: React.ForwardRefExoticComponent>; + +declare const CameraStabilizeIcon: React.ForwardRefExoticComponent>; + +declare const GridAltIcon: React.ForwardRefExoticComponent>; + +declare const SearchIcon: React.ForwardRefExoticComponent>; + +declare const ZoomIcon: React.ForwardRefExoticComponent>; + +declare const ZoomOutIcon: React.ForwardRefExoticComponent>; + +declare const ZoomResetIcon: React.ForwardRefExoticComponent>; + +declare const EyeIcon: React.ForwardRefExoticComponent>; + +declare const EyeCloseIcon: React.ForwardRefExoticComponent>; + +declare const LightningIcon: React.ForwardRefExoticComponent>; + +declare const LightningOffIcon: React.ForwardRefExoticComponent>; + +declare const MirrorIcon: React.ForwardRefExoticComponent>; + +declare const GrowIcon: React.ForwardRefExoticComponent>; + +declare const ContrastIcon: React.ForwardRefExoticComponent>; + +declare const SwitchAltIcon: React.ForwardRefExoticComponent>; + +declare const ContrastIgnoredIcon: React.ForwardRefExoticComponent>; + +declare const PaintBrushIcon: React.ForwardRefExoticComponent>; + +declare const PaintBrushAltIcon: React.ForwardRefExoticComponent>; + +declare const RulerIcon: React.ForwardRefExoticComponent>; + +declare const CameraIcon: React.ForwardRefExoticComponent>; + +declare const VideoIcon: React.ForwardRefExoticComponent>; + +declare const SpeakerIcon: React.ForwardRefExoticComponent>; + +declare const PlayIcon: React.ForwardRefExoticComponent>; + +declare const PlayBackIcon: React.ForwardRefExoticComponent>; + +declare const PlayNextIcon: React.ForwardRefExoticComponent>; + +declare const RewindIcon: React.ForwardRefExoticComponent>; + +declare const FastForwardIcon: React.ForwardRefExoticComponent>; + +declare const StopAltIcon: React.ForwardRefExoticComponent>; + +declare const SunIcon: React.ForwardRefExoticComponent>; + +declare const MoonIcon: React.ForwardRefExoticComponent>; + +declare const StopAltHollowIcon: React.ForwardRefExoticComponent>; + +declare const PlayHollowIcon: React.ForwardRefExoticComponent>; + +declare const PlayAllHollowIcon: React.ForwardRefExoticComponent>; + +declare const StopIcon: React.ForwardRefExoticComponent>; + +declare const SideBySideIcon: React.ForwardRefExoticComponent>; + +declare const StackedIcon: React.ForwardRefExoticComponent>; + +declare const BookIcon: React.ForwardRefExoticComponent>; + +declare const DocumentIcon: React.ForwardRefExoticComponent>; + +declare const CopyIcon: React.ForwardRefExoticComponent>; + +declare const FilesIcon: React.ForwardRefExoticComponent>; + +declare const CategoryIcon: React.ForwardRefExoticComponent>; + +declare const FolderIcon: React.ForwardRefExoticComponent>; + +declare const PrintIcon: React.ForwardRefExoticComponent>; + +declare const GraphLineIcon: React.ForwardRefExoticComponent>; + +declare const CalendarIcon: React.ForwardRefExoticComponent>; + +declare const GraphBarIcon: React.ForwardRefExoticComponent>; + +declare const AlignLeftIcon: React.ForwardRefExoticComponent>; + +declare const AlignRightIcon: React.ForwardRefExoticComponent>; + +declare const FilterIcon: React.ForwardRefExoticComponent>; + +declare const DocChartIcon: React.ForwardRefExoticComponent>; + +declare const DocListIcon: React.ForwardRefExoticComponent>; + +declare const DragIcon: React.ForwardRefExoticComponent>; + +declare const MenuIcon: React.ForwardRefExoticComponent>; + +declare const MarkupIcon: React.ForwardRefExoticComponent>; + +declare const BoldIcon: React.ForwardRefExoticComponent>; + +declare const ItalicIcon: React.ForwardRefExoticComponent>; + +declare const PaperClipIcon: React.ForwardRefExoticComponent>; + +declare const ListOrderedIcon: React.ForwardRefExoticComponent>; + +declare const ListUnorderedIcon: React.ForwardRefExoticComponent>; + +declare const ChecklistIcon: React.ForwardRefExoticComponent>; + +declare const ParagraphIcon: React.ForwardRefExoticComponent>; + +declare const MarkdownIcon: React.ForwardRefExoticComponent>; + +declare const RepoIcon: React.ForwardRefExoticComponent>; + +declare const CommitIcon: React.ForwardRefExoticComponent>; + +declare const BranchIcon: React.ForwardRefExoticComponent>; + +declare const PullRequestIcon: React.ForwardRefExoticComponent>; + +declare const MergeIcon: React.ForwardRefExoticComponent>; + +declare const AppleIcon: React.ForwardRefExoticComponent>; + +declare const LinuxIcon: React.ForwardRefExoticComponent>; + +declare const UbuntuIcon: React.ForwardRefExoticComponent>; + +declare const WindowsIcon: React.ForwardRefExoticComponent>; + +declare const ChromeIcon: React.ForwardRefExoticComponent>; + +declare const StorybookIcon: React.ForwardRefExoticComponent>; + +declare const AzureDevOpsIcon: React.ForwardRefExoticComponent>; + +declare const BitbucketIcon: React.ForwardRefExoticComponent>; + +declare const ChromaticIcon: React.ForwardRefExoticComponent>; + +declare const ComponentDrivenIcon: React.ForwardRefExoticComponent>; + +declare const DiscordIcon: React.ForwardRefExoticComponent>; + +declare const FacebookIcon: React.ForwardRefExoticComponent>; + +declare const FigmaIcon: React.ForwardRefExoticComponent>; + +declare const GDriveIcon: React.ForwardRefExoticComponent>; + +declare const GithubIcon: React.ForwardRefExoticComponent>; + +declare const GitlabIcon: React.ForwardRefExoticComponent>; + +declare const GoogleIcon: React.ForwardRefExoticComponent>; + +declare const GraphqlIcon: React.ForwardRefExoticComponent>; + +declare const MediumIcon: React.ForwardRefExoticComponent>; + +declare const ReduxIcon: React.ForwardRefExoticComponent>; + +declare const TwitterIcon: React.ForwardRefExoticComponent>; + +declare const YoutubeIcon: React.ForwardRefExoticComponent>; + +declare const VSCodeIcon: React.ForwardRefExoticComponent>; + +declare const LinkedinIcon: React.ForwardRefExoticComponent>; + +declare const XIcon: React.ForwardRefExoticComponent>; + +declare const BrowserIcon: React.ForwardRefExoticComponent>; + +declare const TabletIcon: React.ForwardRefExoticComponent>; + +declare const MobileIcon: React.ForwardRefExoticComponent>; + +declare const WatchIcon: React.ForwardRefExoticComponent>; + +declare const SidebarIcon: React.ForwardRefExoticComponent>; + +declare const SidebarAltIcon: React.ForwardRefExoticComponent>; + +declare const SidebarAltToggleIcon: React.ForwardRefExoticComponent>; + +declare const SidebarToggleIcon: React.ForwardRefExoticComponent>; + +declare const BottomBarIcon: React.ForwardRefExoticComponent>; + +declare const BottomBarToggleIcon: React.ForwardRefExoticComponent>; + +declare const CPUIcon: React.ForwardRefExoticComponent>; + +declare const DatabaseIcon: React.ForwardRefExoticComponent>; + +declare const MemoryIcon: React.ForwardRefExoticComponent>; + +declare const StructureIcon: React.ForwardRefExoticComponent>; + +declare const BoxIcon: React.ForwardRefExoticComponent>; + +declare const PowerIcon: React.ForwardRefExoticComponent>; + +declare const EditIcon: React.ForwardRefExoticComponent>; + +declare const CogIcon: React.ForwardRefExoticComponent>; + +declare const NutIcon: React.ForwardRefExoticComponent>; + +declare const WrenchIcon: React.ForwardRefExoticComponent>; + +declare const EllipsisIcon: React.ForwardRefExoticComponent>; + +declare const WandIcon: React.ForwardRefExoticComponent>; + +declare const SweepIcon: React.ForwardRefExoticComponent>; + +declare const CheckIcon: React.ForwardRefExoticComponent>; + +declare const FormIcon: React.ForwardRefExoticComponent>; + +declare const BatchDenyIcon: React.ForwardRefExoticComponent>; + +declare const BatchAcceptIcon: React.ForwardRefExoticComponent>; + +declare const ControlsIcon: React.ForwardRefExoticComponent>; + +declare const PlusIcon: React.ForwardRefExoticComponent>; + +declare const CloseAltIcon: React.ForwardRefExoticComponent>; + +declare const CrossIcon: React.ForwardRefExoticComponent>; + +declare const TrashIcon: React.ForwardRefExoticComponent>; + +declare const PinAltIcon: React.ForwardRefExoticComponent>; + +declare const UnpinIcon: React.ForwardRefExoticComponent>; + +declare const AddIcon: React.ForwardRefExoticComponent>; + +declare const SubtractIcon: React.ForwardRefExoticComponent>; + +declare const CloseIcon: React.ForwardRefExoticComponent>; + +declare const DeleteIcon: React.ForwardRefExoticComponent>; + +declare const PassedIcon: React.ForwardRefExoticComponent>; + +declare const ChangedIcon: React.ForwardRefExoticComponent>; + +declare const FailedIcon: React.ForwardRefExoticComponent>; + +declare const ClearIcon: React.ForwardRefExoticComponent>; + +declare const CommentIcon: React.ForwardRefExoticComponent>; + +declare const CommentAddIcon: React.ForwardRefExoticComponent>; + +declare const RequestChangeIcon: React.ForwardRefExoticComponent>; + +declare const CommentsIcon: React.ForwardRefExoticComponent>; + +declare const ChatIcon: React.ForwardRefExoticComponent>; + +declare const LockIcon: React.ForwardRefExoticComponent>; + +declare const UnlockIcon: React.ForwardRefExoticComponent>; + +declare const KeyIcon: React.ForwardRefExoticComponent>; + +declare const OutboxIcon: React.ForwardRefExoticComponent>; + +declare const CreditIcon: React.ForwardRefExoticComponent>; + +declare const ButtonIcon: React.ForwardRefExoticComponent>; + +declare const TypeIcon: React.ForwardRefExoticComponent>; + +declare const PointerDefaultIcon: React.ForwardRefExoticComponent>; + +declare const PointerHandIcon: React.ForwardRefExoticComponent>; + +declare const CommandIcon: React.ForwardRefExoticComponent>; + +declare const SaveIcon: React.ForwardRefExoticComponent>; + +declare const SortDownIcon: React.ForwardRefExoticComponent>; + +declare const SortUpIcon: React.ForwardRefExoticComponent>; + +declare const BugIcon: React.ForwardRefExoticComponent>; + +declare const EditorIcon: React.ForwardRefExoticComponent>; + +declare const InfoIcon: React.ForwardRefExoticComponent>; + +declare const QuestionIcon: React.ForwardRefExoticComponent>; + +declare const SupportIcon: React.ForwardRefExoticComponent>; + +declare const AlertIcon: React.ForwardRefExoticComponent>; + +declare const AlertAltIcon: React.ForwardRefExoticComponent>; + +declare const EmailIcon: React.ForwardRefExoticComponent>; + +declare const PhoneIcon: React.ForwardRefExoticComponent>; + +declare const LinkIcon: React.ForwardRefExoticComponent>; + +declare const LinkBrokenIcon: React.ForwardRefExoticComponent>; + +declare const BellIcon: React.ForwardRefExoticComponent>; + +declare const RSSIcon: React.ForwardRefExoticComponent>; + +declare const ShareAltIcon: React.ForwardRefExoticComponent>; + +declare const ShareIcon: React.ForwardRefExoticComponent>; + +declare const JumpToIcon: React.ForwardRefExoticComponent>; + +declare const CircleHollowIcon: React.ForwardRefExoticComponent>; + +declare const CircleIcon: React.ForwardRefExoticComponent>; + +declare const BookmarkHollowIcon: React.ForwardRefExoticComponent>; + +declare const BookmarkIcon: React.ForwardRefExoticComponent>; + +declare const DiamondIcon: React.ForwardRefExoticComponent>; + +declare const HeartHollowIcon: React.ForwardRefExoticComponent>; + +declare const HeartIcon: React.ForwardRefExoticComponent>; + +declare const StarHollowIcon: React.ForwardRefExoticComponent>; + +declare const StarIcon: React.ForwardRefExoticComponent>; + +declare const CertificateIcon: React.ForwardRefExoticComponent>; + +declare const VerifiedIcon: React.ForwardRefExoticComponent>; + +declare const ThumbsUpIcon: React.ForwardRefExoticComponent>; + +declare const ShieldIcon: React.ForwardRefExoticComponent>; + +declare const BasketIcon: React.ForwardRefExoticComponent>; + +declare const BeakerIcon: React.ForwardRefExoticComponent>; + +declare const HourglassIcon: React.ForwardRefExoticComponent>; + +declare const FlagIcon: React.ForwardRefExoticComponent>; + +declare const CloudHollowIcon: React.ForwardRefExoticComponent>; + +declare const CloudIcon: React.ForwardRefExoticComponent>; + +declare const StickerIcon: React.ForwardRefExoticComponent>; + +declare const StatusFailIcon: React.ForwardRefExoticComponent>; + +declare const StatusIcon: React.ForwardRefExoticComponent>; + +declare const StatusWarnIcon: React.ForwardRefExoticComponent>; + +declare const StatusPassIcon: React.ForwardRefExoticComponent>; + +declare const GiftIcon: React.ForwardRefExoticComponent>; + +declare const StatusNewIcon: React.ForwardRefExoticComponent>; + +declare const PopOutIcon: React.ForwardRefExoticComponent>; + +declare const ChevronUpIcon: React.ForwardRefExoticComponent>; + +declare const ChevronDownIcon: React.ForwardRefExoticComponent>; + +declare const ChevronLeftIcon: React.ForwardRefExoticComponent>; + +declare const ChevronRightIcon: React.ForwardRefExoticComponent>; + +declare const ChevronSmallUpIcon: React.ForwardRefExoticComponent>; + +declare const ChevronSmallDownIcon: React.ForwardRefExoticComponent>; + +declare const ChevronSmallLeftIcon: React.ForwardRefExoticComponent>; + +declare const ChevronSmallRightIcon: React.ForwardRefExoticComponent>; + +declare const ArrowUpIcon: React.ForwardRefExoticComponent>; + +declare const ArrowDownIcon: React.ForwardRefExoticComponent>; + +declare const ArrowLeftIcon: React.ForwardRefExoticComponent>; + +declare const ArrowRightIcon: React.ForwardRefExoticComponent>; + +declare const ArrowTopLeftIcon: React.ForwardRefExoticComponent>; + +declare const ArrowTopRightIcon: React.ForwardRefExoticComponent>; + +declare const ArrowBottomLeftIcon: React.ForwardRefExoticComponent>; + +declare const ArrowBottomRightIcon: React.ForwardRefExoticComponent>; + +declare const ArrowSolidUpIcon: React.ForwardRefExoticComponent>; + +declare const ArrowSolidDownIcon: React.ForwardRefExoticComponent>; + +declare const ArrowSolidLeftIcon: React.ForwardRefExoticComponent>; + +declare const ArrowSolidRightIcon: React.ForwardRefExoticComponent>; + +declare const ExpandAltIcon: React.ForwardRefExoticComponent>; + +declare const CollapseIcon: React.ForwardRefExoticComponent>; + +declare const ExpandIcon: React.ForwardRefExoticComponent>; + +declare const UnfoldIcon: React.ForwardRefExoticComponent>; + +declare const TransferIcon: React.ForwardRefExoticComponent>; + +declare const RedirectIcon: React.ForwardRefExoticComponent>; + +declare const UndoIcon: React.ForwardRefExoticComponent>; + +declare const ReplyIcon: React.ForwardRefExoticComponent>; + +declare const SyncIcon: React.ForwardRefExoticComponent>; + +declare const UploadIcon: React.ForwardRefExoticComponent>; + +declare const DownloadIcon: React.ForwardRefExoticComponent>; + +declare const BackIcon: React.ForwardRefExoticComponent>; + +declare const ProceedIcon: React.ForwardRefExoticComponent>; + +declare const RefreshIcon: React.ForwardRefExoticComponent>; + +declare const GlobeIcon: React.ForwardRefExoticComponent>; + +declare const CompassIcon: React.ForwardRefExoticComponent>; + +declare const LocationIcon: React.ForwardRefExoticComponent>; + +declare const PinIcon: React.ForwardRefExoticComponent>; + +declare const TimeIcon: React.ForwardRefExoticComponent>; + +declare const DashboardIcon: React.ForwardRefExoticComponent>; + +declare const TimerIcon: React.ForwardRefExoticComponent>; + +declare const HomeIcon: React.ForwardRefExoticComponent>; + +declare const AdminIcon: React.ForwardRefExoticComponent>; + +declare const DirectionIcon: React.ForwardRefExoticComponent>; + +declare const UserIcon: React.ForwardRefExoticComponent>; + +declare const UserAltIcon: React.ForwardRefExoticComponent>; + +declare const UserAddIcon: React.ForwardRefExoticComponent>; + +declare const UsersIcon: React.ForwardRefExoticComponent>; + +declare const ProfileIcon: React.ForwardRefExoticComponent>; + +declare const FaceHappyIcon: React.ForwardRefExoticComponent>; + +declare const FaceNeutralIcon: React.ForwardRefExoticComponent>; + +declare const FaceSadIcon: React.ForwardRefExoticComponent>; + +declare const AccessibilityIcon: React.ForwardRefExoticComponent>; + +declare const AccessibilityAltIcon: React.ForwardRefExoticComponent>; + +declare const AccessibilityIgnoredIcon: React.ForwardRefExoticComponent>; + +export { AccessibilityAltIcon, AccessibilityIcon, AccessibilityIgnoredIcon, AddIcon, AdminIcon, AlertAltIcon, AlertIcon, AlignLeftIcon, AlignRightIcon, AppleIcon, ArrowBottomLeftIcon, ArrowBottomRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowSolidDownIcon, ArrowSolidLeftIcon, ArrowSolidRightIcon, ArrowSolidUpIcon, ArrowTopLeftIcon, ArrowTopRightIcon, ArrowUpIcon, AzureDevOpsIcon, BackIcon, BasketIcon, BatchAcceptIcon, BatchDenyIcon, BeakerIcon, BellIcon, BitbucketIcon, BoldIcon, BookIcon, BookmarkHollowIcon, BookmarkIcon, BottomBarIcon, BottomBarToggleIcon, BoxIcon, BranchIcon, BrowserIcon, BugIcon, ButtonIcon, CPUIcon, CalendarIcon, CameraIcon, CameraStabilizeIcon, CategoryIcon, CertificateIcon, ChangedIcon, ChatIcon, CheckIcon, ChecklistIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronSmallDownIcon, ChevronSmallLeftIcon, ChevronSmallRightIcon, ChevronSmallUpIcon, ChevronUpIcon, ChromaticIcon, ChromeIcon, CircleHollowIcon, CircleIcon, ClearIcon, CloseAltIcon, CloseIcon, CloudHollowIcon, CloudIcon, CogIcon, CollapseIcon, CommandIcon, CommentAddIcon, CommentIcon, CommentsIcon, CommitIcon, CompassIcon, ComponentDrivenIcon, ComponentIcon, ContrastIcon, ContrastIgnoredIcon, ControlsIcon, CopyIcon, CreditIcon, CrossIcon, DashboardIcon, DatabaseIcon, DeleteIcon, DiamondIcon, DirectionIcon, DiscordIcon, DocChartIcon, DocListIcon, DocumentIcon, DownloadIcon, DragIcon, EditIcon, EditorIcon, EllipsisIcon, EmailIcon, ExpandAltIcon, ExpandIcon, EyeCloseIcon, EyeIcon, FaceHappyIcon, FaceNeutralIcon, FaceSadIcon, FacebookIcon, FailedIcon, FastForwardIcon, FigmaIcon, FilesIcon, FilterIcon, FlagIcon, FolderIcon, FormIcon, GDriveIcon, GiftIcon, GithubIcon, GitlabIcon, GlobeIcon, GoogleIcon, GraphBarIcon, GraphLineIcon, GraphqlIcon, GridAltIcon, GridIcon, GrowIcon, HeartHollowIcon, HeartIcon, HomeIcon, HourglassIcon, InfoIcon, ItalicIcon, JumpToIcon, KeyIcon, LightningIcon, LightningOffIcon, LinkBrokenIcon, LinkIcon, LinkedinIcon, LinuxIcon, ListOrderedIcon, ListUnorderedIcon, LocationIcon, LockIcon, MarkdownIcon, MarkupIcon, MediumIcon, MemoryIcon, MenuIcon, MergeIcon, MirrorIcon, MobileIcon, MoonIcon, NutIcon, OutboxIcon, OutlineIcon, PaintBrushAltIcon, PaintBrushIcon, PaperClipIcon, ParagraphIcon, PassedIcon, PhoneIcon, PhotoDragIcon, PhotoIcon, PhotoStabilizeIcon, PinAltIcon, PinIcon, PlayAllHollowIcon, PlayBackIcon, PlayHollowIcon, PlayIcon, PlayNextIcon, PlusIcon, PointerDefaultIcon, PointerHandIcon, PopOutIcon, PowerIcon, PrintIcon, ProceedIcon, ProfileIcon, PullRequestIcon, QuestionIcon, RSSIcon, RedirectIcon, ReduxIcon, RefreshIcon, ReplyIcon, RepoIcon, RequestChangeIcon, RewindIcon, RulerIcon, SaveIcon, SearchIcon, ShareAltIcon, ShareIcon, ShieldIcon, SideBySideIcon, SidebarAltIcon, SidebarAltToggleIcon, SidebarIcon, SidebarToggleIcon, SortDownIcon, SortUpIcon, SpeakerIcon, StackedIcon, StarHollowIcon, StarIcon, StatusFailIcon, StatusIcon, StatusNewIcon, StatusPassIcon, StatusWarnIcon, StickerIcon, StopAltHollowIcon, StopAltIcon, StopIcon, StorybookIcon, StructureIcon, SubtractIcon, SunIcon, SupportIcon, SweepIcon, SwitchAltIcon, SyncIcon, TabletIcon, ThumbsUpIcon, TimeIcon, TimerIcon, TransferIcon, TrashIcon, TwitterIcon, TypeIcon, UbuntuIcon, UndoIcon, UnfoldIcon, UnlockIcon, UnpinIcon, UploadIcon, UserAddIcon, UserAltIcon, UserIcon, UsersIcon, VSCodeIcon, VerifiedIcon, VideoIcon, WandIcon, WatchIcon, WindowsIcon, WrenchIcon, XIcon, YoutubeIcon, ZoomIcon, ZoomOutIcon, ZoomResetIcon, iconList }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..d93ef0e9f29342667da7757369d5b4fead0bb8c9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/index.js @@ -0,0 +1,6563 @@ +import * as React255 from 'react'; + +// src/iconList.tsx +var iconList = [ + { + name: "Images", + icons: [ + "PhotoIcon", + "ComponentIcon", + "GridIcon", + "OutlineIcon", + "PhotoDragIcon", + "PhotoStabilizeIcon", + "CameraStabilizeIcon", + "GridAltIcon", + "SearchIcon", + "ZoomIcon", + "ZoomOutIcon", + "ZoomResetIcon", + "EyeIcon", + "EyeCloseIcon", + "LightningIcon", + "LightningOffIcon", + "MirrorIcon", + "GrowIcon", + "ContrastIcon", + "SwitchAltIcon", + "ContrastIgnoredIcon", + "PaintBrushIcon", + "PaintBrushAltIcon", + "RulerIcon", + "CameraIcon", + "VideoIcon", + "SpeakerIcon", + "PlayIcon", + "PlayBackIcon", + "PlayNextIcon", + "RewindIcon", + "FastForwardIcon", + "StopAltIcon", + "SunIcon", + "MoonIcon", + "StopAltHollowIcon", + "PlayHollowIcon", + "PlayAllHollowIcon", + "StopIcon", + "SideBySideIcon", + "StackedIcon" + ] + }, + { + name: "Documents", + icons: [ + "BookIcon", + "DocumentIcon", + "CopyIcon", + "FilesIcon", + "CategoryIcon", + "FolderIcon", + "PrintIcon", + "GraphLineIcon", + "CalendarIcon", + "GraphBarIcon", + "AlignLeftIcon", + "AlignRightIcon", + "FilterIcon", + "DocChartIcon", + "DocListIcon", + "DragIcon", + "MenuIcon" + ] + }, + { + name: "Editing", + icons: [ + "MarkupIcon", + "BoldIcon", + "ItalicIcon", + "PaperClipIcon", + "ListOrderedIcon", + "ListUnorderedIcon", + "ChecklistIcon", + "ParagraphIcon", + "MarkdownIcon" + ] + }, + { + name: "Git", + icons: [ + "RepoIcon", + "CommitIcon", + "BranchIcon", + "PullRequestIcon", + "MergeIcon" + ] + }, + { + name: "OS", + icons: [ + "AppleIcon", + "LinuxIcon", + "UbuntuIcon", + "WindowsIcon", + "ChromeIcon" + ] + }, + { + name: "Logos", + icons: [ + "StorybookIcon", + "AzureDevOpsIcon", + "BitbucketIcon", + "ChromaticIcon", + "ComponentDrivenIcon", + "DiscordIcon", + "FacebookIcon", + "FigmaIcon", + "GDriveIcon", + "GithubIcon", + "GitlabIcon", + "GoogleIcon", + "GraphqlIcon", + "MediumIcon", + "ReduxIcon", + "TwitterIcon", + "YoutubeIcon", + "VSCodeIcon", + "LinkedinIcon", + "XIcon" + ] + }, + { + name: "Devices", + icons: [ + "BrowserIcon", + "TabletIcon", + "MobileIcon", + "WatchIcon", + "SidebarIcon", + "SidebarAltIcon", + "SidebarAltToggleIcon", + "SidebarToggleIcon", + "BottomBarIcon", + "BottomBarToggleIcon", + "CPUIcon", + "DatabaseIcon", + "MemoryIcon", + "StructureIcon", + "BoxIcon", + "PowerIcon" + ] + }, + { + name: "CRUD", + icons: [ + "EditIcon", + "CogIcon", + "NutIcon", + "WrenchIcon", + "EllipsisIcon", + "WandIcon", + "SweepIcon", + "CheckIcon", + "FormIcon", + "BatchDenyIcon", + "BatchAcceptIcon", + "ControlsIcon", + "PlusIcon", + "CloseAltIcon", + "CrossIcon", + "TrashIcon", + "PinAltIcon", + "UnpinIcon", + "AddIcon", + "SubtractIcon", + "CloseIcon", + "DeleteIcon", + "PassedIcon", + "ChangedIcon", + "FailedIcon", + "ClearIcon", + "CommentIcon", + "CommentAddIcon", + "RequestChangeIcon", + "CommentsIcon", + "ChatIcon", + "LockIcon", + "UnlockIcon", + "KeyIcon", + "OutboxIcon", + "CreditIcon", + "ButtonIcon", + "TypeIcon", + "PointerDefaultIcon", + "PointerHandIcon", + "CommandIcon", + "SaveIcon", + "SortDownIcon", + "SortUpIcon", + "BugIcon", + "EditorIcon" + ] + }, + { + name: "Communicate", + icons: [ + "InfoIcon", + "QuestionIcon", + "SupportIcon", + "AlertIcon", + "AlertAltIcon", + "EmailIcon", + "PhoneIcon", + "LinkIcon", + "LinkBrokenIcon", + "BellIcon", + "RSSIcon", + "ShareAltIcon", + "ShareIcon", + "JumpToIcon", + "CircleHollowIcon", + "CircleIcon", + "BookmarkHollowIcon", + "BookmarkIcon", + "DiamondIcon", + "HeartHollowIcon", + "HeartIcon", + "StarHollowIcon", + "StarIcon", + "CertificateIcon", + "VerifiedIcon", + "ThumbsUpIcon", + "ShieldIcon", + "BasketIcon", + "BeakerIcon", + "HourglassIcon", + "FlagIcon", + "CloudHollowIcon", + "CloudIcon", + "StickerIcon", + "StatusFailIcon", + "StatusIcon", + "StatusWarnIcon", + "StatusPassIcon", + "GiftIcon", + "StatusNewIcon", + "PopOutIcon" + ] + }, + { + name: "Wayfinding", + icons: [ + "ChevronUpIcon", + "ChevronDownIcon", + "ChevronLeftIcon", + "ChevronRightIcon", + "ChevronSmallUpIcon", + "ChevronSmallDownIcon", + "ChevronSmallLeftIcon", + "ChevronSmallRightIcon", + "ArrowUpIcon", + "ArrowDownIcon", + "ArrowLeftIcon", + "ArrowRightIcon", + "ArrowTopLeftIcon", + "ArrowTopRightIcon", + "ArrowBottomLeftIcon", + "ArrowBottomRightIcon", + "ArrowSolidUpIcon", + "ArrowSolidDownIcon", + "ArrowSolidLeftIcon", + "ArrowSolidRightIcon", + "ExpandAltIcon", + "CollapseIcon", + "ExpandIcon", + "UnfoldIcon", + "TransferIcon", + "RedirectIcon", + "UndoIcon", + "ReplyIcon", + "SyncIcon", + "UploadIcon", + "DownloadIcon", + "BackIcon", + "ProceedIcon", + "RefreshIcon", + "GlobeIcon", + "CompassIcon", + "LocationIcon", + "PinIcon", + "TimeIcon", + "DashboardIcon", + "TimerIcon", + "HomeIcon", + "AdminIcon", + "DirectionIcon" + ] + }, + { + name: "People", + icons: [ + "UserIcon", + "UserAltIcon", + "UserAddIcon", + "UsersIcon", + "ProfileIcon", + "FaceHappyIcon", + "FaceNeutralIcon", + "FaceSadIcon", + "AccessibilityIcon", + "AccessibilityAltIcon", + "AccessibilityIgnoredIcon" + ] + } +]; +var PhotoIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M6.25 4.254a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0zm-.5 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M13 1.504v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5zM2 9.297V2.004h10v5.293L9.854 5.15a.5.5 0 00-.708 0L6.5 7.797 5.354 6.65a.5.5 0 00-.708 0L2 9.297zM9.5 6.21l2.5 2.5v3.293H2V10.71l3-3 3.146 3.146a.5.5 0 00.708-.707L7.207 8.504 9.5 6.21z", + fill: color + } + ) + ); +}); +var ComponentIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.5 1.004a2.5 2.5 0 00-2.5 2.5v7a2.5 2.5 0 002.5 2.5h7a2.5 2.5 0 002.5-2.5v-7a2.5 2.5 0 00-2.5-2.5h-7zm8.5 5.5H7.5v-4.5h3a1.5 1.5 0 011.5 1.5v3zm0 1v3a1.5 1.5 0 01-1.5 1.5h-3v-4.5H12zm-5.5 4.5v-4.5H2v3a1.5 1.5 0 001.5 1.5h3zM2 6.504h4.5v-4.5h-3a1.5 1.5 0 00-1.5 1.5v3z", + fill: color + } + ) + ); +}); +var GridIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 1.504a.5.5 0 01.5-.5H6a.5.5 0 01.5.5v4.5a.5.5 0 01-.5.5H1.5a.5.5 0 01-.5-.5v-4.5zm1 4v-3.5h3.5v3.5H2zM7.5 1.504a.5.5 0 01.5-.5h4.5a.5.5 0 01.5.5v4.5a.5.5 0 01-.5.5H8a.5.5 0 01-.5-.5v-4.5zm1 4v-3.5H12v3.5H8.5zM1.5 7.504a.5.5 0 00-.5.5v4.5a.5.5 0 00.5.5H6a.5.5 0 00.5-.5v-4.5a.5.5 0 00-.5-.5H1.5zm.5 1v3.5h3.5v-3.5H2zM7.5 8.004a.5.5 0 01.5-.5h4.5a.5.5 0 01.5.5v4.5a.5.5 0 01-.5.5H8a.5.5 0 01-.5-.5v-4.5zm1 4v-3.5H12v3.5H8.5z", + fill: color + } + ) + ); +}); +var OutlineIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2 2.004v2H1v-2.5a.5.5 0 01.5-.5H4v1H2zM1 9.004v-4h1v4H1zM1 10.004v2.5a.5.5 0 00.5.5H4v-1H2v-2H1zM10 13.004h2.5a.5.5 0 00.5-.5v-2.5h-1v2h-2v1zM12 4.004h1v-2.5a.5.5 0 00-.5-.5H10v1h2v2zM9 12.004v1H5v-1h4zM9 1.004v1H5v-1h4zM13 9.004h-1v-4h1v4zM7 8.004a1 1 0 100-2 1 1 0 000 2z", + fill: color + } + ) + ); +}); +var PhotoDragIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M8.25 3.254a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0zm-.5 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7.003v-6.5a.5.5 0 00-.5-.5h-10a.5.5 0 00-.5.5v2.5H.5a.5.5 0 00-.5.5v2.5h1v-2h2v6.5a.5.5 0 00.5.5H10v2H8v1h2.5a.5.5 0 00.5-.5v-2.5h2.5a.5.5 0 00.5-.5v-3.5zm-10-6v5.794L5.646 5.15a.5.5 0 01.708 0L7.5 6.297l2.646-2.647a.5.5 0 01.708 0L13 5.797V1.004H4zm9 6.208l-2.5-2.5-2.293 2.293L9.354 8.15a.5.5 0 11-.708.707L6 6.211l-2 2v1.793h9V7.21z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M0 10.004v-3h1v3H0zM0 13.504v-2.5h1v2h2v1H.5a.5.5 0 01-.5-.5zM7 14.004H4v-1h3v1z", + fill: color + } + ) + ); +}); +var PhotoStabilizeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M6 4a1.25 1.25 0 110 2.5A1.25 1.25 0 016 4zm0 .5A.75.75 0 106 6a.75.75 0 000-1.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11.5 2a.5.5 0 01.5.5v9a.5.5 0 01-.5.5h-9a.5.5 0 01-.5-.5v-9a.5.5 0 01.5-.5h9zM7.207 9l.647.646a.5.5 0 01-.708.707L5 8.207l-2 2V11h8V8.207l-1.5-1.5L7.207 9zM3 8.793l1.646-1.647.079-.064a.5.5 0 01.629.064L6.5 8.293l2.646-2.647.079-.064a.5.5 0 01.629.064L11 6.793V3H3v5.793z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M0 3.5v-1A2.5 2.5 0 012.5 0h1a.5.5 0 010 1h-1A1.5 1.5 0 001 2.5v1a.5.5 0 01-1 0zM10.5 0h1A2.5 2.5 0 0114 2.5v1a.5.5 0 01-1 0v-1A1.5 1.5 0 0011.5 1h-1a.5.5 0 010-1zM0 10.5v1A2.5 2.5 0 002.5 14h1a.5.5 0 000-1h-1A1.5 1.5 0 011 11.5v-1a.5.5 0 00-1 0zM10.5 14h1a2.5 2.5 0 002.5-2.5v-1a.5.5 0 00-1 0v1a1.5 1.5 0 01-1.5 1.5h-1a.5.5 0 000 1z", + fill: color + } + ) + ); +}); +var CameraStabilizeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_2484_400)", fill: color }, /* @__PURE__ */ React255.createElement("path", { d: "M2.5 1A1.5 1.5 0 001 2.5v1a.5.5 0 01-1 0v-1A2.5 2.5 0 012.5 0h1a.5.5 0 010 1h-1zM8 7a1 1 0 11-2 0 1 1 0 012 0z" }), /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M5.852 2.223A.5.5 0 016.268 2h1.464a.5.5 0 01.416.223L9.333 4H11.5a.5.5 0 01.5.5v5a.5.5 0 01-.5.5h-9a.5.5 0 01-.5-.5v-5a.5.5 0 01.5-.5h2.167l1.185-1.777zM9 7a2 2 0 11-4 0 2 2 0 014 0z" + } + ), /* @__PURE__ */ React255.createElement("path", { d: "M11.5 1A1.5 1.5 0 0113 2.5v1a.5.5 0 001 0v-1A2.5 2.5 0 0011.5 0h-1a.5.5 0 000 1h1zM2.5 13A1.5 1.5 0 011 11.5v-1a.5.5 0 00-1 0v1A2.5 2.5 0 002.5 14h1a.5.5 0 000-1h-1zM11.5 13a1.5 1.5 0 001.5-1.5v-1a.5.5 0 011 0v1a2.5 2.5 0 01-2.5 2.5h-1a.5.5 0 010-1h1z" })), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_2484_400" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var GridAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4 3V1h1v2H4zM4 6v2h1V6H4zM4 11v2h1v-2H4zM9 11v2h1v-2H9zM9 8V6h1v2H9zM9 1v2h1V1H9zM13 5h-2V4h2v1zM11 10h2V9h-2v1zM3 10H1V9h2v1zM1 5h2V4H1v1zM8 5H6V4h2v1zM6 10h2V9H6v1zM4 4h1v1H4V4zM10 4H9v1h1V4zM9 9h1v1H9V9zM5 9H4v1h1V9z", + fill: color + } + ) + ); +}); +var SearchIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z", + fill: color + } + ) + ); +}); +var ZoomIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M6 3.5a.5.5 0 01.5.5v1.5H8a.5.5 0 010 1H6.5V8a.5.5 0 01-1 0V6.5H4a.5.5 0 010-1h1.5V4a.5.5 0 01.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z", + fill: color + } + ) + ); +}); +var ZoomOutIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("path", { d: "M4 5.5a.5.5 0 000 1h4a.5.5 0 000-1H4z", fill: color }), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M6 11.5c1.35 0 2.587-.487 3.544-1.294a.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 106 11.5zm0-1a4.5 4.5 0 100-9 4.5 4.5 0 000 9z", + fill: color + } + ) + ); +}); +var ZoomResetIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.5 2.837V1.5a.5.5 0 00-1 0V4a.5.5 0 00.5.5h2.5a.5.5 0 000-1H2.258a4.5 4.5 0 11-.496 4.016.5.5 0 10-.942.337 5.502 5.502 0 008.724 2.353.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 101.5 2.837z", + fill: color + } + ) + ); +}); +var EyeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("path", { d: "M7 9.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z", fill: color }), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7l-.21.293C13.669 7.465 10.739 11.5 7 11.5S.332 7.465.21 7.293L0 7l.21-.293C.331 6.536 3.261 2.5 7 2.5s6.668 4.036 6.79 4.207L14 7zM2.896 5.302A12.725 12.725 0 001.245 7c.296.37.874 1.04 1.65 1.698C4.043 9.67 5.482 10.5 7 10.5c1.518 0 2.958-.83 4.104-1.802A12.72 12.72 0 0012.755 7c-.297-.37-.875-1.04-1.65-1.698C9.957 4.33 8.517 3.5 7 3.5c-1.519 0-2.958.83-4.104 1.802z", + fill: color + } + ) + ); +}); +var EyeCloseIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.708-.708l-11-11zM11.104 8.698c-.177.15-.362.298-.553.439l.714.714a13.25 13.25 0 002.526-2.558L14 7l-.21-.293C13.669 6.536 10.739 2.5 7 2.5c-.89 0-1.735.229-2.506.58l.764.763A4.859 4.859 0 017 3.5c1.518 0 2.958.83 4.104 1.802A12.724 12.724 0 0112.755 7a12.72 12.72 0 01-1.65 1.698zM.21 6.707c.069-.096 1.03-1.42 2.525-2.558l.714.714c-.191.141-.376.288-.553.439A12.725 12.725 0 001.245 7c.296.37.874 1.04 1.65 1.698C4.043 9.67 5.482 10.5 7 10.5a4.86 4.86 0 001.742-.344l.764.764c-.772.351-1.616.58-2.506.58C3.262 11.5.332 7.465.21 7.293L0 7l.21-.293z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4.5 7c0-.322.061-.63.172-.914l3.242 3.242A2.5 2.5 0 014.5 7zM9.328 7.914L6.086 4.672a2.5 2.5 0 013.241 3.241z", + fill: color + } + ) + ); +}); +var LightningIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M2.522 6.6a.566.566 0 00-.176.544.534.534 0 00.382.41l2.781.721-1.493 5.013a.563.563 0 00.216.627.496.496 0 00.63-.06l6.637-6.453a.568.568 0 00.151-.54.534.534 0 00-.377-.396l-2.705-.708 2.22-4.976a.568.568 0 00-.15-.666.497.497 0 00-.648.008L2.522 6.6zm7.72.63l-3.067-.804L9.02 2.29 3.814 6.803l2.95.764-1.277 4.285 4.754-4.622zM4.51 13.435l.037.011-.037-.011z", + fill: color + } + ) + ); +}); +var LightningOffIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M10.139 8.725l1.36-1.323a.568.568 0 00.151-.54.534.534 0 00-.377-.396l-2.705-.708 2.22-4.976a.568.568 0 00-.15-.666.497.497 0 00-.648.008L5.464 4.05l.708.71 2.848-2.47-1.64 3.677.697.697 2.164.567-.81.787.708.708zM2.523 6.6a.566.566 0 00-.177.544.534.534 0 00.382.41l2.782.721-1.494 5.013a.563.563 0 00.217.627.496.496 0 00.629-.06l3.843-3.736-.708-.707-2.51 2.44 1.137-3.814-.685-.685-2.125-.55.844-.731-.71-.71L2.524 6.6zM1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.708-.708l-11-11z", + fill: color + } + ) + ); +}); +var MirrorIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 1.504a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11zm1 10.5h10v-10l-10 10z", + fill: color + } + ) + ); +}); +var GrowIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.5 1.004a.5.5 0 100 1H12v10.5a.5.5 0 001 0v-10.5a1 1 0 00-1-1H1.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1 3.504a.5.5 0 01.5-.5H10a1 1 0 011 1v8.5a.5.5 0 01-1 0v-8.5H1.5a.5.5 0 01-.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1.5 5.004a.5.5 0 00-.5.5v7a.5.5 0 00.5.5h7a.5.5 0 00.5-.5v-7a.5.5 0 00-.5-.5h-7zm.5 1v6h6v-6H2z", + fill: color + } + ) + ); +}); +var ContrastIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3 3.004H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h10a.5.5 0 00.5-.5v-2.5h2.5a.5.5 0 00.5-.5v-10a.5.5 0 00-.5-.5h-10a.5.5 0 00-.5.5v2.5zm1 1v2.293l2.293-2.293H4zm-1 0v6.5a.499.499 0 00.497.5H10v2H1v-9h2zm1-1h6.5a.499.499 0 01.5.5v6.5h2v-9H4v2zm6 7V7.71l-2.293 2.293H10zm0-3.707V4.71l-5.293 5.293h1.586L10 6.297zm-.707-2.293H7.707L4 7.71v1.586l5.293-5.293z", + fill: color + } + ) + ); +}); +var SwitchAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3 3.004v-2.5a.5.5 0 01.5-.5h10a.5.5 0 01.5.5v10a.5.5 0 01-.5.5H11v2.5a.5.5 0 01-.5.5H.5a.5.5 0 01-.5-.5v-10a.5.5 0 01.5-.5H3zm1 0v-2h9v9h-2v-6.5a.5.5 0 00-.5-.5H4zm6 8v2H1v-9h2v6.5a.5.5 0 00.5.5H10zm0-1H4v-6h6v6z", + fill: color + } + ) + ); +}); +var ContrastIgnoredIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "g", + { + clipPath: "url(#prefix__clip0_2359_559)", + fillRule: "evenodd", + clipRule: "evenodd", + fill: color + }, + /* @__PURE__ */ React255.createElement("path", { d: "M3 3.004H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h7.176a4.526 4.526 0 01-.916-1H1v-9h2v6.5a.499.499 0 00.497.5h2.531a4.548 4.548 0 01-.001-1h-1.32l2.16-2.16c.274-.374.603-.703.977-.977L10 4.711v1.316a4.552 4.552 0 011 0V3.504a.48.48 0 00-.038-.191.5.5 0 00-.462-.31H4v-2h9v5.755c.378.253.715.561 1 .913V.504a.5.5 0 00-.5-.5h-10a.5.5 0 00-.5.5v2.5zm1 1v2.293l2.293-2.293H4zm5.293 0H7.707L4 7.71v1.586l5.293-5.293z" }), + /* @__PURE__ */ React255.createElement("path", { d: "M14 10.5a3.5 3.5 0 11-7 0 3.5 3.5 0 017 0zm-5.5 0A.5.5 0 019 10h3a.5.5 0 010 1H9a.5.5 0 01-.5-.5z" }) + ), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_2359_559" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var PaintBrushIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11.854.146a.5.5 0 00-.708 0L2.983 8.31a2.24 2.24 0 00-1.074.6C.677 10.14.24 11.902.085 12.997 0 13.6 0 14 0 14s.4 0 1.002-.085c1.095-.155 2.857-.592 4.089-1.824a2.24 2.24 0 00.6-1.074l8.163-8.163a.5.5 0 000-.708l-2-2zM5.6 9.692l.942-.942L5.25 7.457l-.942.943A2.242 2.242 0 015.6 9.692zm1.649-1.65L12.793 2.5 11.5 1.207 5.957 6.75 7.25 8.043zM4.384 9.617a1.25 1.25 0 010 1.768c-.767.766-1.832 1.185-2.78 1.403-.17.04-.335.072-.49.098.027-.154.06-.318.099-.49.219-.947.637-2.012 1.403-2.779a1.25 1.25 0 011.768 0z", + fill: color + } + ) + ); +}); +var PaintBrushAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M10.027.271a.752.752 0 01.947 0l.057.052 2.646 2.647.052.056a.752.752 0 010 .948l-.052.056-4.47 4.47 1.147 1.146.293-.293a.5.5 0 01.707 0l2.293 2.293a.5.5 0 010 .707l-1.293 1.293-.078.065a.502.502 0 01-.55 0l-.08-.065-2.292-2.293a.5.5 0 010-.707l.293-.293L8.324 9.03a.75.75 0 010-1.06l4.47-4.47L10.5 1.207l-.647.646.086.086a1.5 1.5 0 010 2.122L4.5 9.5l-.177.183C2.592 11.53 4 12.03 4 13a1 1 0 01-2 0c0-1 1.464-1.537 0-3l.003-.004-.063-.057-.879-.879a1.5 1.5 0 01-.103-2.006l.103-.115L6.94 1.061a1.5 1.5 0 012.121 0l.086.085.823-.823.057-.052zM10.415 11L12 12.586l.585-.586-1.585-1.586-.586.586zM8.354 1.768a.5.5 0 00-.629-.064l-.078.064L2.32 7.094c.782.138 2.263-.097 3.52-.349l3.393-3.392.063-.078a.501.501 0 000-.55l-.063-.079-.879-.878z", + fill: color + } + ) + ); +}); +var RulerIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.5 1.004a.5.5 0 01.5.5v.5h10v-.5a.5.5 0 011 0v2a.5.5 0 01-1 0v-.5H2v.5a.5.5 0 01-1 0v-2a.5.5 0 01.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1.5 6a.5.5 0 00-.5.5v6a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-6a.5.5 0 00-.5-.5h-11zM2 7v5h10V7h-1v2.5a.5.5 0 01-1 0V7h-.75v1a.5.5 0 01-1 0V7H7.5v2.5a.5.5 0 01-1 0V7h-.75v1a.5.5 0 01-1 0V7H4v2.5a.5.5 0 01-1 0V7H2z", + fill: color + } + ) + ); +}); +var CameraIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M10 7a3 3 0 11-6 0 3 3 0 016 0zM9 7a2 2 0 11-4 0 2 2 0 014 0z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M2.5 1a.5.5 0 00-.5.5v.504H.5a.5.5 0 00-.5.5v9a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-9a.5.5 0 00-.5-.5H6V1.5a.5.5 0 00-.5-.5h-3zM1 3.004v8h12v-8H1z", + fill: color + } + ) + ); +}); +var VideoIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("path", { d: "M2.5 10a.5.5 0 100-1 .5.5 0 000 1z", fill: color }), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M0 4a2 2 0 012-2h6a2 2 0 012 2v.5l3.189-2.391A.5.5 0 0114 2.5v9a.5.5 0 01-.804.397L10 9.5v.5a2 2 0 01-2 2H2a2 2 0 01-2-2V4zm9 0v1.5a.5.5 0 00.8.4L13 3.5v7L9.8 8.1a.5.5 0 00-.8.4V10a1 1 0 01-1 1H2a1 1 0 01-1-1V4a1 1 0 011-1h6a1 1 0 011 1z", + fill: color + } + ) + ); +}); +var SpeakerIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 4.5v5a.5.5 0 00.5.5H4l3.17 2.775a.5.5 0 00.83-.377V1.602a.5.5 0 00-.83-.376L4 4H1.5a.5.5 0 00-.5.5zM4 9V5H2v4h2zm.998.545A.504.504 0 005 9.5v-5c0-.015 0-.03-.002-.044L7 2.704v8.592L4.998 9.545z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M10.15 1.752a.5.5 0 00-.3.954 4.502 4.502 0 010 8.588.5.5 0 00.3.954 5.502 5.502 0 000-10.496z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M10.25 3.969a.5.5 0 00-.5.865 2.499 2.499 0 010 4.332.5.5 0 10.5.866 3.499 3.499 0 000-6.063z", + fill: color + } + ) + ); +}); +var PlayIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M12.813 7.425l-9.05 5.603A.5.5 0 013 12.603V1.398a.5.5 0 01.763-.425l9.05 5.602a.5.5 0 010 .85z", + fill: color + } + ) + ); +}); +var PlayBackIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.24 12.035L3.697 7.427A.494.494 0 013.5 7.2v4.05a.75.75 0 01-1.5 0v-8.5a.75.75 0 011.5 0V6.8a.494.494 0 01.198-.227l7.541-4.608A.5.5 0 0112 2.39v9.217a.5.5 0 01-.76.427z", + fill: color + } + ) + ); +}); +var PlayNextIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2.76 12.035l7.542-4.608A.495.495 0 0010.5 7.2v4.05a.75.75 0 001.5 0v-8.5a.75.75 0 00-1.5 0V6.8a.495.495 0 00-.198-.227L2.76 1.965A.5.5 0 002 2.39v9.217a.5.5 0 00.76.427z", + fill: color + } + ) + ); +}); +var RewindIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M9 2.42v2.315l4.228-2.736a.5.5 0 01.772.42v9.162a.5.5 0 01-.772.42L9 9.263v2.317a.5.5 0 01-.772.42L1.5 7.647v3.603a.75.75 0 01-1.5 0v-8.5a.75.75 0 011.5 0v3.603L8.228 2A.5.5 0 019 2.42z", + fill: color + } + ) + ); +}); +var FastForwardIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5 2.42v2.315L.772 1.999a.5.5 0 00-.772.42v9.162a.5.5 0 00.772.42L5 9.263v2.317a.5.5 0 00.772.42L12.5 7.647v3.603a.75.75 0 001.5 0v-8.5a.75.75 0 00-1.5 0v3.603L5.772 2A.5.5 0 005 2.42z", + fill: color + } + ) + ); +}); +var StopAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1 1.504a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11z", + fill: color + } + ) + ); +}); +var SunIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3492)", fill: color }, /* @__PURE__ */ React255.createElement("path", { d: "M7.5.5a.5.5 0 00-1 0V2a.5.5 0 001 0V.5z" }), /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 10a3 3 0 100-6 3 3 0 000 6zm0-1a2 2 0 100-4 2 2 0 000 4z" + } + ), /* @__PURE__ */ React255.createElement("path", { d: "M7 11.5a.5.5 0 01.5.5v1.5a.5.5 0 01-1 0V12a.5.5 0 01.5-.5zM11.5 7a.5.5 0 01.5-.5h1.5a.5.5 0 010 1H12a.5.5 0 01-.5-.5zM.5 6.5a.5.5 0 000 1H2a.5.5 0 000-1H.5zM3.818 10.182a.5.5 0 010 .707l-1.06 1.06a.5.5 0 11-.708-.706l1.06-1.06a.5.5 0 01.708 0zM11.95 2.757a.5.5 0 10-.707-.707l-1.061 1.061a.5.5 0 10.707.707l1.06-1.06zM10.182 10.182a.5.5 0 01.707 0l1.06 1.06a.5.5 0 11-.706.708l-1.061-1.06a.5.5 0 010-.708zM2.757 2.05a.5.5 0 10-.707.707l1.06 1.061a.5.5 0 00.708-.707l-1.06-1.06z" })), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_1107_3492" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var MoonIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3493)" }, /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7.78.044A6.968 6.968 0 003.5.94a6.999 6.999 0 107 12.122 6.97 6.97 0 002.87-3.16c.098-.213-.144-.417-.359-.322a4.976 4.976 0 01-2.01.42A5 5 0 018.542.645C8.747.53 8.73.214 8.5.164a7.042 7.042 0 00-.72-.12zm-1.268.975a6 6 0 004.98 9.96 6 6 0 11-4.98-9.96z", + fill: color + } + )), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_1107_3493" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var StopAltHollowIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M2.2 2.204v9.6h9.6v-9.6H2.2zm-.7-1.2a.5.5 0 00-.5.5v11a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-11a.5.5 0 00-.5-.5h-11z", + fill: color + } + ) + ); +}); +var PlayHollowIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M4.2 10.88L10.668 7 4.2 3.12v7.76zM3 2.414v9.174a.8.8 0 001.212.686l7.645-4.587a.8.8 0 000-1.372L4.212 1.727A.8.8 0 003 2.413z", + fill: color + } + ) + ); +}); +var PlayAllHollowIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M5.2 10.88L11.668 7 5.2 3.12v7.76zM4 2.414v9.174a.8.8 0 001.212.686l7.645-4.587a.8.8 0 000-1.372L5.212 1.727A.8.8 0 004 2.413zM1.5 1.6a.6.6 0 01.6.6v9.6a.6.6 0 11-1.2 0V2.2a.6.6 0 01.6-.6z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M.963 1.932a.6.6 0 01.805-.268l1 .5a.6.6 0 01-.536 1.073l-1-.5a.6.6 0 01-.269-.805zM3.037 11.132a.6.6 0 01-.269.805l-1 .5a.6.6 0 01-.536-1.073l1-.5a.6.6 0 01.805.268z", + fill: color + } + ) + ); +}); +var StopIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4.5 4a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h5a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5h-5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z", + fill: color + } + ) + ); +}); +var SideBySideIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 1.504a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11zm1 10.5v-10h5v10H2z", + fill: color + } + ) + ); +}); +var StackedIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M12.5 1.004a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11zm-10.5 1h10v5H2v-5z", + fill: color + } + ) + ); +}); +var BookIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M13 2a2 2 0 00-2-2H1.5a.5.5 0 00-.5.5v13a.5.5 0 00.5.5H11a2 2 0 002-2V2zM3 13h8a1 1 0 001-1V2a1 1 0 00-1-1H7v6.004a.5.5 0 01-.856.352l-.002-.002L5.5 6.71l-.645.647A.5.5 0 014 7.009V1H3v12zM5 1v4.793l.146-.146a.5.5 0 01.743.039l.111.11V1H5z", + fill: color + } + ) + ); +}); +var DocumentIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4 5.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zM4.5 7.5a.5.5 0 000 1h5a.5.5 0 000-1h-5zM4 10.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1.5 0a.5.5 0 00-.5.5v13a.5.5 0 00.5.5h11a.5.5 0 00.5-.5V3.207a.5.5 0 00-.146-.353L10.146.146A.5.5 0 009.793 0H1.5zM2 1h7.5v2a.5.5 0 00.5.5h2V13H2V1z", + fill: color + } + ) + ); +}); +var CopyIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11.746.07A.5.5 0 0011.5.003h-6a.5.5 0 00-.5.5v2.5H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h8a.5.5 0 00.5-.5v-2.5h4.5a.5.5 0 00.5-.5v-8a.498.498 0 00-.15-.357L11.857.154a.506.506 0 00-.11-.085zM9 10.003h4v-7h-1.5a.5.5 0 01-.5-.5v-1.5H6v2h.5a.5.5 0 01.357.15L8.85 5.147c.093.09.15.217.15.357v4.5zm-8-6v9h7v-7H6.5a.5.5 0 01-.5-.5v-1.5H1z", + fill: color + } + ) + ); +}); +var FilesIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M6.5 11a.5.5 0 010 1h-4a.5.5 0 010-1h4zM4.5 5a.5.5 0 01.5.5V7h1.5a.5.5 0 010 1H5v1.5a.5.5 0 01-1 0V8H2.5a.5.5 0 010-1H4V5.5a.5.5 0 01.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11.5.004a.5.5 0 01.357.15l1.993 1.993a.5.5 0 01.15.358v8a.5.5 0 01-.5.5H9v2.499a.5.5 0 01-.5.5h-8a.5.5 0 01-.5-.5v-10a.5.5 0 01.5-.5H5v-2.5a.5.5 0 01.5-.5h6zm-10.5 13h7v-7l-2-2H1v9zm5-10h.5a.5.5 0 01.357.15L8.85 5.146a.5.5 0 01.15.358v4.5h4v-7l-2-2H6v2z", + fill: color + } + ) + ); +}); +var CategoryIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3 1.5a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7a.5.5 0 01-.5-.5zM2 3.504a.5.5 0 01.5-.5h9a.5.5 0 010 1h-9a.5.5 0 01-.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 5.5a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v7a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-7zM2 12V6h10v6H2z", + fill: color + } + ) + ); +}); +var FolderIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M6.586 3.504l-1.5-1.5H1v9h12v-7.5H6.586zm.414-1L5.793 1.297a1 1 0 00-.707-.293H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-8.5a.5.5 0 00-.5-.5H7z", + fill: color + } + ) + ); +}); +var PrintIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4.5 8.004a.5.5 0 100 1h5a.5.5 0 000-1h-5zM4.5 10.004a.5.5 0 000 1h5a.5.5 0 000-1h-5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M2 1.504a.5.5 0 01.5-.5h8a.498.498 0 01.357.15l.993.993c.093.09.15.217.15.357v1.5h1.5a.5.5 0 01.5.5v5a.5.5 0 01-.5.5H12v2.5a.5.5 0 01-.5.5h-9a.5.5 0 01-.5-.5v-2.5H.5a.5.5 0 01-.5-.5v-5a.5.5 0 01.5-.5H2v-2.5zm11 7.5h-1v-2.5a.5.5 0 00-.5-.5h-9a.5.5 0 00-.5.5v2.5H1v-4h12v4zm-2-6v1H3v-2h7v.5a.5.5 0 00.5.5h.5zm-8 9h8v-5H3v5z", + fill: color + } + ) + ); +}); +var GraphLineIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5.146 6.15a.5.5 0 01.708 0L7 7.297 9.146 5.15a.5.5 0 01.708 0l1 1a.5.5 0 01-.708.707L9.5 6.211 7.354 8.357a.5.5 0 01-.708 0L5.5 7.211 3.854 8.857a.5.5 0 11-.708-.707l2-2z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1.5 1.004a.5.5 0 00-.5.5v11a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-11a.5.5 0 00-.5-.5h-11zm.5 1v10h10v-10H2z", + fill: color + } + ) + ); +}); +var CalendarIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.5 0a.5.5 0 01.5.5V1h6V.5a.5.5 0 011 0V1h1.5a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5H3V.5a.5.5 0 01.5-.5zM2 4v2.3h3V4H2zm0 5.2V6.8h3v2.4H2zm0 .5V12h3V9.7H2zm3.5 0V12h3V9.7h-3zm3.5 0V12h3V9.7H9zm3-.5H9V6.8h3v2.4zm-3.5 0h-3V6.8h3v2.4zM9 4v2.3h3V4H9zM5.5 6.3h3V4h-3v2.3z", + fill: color + } + ) + ); +}); +var GraphBarIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M12 2.5a.5.5 0 00-1 0v10a.5.5 0 001 0v-10zM9 4.5a.5.5 0 00-1 0v8a.5.5 0 001 0v-8zM5.5 7a.5.5 0 01.5.5v5a.5.5 0 01-1 0v-5a.5.5 0 01.5-.5zM3 10.5a.5.5 0 00-1 0v2a.5.5 0 001 0v-2z", + fill: color + } + ) + ); +}); +var AlignLeftIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M13 2a.5.5 0 010 1H1a.5.5 0 010-1h12zM10 5a.5.5 0 010 1H1a.5.5 0 010-1h9zM11.5 8.5A.5.5 0 0011 8H1a.5.5 0 000 1h10a.5.5 0 00.5-.5zM7.5 11a.5.5 0 010 1H1a.5.5 0 010-1h6.5z", + fill: color + } + ) + ); +}); +var AlignRightIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1 2a.5.5 0 000 1h12a.5.5 0 000-1H1zM4 5a.5.5 0 000 1h9a.5.5 0 000-1H4zM2.5 8.5A.5.5 0 013 8h10a.5.5 0 010 1H3a.5.5 0 01-.5-.5zM6.5 11a.5.5 0 000 1H13a.5.5 0 000-1H6.5z", + fill: color + } + ) + ); +}); +var FilterIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1 2a.5.5 0 000 1h12a.5.5 0 000-1H1zM3 5a.5.5 0 000 1h8a.5.5 0 000-1H3zM4.5 8.5A.5.5 0 015 8h4a.5.5 0 010 1H5a.5.5 0 01-.5-.5zM6.5 11a.5.5 0 000 1h1a.5.5 0 000-1h-1z", + fill: color + } + ) + ); +}); +var DocChartIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 1.5a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11zM2 4v2.3h3V4H2zm0 5.2V6.8h3v2.4H2zm0 .5V12h3V9.7H2zm3.5 0V12h3V9.7h-3zm3.5 0V12h3V9.7H9zm3-.5H9V6.8h3v2.4zm-3.5 0h-3V6.8h3v2.4zM9 6.3h3V4H9v2.3zm-3.5 0h3V4h-3v2.3z", + fill: color + } + ) + ); +}); +var DocListIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3.5 6.5A.5.5 0 014 6h6a.5.5 0 010 1H4a.5.5 0 01-.5-.5zM4 9a.5.5 0 000 1h6a.5.5 0 000-1H4z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 1.5a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11zM2 4v8h10V4H2z", + fill: color + } + ) + ); +}); +var DragIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M13 4a.5.5 0 010 1H1a.5.5 0 010-1h12zM13.5 9.5A.5.5 0 0013 9H1a.5.5 0 000 1h12a.5.5 0 00.5-.5z", + fill: color + } + ) + ); +}); +var MenuIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M13 3.5a.5.5 0 010 1H1a.5.5 0 010-1h12zM13.5 10a.5.5 0 00-.5-.5H1a.5.5 0 000 1h12a.5.5 0 00.5-.5zM13 6.5a.5.5 0 010 1H1a.5.5 0 010-1h12z", + fill: color + } + ) + ); +}); +var MarkupIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M8.982 1.632a.5.5 0 00-.964-.263l-3 11a.5.5 0 10.964.263l3-11zM3.32 3.616a.5.5 0 01.064.704L1.151 7l2.233 2.68a.5.5 0 11-.768.64l-2.5-3a.5.5 0 010-.64l2.5-3a.5.5 0 01.704-.064zM10.68 3.616a.5.5 0 00-.064.704L12.849 7l-2.233 2.68a.5.5 0 00.768.64l2.5-3a.5.5 0 000-.64l-2.5-3a.5.5 0 00-.704-.064z", + fill: color + } + ) + ); +}); +var BoldIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3 2v1.5h1v7H3V12h5a3 3 0 001.791-5.407A2.75 2.75 0 008 2.011V2H3zm5 5.5H5.5v3H8a1.5 1.5 0 100-3zm-.25-4H5.5V6h2.25a1.25 1.25 0 100-2.5z", + fill: color + } + ) + ); +}); +var ItalicIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("path", { d: "M5 2h6v1H8.5l-2 8H9v1H3v-1h2.5l2-8H5V2z", fill: color }) + ); +}); +var PaperClipIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M10.553 2.268a1.5 1.5 0 00-2.12 0L2.774 7.925a2.5 2.5 0 003.536 3.535l3.535-3.535a.5.5 0 11.707.707l-3.535 3.536-.002.002a3.5 3.5 0 01-4.959-4.941l.011-.011L7.725 1.56l.007-.008a2.5 2.5 0 013.53 3.541l-.002.002-5.656 5.657-.003.003a1.5 1.5 0 01-2.119-2.124l3.536-3.536a.5.5 0 11.707.707L4.189 9.34a.5.5 0 00.707.707l5.657-5.657a1.5 1.5 0 000-2.121z", + fill: color + } + ) + ); +}); +var ListOrderedIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5 2.5a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7a.5.5 0 01-.5-.5zM5 7a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7A.5.5 0 015 7zM5.5 11a.5.5 0 000 1h7a.5.5 0 000-1h-7zM2.5 2H1v1h1v3h1V2.5a.5.5 0 00-.5-.5zM3 8.5v1a.5.5 0 01-1 0V9h-.5a.5.5 0 010-1h1a.5.5 0 01.5.5zM2 10.5a.5.5 0 00-1 0V12h2v-1H2v-.5z", + fill: color + } + ) + ); +}); +var ListUnorderedIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2.75 2.5a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM5.5 2a.5.5 0 000 1h7a.5.5 0 000-1h-7zM5.5 11a.5.5 0 000 1h7a.5.5 0 000-1h-7zM2 12.25a.75.75 0 100-1.5.75.75 0 000 1.5zM5 7a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7A.5.5 0 015 7zM2 7.75a.75.75 0 100-1.5.75.75 0 000 1.5z", + fill: color + } + ) + ); +}); +var ChecklistIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.5 10a.5.5 0 01.5.5v2a.5.5 0 01-.5.5h-2a.5.5 0 01-.5-.5v-2a.5.5 0 01.5-.5h2zM2 12h1v-1H2v1z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M12.5 11a.5.5 0 110 1h-7a.5.5 0 010-1h7zM3.146 5.646a.5.5 0 11.708.707L3.207 7l.647.646a.5.5 0 11-.708.707L2.5 7.707l-.646.646a.5.5 0 01-.708-.707L1.793 7l-.647-.647a.5.5 0 11.708-.707l.646.647.646-.647zM12.5 6.5a.5.5 0 010 1h-7a.5.5 0 010-1h7zM4.146 1.146a.5.5 0 11.708.707l-2 2-.079.065a.498.498 0 01-.629-.065l-1-1a.5.5 0 11.708-.707l.646.647 1.646-1.647zM12.5 2a.5.5 0 010 1h-7a.5.5 0 010-1h7z", + fill: color + } + ) + ); +}); +var ParagraphIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M6 7a3 3 0 110-6h5.5a.5.5 0 010 1H10v10.5a.5.5 0 01-1 0V2H7v10.5a.5.5 0 01-1 0V7z", + fill: color + } + ) + ); +}); +var MarkdownIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2 4.5h1.5L5 6.375 6.5 4.5H8v5H6.5V7L5 8.875 3.5 7v2.5H2v-5zM9.75 4.5h1.5V7h1.25l-2 2.5-2-2.5h1.25V4.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M.5 2a.5.5 0 00-.5.5v9a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-9a.5.5 0 00-.5-.5H.5zM1 3v8h12V3H1z", + fill: color + } + ) + ); +}); +var RepoIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5 2.5a.5.5 0 11-1 0 .5.5 0 011 0zM4.5 5a.5.5 0 100-1 .5.5 0 000 1zM5 6.5a.5.5 0 11-1 0 .5.5 0 011 0z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11 0a2 2 0 012 2v10a2 2 0 01-2 2H1.5a.5.5 0 01-.5-.5V.5a.5.5 0 01.5-.5H11zm0 1H3v12h8a1 1 0 001-1V2a1 1 0 00-1-1z", + fill: color + } + ) + ); +}); +var CommitIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.031 7.5a4 4 0 007.938 0H13.5a.5.5 0 000-1h-2.53a4 4 0 00-7.94 0H.501a.5.5 0 000 1h2.531zM7 10a3 3 0 100-6 3 3 0 000 6z", + fill: color + } + ) + ); +}); +var BranchIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M6 2.5a1.5 1.5 0 01-1 1.415v4.053C5.554 7.4 6.367 7 7.5 7c.89 0 1.453-.252 1.812-.557.218-.184.374-.4.482-.62a1.5 1.5 0 111.026.143c-.155.423-.425.87-.86 1.24C9.394 7.685 8.59 8 7.5 8c-1.037 0-1.637.42-1.994.917a2.81 2.81 0 00-.472 1.18A1.5 1.5 0 114 10.086v-6.17A1.5 1.5 0 116 2.5zm-2 9a.5.5 0 111 0 .5.5 0 01-1 0zm1-9a.5.5 0 11-1 0 .5.5 0 011 0zm6 2a.5.5 0 11-1 0 .5.5 0 011 0z", + fill: color + } + ) + ); +}); +var PullRequestIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M8.354 1.354L7.707 2H8.5A2.5 2.5 0 0111 4.5v5.585a1.5 1.5 0 11-1 0V4.5A1.5 1.5 0 008.5 3h-.793l.647.646a.5.5 0 11-.708.708l-1.5-1.5a.5.5 0 010-.708l1.5-1.5a.5.5 0 11.708.708zM11 11.5a.5.5 0 11-1 0 .5.5 0 011 0zM4 3.915a1.5 1.5 0 10-1 0v6.17a1.5 1.5 0 101 0v-6.17zM3.5 11a.5.5 0 100 1 .5.5 0 000-1zm0-8a.5.5 0 100-1 .5.5 0 000 1z", + fill: color + } + ) + ); +}); +var MergeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M4.108 3.872A1.5 1.5 0 103 3.915v6.17a1.5 1.5 0 101 0V6.41c.263.41.573.77.926 1.083 1.108.98 2.579 1.433 4.156 1.5A1.5 1.5 0 109.09 7.99c-1.405-.065-2.62-.468-3.5-1.248-.723-.64-1.262-1.569-1.481-2.871zM3.5 11a.5.5 0 100 1 .5.5 0 000-1zM4 2.5a.5.5 0 11-1 0 .5.5 0 011 0zm7 6a.5.5 0 11-1 0 .5.5 0 011 0z", + fill: color + } + ) + ); +}); +var AppleIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.03 8.103a3.044 3.044 0 01-.202-1.744 2.697 2.697 0 011.4-1.935c-.749-1.18-1.967-1.363-2.35-1.403-.835-.086-2.01.56-2.648.57h-.016c-.639-.01-1.814-.656-2.649-.57-.415.044-1.741.319-2.541 1.593-.281.447-.498 1.018-.586 1.744a6.361 6.361 0 00-.044.85c.005.305.028.604.07.895.09.62.259 1.207.477 1.744.242.595.543 1.13.865 1.585.712 1.008 1.517 1.59 1.971 1.6.934.021 1.746-.61 2.416-.594.006.002.014.003.02.002h.017c.007 0 .014 0 .021-.002.67-.017 1.481.615 2.416.595.453-.011 1.26-.593 1.971-1.6a7.95 7.95 0 00.97-1.856c-.697-.217-1.27-.762-1.578-1.474zm-2.168-5.97c.717-.848.69-2.07.624-2.125-.065-.055-1.25.163-1.985.984-.735.82-.69 2.071-.624 2.125.064.055 1.268-.135 1.985-.984z", + fill: color + } + ) + ); +}); +var LinuxIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 0a3 3 0 013 3v1.24c.129.132.25.27.362.415.113.111.283.247.515.433l.194.155c.325.261.711.582 1.095.966.765.765 1.545 1.806 1.823 3.186a.501.501 0 01-.338.581 3.395 3.395 0 01-1.338.134 2.886 2.886 0 01-1.049-.304 5.535 5.535 0 01-.17.519 2 2 0 11-2.892 2.55A5.507 5.507 0 017 13c-.439 0-.838-.044-1.201-.125a2 2 0 11-2.892-2.55 5.553 5.553 0 01-.171-.519c-.349.182-.714.27-1.05.304A3.395 3.395 0 01.35 9.977a.497.497 0 01-.338-.582c.278-1.38 1.058-2.42 1.823-3.186.384-.384.77-.705 1.095-.966l.194-.155c.232-.186.402-.322.515-.433.112-.145.233-.283.362-.414V3a3 3 0 013-3zm1.003 11.895a2 2 0 012.141-1.89c.246-.618.356-1.322.356-2.005 0-.514-.101-1.07-.301-1.599l-.027-.017a6.387 6.387 0 00-.857-.42 6.715 6.715 0 00-1.013-.315l-.852.638a.75.75 0 01-.9 0l-.852-.638a6.716 6.716 0 00-1.693.634 4.342 4.342 0 00-.177.101l-.027.017A4.6 4.6 0 003.501 8c0 .683.109 1.387.355 2.005a2 2 0 012.142 1.89c.295.067.627.105 1.002.105s.707-.038 1.003-.105zM5 12a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0zM6.1 4.3a1.5 1.5 0 011.8 0l.267.2L7 5.375 5.833 4.5l.267-.2zM8.5 2a.5.5 0 01.5.5V3a.5.5 0 01-1 0v-.5a.5.5 0 01.5-.5zM6 2.5a.5.5 0 00-1 0V3a.5.5 0 001 0v-.5z", + fill: color + } + ) + ); +}); +var UbuntuIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3497)", fill: color }, /* @__PURE__ */ React255.createElement("path", { d: "M12.261 2.067c0 1.142-.89 2.068-1.988 2.068-1.099 0-1.99-.926-1.99-2.068C8.283.926 9.174 0 10.273 0c1.098 0 1.989.926 1.989 2.067zM3.978 6.6c0 1.142-.89 2.068-1.989 2.068C.891 8.668 0 7.742 0 6.601c0-1.142.89-2.068 1.989-2.068 1.099 0 1.989.926 1.989 2.068zM6.475 11.921A4.761 4.761 0 014.539 11a4.993 4.993 0 01-1.367-1.696 2.765 2.765 0 01-1.701.217 6.725 6.725 0 001.844 2.635 6.379 6.379 0 004.23 1.577 3.033 3.033 0 01-.582-1.728 4.767 4.767 0 01-.488-.083zM11.813 11.933c0 1.141-.89 2.067-1.989 2.067-1.098 0-1.989-.926-1.989-2.067 0-1.142.891-2.068 1.99-2.068 1.098 0 1.989.926 1.989 2.068zM12.592 11.173a6.926 6.926 0 001.402-3.913 6.964 6.964 0 00-1.076-4.023A2.952 2.952 0 0111.8 4.6c.398.78.592 1.656.564 2.539a5.213 5.213 0 01-.724 2.495c.466.396.8.935.952 1.54zM1.987 3.631c-.05 0-.101.002-.151.004C3.073 1.365 5.504.024 8.005.23a3.07 3.07 0 00-.603 1.676 4.707 4.707 0 00-2.206.596 4.919 4.919 0 00-1.7 1.576 2.79 2.79 0 00-1.509-.447z" })), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_1107_3497" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var WindowsIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M6.5 1H1v5.5h5.5V1zM13 1H7.5v5.5H13V1zM7.5 7.5H13V13H7.5V7.5zM6.5 7.5H1V13h5.5V7.5z", + fill: color + } + ) + ); +}); +var ChromeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3496)" }, /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M13.023 3.431a.115.115 0 01-.099.174H7.296A3.408 3.408 0 003.7 6.148a.115.115 0 01-.21.028l-1.97-3.413a.115.115 0 01.01-.129A6.97 6.97 0 017 0a6.995 6.995 0 016.023 3.431zM7 9.615A2.619 2.619 0 014.384 7 2.62 2.62 0 017 4.383 2.619 2.619 0 019.616 7 2.619 2.619 0 017 9.615zm1.034.71a.115.115 0 00-.121-.041 3.4 3.4 0 01-.913.124 3.426 3.426 0 01-3.091-1.973L1.098 3.567a.115.115 0 00-.2.001 7.004 7.004 0 005.058 10.354l.017.001c.04 0 .078-.021.099-.057l1.971-3.414a.115.115 0 00-.009-.128zm1.43-5.954h3.947c.047 0 .09.028.107.072.32.815.481 1.675.481 2.557a6.957 6.957 0 01-2.024 4.923A6.957 6.957 0 017.08 14h-.001a.115.115 0 01-.1-.172L9.794 8.95A3.384 3.384 0 0010.408 7c0-.921-.364-1.785-1.024-2.433a.115.115 0 01.08-.196z", + fill: color + } + )), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_1107_3496" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var StorybookIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M2.042.616a.704.704 0 00-.66.729L1.816 12.9c.014.367.306.66.672.677l9.395.422h.032a.704.704 0 00.704-.703V.704c0-.015 0-.03-.002-.044a.704.704 0 00-.746-.659l-.773.049.057 1.615a.105.105 0 01-.17.086l-.52-.41-.617.468a.105.105 0 01-.168-.088L9.746.134 2.042.616zm8.003 4.747c-.247.192-2.092.324-2.092.05.04-1.045-.429-1.091-.689-1.091-.247 0-.662.075-.662.634 0 .57.607.893 1.32 1.27 1.014.538 2.24 1.188 2.24 2.823 0 1.568-1.273 2.433-2.898 2.433-1.676 0-3.141-.678-2.976-3.03.065-.275 2.197-.21 2.197 0-.026.971.195 1.256.753 1.256.43 0 .624-.236.624-.634 0-.602-.633-.958-1.361-1.367-.987-.554-2.148-1.205-2.148-2.7 0-1.494 1.027-2.489 2.86-2.489 1.832 0 2.832.98 2.832 2.845z", + fill: color + } + ) + ); +}); +var AzureDevOpsIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3503)" }, /* @__PURE__ */ React255.createElement( + "path", + { + d: "M0 5.176l1.31-1.73 4.902-1.994V.014l4.299 3.144-8.78 1.706v4.8L0 9.162V5.176zm14-2.595v8.548l-3.355 2.857-5.425-1.783v1.783L1.73 9.661l8.784 1.047v-7.55L14 2.581z", + fill: color + } + )), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_1107_3503" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var BitbucketIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 1.522a.411.411 0 00-.412.476l1.746 10.597a.56.56 0 00.547.466h8.373a.411.411 0 00.412-.345l1.017-6.248h-3.87L8.35 9.18H5.677l-.724-3.781h7.904L13.412 2A.411.411 0 0013 1.524L1 1.522z", + fill: color + } + ) + ); +}); +var ChromaticIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M0 7a7 7 0 1014 0A7 7 0 000 7zm5.215-3.869a1.967 1.967 0 013.747.834v1.283l-3.346-1.93a2.486 2.486 0 00-.401-.187zm3.484 2.58l-3.346-1.93a1.968 1.968 0 00-2.685.72 1.954 1.954 0 00.09 2.106 2.45 2.45 0 01.362-.254l1.514-.873a.27.27 0 01.268 0l2.1 1.21 1.697-.978zm-.323 4.972L6.86 9.81a.268.268 0 01-.134-.231V7.155l-1.698-.98v3.86a1.968 1.968 0 003.747.835 2.488 2.488 0 01-.4-.187zm.268-.464a1.967 1.967 0 002.685-.719 1.952 1.952 0 00-.09-2.106c-.112.094-.233.18-.361.253L7.53 9.577l1.113.642zm-4.106.257a1.974 1.974 0 01-1.87-.975A1.95 1.95 0 012.47 8.01c.136-.507.461-.93.916-1.193L4.5 6.175v3.86c0 .148.013.295.039.44zM11.329 4.5a1.973 1.973 0 00-1.87-.976c.025.145.039.292.039.44v1.747a.268.268 0 01-.135.232l-2.1 1.211v1.96l3.346-1.931a1.966 1.966 0 00.72-2.683z", + fill: color + } + ) + ); +}); +var ComponentDrivenIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M10.847 2.181L8.867.201a.685.685 0 00-.97 0l-4.81 4.81a.685.685 0 000 .969l2.466 2.465-2.405 2.404a.685.685 0 000 .97l1.98 1.98a.685.685 0 00.97 0l4.81-4.81a.685.685 0 000-.969L8.441 5.555l2.405-2.404a.685.685 0 000-.97z", + fill: color + } + ) + ); +}); +var DiscordIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.852 2.885c-.893-.41-1.85-.712-2.85-.884a.043.043 0 00-.046.021c-.123.22-.26.505-.355.73a10.658 10.658 0 00-3.2 0 7.377 7.377 0 00-.36-.73.045.045 0 00-.046-.021c-1 .172-1.957.474-2.85.884a.04.04 0 00-.019.016C.311 5.612-.186 8.257.058 10.869a.048.048 0 00.018.033 11.608 11.608 0 003.496 1.767.045.045 0 00.049-.016c.27-.368.51-.755.715-1.163a.044.044 0 00-.024-.062 7.661 7.661 0 01-1.092-.52.045.045 0 01-.005-.075c.074-.055.147-.112.217-.17a.043.043 0 01.046-.006c2.29 1.046 4.771 1.046 7.035 0a.043.043 0 01.046.006c.07.057.144.115.218.17a.045.045 0 01-.004.075 7.186 7.186 0 01-1.093.52.045.045 0 00-.024.062c.21.407.45.795.715 1.162.011.016.03.023.05.017a11.57 11.57 0 003.5-1.767.045.045 0 00.019-.032c.292-3.02-.49-5.643-2.07-7.969a.036.036 0 00-.018-.016zM4.678 9.279c-.69 0-1.258-.634-1.258-1.411 0-.778.558-1.411 1.258-1.411.707 0 1.27.639 1.259 1.41 0 .778-.558 1.412-1.259 1.412zm4.652 0c-.69 0-1.258-.634-1.258-1.411 0-.778.557-1.411 1.258-1.411.707 0 1.27.639 1.258 1.41 0 .778-.551 1.412-1.258 1.412z", + fill: color + } + ) + ); +}); +var FacebookIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7.399 14H5.06V7H3.5V4.588l1.56-.001-.002-1.421C5.058 1.197 5.533 0 7.6 0h1.721v2.413H8.246c-.805 0-.844.337-.844.966l-.003 1.208h1.934l-.228 2.412L7.401 7l-.002 7z", + fill: color + } + ) + ); +}); +var FigmaIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M9.2 0H4.803A2.603 2.603 0 003.41 4.802a2.603 2.603 0 000 4.396 2.602 2.602 0 103.998 2.199v-2.51a2.603 2.603 0 103.187-4.085A2.604 2.604 0 009.2 0zM7.407 7a1.793 1.793 0 103.586 0 1.793 1.793 0 00-3.586 0zm-.81 2.603H4.803a1.793 1.793 0 101.794 1.794V9.603zM4.803 4.397h1.794V.81H4.803a1.793 1.793 0 000 3.587zm0 .81a1.793 1.793 0 000 3.586h1.794V5.207H4.803zm4.397-.81H7.407V.81H9.2a1.794 1.794 0 010 3.587z", + fill: color + } + ) + ); +}); +var GDriveIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M6.37 8.768l-2.042 3.537h6.755l2.042-3.537H6.37zm6.177-1.003l-3.505-6.07H4.96l3.504 6.07h4.084zM4.378 2.7L.875 8.77l2.042 3.536L6.42 6.236 4.378 2.7z", + fill: color + } + ) + ); +}); +var GithubIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 0C3.132 0 0 3.132 0 7a6.996 6.996 0 004.786 6.641c.35.062.482-.149.482-.332 0-.166-.01-.718-.01-1.304-1.758.324-2.213-.429-2.353-.823-.079-.2-.42-.822-.717-.988-.246-.132-.596-.455-.01-.464.552-.009.946.508 1.077.717.63 1.06 1.636.762 2.039.578.061-.455.245-.761.446-.936-1.558-.175-3.185-.779-3.185-3.457 0-.76.271-1.39.717-1.88-.07-.176-.314-.893.07-1.856 0 0 .587-.183 1.925.718a6.495 6.495 0 011.75-.236c.595 0 1.19.078 1.75.236 1.34-.91 1.926-.718 1.926-.718.385.963.14 1.68.07 1.855.446.49.717 1.111.717 1.881 0 2.687-1.636 3.282-3.194 3.457.254.218.473.638.473 1.295 0 .936-.009 1.688-.009 1.925 0 .184.131.402.481.332A7.012 7.012 0 0014 7c0-3.868-3.133-7-7-7z", + fill: color + } + ) + ); +}); +var GitlabIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1.068 5.583l1.487-4.557a.256.256 0 01.487 0L4.53 5.583H1.068L7 13.15 4.53 5.583h4.941l-2.47 7.565 5.931-7.565H9.471l1.488-4.557a.256.256 0 01.486 0l1.488 4.557.75 2.3a.508.508 0 01-.185.568L7 13.148v.001H7L.503 8.452a.508.508 0 01-.186-.57l.75-2.299z", + fill: color + } + ) + ); +}); +var GoogleIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M10.925 1.094H7.262c-1.643 0-3.189 1.244-3.189 2.685 0 1.473 1.12 2.661 2.791 2.661.116 0 .23-.002.34-.01a1.49 1.49 0 00-.186.684c0 .41.22.741.498 1.012-.21 0-.413.006-.635.006-2.034 0-3.6 1.296-3.6 2.64 0 1.323 1.717 2.15 3.75 2.15 2.32 0 3.6-1.315 3.6-2.639 0-1.06-.313-1.696-1.28-2.38-.331-.235-.965-.805-.965-1.14 0-.392.112-.586.703-1.047.606-.474 1.035-1.14 1.035-1.914 0-.92-.41-1.819-1.18-2.115h1.161l.82-.593zm-1.335 8.96c.03.124.045.25.045.378 0 1.07-.688 1.905-2.665 1.905-1.406 0-2.421-.89-2.421-1.96 0-1.047 1.259-1.92 2.665-1.904.328.004.634.057.911.146.764.531 1.311.832 1.465 1.436zM7.34 6.068c-.944-.028-1.841-1.055-2.005-2.295-.162-1.24.47-2.188 1.415-2.16.943.029 1.84 1.023 2.003 2.262.163 1.24-.47 2.222-1.414 2.193z", + fill: color + } + ) + ); +}); +var GraphqlIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7.873 11.608a1.167 1.167 0 00-1.707-.027L3.46 10.018l.01-.04h7.072l.022.076-2.69 1.554zM6.166 2.42l.031.03-3.535 6.124a1.265 1.265 0 00-.043-.012V5.438a1.166 1.166 0 00.84-1.456L6.167 2.42zm4.387 1.562a1.165 1.165 0 00.84 1.456v3.124l-.043.012-3.536-6.123a1.2 1.2 0 00.033-.032l2.706 1.563zM3.473 9.42a1.168 1.168 0 00-.327-.568L6.68 2.73a1.17 1.17 0 00.652 0l3.536 6.123a1.169 1.169 0 00-.327.567H3.473zm8.79-.736a1.169 1.169 0 00-.311-.124V5.44a1.17 1.17 0 10-1.122-1.942L8.13 1.938a1.168 1.168 0 00-1.122-1.5 1.17 1.17 0 00-1.121 1.5l-2.702 1.56a1.168 1.168 0 00-1.86.22 1.17 1.17 0 00.739 1.722v3.12a1.168 1.168 0 00-.74 1.721 1.17 1.17 0 001.861.221l2.701 1.56a1.169 1.169 0 102.233-.035l2.687-1.552a1.168 1.168 0 101.457-1.791z", + fill: color + } + ) + ); +}); +var MediumIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M0 0v14h14V0H0zm11.63 3.317l-.75.72a.22.22 0 00-.083.212v-.001 5.289a.22.22 0 00.083.21l.733.72v.159H7.925v-.158l.76-.738c.074-.074.074-.096.074-.21V5.244l-2.112 5.364h-.285l-2.46-5.364V8.84a.494.494 0 00.136.413h.001l.988 1.198v.158H2.226v-.158l.988-1.198a.477.477 0 00.126-.416v.003-4.157a.363.363 0 00-.118-.307l-.878-1.058v-.158h2.727l2.107 4.622L9.031 3.16h2.6v.158z", + fill: color + } + ) + ); +}); +var ReduxIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M4.06 9.689c.016.49.423.88.912.88h.032a.911.911 0 00.88-.945.916.916 0 00-.912-.88h-.033c-.033 0-.08 0-.113.016-.669-1.108-.946-2.314-.848-3.618.065-.978.391-1.825.961-2.526.473-.603 1.386-.896 2.005-.913 1.728-.032 2.461 2.119 2.51 2.983.212.049.57.163.815.244C10.073 2.29 8.444.92 6.88.92c-1.467 0-2.82 1.06-3.357 2.625-.75 2.086-.261 4.09.651 5.671a.74.74 0 00-.114.473zm8.279-2.298c-1.239-1.45-3.064-2.249-5.15-2.249h-.261a.896.896 0 00-.798-.489h-.033A.912.912 0 006.13 6.48h.031a.919.919 0 00.8-.554h.293c1.239 0 2.412.358 3.472 1.059.814.538 1.401 1.238 1.727 2.086.277.684.261 1.353-.033 1.923-.456.864-1.222 1.337-2.232 1.337a4.16 4.16 0 01-1.597-.343 9.58 9.58 0 01-.734.587c.7.326 1.418.505 2.102.505 1.565 0 2.722-.863 3.162-1.727.473-.946.44-2.575-.782-3.961zm-7.433 5.51a4.005 4.005 0 01-.977.113c-1.206 0-2.298-.505-2.836-1.32C.376 10.603.13 8.289 2.494 6.577c.05.261.147.62.212.832-.31.228-.798.685-1.108 1.303-.44.864-.391 1.729.13 2.527.359.537.93.864 1.663.962.896.114 1.793-.05 2.657-.505 1.271-.669 2.119-1.467 2.672-2.56a.944.944 0 01-.26-.603.913.913 0 01.88-.945h.033a.915.915 0 01.098 1.825c-.897 1.842-2.478 3.08-4.565 3.488z", + fill: color + } + ) + ); +}); +var TwitterIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 2.547a5.632 5.632 0 01-1.65.464 2.946 2.946 0 001.263-1.63 5.67 5.67 0 01-1.823.715 2.837 2.837 0 00-2.097-.93c-1.586 0-2.872 1.319-2.872 2.946 0 .23.025.456.074.67C4.508 4.66 2.392 3.488.975 1.706c-.247.435-.389.941-.389 1.481 0 1.022.507 1.923 1.278 2.452a2.806 2.806 0 01-1.3-.368l-.001.037c0 1.427.99 2.617 2.303 2.888a2.82 2.82 0 01-1.297.05c.366 1.17 1.427 2.022 2.683 2.045A5.671 5.671 0 010 11.51a7.985 7.985 0 004.403 1.323c5.283 0 8.172-4.488 8.172-8.38 0-.128-.003-.255-.009-.38A5.926 5.926 0 0014 2.546z", + fill: color + } + ) + ); +}); +var YoutubeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M13.99 8.172c.005-.281.007-.672.007-1.172 0-.5-.002-.89-.007-1.172a14.952 14.952 0 00-.066-1.066 9.638 9.638 0 00-.169-1.153c-.083-.38-.264-.7-.542-.96a1.667 1.667 0 00-.972-.454C11.084 2.065 9.337 2 6.999 2s-4.085.065-5.241.195a1.65 1.65 0 00-.969.453c-.276.26-.455.58-.539.961a8.648 8.648 0 00-.176 1.153c-.039.43-.061.785-.066 1.066C.002 6.11 0 6.5 0 7c0 .5.002.89.008 1.172.005.281.027.637.066 1.067.04.43.095.813.168 1.152.084.38.265.7.543.96.279.261.603.412.973.453 1.156.13 2.902.196 5.24.196 2.34 0 4.087-.065 5.243-.196a1.65 1.65 0 00.967-.453c.276-.26.456-.58.54-.96.077-.339.136-.722.175-1.152.04-.43.062-.786.067-1.067zM9.762 6.578A.45.45 0 019.997 7a.45.45 0 01-.235.422l-3.998 2.5a.442.442 0 01-.266.078.538.538 0 01-.242-.063.465.465 0 01-.258-.437v-5c0-.197.086-.343.258-.437a.471.471 0 01.508.016l3.998 2.5z", + fill: color + } + ) + ); +}); +var VSCodeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M10.243.04a.87.87 0 01.38.087l2.881 1.386a.874.874 0 01.496.79V11.713a.875.875 0 01-.496.775l-2.882 1.386a.872.872 0 01-.994-.17L4.11 8.674l-2.404 1.823a.583.583 0 01-.744-.034l-.771-.7a.583.583 0 010-.862L2.274 7 .19 5.1a.583.583 0 010-.862l.772-.701a.583.583 0 01.744-.033L4.11 5.327 9.628.296a.871.871 0 01.615-.255zm.259 3.784L6.315 7l4.187 3.176V3.824z", + fill: color + } + ) + ); +}); +var LinkedinIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11.667 13H2.333A1.333 1.333 0 011 11.667V2.333C1 1.597 1.597 1 2.333 1h9.334C12.403 1 13 1.597 13 2.333v9.334c0 .736-.597 1.333-1.333 1.333zm-2.114-1.667h1.78V7.675c0-1.548-.877-2.296-2.102-2.296-1.226 0-1.742.955-1.742.955v-.778H5.773v5.777h1.716V8.3c0-.812.374-1.296 1.09-1.296.658 0 .974.465.974 1.296v3.033zm-6.886-7.6c0 .589.474 1.066 1.058 1.066.585 0 1.058-.477 1.058-1.066 0-.589-.473-1.066-1.058-1.066-.584 0-1.058.477-1.058 1.066zm1.962 7.6h-1.79V5.556h1.79v5.777z", + fill: color + } + ) + ); +}); +var XIcon = /* @__PURE__ */ React255.forwardRef( + ({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.02.446h2.137L8.49 5.816l5.51 7.28H9.67L6.298 8.683l-3.88 4.413H.282l5.004-5.735L0 .446h4.442l3.064 4.048L11.02.446zm-.759 11.357h1.18L3.796 1.655H2.502l7.759 10.148z", + fill: color + } + ) + ); + } +); +var BrowserIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M.5 13.004a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h13a.5.5 0 01.5.5v11a.5.5 0 01-.5.5H.5zm.5-1v-8h12v8H1zm1-9.5a.5.5 0 11-1 0 .5.5 0 011 0zm2 0a.5.5 0 11-1 0 .5.5 0 011 0zm2 0a.5.5 0 11-1 0 .5.5 0 011 0z", + fill: color + } + ) + ); +}); +var TabletIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.5.004a1.5 1.5 0 00-1.5 1.5v11a1.5 1.5 0 001.5 1.5h7a1.5 1.5 0 001.5-1.5v-11a1.5 1.5 0 00-1.5-1.5h-7zm0 1h7a.5.5 0 01.5.5v9.5H3v-9.5a.5.5 0 01.5-.5zm2.5 11a.5.5 0 000 1h2a.5.5 0 000-1H6z", + fill: color + } + ) + ); +}); +var MobileIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3 1.504a1.5 1.5 0 011.5-1.5h5a1.5 1.5 0 011.5 1.5v11a1.5 1.5 0 01-1.5 1.5h-5a1.5 1.5 0 01-1.5-1.5v-11zm1 10.5v-10h6v10H4z", + fill: color + } + ) + ); +}); +var WatchIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M4 .504a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zm5.5 2.5h-5a.5.5 0 00-.5.5v7a.5.5 0 00.5.5h5a.5.5 0 00.5-.5v-7a.5.5 0 00-.5-.5zm-5-1a1.5 1.5 0 00-1.5 1.5v7a1.5 1.5 0 001.5 1.5h5a1.5 1.5 0 001.5-1.5v-7a1.5 1.5 0 00-1.5-1.5h-5zm2.5 2a.5.5 0 01.5.5v2h1a.5.5 0 110 1H7a.5.5 0 01-.5-.5v-2.5a.5.5 0 01.5-.5zm-2.5 9a.5.5 0 000 1h5a.5.5 0 000-1h-5z", + fill: color + } + ) + ); +}); +var SidebarIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2.5 4.504a.5.5 0 01.5-.5h1a.5.5 0 110 1H3a.5.5 0 01-.5-.5zM3 6.004a.5.5 0 100 1h1a.5.5 0 000-1H3zM2.5 8.504a.5.5 0 01.5-.5h1a.5.5 0 110 1H3a.5.5 0 01-.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1.5 13.004a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11zm.5-1v-10h3v10H2zm4-10h6v10H6v-10z", + fill: color + } + ) + ); +}); +var SidebarAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M9.5 4.504a.5.5 0 01.5-.5h1a.5.5 0 010 1h-1a.5.5 0 01-.5-.5zM10 6.004a.5.5 0 100 1h1a.5.5 0 000-1h-1zM9.5 8.504a.5.5 0 01.5-.5h1a.5.5 0 010 1h-1a.5.5 0 01-.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1.5 13.004a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11zm.5-1v-10h6v10H2zm7-10h3v10H9v-10z", + fill: color + } + ) + ); +}); +var SidebarAltToggleIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.5 4.504a.5.5 0 00-.5-.5h-1a.5.5 0 100 1h1a.5.5 0 00.5-.5zM11 6.004a.5.5 0 010 1h-1a.5.5 0 010-1h1zM11.5 8.504a.5.5 0 00-.5-.5h-1a.5.5 0 100 1h1a.5.5 0 00.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1.5 13.004a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11zm7.5-1h3v-10H9v10zm-1 0H2v-10h6v4.5H5.207l.65-.65a.5.5 0 10-.707-.708L3.646 6.65a.5.5 0 000 .707l1.497 1.497a.5.5 0 10.707-.708l-.643-.642H8v4.5z", + fill: color + } + ) + ); +}); +var SidebarToggleIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.5 4.504a.5.5 0 01.5-.5h1a.5.5 0 110 1H2a.5.5 0 01-.5-.5zM2 6.004a.5.5 0 100 1h1a.5.5 0 000-1H2zM1.5 8.504a.5.5 0 01.5-.5h1a.5.5 0 110 1H2a.5.5 0 01-.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M.5 13.004a.5.5 0 01-.5-.5v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5H.5zm.5-1v-10h3v10H1zm4 0v-4.5h2.793l-.643.642a.5.5 0 10.707.708l1.497-1.497a.5.5 0 000-.707L7.85 5.146a.5.5 0 10-.707.708l.65.65H5v-4.5h6v10H5z", + fill: color + } + ) + ); +}); +var BottomBarIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3 10.504a.5.5 0 01.5-.5h1a.5.5 0 010 1h-1a.5.5 0 01-.5-.5zM6.5 10.004a.5.5 0 000 1h1a.5.5 0 000-1h-1zM9 10.504a.5.5 0 01.5-.5h1a.5.5 0 010 1h-1a.5.5 0 01-.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 1.504a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11zm1 6.5v-6h10v6H2zm10 1v3H2v-3h10z", + fill: color + } + ) + ); +}); +var BottomBarToggleIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3.5 10.004a.5.5 0 000 1h1a.5.5 0 000-1h-1zM6 10.504a.5.5 0 01.5-.5h1a.5.5 0 010 1h-1a.5.5 0 01-.5-.5zM9.5 10.004a.5.5 0 000 1h1a.5.5 0 000-1h-1z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 12.504v-11a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5zm1-.5v-3h10v3H2zm4.5-4H2v-6h10v6H7.5V5.21l.646.646a.5.5 0 10.708-.707l-1.5-1.5a.5.5 0 00-.708 0l-1.5 1.5a.5.5 0 10.708.707l.646-.646v2.793z", + fill: color + } + ) + ); +}); +var CPUIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M5 5.504a.5.5 0 01.5-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5v-3zm1 2.5v-2h2v2H6z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M5.5.004a.5.5 0 01.5.5v1.5h2v-1.5a.5.5 0 011 0v1.5h2.5a.5.5 0 01.5.5v2.5h1.5a.5.5 0 010 1H12v2h1.5a.5.5 0 010 1H12v2.5a.5.5 0 01-.5.5H9v1.5a.5.5 0 01-1 0v-1.5H6v1.5a.5.5 0 01-1 0v-1.5H2.5a.5.5 0 01-.5-.5v-2.5H.5a.5.5 0 010-1H2v-2H.5a.5.5 0 010-1H2v-2.5a.5.5 0 01.5-.5H5v-1.5a.5.5 0 01.5-.5zm5.5 3H3v8h8v-8z", + fill: color + } + ) + ); +}); +var DatabaseIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M12 3c0-1.105-2.239-2-5-2s-5 .895-5 2v8c0 .426.26.752.544.977.29.228.68.413 1.116.558.878.293 2.059.465 3.34.465 1.281 0 2.462-.172 3.34-.465.436-.145.825-.33 1.116-.558.285-.225.544-.551.544-.977V3zm-1.03 0a.787.787 0 00-.05-.052c-.13-.123-.373-.28-.756-.434C9.404 2.21 8.286 2 7 2c-1.286 0-2.404.21-3.164.514-.383.153-.625.31-.756.434A.756.756 0 003.03 3a.756.756 0 00.05.052c.13.123.373.28.756.434C4.596 3.79 5.714 4 7 4c1.286 0 2.404-.21 3.164-.514.383-.153.625-.31.756-.434A.787.787 0 0010.97 3zM11 5.75V4.2c-.912.486-2.364.8-4 .8-1.636 0-3.088-.314-4-.8v1.55l.002.008a.147.147 0 00.016.033.618.618 0 00.145.15c.165.13.435.27.813.395.751.25 1.82.414 3.024.414s2.273-.163 3.024-.414c.378-.126.648-.265.813-.395a.62.62 0 00.146-.15.149.149 0 00.015-.033A.03.03 0 0011 5.75zM3 7.013c.2.103.423.193.66.272.878.293 2.059.465 3.34.465 1.281 0 2.462-.172 3.34-.465.237-.079.46-.17.66-.272V8.5l-.002.008a.149.149 0 01-.015.033.62.62 0 01-.146.15c-.165.13-.435.27-.813.395-.751.25-1.82.414-3.024.414s-2.273-.163-3.024-.414c-.378-.126-.648-.265-.813-.395a.618.618 0 01-.145-.15.147.147 0 01-.016-.033A.027.027 0 013 8.5V7.013zm0 2.75V11l.002.008a.147.147 0 00.016.033.617.617 0 00.145.15c.165.13.435.27.813.395.751.25 1.82.414 3.024.414s2.273-.163 3.024-.414c.378-.126.648-.265.813-.395a.619.619 0 00.146-.15.148.148 0 00.015-.033L11 11V9.763c-.2.103-.423.193-.66.272-.878.293-2.059.465-3.34.465-1.281 0-2.462-.172-3.34-.465A4.767 4.767 0 013 9.763z", + fill: color + } + ) + ); +}); +var MemoryIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5 3a.5.5 0 00-1 0v3a.5.5 0 001 0V3zM7 2.5a.5.5 0 01.5.5v3a.5.5 0 01-1 0V3a.5.5 0 01.5-.5zM10 4.504a.5.5 0 10-1 0V6a.5.5 0 001 0V4.504z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M12 3.54l-.001-.002a.499.499 0 00-.145-.388l-3-3a.499.499 0 00-.388-.145L8.464.004H2.5a.5.5 0 00-.5.5v13a.5.5 0 00.5.5h9a.5.5 0 00.5-.5V3.54zM3 1.004h5.293L11 3.71v5.293H3v-8zm0 9v3h8v-3H3z", + fill: color + } + ) + ); +}); +var StructureIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M8.164 3.446a1.5 1.5 0 10-2.328 0L1.81 10.032A1.503 1.503 0 000 11.5a1.5 1.5 0 002.915.5h8.17a1.5 1.5 0 101.104-1.968L8.164 3.446zm-1.475.522a1.506 1.506 0 00.622 0l4.025 6.586a1.495 1.495 0 00-.25.446H2.914a1.497 1.497 0 00-.25-.446l4.024-6.586z", + fill: color + } + ) + ); +}); +var BoxIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7.21.046l6.485 2.994A.5.5 0 0114 3.51v6.977a.495.495 0 01-.23.432.481.481 0 01-.071.038L7.23 13.944a.499.499 0 01-.46 0L.3 10.958a.498.498 0 01-.3-.47V3.511a.497.497 0 01.308-.473L6.78.051a.499.499 0 01.43-.005zM1 4.282v5.898l5.5 2.538V6.82L1 4.282zm6.5 8.436L13 10.18V4.282L7.5 6.82v5.898zM12.307 3.5L7 5.95 1.693 3.5 7 1.05l5.307 2.45z", + fill: color + } + ) + ); +}); +var PowerIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("path", { d: "M7.5.5a.5.5 0 00-1 0v6a.5.5 0 001 0v-6z", fill: color }), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4.273 2.808a.5.5 0 00-.546-.837 6 6 0 106.546 0 .5.5 0 00-.546.837 5 5 0 11-5.454 0z", + fill: color + } + ) + ); +}); +var EditIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M13.854 2.146l-2-2a.5.5 0 00-.708 0l-1.5 1.5-8.995 8.995a.499.499 0 00-.143.268L.012 13.39a.495.495 0 00.135.463.5.5 0 00.462.134l2.482-.496a.495.495 0 00.267-.143l8.995-8.995 1.5-1.5a.5.5 0 000-.708zM12 3.293l.793-.793L11.5 1.207 10.707 2 12 3.293zm-2-.586L1.707 11 3 12.293 11.293 4 10 2.707zM1.137 12.863l.17-.849.679.679-.849.17z", + fill: color + } + ) + ); +}); +var CogIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5.586 5.586A2 2 0 018.862 7.73a.5.5 0 10.931.365 3 3 0 10-1.697 1.697.5.5 0 10-.365-.93 2 2 0 01-2.145-3.277z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M.939 6.527c.127.128.19.297.185.464a.635.635 0 01-.185.465L0 8.395a7.099 7.099 0 001.067 2.572h1.32c.182 0 .345.076.46.197a.635.635 0 01.198.46v1.317A7.097 7.097 0 005.602 14l.94-.94a.634.634 0 01.45-.186H7.021c.163 0 .326.061.45.186l.939.938a7.098 7.098 0 002.547-1.057V11.61c0-.181.075-.344.197-.46a.634.634 0 01.46-.197h1.33c.507-.76.871-1.622 1.056-2.55l-.946-.946a.635.635 0 01-.186-.465.635.635 0 01.186-.464l.943-.944a7.099 7.099 0 00-1.044-2.522h-1.34a.635.635 0 01-.46-.197.635.635 0 01-.196-.46V1.057A7.096 7.096 0 008.413.002l-.942.942a.634.634 0 01-.45.186H6.992a.634.634 0 01-.45-.186L5.598 0a7.097 7.097 0 00-2.553 1.058v1.33c0 .182-.076.345-.197.46a.635.635 0 01-.46.198h-1.33A7.098 7.098 0 00.003 5.591l.936.936zm.707 1.636c.324-.324.482-.752.479-1.172a1.634 1.634 0 00-.48-1.171l-.538-.539c.126-.433.299-.847.513-1.235h.768c.459 0 .873-.19 1.167-.49.3-.295.49-.708.49-1.167v-.77c.39-.215.807-.388 1.243-.515l.547.547c.32.32.742.48 1.157.48l.015-.001h.014c.415 0 .836-.158 1.157-.479l.545-.544c.433.126.846.299 1.234.512v.784c0 .46.19.874.49 1.168.294.3.708.49 1.167.49h.776c.209.382.378.788.502 1.213l-.545.546a1.635 1.635 0 00-.48 1.17c-.003.421.155.849.48 1.173l.549.55c-.126.434-.3.85-.513 1.239h-.77c-.458 0-.872.19-1.166.49-.3.294-.49.708-.49 1.167v.77a6.09 6.09 0 01-1.238.514l-.54-.54a1.636 1.636 0 00-1.158-.48H6.992c-.415 0-.837.159-1.157.48l-.543.543a6.091 6.091 0 01-1.247-.516v-.756c0-.459-.19-.873-.49-1.167-.294-.3-.708-.49-1.167-.49h-.761a6.094 6.094 0 01-.523-1.262l.542-.542z", + fill: color + } + ) + ); +}); +var NutIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5.585 8.414a2 2 0 113.277-.683.5.5 0 10.931.365 3 3 0 10-1.697 1.697.5.5 0 00-.365-.93 2 2 0 01-2.146-.449z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M6.5.289a1 1 0 011 0l5.062 2.922a1 1 0 01.5.866v5.846a1 1 0 01-.5.866L7.5 13.71a1 1 0 01-1 0L1.437 10.79a1 1 0 01-.5-.866V4.077a1 1 0 01.5-.866L6.5.29zm.5.866l5.062 2.922v5.846L7 12.845 1.937 9.923V4.077L7 1.155z", + fill: color + } + ) + ); +}); +var WrenchIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M10.5 1c.441 0 .564.521.252.833l-.806.807a.51.51 0 000 .72l.694.694a.51.51 0 00.72 0l.807-.806c.312-.312.833-.19.833.252a2.5 2.5 0 01-3.414 2.328l-6.879 6.88a1 1 0 01-1.414-1.415l6.88-6.88A2.5 2.5 0 0110.5 1zM2 12.5a.5.5 0 100-1 .5.5 0 000 1z", + fill: color + } + ) + ); +}); +var EllipsisIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4 7a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM13 7a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM7 8.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z", + fill: color + } + ) + ); +}); +var WandIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5.903.112a.107.107 0 01.194 0l.233.505.552.066c.091.01.128.123.06.185l-.408.377.109.546a.107.107 0 01-.158.114L6 1.633l-.486.272a.107.107 0 01-.157-.114l.108-.546-.408-.377a.107.107 0 01.06-.185L5.67.617l.233-.505zM2.194.224a.214.214 0 00-.389 0l-.466 1.01-1.104.13a.214.214 0 00-.12.371l.816.755-.217 1.091a.214.214 0 00.315.23L2 3.266l.971.543c.16.09.35-.05.315-.229l-.217-1.09.817-.756a.214.214 0 00-.12-.37L2.66 1.234 2.194.224zM12.194 8.224a.214.214 0 00-.389 0l-.466 1.01-1.104.13a.214.214 0 00-.12.371l.816.755-.217 1.091a.214.214 0 00.315.23l.97-.544.971.543c.16.09.35-.05.315-.229l-.217-1.09.817-.756a.214.214 0 00-.12-.37l-1.105-.131-.466-1.01z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M.147 11.857a.5.5 0 010-.707l11-11a.5.5 0 01.706 0l2 2a.5.5 0 010 .708l-11 11a.5.5 0 01-.706 0l-2-2zm2.353.94l-1.293-1.293 6.758-6.758L9.258 6.04 2.5 12.797zm7.465-7.465l2.828-2.828L11.5 1.211 8.672 4.039l1.293 1.293z", + fill: color + } + ) + ); +}); +var SweepIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M9.621 3.914l.379.379 3.146-3.147a.5.5 0 01.708.708L10.707 5l.379.379a3 3 0 010 4.242l-.707.707-.005.005-.008.008-.012.013-1.733 1.732a3 3 0 01-4.242 0L.146 7.854a.5.5 0 01.708-.707.915.915 0 001.292 0L4.64 4.654a.52.52 0 01.007-.008l.733-.732a3 3 0 014.242 0zm-4.26 1.432l.139-.139 3.146 3.147a.5.5 0 10.708-.707L6.212 4.505a2 2 0 012.702.116l.731.731.001.002h.002l.73.732a2 2 0 010 2.828l-.706.707-.012.013a.503.503 0 00-.014.013l-1.732 1.732a2 2 0 01-2.828 0L3.354 9.647a2.489 2.489 0 001.414-.708l1.086-1.085a.5.5 0 10-.708-.707L4.061 8.232a1.5 1.5 0 01-2.01.102c.294-.088.57-.248.803-.48l2.5-2.5a.475.475 0 00.007-.008z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2 5.004a1 1 0 11-2 0 1 1 0 012 0zM4 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0z", + fill: color + } + ) + ); +}); +var CheckIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M13.854 3.354a.5.5 0 00-.708-.708L5 10.793.854 6.646a.5.5 0 10-.708.708l4.5 4.5a.5.5 0 00.708 0l8.5-8.5z", + fill: color + } + ) + ); +}); +var FormIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1V6.393a.5.5 0 00-1 0v5.61H2v-10h7.5a.5.5 0 000-1H2z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M6.354 9.857l7.5-7.5a.5.5 0 00-.708-.707L6 8.797 3.854 6.65a.5.5 0 10-.708.707l2.5 2.5a.5.5 0 00.708 0z", + fill: color + } + ) + ); +}); +var BatchDenyIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.5 2a.5.5 0 000 1h2a.5.5 0 000-1h-2zM8.854 2.646a.5.5 0 010 .708L5.207 7l3.647 3.646a.5.5 0 01-.708.708L4.5 7.707.854 11.354a.5.5 0 01-.708-.708L3.793 7 .146 3.354a.5.5 0 11.708-.708L4.5 6.293l3.646-3.647a.5.5 0 01.708 0zM11 7a.5.5 0 01.5-.5h2a.5.5 0 010 1h-2A.5.5 0 0111 7zM11.5 11a.5.5 0 000 1h2a.5.5 0 000-1h-2z", + fill: color + } + ) + ); +}); +var BatchAcceptIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.5 2a.5.5 0 000 1h2a.5.5 0 000-1h-2zM9.3 2.6a.5.5 0 01.1.7l-5.995 7.993a.505.505 0 01-.37.206.5.5 0 01-.395-.152L.146 8.854a.5.5 0 11.708-.708l2.092 2.093L8.6 2.7a.5.5 0 01.7-.1zM11 7a.5.5 0 01.5-.5h2a.5.5 0 010 1h-2A.5.5 0 0111 7zM11.5 11a.5.5 0 000 1h2a.5.5 0 000-1h-2z", + fill: color + } + ) + ); +}); +var ControlsIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M10.5 1a.5.5 0 01.5.5V2h1.5a.5.5 0 010 1H11v.5a.5.5 0 01-1 0V3H1.5a.5.5 0 010-1H10v-.5a.5.5 0 01.5-.5zM1.5 11a.5.5 0 000 1H10v.5a.5.5 0 001 0V12h1.5a.5.5 0 000-1H11v-.5a.5.5 0 00-1 0v.5H1.5zM1 7a.5.5 0 01.5-.5H3V6a.5.5 0 011 0v.5h8.5a.5.5 0 010 1H4V8a.5.5 0 01-1 0v-.5H1.5A.5.5 0 011 7z", + fill: color + } + ) + ); +}); +var PlusIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7 1a.5.5 0 01.5.5v5h5a.5.5 0 010 1h-5v5a.5.5 0 01-1 0v-5h-5a.5.5 0 010-1h5v-5A.5.5 0 017 1z", + fill: color + } + ) + ); +}); +var CloseAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2.03.97A.75.75 0 00.97 2.03L5.94 7 .97 11.97a.75.75 0 101.06 1.06L7 8.06l4.97 4.97a.75.75 0 101.06-1.06L8.06 7l4.97-4.97A.75.75 0 0011.97.97L7 5.94 2.03.97z", + fill: color + } + ) + ); +}); +var CrossIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.146 2.146a.5.5 0 11.707.707L7.708 7l4.147 4.146a.5.5 0 11-.707.707L7 7.708l-4.146 4.147a.5.5 0 01-.707-.708L6.293 7 2.147 2.853a.5.5 0 11.707-.707L7 6.293l4.146-4.147z", + fill: color + } + ) + ); +}); +var TrashIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5.5 4.5A.5.5 0 016 5v5a.5.5 0 01-1 0V5a.5.5 0 01.5-.5zM9 5a.5.5 0 00-1 0v5a.5.5 0 001 0V5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M4.5.5A.5.5 0 015 0h4a.5.5 0 01.5.5V2h3a.5.5 0 010 1H12v8a2 2 0 01-2 2H4a2 2 0 01-2-2V3h-.5a.5.5 0 010-1h3V.5zM3 3v8a1 1 0 001 1h6a1 1 0 001-1V3H3zm2.5-2h3v1h-3V1z", + fill: color + } + ) + ); +}); +var PinAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3502)" }, /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M13.44 4.44L9.56.56a1.5 1.5 0 00-2.12 0L7 1a1.415 1.415 0 000 2L5 5H3.657A4 4 0 00.828 6.17l-.474.475a.5.5 0 000 .707l2.793 2.793-3 3a.5.5 0 00.707.708l3-3 2.792 2.792a.5.5 0 00.708 0l.474-.475A4 4 0 009 10.343V9l2-2a1.414 1.414 0 002 0l.44-.44a1.5 1.5 0 000-2.12zM11 5.585l-3 3v1.757a3 3 0 01-.879 2.121L7 12.586 1.414 7l.122-.122A3 3 0 013.656 6h1.758l3-3-.707-.707a.414.414 0 010-.586l.44-.44a.5.5 0 01.707 0l3.878 3.88a.5.5 0 010 .706l-.44.44a.414.414 0 01-.585 0L11 5.586z", + fill: color + } + )), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_1107_3502" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var UnpinIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3501)", fill: color }, /* @__PURE__ */ React255.createElement("path", { d: "M13.44 4.44L9.56.56a1.5 1.5 0 00-2.12 0L7 1a1.415 1.415 0 000 2L5.707 4.293 6.414 5l2-2-.707-.707a.414.414 0 010-.586l.44-.44a.5.5 0 01.707 0l3.878 3.88a.5.5 0 010 .706l-.44.44a.414.414 0 01-.585 0L11 5.586l-2 2 .707.707L11 7a1.414 1.414 0 002 0l.44-.44a1.5 1.5 0 000-2.12zM.828 6.171a4 4 0 012.758-1.17l1 .999h-.93a3 3 0 00-2.12.878L1.414 7 7 12.586l.121-.122A3 3 0 008 10.343v-.929l1 1a4 4 0 01-1.172 2.757l-.474.475a.5.5 0 01-.708 0l-2.792-2.792-3 3a.5.5 0 01-.708-.708l3-3L.355 7.353a.5.5 0 010-.707l.474-.475zM1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.708-.708l-11-11z" })), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_1107_3501" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var AddIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7 3a.5.5 0 01.5.5v3h3a.5.5 0 010 1h-3v3a.5.5 0 01-1 0v-3h-3a.5.5 0 010-1h3v-3A.5.5 0 017 3z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z", + fill: color + } + ) + ); +}); +var SubtractIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("path", { d: "M3.5 6.5a.5.5 0 000 1h7a.5.5 0 000-1h-7z", fill: color }), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z", + fill: color + } + ) + ); +}); +var CloseIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M9.854 4.146a.5.5 0 010 .708L7.707 7l2.147 2.146a.5.5 0 01-.708.708L7 7.707 4.854 9.854a.5.5 0 01-.708-.708L6.293 7 4.146 4.854a.5.5 0 11.708-.708L7 6.293l2.146-2.147a.5.5 0 01.708 0z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z", + fill: color + } + ) + ); +}); +var DeleteIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0a6 6 0 01-9.874 4.582l8.456-8.456A5.976 5.976 0 0113 7zM2.418 10.874l8.456-8.456a6 6 0 00-8.456 8.456z", + fill: color + } + ) + ); +}); +var PassedIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 14A7 7 0 107 0a7 7 0 000 14zm3.854-9.354a.5.5 0 010 .708l-4.5 4.5a.5.5 0 01-.708 0l-2.5-2.5a.5.5 0 11.708-.708L6 8.793l4.146-4.147a.5.5 0 01.708 0z", + fill: color + } + ) + ); +}); +var ChangedIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 14A7 7 0 107 0a7 7 0 000 14zM3.5 6.5a.5.5 0 000 1h7a.5.5 0 000-1h-7z", + fill: color + } + ) + ); +}); +var FailedIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 14A7 7 0 107 0a7 7 0 000 14zm2.854-9.854a.5.5 0 010 .708L7.707 7l2.147 2.146a.5.5 0 01-.708.708L7 7.707 4.854 9.854a.5.5 0 01-.708-.708L6.293 7 4.146 4.854a.5.5 0 11.708-.708L7 6.293l2.146-2.147a.5.5 0 01.708 0z", + fill: color + } + ) + ); +}); +var ClearIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M5 2h7a2 2 0 012 2v6a2 2 0 01-2 2H5a1.994 1.994 0 01-1.414-.586l-3-3a2 2 0 010-2.828l3-3A1.994 1.994 0 015 2zm1.146 3.146a.5.5 0 01.708 0L8 6.293l1.146-1.147a.5.5 0 11.708.708L8.707 7l1.147 1.146a.5.5 0 01-.708.708L8 7.707 6.854 8.854a.5.5 0 11-.708-.708L7.293 7 6.146 5.854a.5.5 0 010-.708z", + fill: color + } + ) + ); +}); +var CommentIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3.5 5.004a.5.5 0 100 1h7a.5.5 0 000-1h-7zM3 8.504a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7a.5.5 0 01-.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M12.5 12.004H5.707l-1.853 1.854a.5.5 0 01-.351.146h-.006a.499.499 0 01-.497-.5v-1.5H1.5a.5.5 0 01-.5-.5v-9a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v9a.5.5 0 01-.5.5zm-10.5-1v-8h10v8H2z", + fill: color + } + ) + ); +}); +var CommentAddIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7.5 5.004a.5.5 0 10-1 0v1.5H5a.5.5 0 100 1h1.5v1.5a.5.5 0 001 0v-1.5H9a.5.5 0 000-1H7.5v-1.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.691 13.966a.498.498 0 01-.188.038h-.006a.499.499 0 01-.497-.5v-1.5H1.5a.5.5 0 01-.5-.5v-9a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v9a.5.5 0 01-.5.5H5.707l-1.853 1.854a.5.5 0 01-.163.108zM2 3.004v8h10v-8H2z", + fill: color + } + ) + ); +}); +var RequestChangeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M9.854 6.65a.5.5 0 010 .707l-2 2a.5.5 0 11-.708-.707l1.15-1.15-3.796.004a.5.5 0 010-1L8.29 6.5 7.145 5.357a.5.5 0 11.708-.707l2 2z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.691 13.966a.498.498 0 01-.188.038h-.006a.499.499 0 01-.497-.5v-1.5H1.5a.5.5 0 01-.5-.5v-9a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v9a.5.5 0 01-.5.5H5.707l-1.853 1.854a.5.5 0 01-.163.108zM2 3.004v8h10v-8H2z", + fill: color + } + ) + ); +}); +var CommentsIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M8.5 7.004a.5.5 0 000-1h-5a.5.5 0 100 1h5zM9 8.504a.5.5 0 01-.5.5h-5a.5.5 0 010-1h5a.5.5 0 01.5.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M12 11.504v-1.5h1.5a.5.5 0 00.5-.5v-8a.5.5 0 00-.5-.5h-11a.5.5 0 00-.5.5v1.5H.5a.5.5 0 00-.5.5v8a.5.5 0 00.5.5H2v1.5a.499.499 0 00.497.5h.006a.498.498 0 00.35-.146l1.854-1.854H11.5a.5.5 0 00.5-.5zm-9-8.5v-1h10v7h-1v-5.5a.5.5 0 00-.5-.5H3zm-2 8v-7h10v7H1z", + fill: color + } + ) + ); +}); +var ChatIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 2a2 2 0 012-2h8a2 2 0 012 2v8a2 2 0 01-2 2H6.986a.444.444 0 01-.124.103l-3.219 1.84A.43.43 0 013 13.569V12a2 2 0 01-2-2V2zm3.42 4.78a.921.921 0 110-1.843.921.921 0 010 1.842zm1.658-.922a.921.921 0 101.843 0 .921.921 0 00-1.843 0zm2.58 0a.921.921 0 101.842 0 .921.921 0 00-1.843 0z", + fill: color + } + ) + ); +}); +var LockIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M8 8.004a1 1 0 01-.5.866v1.634a.5.5 0 01-1 0V8.87A1 1 0 118 8.004z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3 4.004a4 4 0 118 0v1h1.5a.5.5 0 01.5.5v8a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-8a.5.5 0 01.5-.5H3v-1zm7 1v-1a3 3 0 10-6 0v1h6zm2 1H2v7h10v-7z", + fill: color + } + ) + ); +}); +var UnlockIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3614)", fill: color }, /* @__PURE__ */ React255.createElement("path", { d: "M6.5 8.87a1 1 0 111 0v1.634a.5.5 0 01-1 0V8.87z" }), /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 1a3 3 0 00-3 3v1.004h8.5a.5.5 0 01.5.5v8a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-8a.5.5 0 01.5-.5H3V4a4 4 0 017.755-1.381.5.5 0 01-.939.345A3.001 3.001 0 007 1zM2 6.004h10v7H2v-7z" + } + )), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_1107_3614" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var KeyIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("path", { d: "M11 4a1 1 0 11-2 0 1 1 0 012 0z", fill: color }), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7.5 8.532V9.5a.5.5 0 01-.5.5H5.5v1.5a.5.5 0 01-.5.5H3.5v1.5a.5.5 0 01-.5.5H.5a.5.5 0 01-.5-.5v-2a.5.5 0 01.155-.362l5.11-5.11A4.5 4.5 0 117.5 8.532zM6 4.5a3.5 3.5 0 111.5 2.873c-.29-.203-1-.373-1 .481V9H5a.5.5 0 00-.5.5V11H3a.5.5 0 00-.5.5V13H1v-1.293l5.193-5.193a.552.552 0 00.099-.613A3.473 3.473 0 016 4.5z", + fill: color + } + ) + ); +}); +var OutboxIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7.354.15a.5.5 0 00-.708 0l-2 2a.5.5 0 10.708.707L6.5 1.711v6.793a.5.5 0 001 0V1.71l1.146 1.146a.5.5 0 10.708-.707l-2-2z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2 7.504a.5.5 0 10-1 0v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-1 0v4.5H2v-4.5z", + fill: color + } + ) + ); +}); +var CreditIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("path", { d: "M2.5 8.004a.5.5 0 100 1h3a.5.5 0 000-1h-3z", fill: color }), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M0 11.504a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-9a.5.5 0 00-.5-.5H.5a.5.5 0 00-.5.5v9zm1-8.5v1h12v-1H1zm0 8h12v-5H1v5z", + fill: color + } + ) + ); +}); +var ButtonIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1 3.004a1 1 0 00-1 1v5a1 1 0 001 1h3.5a.5.5 0 100-1H1v-5h12v5h-1a.5.5 0 000 1h1a1 1 0 001-1v-5a1 1 0 00-1-1H1z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M6.45 7.006a.498.498 0 01.31.07L10.225 9.1a.5.5 0 01-.002.873l-1.074.621.75 1.3a.75.75 0 01-1.3.75l-.75-1.3-1.074.62a.497.497 0 01-.663-.135.498.498 0 01-.095-.3L6 7.515a.497.497 0 01.45-.509z", + fill: color + } + ) + ); +}); +var TypeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4 1.504a.5.5 0 01.5-.5h5a.5.5 0 110 1h-2v10h2a.5.5 0 010 1h-5a.5.5 0 010-1h2v-10h-2a.5.5 0 01-.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M0 4.504a.5.5 0 01.5-.5h4a.5.5 0 110 1H1v4h3.5a.5.5 0 110 1h-4a.5.5 0 01-.5-.5v-5zM9.5 4.004a.5.5 0 100 1H13v4H9.5a.5.5 0 100 1h4a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5h-4z", + fill: color + } + ) + ); +}); +var PointerDefaultIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M5.943 12.457a.27.27 0 00.248-.149L7.77 9.151l2.54 2.54a.257.257 0 00.188.073c.082 0 .158-.03.21-.077l.788-.79a.27.27 0 000-.392L8.891 7.9l3.416-1.708a.29.29 0 00.117-.106.222.222 0 00.033-.134.332.332 0 00-.053-.161.174.174 0 00-.092-.072l-.02-.007-10.377-4.15a.274.274 0 00-.355.354l4.15 10.372a.275.275 0 00.233.169zm-.036 1l-.02-.002c-.462-.03-.912-.31-1.106-.796L.632 2.287A1.274 1.274 0 012.286.633l10.358 4.143c.516.182.782.657.81 1.114a1.25 1.25 0 01-.7 1.197L10.58 8.174l1.624 1.624a1.27 1.27 0 010 1.807l-.8.801-.008.007c-.491.46-1.298.48-1.792-.014l-1.56-1.56-.957 1.916a1.27 1.27 0 01-1.142.702h-.037z", + fill: color + } + ) + ); +}); +var PointerHandIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11.87 6.008a.505.505 0 00-.003-.028v-.002c-.026-.27-.225-.48-.467-.498a.5.5 0 00-.53.5v1.41c0 .25-.22.47-.47.47a.48.48 0 01-.47-.47V5.17a.6.6 0 00-.002-.05c-.023-.268-.223-.49-.468-.5a.5.5 0 00-.52.5v1.65a.486.486 0 01-.47.47.48.48 0 01-.47-.47V4.62a.602.602 0 00-.002-.05v-.002c-.023-.266-.224-.48-.468-.498a.5.5 0 00-.53.5v2.2c0 .25-.22.47-.47.47a.49.49 0 01-.47-.47V1.8c0-.017 0-.034-.002-.05-.022-.268-.214-.49-.468-.5a.5.5 0 00-.52.5v6.78c0 .25-.22.47-.47.47a.48.48 0 01-.47-.47l.001-.1c.001-.053.002-.104 0-.155a.775.775 0 00-.06-.315.65.65 0 00-.16-.22 29.67 29.67 0 01-.21-.189c-.2-.182-.4-.365-.617-.532l-.003-.003A6.366 6.366 0 003.06 7l-.01-.007c-.433-.331-.621-.243-.69-.193-.26.14-.29.5-.13.74l1.73 2.6v.01h-.016l-.035.023.05-.023s1.21 2.6 3.57 2.6c3.54 0 4.2-1.9 4.31-4.42.039-.591.036-1.189.032-1.783l-.002-.507v-.032zm.969 2.376c-.057 1.285-.254 2.667-1.082 3.72-.88 1.118-2.283 1.646-4.227 1.646-1.574 0-2.714-.87-3.406-1.623a6.958 6.958 0 01-1.046-1.504l-.006-.012-1.674-2.516a1.593 1.593 0 01-.25-1.107 1.44 1.44 0 01.69-1.041c.195-.124.485-.232.856-.186.357.044.681.219.976.446.137.106.272.22.4.331V1.75A1.5 1.5 0 015.63.25c.93.036 1.431.856 1.431 1.55v1.335a1.5 1.5 0 01.53-.063h.017c.512.04.915.326 1.153.71a1.5 1.5 0 01.74-.161c.659.025 1.115.458 1.316.964a1.493 1.493 0 01.644-.103h.017c.856.067 1.393.814 1.393 1.558l.002.48c.004.596.007 1.237-.033 1.864z", + fill: color + } + ) + ); +}); +var CommandIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.5 6A2.5 2.5 0 116 3.5V5h2V3.5A2.5 2.5 0 1110.5 6H9v2h1.5A2.5 2.5 0 118 10.5V9H6v1.5A2.5 2.5 0 113.5 8H5V6H3.5zM2 3.5a1.5 1.5 0 113 0V5H3.5A1.5 1.5 0 012 3.5zM6 6v2h2V6H6zm3-1h1.5A1.5 1.5 0 109 3.5V5zM3.5 9H5v1.5A1.5 1.5 0 113.5 9zM9 9v1.5A1.5 1.5 0 1010.5 9H9z", + fill: color + } + ) + ); +}); +var SaveIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M8.896 1c.2 0 .39.08.53.22l3.354 3.353c.14.14.22.332.22.53V11a2 2 0 01-2 2H3a2 2 0 01-2-2V3a2 2 0 012-2h5.896zM3 2a1 1 0 00-1 1v8a1 1 0 001 1h1V8.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5V12h1a1 1 0 001-1V5.207L8.793 2H5v2h3.5a.5.5 0 010 1h-4a.5.5 0 01-.5-.5V2H3zm2 10h4V9H5v3z", + fill: color + } + ) + ); +}); +var SortDownIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4.5 2a.5.5 0 01.5.5v8.293l2.146-2.147a.5.5 0 11.708.708L4.86 12.346l-.007.008a.499.499 0 01-.351.146h-.006a.5.5 0 01-.35-.146l-3-3a.5.5 0 11.707-.708L4 10.793V2.5a.5.5 0 01.5-.5zM7 2.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zM7 5.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zM10.5 8a.5.5 0 000 1h2a.5.5 0 000-1h-2zM8 11.5a.5.5 0 01.5-.5h4a.5.5 0 010 1h-4a.5.5 0 01-.5-.5z", + fill: color + } + ) + ); +}); +var SortUpIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4.308 1.538a.496.496 0 00-.162.108l-3 3a.5.5 0 10.708.707L4 3.207V11.5a.5.5 0 001 0V3.207l2.146 2.147a.5.5 0 10.708-.708l-3-3a.5.5 0 00-.546-.108zM8 2.5a.5.5 0 01.5-.5h4a.5.5 0 010 1h-4a.5.5 0 01-.5-.5zM10.5 5a.5.5 0 000 1h2a.5.5 0 000-1h-2zM13 8.5a.5.5 0 01-.5.5h-5a.5.5 0 010-1h5a.5.5 0 01.5.5zM7 11.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5z", + fill: color + } + ) + ); +}); +var BugIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11 0a.5.5 0 010 1 2 2 0 00-1.987 1.78C9.618 3.33 10 4.12 10 5a3 3 0 003-3 .5.5 0 011 0 4.002 4.002 0 01-3 3.874V7h2.5a.5.5 0 010 1H11v.626c1.725.444 3 2.01 3 3.874a.5.5 0 01-1 0 3 3 0 00-2.055-2.846 4 4 0 01-7.891 0A3 3 0 001 12.5a.5.5 0 01-1 0 4.002 4.002 0 013-3.874V8H.5a.5.5 0 010-1H3V5.874A4.002 4.002 0 010 2a.5.5 0 011 0 3 3 0 003 3c0-.88.382-1.67.986-2.22A1.999 1.999 0 003 1a.5.5 0 010-1c1.384 0 2.545.938 2.892 2.213a2.99 2.99 0 012.215 0A2.999 2.999 0 0111 0zM4 9a3 3 0 002.5 2.958V6H4v3zm3.5 2.958A3 3 0 0010 9V6H7.5v5.958zM7 3a2 2 0 00-2 2h4a2 2 0 00-2-2z", + fill: color + } + ) + ); +}); +var EditorIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7.536 5.314a.5.5 0 01.928.372l-2 5a.5.5 0 01-.928-.371l2-5zM3.646 6.146a.5.5 0 01.708.708L3.207 8l1.147 1.146a.5.5 0 01-.708.708l-1.5-1.5a.5.5 0 01-.063-.63l.063-.078 1.5-1.5zM9.646 6.146a.5.5 0 01.707 0l1.5 1.5.065.079a.497.497 0 01-.064.629l-1.5 1.5a.5.5 0 01-.708-.708L10.793 8 9.646 6.854a.5.5 0 010-.708z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M13.5 1.004a.5.5 0 01.5.5v11l-.01.1a.501.501 0 01-.39.39l-.1.01H.5l-.1-.01a.501.501 0 01-.39-.39l-.01-.1v-11a.5.5 0 01.5-.5h13zm-12.5 11h12v-8H1v8zm.5-10a.5.5 0 100 1 .5.5 0 000-1zm2 0a.5.5 0 100 1 .5.5 0 000-1zm2 0a.5.5 0 100 1 .5.5 0 000-1z", + fill: color + } + ) + ); +}); +var InfoIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 13A6 6 0 107 1a6 6 0 000 12zm0 1A7 7 0 107 0a7 7 0 000 14z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 5.5a.5.5 0 01.5.5v4.5a.5.5 0 01-1 0V6a.5.5 0 01.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement("path", { d: "M7.75 3.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0z", fill: color }) + ); +}); +var QuestionIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5.25 5.25A1.75 1.75 0 117 7a.5.5 0 00-.5.5V9a.5.5 0 001 0V7.955A2.75 2.75 0 104.25 5.25a.5.5 0 001 0zM7 11.5A.75.75 0 107 10a.75.75 0 000 1.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z", + fill: color + } + ) + ); +}); +var SupportIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-3.524 4.89A5.972 5.972 0 017 13a5.972 5.972 0 01-3.477-1.11l1.445-1.444C5.564 10.798 6.258 11 7 11s1.436-.202 2.032-.554l1.444 1.445zm-.03-2.858l1.445 1.444A5.972 5.972 0 0013 7c0-1.296-.41-2.496-1.11-3.477l-1.444 1.445C10.798 5.564 11 6.258 11 7s-.202 1.436-.554 2.032zM9.032 3.554l1.444-1.445A5.972 5.972 0 007 1c-1.296 0-2.496.41-3.477 1.11l1.445 1.444A3.981 3.981 0 017 3c.742 0 1.436.202 2.032.554zM3.554 4.968L2.109 3.523A5.973 5.973 0 001 7c0 1.296.41 2.496 1.11 3.476l1.444-1.444A3.981 3.981 0 013 7c0-.742.202-1.436.554-2.032zM10 7a3 3 0 11-6 0 3 3 0 016 0z", + fill: color + } + ) + ); +}); +var AlertIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7 4.5a.5.5 0 01.5.5v3.5a.5.5 0 11-1 0V5a.5.5 0 01.5-.5zM7.75 10.5a.75.75 0 11-1.5 0 .75.75 0 011.5 0z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7.206 1.045a.498.498 0 01.23.209l6.494 10.992a.5.5 0 01-.438.754H.508a.497.497 0 01-.506-.452.498.498 0 01.072-.31l6.49-10.984a.497.497 0 01.642-.21zM7 2.483L1.376 12h11.248L7 2.483z", + fill: color + } + ) + ); +}); +var AlertAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zM6.5 8a.5.5 0 001 0V4a.5.5 0 00-1 0v4zm-.25 2.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0z", + fill: color + } + ) + ); +}); +var EmailIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M0 2.504a.5.5 0 01.5-.5h13a.5.5 0 01.5.5v9a.5.5 0 01-.5.5H.5a.5.5 0 01-.5-.5v-9zm1 1.012v7.488h12V3.519L7.313 7.894a.496.496 0 01-.526.062.497.497 0 01-.1-.062L1 3.516zm11.03-.512H1.974L7 6.874l5.03-3.87z", + fill: color + } + ) + ); +}); +var PhoneIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7.76 8.134l-.05.05a.2.2 0 01-.28.03 6.76 6.76 0 01-1.63-1.65.21.21 0 01.04-.27l.05-.05c.23-.2.54-.47.71-.96.17-.47-.02-1.04-.66-1.94-.26-.38-.72-.96-1.22-1.46-.68-.69-1.2-1-1.65-1a.98.98 0 00-.51.13A3.23 3.23 0 00.9 3.424c-.13 1.1.26 2.37 1.17 3.78a16.679 16.679 0 004.55 4.6 6.57 6.57 0 003.53 1.32 3.2 3.2 0 002.85-1.66c.14-.24.24-.64-.07-1.18a7.803 7.803 0 00-1.73-1.81c-.64-.5-1.52-1.11-2.13-1.11a.97.97 0 00-.34.06c-.472.164-.74.458-.947.685l-.023.025zm4.32 2.678a6.801 6.801 0 00-1.482-1.54l-.007-.005-.006-.005a8.418 8.418 0 00-.957-.662 2.7 2.7 0 00-.4-.193.683.683 0 00-.157-.043l-.004.002-.009.003c-.224.078-.343.202-.56.44l-.014.016-.046.045a1.2 1.2 0 01-1.602.149A7.76 7.76 0 014.98 7.134l-.013-.019-.013-.02a1.21 1.21 0 01.195-1.522l.06-.06.026-.024c.219-.19.345-.312.422-.533l.003-.01v-.008a.518.518 0 00-.032-.142c-.06-.178-.203-.453-.502-.872l-.005-.008-.005-.007A10.18 10.18 0 004.013 2.59l-.005-.005c-.31-.314-.543-.5-.716-.605-.147-.088-.214-.096-.222-.097h-.016l-.006.003-.01.006a2.23 2.23 0 00-1.145 1.656c-.09.776.175 1.806 1.014 3.108a15.68 15.68 0 004.274 4.32l.022.014.022.016a5.57 5.57 0 002.964 1.117 2.2 2.2 0 001.935-1.141l.006-.012.004-.007a.182.182 0 00-.007-.038.574.574 0 00-.047-.114z", + fill: color + } + ) + ); +}); +var LinkIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.841 2.159a2.25 2.25 0 00-3.182 0l-2.5 2.5a2.25 2.25 0 000 3.182.5.5 0 01-.707.707 3.25 3.25 0 010-4.596l2.5-2.5a3.25 3.25 0 014.596 4.596l-2.063 2.063a4.27 4.27 0 00-.094-1.32l1.45-1.45a2.25 2.25 0 000-3.182z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3.61 7.21c-.1-.434-.132-.88-.095-1.321L1.452 7.952a3.25 3.25 0 104.596 4.596l2.5-2.5a3.25 3.25 0 000-4.596.5.5 0 00-.707.707 2.25 2.25 0 010 3.182l-2.5 2.5A2.25 2.25 0 112.159 8.66l1.45-1.45z", + fill: color + } + ) + ); +}); +var LinkBrokenIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.452 7.952l1.305-1.305.708.707-1.306 1.305a2.25 2.25 0 103.182 3.182l1.306-1.305.707.707-1.306 1.305a3.25 3.25 0 01-4.596-4.596zM12.548 6.048l-1.305 1.306-.707-.708 1.305-1.305a2.25 2.25 0 10-3.182-3.182L7.354 3.464l-.708-.707 1.306-1.305a3.25 3.25 0 014.596 4.596zM1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.707-.707l-11-11z", + fill: color + } + ) + ); +}); +var BellIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7.994 1.11a1 1 0 10-1.988 0A4.502 4.502 0 002.5 5.5v3.882l-.943 1.885a.497.497 0 00-.053.295.5.5 0 00.506.438h3.575a1.5 1.5 0 102.83 0h3.575a.5.5 0 00.453-.733L11.5 9.382V5.5a4.502 4.502 0 00-3.506-4.39zM2.81 11h8.382l-.5-1H3.31l-.5 1zM10.5 9V5.5a3.5 3.5 0 10-7 0V9h7zm-4 3.5a.5.5 0 111 0 .5.5 0 01-1 0z", + fill: color + } + ) + ); +}); +var RSSIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.5.5A.5.5 0 012 0c6.627 0 12 5.373 12 12a.5.5 0 01-1 0C13 5.925 8.075 1 2 1a.5.5 0 01-.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.5 4.5A.5.5 0 012 4a8 8 0 018 8 .5.5 0 01-1 0 7 7 0 00-7-7 .5.5 0 01-.5-.5z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M5 11a2 2 0 11-4 0 2 2 0 014 0zm-1 0a1 1 0 11-2 0 1 1 0 012 0z", + fill: color + } + ) + ); +}); +var ShareAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-4.5a.5.5 0 00-1 0v4.5H2v-10h4.5a.5.5 0 000-1H2z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7.354 7.357L12 2.711v1.793a.5.5 0 001 0v-3a.5.5 0 00-.5-.5h-3a.5.5 0 100 1h1.793L6.646 6.65a.5.5 0 10.708.707z", + fill: color + } + ) + ); +}); +var ShareIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M6.646.15a.5.5 0 01.708 0l2 2a.5.5 0 11-.708.707L7.5 1.711v6.793a.5.5 0 01-1 0V1.71L5.354 2.857a.5.5 0 11-.708-.707l2-2z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2 4.004a1 1 0 00-1 1v7a1 1 0 001 1h10a1 1 0 001-1v-7a1 1 0 00-1-1H9.5a.5.5 0 100 1H12v7H2v-7h2.5a.5.5 0 000-1H2z", + fill: color + } + ) + ); +}); +var JumpToIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M13.854 6.646a.5.5 0 010 .708l-2 2a.5.5 0 01-.708-.708L12.293 7.5H5.5a.5.5 0 010-1h6.793l-1.147-1.146a.5.5 0 01.708-.708l2 2z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M10 2a1 1 0 00-1-1H2a1 1 0 00-1 1v10a1 1 0 001 1h7a1 1 0 001-1V9.5a.5.5 0 00-1 0V12H2V2h7v2.5a.5.5 0 001 0V2z", + fill: color + } + ) + ); +}); +var CircleHollowIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 13A6 6 0 107 1a6 6 0 000 12zm0 1A7 7 0 107 0a7 7 0 000 14z", + fill: color + } + ) + ); +}); +var CircleIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("path", { d: "M14 7A7 7 0 110 7a7 7 0 0114 0z", fill: color }) + ); +}); +var BookmarkHollowIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.5 0h7a.5.5 0 01.5.5v13a.5.5 0 01-.454.498.462.462 0 01-.371-.118L7 11.159l-3.175 2.72a.46.46 0 01-.379.118A.5.5 0 013 13.5V.5a.5.5 0 01.5-.5zM4 12.413l2.664-2.284a.454.454 0 01.377-.128.498.498 0 01.284.12L10 12.412V1H4v11.413z", + fill: color + } + ) + ); +}); +var BookmarkIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 15", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.5 0h7a.5.5 0 01.5.5v13a.5.5 0 01-.454.498.462.462 0 01-.371-.118L7 11.159l-3.175 2.72a.46.46 0 01-.379.118A.5.5 0 013 13.5V.5a.5.5 0 01.5-.5z", + fill: color + } + ) + ); +}); +var DiamondIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_1449_588)" }, /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M8.414 1.586a2 2 0 00-2.828 0l-4 4a2 2 0 000 2.828l4 4a2 2 0 002.828 0l4-4a2 2 0 000-2.828l-4-4zm.707-.707a3 3 0 00-4.242 0l-4 4a3 3 0 000 4.242l4 4a3 3 0 004.242 0l4-4a3 3 0 000-4.242l-4-4z", + fill: color + } + )), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_1449_588" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var HeartHollowIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M12.814 1.846c.06.05.116.101.171.154l.001.002a3.254 3.254 0 01.755 1.168c.171.461.259.974.259 1.538 0 .332-.046.656-.143.976a4.546 4.546 0 01-.397.937c-.169.302-.36.589-.58.864a7.627 7.627 0 01-.674.746l-4.78 4.596a.585.585 0 01-.427.173.669.669 0 01-.44-.173L1.78 8.217a7.838 7.838 0 01-.677-.748 6.124 6.124 0 01-.572-.855 4.975 4.975 0 01-.388-.931A3.432 3.432 0 010 4.708C0 4.144.09 3.63.265 3.17c.176-.459.429-.85.757-1.168a3.432 3.432 0 011.193-.74c.467-.176.99-.262 1.57-.262.304 0 .608.044.907.137.301.092.586.215.855.367.27.148.526.321.771.512.244.193.471.386.682.584.202-.198.427-.391.678-.584.248-.19.507-.364.78-.512a4.65 4.65 0 01.845-.367c.294-.093.594-.137.9-.137.585 0 1.115.086 1.585.262.392.146.734.34 1.026.584zM1.2 3.526c.128-.333.304-.598.52-.806.218-.212.497-.389.849-.522m-1.37 1.328A3.324 3.324 0 001 4.708c0 .225.032.452.101.686.082.265.183.513.307.737.135.246.294.484.479.716.188.237.386.454.59.652l.001.002 4.514 4.355 4.519-4.344c.2-.193.398-.41.585-.648l.003-.003c.184-.23.345-.472.486-.726l.004-.007c.131-.23.232-.474.31-.732v-.002c.068-.224.101-.45.101-.686 0-.457-.07-.849-.195-1.185a2.177 2.177 0 00-.515-.802l.007-.012-.008.009a2.383 2.383 0 00-.85-.518l-.003-.001C11.1 2.072 10.692 2 10.203 2c-.21 0-.406.03-.597.09h-.001c-.22.07-.443.167-.663.289l-.007.003c-.22.12-.434.262-.647.426-.226.174-.42.341-.588.505l-.684.672-.7-.656a9.967 9.967 0 00-.615-.527 4.82 4.82 0 00-.635-.422l-.01-.005a3.289 3.289 0 00-.656-.281l-.008-.003A2.014 2.014 0 003.785 2c-.481 0-.881.071-1.217.198", + fill: color + } + ) + ); +}); +var HeartIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M12.814 1.846c.06.05.116.101.171.154l.001.002a3.254 3.254 0 01.755 1.168c.171.461.259.974.259 1.538 0 .332-.046.656-.143.976a4.546 4.546 0 01-.397.937c-.169.302-.36.589-.58.864a7.627 7.627 0 01-.674.746l-4.78 4.596a.585.585 0 01-.427.173.669.669 0 01-.44-.173L1.78 8.217a7.838 7.838 0 01-.677-.748 6.124 6.124 0 01-.572-.855 4.975 4.975 0 01-.388-.931A3.432 3.432 0 010 4.708C0 4.144.09 3.63.265 3.17c.176-.459.429-.85.757-1.168a3.432 3.432 0 011.193-.74c.467-.176.99-.262 1.57-.262.304 0 .608.044.907.137.301.092.586.215.855.367.27.148.526.321.771.512.244.193.471.386.682.584.202-.198.427-.391.678-.584.248-.19.507-.364.78-.512a4.65 4.65 0 01.845-.367c.294-.093.594-.137.9-.137.585 0 1.115.086 1.585.262.392.146.734.34 1.026.584z", + fill: color + } + ) + ); +}); +var StarHollowIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M6.319.783a.75.75 0 011.362 0l1.63 3.535 3.867.458a.75.75 0 01.42 1.296L10.74 8.715l.76 3.819a.75.75 0 01-1.103.8L7 11.434l-3.398 1.902a.75.75 0 01-1.101-.801l.758-3.819L.401 6.072a.75.75 0 01.42-1.296l3.867-.458L6.318.783zm.68.91l-1.461 3.17a.75.75 0 01-.593.431l-3.467.412 2.563 2.37a.75.75 0 01.226.697l-.68 3.424 3.046-1.705a.75.75 0 01.733 0l3.047 1.705-.68-3.424a.75.75 0 01.226-.697l2.563-2.37-3.467-.412a.75.75 0 01-.593-.43L7 1.694z", + fill: color + } + ) + ); +}); +var StarIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7.68.783a.75.75 0 00-1.361 0l-1.63 3.535-3.867.458A.75.75 0 00.4 6.072l2.858 2.643-.758 3.819a.75.75 0 001.101.8L7 11.434l3.397 1.902a.75.75 0 001.102-.801l-.759-3.819L13.6 6.072a.75.75 0 00-.421-1.296l-3.866-.458L7.68.783z", + fill: color + } + ) + ); +}); +var CertificateIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M10 7.854a4.5 4.5 0 10-6 0V13a.5.5 0 00.497.5h.006c.127 0 .254-.05.35-.146L7 11.207l2.146 2.147A.5.5 0 0010 13V7.854zM7 8a3.5 3.5 0 100-7 3.5 3.5 0 000 7zm-.354 2.146a.5.5 0 01.708 0L9 11.793v-3.26C8.398 8.831 7.718 9 7 9a4.481 4.481 0 01-2-.468v3.26l1.646-1.646z", + fill: color + } + ) + ); +}); +var VerifiedIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M6.565 13.123a.991.991 0 01.87 0l.987.482a.991.991 0 001.31-.426l.515-.97a.991.991 0 01.704-.511l1.082-.19a.99.99 0 00.81-1.115l-.154-1.087a.991.991 0 01.269-.828l.763-.789a.991.991 0 000-1.378l-.763-.79a.991.991 0 01-.27-.827l.155-1.087a.99.99 0 00-.81-1.115l-1.082-.19a.991.991 0 01-.704-.511L9.732.82a.99.99 0 00-1.31-.426l-.987.482a.991.991 0 01-.87 0L5.578.395a.99.99 0 00-1.31.426l-.515.97a.99.99 0 01-.704.511l-1.082.19a.99.99 0 00-.81 1.115l.154 1.087a.99.99 0 01-.269.828L.28 6.31a.99.99 0 000 1.378l.763.79a.99.99 0 01.27.827l-.155 1.087a.99.99 0 00.81 1.115l1.082.19a.99.99 0 01.704.511l.515.97c.25.473.83.661 1.31.426l.987-.482zm4.289-8.477a.5.5 0 010 .708l-4.5 4.5a.5.5 0 01-.708 0l-2.5-2.5a.5.5 0 11.708-.708L6 8.793l4.146-4.147a.5.5 0 01.708 0z", + fill: color + } + ) + ); +}); +var ThumbsUpIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11 12.02c-.4.37-.91.56-1.56.56h-.88a5.493 5.493 0 01-1.3-.16c-.42-.1-.91-.25-1.47-.45a5.056 5.056 0 00-.95-.27H2.88a.84.84 0 01-.62-.26.84.84 0 01-.26-.61V6.45c0-.24.09-.45.26-.62a.84.84 0 01.62-.25h1.87c.16-.11.47-.47.93-1.06.27-.35.51-.64.74-.88.1-.11.19-.3.24-.58.05-.28.12-.57.2-.87.1-.3.24-.55.43-.74a.87.87 0 01.62-.25c.38 0 .72.07 1.03.22.3.15.54.38.7.7.15.31.23.73.23 1.27a3 3 0 01-.32 1.31h1.2c.47 0 .88.17 1.23.52s.52.8.52 1.22c0 .29-.04.66-.34 1.12.05.15.07.3.07.47 0 .35-.09.68-.26.98a2.05 2.05 0 01-.4 1.51 1.9 1.9 0 01-.57 1.5zm.473-5.33a.965.965 0 00.027-.25.742.742 0 00-.227-.513.683.683 0 00-.523-.227H7.927l.73-1.45a2 2 0 00.213-.867c0-.444-.068-.695-.127-.822a.53.53 0 00-.245-.244 1.296 1.296 0 00-.539-.116.989.989 0 00-.141.28 9.544 9.544 0 00-.174.755c-.069.387-.213.779-.484 1.077l-.009.01-.009.01c-.195.202-.41.46-.67.798l-.003.004c-.235.3-.44.555-.613.753-.151.173-.343.381-.54.516l-.255.176H5v4.133l.018.003c.384.07.76.176 1.122.318.532.189.98.325 1.352.413l.007.002a4.5 4.5 0 001.063.131h.878c.429 0 .683-.115.871-.285a.9.9 0 00.262-.702l-.028-.377.229-.3a1.05 1.05 0 00.205-.774l-.044-.333.165-.292a.969.969 0 00.13-.487.457.457 0 00-.019-.154l-.152-.458.263-.404a1.08 1.08 0 00.152-.325zM3.5 10.8a.5.5 0 100-1 .5.5 0 000 1z", + fill: color + } + ) + ); +}); +var ShieldIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11.765 2.076A.5.5 0 0112 2.5v6.009a.497.497 0 01-.17.366L7.337 12.87a.497.497 0 01-.674 0L2.17 8.875l-.009-.007a.498.498 0 01-.16-.358L2 8.5v-6a.5.5 0 01.235-.424l.018-.011c.016-.01.037-.024.065-.04.056-.032.136-.077.24-.128a6.97 6.97 0 01.909-.371C4.265 1.26 5.443 1 7 1s2.735.26 3.533.526c.399.133.702.267.91.37a4.263 4.263 0 01.304.169l.018.01zM3 2.793v5.482l1.068.95 6.588-6.588a6.752 6.752 0 00-.44-.163C9.517 2.24 8.444 2 7 2c-1.443 0-2.515.24-3.217.474-.351.117-.61.233-.778.317L3 2.793zm4 9.038l-2.183-1.94L11 3.706v4.568l-4 3.556z", + fill: color + } + ) + ); +}); +var BasketIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M10.354 2.854a.5.5 0 10-.708-.708l-3 3a.5.5 0 10.708.708l3-3z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2.09 6H4.5a.5.5 0 000-1H1.795a.75.75 0 00-.74.873l.813 4.874A1.5 1.5 0 003.348 12h7.305a1.5 1.5 0 001.48-1.253l.812-4.874a.75.75 0 00-.74-.873H10a.5.5 0 000 1h1.91l-.764 4.582a.5.5 0 01-.493.418H3.347a.5.5 0 01-.493-.418L2.09 6z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4.5 7a.5.5 0 01.5.5v2a.5.5 0 01-1 0v-2a.5.5 0 01.5-.5zM10 7.5a.5.5 0 00-1 0v2a.5.5 0 001 0v-2zM6.5 9.5v-2a.5.5 0 011 0v2a.5.5 0 01-1 0z", + fill: color + } + ) + ); +}); +var BeakerIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M4.5 2h.75v3.866l-3.034 5.26A1.25 1.25 0 003.299 13H10.7a1.25 1.25 0 001.083-1.875L8.75 5.866V2h.75a.5.5 0 100-1h-5a.5.5 0 000 1zm1.75 0h1.5v4.134L8.827 8H5.173L6.25 6.134V2zM4.597 9l-1.515 2.625A.25.25 0 003.3 12H10.7a.25.25 0 00.217-.375L9.404 9H4.597z", + fill: color + } + ) + ); +}); +var HourglassIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("path", { d: "M7.5 10.5a.5.5 0 11-1 0 .5.5 0 011 0z", fill: color }), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.5 1a.5.5 0 00-.5.5c0 1.063.137 1.892.678 2.974.346.692.858 1.489 1.598 2.526-.89 1.247-1.455 2.152-1.798 2.956-.377.886-.477 1.631-.478 2.537v.007a.5.5 0 00.5.5h7c.017 0 .034 0 .051-.003A.5.5 0 0011 12.5v-.007c0-.906-.1-1.65-.478-2.537-.343-.804-.909-1.709-1.798-2.956.74-1.037 1.252-1.834 1.598-2.526C10.863 3.392 11 2.563 11 1.5a.5.5 0 00-.5-.5h-7zm6.487 11a4.675 4.675 0 00-.385-1.652c-.277-.648-.735-1.407-1.499-2.494-.216.294-.448.606-.696.937a.497.497 0 01-.195.162.5.5 0 01-.619-.162c-.248-.331-.48-.643-.696-.937-.764 1.087-1.222 1.846-1.499 2.494A4.675 4.675 0 004.013 12h5.974zM6.304 6.716c.212.293.443.609.696.948a90.058 90.058 0 00.709-.965c.48-.664.86-1.218 1.163-1.699H5.128a32.672 32.672 0 001.176 1.716zM4.559 4h4.882c.364-.735.505-1.312.546-2H4.013c.04.688.182 1.265.546 2z", + fill: color + } + ) + ); +}); +var FlagIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11.5 1h-9a.5.5 0 00-.5.5v11a.5.5 0 001 0V8h8.5a.5.5 0 00.354-.854L9.207 4.5l2.647-2.646A.499.499 0 0011.5 1zM8.146 4.146L10.293 2H3v5h7.293L8.146 4.854a.5.5 0 010-.708z", + fill: color + } + ) + ); +}); +var CloudHollowIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M10 7V6a3 3 0 00-5.91-.736l-.17.676-.692.075A2.5 2.5 0 003.5 11h3c.063 0 .125-.002.187-.007l.076-.005.076.006c.053.004.106.006.161.006h4a2 2 0 100-4h-1zM3.12 5.02A3.5 3.5 0 003.5 12h3c.087 0 .174-.003.26-.01.079.007.16.01.24.01h4a3 3 0 100-6 4 4 0 00-7.88-.98z", + fill: color + } + ) + ); +}); +var CloudIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7 2a4 4 0 014 4 3 3 0 110 6H7c-.08 0-.161-.003-.24-.01-.086.007-.173.01-.26.01h-3a3.5 3.5 0 01-.38-6.98A4.002 4.002 0 017 2z", + fill: color + } + ) + ); +}); +var StickerIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M11 7a4 4 0 11-8 0 4 4 0 018 0zm-1 0a3 3 0 11-6 0 3 3 0 016 0z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M4.268 13.18c.25.472.83.66 1.31.425l.987-.482a.991.991 0 01.87 0l.987.482a.991.991 0 001.31-.426l.515-.97a.991.991 0 01.704-.511l1.082-.19a.99.99 0 00.81-1.115l-.154-1.087a.991.991 0 01.269-.828l.763-.789a.991.991 0 000-1.378l-.763-.79a.991.991 0 01-.27-.827l.155-1.087a.99.99 0 00-.81-1.115l-1.082-.19a.991.991 0 01-.704-.511L9.732.82a.99.99 0 00-1.31-.426l-.987.482a.991.991 0 01-.87 0L5.578.395a.99.99 0 00-1.31.426l-.515.97a.99.99 0 01-.704.511l-1.082.19a.99.99 0 00-.81 1.115l.154 1.087a.99.99 0 01-.269.828L.28 6.31a.99.99 0 000 1.378l.763.79a.99.99 0 01.27.827l-.155 1.087a.99.99 0 00.81 1.115l1.082.19a.99.99 0 01.704.511l.515.97zm5.096-1.44l-.511.963-.979-.478a1.99 1.99 0 00-1.748 0l-.979.478-.51-.962a1.991 1.991 0 00-1.415-1.028l-1.073-.188.152-1.079a1.991 1.991 0 00-.54-1.663L1.004 7l.757-.783a1.991 1.991 0 00.54-1.663L2.15 3.475l1.073-.188A1.991 1.991 0 004.636 2.26l.511-.962.979.478a1.99 1.99 0 001.748 0l.979-.478.51.962c.288.543.81.922 1.415 1.028l1.073.188-.152 1.079a1.99 1.99 0 00.54 1.663l.757.783-.757.783a1.99 1.99 0 00-.54 1.663l.152 1.079-1.073.188a1.991 1.991 0 00-1.414 1.028z", + fill: color + } + ) + ); +}); +var StatusFailIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M9.147 4.146a.5.5 0 11.707.707L7.707 7l2.147 2.146a.5.5 0 11-.707.707L7 7.707 4.854 9.853a.5.5 0 01-.707-.707L6.293 7 4.147 4.853a.5.5 0 11.707-.707L7 6.293l2.147-2.147z", + fill: color + } + ) + ); +}); +var StatusIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("circle", { cx: 7, cy: 7, r: 3, fill: color }) + ); +}); +var StatusWarnIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7.206 3.044a.498.498 0 01.23.212l3.492 5.985a.494.494 0 01.006.507.497.497 0 01-.443.252H3.51a.499.499 0 01-.437-.76l3.492-5.984a.497.497 0 01.642-.212zM7 4.492L4.37 9h5.26L7 4.492z", + fill: color + } + ) + ); +}); +var StatusPassIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M10.854 4.146a.5.5 0 010 .708l-5 5a.5.5 0 01-.708 0l-2-2a.5.5 0 11.708-.708L5.5 8.793l4.646-4.647a.5.5 0 01.708 0z", + fill: color + } + ) + ); +}); +var GiftIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M9 0a2.5 2.5 0 011.997 4H12.5A1.5 1.5 0 0114 5.5v1c0 .653-.418 1.206-1 1.412V11.5a1.5 1.5 0 01-1.5 1.5h-9A1.5 1.5 0 011 11.5V7.912c-.582-.206-1-.76-1-1.412v-1A1.5 1.5 0 011.5 4h1.883A2.234 2.234 0 013 2.75c0-.6.208-1.142.597-1.535.39-.394.93-.607 1.533-.607.637 0 1.197.349 1.602.843A2.498 2.498 0 019 0zM7.5 12h4a.5.5 0 00.5-.5V8H7.5v4zM2 11.5a.5.5 0 00.5.5h4V8H2v3.5zM7.5 7h5a.5.5 0 00.5-.5v-1a.5.5 0 00-.5-.5h-5v2zm-6-2a.5.5 0 00-.5.5v1a.5.5 0 00.5.5h5V5h-5zm3.63-3.392c-.363 0-.639.125-.822.31-.184.187-.308.466-.308.832C4 3.44 4.56 4 5.25 4H6.5v-.25c0-.648-.197-1.203-.477-1.585-.283-.388-.616-.557-.893-.557zM9 1a1.5 1.5 0 00-1.5 1.5V4H9a1.5 1.5 0 100-3z", + fill: color + } + ) + ); +}); +var StatusNewIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7.052 3.004c.01 0 .02 0 .03.002.004 0 .01.003.015.004a.493.493 0 01.051.013l.043.015a.497.497 0 01.089.049l.03.023c.015.012.029.023.042.036.012.012.023.026.035.04l.023.03c.01.015.019.03.027.047.008.014.016.028.022.043.006.014.01.028.015.043.005.017.01.034.013.051l.005.017.03.182A3.5 3.5 0 0010.4 6.476l.182.03c.005 0 .01.003.016.004a.494.494 0 01.051.013l.043.015a.503.503 0 01.089.049l.03.023c.015.012.029.023.042.036.012.012.023.026.035.04l.023.03c.01.015.019.03.027.047.008.014.016.028.022.043l.014.04.014.054.005.017c.002.01 0 .019.001.028.002.018.004.036.004.054 0 .018-.002.035-.004.053v.03l-.006.015a.479.479 0 01-.013.051l-.015.043a.507.507 0 01-.049.089l-.023.03-.035.042-.042.035-.03.023a.503.503 0 01-.046.027c-.014.008-.028.016-.043.022-.014.006-.028.01-.043.015a.491.491 0 01-.051.013l-.016.005-.182.03A3.5 3.5 0 007.522 10.4l-.03.182c0 .005-.004.01-.005.016a.491.491 0 01-.013.051l-.015.043a.503.503 0 01-.049.089l-.023.03-.035.042-.041.035-.03.023a.507.507 0 01-.047.027c-.014.008-.028.016-.043.022-.014.006-.028.01-.043.015a.479.479 0 01-.051.013l-.016.005c-.01.002-.02 0-.03.001-.017.002-.034.004-.052.004-.018 0-.036-.002-.054-.004h-.028c-.006-.002-.011-.005-.017-.006a.503.503 0 01-.051-.013l-.043-.015a.505.505 0 01-.089-.049l-.03-.023c-.015-.012-.029-.023-.041-.035-.013-.013-.024-.027-.036-.042l-.023-.03a.503.503 0 01-.027-.046c-.008-.014-.016-.028-.022-.043-.006-.014-.01-.028-.015-.043a.494.494 0 01-.013-.051l-.004-.016-.03-.182a3.5 3.5 0 00-2.877-2.877l-.182-.03c-.006 0-.011-.004-.017-.005a.493.493 0 01-.051-.013l-.043-.015a.492.492 0 01-.089-.049l-.03-.023c-.015-.012-.029-.023-.041-.035-.013-.013-.024-.027-.036-.041l-.023-.03a.497.497 0 01-.027-.047c-.008-.014-.016-.028-.022-.043-.006-.013-.01-.028-.015-.043a.493.493 0 01-.013-.051l-.004-.016c-.002-.01-.001-.02-.002-.03C3.002 7.035 3 7.018 3 7c0-.018.002-.036.004-.054 0-.009 0-.019.002-.028 0-.006.003-.011.004-.017l.015-.054.013-.04a.498.498 0 01.049-.089l.023-.03.026-.032.02-.02.03-.025.03-.023a.498.498 0 01.047-.027c.014-.008.028-.016.043-.022.014-.006.028-.01.043-.015A.493.493 0 013.4 6.51l.017-.004.182-.03a3.5 3.5 0 002.877-2.877l.03-.182c0-.006.003-.011.004-.017a.493.493 0 01.013-.051l.015-.043a.498.498 0 01.049-.089l.023-.03.026-.032.02-.02.03-.025.03-.023a.498.498 0 01.047-.027c.014-.008.028-.016.043-.022.014-.006.028-.01.043-.015A.493.493 0 016.9 3.01l.017-.004c.01-.002.019-.001.028-.002C6.963 3.002 6.981 3 7 3c.018 0 .035.002.053.004z", + fill: color + } + ) + ); +}); +var PopOutIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_3002_502)", fill: color }, /* @__PURE__ */ React255.createElement("path", { d: "M10.5 12a.5.5 0 01.5.5v.504a1 1 0 01-1 1H8.5a.5.5 0 010-1H10V12.5a.5.5 0 01.5-.5zM.498 11a.5.5 0 01.5.5v1.502H2.5a.5.5 0 110 1H.998a1 1 0 01-1-1V11.5a.5.5 0 01.5-.5zM6.5 13a.5.5 0 010 1h-2a.5.5 0 010-1h2zM10.501 3.004h.006a.495.495 0 01.232.063c.04.022.08.049.115.083a.497.497 0 01.077.104.493.493 0 01.06.151l.003.038c.003.02.006.04.006.06V6.5a.5.5 0 01-1 0V4.71L6.857 7.855a.5.5 0 11-.707-.708l3.144-3.144L7.499 4a.5.5 0 01.002-1l3 .004z" }), /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M13.6.014a.5.5 0 01.4.49v10l-.01.1a.501.501 0 01-.39.39l-.1.01h-10a.5.5 0 01-.49-.4l-.01-.1v-10a.5.5 0 01.5-.5h10l.1.01zM4 10.004h9v-9H4v9z" + } + ), /* @__PURE__ */ React255.createElement("path", { d: "M.5 7a.5.5 0 01.5.5v2a.5.5 0 01-1 0v-2A.5.5 0 01.5 7zM1.5 3.002a.5.5 0 010 1H.998L1 5.499a.5.5 0 01-1 .002l-.002-1.498a1 1 0 011-1.001H1.5z" })), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_3002_502" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var ChevronUpIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7.354 3.896l5.5 5.5a.5.5 0 01-.708.708L7 4.957l-5.146 5.147a.5.5 0 01-.708-.708l5.5-5.5a.5.5 0 01.708 0z", + fill: color + } + ) + ); +}); +var ChevronDownIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.146 4.604l5.5 5.5a.5.5 0 00.708 0l5.5-5.5a.5.5 0 00-.708-.708L7 9.043 1.854 3.896a.5.5 0 10-.708.708z", + fill: color + } + ) + ); +}); +var ChevronLeftIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M2.76 7.096a.498.498 0 00.136.258l5.5 5.5a.5.5 0 00.707-.708L3.958 7l5.147-5.146a.5.5 0 10-.708-.708l-5.5 5.5a.5.5 0 00-.137.45z", + fill: color + } + ) + ); +}); +var ChevronRightIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.104 7.354l-5.5 5.5a.5.5 0 01-.708-.708L10.043 7 4.896 1.854a.5.5 0 11.708-.708l5.5 5.5a.5.5 0 010 .708z", + fill: color + } + ) + ); +}); +var ChevronSmallUpIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3.854 9.104a.5.5 0 11-.708-.708l3.5-3.5a.5.5 0 01.708 0l3.5 3.5a.5.5 0 01-.708.708L7 5.957 3.854 9.104z", + fill: color + } + ) + ); +}); +var ChevronSmallDownIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3.854 4.896a.5.5 0 10-.708.708l3.5 3.5a.5.5 0 00.708 0l3.5-3.5a.5.5 0 00-.708-.708L7 8.043 3.854 4.896z", + fill: color + } + ) + ); +}); +var ChevronSmallLeftIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M9.104 10.146a.5.5 0 01-.708.708l-3.5-3.5a.5.5 0 010-.708l3.5-3.5a.5.5 0 11.708.708L5.957 7l3.147 3.146z", + fill: color + } + ) + ); +}); +var ChevronSmallRightIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M4.896 10.146a.5.5 0 00.708.708l3.5-3.5a.5.5 0 000-.708l-3.5-3.5a.5.5 0 10-.708.708L8.043 7l-3.147 3.146z", + fill: color + } + ) + ); +}); +var ArrowUpIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.854 4.646l-4.5-4.5a.5.5 0 00-.708 0l-4.5 4.5a.5.5 0 10.708.708L6.5 1.707V13.5a.5.5 0 001 0V1.707l3.646 3.647a.5.5 0 00.708-.708z", + fill: color + } + ) + ); +}); +var ArrowDownIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7.5.5a.5.5 0 00-1 0v11.793L2.854 8.646a.5.5 0 10-.708.708l4.5 4.5a.5.5 0 00.351.146h.006c.127 0 .254-.05.35-.146l4.5-4.5a.5.5 0 00-.707-.708L7.5 12.293V.5z", + fill: color + } + ) + ); +}); +var ArrowLeftIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5.354 2.146a.5.5 0 010 .708L1.707 6.5H13.5a.5.5 0 010 1H1.707l3.647 3.646a.5.5 0 01-.708.708l-4.5-4.5a.5.5 0 010-.708l4.5-4.5a.5.5 0 01.708 0z", + fill: color + } + ) + ); +}); +var ArrowRightIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M8.646 2.146a.5.5 0 01.708 0l4.5 4.5a.5.5 0 010 .708l-4.5 4.5a.5.5 0 01-.708-.708L12.293 7.5H.5a.5.5 0 010-1h11.793L8.646 2.854a.5.5 0 010-.708z", + fill: color + } + ) + ); +}); +var ArrowTopLeftIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.904 8.768V2.404a.5.5 0 01.5-.5h6.364a.5.5 0 110 1H3.61l8.339 8.339a.5.5 0 01-.707.707l-8.34-8.34v5.158a.5.5 0 01-1 0z", + fill: color + } + ) + ); +}); +var ArrowTopRightIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M12.096 8.768V2.404a.5.5 0 00-.5-.5H5.232a.5.5 0 100 1h5.157L2.05 11.243a.5.5 0 10.707.707l8.34-8.34v5.158a.5.5 0 101 0z", + fill: color + } + ) + ); +}); +var ArrowBottomLeftIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.904 5.232v6.364a.5.5 0 00.5.5h6.364a.5.5 0 000-1H3.61l8.339-8.339a.5.5 0 00-.707-.707l-8.34 8.34V5.231a.5.5 0 00-1 0z", + fill: color + } + ) + ); +}); +var ArrowBottomRightIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M12.096 5.232v6.364a.5.5 0 01-.5.5H5.232a.5.5 0 010-1h5.157L2.05 2.757a.5.5 0 01.707-.707l8.34 8.34V5.231a.5.5 0 111 0z", + fill: color + } + ) + ); +}); +var ArrowSolidUpIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M6.772 3.59c.126-.12.33-.12.456 0l5.677 5.387c.203.193.06.523-.228.523H1.323c-.287 0-.431-.33-.228-.523L6.772 3.59z", + fill: color + } + ) + ); +}); +var ArrowSolidDownIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7.228 10.41a.335.335 0 01-.456 0L1.095 5.023c-.203-.193-.06-.523.228-.523h11.354c.287 0 .431.33.228.523L7.228 10.41z", + fill: color + } + ) + ); +}); +var ArrowSolidLeftIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M3.712 7.212a.3.3 0 010-.424l5.276-5.276a.3.3 0 01.512.212v10.552a.3.3 0 01-.512.212L3.712 7.212z", + fill: color + } + ) + ); +}); +var ArrowSolidRightIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M10.288 7.212a.3.3 0 000-.424L5.012 1.512a.3.3 0 00-.512.212v10.552a.3.3 0 00.512.212l5.276-5.276z", + fill: color + } + ) + ); +}); +var ExpandAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7.354.146l4 4a.5.5 0 01-.708.708L7 1.207 3.354 4.854a.5.5 0 11-.708-.708l4-4a.5.5 0 01.708 0zM11.354 9.146a.5.5 0 010 .708l-4 4a.5.5 0 01-.708 0l-4-4a.5.5 0 11.708-.708L7 12.793l3.646-3.647a.5.5 0 01.708 0z", + fill: color + } + ) + ); +}); +var CollapseIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3.354.146a.5.5 0 10-.708.708l4 4a.5.5 0 00.708 0l4-4a.5.5 0 00-.708-.708L7 3.793 3.354.146zM6.646 9.146a.5.5 0 01.708 0l4 4a.5.5 0 01-.708.708L7 10.207l-3.646 3.647a.5.5 0 01-.708-.708l4-4z", + fill: color + } + ) + ); +}); +var ExpandIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.5 1h2a.5.5 0 010 1h-.793l3.147 3.146a.5.5 0 11-.708.708L2 2.707V3.5a.5.5 0 01-1 0v-2a.5.5 0 01.5-.5zM10 1.5a.5.5 0 01.5-.5h2a.5.5 0 01.5.5v2a.5.5 0 01-1 0v-.793L8.854 5.854a.5.5 0 11-.708-.708L11.293 2H10.5a.5.5 0 01-.5-.5zM12.5 10a.5.5 0 01.5.5v2a.5.5 0 01-.5.5h-2a.5.5 0 010-1h.793L8.146 8.854a.5.5 0 11.708-.708L12 11.293V10.5a.5.5 0 01.5-.5zM2 11.293V10.5a.5.5 0 00-1 0v2a.5.5 0 00.5.5h2a.5.5 0 000-1h-.793l3.147-3.146a.5.5 0 10-.708-.708L2 11.293z", + fill: color + } + ) + ); +}); +var UnfoldIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M6.646.147l-1.5 1.5a.5.5 0 10.708.707l.646-.647V5a.5.5 0 001 0V1.707l.646.647a.5.5 0 10.708-.707l-1.5-1.5a.5.5 0 00-.708 0z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.309 4.038a.498.498 0 00-.16.106l-.005.005a.498.498 0 00.002.705L3.293 7 1.146 9.146A.498.498 0 001.5 10h3a.5.5 0 000-1H2.707l1.5-1.5h5.586l2.353 2.354a.5.5 0 00.708-.708L10.707 7l2.146-2.146.11-.545-.107.542A.499.499 0 0013 4.503v-.006a.5.5 0 00-.144-.348l-.005-.005A.498.498 0 0012.5 4h-3a.5.5 0 000 1h1.793l-1.5 1.5H4.207L2.707 5H4.5a.5.5 0 000-1h-3a.498.498 0 00-.191.038z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7 8.5a.5.5 0 01.5.5v3.293l.646-.647a.5.5 0 01.708.708l-1.5 1.5a.5.5 0 01-.708 0l-1.5-1.5a.5.5 0 01.708-.708l.646.647V9a.5.5 0 01.5-.5zM9 9.5a.5.5 0 01.5-.5h3a.5.5 0 010 1h-3a.5.5 0 01-.5-.5z", + fill: color + } + ) + ); +}); +var TransferIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M10.646 2.646a.5.5 0 01.708 0l1.5 1.5a.5.5 0 010 .708l-1.5 1.5a.5.5 0 01-.708-.708L11.293 5H1.5a.5.5 0 010-1h9.793l-.647-.646a.5.5 0 010-.708zM3.354 8.354L2.707 9H12.5a.5.5 0 010 1H2.707l.647.646a.5.5 0 01-.708.708l-1.5-1.5a.5.5 0 010-.708l1.5-1.5a.5.5 0 11.708.708z", + fill: color + } + ) + ); +}); +var RedirectIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.5 1a.5.5 0 01.5.5V10a2 2 0 004 0V4a3 3 0 016 0v7.793l1.146-1.147a.5.5 0 01.708.708l-2 2a.5.5 0 01-.708 0l-2-2a.5.5 0 01.708-.708L11 11.793V4a2 2 0 10-4 0v6.002a3 3 0 01-6 0V1.5a.5.5 0 01.5-.5z", + fill: color + } + ) + ); +}); +var UndoIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.146 3.854a.5.5 0 010-.708l2-2a.5.5 0 11.708.708L2.707 3h6.295A4 4 0 019 11H3a.5.5 0 010-1h6a3 3 0 100-6H2.707l1.147 1.146a.5.5 0 11-.708.708l-2-2z", + fill: color + } + ) + ); +}); +var ReplyIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4.354 2.146a.5.5 0 010 .708L1.707 5.5H9.5A4.5 4.5 0 0114 10v1.5a.5.5 0 01-1 0V10a3.5 3.5 0 00-3.5-3.5H1.707l2.647 2.646a.5.5 0 11-.708.708l-3.5-3.5a.5.5 0 010-.708l3.5-3.5a.5.5 0 01.708 0z", + fill: color + } + ) + ); +}); +var SyncIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5.5 1A.5.5 0 005 .5H2a.5.5 0 000 1h1.535a6.502 6.502 0 002.383 11.91.5.5 0 10.165-.986A5.502 5.502 0 014.5 2.1V4a.5.5 0 001 0V1.353a.5.5 0 000-.023V1zM7.507 1a.5.5 0 01.576-.41 6.502 6.502 0 012.383 11.91H12a.5.5 0 010 1H9a.5.5 0 01-.5-.5v-3a.5.5 0 011 0v1.9A5.5 5.5 0 007.917 1.576.5.5 0 017.507 1z", + fill: color + } + ) + ); +}); +var UploadIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M8.646 5.854L7.5 4.707V10.5a.5.5 0 01-1 0V4.707L5.354 5.854a.5.5 0 11-.708-.708l2-2a.5.5 0 01.708 0l2 2a.5.5 0 11-.708.708z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z", + fill: color + } + ) + ); +}); +var DownloadIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5.354 8.146L6.5 9.293V3.5a.5.5 0 011 0v5.793l1.146-1.147a.5.5 0 11.708.708l-2 2a.5.5 0 01-.708 0l-2-2a.5.5 0 11.708-.708z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M0 7a7 7 0 1114 0A7 7 0 010 7zm1 0a6 6 0 1112 0A6 6 0 011 7z", + fill: color + } + ) + ); +}); +var BackIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M5.854 5.354L4.707 6.5H10.5a.5.5 0 010 1H4.707l1.147 1.146a.5.5 0 11-.708.708l-2-2a.5.5 0 010-.708l2-2a.5.5 0 11.708.708z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 0a7 7 0 110 14A7 7 0 017 0zm0 1a6 6 0 110 12A6 6 0 017 1z", + fill: color + } + ) + ); +}); +var ProceedIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3.5 6.5h5.793L8.146 5.354a.5.5 0 11.708-.708l2 2a.5.5 0 010 .708l-2 2a.5.5 0 11-.708-.708L9.293 7.5H3.5a.5.5 0 010-1z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 14A7 7 0 117 0a7 7 0 010 14zm0-1A6 6 0 117 1a6 6 0 010 12z", + fill: color + } + ) + ); +}); +var RefreshIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7.092.5H7a6.5 6.5 0 106.41 7.583.5.5 0 10-.986-.166A5.495 5.495 0 017 12.5a5.5 5.5 0 010-11h.006a5.5 5.5 0 014.894 3H10a.5.5 0 000 1h3a.5.5 0 00.5-.5V2a.5.5 0 00-1 0v1.535A6.495 6.495 0 007.092.5z", + fill: color + } + ) + ); +}); +var GlobeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 100 7a7 7 0 0014 0zm-6.535 5.738c-.233.23-.389.262-.465.262-.076 0-.232-.032-.465-.262-.238-.234-.497-.623-.737-1.182-.434-1.012-.738-2.433-.79-4.056h3.984c-.052 1.623-.356 3.043-.79 4.056-.24.56-.5.948-.737 1.182zM8.992 6.5H5.008c.052-1.623.356-3.044.79-4.056.24-.56.5-.948.737-1.182C6.768 1.032 6.924 1 7 1c.076 0 .232.032.465.262.238.234.497.623.737 1.182.434 1.012.738 2.433.79 4.056zm1 1c-.065 2.176-.558 4.078-1.282 5.253A6.005 6.005 0 0012.98 7.5H9.992zm2.987-1H9.992c-.065-2.176-.558-4.078-1.282-5.253A6.005 6.005 0 0112.98 6.5zm-8.971 0c.065-2.176.558-4.078 1.282-5.253A6.005 6.005 0 001.02 6.5h2.988zm-2.987 1a6.005 6.005 0 004.27 5.253C4.565 11.578 4.072 9.676 4.007 7.5H1.02z", + fill: color + } + ) + ); +}); +var CompassIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M10.087 3.397L5.95 5.793a.374.374 0 00-.109.095.377.377 0 00-.036.052l-2.407 4.147a.374.374 0 00-.004.384c.104.179.334.24.513.136l4.142-2.404a.373.373 0 00.148-.143l2.406-4.146a.373.373 0 00-.037-.443.373.373 0 00-.478-.074zM4.75 9.25l2.847-1.652-1.195-1.195L4.75 9.25z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z", + fill: color + } + ) + ); +}); +var LocationIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M0 7a7 7 0 1114 0A7 7 0 010 7zm6.5 3.5v2.48A6.001 6.001 0 011.02 7.5H3.5a.5.5 0 000-1H1.02A6.001 6.001 0 016.5 1.02V3.5a.5.5 0 001 0V1.02a6.001 6.001 0 015.48 5.48H10.5a.5.5 0 000 1h2.48a6.002 6.002 0 01-5.48 5.48V10.5a.5.5 0 00-1 0z", + fill: color + } + ) + ); +}); +var PinIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M9 5a2 2 0 11-4 0 2 2 0 014 0zM8 5a1 1 0 11-2 0 1 1 0 012 0z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M12 5A5 5 0 002 5c0 2.633 2.273 6.154 4.65 8.643.192.2.508.2.7 0C9.726 11.153 12 7.633 12 5zM7 1a4 4 0 014 4c0 1.062-.471 2.42-1.303 3.88-.729 1.282-1.69 2.562-2.697 3.67-1.008-1.108-1.968-2.388-2.697-3.67C3.47 7.42 3 6.063 3 5a4 4 0 014-4z", + fill: color + } + ) + ); +}); +var TimeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7 2a.5.5 0 01.5.5v4H10a.5.5 0 010 1H7a.5.5 0 01-.5-.5V2.5A.5.5 0 017 2z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z", + fill: color + } + ) + ); +}); +var DashboardIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M9.79 4.093a.5.5 0 01.117.698L7.91 7.586a1 1 0 11-.814-.581l1.997-2.796a.5.5 0 01.698-.116z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M2.069 12.968a7 7 0 119.863 0A12.962 12.962 0 007 12c-1.746 0-3.41.344-4.931.968zm9.582-1.177a6 6 0 10-9.301 0A13.98 13.98 0 017 11c1.629 0 3.194.279 4.65.791z", + fill: color + } + ) + ); +}); +var TimerIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("path", { d: "M7.5 4.5a.5.5 0 00-1 0v2.634a1 1 0 101 0V4.5z", fill: color }), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M5.5.5A.5.5 0 016 0h2a.5.5 0 010 1h-.5v1.02a5.973 5.973 0 013.374 1.398l.772-.772a.5.5 0 01.708.708l-.772.772A6 6 0 116.5 2.02V1H6a.5.5 0 01-.5-.5zM7 3a5 5 0 100 10A5 5 0 007 3z", + fill: color + } + ) + ); +}); +var HomeIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7.354 1.146l5.5 5.5a.5.5 0 01-.708.708L12 7.207V12.5a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V9H6v3.5a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V7.207l-.146.147a.5.5 0 11-.708-.708l1-1 4.5-4.5a.5.5 0 01.708 0zM3 6.207V12h2V8.5a.5.5 0 01.5-.5h3a.5.5 0 01.5.5V12h2V6.207l-4-4-4 4z", + fill: color + } + ) + ); +}); +var AdminIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1.213 4.094a.5.5 0 01.056-.034l5.484-2.995a.498.498 0 01.494 0L12.73 4.06a.507.507 0 01.266.389.498.498 0 01-.507.555H1.51a.5.5 0 01-.297-.91zm2.246-.09h7.082L7 2.07 3.459 4.004z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4 6a.5.5 0 00-1 0v5a.5.5 0 001 0V6zM11 6a.5.5 0 00-1 0v5a.5.5 0 001 0V6zM5.75 5.5a.5.5 0 01.5.5v5a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zM8.75 6a.5.5 0 00-1 0v5a.5.5 0 001 0V6zM1.5 12.504a.5.5 0 01.5-.5h10a.5.5 0 010 1H2a.5.5 0 01-.5-.5z", + fill: color + } + ) + ); +}); +var DirectionIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_1107_3594)" }, /* @__PURE__ */ React255.createElement( + "path", + { + d: "M11.451.537l.01 12.922L7.61 8.946a1.078 1.078 0 00-.731-.374L.965 8.087 11.45.537z", + stroke: color, + strokeWidth: 1.077 + } + )), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_1107_3594" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); +var UserIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zM2.671 11.155c.696-1.006 2.602-1.816 3.194-1.91.226-.036.232-.658.232-.658s-.665-.658-.81-1.544c-.39 0-.63-.94-.241-1.272a2.578 2.578 0 00-.012-.13c-.066-.607-.28-2.606 1.965-2.606 2.246 0 2.031 2 1.966 2.606l-.012.13c.39.331.149 1.272-.24 1.272-.146.886-.81 1.544-.81 1.544s.004.622.23.658c.593.094 2.5.904 3.195 1.91a6 6 0 10-8.657 0z", + fill: color + } + ) + ); +}); +var UserAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M7.275 13.16a11.388 11.388 0 005.175-1.232v-.25c0-1.566-3.237-2.994-4.104-3.132-.27-.043-.276-.783-.276-.783s.791-.783.964-1.836c.463 0 .75-1.119.286-1.513C9.34 4 9.916 1.16 6.997 1.16c-2.92 0-2.343 2.84-2.324 3.254-.463.394-.177 1.513.287 1.513.172 1.053.963 1.836.963 1.836s-.006.74-.275.783c-.858.136-4.036 1.536-4.103 3.082a11.388 11.388 0 005.73 1.532z", + fill: color + } + ) + ); +}); +var UserAddIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M1.183 11.906a10.645 10.645 0 01-1.181-.589c.062-1.439 3.02-2.74 3.818-2.868.25-.04.256-.728.256-.728s-.736-.729-.896-1.709c-.432 0-.698-1.041-.267-1.408A2.853 2.853 0 002.9 4.46c-.072-.672-.31-2.884 2.175-2.884 2.486 0 2.248 2.212 2.176 2.884-.007.062-.012.112-.014.144.432.367.165 1.408-.266 1.408-.16.98-.896 1.709-.896 1.709s.005.688.256.728c.807.129 3.82 1.457 3.82 2.915v.233a10.598 10.598 0 01-4.816 1.146c-1.441 0-2.838-.282-4.152-.837zM11.5 2.16a.5.5 0 01.5.5v1.5h1.5a.5.5 0 010 1H12v1.5a.5.5 0 01-1 0v-1.5H9.5a.5.5 0 110-1H11v-1.5a.5.5 0 01.5-.5z", + fill: color + } + ) + ); +}); +var UsersIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M9.21 11.623a10.586 10.586 0 01-4.031.787A10.585 10.585 0 010 11.07c.06-1.354 2.933-2.578 3.708-2.697.243-.038.249-.685.249-.685s-.715-.685-.87-1.607c-.42 0-.679-.979-.26-1.323a2.589 2.589 0 00-.013-.136c-.07-.632-.3-2.712 2.113-2.712 2.414 0 2.183 2.08 2.113 2.712-.007.059-.012.105-.013.136.419.344.16 1.323-.259 1.323-.156.922-.87 1.607-.87 1.607s.005.647.248.685c.784.12 3.71 1.37 3.71 2.74v.22c-.212.103-.427.2-.646.29z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M8.81 8.417a9.643 9.643 0 00-.736-.398c.61-.42 1.396-.71 1.7-.757.167-.026.171-.471.171-.471s-.491-.471-.598-1.104c-.288 0-.466-.674-.178-.91-.001-.022-.005-.053-.01-.094-.048-.434-.206-1.864 1.453-1.864 1.66 0 1.5 1.43 1.453 1.864l-.01.094c.289.236.11.91-.178.91-.107.633-.598 1.104-.598 1.104s.004.445.171.47c.539.084 2.55.942 2.55 1.884v.628a10.604 10.604 0 01-3.302.553 2.974 2.974 0 00-.576-.879c-.375-.408-.853-.754-1.312-1.03z", + fill: color + } + ) + ); +}); +var ProfileIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M9.106 7.354c-.627.265-1.295.4-1.983.4a5.062 5.062 0 01-2.547-.681c.03-.688 1.443-1.31 1.824-1.37.12-.02.122-.348.122-.348s-.351-.348-.428-.816c-.206 0-.333-.498-.127-.673 0-.016-.003-.04-.007-.07C5.926 3.477 5.812 2.42 7 2.42c1.187 0 1.073 1.057 1.039 1.378l-.007.069c.207.175.08.673-.127.673-.076.468-.428.816-.428.816s.003.329.122.348c.386.06 1.825.696 1.825 1.392v.111c-.104.053-.21.102-.318.148zM3.75 11.25A.25.25 0 014 11h6a.25.25 0 110 .5H4a.25.25 0 01-.25-.25zM4 9a.25.25 0 000 .5h6a.25.25 0 100-.5H4z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M1 .5a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v13a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5V.5zM2 13V1h10v12H2z", + fill: color + } + ) + ); +}); +var FaceHappyIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3.968 8.75a.5.5 0 00-.866.5A4.498 4.498 0 007 11.5c1.666 0 3.12-.906 3.898-2.25a.5.5 0 10-.866-.5A3.498 3.498 0 017 10.5a3.498 3.498 0 01-3.032-1.75zM5.5 5a1 1 0 11-2 0 1 1 0 012 0zM9.5 6a1 1 0 100-2 1 1 0 000 2z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z", + fill: color + } + ) + ); +}); +var FaceNeutralIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M4.5 9a.5.5 0 000 1h5a.5.5 0 000-1h-5zM5.5 5a1 1 0 11-2 0 1 1 0 012 0zM9.5 6a1 1 0 100-2 1 1 0 000 2z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z", + fill: color + } + ) + ); +}); +var FaceSadIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3.968 10.25a.5.5 0 01-.866-.5A4.498 4.498 0 017 7.5c1.666 0 3.12.906 3.898 2.25a.5.5 0 11-.866.5A3.498 3.498 0 007 8.5a3.498 3.498 0 00-3.032 1.75zM5.5 5a1 1 0 11-2 0 1 1 0 012 0zM9.5 6a1 1 0 100-2 1 1 0 000 2z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z", + fill: color + } + ) + ); +}); +var AccessibilityIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + d: "M3.526 4.842a.5.5 0 01.632-.316l2.051.684a2.5 2.5 0 001.582 0l2.05-.684a.5.5 0 01.317.948l-2.453.818a.3.3 0 00-.205.285v.243a4.5 4.5 0 00.475 2.012l.972 1.944a.5.5 0 11-.894.448L7 9.118l-1.053 2.106a.5.5 0 11-.894-.447l.972-1.945A4.5 4.5 0 006.5 6.82v-.243a.3.3 0 00-.205-.285l-2.453-.818a.5.5 0 01-.316-.632z", + fill: color + } + ), + /* @__PURE__ */ React255.createElement("path", { d: "M7 4.5a1 1 0 100-2 1 1 0 000 2z", fill: color }), + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z", + fill: color + } + ) + ); +}); +var AccessibilityAltIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M7 14A7 7 0 107 0a7 7 0 000 14zM8 3.5a1 1 0 11-2 0 1 1 0 012 0zM3.526 4.842a.5.5 0 01.632-.316l2.051.684a2.5 2.5 0 001.582 0l2.05-.684a.5.5 0 01.317.948l-2.453.818a.3.3 0 00-.205.285v.243a4.5 4.5 0 00.475 2.012l.972 1.944a.5.5 0 11-.894.448L7 9.118l-1.053 2.106a.5.5 0 11-.894-.447l.972-1.945A4.5 4.5 0 006.5 6.82v-.243a.3.3 0 00-.205-.285l-2.453-.818a.5.5 0 01-.316-.632z", + fill: color + } + ) + ); +}); +var AccessibilityIgnoredIcon = /* @__PURE__ */ React255.forwardRef(({ color = "currentColor", size = 14, ...props }, forwardedRef) => { + return /* @__PURE__ */ React255.createElement( + "svg", + { + width: size, + height: size, + viewBox: "0 0 14 14", + fill: "none", + xmlns: "http://www.w3.org/2000/svg", + ref: forwardedRef, + ...props + }, + /* @__PURE__ */ React255.createElement("g", { clipPath: "url(#prefix__clip0_2359_558)", fill: color }, /* @__PURE__ */ React255.createElement("path", { d: "M7.636 13.972a7 7 0 116.335-6.335c-.28-.34-.609-.637-.976-.883a6 6 0 10-6.24 6.241c.245.367.542.696.881.977z" }), /* @__PURE__ */ React255.createElement("path", { d: "M7.511 7.136a4.489 4.489 0 00-1.478 3.915l-.086.173a.5.5 0 11-.894-.447l.972-1.945A4.5 4.5 0 006.5 6.82v-.243a.3.3 0 00-.205-.285l-2.453-.818a.5.5 0 01.316-.948l2.051.684a2.5 2.5 0 001.582 0l2.05-.684a.5.5 0 01.317.948l-2.453.818a.3.3 0 00-.205.285v.243c0 .105.004.21.011.316z" }), /* @__PURE__ */ React255.createElement("path", { d: "M8 3.5a1 1 0 11-2 0 1 1 0 012 0z" }), /* @__PURE__ */ React255.createElement( + "path", + { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M14 10.5a3.5 3.5 0 11-7 0 3.5 3.5 0 017 0zm-5.5 0A.5.5 0 019 10h3a.5.5 0 010 1H9a.5.5 0 01-.5-.5z" + } + )), + /* @__PURE__ */ React255.createElement("defs", null, /* @__PURE__ */ React255.createElement("clipPath", { id: "prefix__clip0_2359_558" }, /* @__PURE__ */ React255.createElement("path", { fill: "#fff", d: "M0 0h14v14H0z" }))) + ); +}); + +export { AccessibilityAltIcon, AccessibilityIcon, AccessibilityIgnoredIcon, AddIcon, AdminIcon, AlertAltIcon, AlertIcon, AlignLeftIcon, AlignRightIcon, AppleIcon, ArrowBottomLeftIcon, ArrowBottomRightIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowSolidDownIcon, ArrowSolidLeftIcon, ArrowSolidRightIcon, ArrowSolidUpIcon, ArrowTopLeftIcon, ArrowTopRightIcon, ArrowUpIcon, AzureDevOpsIcon, BackIcon, BasketIcon, BatchAcceptIcon, BatchDenyIcon, BeakerIcon, BellIcon, BitbucketIcon, BoldIcon, BookIcon, BookmarkHollowIcon, BookmarkIcon, BottomBarIcon, BottomBarToggleIcon, BoxIcon, BranchIcon, BrowserIcon, BugIcon, ButtonIcon, CPUIcon, CalendarIcon, CameraIcon, CameraStabilizeIcon, CategoryIcon, CertificateIcon, ChangedIcon, ChatIcon, CheckIcon, ChecklistIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronSmallDownIcon, ChevronSmallLeftIcon, ChevronSmallRightIcon, ChevronSmallUpIcon, ChevronUpIcon, ChromaticIcon, ChromeIcon, CircleHollowIcon, CircleIcon, ClearIcon, CloseAltIcon, CloseIcon, CloudHollowIcon, CloudIcon, CogIcon, CollapseIcon, CommandIcon, CommentAddIcon, CommentIcon, CommentsIcon, CommitIcon, CompassIcon, ComponentDrivenIcon, ComponentIcon, ContrastIcon, ContrastIgnoredIcon, ControlsIcon, CopyIcon, CreditIcon, CrossIcon, DashboardIcon, DatabaseIcon, DeleteIcon, DiamondIcon, DirectionIcon, DiscordIcon, DocChartIcon, DocListIcon, DocumentIcon, DownloadIcon, DragIcon, EditIcon, EditorIcon, EllipsisIcon, EmailIcon, ExpandAltIcon, ExpandIcon, EyeCloseIcon, EyeIcon, FaceHappyIcon, FaceNeutralIcon, FaceSadIcon, FacebookIcon, FailedIcon, FastForwardIcon, FigmaIcon, FilesIcon, FilterIcon, FlagIcon, FolderIcon, FormIcon, GDriveIcon, GiftIcon, GithubIcon, GitlabIcon, GlobeIcon, GoogleIcon, GraphBarIcon, GraphLineIcon, GraphqlIcon, GridAltIcon, GridIcon, GrowIcon, HeartHollowIcon, HeartIcon, HomeIcon, HourglassIcon, InfoIcon, ItalicIcon, JumpToIcon, KeyIcon, LightningIcon, LightningOffIcon, LinkBrokenIcon, LinkIcon, LinkedinIcon, LinuxIcon, ListOrderedIcon, ListUnorderedIcon, LocationIcon, LockIcon, MarkdownIcon, MarkupIcon, MediumIcon, MemoryIcon, MenuIcon, MergeIcon, MirrorIcon, MobileIcon, MoonIcon, NutIcon, OutboxIcon, OutlineIcon, PaintBrushAltIcon, PaintBrushIcon, PaperClipIcon, ParagraphIcon, PassedIcon, PhoneIcon, PhotoDragIcon, PhotoIcon, PhotoStabilizeIcon, PinAltIcon, PinIcon, PlayAllHollowIcon, PlayBackIcon, PlayHollowIcon, PlayIcon, PlayNextIcon, PlusIcon, PointerDefaultIcon, PointerHandIcon, PopOutIcon, PowerIcon, PrintIcon, ProceedIcon, ProfileIcon, PullRequestIcon, QuestionIcon, RSSIcon, RedirectIcon, ReduxIcon, RefreshIcon, ReplyIcon, RepoIcon, RequestChangeIcon, RewindIcon, RulerIcon, SaveIcon, SearchIcon, ShareAltIcon, ShareIcon, ShieldIcon, SideBySideIcon, SidebarAltIcon, SidebarAltToggleIcon, SidebarIcon, SidebarToggleIcon, SortDownIcon, SortUpIcon, SpeakerIcon, StackedIcon, StarHollowIcon, StarIcon, StatusFailIcon, StatusIcon, StatusNewIcon, StatusPassIcon, StatusWarnIcon, StickerIcon, StopAltHollowIcon, StopAltIcon, StopIcon, StorybookIcon, StructureIcon, SubtractIcon, SunIcon, SupportIcon, SweepIcon, SwitchAltIcon, SyncIcon, TabletIcon, ThumbsUpIcon, TimeIcon, TimerIcon, TransferIcon, TrashIcon, TwitterIcon, TypeIcon, UbuntuIcon, UndoIcon, UnfoldIcon, UnlockIcon, UnpinIcon, UploadIcon, UserAddIcon, UserAltIcon, UserIcon, UsersIcon, VSCodeIcon, VerifiedIcon, VideoIcon, WandIcon, WatchIcon, WindowsIcon, WrenchIcon, XIcon, YoutubeIcon, ZoomIcon, ZoomOutIcon, ZoomResetIcon, iconList }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/public/cover.jpg b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/public/cover.jpg new file mode 100644 index 0000000000000000000000000000000000000000..eede329f5eb240de942a2cf80a98a867e054cbf3 Binary files /dev/null and b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/public/cover.jpg differ diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/public/logo.png b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/public/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d99faf748082017eb83b5b57261dccb2dbee1819 Binary files /dev/null and b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/dist/public/logo.png differ diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ff8daf3607c1cf92053d5ffb2683a8aee8c2b04f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/icons/package.json @@ -0,0 +1,87 @@ +{ + "name": "@storybook/icons", + "version": "2.0.2", + "description": "Icon library from the Storybook team", + "homepage": "https://github.com/storybookjs/icons#readme", + "bugs": { + "url": "https://github.com/storybookjs/icons/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/storybookjs/icons.git" + }, + "license": "MIT", + "author": { + "name": "cdedreuille", + "email": "charles@chromatic.com" + }, + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, + "files": [ + "dist" + ], + "lint-staged": { + "*": "prettier --write" + }, + "devDependencies": { + "@changesets/changelog-github": "^0.5.1", + "@changesets/cli": "^2.29.6", + "@chromatic-com/storybook": "^4.1.1", + "@storybook/addon-a11y": "10.2.0-beta.4", + "@storybook/addon-docs": "10.2.0-beta.4", + "@storybook/react-vite": "10.2.0-beta.4", + "@svgr/core": "5.5.0", + "@svgr/plugin-prettier": "5.5.0", + "@svgr/plugin-svgo": "5.5.0", + "@types/node": "^22.12.0", + "@types/react": "^18.2.14", + "@types/react-dom": "^18.0.11", + "@vitejs/plugin-react": "^5.1.0", + "axios": "^1.13.2", + "chromatic": "^13.3.3", + "concurrently": "^9.2.1", + "dotenv": "^17.2.3", + "figma-api-exporter": "0.0.2", + "figma-js": "1.16.0", + "figma-transformer": "2.1.0", + "jiti": "^2.6.1", + "lint-staged": "^16.2.6", + "oxlint": "^1.28.0", + "picocolors": "^1.1.1", + "pkg-pr-new": "^0.0.57", + "prettier": "^3.6.2", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "storybook": "10.2.0-beta.4", + "tsup": "^8.5.0", + "typescript": "^5.9.3", + "vite": "^7.2.2" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org" + }, + "scripts": { + "build": "tsup --onSuccess \"cp -a public/. dist/public\"", + "build-storybook": "storybook build", + "changeset": "changeset", + "chromatic": "npx chromatic --project-token=chpt_d0c5927e55681dd", + "dev": "concurrently -n \"Build,SB\" \"pnpm build --watch\" \"pnpm storybook\" ", + "format": "prettier --write .", + "generate-icons": "jiti ./src/generate.ts", + "lint": "oxlint", + "release": "pnpm build && pnpm changeset publish", + "storybook": "storybook dev -p 6006", + "type-check": "tsc" + } +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8d68592a6343afe14766ecf1adc36dee1220c86b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/README.md @@ -0,0 +1,5 @@ +# React Dom Shim + +A shim for `react-dom` that provides a single API that will work whether the user is on `react-dom@17` or `react-dom@18`, as well as webpack/vite config necessary to make that work. + +Learn more about Storybook at [storybook.js.org](https://storybook.js.org/?ref=readme). diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/preset.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/preset.js new file mode 100644 index 0000000000000000000000000000000000000000..a28b8db5323665ecae0acf3e3743c4e2f15c537e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/preset.js @@ -0,0 +1,253 @@ +import CJS_COMPAT_NODE_URL_w9pule82i2 from 'node:url'; +import CJS_COMPAT_NODE_PATH_w9pule82i2 from 'node:path'; +import CJS_COMPAT_NODE_MODULE_w9pule82i2 from "node:module"; + +var __filename = CJS_COMPAT_NODE_URL_w9pule82i2.fileURLToPath(import.meta.url); +var __dirname = CJS_COMPAT_NODE_PATH_w9pule82i2.dirname(__filename); +var require = CJS_COMPAT_NODE_MODULE_w9pule82i2.createRequire(import.meta.url); + +// ------------------------------------------------------------ +// end of CJS compatibility banner, injected by Storybook's esbuild configuration +// ------------------------------------------------------------ + +// src/preset.ts +import { readFile } from "node:fs/promises"; +import { isAbsolute as isAbsolute2, join as join2 } from "node:path"; + +// ../../core/src/shared/utils/module.ts +import { fileURLToPath, pathToFileURL } from "node:url"; + +// ../../../node_modules/exsolve/dist/index.mjs +import assert from "node:assert"; +import v8 from "node:v8"; +import { format, inspect } from "node:util"; +var own$1 = {}.hasOwnProperty, classRegExp = /^([A-Z][a-z\d]*)+$/, kTypes = /* @__PURE__ */ new Set([ + "string", + "function", + "number", + "object", + "Function", + "Object", + "boolean", + "bigint", + "symbol" +]), messages = /* @__PURE__ */ new Map(), nodeInternalPrefix = "__node_internal_", userStackTraceLimit; +function formatList(array, type = "and") { + return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`; +} +function createError(sym, value, constructor) { + return messages.set(sym, value), makeNodeErrorWithCode(constructor, sym); +} +function makeNodeErrorWithCode(Base, key) { + return function(...parameters) { + let limit = Error.stackTraceLimit; + isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = 0); + let error = new Base(); + isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = limit); + let message = getMessage(key, parameters, error); + return Object.defineProperties(error, { + message: { + value: message, + enumerable: !1, + writable: !0, + configurable: !0 + }, + toString: { + value() { + return `${this.name} [${key}]: ${this.message}`; + }, + enumerable: !1, + writable: !0, + configurable: !0 + } + }), captureLargerStackTrace(error), error.code = key, error; + }; +} +function isErrorStackTraceLimitWritable() { + try { + if (v8.startupSnapshot.isBuildingSnapshot()) return !1; + } catch { + } + let desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit"); + return desc === void 0 ? Object.isExtensible(Error) : own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0; +} +function hideStackFrames(wrappedFunction) { + let hidden = nodeInternalPrefix + wrappedFunction.name; + return Object.defineProperty(wrappedFunction, "name", { value: hidden }), wrappedFunction; +} +var captureLargerStackTrace = hideStackFrames(function(error) { + let stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); + return stackTraceLimitIsWritable && (userStackTraceLimit = Error.stackTraceLimit, Error.stackTraceLimit = Number.POSITIVE_INFINITY), Error.captureStackTrace(error), stackTraceLimitIsWritable && (Error.stackTraceLimit = userStackTraceLimit), error; +}); +function getMessage(key, parameters, self) { + let message = messages.get(key); + if (assert.ok(message !== void 0, "expected `message` to be found"), typeof message == "function") + return assert.ok(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`), Reflect.apply(message, self, parameters); + let regex = /%[dfijoOs]/g, expectedLength = 0; + for (; regex.exec(message) !== null; ) expectedLength++; + return assert.ok(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`), parameters.length === 0 ? message : (parameters.unshift(message), Reflect.apply(format, null, parameters)); +} +function determineSpecificType(value) { + if (value == null) return String(value); + if (typeof value == "function" && value.name) return `function ${value.name}`; + if (typeof value == "object") + return value.constructor && value.constructor.name ? `an instance of ${value.constructor.name}` : `${inspect(value, { depth: -1 })}`; + let inspected = inspect(value, { colors: !1 }); + return inspected.length > 28 && (inspected = `${inspected.slice(0, 25)}...`), `type ${typeof value} (${inspected})`; +} +var ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (name, expected, actual) => { + assert.ok(typeof name == "string", "'name' must be a string"), Array.isArray(expected) || (expected = [expected]); + let message = "The "; + if (name.endsWith(" argument")) message += `${name} `; + else { + let type = name.includes(".") ? "property" : "argument"; + message += `"${name}" ${type} `; + } + message += "must be "; + let types = [], instances = [], other = []; + for (let value of expected) + assert.ok(typeof value == "string", "All expected entries have to be of type string"), kTypes.has(value) ? types.push(value.toLowerCase()) : classRegExp.exec(value) === null ? (assert.ok(value !== "object", 'The value "object" should be written as "Object"'), other.push(value)) : instances.push(value); + if (instances.length > 0) { + let pos = types.indexOf("object"); + pos !== -1 && (types.slice(pos, 1), instances.push("Object")); + } + return types.length > 0 && (message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`, (instances.length > 0 || other.length > 0) && (message += " or ")), instances.length > 0 && (message += `an instance of ${formatList(instances, "or")}`, other.length > 0 && (message += " or ")), other.length > 0 && (other.length > 1 ? message += `one of ${formatList(other, "or")}` : (other[0]?.toLowerCase() !== other[0] && (message += "an "), message += `${other[0]}`)), message += `. Received ${determineSpecificType(actual)}`, message; +}, TypeError), ERR_INVALID_MODULE_SPECIFIER = createError( + "ERR_INVALID_MODULE_SPECIFIER", + /** + * @param {string} request + * @param {string} reason + * @param {string} [base] + */ + (request, reason, base) => `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`, + TypeError +), ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path$1, base, message) => `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`, Error), ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (packagePath, key, target, isImport = !1, base) => { + let relatedError = typeof target == "string" && !isImport && target.length > 0 && !target.startsWith("./"); + return key === "." ? (assert.ok(isImport === !1), `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`) : `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`; +}, Error), ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (path$1, base, exactUrl = !1) => `Cannot find ${exactUrl ? "module" : "package"} '${path$1}' imported from ${base}`, Error), ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error), ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`, TypeError), ERR_PACKAGE_PATH_NOT_EXPORTED = createError( + "ERR_PACKAGE_PATH_NOT_EXPORTED", + /** + * @param {string} packagePath + * @param {string} subpath + * @param {string} [base] + */ + (packagePath, subpath, base) => subpath === "." ? `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}` : `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`, + Error +), ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error), ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", 'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.', TypeError), ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (extension, path$1) => `Unknown file extension "${extension}" for ${path$1}`, TypeError), ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (name, value, reason = "is invalid") => { + let inspected = inspect(value); + return inspected.length > 128 && (inspected = `${inspected.slice(0, 128)}...`), `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`; +}, TypeError), hasOwnProperty$1 = {}.hasOwnProperty; +var hasOwnProperty = {}.hasOwnProperty; +var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace], own = {}.hasOwnProperty; +var isWindows = process.platform === "win32", globalCache = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map(); + +// ../../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs +var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//; +function normalizeWindowsPath(input = "") { + return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase()); +} +var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/; +var normalize = function(path2) { + if (path2.length === 0) + return "."; + path2 = normalizeWindowsPath(path2); + let isUNCPath = path2.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = path2[path2.length - 1] === "/"; + return path2 = normalizeString(path2, !isPathAbsolute), path2.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2); +}, join = function(...arguments_) { + if (arguments_.length === 0) + return "."; + let joined; + for (let argument of arguments_) + argument && argument.length > 0 && (joined === void 0 ? joined = argument : joined += `/${argument}`); + return joined === void 0 ? "." : normalize(joined.replace(/\/\/+/g, "/")); +}; +function normalizeString(path2, allowAboveRoot) { + let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null; + for (let index = 0; index <= path2.length; ++index) { + if (index < path2.length) + char = path2[index]; + else { + if (char === "/") + break; + char = "/"; + } + if (char === "/") { + if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) { + if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") { + if (res.length > 2) { + let lastSlashIndex = res.lastIndexOf("/"); + lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0; + continue; + } else if (res.length > 0) { + res = "", lastSegmentLength = 0, lastSlash = index, dots = 0; + continue; + } + } + allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2); + } else + res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1; + lastSlash = index, dots = 0; + } else char === "." && dots !== -1 ? ++dots : dots = -1; + } + return res; +} +var isAbsolute = function(p) { + return _IS_ABSOLUTE_RE.test(p); +}; +var dirname = function(p) { + let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1); + return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : "."); +}; + +// ../../core/src/shared/utils/module.ts +var importMetaResolve = (...args) => typeof import.meta.resolve != "function" && process.env.VITEST === "true" ? (console.warn( + "importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml" +), pathToFileURL(args[0]).href) : import.meta.resolve(...args), resolvePackageDir = (pkg, parent) => { + try { + return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent))); + } catch { + return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json")))); + } +}; + +// src/preset.ts +var getIsReactVersion18or19 = async (options) => { + let { legacyRootApi } = await options.presets.apply("frameworkOptions") || {}; + if (legacyRootApi) + return !1; + let reactDom = (await options.presets.apply("resolvedReact", {})).reactDom || resolvePackageDir("react-dom"); + if (!isAbsolute2(reactDom)) + return !1; + let { version } = JSON.parse(await readFile(join2(reactDom, "package.json"), "utf-8")); + return version.startsWith("18") || version.startsWith("19") || version.startsWith("0.0.0"); +}, webpackFinal = async (config, options) => await getIsReactVersion18or19(options) ? config : { + ...config, + resolve: { + ...config.resolve, + alias: { + ...config.resolve?.alias, + "@storybook/react-dom-shim": "@storybook/react-dom-shim/react-16" + } + } +}, viteFinal = async (config, options) => { + if (await getIsReactVersion18or19(options)) + return config; + let alias = Array.isArray(config.resolve?.alias) ? config.resolve.alias.concat({ + find: /^@storybook\/react-dom-shim$/, + replacement: "@storybook/react-dom-shim/react-16" + }) : { + ...config.resolve?.alias, + "@storybook/react-dom-shim": "@storybook/react-dom-shim/react-16" + }; + return { + ...config, + resolve: { + ...config.resolve, + alias + } + }; +}; +export { + viteFinal, + webpackFinal +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/react-16.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/react-16.js new file mode 100644 index 0000000000000000000000000000000000000000..507e2830ed128d6775efc4e39b58368eb9f2b92c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/react-16.js @@ -0,0 +1,11 @@ +// src/react-16.tsx +import * as ReactDOM from "react-dom"; +var renderElement = async (node, el) => new Promise((resolve) => { + ReactDOM.render(node, el, () => resolve(null)); +}), unmountElement = (el) => { + ReactDOM.unmountComponentAtNode(el); +}; +export { + renderElement, + unmountElement +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/react-18.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/react-18.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e58d749c7d4fc1993114b6b553beee7117fc689e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/react-18.d.ts @@ -0,0 +1,7 @@ +import { ReactElement } from 'react'; +import { RootOptions } from 'react-dom/client'; + +declare const renderElement: (node: ReactElement, el: Element, rootOptions?: RootOptions) => Promise; +declare const unmountElement: (el: Element, shouldUseNewRootApi?: boolean) => void; + +export { renderElement, unmountElement }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/react-18.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/react-18.js new file mode 100644 index 0000000000000000000000000000000000000000..9ab711b0ea4edbca6572a2ea9ea83f3fd8dedcaf --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/dist/react-18.js @@ -0,0 +1,41 @@ +// src/react-18.tsx +import * as React from "react"; +import * as ReactDOM from "react-dom/client"; +var nodes = /* @__PURE__ */ new Map(); +function getIsReactActEnvironment() { + return globalThis.IS_REACT_ACT_ENVIRONMENT; +} +var WithCallback = ({ + callback, + children +}) => { + let once = React.useRef(); + return React.useLayoutEffect(() => { + once.current !== callback && (once.current = callback, callback()); + }, [callback]), children; +}; +typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => { + let resolve = null, reject = null; + return { promise: new Promise((res, rej) => { + resolve = res, reject = rej; + }), resolve, reject }; +}); +var renderElement = async (node, el, rootOptions) => { + let root = await getReactRoot(el, rootOptions); + if (getIsReactActEnvironment()) { + root.render(node); + return; + } + let { promise, resolve } = Promise.withResolvers(); + return root.render(React.createElement(WithCallback, { callback: resolve }, node)), promise; +}, unmountElement = (el, shouldUseNewRootApi) => { + let root = nodes.get(el); + root && (root.unmount(), nodes.delete(el)); +}, getReactRoot = async (el, rootOptions) => { + let root = nodes.get(el); + return root || (root = ReactDOM.createRoot(el, rootOptions), nodes.set(el, root)), root; +}; +export { + renderElement, + unmountElement +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/package.json new file mode 100644 index 0000000000000000000000000000000000000000..cedc5b91953acf5948cb7bcd0277cd98cd061f7f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/react-dom-shim/package.json @@ -0,0 +1,52 @@ +{ + "name": "@storybook/react-dom-shim", + "version": "10.2.4", + "description": "", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/next/code/lib/react-dom-shim", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "code/lib/react-dom-shim" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/react-18.d.ts", + "default": "./dist/react-18.js" + }, + "./package.json": "./package.json", + "./preset": "./dist/preset.js", + "./react-16": "./dist/react-16.js" + }, + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts", + "!src/**/*" + ], + "devDependencies": { + "typescript": "^5.8.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "storybook": "^10.2.4" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae1l" +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/README.md new file mode 100644 index 0000000000000000000000000000000000000000..65b56c4971467cc82f018c97102dcaf7c6f19e6d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/README.md @@ -0,0 +1,5 @@ +# Storybook for Svelte & Vite + +See [documentation](https://storybook.js.org/docs/get-started/frameworks/svelte-vite?renderer=svelte&ref=readme) for installation instructions, usage examples, APIs, and more. + +Learn more about Storybook at [storybook.js.org](https://storybook.js.org/?ref=readme). diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c2be13a143bd078f5abb85744ae20288bb3b9fec --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/index.d.ts @@ -0,0 +1,33 @@ +export * from '@storybook/svelte'; +import { StorybookConfig as StorybookConfig$1, CompatibleString } from 'storybook/internal/types'; +import { BuilderOptions, StorybookConfigVite } from '@storybook/builder-vite'; + +type FrameworkName = CompatibleString<'@storybook/svelte-vite'>; +type BuilderName = CompatibleString<'@storybook/builder-vite'>; +type FrameworkOptions = { + builder?: BuilderOptions; + /** + * Enable or disable automatic documentation generation for component properties, events, and + * slots. When disabled, Storybook will skip the docgen processing step during build, which can + * improve build performance. + * + * @default true + */ + docgen?: boolean; +}; +type StorybookConfigFramework = { + framework: FrameworkName | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfig$1['core'] & { + builder?: BuilderName | { + name: BuilderName; + options: BuilderOptions; + }; + }; +}; +/** The interface for Storybook configuration in `main.ts` files. */ +type StorybookConfig = Omit & StorybookConfigVite & StorybookConfigFramework; + +export type { FrameworkOptions, StorybookConfig }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..cee8c56da797a24f5c1ba3e4f83c78f4a348da7a --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/index.js @@ -0,0 +1,2 @@ +// src/index.ts +export * from "@storybook/svelte"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/node/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/node/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a6e65e1860703fb84f7bbca44c37b4a28db3de39 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/node/index.d.ts @@ -0,0 +1,34 @@ +import { StorybookConfig as StorybookConfig$1, CompatibleString } from 'storybook/internal/types'; +import { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite'; + +type FrameworkName = CompatibleString<'@storybook/svelte-vite'>; +type BuilderName = CompatibleString<'@storybook/builder-vite'>; +type FrameworkOptions = { + builder?: BuilderOptions; + /** + * Enable or disable automatic documentation generation for component properties, events, and + * slots. When disabled, Storybook will skip the docgen processing step during build, which can + * improve build performance. + * + * @default true + */ + docgen?: boolean; +}; +type StorybookConfigFramework = { + framework: FrameworkName | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfig$1['core'] & { + builder?: BuilderName | { + name: BuilderName; + options: BuilderOptions; + }; + }; +}; +/** The interface for Storybook configuration in `main.ts` files. */ +type StorybookConfig = Omit & StorybookConfigVite & StorybookConfigFramework; + +declare function defineMain(config: StorybookConfig): StorybookConfig; + +export { type StorybookConfig, defineMain }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/node/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/node/index.js new file mode 100644 index 0000000000000000000000000000000000000000..9e077c9ff1c1f46c083dc7273ba497e6bce101e4 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/node/index.js @@ -0,0 +1,19 @@ +import CJS_COMPAT_NODE_URL_af4urdvfbv5 from 'node:url'; +import CJS_COMPAT_NODE_PATH_af4urdvfbv5 from 'node:path'; +import CJS_COMPAT_NODE_MODULE_af4urdvfbv5 from "node:module"; + +var __filename = CJS_COMPAT_NODE_URL_af4urdvfbv5.fileURLToPath(import.meta.url); +var __dirname = CJS_COMPAT_NODE_PATH_af4urdvfbv5.dirname(__filename); +var require = CJS_COMPAT_NODE_MODULE_af4urdvfbv5.createRequire(import.meta.url); + +// ------------------------------------------------------------ +// end of CJS compatibility banner, injected by Storybook's esbuild configuration +// ------------------------------------------------------------ + +// src/node/index.ts +function defineMain(config) { + return config; +} +export { + defineMain +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/preset.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/preset.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..239c50df49ef94363ba1976d46da5bb3f460eb19 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/preset.d.ts @@ -0,0 +1,35 @@ +import { StorybookConfig as StorybookConfig$1, CompatibleString, PresetProperty } from 'storybook/internal/types'; +import { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite'; + +type FrameworkName = CompatibleString<'@storybook/svelte-vite'>; +type BuilderName = CompatibleString<'@storybook/builder-vite'>; +type FrameworkOptions = { + builder?: BuilderOptions; + /** + * Enable or disable automatic documentation generation for component properties, events, and + * slots. When disabled, Storybook will skip the docgen processing step during build, which can + * improve build performance. + * + * @default true + */ + docgen?: boolean; +}; +type StorybookConfigFramework = { + framework: FrameworkName | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfig$1['core'] & { + builder?: BuilderName | { + name: BuilderName; + options: BuilderOptions; + }; + }; +}; +/** The interface for Storybook configuration in `main.ts` files. */ +type StorybookConfig = Omit & StorybookConfigVite & StorybookConfigFramework; + +declare const core: PresetProperty<'core'>; +declare const viteFinal: NonNullable; + +export { core, viteFinal }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/preset.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/preset.js new file mode 100644 index 0000000000000000000000000000000000000000..6637ba2f677466695b562814e586d1efef671958 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/dist/preset.js @@ -0,0 +1,378 @@ +import CJS_COMPAT_NODE_URL_af4urdvfbv5 from 'node:url'; +import CJS_COMPAT_NODE_PATH_af4urdvfbv5 from 'node:path'; +import CJS_COMPAT_NODE_MODULE_af4urdvfbv5 from "node:module"; + +var __filename = CJS_COMPAT_NODE_URL_af4urdvfbv5.fileURLToPath(import.meta.url); +var __dirname = CJS_COMPAT_NODE_PATH_af4urdvfbv5.dirname(__filename); +var require = CJS_COMPAT_NODE_MODULE_af4urdvfbv5.createRequire(import.meta.url); + +// ------------------------------------------------------------ +// end of CJS compatibility banner, injected by Storybook's esbuild configuration +// ------------------------------------------------------------ + +// src/plugins/svelte-docgen.ts +import { basename, relative } from "node:path"; +import MagicString from "magic-string"; + +// src/plugins/generateDocgen.ts +import path from "node:path"; +import svelte2tsx, { internalHelpers } from "svelte2tsx"; +import { VERSION } from "svelte/compiler"; +import ts from "typescript"; +function convertType(type, checker) { + if (type.flags & ts.TypeFlags.Any) + return { type: "any" }; + if (type.flags & ts.TypeFlags.Number) + return { type: "number" }; + if (type.flags & ts.TypeFlags.String) + return { type: "string" }; + if (type.flags & ts.TypeFlags.Boolean) + return { type: "boolean" }; + if (type.flags & ts.TypeFlags.ESSymbol) + return { type: "symbol" }; + if (type.flags & ts.TypeFlags.Null) + return { type: "null" }; + if (type.flags & ts.TypeFlags.Undefined) + return { type: "undefined" }; + if (type.flags & ts.TypeFlags.Void) + return { type: "void" }; + if (type.getCallSignatures().length > 0) + return { type: "function", text: checker.typeToString(type) }; + if (type.flags & ts.TypeFlags.Object) + return checker.getIndexTypeOfType(type, ts.IndexKind.Number) ? { type: "array", text: checker.typeToString(type) } : { type: "object", text: checker.typeToString(type) }; + if (type.isNumberLiteral() || type.isStringLiteral()) + return { + type: "literal", + value: type.value, + text: type.flags & ts.TypeFlags.EnumLiteral ? checker.typeToString(type) : JSON.stringify(type.value) + }; + if (type.flags & ts.TypeFlags.BooleanLiteral) { + let text = checker.typeToString(type); + return { type: "literal", value: text === "true", text }; + } + if (type.isUnion()) { + let types = type.types.map((t) => convertType(t, checker)).filter((t) => t !== void 0 && t.type !== "undefined"), idxTrue = types.findIndex((t) => t.type === "literal" && t.value === !0), idxFalse = types.findIndex((t) => t.type === "literal" && t.value === !1); + return idxTrue !== -1 && idxFalse !== -1 && (types.splice(Math.max(idxTrue, idxFalse), 1), types.splice(Math.min(idxTrue, idxFalse), 1, { type: "boolean" })), types.length > 1 ? { type: "union", types } : types[0]; + } + if (type.isIntersection()) + return { type: "intersection", types: type.types.map((t) => convertType(t, checker)).filter((t) => t !== void 0) }; +} +function initializerToDefaultValue(expr, checker) { + if (ts.isNumericLiteral(expr)) + return { text: expr.text }; + if (ts.isStringLiteral(expr)) + return { text: JSON.stringify(expr.text) }; + if (ts.isIdentifier(expr) || ts.isPropertyAccessExpression(expr)) { + let symbol = checker.getSymbolAtLocation(expr); + if (symbol && checker.isUndefinedSymbol(symbol)) + return; + let type = checker.getTypeAtLocation(expr); + if (type.flags & ts.TypeFlags.EnumLiteral) + return { text: checker.typeToString(type) }; + if (type.isLiteral()) + return { text: JSON.stringify(type.value) }; + if (type.flags & ts.TypeFlags.Null) + return { text: "null" }; + if (type.flags & ts.TypeFlags.BooleanLiteral) + return { text: checker.typeToString(type) }; + if (type.getCallSignatures().length > 0) + return { text: "function" }; + } else { + if (ts.isArrayLiteralExpression(expr) || ts.isObjectLiteralExpression(expr) || ts.isNewExpression(expr)) + return { text: expr.getText() }; + if (ts.isArrowFunction(expr)) + return { text: "function" }; + } + switch (expr.kind) { + case ts.SyntaxKind.TrueKeyword: + return { text: "true" }; + case ts.SyntaxKind.FalseKeyword: + return { text: "false" }; + case ts.SyntaxKind.NullKeyword: + return { text: "null" }; + } + return { text: "..." }; +} +function loadConfig(basepath) { + let configPath = ts.findConfigFile(basepath, ts.sys.fileExists) || ts.findConfigFile(basepath, ts.sys.fileExists, "jsconfig.json"), forcedOptions = { + sourceMap: !1, + noEmit: !0, + strict: !0, + allowJs: !0, + checkJs: !0, + skipLibCheck: !0, + skipDefaultLibCheck: !0 + }; + if (!configPath) + return [forcedOptions, /* @__PURE__ */ new Set()]; + let configFile = ts.readConfigFile(configPath, ts.sys.readFile), config = ts.parseJsonConfigFileContent( + configFile.config, + ts.sys, + path.dirname(configPath), + void 0, + configPath, + void 0, + [ + { + extension: "svelte", + isMixedContent: !0, + scriptKind: ts.ScriptKind.Deferred + } + ] + ), fileNames = new Set( + config.fileNames.filter((fileName) => fileName.endsWith(".svelte")).map((fileName) => fileName + ".tsx") + ); + return [ + { + ...config.options, + ...forcedOptions + }, + fileNames + ]; +} +function createDocgenCache() { + return { + filenameToModifiedTime: {}, + filenameToSourceFile: {}, + fileCache: {} + }; +} +function generateDocgen(targetFileName, cache) { + if (targetFileName.endsWith(".svelte") && (targetFileName = targetFileName + ".tsx"), cache.options === void 0 || !cache.rootNames?.has(targetFileName)) { + [cache.options, cache.rootNames] = loadConfig(targetFileName); + let shimFilename = import.meta.resolve("svelte2tsx/svelte-shims-v4.d.ts"); + cache.rootNames.add(shimFilename), cache.rootNames.add(targetFileName); + } + let originalHost = ts.createCompilerHost(cache.options), host = { + ...originalHost, + readFile(fileName) { + let isCacheTarget = fileName.endsWith(path.sep + "package.json"); + if (isCacheTarget && cache.fileCache[fileName]) + return cache.fileCache[fileName]; + let content = originalHost.readFile(fileName); + return content && isCacheTarget && (cache.fileCache[fileName] = content), content; + }, + fileExists(fileName) { + if (fileName.endsWith(path.sep + "package.json") && cache.fileCache[fileName]) + return !0; + let exists = originalHost.fileExists(fileName); + return exists || (fileName.endsWith(".svelte.tsx") || fileName.endsWith(".svelte.jsx") ? (fileName = fileName.slice(0, -4), exists = originalHost.fileExists(fileName), exists) : !1); + }, + getSourceFile(fileName, languageVersion, onError) { + if (fileName.endsWith(".svelte.tsx") || fileName.endsWith(".svelte.jsx")) { + let realFileName = fileName.slice(0, -4), modifiedTime = ts.sys.getModifiedTime ? ts.sys.getModifiedTime(realFileName) : void 0; + if (modifiedTime && cache.filenameToModifiedTime[fileName]?.getTime() === modifiedTime.getTime()) + return cache.filenameToSourceFile[fileName]; + let content = originalHost.readFile(realFileName); + if (content === void 0) + return; + let isTsFile = /]*?lang=('|")(ts|typescript)('|")/.test(content), tsx = svelte2tsx.svelte2tsx(content, { + version: VERSION, + isTsFile, + mode: "dts" + }), sourceFile2 = ts.createSourceFile( + fileName, + tsx.code, + languageVersion, + !0, + isTsFile ? ts.ScriptKind.TS : ts.ScriptKind.JS + // Set to 'JS' to enable TypeScript to parse JSDoc. + ); + return cache.filenameToSourceFile[fileName] = sourceFile2, cache.filenameToModifiedTime[fileName] = modifiedTime, sourceFile2; + } else { + let staticCaching = !1; + staticCaching ||= fileName.split(path.sep).some((part) => part.toLowerCase() === "node_modules"); + let cachedSourceFile = cache.filenameToSourceFile[fileName]; + if (cachedSourceFile && staticCaching) + return cachedSourceFile; + let modifiedTime = ts.sys.getModifiedTime ? ts.sys.getModifiedTime(fileName) : void 0; + if (modifiedTime && cache.filenameToModifiedTime[fileName]?.getTime() === modifiedTime.getTime()) + return cache.filenameToSourceFile[fileName]; + let content = originalHost.readFile(fileName); + if (content === void 0) + return; + let sourceFile2 = ts.createSourceFile(fileName, content, languageVersion, !0); + return cache.filenameToSourceFile[fileName] = sourceFile2, cache.filenameToModifiedTime[fileName] = modifiedTime, sourceFile2; + } + }, + writeFile() { + } + }, program = ts.createProgram({ + rootNames: Array.from(cache.rootNames), + options: cache.options, + host, + oldProgram: cache.oldProgram + }); + cache.oldProgram = program; + let checker = program.getTypeChecker(), sourceFile = program.getSourceFile(targetFileName); + if (sourceFile === void 0) + return { + props: [] + }; + let propMap = /* @__PURE__ */ new Map(), renderFunction = sourceFile.statements.find((statement) => ts.isFunctionDeclaration(statement) && statement.name?.text === internalHelpers.renderName); + if (renderFunction === void 0) + return { + props: [] + }; + let propsType, signature = checker.getSignatureFromDeclaration(renderFunction); + return signature && signature.declaration && checker.getReturnTypeOfSignature(signature).getProperties().forEach((retObjProp) => { + if (retObjProp.name === "props") { + let decl = signature.getDeclaration(); + propsType = checker.getTypeOfSymbolAtLocation(retObjProp, decl), propsType.getProperties().forEach((prop) => { + let name = prop.getName(), description = ts.displayPartsToString(prop.getDocumentationComment(checker)) || void 0, propType = checker.getTypeOfSymbolAtLocation(prop, decl); + if (prop.valueDeclaration) { + let typeTag = ts.getJSDocTypeTag(prop.valueDeclaration); + typeTag?.comment && (description = ((description || "") + ` +` + typeTag.comment).trim()); + } + if ((prop.valueDeclaration ?? prop?.links?.syntheticOrigin?.valueDeclaration)?.getSourceFile().fileName.includes("node_modules/svelte/elements.d.ts")) + return; + let optional = (prop.flags & ts.SymbolFlags.Optional) !== 0; + propMap.set(name, { + name, + optional, + description, + type: convertType(propType, checker) + }); + }); + } + }), renderFunction.body?.forEachChild((node) => { + ts.isVariableStatement(node) && node.declarationList.declarations.forEach((declaration) => { + if (ts.isObjectBindingPattern(declaration.name)) { + let isPropsRune = declaration.initializer && ts.isCallExpression(declaration.initializer) && ts.isIdentifier(declaration.initializer.expression) && declaration.initializer.expression.text === "$props", isPropsType = declaration.type && propsType === checker.getTypeFromTypeNode(declaration.type); + (isPropsRune || isPropsType) && declaration.name.elements.forEach((element) => { + let name = element.name.getText(), prop = propMap.get(name); + if (prop && element.initializer) { + let defaultValue = initializerToDefaultValue(element.initializer, checker); + defaultValue && (prop.defaultValue = defaultValue); + } + }); + } + if (ts.isVariableDeclaration(declaration) && ts.isIdentifier(declaration.name) && propMap.has(declaration.name.text)) { + let prop = propMap.get(declaration.name.text); + if (prop && declaration.initializer) { + prop.optional = !0; + let defaultValue = initializerToDefaultValue(declaration.initializer, checker); + defaultValue && (prop.defaultValue = defaultValue); + } + } + }); + }), { + props: Array.from(propMap.values()) + }; +} + +// src/plugins/svelte-docgen.ts +function getComponentName(ast) { + let exportDefaultDeclaration = ast.body.find((n) => n.type === "ExportDefaultDeclaration"); + if (!exportDefaultDeclaration) + throw new Error("Unreachable - no default export found"); + if (exportDefaultDeclaration.declaration.type === "Identifier") + return exportDefaultDeclaration.declaration.name; + if (exportDefaultDeclaration.declaration.type !== "ClassDeclaration" && exportDefaultDeclaration.declaration.type !== "FunctionDeclaration") + throw new Error("Unreachable - not a class or a function"); + if (!exportDefaultDeclaration.declaration.id) + throw new Error("Unreachable - unnamed class/function"); + return exportDefaultDeclaration.declaration.id.name; +} +function transformToSvelteDocParserType(type) { + switch (type.type) { + case "string": + return { kind: "type", type: "string", text: "string" }; + case "number": + return { kind: "type", type: "number", text: "number" }; + case "boolean": + return { kind: "type", type: "boolean", text: "boolean" }; + case "symbol": + return { kind: "type", type: "other", text: "symbol" }; + case "null": + return { kind: "type", type: "other", text: "null" }; + case "undefined": + return { kind: "type", type: "other", text: "undefined" }; + case "void": + return { kind: "type", type: "other", text: "void" }; + case "any": + return { kind: "type", type: "any", text: "any" }; + case "object": + return { kind: "type", type: "object", text: type.text }; + case "array": + return { kind: "type", type: "array", text: type.text }; + case "function": + return { kind: "function", text: type.text }; + case "literal": + return { kind: "const", type: typeof type.value, value: type.value, text: type.text }; + case "union": { + let nonNull = type.types.filter((t) => t.type !== "null"), text = nonNull.map((t) => transformToSvelteDocParserType(t).text).join(" | "), types = nonNull.map((t) => transformToSvelteDocParserType(t)); + return types.length === 1 ? types[0] : { kind: "union", type: types, text }; + } + case "intersection": + return { kind: "type", type: "intersection", text: type.types.map((t) => transformToSvelteDocParserType(t).text).join(" & ") }; + } +} +function transformToSvelteDocParserDataItems(docgen) { + return docgen.props.map((p) => { + let required = p.optional === !1 && p.defaultValue === void 0; + return { + name: p.name, + visibility: "public", + description: p.description, + keywords: required ? [{ name: "required", description: "" }] : [], + kind: "let", + type: p.type ? transformToSvelteDocParserType(p.type) : void 0, + static: !1, + readonly: !1, + importPath: void 0, + originalName: void 0, + localName: void 0, + defaultValue: p.defaultValue ? p.defaultValue.text : void 0 + }; + }); +} +async function svelteDocgen() { + let cwd = process.cwd(), include = /\.svelte$/, exclude = /node_modules\/.*/, { createFilter } = await import("vite"), filter = createFilter(include, exclude), sourceFileCache = createDocgenCache(); + return { + name: "storybook:svelte-docgen-plugin", + async transform(src, id) { + if (id.startsWith("\0") || !filter(id)) + return; + let resource = relative(cwd, id), docgen = generateDocgen(resource, sourceFileCache), componentDoc = { + data: transformToSvelteDocParserDataItems(docgen), + name: basename(resource) + }, s = new MagicString(src), outputAst = this.parse(src), componentName = getComponentName(outputAst); + return s.append(` +;${componentName}.__docgen = ${JSON.stringify(componentDoc)}`), { + code: s.toString(), + map: s.generateMap({ hires: !0, source: id }) + }; + } + }; +} + +// src/utils.ts +import { SvelteViteWithSvelteKitError } from "storybook/internal/server-errors"; +import { hasVitePlugins } from "@storybook/builder-vite"; +async function handleSvelteKit(plugins, options) { + let frameworkPreset = await options.presets.apply("framework", {}, options), framework = typeof frameworkPreset == "string" ? frameworkPreset : frameworkPreset.name; + if (await hasVitePlugins(plugins, [ + "vite-plugin-svelte-kit", + "vite-plugin-sveltekit-setup", + "vite-plugin-sveltekit-compile" + ]) && !framework.includes("@storybook/sveltekit")) + throw new SvelteViteWithSvelteKitError(); +} + +// src/preset.ts +var core = { + builder: import.meta.resolve("@storybook/builder-vite"), + renderer: import.meta.resolve("@storybook/svelte/preset") +}, viteFinal = async (config, options) => { + let { plugins = [] } = config, framework = await options.presets.apply("framework"); + return (typeof framework == "string" ? {} : framework.options ?? {}).docgen !== !1 && plugins.push(await svelteDocgen()), await handleSvelteKit(plugins, options), { + ...config, + plugins + }; +}; +export { + core, + viteFinal +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b515d554d6f3c0ee56686d90c9894031e92dd778 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/package.json @@ -0,0 +1,76 @@ +{ + "name": "@storybook/svelte-vite", + "version": "10.2.4", + "description": "Storybook for Svelte and Vite: Develop, document, and test UI components in isolation", + "keywords": [ + "storybook", + "storybook-framework", + "svelte", + "vite", + "component", + "components" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/svelte-vite", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "code/frameworks/svelte-vite" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./node": { + "types": "./dist/node/index.d.ts", + "default": "./dist/node/index.js" + }, + "./package.json": "./package.json", + "./preset": { + "types": "./dist/preset.d.ts", + "default": "./dist/preset.js" + } + }, + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts", + "!src/**/*" + ], + "dependencies": { + "@storybook/builder-vite": "10.2.4", + "@storybook/svelte": "10.2.4", + "magic-string": "^0.30.0", + "svelte2tsx": "^0.7.44", + "typescript": "^4.9.4 || ^5.0.0" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^6.2.0", + "@types/node": "^22.19.1", + "svelte": "^5.39.5", + "sveltedoc-parser": "^4.2.1", + "typescript": "^5.9.3", + "vite": "^7.0.4" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", + "storybook": "^10.2.4", + "svelte": "^5.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae1l" +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/preset.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/preset.js new file mode 100644 index 0000000000000000000000000000000000000000..4bd63d3240021d58a8eb61d58a3b44183be247ae --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/preset.js @@ -0,0 +1 @@ +export * from './dist/preset.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Button.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Button.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..718708998f6239a6ecab71b9680015eb15a1ecd0 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Button.stories.svelte @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Button.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Button.svelte new file mode 100644 index 0000000000000000000000000000000000000000..efb82fdc4dcce2b3490e7bb63286dbe55e9078e8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Button.svelte @@ -0,0 +1,27 @@ + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Header.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Header.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..23175a8203e537e7d5d5618c3755adf2800f6be3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Header.stories.svelte @@ -0,0 +1,26 @@ + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Header.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Header.svelte new file mode 100644 index 0000000000000000000000000000000000000000..eac52bebd55d2be713886fe6b602bcd1a3e973d7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Header.svelte @@ -0,0 +1,47 @@ + + +
+
+
+ + + + + + + +

Acme

+
+
+ {#if user} + + Welcome, {user.name}! + +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Page.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Page.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..d7361ed3a60aa5b22d0bf368001642e18a72a0f5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Page.stories.svelte @@ -0,0 +1,30 @@ + + + { + const canvas = within(canvasElement); + const loginButton = canvas.getByRole('button', { name: /Log in/i }); + await expect(loginButton).toBeInTheDocument(); + await userEvent.click(loginButton); + await waitFor(() => expect(loginButton).not.toBeInTheDocument()); + + const logoutButton = canvas.getByRole('button', { name: /Log out/i }); + await expect(logoutButton).toBeInTheDocument(); + }} + /> + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Page.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Page.svelte new file mode 100644 index 0000000000000000000000000000000000000000..92a95c00c5c557f4b19de54198832d0f195917c8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/js/Page.svelte @@ -0,0 +1,70 @@ + + +
+
(user = { name: 'Jane Doe' })} + onLogout={() => (user = null)} + onCreateAccount={() => (user = { name: 'Jane Doe' })} + /> + +
+

Pages in Storybook

+

+ We recommend building UIs with a + + component-driven + + process starting with atomic components and ending with pages. +

+

+ Render pages with mock data. This makes it easy to build and review page states without + needing to navigate to them in your app. Here are some handy patterns for managing page data + in Storybook: +

+
    +
  • + Use a higher-level connected component. Storybook helps you compose such data from the + "args" of child component stories +
  • +
  • + Assemble data in the page component from your services. You can mock these services out + using Storybook. +
  • +
+

+ Get a guided tutorial on component-driven development at + + Storybook tutorials + + . Read more in the + docs + . +

+
+ Tip + Adjust the width of the canvas with the + + + + + + Viewports addon in the toolbar +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Button.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Button.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..718708998f6239a6ecab71b9680015eb15a1ecd0 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Button.stories.svelte @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Button.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Button.svelte new file mode 100644 index 0000000000000000000000000000000000000000..c34befec5be584db001021908d1d67aea22e27f1 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Button.svelte @@ -0,0 +1,30 @@ + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Header.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Header.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..23175a8203e537e7d5d5618c3755adf2800f6be3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Header.stories.svelte @@ -0,0 +1,26 @@ + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Header.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Header.svelte new file mode 100644 index 0000000000000000000000000000000000000000..d6b7b216631527272641372f4fafd3e06f04b40b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Header.svelte @@ -0,0 +1,45 @@ + + +
+
+
+ + + + + + + +

Acme

+
+
+ {#if user} + + Welcome, {user.name}! + +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Page.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Page.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..8f2ff2283d3e90b1eb820c074dc465dc5331e985 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Page.stories.svelte @@ -0,0 +1,30 @@ + + + { + const canvas = within(canvasElement); + const loginButton = canvas.getByRole('button', { name: /Log in/i }); + await expect(loginButton).toBeInTheDocument(); + await userEvent.click(loginButton); + await waitFor(() => expect(loginButton).not.toBeInTheDocument()); + + const logoutButton = canvas.getByRole('button', { name: /Log out/i }); + await expect(logoutButton).toBeInTheDocument(); + }} +/> + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Page.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Page.svelte new file mode 100644 index 0000000000000000000000000000000000000000..c4c069a5a50b31f1717a5c6f2da68a9bd0537ac6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/cli/ts/Page.svelte @@ -0,0 +1,70 @@ + + +
+
(user = { name: 'Jane Doe' })} + onLogout={() => (user = undefined)} + onCreateAccount={() => (user = { name: 'Jane Doe' })} + /> + +
+

Pages in Storybook

+

+ We recommend building UIs with a + + component-driven + + process starting with atomic components and ending with pages. +

+

+ Render pages with mock data. This makes it easy to build and review page states without + needing to navigate to them in your app. Here are some handy patterns for managing page data + in Storybook: +

+
    +
  • + Use a higher-level connected component. Storybook helps you compose such data from the + "args" of child component stories +
  • +
  • + Assemble data in the page component from your services. You can mock these services out + using Storybook. +
  • +
+

+ Get a guided tutorial on component-driven development at + + Storybook tutorials + + . Read more in the + docs + . +

+
+ Tip + Adjust the width of the canvas with the + + + + + + Viewports addon in the toolbar +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-js/docgen/jsdoc.stories.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-js/docgen/jsdoc.stories.js new file mode 100644 index 0000000000000000000000000000000000000000..8fe1f95365e8ef72b3ed0d33b233d632fb6f4416 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-js/docgen/jsdoc.stories.js @@ -0,0 +1,17 @@ +import JSDoc from './jsdoc.svelte'; + +/** @typedef {import('@storybook/svelte-vite').StoryObj} StoryObj */ + +/** @type {Meta} */ +const meta = { + component: JSDoc, + tags: ['autodocs'], + render: (args, { argTypes }) => ({ + Component: JSDoc, + props: { ...args, argTypes }, + }), +}; + +export default meta; + +export const Default = {}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-js/docgen/jsdoc.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-js/docgen/jsdoc.svelte new file mode 100644 index 0000000000000000000000000000000000000000..458c87ffd084dbe91eb61f60e904bf8498123d44 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-js/docgen/jsdoc.svelte @@ -0,0 +1,92 @@ + + +

Docgen: JS - JSDoc

+ +

Args

+
{JSON.stringify(
+    {
+      boolean,
+      string,
+      stringRequired,
+      number,
+      trueLiteral,
+      symbol,
+      nullValue,
+      undefinedValue,
+      any,
+      date,
+      unionLiteralStrings,
+      unionLiteralNumbers,
+      object,
+      inlineObject,
+      record,
+      unionTypes,
+      intersection,
+      func,
+      argTypes,
+    },
+    null,
+    2
+  )}
+ +

Children

+{#if children} + {@render children()} +{/if} + +

Arg Types

+
{JSON.stringify(argTypes, null, 2)}
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/jsdoc.stories.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/jsdoc.stories.js new file mode 100644 index 0000000000000000000000000000000000000000..8fe1f95365e8ef72b3ed0d33b233d632fb6f4416 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/jsdoc.stories.js @@ -0,0 +1,17 @@ +import JSDoc from './jsdoc.svelte'; + +/** @typedef {import('@storybook/svelte-vite').StoryObj} StoryObj */ + +/** @type {Meta} */ +const meta = { + component: JSDoc, + tags: ['autodocs'], + render: (args, { argTypes }) => ({ + Component: JSDoc, + props: { ...args, argTypes }, + }), +}; + +export default meta; + +export const Default = {}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/jsdoc.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/jsdoc.svelte new file mode 100644 index 0000000000000000000000000000000000000000..e6175648d0c30f5bf448f0b4ced3cb96ab4c0685 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/jsdoc.svelte @@ -0,0 +1,91 @@ + + +

Docgen: JS - JSDoc

+ +

Args

+
{JSON.stringify(
+    {
+      boolean,
+      string,
+      stringRequired,
+      number,
+      trueLiteral,
+      symbol,
+      nullValue,
+      undefinedValue,
+      any,
+      date,
+      unionLiteralStrings,
+      unionLiteralNumbers,
+      object,
+      inlineObject,
+      record,
+      unionTypes,
+      intersection,
+      func,
+    },
+    null,
+    2
+  )}
+ +

Children

+{#if children} + {@render children()} +{/if} + +

Arg Types

+
{JSON.stringify(argTypes, null, 2)}
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts-inline-prop-types.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts-inline-prop-types.svelte new file mode 100644 index 0000000000000000000000000000000000000000..9dde0a2d7c06a726ead772391c8bc535cfbcb94e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts-inline-prop-types.svelte @@ -0,0 +1,103 @@ + + +

Docgen: TS - inline prop types

+ +

Args

+
{JSON.stringify(
+    {
+      boolean,
+      string,
+      stringRequired,
+      number,
+      nullValue,
+      date,
+      arrayOfNumbers,
+      enumValue,
+      record,
+      unionTypes,
+      func,
+    },
+    null,
+    2
+  )}
+ +

Children

+{#if children} + {@render children()} +{/if} + +

Arg Types

+
{JSON.stringify(argTypes, null, 2)}
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts-legacy.stories.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts-legacy.stories.ts new file mode 100644 index 0000000000000000000000000000000000000000..95a9b484b744f440db8f85e761194226ee20fcbb --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts-legacy.stories.ts @@ -0,0 +1,16 @@ +import type { Meta } from '@storybook/svelte-vite'; + +import TSLegacy from './ts-legacy.svelte'; + +const meta = { + component: TSLegacy, + tags: ['autodocs'], + render: (args, { argTypes }) => ({ + Component: TSLegacy, + props: { ...args, argTypes } as any, + }), +} satisfies Meta; + +export default meta; + +export const Default = {}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts-legacy.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts-legacy.svelte new file mode 100644 index 0000000000000000000000000000000000000000..fea7f5e4a418b37f92426c8994a65f832c333998 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts-legacy.svelte @@ -0,0 +1,98 @@ + + +

Docgen: TS - legacy

+ +

Args

+
{JSON.stringify(
+    {
+      boolean,
+      string,
+      stringRequired,
+      number,
+      trueLiteral,
+      symbol,
+      nullValue,
+      undefinedValue,
+      any,
+      date,
+      arrayOfNumbers,
+      enumValue,
+      unionLiteralStrings,
+      unionLiteralNumbers,
+      object,
+      inlineObject,
+      record,
+      unionTypes,
+      intersection,
+      func,
+    },
+    null,
+    2
+  )}
+ +

Children

+{#if children} + {@render children()} +{/if} + +

Arg Types

+
{JSON.stringify(argTypes, null, 2)}
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts.stories.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts.stories.ts new file mode 100644 index 0000000000000000000000000000000000000000..ca0eafcf5224bc66bd980e6f88c6d4e5acff9ffc --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts.stories.ts @@ -0,0 +1,16 @@ +import type { Meta } from '@storybook/svelte-vite'; + +import TS from './ts.svelte'; + +const meta = { + component: TS, + tags: ['autodocs'], + render: (args, { argTypes }) => ({ + Component: TS, + props: { ...args, argTypes }, + }), +} satisfies Meta; + +export default meta; + +export const Default = {}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts.svelte new file mode 100644 index 0000000000000000000000000000000000000000..a9290b4087acd325cc681da472efa13a298b580c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/ts.svelte @@ -0,0 +1,125 @@ + + +

Docgen: TS

+ +

Args

+
{JSON.stringify(
+    {
+      boolean,
+      string,
+      stringRequired,
+      number,
+      trueLiteral,
+      symbol,
+      nullValue,
+      undefinedValue,
+      any,
+      date,
+      arrayOfNumbers,
+      enumValue,
+      unionLiteralStrings,
+      unionLiteralNumbers,
+      object,
+      inlineObject,
+      record,
+      unionTypes,
+      intersection,
+      func,
+    },
+    null,
+    2
+  )}
+ +

Children

+{#if children} + {@render children()} +{/if} + +

Arg Types

+
{JSON.stringify(argTypes, null, 2)}
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/types.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..199b60cbba22ef12769b1e86a4cee06a60975c1d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte-vite/template/stories_svelte-vite-default-ts/docgen/types.ts @@ -0,0 +1,7 @@ +export type LiteralNumbers = 100 | 1000 | 10000; +export type LiteralStrings = 'apple' | 'grape' | 'orange'; + +export enum MyEnum { + FOO = 'foo', + BAR = 'bar', +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a82c7d98b047ed90b85699272903979ec844da3a --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/README.md @@ -0,0 +1,5 @@ +# Storybook Svelte renderer + +Develop, document, and test UI components in isolation. + +Learn more about Storybook at [storybook.js.org](https://storybook.js.org/?ref=readme). diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/_browser-chunks/chunk-4BE7D4DS.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/_browser-chunks/chunk-4BE7D4DS.js new file mode 100644 index 0000000000000000000000000000000000000000..bb44e6e612b9969eaee09b7ba70fbdc61056d5f9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/_browser-chunks/chunk-4BE7D4DS.js @@ -0,0 +1,9 @@ +var __defProp = Object.defineProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: !0 }); +}; + +export { + __export +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/_browser-chunks/chunk-QEV3A2KO.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/_browser-chunks/chunk-QEV3A2KO.js new file mode 100644 index 0000000000000000000000000000000000000000..efb7a60e72ec4bdaf5b8b2a9bf2bab643653a5f0 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/_browser-chunks/chunk-QEV3A2KO.js @@ -0,0 +1,224 @@ +import { + __export +} from "./chunk-4BE7D4DS.js"; + +// src/entry-preview.ts +var entry_preview_exports = {}; +__export(entry_preview_exports, { + applyDecorators: () => decorateStory, + argTypesEnhancers: () => argTypesEnhancers, + mount: () => mount2, + parameters: () => parameters, + render: () => render, + renderToCanvas: () => renderToCanvas +}); +import { enhanceArgTypes } from "storybook/internal/docs-tools"; + +// src/extractArgTypes.ts +import { logger } from "storybook/internal/client-logger"; +function hasKeyword(keyword, keywords) { + return keywords ? keywords.find((k) => k.name === keyword) != null : !1; +} +var extractArgTypes = (component) => { + try { + let docgen = component.__docgen; + if (docgen) + return createArgTypes(docgen); + } catch (err) { + logger.log(`Error extracting argTypes: ${err}`); + } + return {}; +}, createArgTypes = (docgen) => { + let results = {}; + return docgen.data && docgen.data.forEach((item) => { + results[item.name] = { + ...parseTypeToControl(item.type), + name: item.name, + description: item.description || void 0, + type: { + required: hasKeyword("required", item.keywords || []), + name: item.type?.text === "{}" ? "object" : item.type?.text + }, + table: { + type: { + summary: item.type?.text + }, + defaultValue: { + summary: item.defaultValue + }, + category: "properties" + } + }; + }), docgen.events && docgen.events.forEach((item) => { + results[`event_${item.name}`] = { + name: item.name, + action: item.name, + control: !1, + ...item.description ? { description: item.description } : {}, + table: { + category: "events" + } + }; + }), docgen.slots && docgen.slots.forEach((item) => { + results[`slot_${item.name}`] = { + name: item.name, + control: !1, + description: [item.description, item.params?.map((p) => `\`${p.name}\``).join(" ")].filter((p) => p).join(` + +`), + table: { + category: "slots" + } + }; + }), results; +}, parseTypeToControl = (type) => { + if (!type) + return null; + if (type.kind === "type") + switch (type.type) { + case "string": + return { control: { type: "text" } }; + case "any": + return { control: { type: "object" } }; + default: + return { control: { type: type.type } }; + } + else if (type.kind === "union") { + if (Array.isArray(type.type) && !type.type.some( + (t) => t.kind !== "const" || !["string", "number", "null", "undefined"].includes(t.type) + )) { + let options = type.type.map((t) => t.value); + return { + control: { + type: "radio" + }, + options + }; + } + } else if (type.kind === "function") + return { control: null }; + return null; +}; + +// src/extractComponentDescription.ts +function extractComponentDescription(component) { + return component?.__docgen?.description || ""; +} + +// src/render.ts +import { RESET_STORY_ARGS } from "storybook/internal/core-events"; +import PreviewRender from "@storybook/svelte/internal/PreviewRender.svelte"; +import { createReactiveProps } from "@storybook/svelte/internal/createReactiveProps"; +import { addons } from "storybook/preview-api"; +import * as svelte from "svelte"; +var storyIdsToRemountFromResetArgsEvent = /* @__PURE__ */ new Set(); +addons.getChannel().on(RESET_STORY_ARGS, ({ storyId }) => { + storyIdsToRemountFromResetArgsEvent.add(storyId); +}); +var componentsByDomElement = /* @__PURE__ */ new Map(); +async function renderToCanvas({ + storyFn, + title, + name, + showMain, + showError, + storyContext, + forceRemount +}, canvasElement) { + function unmount2(canvasElementToUnmount) { + let { mountedComponent } = componentsByDomElement.get(canvasElementToUnmount) ?? {}; + mountedComponent && (svelte.unmount(mountedComponent), componentsByDomElement.delete(canvasElementToUnmount)); + } + let existingComponent = componentsByDomElement.get(canvasElement), remount = forceRemount; + if (storyIdsToRemountFromResetArgsEvent.has(storyContext.id) && (remount = !0, storyIdsToRemountFromResetArgsEvent.delete(storyContext.id)), remount && unmount2(canvasElement), !existingComponent || remount) { + let props = createReactiveProps({ + storyFn, + storyContext, + name, + title, + showError + }), mountedComponent = svelte.mount(PreviewRender, { + target: canvasElement, + props + }); + componentsByDomElement.set(canvasElement, { mountedComponent, props }), await svelte.tick(); + } else + Object.assign(existingComponent.props, { + storyFn, + storyContext, + name, + title, + showError + }), await svelte.tick(); + return showMain(), () => { + unmount2(canvasElement); + }; +} +var render = (args, context) => { + let { id, component: Component } = context; + if (!Component) + throw new Error( + `Unable to render story ${id} as the component annotation is missing from the default export` + ); + return { Component, props: args }; +}; + +// src/decorators.ts +import DecoratorHandler from "@storybook/svelte/internal/DecoratorHandler.svelte"; +import { sanitizeStoryContextUpdate } from "storybook/preview-api"; +function unWrap(obj) { + return obj && typeof obj == "object" && "default" in obj ? obj.default : obj; +} +function prepareStory(context, rawStory, rawInnerStory) { + let story = unWrap(rawStory), innerStory = rawInnerStory && unWrap(rawInnerStory), preparedStory; + return !story || Object.keys(story).length === 0 ? preparedStory = { + Component: context.component + } : story.Component ? preparedStory = story : preparedStory = { + Component: story + }, innerStory ? { + Component: DecoratorHandler, + props: { + // inner stories will already have been prepared, keep as is + ...innerStory, + decorator: preparedStory + } + } : { ...preparedStory, argTypes: context.argTypes }; +} +function decorateStory(storyFn, decorators) { + return decorators.reduce( + (decorated, decorator) => (context) => { + let story, decoratedStory = decorator((update) => (story = decorated({ + ...context, + ...sanitizeStoryContextUpdate(update) + }), story), context); + return story || (story = decorated(context)), decoratedStory === story ? story : prepareStory(context, decoratedStory, story); + }, + (context) => prepareStory(context, storyFn(context)) + ); +} + +// src/mount.ts +var mount2 = (context) => async (Component, options) => (Component && (context.originalStoryFn = () => ({ + Component, + props: options && "props" in options ? options?.props : options +})), await context.renderToCanvas(), context.canvas); + +// src/entry-preview.ts +var parameters = { + renderer: "svelte", + docs: { + story: { inline: !0 }, + extractArgTypes, + extractComponentDescription + } +}, argTypesEnhancers = [enhanceArgTypes]; + +export { + renderToCanvas, + render, + decorateStory, + mount2 as mount, + parameters, + argTypesEnhancers, + entry_preview_exports +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/entry-preview-docs.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/entry-preview-docs.js new file mode 100644 index 0000000000000000000000000000000000000000..7fe2323685b26ed710a1269083be87502379e9bf --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/entry-preview-docs.js @@ -0,0 +1,59 @@ +import "./_browser-chunks/chunk-4BE7D4DS.js"; + +// src/docs/sourceDecorator.ts +import { deprecate } from "storybook/internal/client-logger"; +import { SourceType } from "storybook/internal/docs-tools"; +import { emitTransformCode, useEffect, useRef } from "storybook/preview-api"; +var skipSourceRender = (context) => { + let sourceParams = context?.parameters.docs?.source, isArgsStory = context?.parameters.__isArgsStory; + return (context?.tags ?? []).some((tag) => tag.startsWith("svelte-csf")) ? !0 : sourceParams?.type === SourceType.DYNAMIC ? !1 : !isArgsStory || sourceParams?.code || sourceParams?.type === SourceType.CODE; +}; +function toSvelteProperty(key, value, argTypes) { + if (value == null) + return null; + let argType = argTypes[key]; + return argType && argType.defaultValue === value || argType && argType.action ? null : value === !0 ? key : typeof value == "string" ? `${key}=${JSON.stringify(value)}` : typeof value == "function" ? `${key}={}` : `${key}={${JSON.stringify(value)}}`; +} +function getComponentName(component) { + if (component == null) + return null; + let { __docgen = {} } = component, { name } = __docgen; + return name ? (name.endsWith(".svelte") && (name = name.substring(0, name.length - 7)), name) : component.name; +} +function generateSvelteSource(component, args, argTypes, slotProperty) { + let name = getComponentName(component); + if (!name) + return null; + let propsArray = Object.entries(args).filter(([k]) => k !== slotProperty).map(([k, v]) => toSvelteProperty(k, v, argTypes)).filter((p) => p), props = propsArray.join(" "), multiline = props.length > 50, slotValue = slotProperty ? args[slotProperty] : null, srcStart = multiline ? `<${name} + ${propsArray.join(` + `)}` : `<${name} ${props}`; + return slotValue ? `${srcStart}> + ${slotValue} +` : `${srcStart}/>`; +} +function getWrapperProperties(component) { + let { __docgen } = component || {}; + return __docgen ? __docgen.keywords?.find((kw) => kw.name === "wrapper") ? { wrapper: !0, slotProperty: __docgen.data?.find( + (prop) => prop.keywords.find((kw) => kw.name === "slot") + )?.name } : { wrapper: !1 } : { wrapper: !1 }; +} +var sourceDecorator = (storyFn, context) => { + let skip = skipSourceRender(context), story = storyFn(), source = useRef(void 0); + return useEffect(() => { + if (skip) + return; + let { parameters = {}, args = {}, component: ctxComponent } = context || {}, { Component: component } = context.originalStoryFn( + args, + context + ), { wrapper, slotProperty } = getWrapperProperties(component); + wrapper && (parameters.component && deprecate("parameters.component is deprecated. Using context.component instead."), component = ctxComponent); + let generated = generateSvelteSource(component, args, context?.argTypes, slotProperty); + generated && source.current !== generated && (emitTransformCode(generated, context), source.current = generated); + }), story; +}; + +// src/entry-preview-docs.ts +var decorators = [sourceDecorator]; +export { + decorators +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/entry-preview.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/entry-preview.js new file mode 100644 index 0000000000000000000000000000000000000000..1eb812bb0e1e13811f03a061f5287c3b5a4cf43f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/entry-preview.js @@ -0,0 +1,17 @@ +import { + argTypesEnhancers, + decorateStory, + mount, + parameters, + render, + renderToCanvas +} from "./_browser-chunks/chunk-QEV3A2KO.js"; +import "./_browser-chunks/chunk-4BE7D4DS.js"; +export { + decorateStory as applyDecorators, + argTypesEnhancers, + mount, + parameters, + render, + renderToCanvas +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2a7026031851d8a4bcc6885fd7f4d135ec2f16ea --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/index.d.ts @@ -0,0 +1,134 @@ +import { WebRenderer, Canvas, Args, ComponentAnnotations, AnnotatedStoryFn, ArgsStoryFn, ArgsFromMeta, StoryAnnotations, StrictArgs, DecoratorFunction, LoaderFunction, StoryContext as StoryContext$1, ProjectAnnotations, NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations, StoryAnnotationsOrFn, ComposedStoryFn, Store_CSFExports, StoriesWithPartialProps } from 'storybook/internal/types'; +export { ArgTypes, Args, Parameters, StrictArgs } from 'storybook/internal/types'; +import { Component, ComponentProps } from 'svelte'; +import { Simplify, SetOptional } from 'type-fest'; +import PreviewRender from '@storybook/svelte/internal/PreviewRender.svelte'; + +interface SvelteRenderer = Component> extends WebRenderer { + component: Component ? this['T'] : any>; + storyResult: this['T'] extends Record ? SvelteStoryResult : SvelteStoryResult; + mount: (Component?: C, options?: Record & { + props: ComponentProps; + }) => Promise; +} +interface SvelteStoryResult = any, Exports extends Record = any, Bindings extends keyof Props | '' = string> { + Component?: Component; + props?: Props; + decorator?: Component; +} + +/** + * Metadata to configure the stories for a component. + * + * @see [Default export](https://storybook.js.org/docs/api/csf#default-export) + */ +type Meta = CmpOrArgs extends Component ? ComponentAnnotations, Props> : ComponentAnnotations; +/** + * Story function that represents a CSFv2 component example. + * + * @see [Named Story exports](https://storybook.js.org/docs/api/csf#named-story-exports) + */ +type StoryFn = TCmpOrArgs extends Component ? AnnotatedStoryFn : AnnotatedStoryFn; +/** + * Story object that represents a CSFv3 component example. + * + * @see [Named Story exports](https://storybook.js.org/docs/api/csf#named-story-exports) + */ +type StoryObj = MetaOrCmpOrArgs extends { + render?: ArgsStoryFn; + component: infer Comp; + args?: infer DefaultArgs; +} ? Simplify ? Comp : never> & ArgsFromMeta> extends infer TArgs ? StoryAnnotations ? Comp : never>, TArgs, SetOptional>> : never : MetaOrCmpOrArgs extends Component ? StoryAnnotations, ComponentProps> : StoryAnnotations; + +type Decorator = DecoratorFunction; +type Loader = LoaderFunction; +type StoryContext = StoryContext$1; +type Preview = ProjectAnnotations; + +type ComposedStory = ComposedStoryFn & { + Component: typeof PreviewRender; + props: any; +}; +type MapToComposed = { + [K in keyof TModule]: TModule[K] extends StoryAnnotationsOrFn ? ComposedStory : never; +}; +/** + * Function that sets the globalConfig of your storybook. The global config is the preview module of + * your .storybook folder. + * + * It should be run a single time, so that your global config (e.g. decorators) is applied to your + * stories when using `composeStories` or `composeStory`. + * + * Example: + * + * ```jsx + * // setup-file.js + * import { setProjectAnnotations } from '@storybook/svelte'; + * import projectAnnotations from './.storybook/preview'; + * + * setProjectAnnotations(projectAnnotations); + * ``` + * + * @param projectAnnotations - E.g. (import projectAnnotations from '../.storybook/preview') + */ +declare function setProjectAnnotations(projectAnnotations: NamedOrDefaultProjectAnnotations | NamedOrDefaultProjectAnnotations[]): NormalizedProjectAnnotations; +declare const INTERNAL_DEFAULT_PROJECT_ANNOTATIONS: ProjectAnnotations; +/** + * Function that will receive a story along with meta (e.g. a default export from a .stories file) + * and optionally projectAnnotations e.g. (import * from '../.storybook/preview) and will return a + * composed component that has all args/parameters/decorators/etc combined and applied to it. + * + * It's very useful for reusing a story in scenarios outside of Storybook like unit testing. + * + * Example: + * + * ```jsx + * import { render } from '@testing-library/svelte'; + * import { composeStory } from '@storybook/svelte'; + * import Meta, { Primary as PrimaryStory } from './Button.stories'; + * + * const Primary = composeStory(PrimaryStory, Meta); + * + * test('renders primary button with Hello World', () => { + * const { getByText } = render(Primary, { label: 'Hello world' }); + * expect(getByText(/Hello world/i)).not.toBeNull(); + * }); + * ``` + * + * @param story + * @param componentAnnotations - E.g. (import Meta from './Button.stories') + * @param [projectAnnotations] - E.g. (import * as projectAnnotations from '../.storybook/preview') + * this can be applied automatically if you use `setProjectAnnotations` in your setup files. + * @param [exportsName] - In case your story does not contain a name and you want it to have a name. + */ +declare function composeStory(story: StoryAnnotationsOrFn, componentAnnotations: Meta, projectAnnotations?: ProjectAnnotations, exportsName?: string): ComposedStory; +/** + * Function that will receive a stories import (e.g. `import * as stories from './Button.stories'`) + * and optionally projectAnnotations (e.g. `import * from '../.storybook/preview`) and will return + * an object containing all the stories passed, but now as a composed component that has all + * args/parameters/decorators/etc combined and applied to it. + * + * It's very useful for reusing stories in scenarios outside of Storybook like unit testing. + * + * Example: + * + * ```jsx + * import { render } from '@testing-library/svelte'; + * import { composeStories } from '@storybook/svelte'; + * import * as stories from './Button.stories'; + * + * const { Primary, Secondary } = composeStories(stories); + * + * test('renders primary button with Hello World', () => { + * const { getByText } = render(Primary, { label: 'Hello world' }); + * expect(getByText(/Hello world/i)).not.toBeNull(); + * }); + * ``` + * + * @param csfExports - E.g. (import * as stories from './Button.stories') + * @param [projectAnnotations] - E.g. (import * as projectAnnotations from '../.storybook/preview') + * this can be applied automatically if you use `setProjectAnnotations` in your setup files. + */ +declare function composeStories>(csfExports: TModule, projectAnnotations?: ProjectAnnotations): Omit>, keyof Store_CSFExports>; + +export { type Decorator, INTERNAL_DEFAULT_PROJECT_ANNOTATIONS, type Loader, type Meta, type Preview, type StoryContext, type StoryFn, type StoryObj, type SvelteRenderer, composeStories, composeStory, setProjectAnnotations }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b7e4df505c4cf6ae17896d85be6f26a3b1a97090 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/index.js @@ -0,0 +1,66 @@ +import { + entry_preview_exports, + renderToCanvas +} from "./_browser-chunks/chunk-QEV3A2KO.js"; +import "./_browser-chunks/chunk-4BE7D4DS.js"; + +// src/globals.ts +globalThis.STORYBOOK_ENV = "svelte"; + +// src/portable-stories.ts +import PreviewRender from "@storybook/svelte/internal/PreviewRender.svelte"; +import { createReactiveProps } from "@storybook/svelte/internal/createReactiveProps"; +import { + composeStories as originalComposeStories, + composeStory as originalComposeStory, + setProjectAnnotations as originalSetProjectAnnotations, + setDefaultProjectAnnotations +} from "storybook/preview-api"; +function setProjectAnnotations(projectAnnotations) { + return setDefaultProjectAnnotations(INTERNAL_DEFAULT_PROJECT_ANNOTATIONS), originalSetProjectAnnotations( + projectAnnotations + ); +} +var INTERNAL_DEFAULT_PROJECT_ANNOTATIONS = { + ...entry_preview_exports, + /** @deprecated */ + renderToCanvas: (renderContext, canvasElement) => { + if (renderContext.storyContext.testingLibraryRender == null) + return renderToCanvas(renderContext, canvasElement); + let { + storyFn, + storyContext: { testingLibraryRender: render } + } = renderContext, { Component, props } = storyFn(), { unmount } = render(Component, { props, target: canvasElement }); + return unmount; + } +}; +function composeStory(story, componentAnnotations, projectAnnotations, exportsName) { + let composedStory = originalComposeStory( + story, + // @ts-expect-error Fix this later: Type 'Partial<{ [x: string]: any; }>' is not assignable to type 'Partial>' + componentAnnotations, + projectAnnotations, + globalThis.globalProjectAnnotations ?? INTERNAL_DEFAULT_PROJECT_ANNOTATIONS, + exportsName + ), props = createReactiveProps({ + storyFn: composedStory, + storyContext: { ...composedStory }, + name: composedStory.storyName, + title: composedStory.id, + showError: () => { + } + }), renderable = { + Component: PreviewRender, + props + }; + return Object.assign(renderable, composedStory), renderable; +} +function composeStories(csfExports, projectAnnotations) { + return originalComposeStories(csfExports, projectAnnotations, composeStory); +} +export { + INTERNAL_DEFAULT_PROJECT_ANNOTATIONS, + composeStories, + composeStory, + setProjectAnnotations +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/playwright.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/playwright.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8c217b3ec8d6883bbf9c062da73abfdaba6e2ced --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/playwright.d.ts @@ -0,0 +1 @@ +export { createPlaywrightTest as createTest } from 'storybook/preview-api'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/playwright.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/playwright.js new file mode 100644 index 0000000000000000000000000000000000000000..883ce9adae67d447e555704f1b3bb1b3323684fc --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/playwright.js @@ -0,0 +1,7 @@ +import "./_browser-chunks/chunk-4BE7D4DS.js"; + +// src/playwright.ts +import { createPlaywrightTest } from "storybook/preview-api"; +export { + createPlaywrightTest as createTest +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/preset.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/preset.js new file mode 100644 index 0000000000000000000000000000000000000000..099d116f485a9497642df36b0e47e52aefd673e4 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/dist/preset.js @@ -0,0 +1,23 @@ +import CJS_COMPAT_NODE_URL_qlnl8m7r03 from 'node:url'; +import CJS_COMPAT_NODE_PATH_qlnl8m7r03 from 'node:path'; +import CJS_COMPAT_NODE_MODULE_qlnl8m7r03 from "node:module"; + +var __filename = CJS_COMPAT_NODE_URL_qlnl8m7r03.fileURLToPath(import.meta.url); +var __dirname = CJS_COMPAT_NODE_PATH_qlnl8m7r03.dirname(__filename); +var require = CJS_COMPAT_NODE_MODULE_qlnl8m7r03.createRequire(import.meta.url); + +// ------------------------------------------------------------ +// end of CJS compatibility banner, injected by Storybook's esbuild configuration +// ------------------------------------------------------------ + +// src/preset.ts +import { fileURLToPath } from "node:url"; +var previewAnnotations = async (input = [], options) => { + let docsEnabled = Object.keys(await options.presets.apply("docs", {}, options)).length > 0; + return [].concat(input).concat([fileURLToPath(import.meta.resolve("@storybook/svelte/entry-preview"))]).concat( + docsEnabled ? [fileURLToPath(import.meta.resolve("@storybook/svelte/entry-preview-docs"))] : [] + ); +}; +export { + previewAnnotations +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/package.json new file mode 100644 index 0000000000000000000000000000000000000000..642be0565a35a9033f9e14523841a98d402257d4 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/package.json @@ -0,0 +1,74 @@ +{ + "name": "@storybook/svelte", + "version": "10.2.4", + "description": "Storybook Svelte renderer: Develop, document, and test UI components in isolation.", + "keywords": [ + "storybook", + "storybook-renderer", + "svelte", + "components" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/next/code/renderers/svelte", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "code/renderers/svelte" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./entry-preview": "./dist/entry-preview.js", + "./entry-preview-docs": "./dist/entry-preview-docs.js", + "./experimental-playwright": { + "types": "./dist/playwright.d.ts", + "default": "./dist/playwright.js" + }, + "./internal/AddStorybookIdDecorator.svelte": "./static/AddStorybookIdDecorator.svelte", + "./internal/createReactiveProps": "./static/createReactiveProps.svelte.js", + "./internal/DecoratorHandler.svelte": "./static/DecoratorHandler.svelte", + "./internal/PreviewRender.svelte": "./static/PreviewRender.svelte", + "./package.json": "./package.json", + "./preset": "./dist/preset.js" + }, + "files": [ + "dist/**/*", + "static/**/*", + "template/cli/**/*", + "README.md", + "*.js", + "*.d.ts", + "!src/**/*" + ], + "dependencies": { + "ts-dedent": "^2.0.0", + "type-fest": "~2.19" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^6.2.0", + "@testing-library/svelte": "^5.2.4", + "svelte": "^5.39.5", + "svelte-check": "^4.3.2", + "sveltedoc-parser": "^4.2.1", + "typescript": "^5.8.3", + "vite": "^7.0.4" + }, + "peerDependencies": { + "storybook": "^10.2.4", + "svelte": "^5.0.0" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae1l" +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/preset.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/preset.js new file mode 100644 index 0000000000000000000000000000000000000000..4bd63d3240021d58a8eb61d58a3b44183be247ae --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/preset.js @@ -0,0 +1 @@ +export * from './dist/preset.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/AddStorybookIdDecorator.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/AddStorybookIdDecorator.svelte new file mode 100644 index 0000000000000000000000000000000000000000..aee48192b5f5d1e1b51403953cc17dae2ec0f42b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/AddStorybookIdDecorator.svelte @@ -0,0 +1,7 @@ + + +
+ {@render children()} +
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/DecoratorHandler.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/DecoratorHandler.svelte new file mode 100644 index 0000000000000000000000000000000000000000..3d2eca5711536d03d5b6ffd5086ed927a64ab1ab --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/DecoratorHandler.svelte @@ -0,0 +1,20 @@ + + +{#if decorator} + + + +{:else} + +{/if} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/PreviewRender.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/PreviewRender.svelte new file mode 100644 index 0000000000000000000000000000000000000000..8ebb7337a956dd020037d7d503ae1a0f07a23012 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/PreviewRender.svelte @@ -0,0 +1,34 @@ + + + + {#snippet pending()} +
Pending async component...
+ {/snippet} + +
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/createReactiveProps.svelte.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/createReactiveProps.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..1dc7e11f6c08544ace6148c883835a474455772f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/static/createReactiveProps.svelte.js @@ -0,0 +1,13 @@ +/** + * Turns an object into reactive props in Svelte 5. Needs to be in a separate .svelte.js file to + * ensure Svelte compiles it. As proposed in + * https://github.com/sveltejs/svelte/issues/9827#issuecomment-1845589616 + * + * @template TProps + * @param {TProps} data - The data to create Svelte 5 props from. + * @returns {TProps} - The created Svelte 5 props. + */ +export const createReactiveProps = (data) => { + const props = $state(data); + return props; +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/svelte.config.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/svelte.config.js new file mode 100644 index 0000000000000000000000000000000000000000..58122b385ec419e5e17090d93cd07e14563dba58 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/svelte.config.js @@ -0,0 +1,16 @@ +//! this config isn't actually used, it's just here to tell svelte-check that we have async enabled + +const config = { + kit: { + experimental: { + remoteFunctions: true, + }, + }, + compilerOptions: { + experimental: { + async: true, + }, + }, +}; + +export default config; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Button.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Button.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..718708998f6239a6ecab71b9680015eb15a1ecd0 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Button.stories.svelte @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Button.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Button.svelte new file mode 100644 index 0000000000000000000000000000000000000000..efb82fdc4dcce2b3490e7bb63286dbe55e9078e8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Button.svelte @@ -0,0 +1,27 @@ + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Header.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Header.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..23175a8203e537e7d5d5618c3755adf2800f6be3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Header.stories.svelte @@ -0,0 +1,26 @@ + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Header.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Header.svelte new file mode 100644 index 0000000000000000000000000000000000000000..eac52bebd55d2be713886fe6b602bcd1a3e973d7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Header.svelte @@ -0,0 +1,47 @@ + + +
+
+
+ + + + + + + +

Acme

+
+
+ {#if user} + + Welcome, {user.name}! + +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Page.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Page.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..d7361ed3a60aa5b22d0bf368001642e18a72a0f5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Page.stories.svelte @@ -0,0 +1,30 @@ + + + { + const canvas = within(canvasElement); + const loginButton = canvas.getByRole('button', { name: /Log in/i }); + await expect(loginButton).toBeInTheDocument(); + await userEvent.click(loginButton); + await waitFor(() => expect(loginButton).not.toBeInTheDocument()); + + const logoutButton = canvas.getByRole('button', { name: /Log out/i }); + await expect(logoutButton).toBeInTheDocument(); + }} + /> + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Page.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Page.svelte new file mode 100644 index 0000000000000000000000000000000000000000..92a95c00c5c557f4b19de54198832d0f195917c8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/js/Page.svelte @@ -0,0 +1,70 @@ + + +
+
(user = { name: 'Jane Doe' })} + onLogout={() => (user = null)} + onCreateAccount={() => (user = { name: 'Jane Doe' })} + /> + +
+

Pages in Storybook

+

+ We recommend building UIs with a + + component-driven + + process starting with atomic components and ending with pages. +

+

+ Render pages with mock data. This makes it easy to build and review page states without + needing to navigate to them in your app. Here are some handy patterns for managing page data + in Storybook: +

+
    +
  • + Use a higher-level connected component. Storybook helps you compose such data from the + "args" of child component stories +
  • +
  • + Assemble data in the page component from your services. You can mock these services out + using Storybook. +
  • +
+

+ Get a guided tutorial on component-driven development at + + Storybook tutorials + + . Read more in the + docs + . +

+
+ Tip + Adjust the width of the canvas with the + + + + + + Viewports addon in the toolbar +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Button.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Button.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..718708998f6239a6ecab71b9680015eb15a1ecd0 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Button.stories.svelte @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Button.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Button.svelte new file mode 100644 index 0000000000000000000000000000000000000000..c34befec5be584db001021908d1d67aea22e27f1 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Button.svelte @@ -0,0 +1,30 @@ + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Header.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Header.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..23175a8203e537e7d5d5618c3755adf2800f6be3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Header.stories.svelte @@ -0,0 +1,26 @@ + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Header.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Header.svelte new file mode 100644 index 0000000000000000000000000000000000000000..d6b7b216631527272641372f4fafd3e06f04b40b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Header.svelte @@ -0,0 +1,45 @@ + + +
+
+
+ + + + + + + +

Acme

+
+
+ {#if user} + + Welcome, {user.name}! + +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Page.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Page.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..8f2ff2283d3e90b1eb820c074dc465dc5331e985 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Page.stories.svelte @@ -0,0 +1,30 @@ + + + { + const canvas = within(canvasElement); + const loginButton = canvas.getByRole('button', { name: /Log in/i }); + await expect(loginButton).toBeInTheDocument(); + await userEvent.click(loginButton); + await waitFor(() => expect(loginButton).not.toBeInTheDocument()); + + const logoutButton = canvas.getByRole('button', { name: /Log out/i }); + await expect(logoutButton).toBeInTheDocument(); + }} +/> + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Page.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Page.svelte new file mode 100644 index 0000000000000000000000000000000000000000..c4c069a5a50b31f1717a5c6f2da68a9bd0537ac6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/cli/ts/Page.svelte @@ -0,0 +1,70 @@ + + +
+
(user = { name: 'Jane Doe' })} + onLogout={() => (user = undefined)} + onCreateAccount={() => (user = { name: 'Jane Doe' })} + /> + +
+

Pages in Storybook

+

+ We recommend building UIs with a + + component-driven + + process starting with atomic components and ending with pages. +

+

+ Render pages with mock data. This makes it easy to build and review page states without + needing to navigate to them in your app. Here are some handy patterns for managing page data + in Storybook: +

+
    +
  • + Use a higher-level connected component. Storybook helps you compose such data from the + "args" of child component stories +
  • +
  • + Assemble data in the page component from your services. You can mock these services out + using Storybook. +
  • +
+

+ Get a guided tutorial on component-driven development at + + Storybook tutorials + + . Read more in the + docs + . +

+
+ Tip + Adjust the width of the canvas with the + + + + + + Viewports addon in the toolbar +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/components/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/components/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5b326931bdc9afcb7179df4bf2d3e0726562704e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/components/index.js @@ -0,0 +1,9 @@ +import { global as globalThis } from '@storybook/global'; + +import Button from './Button.svelte'; +import Form from './Form.svelte'; +import Html from './Html.svelte'; +import Pre from './Pre.svelte'; + +globalThis.__TEMPLATE_COMPONENTS__ = { Button, Pre, Form, Html }; +globalThis.storybookRenderer = 'svelte'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/stories/args.stories.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/stories/args.stories.js new file mode 100644 index 0000000000000000000000000000000000000000..eed6d923c6dfa3298883126cc30f2296ef733e8d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/stories/args.stories.js @@ -0,0 +1,67 @@ +import { + RESET_STORY_ARGS, + STORY_RENDERED, + UPDATE_STORY_ARGS, +} from 'storybook/internal/core-events'; + +import { addons } from 'storybook/preview-api'; +import { expect, userEvent, waitFor } from 'storybook/test'; + +import Button from './Button.svelte'; + +export default { + component: Button, + tags: ['!vitest'], +}; + +export const UpdatingArgs = { + play: async ({ canvas, id, step }) => { + const channel = addons.getChannel(); + + await step('Reset story args', async () => { + // Just to ensure the story is always in a clean state from the beginning, not really part of the test + channel.emit(RESET_STORY_ARGS, { storyId: id }); + await new Promise((resolve) => { + channel.once(STORY_RENDERED, resolve); + }); + await waitFor(async () => { + await expect(canvas.getByRole('button')).toHaveTextContent('You clicked: 0'); + }); + }); + + await step('Change state', async () => { + await userEvent.click(canvas.getByRole('button')); + await waitFor(async () => { + await expect(canvas.getByRole('button')).toHaveTextContent('You clicked: 1'); + }); + }); + + await step("Update story args with { text: 'Changed' }", async () => { + channel.emit(UPDATE_STORY_ARGS, { storyId: id, updatedArgs: { text: 'Changed' } }); + await new Promise((resolve) => { + channel.once(STORY_RENDERED, resolve); + }); + await waitFor(async () => { + await expect(canvas.getByRole('button')).toHaveTextContent('Changed: 1'); + }); + }); + }, +}; + +export const RemountOnResetStoryArgs = { + play: async (playContext) => { + await UpdatingArgs.play(playContext); + + const channel = addons.getChannel(); + const { canvas, id, step } = playContext; + + // expect that all state and args are reset after RESET_STORY_ARGS because Svelte needs to remount the component + // most other renderers would have 'You clicked: 1' here because they don't remount the component + // if this doesn't fully remount it would be 'undefined: 1' because undefined args are used as is in Svelte, and the state is kept + await step('Reset story args', () => channel.emit(RESET_STORY_ARGS, { storyId: id })); + + await waitFor(async () => { + await expect(canvas.getByRole('button')).toHaveTextContent('You clicked: 0'); + }); + }, +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/stories/decorators.stories.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/stories/decorators.stories.js new file mode 100644 index 0000000000000000000000000000000000000000..843683176b9e0771862296d540231df34e2585bb --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/svelte/template/stories/decorators.stories.js @@ -0,0 +1,56 @@ +import { expect, fn } from 'storybook/test'; + +import BorderDecoratorBlue from './BorderDecoratorBlue.svelte'; +import BorderDecoratorProps from './BorderDecoratorProps.svelte'; +import BorderDecoratorRed from './BorderDecoratorRed.svelte'; +import Button from './Button.svelte'; + +export default { + component: Button, + decorators: [() => BorderDecoratorRed], + tags: ['autodocs'], +}; + +export const WithDefaultRedBorder = {}; +export const WithBareBlueBorder = { + decorators: [() => BorderDecoratorBlue], +}; +export const WithPreparedBlueBorder = { + decorators: [ + () => ({ + Component: BorderDecoratorBlue, + }), + ], +}; +export const WithPropsBasedBorder = { + decorators: [ + () => ({ + Component: BorderDecoratorProps, + props: { color: 'green' }, + }), + ], +}; +export const WithArgsBasedBorderUnset = { + argTypes: { + color: { control: 'color' }, + }, + decorators: [(_, { args }) => ({ Component: BorderDecoratorProps, props: args })], +}; +export const WithArgsBasedBorder = { + ...WithArgsBasedBorderUnset, + args: { color: 'lightblue' }, +}; + +const decoratorCalled = fn(); + +export const DecoratorsRunOnce = { + decorators: [ + (Story) => { + decoratorCalled(); + return Story(); + }, + ], + play: async () => { + expect(decoratorCalled).toHaveBeenCalledTimes(1); + }, +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d4a36d768f34d618667e669771fd684a00d94fe6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/README.md @@ -0,0 +1,10 @@ +# Storybook for SvelteKit + +See [documentation](https://storybook.js.org/docs/get-started/frameworks/sveltekit?renderer=svelte&ref=readme) for installation instructions, usage examples, APIs, and more. + +## Acknowledgements + +Integrating with SvelteKit would not have been possible if it weren't for the fantastic efforts by the Svelte core team - especially [Ben McCann](https://twitter.com/benjaminmccann) - to make integrations with the wider ecosystem possible. +A big thank you also goes out to [Paolo Ricciuti](https://twitter.com/PaoloRicciuti) for improving the mocking capabilities. + +Learn more about Storybook at [storybook.js.org](https://storybook.js.org/?ref=readme). diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/_browser-chunks/chunk-4BE7D4DS.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/_browser-chunks/chunk-4BE7D4DS.js new file mode 100644 index 0000000000000000000000000000000000000000..bb44e6e612b9969eaee09b7ba70fbdc61056d5f9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/_browser-chunks/chunk-4BE7D4DS.js @@ -0,0 +1,9 @@ +var __defProp = Object.defineProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: !0 }); +}; + +export { + __export +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/_browser-chunks/chunk-EB5JBDJD.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/_browser-chunks/chunk-EB5JBDJD.js new file mode 100644 index 0000000000000000000000000000000000000000..6a064156b7c41760ddda2c7236922ddf8fb444c7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/_browser-chunks/chunk-EB5JBDJD.js @@ -0,0 +1,34 @@ +import { + __export +} from "./chunk-4BE7D4DS.js"; + +// src/preview.ts +var preview_exports = {}; +__export(preview_exports, { + beforeEach: () => beforeEach, + decorators: () => decorators +}); +import MockProvider from "@storybook/sveltekit/internal/MockProvider.svelte"; +import { + setAppStateNavigating, + setAppStatePage, + setAppStateUpdated +} from "@storybook/sveltekit/internal/mocks/app/state.svelte.js"; +var svelteKitMocksDecorator = (Story, ctx) => { + let svelteKitParameters = ctx.parameters?.sveltekit_experimental ?? {}; + return { + Component: MockProvider, + props: { + svelteKitParameters + } + }; +}, decorators = [svelteKitMocksDecorator], beforeEach = async (ctx) => { + let svelteKitParameters = ctx.parameters?.sveltekit_experimental ?? {}; + setAppStatePage(svelteKitParameters?.state?.page), setAppStateNavigating(svelteKitParameters?.state?.navigating), setAppStateUpdated(svelteKitParameters?.state?.updated); +}; + +export { + decorators, + beforeEach, + preview_exports +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/_node-chunks/chunk-BSQ2L3WT.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/_node-chunks/chunk-BSQ2L3WT.js new file mode 100644 index 0000000000000000000000000000000000000000..acb47ddf7b989ae36df043ffa082a2dec13e1b93 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/_node-chunks/chunk-BSQ2L3WT.js @@ -0,0 +1,32 @@ +import CJS_COMPAT_NODE_URL_f1uumrd2ml9 from 'node:url'; +import CJS_COMPAT_NODE_PATH_f1uumrd2ml9 from 'node:path'; +import CJS_COMPAT_NODE_MODULE_f1uumrd2ml9 from "node:module"; + +var __filename = CJS_COMPAT_NODE_URL_f1uumrd2ml9.fileURLToPath(import.meta.url); +var __dirname = CJS_COMPAT_NODE_PATH_f1uumrd2ml9.dirname(__filename); +var require = CJS_COMPAT_NODE_MODULE_f1uumrd2ml9.createRequire(import.meta.url); + +// ------------------------------------------------------------ +// end of CJS compatibility banner, injected by Storybook's esbuild configuration +// ------------------------------------------------------------ + +// src/plugins/mock-sveltekit-stores.ts +function mockSveltekitStores() { + return { + name: "storybook:sveltekit-mock-stores", + config: () => ({ + resolve: { + alias: { + "$app/forms": "@storybook/sveltekit/internal/mocks/app/forms", + "$app/navigation": "@storybook/sveltekit/internal/mocks/app/navigation", + "$app/state": "@storybook/sveltekit/internal/mocks/app/state.svelte.js", + "$app/stores": "@storybook/sveltekit/internal/mocks/app/stores" + } + } + }) + }; +} + +export { + mockSveltekitStores +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f85143ef5326b494cd5037f1fa3a1c3752173bc4 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/index.d.ts @@ -0,0 +1,139 @@ +import { SvelteRenderer } from '@storybook/svelte'; +export * from '@storybook/svelte'; +import { StorybookConfig as StorybookConfig$1, CompatibleString, NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations } from 'storybook/internal/types'; +import { BuilderOptions, StorybookConfigVite } from '@storybook/builder-vite'; + +declare function enhance(form: HTMLFormElement): { + destroy(): void; +}; + +declare function goto(...args: any[]): Promise; +declare function invalidate(...args: any[]): Promise; +declare function invalidateAll(): Promise; + +type FrameworkName = CompatibleString<'@storybook/sveltekit'>; +type BuilderName = CompatibleString<'@storybook/builder-vite'>; +type FrameworkOptions = { + builder?: BuilderOptions; + /** + * Enable or disable automatic documentation generation for component properties, events, and + * slots. When disabled, Storybook will skip the docgen processing step during build, which can + * improve build performance. + * + * @default true + */ + docgen?: boolean; +}; +type StorybookConfigFramework = { + framework: FrameworkName | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfig$1['core'] & { + builder?: BuilderName | { + name: BuilderName; + options: BuilderOptions; + }; + }; +}; +type StorybookConfig = Omit & StorybookConfigVite & StorybookConfigFramework; +type NormalizedHrefConfig = { + callback: (to: string, event: Event) => void; + asRegex?: boolean; +}; +type HrefConfig = NormalizedHrefConfig | NormalizedHrefConfig['callback']; +/** + * Copied from: + * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L1102-L1143} + */ +interface Page = Record, RouteId extends string | null = string | null> { + url: URL; + params: Params; + route: { + id: RouteId; + }; + status: number; + error: Error | null; + data: Record; + state: Record; + form: any; +} +/** + * Copied from: + * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L988} + */ +interface NavigationTarget { + params: Record | null; + route: { + id: string | null; + }; + url: URL; +} +/** + * Copied from: + * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L1017C9-L1017C89} + */ +type NavigationType = 'enter' | 'form' | 'leave' | 'link' | 'goto' | 'popstate'; +/** + * Copied from: + * {@link https://github.com/sveltejs/kit/blob/7bb41aa4263b057a8912f4cdd35db03755d37342/packages/kit/types/index.d.ts#L1017C9-L1017C89} + */ +interface Navigation { + from: NavigationTarget | null; + to: NavigationTarget | null; + type: Exclude; + willUnload: boolean; + delta?: number; + complete: Promise; +} +type SvelteKitParameters = Partial<{ + hrefs: Record; + state: { + page: Partial; + navigating: Partial; + updated: { + current: boolean; + }; + }; + /** + * @deprecated + * @see {@link https://svelte.dev/docs/kit/$app-stores} + */ + stores: { + page: Record; + navigating: Record; + updated: boolean; + }; + navigation: { + goto: typeof goto; + invalidate: typeof invalidate; + invalidateAll: typeof invalidateAll; + afterNavigate: Record; + }; + forms: { + enhance: typeof enhance; + }; +}>; + +/** + * Function that sets the globalConfig of your storybook. The global config is the preview module of + * your .storybook folder. + * + * It should be run a single time, so that your global config (e.g. decorators) is applied to your + * stories when using `composeStories` or `composeStory`. + * + * Example: + * + * ```jsx + * // setup-file.js + * import { setProjectAnnotations } from '@storybook/sveltekit'; + * import projectAnnotations from './.storybook/preview'; + * + * setProjectAnnotations(projectAnnotations); + * ``` + * + * @param projectAnnotations - E.g. (import projectAnnotations from '../.storybook/preview') + */ +declare function setProjectAnnotations(projectAnnotations: NamedOrDefaultProjectAnnotations | NamedOrDefaultProjectAnnotations[]): NormalizedProjectAnnotations; + +export { type FrameworkOptions, type HrefConfig, type NormalizedHrefConfig, type StorybookConfig, type SvelteKitParameters, setProjectAnnotations }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c8e316bb7f24b3fb374848b845c1b045d5c3e4a7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/index.js @@ -0,0 +1,27 @@ +import { + preview_exports +} from "./_browser-chunks/chunk-EB5JBDJD.js"; +import "./_browser-chunks/chunk-4BE7D4DS.js"; + +// src/index.ts +export * from "@storybook/svelte"; + +// src/portable-stories.ts +import { INTERNAL_DEFAULT_PROJECT_ANNOTATIONS as svelteAnnotations } from "@storybook/svelte"; +import { + composeConfigs, + setProjectAnnotations as originalSetProjectAnnotations, + setDefaultProjectAnnotations +} from "storybook/preview-api"; +function setProjectAnnotations(projectAnnotations) { + return setDefaultProjectAnnotations(INTERNAL_DEFAULT_PROJECT_ANNOTATIONS), originalSetProjectAnnotations( + projectAnnotations + ); +} +var INTERNAL_DEFAULT_PROJECT_ANNOTATIONS = composeConfigs([ + svelteAnnotations, + preview_exports +]); +export { + setProjectAnnotations +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/mocks/app/forms.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/mocks/app/forms.js new file mode 100644 index 0000000000000000000000000000000000000000..8107fcc45dc10c2bca60051b9658634f343307db --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/mocks/app/forms.js @@ -0,0 +1,26 @@ +import "../../_browser-chunks/chunk-4BE7D4DS.js"; + +// src/mocks/app/forms.ts +function enhance(form) { + let listener = (...args) => { + args[0].preventDefault(); + let event = new CustomEvent("storybook:enhance", { + detail: args + }); + window.dispatchEvent(event); + }; + return form.addEventListener("submit", listener), { + destroy() { + form.removeEventListener("submit", listener); + } + }; +} +function applyAction() { +} +function deserialize() { +} +export { + applyAction, + deserialize, + enhance +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/mocks/app/navigation.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/mocks/app/navigation.js new file mode 100644 index 0000000000000000000000000000000000000000..b519481d24af1f7af6c2c5464bf83b1ad9e5a61a --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/mocks/app/navigation.js @@ -0,0 +1,65 @@ +import "../../_browser-chunks/chunk-4BE7D4DS.js"; + +// src/mocks/app/navigation.ts +import { getContext, onMount, setContext } from "svelte"; +async function goto(...args) { + let event = new CustomEvent("storybook:goto", { + detail: args + }); + window.dispatchEvent(event); +} +function setAfterNavigateArgument(afterNavigateArgs) { + setContext("after-navigate-args", afterNavigateArgs); +} +function afterNavigate(cb) { + let argument = getContext("after-navigate-args"); + onMount(() => { + cb && cb instanceof Function && cb(argument); + }); +} +function onNavigate() { +} +function beforeNavigate() { +} +function disableScrollHandling() { +} +async function invalidate(...args) { + let event = new CustomEvent("storybook:invalidate", { + detail: args + }); + window.dispatchEvent(event); +} +async function invalidateAll() { + let event = new CustomEvent("storybook:invalidateAll"); + window.dispatchEvent(event); +} +function preloadCode() { +} +function preloadData() { +} +async function pushState(...args) { + let event = new CustomEvent("storybook:pushState", { + detail: args + }); + window.dispatchEvent(event); +} +async function replaceState(...args) { + let event = new CustomEvent("storybook:replaceState", { + detail: args + }); + window.dispatchEvent(event); +} +export { + afterNavigate, + beforeNavigate, + disableScrollHandling, + goto, + invalidate, + invalidateAll, + onNavigate, + preloadCode, + preloadData, + pushState, + replaceState, + setAfterNavigateArgument +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/mocks/app/stores.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/mocks/app/stores.js new file mode 100644 index 0000000000000000000000000000000000000000..1db8edd8265af50f3ae52973429820f54a4bde8b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/mocks/app/stores.js @@ -0,0 +1,37 @@ +import "../../_browser-chunks/chunk-4BE7D4DS.js"; + +// src/mocks/app/stores.ts +import { getContext, setContext } from "svelte"; +function createMockedStore(contextName) { + return [ + { + subscribe(runner) { + let page2 = getContext(contextName); + return runner(page2), () => { + }; + } + }, + (value) => { + setContext(contextName, value); + } + ]; +} +var [page, setAppStoresPage] = createMockedStore("page-ctx"), [navigating, setAppStoresNavigating] = createMockedStore("navigating-ctx"), [updated, setAppStoresUpdated] = createMockedStore("updated-ctx"); +updated.check = () => { +}; +function getStores() { + return { + page, + navigating, + updated + }; +} +export { + getStores, + navigating, + page, + setAppStoresNavigating, + setAppStoresPage, + setAppStoresUpdated, + updated +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/node/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/node/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4faba451b251ce1291749df500b341565e1f2fb2 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/node/index.d.ts @@ -0,0 +1,33 @@ +import { StorybookConfig as StorybookConfig$1, CompatibleString } from 'storybook/internal/types'; +import { StorybookConfigVite, BuilderOptions } from '@storybook/builder-vite'; + +type FrameworkName = CompatibleString<'@storybook/sveltekit'>; +type BuilderName = CompatibleString<'@storybook/builder-vite'>; +type FrameworkOptions = { + builder?: BuilderOptions; + /** + * Enable or disable automatic documentation generation for component properties, events, and + * slots. When disabled, Storybook will skip the docgen processing step during build, which can + * improve build performance. + * + * @default true + */ + docgen?: boolean; +}; +type StorybookConfigFramework = { + framework: FrameworkName | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfig$1['core'] & { + builder?: BuilderName | { + name: BuilderName; + options: BuilderOptions; + }; + }; +}; +type StorybookConfig = Omit & StorybookConfigVite & StorybookConfigFramework; + +declare function defineMain(config: StorybookConfig): StorybookConfig; + +export { type StorybookConfig, defineMain }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/node/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/node/index.js new file mode 100644 index 0000000000000000000000000000000000000000..03828e3c4ea072d1b79224075cc0b9edb6b4720e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/node/index.js @@ -0,0 +1,19 @@ +import CJS_COMPAT_NODE_URL_f1uumrd2ml9 from 'node:url'; +import CJS_COMPAT_NODE_PATH_f1uumrd2ml9 from 'node:path'; +import CJS_COMPAT_NODE_MODULE_f1uumrd2ml9 from "node:module"; + +var __filename = CJS_COMPAT_NODE_URL_f1uumrd2ml9.fileURLToPath(import.meta.url); +var __dirname = CJS_COMPAT_NODE_PATH_f1uumrd2ml9.dirname(__filename); +var require = CJS_COMPAT_NODE_MODULE_f1uumrd2ml9.createRequire(import.meta.url); + +// ------------------------------------------------------------ +// end of CJS compatibility banner, injected by Storybook's esbuild configuration +// ------------------------------------------------------------ + +// src/node/index.ts +function defineMain(config) { + return config; +} +export { + defineMain +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/preset.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/preset.js new file mode 100644 index 0000000000000000000000000000000000000000..ff113ae3654ada62475ca3b5d14e5f8dd3790afe --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/preset.js @@ -0,0 +1,63 @@ +import CJS_COMPAT_NODE_URL_f1uumrd2ml9 from 'node:url'; +import CJS_COMPAT_NODE_PATH_f1uumrd2ml9 from 'node:path'; +import CJS_COMPAT_NODE_MODULE_f1uumrd2ml9 from "node:module"; + +var __filename = CJS_COMPAT_NODE_URL_f1uumrd2ml9.fileURLToPath(import.meta.url); +var __dirname = CJS_COMPAT_NODE_PATH_f1uumrd2ml9.dirname(__filename); +var require = CJS_COMPAT_NODE_MODULE_f1uumrd2ml9.createRequire(import.meta.url); + +// ------------------------------------------------------------ +// end of CJS compatibility banner, injected by Storybook's esbuild configuration +// ------------------------------------------------------------ +import { + mockSveltekitStores +} from "./_node-chunks/chunk-BSQ2L3WT.js"; + +// src/preset.ts +import { fileURLToPath } from "node:url"; +import { withoutVitePlugins } from "@storybook/builder-vite"; +import { viteFinal as svelteViteFinal } from "@storybook/svelte-vite/preset"; + +// src/plugins/config-overrides.ts +function configOverrides() { + return { + // SvelteKit sets SSR, we need it to be false when building + name: "storybook:sveltekit-overrides", + apply: "build", + config: () => ({ build: { ssr: !1 } }) + }; +} + +// src/preset.ts +var core = { + builder: import.meta.resolve("@storybook/builder-vite"), + renderer: import.meta.resolve("@storybook/svelte/preset") +}, previewAnnotations = (entry = []) => [ + ...entry, + fileURLToPath(import.meta.resolve("@storybook/sveltekit/preview")) +], viteFinal = async (config, options) => { + let baseConfig = await svelteViteFinal(config, options); + return { + ...baseConfig, + plugins: [ + // disable specific plugins that are not compatible with Storybook + ...await withoutVitePlugins(baseConfig.plugins ?? [], [ + "vite-plugin-sveltekit-compile", + "vite-plugin-sveltekit-guard" + ]), + configOverrides(), + mockSveltekitStores() + ] + }; +}, optimizeViteDeps = [ + "@storybook/sveltekit/internal/mocks/app/forms", + "@storybook/sveltekit/internal/mocks/app/navigation", + "@storybook/sveltekit/internal/mocks/app/stores", + "@storybook/sveltekit/internal/mocks/app/state.svelte.js" +]; +export { + core, + optimizeViteDeps, + previewAnnotations, + viteFinal +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/preview.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/preview.js new file mode 100644 index 0000000000000000000000000000000000000000..cab75bd6cfc0dfb7bc0ee3c500f1e0515fa53977 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/preview.js @@ -0,0 +1,9 @@ +import { + beforeEach, + decorators +} from "./_browser-chunks/chunk-EB5JBDJD.js"; +import "./_browser-chunks/chunk-4BE7D4DS.js"; +export { + beforeEach, + decorators +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/vite-plugin.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/vite-plugin.js new file mode 100644 index 0000000000000000000000000000000000000000..76a0ebb843d0cef290c5b4a0ea0fc618c64caf76 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/dist/vite-plugin.js @@ -0,0 +1,20 @@ +import CJS_COMPAT_NODE_URL_f1uumrd2ml9 from 'node:url'; +import CJS_COMPAT_NODE_PATH_f1uumrd2ml9 from 'node:path'; +import CJS_COMPAT_NODE_MODULE_f1uumrd2ml9 from "node:module"; + +var __filename = CJS_COMPAT_NODE_URL_f1uumrd2ml9.fileURLToPath(import.meta.url); +var __dirname = CJS_COMPAT_NODE_PATH_f1uumrd2ml9.dirname(__filename); +var require = CJS_COMPAT_NODE_MODULE_f1uumrd2ml9.createRequire(import.meta.url); + +// ------------------------------------------------------------ +// end of CJS compatibility banner, injected by Storybook's esbuild configuration +// ------------------------------------------------------------ +import { + mockSveltekitStores +} from "./_node-chunks/chunk-BSQ2L3WT.js"; + +// src/vite-plugin.ts +var storybookSveltekitPlugin = () => [mockSveltekitStores()]; +export { + storybookSveltekitPlugin +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/package.json new file mode 100644 index 0000000000000000000000000000000000000000..059ec6bb987da1bcb8edf483ba8065f64caa7fb2 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/package.json @@ -0,0 +1,76 @@ +{ + "name": "@storybook/sveltekit", + "version": "10.2.4", + "description": "Storybook for SvelteKit: Develop, document, and test UI components in isolation", + "keywords": [ + "storybook", + "storybook-framework", + "svelte", + "sveltekit", + "svelte-kit", + "vite", + "component", + "components" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/sveltekit", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "code/frameworks/sveltekit" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./internal/MockProvider.svelte": "./static/MockProvider.svelte", + "./internal/mocks/app/forms": "./dist/mocks/app/forms.js", + "./internal/mocks/app/navigation": "./dist/mocks/app/navigation.js", + "./internal/mocks/app/state.svelte.js": "./static/app-state-mock.svelte.js", + "./internal/mocks/app/stores": "./dist/mocks/app/stores.js", + "./node": { + "types": "./dist/node/index.d.ts", + "default": "./dist/node/index.js" + }, + "./package.json": "./package.json", + "./preset": "./dist/preset.js", + "./preview": "./dist/preview.js", + "./vite-plugin": "./dist/vite-plugin.js" + }, + "files": [ + "dist/**/*", + "static/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "dependencies": { + "@storybook/builder-vite": "10.2.4", + "@storybook/svelte": "10.2.4", + "@storybook/svelte-vite": "10.2.4" + }, + "devDependencies": { + "@types/node": "^22.19.1", + "typescript": "^5.9.3", + "vite": "^7.0.4" + }, + "peerDependencies": { + "storybook": "^10.2.4", + "svelte": "^5.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae1l" +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/preset.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/preset.js new file mode 100644 index 0000000000000000000000000000000000000000..4bd63d3240021d58a8eb61d58a3b44183be247ae --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/preset.js @@ -0,0 +1 @@ +export * from './dist/preset.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/preview.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/preview.js new file mode 100644 index 0000000000000000000000000000000000000000..542d45f8cf2617907e1d790c274acd38cdbd572e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/preview.js @@ -0,0 +1 @@ +export * from './dist/preview.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/static/MockProvider.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/static/MockProvider.svelte new file mode 100644 index 0000000000000000000000000000000000000000..f05396ee732716cadffaf6bd8b2de9b579781ba9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/static/MockProvider.svelte @@ -0,0 +1,127 @@ + + +{@render children()} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/static/app-state-mock.svelte.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/static/app-state-mock.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..be46966e5f5a7959dfb2db132c046b10b051a05c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/static/app-state-mock.svelte.js @@ -0,0 +1,234 @@ +/** + * Inspired by the the code: + * {@link https://github.com/sveltejs/kit/blob/main/packages/kit/src/runtime/client/state.svelte.js} + * + * The differences: + * + * - Legacy Svelte support is not included + * - Not using classes (internal coding style preference) + * + * @module + */ +import { fn } from 'storybook/test'; + +/** + * @typedef {Object} App + * @property {Object} Error + * @property {string} Error.message + * @property {Object} Locals + * @property {Object} PageData + * @property {Object} PageState + * @property {Object} Platform + */ + +/** + * @typedef {Object} Page + * @property {URL} url + * @property {Record} params + * @property {Object} route + * @property {string | null} route.id + * @property {number} status + * @property {App.Error | null} error + * @property {App.PageData & Record} data + * @property {App.PageState} state + * @property {any} form + */ + +const defaultStatePageValues = { + data: {}, + form: null, + error: null, + params: {}, + route: { id: null }, + state: {}, + status: -1, + url: new URL(location.origin), +}; + +/** @type {Page['data']} */ +let pageData = $state.raw(defaultStatePageValues.data); +/** @type {Page['form']} */ +let pageForm = $state.raw(defaultStatePageValues.form); +/** @type {Page['error']} */ +let pageError = $state.raw(defaultStatePageValues.error); +/** @type {Page['params']} */ +let pageParams = $state.raw(defaultStatePageValues.params); +/** @type {Page['route']} */ +let pageRoute = $state.raw(defaultStatePageValues.route); +/** @type {Page['state']} */ +let pageState = $state.raw(defaultStatePageValues.state); +/** @type {Page['status']} */ +let pageStatus = $state.raw(defaultStatePageValues.status); +/** @type {Page['url']} */ +let pageUrl = $state.raw(defaultStatePageValues.url); + +/** @type {Page} */ +export let page = { + get data() { + return pageData; + }, + set data(newPageData) { + pageData = newPageData; + }, + get form() { + return pageForm; + }, + set form(newPageForm) { + pageForm = newPageForm; + }, + get error() { + return pageError; + }, + set error(newPageError) { + pageError = newPageError; + }, + get params() { + return pageParams; + }, + set params(newPageParams) { + pageParams = newPageParams; + }, + get route() { + return pageRoute; + }, + set route(newPageRoute) { + pageRoute = newPageRoute; + }, + get state() { + return pageState; + }, + set state(newPageState) { + pageState = newPageState; + }, + get status() { + return pageStatus; + }, + set status(newPageStatus) { + pageStatus = newPageStatus; + }, + get url() { + return pageUrl; + }, + set url(newPageUrl) { + pageUrl = newPageUrl; + }, +}; + +export function setAppStatePage(params = {}) { + page.data = params.data ?? defaultStatePageValues.data; + page.form = params.form ?? defaultStatePageValues.form; + page.error = params.error ?? defaultStatePageValues.error; + page.params = params.params ?? defaultStatePageValues.params; + page.route = params.route ?? defaultStatePageValues.route; + page.state = params.state ?? defaultStatePageValues.state; + page.status = params.status ?? defaultStatePageValues.status; + page.url = params.url ?? defaultStatePageValues.url; +} + +/** + * @typedef {Object} NavigationTarget + * @property {Record | null} params + * @property {Object} route + * @property {string | null} route.id + * @property {URL} url + */ + +/** @typedef {'enter' | 'form' | 'leave' | 'link' | 'goto' | 'popstate'} NavigationType */ + +/** + * @typedef {Object} Navigation + * @property {NavigationTarget | null} from + * @property {NavigationTarget | null} to + * @property {Exclude} type + * @property {boolean} willUnload + * @property {number} [delta] + * @property {Promise} complete + */ + +const defaultStateNavigatingValues = { + from: null, + to: null, + type: null, + willUnload: null, + delta: null, + complete: null, +}; + +/** @type {Navigation['from'] | null} */ +let navigatingFrom = $state.raw(defaultStateNavigatingValues.from); +/** @type {Navigation['to'] | null} */ +let navigatingTo = $state.raw(defaultStateNavigatingValues.to); +/** @type {Navigation['type'] | null} */ +let navigatingType = $state.raw(defaultStateNavigatingValues.type); +/** @type {Navigation['willUnload'] | null} */ +let navigatingWillUnload = $state.raw(defaultStateNavigatingValues.willUnload); +/** @type {Navigation['delta'] | null} */ +let navigatingDelta = $state.raw(defaultStateNavigatingValues.delta); +/** @type {Navigation['complete'] | null} */ +let navigatingComplete = $state.raw(defaultStateNavigatingValues.complete); + +/** @type {Navigation} */ +export let navigating = { + get from() { + return navigatingFrom; + }, + set from(newNavigatingFrom) { + navigatingFrom = newNavigatingFrom; + }, + get to() { + return navigatingTo; + }, + set to(newNavigatingTo) { + navigatingTo = newNavigatingTo; + }, + get type() { + return navigatingType; + }, + set type(newNavigatingType) { + navigatingType = newNavigatingType; + }, + get willUnload() { + return navigatingWillUnload; + }, + set willUnload(newNavigatingWillUnload) { + navigatingWillUnload = newNavigatingWillUnload; + }, + get delta() { + return navigatingDelta; + }, + set delta(newNavigatingDelta) { + navigatingDelta = newNavigatingDelta; + }, + get complete() { + return navigatingComplete; + }, + set complete(newNavigatingComplete) { + navigatingComplete = newNavigatingComplete; + }, +}; + +export function setAppStateNavigating(params = {}) { + navigating.from = params.from ?? defaultStateNavigatingValues.from; + navigating.to = params.to ?? defaultStateNavigatingValues.to; + navigating.type = params.type ?? defaultStateNavigatingValues.type; + navigating.willUnload = params.willUnload ?? defaultStateNavigatingValues.willUnload; + navigating.delta = params.delta ?? defaultStateNavigatingValues.delta; + navigating.complete = params.complete ?? defaultStateNavigatingValues.complete; +} + +/** @type {boolean} */ +let updatedCurrent = $state.raw(false); + +export let updated = { + get current() { + return updatedCurrent; + }, + set current(newCurrent) { + updatedCurrent = newCurrent; + }, + check: fn(() => Promise.resolve(updatedCurrent)), +}; + +export function setAppStateUpdated(params = {}) { + updated.current = params.current ?? false; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Button.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Button.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..718708998f6239a6ecab71b9680015eb15a1ecd0 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Button.stories.svelte @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Button.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Button.svelte new file mode 100644 index 0000000000000000000000000000000000000000..efb82fdc4dcce2b3490e7bb63286dbe55e9078e8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Button.svelte @@ -0,0 +1,27 @@ + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Header.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Header.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..23175a8203e537e7d5d5618c3755adf2800f6be3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Header.stories.svelte @@ -0,0 +1,26 @@ + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Header.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Header.svelte new file mode 100644 index 0000000000000000000000000000000000000000..eac52bebd55d2be713886fe6b602bcd1a3e973d7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Header.svelte @@ -0,0 +1,47 @@ + + +
+
+
+ + + + + + + +

Acme

+
+
+ {#if user} + + Welcome, {user.name}! + +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Page.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Page.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..d7361ed3a60aa5b22d0bf368001642e18a72a0f5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Page.stories.svelte @@ -0,0 +1,30 @@ + + + { + const canvas = within(canvasElement); + const loginButton = canvas.getByRole('button', { name: /Log in/i }); + await expect(loginButton).toBeInTheDocument(); + await userEvent.click(loginButton); + await waitFor(() => expect(loginButton).not.toBeInTheDocument()); + + const logoutButton = canvas.getByRole('button', { name: /Log out/i }); + await expect(logoutButton).toBeInTheDocument(); + }} + /> + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Page.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Page.svelte new file mode 100644 index 0000000000000000000000000000000000000000..6b92ef599b60fda7bff4b4058dab03b571ad504f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/js/Page.svelte @@ -0,0 +1,70 @@ + + +
+
(user = { name: 'Jane Doe' })} + onLogout={() => (user = undefined)} + onCreateAccount={() => (user = { name: 'Jane Doe' })} + /> + +
+

Pages in Storybook

+

+ We recommend building UIs with a + + component-driven + + process starting with atomic components and ending with pages. +

+

+ Render pages with mock data. This makes it easy to build and review page states without + needing to navigate to them in your app. Here are some handy patterns for managing page data + in Storybook: +

+
    +
  • + Use a higher-level connected component. Storybook helps you compose such data from the + "args" of child component stories +
  • +
  • + Assemble data in the page component from your services. You can mock these services out + using Storybook. +
  • +
+

+ Get a guided tutorial on component-driven development at + + Storybook tutorials + + . Read more in the + docs + . +

+
+ Tip + Adjust the width of the canvas with the + + + + + + Viewports addon in the toolbar +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Button.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Button.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..718708998f6239a6ecab71b9680015eb15a1ecd0 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Button.stories.svelte @@ -0,0 +1,31 @@ + + + + + + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Button.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Button.svelte new file mode 100644 index 0000000000000000000000000000000000000000..c34befec5be584db001021908d1d67aea22e27f1 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Button.svelte @@ -0,0 +1,30 @@ + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Header.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Header.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..23175a8203e537e7d5d5618c3755adf2800f6be3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Header.stories.svelte @@ -0,0 +1,26 @@ + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Header.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Header.svelte new file mode 100644 index 0000000000000000000000000000000000000000..d6b7b216631527272641372f4fafd3e06f04b40b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Header.svelte @@ -0,0 +1,45 @@ + + +
+
+
+ + + + + + + +

Acme

+
+
+ {#if user} + + Welcome, {user.name}! + +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Page.stories.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Page.stories.svelte new file mode 100644 index 0000000000000000000000000000000000000000..8f2ff2283d3e90b1eb820c074dc465dc5331e985 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Page.stories.svelte @@ -0,0 +1,30 @@ + + + { + const canvas = within(canvasElement); + const loginButton = canvas.getByRole('button', { name: /Log in/i }); + await expect(loginButton).toBeInTheDocument(); + await userEvent.click(loginButton); + await waitFor(() => expect(loginButton).not.toBeInTheDocument()); + + const logoutButton = canvas.getByRole('button', { name: /Log out/i }); + await expect(logoutButton).toBeInTheDocument(); + }} +/> + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Page.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Page.svelte new file mode 100644 index 0000000000000000000000000000000000000000..c4c069a5a50b31f1717a5c6f2da68a9bd0537ac6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/cli/ts/Page.svelte @@ -0,0 +1,70 @@ + + +
+
(user = { name: 'Jane Doe' })} + onLogout={() => (user = undefined)} + onCreateAccount={() => (user = { name: 'Jane Doe' })} + /> + +
+

Pages in Storybook

+

+ We recommend building UIs with a + + component-driven + + process starting with atomic components and ending with pages. +

+

+ Render pages with mock data. This makes it easy to build and review page states without + needing to navigate to them in your app. Here are some handy patterns for managing page data + in Storybook: +

+
    +
  • + Use a higher-level connected component. Storybook helps you compose such data from the + "args" of child component stories +
  • +
  • + Assemble data in the page component from your services. You can mock these services out + using Storybook. +
  • +
+

+ Get a guided tutorial on component-driven development at + + Storybook tutorials + + . Read more in the + docs + . +

+
+ Tip + Adjust the width of the canvas with the + + + + + + Viewports addon in the toolbar +
+
+
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Environment.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Environment.svelte new file mode 100644 index 0000000000000000000000000000000000000000..7cdc852f7fcfb53321b341f035bd0b707668b91f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Environment.svelte @@ -0,0 +1,8 @@ + + +
{browser}
+
{dev}
+
{building}
+
{version}
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Forms.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Forms.svelte new file mode 100644 index 0000000000000000000000000000000000000000..8513ae2a7064de593bc0234bbf7eff5196375e7e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Forms.svelte @@ -0,0 +1,7 @@ + + +
+ +
\ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Hrefs.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Hrefs.svelte new file mode 100644 index 0000000000000000000000000000000000000000..4e7d69e0e051350543d06f0fec61b9bda55444f7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Hrefs.svelte @@ -0,0 +1,8 @@ + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Navigation.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Navigation.svelte new file mode 100644 index 0000000000000000000000000000000000000000..24a37f3517f84f1320061a955050e6c5b4eb7965 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Navigation.svelte @@ -0,0 +1,37 @@ + + + + + + + + + + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Paths.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Paths.svelte new file mode 100644 index 0000000000000000000000000000000000000000..f4c1e81b53fed07cf7646a1a92f34188cbd40d91 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Paths.svelte @@ -0,0 +1,6 @@ + + +
{assets}
+
{base}
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/State.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/State.svelte new file mode 100644 index 0000000000000000000000000000000000000000..9ded27316b130aa46348f4ed40cae8e861a2929b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/State.svelte @@ -0,0 +1,16 @@ + + +

$app/state

+ +

page

+
{JSON.stringify(page, null, 2)}
+ +

navigating

+
{JSON.stringify(navigating, null, 2)}
+ +

updated

+
{JSON.stringify(updated, null, 2)}
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Stores.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Stores.svelte new file mode 100644 index 0000000000000000000000000000000000000000..164b00f7fa8b1cbfa9f9df1219133a97adaf9b6b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/Stores.svelte @@ -0,0 +1,17 @@ + + +

Directly importing

+
{JSON.stringify($page, null, 2)}
+
{JSON.stringify($navigating, null, 2)}
+
{JSON.stringify($updated, null, 2)}
+ +

With getStores

+
{JSON.stringify($pageStore, null, 2)}
+
{JSON.stringify($navigatingStore, null, 2)}
+
{JSON.stringify($updatedStore, null, 2)}
diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/environment.stories.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/environment.stories.js new file mode 100644 index 0000000000000000000000000000000000000000..126497d843272a85fffabf7364e1541229c8f7d5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/environment.stories.js @@ -0,0 +1,8 @@ +import Environment from './Environment.svelte'; + +export default { + title: 'stories/frameworks/sveltekit/modules/environment', + component: Environment, +}; + +export const Default = {}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/forms.stories.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/forms.stories.js new file mode 100644 index 0000000000000000000000000000000000000000..277f88c4bde4ff27299db0c562d0f32c883fe6bb --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/forms.stories.js @@ -0,0 +1,26 @@ +import { expect, fn, within } from 'storybook/test'; + +import Forms from './Forms.svelte'; + +export default { + title: 'stories/frameworks/sveltekit/modules/forms', + component: Forms, +}; + +const enhance = fn(); + +export const Enhance = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + const button = canvas.getByText('enhance'); + button.click(); + expect(enhance).toHaveBeenCalled(); + }, + parameters: { + sveltekit_experimental: { + forms: { + enhance, + }, + }, + }, +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/hrefs.stories.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/hrefs.stories.js new file mode 100644 index 0000000000000000000000000000000000000000..bfbc9926a6e650237e45e7d3b9ee1f0f5238b81e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/hrefs.stories.js @@ -0,0 +1,52 @@ +import { expect, fn, within } from 'storybook/test'; + +import Hrefs from './Hrefs.svelte'; + +export default { + title: 'stories/frameworks/sveltekit/modules/hrefs', + component: Hrefs, +}; + +export const DefaultActions = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + + const initialUrl = window.location.toString(); + + const basicHref = canvas.getByText('/basic-href'); + basicHref.click(); + + const complexHref = canvas.getByText( + '/deep/nested/link?with=true&multiple-params=200#and-an-id' + ); + complexHref.click(); + + const finalUrl = window.location.toString(); + expect(finalUrl).toBe(initialUrl); + }, +}; + +const basicStringMatch = fn(); +const noMatch = fn(); +const exactStringMatch = fn(); +const regexMatch = fn(); + +export const Callbacks = { + parameters: { + sveltekit_experimental: { + hrefs: { + '/basic-href': basicStringMatch, + '/basic': noMatch, + '/deep/nested/link?with=true&multiple-params=200#and-an-id': exactStringMatch, + 'nested/link\\?with': { callback: regexMatch, asRegex: true }, + }, + }, + }, + play: async (ctx) => { + await DefaultActions.play(ctx); + expect(basicStringMatch).toHaveBeenCalledTimes(1); + expect(noMatch).not.toHaveBeenCalled(); + expect(exactStringMatch).toHaveBeenCalledTimes(1); + expect(regexMatch).toHaveBeenCalledTimes(1); + }, +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/navigation.stories.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/navigation.stories.js new file mode 100644 index 0000000000000000000000000000000000000000..89e396b095325dbf3fdeae1d4d95f00ee3e67380 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/navigation.stories.js @@ -0,0 +1,120 @@ +import { expect, fn, within } from 'storybook/test'; + +import Navigation from './Navigation.svelte'; + +export default { + title: 'stories/frameworks/sveltekit/modules/navigation', + component: Navigation, +}; + +const goto = fn(); + +export const Goto = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + const button = canvas.getByText('goto'); + button.click(); + expect(goto).toHaveBeenCalledWith('/storybook-goto'); + }, + parameters: { + sveltekit_experimental: { + navigation: { + goto, + }, + }, + }, +}; + +const replaceState = fn(); + +export const ReplaceState = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + const button = canvas.getByText('replaceState'); + button.click(); + expect(replaceState).toHaveBeenCalledWith('/storybook-replace-state', {}); + }, + parameters: { + sveltekit_experimental: { + navigation: { + replaceState, + }, + }, + }, +}; + +const pushState = fn(); + +export const PushState = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + const button = canvas.getByText('pushState'); + button.click(); + expect(pushState).toHaveBeenCalledWith('/storybook-push-state', {}); + }, + parameters: { + sveltekit_experimental: { + navigation: { + pushState, + }, + }, + }, +}; + +export const DefaultActions = {}; + +const invalidate = fn(); + +export const Invalidate = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + const button = canvas.getByText('invalidate', { exact: true }); + button.click(); + expect(invalidate).toHaveBeenCalledWith('/storybook-invalidate'); + }, + parameters: { + sveltekit_experimental: { + navigation: { + invalidate, + }, + }, + }, +}; + +const invalidateAll = fn(); + +export const InvalidateAll = { + async play({ canvasElement }) { + const canvas = within(canvasElement); + const button = canvas.getByText('invalidateAll'); + button.click(); + expect(invalidateAll).toHaveBeenCalledWith(); + }, + parameters: { + sveltekit_experimental: { + navigation: { + invalidateAll, + }, + }, + }, +}; + +const afterNavigateFn = fn(); + +export const AfterNavigate = { + async play() { + expect(afterNavigateFn).toHaveBeenCalledWith({ test: 'passed' }); + }, + args: { + afterNavigateFn, + }, + parameters: { + sveltekit_experimental: { + navigation: { + afterNavigate: { + test: 'passed', + }, + }, + }, + }, +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/paths.stories.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/paths.stories.js new file mode 100644 index 0000000000000000000000000000000000000000..e69ae8e59e53c4d946e02d6c0b19936a5af7ed54 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/paths.stories.js @@ -0,0 +1,8 @@ +import Paths from './Paths.svelte'; + +export default { + title: 'stories/frameworks/sveltekit/modules/paths', + component: Paths, +}; + +export const Default = {}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/state.stories.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/state.stories.js new file mode 100644 index 0000000000000000000000000000000000000000..ad46633ea1baf6b8be4f98d1046808b98470e3a3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/state.stories.js @@ -0,0 +1,84 @@ +import State from './State.svelte'; + +export default { + title: 'stories/frameworks/sveltekit/modules/state', + component: State, + parameters: { + sveltekit_experimental: { + state: { + page: { + url: new URL('https://storybook.js.org'), // necessary to make the rendered output deterministic in CH snapshots + }, + }, + }, + }, +}; + +export const Default = {}; + +export const Page = { + parameters: { + sveltekit_experimental: { + state: { + page: { + data: { + test: 'passed', + }, + form: { + framework: 'SvelteKit', + rating: 5, + }, + params: { + referrer: 'storybook', + }, + route: { + id: '/framework/sveltekit', + }, + status: 200, + url: new URL('https://svelte.dev/docs/kit/'), + }, + }, + }, + }, +}; + +export const Navigating = { + parameters: { + sveltekit_experimental: { + state: { + navigating: { + from: { + params: { + framework: 'SvelteKit', + }, + route: { + id: '/framework/sveltekit', + }, + url: new URL('https://svelte.dev'), + }, + to: { + route: { id: '/storybook' }, + params: {}, + url: new URL('https://storybook.js.org'), + }, + type: 'link', + willUnload: true, + delta: 3, + complete: Promise.resolve(), + }, + }, + }, + }, +}; + +export const Updated = { + parameters: { + sveltekit_experimental: { + state: { + updated: { + current: true, + }, + }, + }, + }, +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/stores.stories.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/stores.stories.js new file mode 100644 index 0000000000000000000000000000000000000000..539f35176599213768c9f5ef6f816717797bdeee --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@storybook/sveltekit/template/stories_svelte-kit-skeleton-ts/modules/stores.stories.js @@ -0,0 +1,115 @@ +import Stores from './Stores.svelte'; + +export default { + title: 'stories/frameworks/sveltekit/modules/stores', + component: Stores, +}; + +export const AllUndefined = {}; + +export const PageStore = { + parameters: { + sveltekit_experimental: { + stores: { + page: { + data: { + test: 'passed', + }, + }, + }, + }, + }, +}; + +export const NavigatingStore = { + parameters: { + sveltekit_experimental: { + stores: { + navigating: { + route: { + id: '/storybook', + }, + }, + }, + }, + }, +}; + +export const UpdatedStore = { + parameters: { + sveltekit_experimental: { + stores: { + updated: true, + }, + }, + }, +}; + +export const PageAndNavigatingStore = { + parameters: { + sveltekit_experimental: { + stores: { + page: { + data: { + test: 'passed', + }, + }, + navigating: { + route: { + id: '/storybook', + }, + }, + }, + }, + }, +}; + +export const PageAndUpdatedStore = { + parameters: { + sveltekit_experimental: { + stores: { + page: { + data: { + test: 'passed', + }, + }, + updated: true, + }, + }, + }, +}; + +export const NavigatingAndUpdatedStore = { + parameters: { + sveltekit_experimental: { + stores: { + navigating: { + route: { + id: '/storybook', + }, + }, + updated: true, + }, + }, + }, +}; + +export const AllThreeStores = { + parameters: { + sveltekit_experimental: { + stores: { + page: { + data: { + test: 'passed', + }, + }, + navigating: { + route: { + id: '/storybook', + }, + }, + updated: true, + }, + }, + }, +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/LICENSE.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..36d00ff1fd751829a244f1edd040dc153712c699 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/LICENSE.md @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2022 Tyreal Hu +Copyright (c) 2025 The Svelte Team + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c6305decb779ffdfc6604810ed7b10a50439dc36 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/README.md @@ -0,0 +1,70 @@ +# @sveltejs/acorn-typescript + +[![License](https://img.shields.io/npm/l/svelte.svg)](LICENSE.md) [![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat) + +This is a plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript. + +It was created as an experimental alternative, faster [TypeScript](https://www.typescriptlang.org/) parser. It will help you to parse +TypeScript using Acorn. + +## Usage + +To get started, import the plugin and use Acorn's extension mechanism to register it. You have to enable `options.locations` while using `@sveltejs/acorn-typescript`. + +```typescript +import { Parser } from 'acorn'; +import { tsPlugin } from '@sveltejs/acorn-typescript'; + +const node = Parser.extend(tsPlugin()).parse( + ` +const a = 1 +type A = number +export { + a, + type A as B +} +`, + { + sourceType: 'module', + ecmaVersion: 'latest', + locations: true + } +); +``` + +If you want to enable parsing within a TypeScript ambient context, where certain syntax have different rules (like `.d.ts` files and inside [declare module blocks](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)): + +```typescript +import { Parser } from 'acorn'; +import { tsPlugin } from '@sveltejs/acorn-typescript'; + +const node = Parser.extend(tsPlugin({ dts: true })).parse( + ` +const a = 1 +type A = number +export { + a, + type A as B +} +`, + { + sourceType: 'module', + ecmaVersion: 'latest', + locations: true + } +); +``` + +## SUPPORTED + +- Typescript normal syntax +- Support to parse TypeScript [Decorators](https://www.typescriptlang.org/docs/handbook/decorators.html) +- Support to parse JSX & TSX + +## CHANGELOG + +[click](./CHANGELOG.md) + +## Acknowledgments + +We want to thank [TyrealHu](https://github.com/TyrealHu) for his original work on this project. He maintained [`acorn-typescript`](https://github.com/TyrealHu/acorn-typescript) until early 2024. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1f357ecf1bb1a5a1c4abdf951e0d71b65e2d2320 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/index.d.ts @@ -0,0 +1,12 @@ +import { Parser } from 'acorn'; + +export function tsPlugin(options?: { + dts?: boolean; + /** Whether to use JSX. Defaults to false */ + jsx?: + | boolean + | { + allowNamespaces?: boolean; + allowNamespacedObjects?: boolean; + }; +}): (BaseParser: typeof Parser) => typeof Parser; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/index.js new file mode 100644 index 0000000000000000000000000000000000000000..eed0470be97b926d139ac3ecc1f0dea5bdde4530 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/index.js @@ -0,0 +1,5017 @@ +// src/index.ts +import * as acornNamespace from "acorn"; + +// src/tokenType.ts +var startsExpr = true; +var acornTypeScriptMap = /* @__PURE__ */ new WeakMap(); +function generateAcornTypeScript(_acorn) { + const acorn = _acorn.Parser.acorn || _acorn; + let acornTypeScript = acornTypeScriptMap.get(acorn); + if (!acornTypeScript) { + let tokenIsLiteralPropertyName = function(token) { + return token === tokTypes.name || token === tokTypes.string || token === tokTypes.num || keywordTypeValues.includes(token) || tsKwTokenTypeValues.includes(token); + }, tokenIsKeywordOrIdentifier = function(token) { + return token === tokTypes.name || keywordTypeValues.includes(token) || tsKwTokenTypeValues.includes(token); + }, tokenIsIdentifier = function(token) { + return token === tokTypes.name || tsKwTokenTypeValues.includes(token); + }, tokenIsTSDeclarationStart = function(token) { + return token === tsKwTokenType.abstract || token === tsKwTokenType.declare || token === tsKwTokenType.enum || token === tsKwTokenType.module || token === tsKwTokenType.namespace || token === tsKwTokenType.interface || token === tsKwTokenType.type; + }, tokenIsTSTypeOperator = function(token) { + return token === tsKwTokenType.keyof || token === tsKwTokenType.readonly || token === tsKwTokenType.unique; + }, tokenIsTemplate = function(token) { + return token === tokTypes.invalidTemplate; + }; + const { tokTypes, keywordTypes } = acorn; + const keywordTypeValues = Object.values(keywordTypes); + const tsKwTokenType = generateTsKwTokenType(); + const tsKwTokenTypeValues = Object.values(tsKwTokenType); + const tsTokenType = generateTsTokenType(); + const tsTokenContext = generateTsTokenContext(); + const tsKeywordsRegExp = new RegExp(`^(?:${Object.keys(tsKwTokenType).join("|")})$`); + tsTokenType.jsxTagStart.updateContext = function() { + this.context.push(tsTokenContext.tc_expr); + this.context.push(tsTokenContext.tc_oTag); + this.exprAllowed = false; + }; + tsTokenType.jsxTagEnd.updateContext = function(prevType) { + let out = this.context.pop(); + if (out === tsTokenContext.tc_oTag && prevType === tokTypes.slash || out === tsTokenContext.tc_cTag) { + this.context.pop(); + this.exprAllowed = this.curContext() === tsTokenContext.tc_expr; + } else { + this.exprAllowed = true; + } + }; + acornTypeScript = { + tokTypes: { + ...tsKwTokenType, + ...tsTokenType + }, + tokContexts: { + ...tsTokenContext + }, + keywordsRegExp: tsKeywordsRegExp, + tokenIsLiteralPropertyName, + tokenIsKeywordOrIdentifier, + tokenIsIdentifier, + tokenIsTSDeclarationStart, + tokenIsTSTypeOperator, + tokenIsTemplate + }; + } + return acornTypeScript; + function kwLike(_name, options = {}) { + return new acorn.TokenType("name", options); + } + function generateTsTokenContext() { + return { + tc_oTag: new acorn.TokContext("...", true, true) + }; + } + function generateTsTokenType() { + return { + // @ts-expect-error + at: new acorn.TokenType("@"), + // @ts-expect-error + jsxName: new acorn.TokenType("jsxName"), + // @ts-expect-error + jsxText: new acorn.TokenType("jsxText", { beforeExpr: true }), + // @ts-expect-error + jsxTagStart: new acorn.TokenType("jsxTagStart", { startsExpr: true }), + // @ts-expect-error + jsxTagEnd: new acorn.TokenType("jsxTagEnd") + }; + } + function generateTsKwTokenType() { + return { + assert: kwLike("assert", { startsExpr }), + asserts: kwLike("asserts", { startsExpr }), + global: kwLike("global", { startsExpr }), + keyof: kwLike("keyof", { startsExpr }), + readonly: kwLike("readonly", { startsExpr }), + unique: kwLike("unique", { startsExpr }), + abstract: kwLike("abstract", { startsExpr }), + declare: kwLike("declare", { startsExpr }), + enum: kwLike("enum", { startsExpr }), + module: kwLike("module", { startsExpr }), + namespace: kwLike("namespace", { startsExpr }), + interface: kwLike("interface", { startsExpr }), + type: kwLike("type", { startsExpr }) + }; + } +} + +// src/scopeflags.ts +var TS_SCOPE_OTHER = 512; +var TS_SCOPE_TS_MODULE = 1024; +var BIND_KIND_VALUE = 1; +var BIND_KIND_TYPE = 2; +var BIND_SCOPE_VAR = 4; +var BIND_SCOPE_LEXICAL = 8; +var BIND_SCOPE_FUNCTION = 16; +var BIND_FLAGS_NONE = 64; +var BIND_FLAGS_CLASS = 128; +var BIND_FLAGS_TS_ENUM = 256; +var BIND_FLAGS_TS_CONST_ENUM = 512; +var BIND_FLAGS_TS_EXPORT_ONLY = 1024; +var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS; +var BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0; +var BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0; +var BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0; +var BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS; +var BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0; +var BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM; +var BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY; +var BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE; +var BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE; +var BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM; +var BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY; +var CLASS_ELEMENT_FLAG_STATIC = 4; +var CLASS_ELEMENT_KIND_GETTER = 2; +var CLASS_ELEMENT_KIND_SETTER = 1; +var CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER; +var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC; +var CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC; + +// src/whitespace.ts +var skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y; +var skipWhiteSpaceToLineBreak = new RegExp( + // Unfortunately JS doesn't support Perl's atomic /(?>pattern)/ or + // possessive quantifiers, so we use a trick to prevent backtracking + // when the look-ahead for line terminator fails. + "(?=(" + // Capture the whitespace and comments that should be skipped inside + // a look-ahead assertion, and then re-match the group as a unit. + skipWhiteSpaceInLine.source + "))\\1" + // Look-ahead for either line terminator, start of multi-line comment, + // or end of string. + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, + "y" + // sticky +); + +// src/parseutil.ts +var DestructuringErrors = class { + constructor() { + this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1; + } +}; +function isPrivateNameConflicted(privateNameMap, element) { + const name = element.key.name; + const curr = privateNameMap[name]; + let next = "true"; + if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) { + next = (element.static ? "s" : "i") + element.kind; + } + if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") { + privateNameMap[name] = "true"; + return false; + } else if (!curr) { + privateNameMap[name] = next; + return false; + } else { + return true; + } +} +function checkKeyName(node, name) { + const { computed, key } = node; + return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name); +} + +// src/error.ts +var TypeScriptError = { + AbstractMethodHasImplementation: ({ methodName }) => `Method '${methodName}' cannot have an implementation because it is marked abstract.`, + AbstractPropertyHasInitializer: ({ propertyName }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`, + AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", + AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.", + CannotFindName: ({ name }) => `Cannot find name '${name}'.`, + ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", + ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", + ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference: "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.", + ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.", + DeclareAccessor: ({ kind }) => `'declare' is not allowed in ${kind}ters.`, + DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", + DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", + DuplicateAccessibilityModifier: ( + // `Accessibility modifier already seen: ${modifier}` would be more helpful. + // eslint-disable-next-line @typescript-eslint/no-unused-vars + () => `Accessibility modifier already seen.` + ), + DuplicateModifier: ({ modifier }) => `Duplicate modifier: '${modifier}'.`, + // `token` matches the terminology used by typescript: + // https://github.com/microsoft/TypeScript/blob/main/src/compiler/types.ts#L2915 + EmptyHeritageClauseType: ({ token }) => `'${token}' list cannot be empty.`, + EmptyTypeArguments: "Type argument list cannot be empty.", + EmptyTypeParameters: "Type parameter list cannot be empty.", + ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.", + ImportAliasHasImportType: "An import alias can not use 'import type'.", + IncompatibleModifiers: ({ modifiers }) => `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`, + IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", + IndexSignatureHasAccessibility: ({ modifier }) => `Index signatures cannot have an accessibility modifier ('${modifier}').`, + IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.", + IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.", + IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.", + InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.", + InvalidModifierOnTypeMember: ({ modifier }) => `'${modifier}' modifier cannot appear on a type member.`, + InvalidModifierOnTypeParameter: ({ modifier }) => `'${modifier}' modifier cannot appear on a type parameter.`, + InvalidModifierOnTypeParameterPositions: ({ modifier }) => `'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`, + InvalidModifiersOrder: ({ orderedModifiers }) => `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`, + InvalidPropertyAccessAfterInstantiationExpression: "Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.", + InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.", + MissingInterfaceName: "'interface' declarations must be followed by an identifier.", + NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", + NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.", + OptionalTypeBeforeRequired: "A required element cannot follow an optional element.", + OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.", + PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.", + PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.", + PrivateElementHasAccessibility: ({ modifier }) => `Private elements cannot have an accessibility modifier ('${modifier}').`, + PrivateMethodsHasAccessibility: ({ modifier }) => `Private methods cannot have an accessibility modifier ('${modifier}').`, + ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.", + ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.", + ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.", + SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", + SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", + SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", + SingleTypeParameterWithoutTrailingComma: ({ typeParameterName }) => `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`, + StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.", + TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.", + TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.", + TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.", + TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.", + UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.", + UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.", + GenericsEndWithComma: `Trailing comma is not allowed at the end of generics.`, + UnexpectedTypeAnnotation: "Did not expect a type annotation here.", + UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.", + UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.", + UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.", + UnsupportedSignatureParameterKind: ({ type }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.`, + LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." +}; +var DecoratorsError = { + UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.", + DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", + TrailingDecorator: "Decorators must be attached to a class element.", + SpreadElementDecorator: `Decorators can't be used with SpreadElement` +}; + +// src/extentions/decorators.ts +function generateParseDecorators(Parse, acornTypeScript, acorn) { + const { tokTypes: tt } = acorn; + const { tokTypes } = acornTypeScript; + return class ParseDecorators extends Parse { + takeDecorators(node) { + const decorators = this.decoratorStack[this.decoratorStack.length - 1]; + if (decorators.length) { + node.decorators = decorators; + this.resetStartLocationFromNode(node, decorators[0]); + this.decoratorStack[this.decoratorStack.length - 1] = []; + } + } + parseDecorators(allowExport) { + const currentContextDecorators = this.decoratorStack[this.decoratorStack.length - 1]; + while (this.match(tokTypes.at)) { + const decorator = this.parseDecorator(); + currentContextDecorators.push(decorator); + } + if (this.match(tt._export)) { + if (!allowExport) { + this.unexpected(); + } + } else if (!this.canHaveLeadingDecorator()) { + this.raise(this.start, DecoratorsError.UnexpectedLeadingDecorator); + } + } + parseDecorator() { + const node = this.startNode(); + this.next(); + this.decoratorStack.push([]); + const startPos = this.start; + const startLoc = this.startLoc; + let expr; + if (this.match(tt.parenL)) { + const startPos2 = this.start; + const startLoc2 = this.startLoc; + this.next(); + expr = this.parseExpression(); + this.expect(tt.parenR); + if (this.options.preserveParens) { + let par = this.startNodeAt(startPos2, startLoc2); + par.expression = expr; + expr = this.finishNode(par, "ParenthesizedExpression"); + } + } else { + expr = this.parseIdent(false); + while (this.eat(tt.dot)) { + const node2 = this.startNodeAt(startPos, startLoc); + node2.object = expr; + node2.property = this.parseIdent(true); + node2.computed = false; + expr = this.finishNode(node2, "MemberExpression"); + } + } + node.expression = this.parseMaybeDecoratorArguments(expr); + this.decoratorStack.pop(); + return this.finishNode(node, "Decorator"); + } + parseMaybeDecoratorArguments(expr) { + if (this.eat(tt.parenL)) { + const node = this.startNodeAtNode(expr); + node.callee = expr; + node.arguments = this.parseExprList(tt.parenR, false); + return this.finishNode(node, "CallExpression"); + } + return expr; + } + }; +} + +// src/extentions/jsx/xhtml.ts +var xhtml_default = { + quot: '"', + amp: "&", + apos: "'", + lt: "<", + gt: ">", + nbsp: "\xA0", + iexcl: "\xA1", + cent: "\xA2", + pound: "\xA3", + curren: "\xA4", + yen: "\xA5", + brvbar: "\xA6", + sect: "\xA7", + uml: "\xA8", + copy: "\xA9", + ordf: "\xAA", + laquo: "\xAB", + not: "\xAC", + shy: "\xAD", + reg: "\xAE", + macr: "\xAF", + deg: "\xB0", + plusmn: "\xB1", + sup2: "\xB2", + sup3: "\xB3", + acute: "\xB4", + micro: "\xB5", + para: "\xB6", + middot: "\xB7", + cedil: "\xB8", + sup1: "\xB9", + ordm: "\xBA", + raquo: "\xBB", + frac14: "\xBC", + frac12: "\xBD", + frac34: "\xBE", + iquest: "\xBF", + Agrave: "\xC0", + Aacute: "\xC1", + Acirc: "\xC2", + Atilde: "\xC3", + Auml: "\xC4", + Aring: "\xC5", + AElig: "\xC6", + Ccedil: "\xC7", + Egrave: "\xC8", + Eacute: "\xC9", + Ecirc: "\xCA", + Euml: "\xCB", + Igrave: "\xCC", + Iacute: "\xCD", + Icirc: "\xCE", + Iuml: "\xCF", + ETH: "\xD0", + Ntilde: "\xD1", + Ograve: "\xD2", + Oacute: "\xD3", + Ocirc: "\xD4", + Otilde: "\xD5", + Ouml: "\xD6", + times: "\xD7", + Oslash: "\xD8", + Ugrave: "\xD9", + Uacute: "\xDA", + Ucirc: "\xDB", + Uuml: "\xDC", + Yacute: "\xDD", + THORN: "\xDE", + szlig: "\xDF", + agrave: "\xE0", + aacute: "\xE1", + acirc: "\xE2", + atilde: "\xE3", + auml: "\xE4", + aring: "\xE5", + aelig: "\xE6", + ccedil: "\xE7", + egrave: "\xE8", + eacute: "\xE9", + ecirc: "\xEA", + euml: "\xEB", + igrave: "\xEC", + iacute: "\xED", + icirc: "\xEE", + iuml: "\xEF", + eth: "\xF0", + ntilde: "\xF1", + ograve: "\xF2", + oacute: "\xF3", + ocirc: "\xF4", + otilde: "\xF5", + ouml: "\xF6", + divide: "\xF7", + oslash: "\xF8", + ugrave: "\xF9", + uacute: "\xFA", + ucirc: "\xFB", + uuml: "\xFC", + yacute: "\xFD", + thorn: "\xFE", + yuml: "\xFF", + OElig: "\u0152", + oelig: "\u0153", + Scaron: "\u0160", + scaron: "\u0161", + Yuml: "\u0178", + fnof: "\u0192", + circ: "\u02C6", + tilde: "\u02DC", + Alpha: "\u0391", + Beta: "\u0392", + Gamma: "\u0393", + Delta: "\u0394", + Epsilon: "\u0395", + Zeta: "\u0396", + Eta: "\u0397", + Theta: "\u0398", + Iota: "\u0399", + Kappa: "\u039A", + Lambda: "\u039B", + Mu: "\u039C", + Nu: "\u039D", + Xi: "\u039E", + Omicron: "\u039F", + Pi: "\u03A0", + Rho: "\u03A1", + Sigma: "\u03A3", + Tau: "\u03A4", + Upsilon: "\u03A5", + Phi: "\u03A6", + Chi: "\u03A7", + Psi: "\u03A8", + Omega: "\u03A9", + alpha: "\u03B1", + beta: "\u03B2", + gamma: "\u03B3", + delta: "\u03B4", + epsilon: "\u03B5", + zeta: "\u03B6", + eta: "\u03B7", + theta: "\u03B8", + iota: "\u03B9", + kappa: "\u03BA", + lambda: "\u03BB", + mu: "\u03BC", + nu: "\u03BD", + xi: "\u03BE", + omicron: "\u03BF", + pi: "\u03C0", + rho: "\u03C1", + sigmaf: "\u03C2", + sigma: "\u03C3", + tau: "\u03C4", + upsilon: "\u03C5", + phi: "\u03C6", + chi: "\u03C7", + psi: "\u03C8", + omega: "\u03C9", + thetasym: "\u03D1", + upsih: "\u03D2", + piv: "\u03D6", + ensp: "\u2002", + emsp: "\u2003", + thinsp: "\u2009", + zwnj: "\u200C", + zwj: "\u200D", + lrm: "\u200E", + rlm: "\u200F", + ndash: "\u2013", + mdash: "\u2014", + lsquo: "\u2018", + rsquo: "\u2019", + sbquo: "\u201A", + ldquo: "\u201C", + rdquo: "\u201D", + bdquo: "\u201E", + dagger: "\u2020", + Dagger: "\u2021", + bull: "\u2022", + hellip: "\u2026", + permil: "\u2030", + prime: "\u2032", + Prime: "\u2033", + lsaquo: "\u2039", + rsaquo: "\u203A", + oline: "\u203E", + frasl: "\u2044", + euro: "\u20AC", + image: "\u2111", + weierp: "\u2118", + real: "\u211C", + trade: "\u2122", + alefsym: "\u2135", + larr: "\u2190", + uarr: "\u2191", + rarr: "\u2192", + darr: "\u2193", + harr: "\u2194", + crarr: "\u21B5", + lArr: "\u21D0", + uArr: "\u21D1", + rArr: "\u21D2", + dArr: "\u21D3", + hArr: "\u21D4", + forall: "\u2200", + part: "\u2202", + exist: "\u2203", + empty: "\u2205", + nabla: "\u2207", + isin: "\u2208", + notin: "\u2209", + ni: "\u220B", + prod: "\u220F", + sum: "\u2211", + minus: "\u2212", + lowast: "\u2217", + radic: "\u221A", + prop: "\u221D", + infin: "\u221E", + ang: "\u2220", + and: "\u2227", + or: "\u2228", + cap: "\u2229", + cup: "\u222A", + int: "\u222B", + there4: "\u2234", + sim: "\u223C", + cong: "\u2245", + asymp: "\u2248", + ne: "\u2260", + equiv: "\u2261", + le: "\u2264", + ge: "\u2265", + sub: "\u2282", + sup: "\u2283", + nsub: "\u2284", + sube: "\u2286", + supe: "\u2287", + oplus: "\u2295", + otimes: "\u2297", + perp: "\u22A5", + sdot: "\u22C5", + lceil: "\u2308", + rceil: "\u2309", + lfloor: "\u230A", + rfloor: "\u230B", + lang: "\u2329", + rang: "\u232A", + loz: "\u25CA", + spades: "\u2660", + clubs: "\u2663", + hearts: "\u2665", + diams: "\u2666" +}; + +// src/extentions/jsx/index.ts +var hexNumber = /^[\da-fA-F]+$/; +var decimalNumber = /^\d+$/; +function getQualifiedJSXName(object) { + if (!object) return object; + if (object.type === "JSXIdentifier") return object.name; + if (object.type === "JSXNamespacedName") return object.namespace.name + ":" + object.name.name; + if (object.type === "JSXMemberExpression") + return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); +} +function generateJsxParser(acorn, acornTypeScript, Parser, jsxOptions) { + const tt = acorn.tokTypes; + const tok = acornTypeScript.tokTypes; + const isNewLine = acorn.isNewLine; + const isIdentifierChar = acorn.isIdentifierChar; + const options = Object.assign( + { + allowNamespaces: true, + allowNamespacedObjects: true + }, + jsxOptions || {} + ); + return class JsxParser extends Parser { + // Reads inline JSX contents token. + jsx_readToken() { + let out = "", chunkStart = this.pos; + for (; ; ) { + if (this.pos >= this.input.length) this.raise(this.start, "Unterminated JSX contents"); + let ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 60: + // '<' + case 123: + if (this.pos === this.start) { + if (ch === 60 && this.exprAllowed) { + ++this.pos; + return this.finishToken(tok.jsxTagStart); + } + return this.getTokenFromCode(ch); + } + out += this.input.slice(chunkStart, this.pos); + return this.finishToken(tok.jsxText, out); + case 38: + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readEntity(); + chunkStart = this.pos; + break; + case 62: + // '>' + case 125: + this.raise( + this.pos, + "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (ch === 62 ? ">" : "}") + '` or `{"' + this.input[this.pos] + '"}`?' + ); + default: + if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readNewLine(true); + chunkStart = this.pos; + } else { + ++this.pos; + } + } + } + } + jsx_readNewLine(normalizeCRLF) { + let ch = this.input.charCodeAt(this.pos); + let out; + ++this.pos; + if (ch === 13 && this.input.charCodeAt(this.pos) === 10) { + ++this.pos; + out = normalizeCRLF ? "\n" : "\r\n"; + } else { + out = String.fromCharCode(ch); + } + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + return out; + } + jsx_readString(quote) { + let out = "", chunkStart = ++this.pos; + for (; ; ) { + if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant"); + let ch = this.input.charCodeAt(this.pos); + if (ch === quote) break; + if (ch === 38) { + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readEntity(); + chunkStart = this.pos; + } else if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readNewLine(false); + chunkStart = this.pos; + } else { + ++this.pos; + } + } + out += this.input.slice(chunkStart, this.pos++); + return this.finishToken(tt.string, out); + } + jsx_readEntity() { + let str = "", count = 0, entity; + let ch = this.input[this.pos]; + if (ch !== "&") this.raise(this.pos, "Entity must start with an ampersand"); + let startPos = ++this.pos; + while (this.pos < this.input.length && count++ < 10) { + ch = this.input[this.pos++]; + if (ch === ";") { + if (str[0] === "#") { + if (str[1] === "x") { + str = str.substr(2); + if (hexNumber.test(str)) entity = String.fromCharCode(parseInt(str, 16)); + } else { + str = str.substr(1); + if (decimalNumber.test(str)) entity = String.fromCharCode(parseInt(str, 10)); + } + } else { + entity = xhtml_default[str]; + } + break; + } + str += ch; + } + if (!entity) { + this.pos = startPos; + return "&"; + } + return entity; + } + // Read a JSX identifier (valid tag or attribute name). + // + // Optimized version since JSX identifiers can't contain + // escape characters and so can be read as single slice. + // Also assumes that first character was already checked + // by isIdentifierStart in readToken. + jsx_readWord() { + let ch, start = this.pos; + do { + ch = this.input.charCodeAt(++this.pos); + } while (isIdentifierChar(ch) || ch === 45); + return this.finishToken(tok.jsxName, this.input.slice(start, this.pos)); + } + // Parse next token as JSX identifier + jsx_parseIdentifier() { + let node = this.startNode(); + if (this.type === tok.jsxName) node.name = this.value; + else if (this.type.keyword) node.name = this.type.keyword; + else this.unexpected(); + this.next(); + return this.finishNode(node, "JSXIdentifier"); + } + // Parse namespaced identifier. + jsx_parseNamespacedName() { + let startPos = this.start, startLoc = this.startLoc; + let name = this.jsx_parseIdentifier(); + if (!options.allowNamespaces || !this.eat(tt.colon)) return name; + var node = this.startNodeAt(startPos, startLoc); + node.namespace = name; + node.name = this.jsx_parseIdentifier(); + return this.finishNode(node, "JSXNamespacedName"); + } + // Parses element name in any form - namespaced, member + // or single identifier. + jsx_parseElementName() { + if (this.type === tok.jsxTagEnd) return ""; + let startPos = this.start, startLoc = this.startLoc; + let node = this.jsx_parseNamespacedName(); + if (this.type === tt.dot && node.type === "JSXNamespacedName" && !options.allowNamespacedObjects) { + this.unexpected(); + } + while (this.eat(tt.dot)) { + let newNode = this.startNodeAt(startPos, startLoc); + newNode.object = node; + newNode.property = this.jsx_parseIdentifier(); + node = this.finishNode(newNode, "JSXMemberExpression"); + } + return node; + } + // Parses any type of JSX attribute value. + jsx_parseAttributeValue() { + switch (this.type) { + case tt.braceL: + let node = this.jsx_parseExpressionContainer(); + if (node.expression.type === "JSXEmptyExpression") + this.raise(node.start, "JSX attributes must only be assigned a non-empty expression"); + return node; + case tok.jsxTagStart: + case tt.string: + return this.parseExprAtom(); + default: + this.raise(this.start, "JSX value should be either an expression or a quoted JSX text"); + } + } + // JSXEmptyExpression is unique type since it doesn't actually parse anything, + // and so it should start at the end of last read token (left brace) and finish + // at the beginning of the next one (right brace). + jsx_parseEmptyExpression() { + let node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc); + return this.finishNodeAt(node, "JSXEmptyExpression", this.start, this.startLoc); + } + // Parses JSX expression enclosed into curly brackets. + jsx_parseExpressionContainer() { + let node = this.startNode(); + this.next(); + node.expression = this.type === tt.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression(); + this.expect(tt.braceR); + return this.finishNode(node, "JSXExpressionContainer"); + } + // Parses following JSX attribute name-value pair. + jsx_parseAttribute() { + let node = this.startNode(); + if (this.eat(tt.braceL)) { + this.expect(tt.ellipsis); + node.argument = this.parseMaybeAssign(); + this.expect(tt.braceR); + return this.finishNode(node, "JSXSpreadAttribute"); + } + node.name = this.jsx_parseNamespacedName(); + node.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null; + return this.finishNode(node, "JSXAttribute"); + } + // Parses JSX opening tag starting after '<'. + jsx_parseOpeningElementAt(startPos, startLoc) { + let node = this.startNodeAt(startPos, startLoc); + node.attributes = []; + let nodeName = this.jsx_parseElementName(); + if (nodeName) node.name = nodeName; + while (this.type !== tt.slash && this.type !== tok.jsxTagEnd) + node.attributes.push(this.jsx_parseAttribute()); + node.selfClosing = this.eat(tt.slash); + this.expect(tok.jsxTagEnd); + return this.finishNode(node, nodeName ? "JSXOpeningElement" : "JSXOpeningFragment"); + } + // Parses JSX closing tag starting after '" + ); + } + } + let fragmentOrElement = openingElement.name ? "Element" : "Fragment"; + node["opening" + fragmentOrElement] = openingElement; + node["closing" + fragmentOrElement] = closingElement; + node.children = children; + if (this.type === tt.relational && this.value === "<") { + this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"); + } + return this.finishNode(node, "JSX" + fragmentOrElement); + } + // Parse JSX text + jsx_parseText() { + let node = this.parseLiteral(this.value); + node.type = "JSXText"; + return node; + } + // Parses entire JSX element from current position. + jsx_parseElement() { + let startPos = this.start, startLoc = this.startLoc; + this.next(); + return this.jsx_parseElementAt(startPos, startLoc); + } + }; +} + +// src/extentions/import-assertions.ts +function generateParseImportAssertions(Parse, acornTypeScript, acorn) { + const { tokTypes } = acornTypeScript; + const { tokTypes: tt } = acorn; + return class ImportAttributes extends Parse { + parseMaybeImportAttributes(node) { + if (this.type === tt._with || this.type === tokTypes.assert) { + this.next(); + const attributes = this.parseImportAttributes(); + if (attributes) { + node.attributes = attributes; + } + } + } + parseImportAttributes() { + this.expect(tt.braceL); + const attrs = this.parseWithEntries(); + this.expect(tt.braceR); + return attrs; + } + parseWithEntries() { + const attrs = []; + const attrNames = /* @__PURE__ */ new Set(); + do { + if (this.type === tt.braceR) { + break; + } + const node = this.startNode(); + let withionKeyNode; + if (this.type === tt.string) { + withionKeyNode = this.parseLiteral(this.value); + } else { + withionKeyNode = this.parseIdent(true); + } + this.next(); + node.key = withionKeyNode; + if (attrNames.has(node.key.name)) { + this.raise(this.pos, "Duplicated key in attributes"); + } + attrNames.add(node.key.name); + if (this.type !== tt.string) { + this.raise(this.pos, "Only string is supported as an attribute value"); + } + node.value = this.parseLiteral(this.value); + attrs.push(this.finishNode(node, "ImportAttribute")); + } while (this.eat(tt.comma)); + return attrs; + } + }; +} + +// src/index.ts +var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; +function assert(x) { + if (!x) { + throw new Error("Assert fail"); + } +} +function tsIsClassAccessor(modifier) { + return modifier === "accessor"; +} +function tsIsVarianceAnnotations(modifier) { + return modifier === "in" || modifier === "out"; +} +var FUNC_STATEMENT = 1; +var FUNC_HANGING_STATEMENT = 2; +var FUNC_NULLABLE_ID = 4; +var acornScope = { + SCOPE_TOP: 1, + SCOPE_FUNCTION: 2, + SCOPE_ASYNC: 4, + SCOPE_GENERATOR: 8, + SCOPE_ARROW: 16, + SCOPE_SIMPLE_CATCH: 32, + SCOPE_SUPER: 64, + SCOPE_DIRECT_SUPER: 128, + SCOPE_CLASS_STATIC_BLOCK: 256, + SCOPE_VAR: 256, + BIND_NONE: 0, + // Not a binding + BIND_VAR: 1, + // Var-style binding + BIND_LEXICAL: 2, + // Let- or const-style binding + BIND_FUNCTION: 3, + // Function declaration + BIND_SIMPLE_CATCH: 4, + // Simple (identifier pattern) catch binding + BIND_OUTSIDE: 5, + // Special case for function names as bound inside the + BIND_TS_TYPE: 6, + BIND_TS_INTERFACE: 7, + BIND_TS_NAMESPACE: 8 | 1024, + // includes BIND_FLAGS_TS_EXPORT_ONLY for declaration merging + BIND_FLAGS_TS_EXPORT_ONLY: 1024, + BIND_FLAGS_TS_IMPORT: 4096, + BIND_FLAGS_TS_ENUM: 256, + BIND_FLAGS_TS_CONST_ENUM: 512, + BIND_FLAGS_CLASS: 128 + // function +}; +function functionFlags(async, generator) { + return acornScope.SCOPE_FUNCTION | (async ? acornScope.SCOPE_ASYNC : 0) | (generator ? acornScope.SCOPE_GENERATOR : 0); +} +function isPossiblyLiteralEnum(expression) { + if (expression.type !== "MemberExpression") return false; + const { computed, property } = expression; + if (computed && (property.type !== "TemplateLiteral" || property.expressions.length > 0)) { + return false; + } + return isUncomputedMemberExpressionChain(expression.object); +} +function isUncomputedMemberExpressionChain(expression) { + if (expression.type === "Identifier") return true; + if (expression.type !== "MemberExpression") return false; + if (expression.computed) return false; + return isUncomputedMemberExpressionChain(expression.object); +} +function tsIsAccessModifier(modifier) { + return modifier === "private" || modifier === "public" || modifier === "protected"; +} +function tokenCanStartExpression(token) { + return Boolean(token.startsExpr); +} +function nonNull(x) { + if (x == null) { + throw new Error(`Unexpected ${x} value.`); + } + return x; +} +function keywordTypeFromName(value) { + switch (value) { + case "any": + return "TSAnyKeyword"; + case "boolean": + return "TSBooleanKeyword"; + case "bigint": + return "TSBigIntKeyword"; + case "never": + return "TSNeverKeyword"; + case "number": + return "TSNumberKeyword"; + case "object": + return "TSObjectKeyword"; + case "string": + return "TSStringKeyword"; + case "symbol": + return "TSSymbolKeyword"; + case "undefined": + return "TSUndefinedKeyword"; + case "unknown": + return "TSUnknownKeyword"; + default: + return void 0; + } +} +function tsPlugin(options) { + const { dts = false } = options || {}; + const disallowAmbiguousJSXLike = !!options?.jsx; + return function(Parser) { + const _acorn = Parser.acorn || acornNamespace; + const acornTypeScript = generateAcornTypeScript(_acorn); + const tt = _acorn.tokTypes; + const keywordTypes = _acorn.keywordTypes; + const isIdentifierStart = _acorn.isIdentifierStart; + const lineBreak = _acorn.lineBreak; + const isNewLine = _acorn.isNewLine; + const tokContexts = _acorn.tokContexts; + const isIdentifierChar = _acorn.isIdentifierChar; + const { + tokTypes, + tokContexts: tsTokContexts, + keywordsRegExp, + tokenIsLiteralPropertyName, + tokenIsTemplate, + tokenIsTSDeclarationStart, + tokenIsIdentifier, + tokenIsKeywordOrIdentifier, + tokenIsTSTypeOperator + } = acornTypeScript; + function nextLineBreak(code, from, end = code.length) { + for (let i = from; i < end; i++) { + let next = code.charCodeAt(i); + if (isNewLine(next)) + return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1; + } + return -1; + } + Parser = generateParseDecorators(Parser, acornTypeScript, _acorn); + if (options?.jsx) { + Parser = generateJsxParser( + _acorn, + acornTypeScript, + Parser, + typeof options.jsx === "boolean" ? {} : options.jsx + ); + } + Parser = generateParseImportAssertions(Parser, acornTypeScript, _acorn); + class TypeScriptParser extends Parser { + constructor(options2, input, startPos) { + super(options2, input, startPos); + this.preValue = null; + this.preToken = null; + this.isLookahead = false; + this.isAmbientContext = false; + this.inAbstractClass = false; + this.inType = false; + this.inDisallowConditionalTypesContext = false; + this.maybeInArrowParameters = false; + this.shouldParseArrowReturnType = void 0; + this.shouldParseAsyncArrowReturnType = void 0; + this.decoratorStack = [[]]; + this.importsStack = [[]]; + /** + * we will only parse one import node or export node at same time. + * default kind is undefined + * */ + this.importOrExportOuterKind = void 0; + this.tsParseConstModifier = (node) => { + this.tsParseModifiers({ + modified: node, + allowedModifiers: ["const"], + // for better error recovery + disallowedModifiers: ["in", "out"], + errorTemplate: TypeScriptError.InvalidModifierOnTypeParameterPositions + }); + }; + this.ecmaVersion = this.options.ecmaVersion; + } + // support in Class static + static get acornTypeScript() { + return acornTypeScript; + } + // support in runtime, get acornTypeScript be this + get acornTypeScript() { + return acornTypeScript; + } + getTokenFromCodeInType(code) { + if (code === 62) { + return this.finishOp(tt.relational, 1); + } + if (code === 60) { + return this.finishOp(tt.relational, 1); + } + return super.getTokenFromCode(code); + } + readToken(code) { + if (!this.inType) { + let context = this.curContext(); + if (context === tsTokContexts.tc_expr) return this.jsx_readToken(); + if (context === tsTokContexts.tc_oTag || context === tsTokContexts.tc_cTag) { + if (isIdentifierStart(code)) return this.jsx_readWord(); + if (code == 62) { + ++this.pos; + return this.finishToken(tokTypes.jsxTagEnd); + } + if ((code === 34 || code === 39) && context == tsTokContexts.tc_oTag) + return this.jsx_readString(code); + } + if (code === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) { + ++this.pos; + if (options?.jsx) { + return this.finishToken(tokTypes.jsxTagStart); + } else { + return this.finishToken(tt.relational, "<"); + } + } + } + return super.readToken(code); + } + getTokenFromCode(code) { + if (this.inType) { + return this.getTokenFromCodeInType(code); + } + if (code === 64) { + ++this.pos; + return this.finishToken(tokTypes.at); + } + return super.getTokenFromCode(code); + } + isAbstractClass() { + return this.ts_isContextual(tokTypes.abstract) && this.lookahead().type === tt._class; + } + finishNode(node, type) { + if (node.type !== "" && node.end !== 0) { + return node; + } + return super.finishNode(node, type); + } + // tryParse will clone parser state. + // It is expensive and should be used with cautions + tryParse(fn, oldState = this.cloneCurLookaheadState()) { + const abortSignal = { node: null }; + try { + const node = fn((node2 = null) => { + abortSignal.node = node2; + throw abortSignal; + }); + return { + node, + error: null, + thrown: false, + aborted: false, + failState: null + }; + } catch (error) { + const failState = this.getCurLookaheadState(); + this.setLookaheadState(oldState); + if (error instanceof SyntaxError) { + return { + node: null, + error, + thrown: true, + aborted: false, + failState + }; + } + if (error === abortSignal) { + return { + node: abortSignal.node, + error: null, + thrown: false, + aborted: true, + failState + }; + } + throw error; + } + } + setOptionalParametersError(refExpressionErrors, resultError) { + refExpressionErrors.optionalParametersLoc = resultError?.loc ?? this.startLoc; + } + // used after we have finished parsing types + reScan_lt_gt() { + if (this.type === tt.relational) { + this.pos -= 1; + this.readToken_lt_gt(this.fullCharCodeAtPos()); + } + } + reScan_lt() { + const { type } = this; + if (type === tt.bitShift) { + this.pos -= 2; + this.finishOp(tt.relational, 1); + return tt.relational; + } + return type; + } + resetEndLocation(node, endPos = this.lastTokEnd, endLoc = this.lastTokEndLoc) { + node.end = endPos; + node.loc.end = endLoc; + if (this.options.ranges) node.range[1] = endPos; + } + startNodeAtNode(type) { + return super.startNodeAt(type.start, type.loc.start); + } + nextTokenStart() { + return this.nextTokenStartSince(this.pos); + } + tsHasSomeModifiers(member, modifiers) { + return modifiers.some((modifier) => { + if (tsIsAccessModifier(modifier)) { + return member.accessibility === modifier; + } + return !!member[modifier]; + }); + } + tsIsStartOfStaticBlocks() { + return this.isContextual("static") && this.lookaheadCharCode() === 123; + } + tsCheckForInvalidTypeCasts(items) { + items.forEach((node) => { + if (node?.type === "TSTypeCastExpression") { + this.raise(node.typeAnnotation.start, TypeScriptError.UnexpectedTypeAnnotation); + } + }); + } + atPossibleAsyncArrow(base) { + return base.type === "Identifier" && base.name === "async" && this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.potentialArrowAt; + } + tsIsIdentifier() { + return tokenIsIdentifier(this.type); + } + tsTryParseTypeOrTypePredicateAnnotation() { + return this.match(tt.colon) ? this.tsParseTypeOrTypePredicateAnnotation(tt.colon) : void 0; + } + tsTryParseGenericAsyncArrowFunction(startPos, startLoc, forInit) { + if (!this.tsMatchLeftRelational()) { + return void 0; + } + const oldMaybeInArrowParameters = this.maybeInArrowParameters; + this.maybeInArrowParameters = true; + const res = this.tsTryParseAndCatch(() => { + const node = this.startNodeAt(startPos, startLoc); + node.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); + super.parseFunctionParams(node); + node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); + this.expect(tt.arrow); + return node; + }); + this.maybeInArrowParameters = oldMaybeInArrowParameters; + if (!res) { + return void 0; + } + return super.parseArrowExpression( + res, + /* params are already set */ + null, + /* async */ + true, + /* forInit */ + forInit + ); + } + // Used when parsing type arguments from ES productions, where the first token + // has been created without state.inType. Thus we need to rescan the lt token. + tsParseTypeArgumentsInExpression() { + if (this.reScan_lt() !== tt.relational) { + return void 0; + } + return this.tsParseTypeArguments(); + } + tsInNoContext(cb) { + const oldContext = this.context; + this.context = [oldContext[0]]; + try { + return cb(); + } finally { + this.context = oldContext; + } + } + tsTryParseTypeAnnotation() { + return this.match(tt.colon) ? this.tsParseTypeAnnotation() : void 0; + } + isUnparsedContextual(nameStart, name) { + const nameEnd = nameStart + name.length; + if (this.input.slice(nameStart, nameEnd) === name) { + const nextCh = this.input.charCodeAt(nameEnd); + return !(isIdentifierChar(nextCh) || // check if `nextCh is between 0xd800 - 0xdbff, + // if `nextCh` is NaN, `NaN & 0xfc00` is 0, the function + // returns true + (nextCh & 64512) === 55296); + } + return false; + } + isAbstractConstructorSignature() { + return this.ts_isContextual(tokTypes.abstract) && this.lookahead().type === tt._new; + } + nextTokenStartSince(pos) { + skipWhiteSpace.lastIndex = pos; + return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos; + } + lookaheadCharCode() { + return this.input.charCodeAt(this.nextTokenStart()); + } + compareLookaheadState(state, state2) { + for (const key of Object.keys(state)) { + if (state[key] !== state2[key]) return false; + } + return true; + } + createLookaheadState() { + this.value = null; + this.context = [this.curContext()]; + } + getCurLookaheadState() { + return { + endLoc: this.endLoc, + lastTokEnd: this.lastTokEnd, + lastTokStart: this.lastTokStart, + lastTokStartLoc: this.lastTokStartLoc, + pos: this.pos, + value: this.value, + type: this.type, + start: this.start, + end: this.end, + context: this.context, + startLoc: this.startLoc, + lastTokEndLoc: this.lastTokEndLoc, + curLine: this.curLine, + lineStart: this.lineStart, + curPosition: this.curPosition, + containsEsc: this.containsEsc + }; + } + cloneCurLookaheadState() { + return { + pos: this.pos, + value: this.value, + type: this.type, + start: this.start, + end: this.end, + context: this.context && this.context.slice(), + startLoc: this.startLoc, + lastTokEndLoc: this.lastTokEndLoc, + endLoc: this.endLoc, + lastTokEnd: this.lastTokEnd, + lastTokStart: this.lastTokStart, + lastTokStartLoc: this.lastTokStartLoc, + curLine: this.curLine, + lineStart: this.lineStart, + curPosition: this.curPosition, + containsEsc: this.containsEsc + }; + } + setLookaheadState(state) { + this.pos = state.pos; + this.value = state.value; + this.endLoc = state.endLoc; + this.lastTokEnd = state.lastTokEnd; + this.lastTokStart = state.lastTokStart; + this.lastTokStartLoc = state.lastTokStartLoc; + this.type = state.type; + this.start = state.start; + this.end = state.end; + this.context = state.context; + this.startLoc = state.startLoc; + this.lastTokEndLoc = state.lastTokEndLoc; + this.curLine = state.curLine; + this.lineStart = state.lineStart; + this.curPosition = state.curPosition; + this.containsEsc = state.containsEsc; + } + // Utilities + tsLookAhead(f) { + const state = this.getCurLookaheadState(); + const res = f(); + this.setLookaheadState(state); + return res; + } + lookahead(number) { + const oldState = this.getCurLookaheadState(); + this.createLookaheadState(); + this.isLookahead = true; + if (number !== void 0) { + for (let i = 0; i < number; i++) { + this.nextToken(); + } + } else { + this.nextToken(); + } + this.isLookahead = false; + const curState = this.getCurLookaheadState(); + this.setLookaheadState(oldState); + return curState; + } + readWord() { + let word = this.readWord1(); + let type = tt.name; + if (this.keywords.test(word)) { + type = keywordTypes[word]; + } else if (new RegExp(keywordsRegExp).test(word)) { + type = tokTypes[word]; + } + return this.finishToken(type, word); + } + skipBlockComment() { + let startLoc; + if (!this.isLookahead) startLoc = this.options.onComment && this.curPosition(); + let start = this.pos, end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) this.raise(this.pos - 2, "Unterminated comment"); + this.pos = end + 2; + if (this.options.locations) { + for (let nextBreak, pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1; ) { + ++this.curLine; + pos = this.lineStart = nextBreak; + } + } + if (this.isLookahead) return; + if (this.options.onComment) { + this.options.onComment( + true, + this.input.slice(start + 2, end), + start, + this.pos, + startLoc, + this.curPosition() + ); + } + } + skipLineComment(startSkip) { + let start = this.pos; + let startLoc; + if (!this.isLookahead) startLoc = this.options.onComment && this.curPosition(); + let ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.isLookahead) return; + if (this.options.onComment) + this.options.onComment( + false, + this.input.slice(start + startSkip, this.pos), + start, + this.pos, + startLoc, + this.curPosition() + ); + } + finishToken(type, val) { + this.preValue = this.value; + this.preToken = this.type; + this.end = this.pos; + if (this.options.locations) this.endLoc = this.curPosition(); + let prevType = this.type; + this.type = type; + this.value = val; + if (!this.isLookahead) { + this.updateContext(prevType); + } + } + resetStartLocation(node, start, startLoc) { + node.start = start; + node.loc.start = startLoc; + if (this.options.ranges) node.range[0] = start; + } + isLineTerminator() { + return this.eat(tt.semi) || super.canInsertSemicolon(); + } + hasFollowingLineBreak() { + skipWhiteSpaceToLineBreak.lastIndex = this.end; + return skipWhiteSpaceToLineBreak.test(this.input); + } + addExtra(node, key, value, enumerable = true) { + if (!node) return; + const extra = node.extra = node.extra || {}; + if (enumerable) { + extra[key] = value; + } else { + Object.defineProperty(extra, key, { enumerable, value }); + } + } + /** + * Test if current token is a literal property name + * https://tc39.es/ecma262/#prod-LiteralPropertyName + * LiteralPropertyName: + * IdentifierName + * StringLiteral + * NumericLiteral + * BigIntLiteral + */ + isLiteralPropertyName() { + return tokenIsLiteralPropertyName(this.type); + } + hasPrecedingLineBreak() { + return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); + } + createIdentifier(node, name) { + node.name = name; + return this.finishNode(node, "Identifier"); + } + /** + * Reset the start location of node to the start location of locationNode + */ + resetStartLocationFromNode(node, locationNode) { + this.resetStartLocation(node, locationNode.start, locationNode.loc.start); + } + // This is used in flow and typescript plugin + // Determine whether a parameter is a this param + isThisParam(param) { + return param.type === "Identifier" && param.name === "this"; + } + isLookaheadContextual(name) { + const next = this.nextTokenStart(); + return this.isUnparsedContextual(next, name); + } + /** + * ts type isContextual + * @param {TokenType} type + * @param {TokenType} token + * @returns {boolean} + * */ + ts_type_isContextual(type, token) { + return type === token && !this.containsEsc; + } + /** + * ts isContextual + * @param {TokenType} token + * @returns {boolean} + * */ + ts_isContextual(token) { + return this.type === token && !this.containsEsc; + } + ts_isContextualWithState(state, token) { + return state.type === token && !state.containsEsc; + } + isContextualWithState(keyword, state) { + return state.type === tt.name && state.value === keyword && !state.containsEsc; + } + tsIsStartOfMappedType() { + this.next(); + if (this.eat(tt.plusMin)) { + return this.ts_isContextual(tokTypes.readonly); + } + if (this.ts_isContextual(tokTypes.readonly)) { + this.next(); + } + if (!this.match(tt.bracketL)) { + return false; + } + this.next(); + if (!this.tsIsIdentifier()) { + return false; + } + this.next(); + return this.match(tt._in); + } + tsInDisallowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.inDisallowConditionalTypesContext; + this.inDisallowConditionalTypesContext = true; + try { + return cb(); + } finally { + this.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } + tsTryParseType() { + return this.tsEatThenParseType(tt.colon); + } + /** + * Whether current token matches given type + * + * @param {TokenType} type + * @returns {boolean} + * @memberof Tokenizer + */ + match(type) { + return this.type === type; + } + matchJsx(type) { + return this.type === acornTypeScript.tokTypes[type]; + } + ts_eatWithState(type, nextCount, state) { + const targetType = state.type; + if (type === targetType) { + for (let i = 0; i < nextCount; i++) { + this.next(); + } + return true; + } else { + return false; + } + } + ts_eatContextualWithState(name, nextCount, state) { + if (keywordsRegExp.test(name)) { + if (this.ts_isContextualWithState(state, tokTypes[name])) { + for (let i = 0; i < nextCount; i++) { + this.next(); + } + return true; + } + return false; + } else { + if (!this.isContextualWithState(name, state)) return false; + for (let i = 0; i < nextCount; i++) { + this.next(); + } + return true; + } + } + canHaveLeadingDecorator() { + return this.match(tt._class) || this.isAbstractClass(); + } + eatContextual(name) { + if (keywordsRegExp.test(name)) { + if (this.ts_isContextual(tokTypes[name])) { + this.next(); + return true; + } + return false; + } else { + return super.eatContextual(name); + } + } + tsIsExternalModuleReference() { + return this.isContextual("require") && this.lookaheadCharCode() === 40; + } + tsParseExternalModuleReference() { + const node = this.startNode(); + this.expectContextual("require"); + this.expect(tt.parenL); + if (!this.match(tt.string)) { + this.unexpected(); + } + node.expression = this.parseExprAtom(); + this.expect(tt.parenR); + return this.finishNode(node, "TSExternalModuleReference"); + } + tsParseEntityName(allowReservedWords = true) { + let entity = this.parseIdent(allowReservedWords); + while (this.eat(tt.dot)) { + const node = this.startNodeAtNode(entity); + node.left = entity; + node.right = this.parseIdent(allowReservedWords); + entity = this.finishNode(node, "TSQualifiedName"); + } + return entity; + } + tsParseEnumMember() { + const node = this.startNode(); + node.id = this.match(tt.string) ? this.parseLiteral(this.value) : this.parseIdent( + /* liberal */ + true + ); + if (this.eat(tt.eq)) { + node.initializer = this.parseMaybeAssign(); + } + return this.finishNode(node, "TSEnumMember"); + } + tsParseEnumDeclaration(node, properties = {}) { + if (properties.const) node.const = true; + if (properties.declare) node.declare = true; + this.expectContextual("enum"); + node.id = this.parseIdent(); + this.checkLValSimple(node.id); + this.expect(tt.braceL); + node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); + this.expect(tt.braceR); + return this.finishNode(node, "TSEnumDeclaration"); + } + tsParseModuleBlock() { + const node = this.startNode(); + this.enterScope(TS_SCOPE_OTHER); + this.expect(tt.braceL); + node.body = []; + while (this.type !== tt.braceR) { + let stmt = this.parseStatement(null, true); + node.body.push(stmt); + } + this.next(); + super.exitScope(); + return this.finishNode(node, "TSModuleBlock"); + } + tsParseAmbientExternalModuleDeclaration(node) { + if (this.ts_isContextual(tokTypes.global)) { + node.global = true; + node.id = this.parseIdent(); + } else if (this.match(tt.string)) { + node.id = this.parseLiteral(this.value); + } else { + this.unexpected(); + } + if (this.match(tt.braceL)) { + this.enterScope(TS_SCOPE_TS_MODULE); + node.body = this.tsParseModuleBlock(); + super.exitScope(); + } else { + super.semicolon(); + } + return this.finishNode(node, "TSModuleDeclaration"); + } + tsTryParseDeclare(nany) { + if (this.isLineTerminator()) { + return; + } + let starttype = this.type; + let kind; + if (this.isContextual("let")) { + starttype = tt._var; + kind = "let"; + } + return this.tsInAmbientContext(() => { + if (starttype === tt._function) { + nany.declare = true; + return this.parseFunctionStatement( + nany, + /* async */ + false, + /* declarationPosition */ + true + ); + } + if (starttype === tt._class) { + nany.declare = true; + return this.parseClass(nany, true); + } + if (starttype === tokTypes.enum) { + return this.tsParseEnumDeclaration(nany, { declare: true }); + } + if (starttype === tokTypes.global) { + return this.tsParseAmbientExternalModuleDeclaration(nany); + } + if (starttype === tt._const || starttype === tt._var) { + if (!this.match(tt._const) || !this.isLookaheadContextual("enum")) { + nany.declare = true; + return this.parseVarStatement(nany, kind || this.value, true); + } + this.expect(tt._const); + return this.tsParseEnumDeclaration(nany, { + const: true, + declare: true + }); + } + if (starttype === tokTypes.interface) { + const result = this.tsParseInterfaceDeclaration(nany, { + declare: true + }); + if (result) return result; + } + if (tokenIsIdentifier(starttype)) { + return this.tsParseDeclaration( + nany, + this.value, + /* next */ + true + ); + } + }); + } + tsIsListTerminator(kind) { + switch (kind) { + case "EnumMembers": + case "TypeMembers": + return this.match(tt.braceR); + case "HeritageClauseElement": + return this.match(tt.braceL); + case "TupleElementTypes": + return this.match(tt.bracketR); + case "TypeParametersOrArguments": + return this.tsMatchRightRelational(); + } + } + /** + * If !expectSuccess, returns undefined instead of failing to parse. + * If expectSuccess, parseElement should always return a defined value. + */ + tsParseDelimitedListWorker(kind, parseElement, expectSuccess, refTrailingCommaPos) { + const result = []; + let trailingCommaPos = -1; + for (; ; ) { + if (this.tsIsListTerminator(kind)) { + break; + } + trailingCommaPos = -1; + const element = parseElement(); + if (element == null) { + return void 0; + } + result.push(element); + if (this.eat(tt.comma)) { + trailingCommaPos = this.lastTokStart; + continue; + } + if (this.tsIsListTerminator(kind)) { + break; + } + if (expectSuccess) { + this.expect(tt.comma); + } + return void 0; + } + if (refTrailingCommaPos) { + refTrailingCommaPos.value = trailingCommaPos; + } + return result; + } + tsParseDelimitedList(kind, parseElement, refTrailingCommaPos) { + return nonNull( + this.tsParseDelimitedListWorker( + kind, + parseElement, + /* expectSuccess */ + true, + refTrailingCommaPos + ) + ); + } + tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) { + if (!skipFirstToken) { + if (bracket) { + this.expect(tt.bracketL); + } else { + this.expect(tt.relational); + } + } + const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos); + if (bracket) { + this.expect(tt.bracketR); + } else { + this.expect(tt.relational); + } + return result; + } + tsParseTypeParameterName() { + const typeName = this.parseIdent(); + return typeName.name; + } + tsEatThenParseType(token) { + return !this.match(token) ? void 0 : this.tsNextThenParseType(); + } + tsExpectThenParseType(token) { + return this.tsDoThenParseType(() => this.expect(token)); + } + tsNextThenParseType() { + return this.tsDoThenParseType(() => this.next()); + } + tsDoThenParseType(cb) { + return this.tsInType(() => { + cb(); + return this.tsParseType(); + }); + } + tsSkipParameterStart() { + if (tokenIsIdentifier(this.type) || this.match(tt._this)) { + this.next(); + return true; + } + if (this.match(tt.braceL)) { + try { + this.parseObj(true); + return true; + } catch { + return false; + } + } + if (this.match(tt.bracketL)) { + this.next(); + try { + this.parseBindingList(tt.bracketR, true, true); + return true; + } catch { + return false; + } + } + return false; + } + tsIsUnambiguouslyStartOfFunctionType() { + this.next(); + if (this.match(tt.parenR) || this.match(tt.ellipsis)) { + return true; + } + if (this.tsSkipParameterStart()) { + if (this.match(tt.colon) || this.match(tt.comma) || this.match(tt.question) || this.match(tt.eq)) { + return true; + } + if (this.match(tt.parenR)) { + this.next(); + if (this.match(tt.arrow)) { + return true; + } + } + } + return false; + } + tsIsStartOfFunctionType() { + if (this.tsMatchLeftRelational()) { + return true; + } + return this.match(tt.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); + } + tsInAllowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.inDisallowConditionalTypesContext; + this.inDisallowConditionalTypesContext = false; + try { + return cb(); + } finally { + this.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } + tsParseBindingListForSignature() { + return super.parseBindingList(tt.parenR, true, true).map((pattern) => { + if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") { + this.raise( + pattern.start, + TypeScriptError.UnsupportedSignatureParameterKind({ type: pattern.type }) + ); + } + return pattern; + }); + } + tsParseTypePredicateAsserts() { + if (this.type !== tokTypes.asserts) { + return false; + } + const containsEsc = this.containsEsc; + this.next(); + if (!tokenIsIdentifier(this.type) && !this.match(tt._this)) { + return false; + } + if (containsEsc) { + this.raise(this.lastTokStart, "Escape sequence in keyword asserts"); + } + return true; + } + tsParseThisTypeNode() { + const node = this.startNode(); + this.next(); + return this.finishNode(node, "TSThisType"); + } + tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { + this.tsInType(() => { + if (eatColon) this.expect(tt.colon); + t.typeAnnotation = this.tsParseType(); + }); + return this.finishNode(t, "TSTypeAnnotation"); + } + tsParseThisTypePredicate(lhs) { + this.next(); + const node = this.startNodeAtNode(lhs); + node.parameterName = lhs; + node.typeAnnotation = this.tsParseTypeAnnotation( + /* eatColon */ + false + ); + node.asserts = false; + return this.finishNode(node, "TSTypePredicate"); + } + tsParseThisTypeOrThisTypePredicate() { + const thisKeyword = this.tsParseThisTypeNode(); + if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { + return this.tsParseThisTypePredicate(thisKeyword); + } else { + return thisKeyword; + } + } + tsParseTypePredicatePrefix() { + const id = this.parseIdent(); + if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { + this.next(); + return id; + } + } + tsParseTypeOrTypePredicateAnnotation(returnToken) { + return this.tsInType(() => { + const t = this.startNode(); + this.expect(returnToken); + const node = this.startNode(); + const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this)); + if (asserts && this.match(tt._this)) { + let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate(); + if (thisTypePredicate.type === "TSThisType") { + node.parameterName = thisTypePredicate; + node.asserts = true; + node.typeAnnotation = null; + thisTypePredicate = this.finishNode(node, "TSTypePredicate"); + } else { + this.resetStartLocationFromNode(thisTypePredicate, node); + thisTypePredicate.asserts = true; + } + t.typeAnnotation = thisTypePredicate; + return this.finishNode(t, "TSTypeAnnotation"); + } + const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); + if (!typePredicateVariable) { + if (!asserts) { + return this.tsParseTypeAnnotation( + /* eatColon */ + false, + t + ); + } + node.parameterName = this.parseIdent(); + node.asserts = asserts; + node.typeAnnotation = null; + t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + } + const type = this.tsParseTypeAnnotation( + /* eatColon */ + false + ); + node.parameterName = typePredicateVariable; + node.typeAnnotation = type; + node.asserts = asserts; + t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); + return this.finishNode(t, "TSTypeAnnotation"); + }); + } + // Note: In TypeScript implementation we must provide `yieldContext` and `awaitContext`, + // but here it's always false, because this is only used for types. + tsFillSignature(returnToken, signature) { + const returnTokenRequired = returnToken === tt.arrow; + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; + signature.typeParameters = this.tsTryParseTypeParameters(); + this.expect(tt.parenL); + signature[paramsKey] = this.tsParseBindingListForSignature(); + if (returnTokenRequired) { + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } else if (this.match(returnToken)) { + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + } + } + tsTryNextParseConstantContext() { + if (this.lookahead().type !== tt._const) return null; + this.next(); + const typeReference = this.tsParseTypeReference(); + if (typeReference.typeParameters || typeReference.typeArguments) { + this.raise( + typeReference.typeName.start, + TypeScriptError.CannotFindName({ + name: "const" + }) + ); + } + return typeReference; + } + tsParseFunctionOrConstructorType(type, abstract) { + const node = this.startNode(); + if (type === "TSConstructorType") { + node.abstract = !!abstract; + if (abstract) this.next(); + this.next(); + } + this.tsInAllowConditionalTypesContext(() => this.tsFillSignature(tt.arrow, node)); + return this.finishNode(node, type); + } + tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { + const node = this.startNode(); + const hasLeadingOperator = this.eat(operator); + const types = []; + do { + types.push(parseConstituentType()); + } while (this.eat(operator)); + if (types.length === 1 && !hasLeadingOperator) { + return types[0]; + } + node.types = types; + return this.finishNode(node, kind); + } + tsCheckTypeAnnotationForReadOnly(node) { + switch (node.typeAnnotation.type) { + case "TSTupleType": + case "TSArrayType": + return; + default: + this.raise(node.start, TypeScriptError.UnexpectedReadonly); + } + } + tsParseTypeOperator() { + const node = this.startNode(); + const operator = this.value; + this.next(); + node.operator = operator; + node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); + if (operator === "readonly") { + this.tsCheckTypeAnnotationForReadOnly(node); + } + return this.finishNode(node, "TSTypeOperator"); + } + tsParseConstraintForInferType() { + if (this.eat(tt._extends)) { + const constraint = this.tsInDisallowConditionalTypesContext(() => this.tsParseType()); + if (this.inDisallowConditionalTypesContext || !this.match(tt.question)) { + return constraint; + } + } + } + tsParseInferType() { + const node = this.startNode(); + this.expectContextual("infer"); + const typeParameter = this.startNode(); + typeParameter.name = this.tsParseTypeParameterName(); + typeParameter.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType()); + node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); + return this.finishNode(node, "TSInferType"); + } + tsParseLiteralTypeNode() { + const node = this.startNode(); + node.literal = (() => { + switch (this.type) { + case tt.num: + // we don't need bigint type here + // case tt.bigint: + case tt.string: + case tt._true: + case tt._false: + return this.parseExprAtom(); + default: + this.unexpected(); + } + })(); + return this.finishNode(node, "TSLiteralType"); + } + tsParseImportType() { + const node = this.startNode(); + this.expect(tt._import); + this.expect(tt.parenL); + if (!this.match(tt.string)) { + this.raise(this.start, TypeScriptError.UnsupportedImportTypeArgument); + } + node.argument = this.parseExprAtom(); + this.expect(tt.parenR); + if (this.eat(tt.dot)) { + node.qualifier = this.tsParseEntityName(); + } + if (this.tsMatchLeftRelational()) { + node.typeArguments = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSImportType"); + } + tsParseTypeQuery() { + const node = this.startNode(); + this.expect(tt._typeof); + if (this.match(tt._import)) { + node.exprName = this.tsParseImportType(); + } else { + node.exprName = this.tsParseEntityName(); + } + if (!this.hasPrecedingLineBreak() && this.tsMatchLeftRelational()) { + node.typeArguments = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSTypeQuery"); + } + tsParseMappedTypeParameter() { + const node = this.startNode(); + node.name = this.tsParseTypeParameterName(); + node.constraint = this.tsExpectThenParseType(tt._in); + return this.finishNode(node, "TSTypeParameter"); + } + tsParseMappedType() { + const node = this.startNode(); + this.expect(tt.braceL); + if (this.match(tt.plusMin)) { + node.readonly = this.value; + this.next(); + this.expectContextual("readonly"); + } else if (this.eatContextual("readonly")) { + node.readonly = true; + } + this.expect(tt.bracketL); + node.typeParameter = this.tsParseMappedTypeParameter(); + node.nameType = this.eatContextual("as") ? this.tsParseType() : null; + this.expect(tt.bracketR); + if (this.match(tt.plusMin)) { + node.optional = this.value; + this.next(); + this.expect(tt.question); + } else if (this.eat(tt.question)) { + node.optional = true; + } + node.typeAnnotation = this.tsTryParseType(); + this.semicolon(); + this.expect(tt.braceR); + return this.finishNode(node, "TSMappedType"); + } + tsParseTypeLiteral() { + const node = this.startNode(); + node.members = this.tsParseObjectTypeMembers(); + return this.finishNode(node, "TSTypeLiteral"); + } + tsParseTupleElementType() { + const startLoc = this.startLoc; + const startPos = this["start"]; + const rest = this.eat(tt.ellipsis); + let type = this.tsParseType(); + const optional = this.eat(tt.question); + const labeled = this.eat(tt.colon); + if (labeled) { + const labeledNode = this.startNodeAtNode(type); + labeledNode.optional = optional; + if (type.type === "TSTypeReference" && !type.typeArguments && type.typeName.type === "Identifier") { + labeledNode.label = type.typeName; + } else { + this.raise(type.start, TypeScriptError.InvalidTupleMemberLabel); + labeledNode.label = type; + } + labeledNode.elementType = this.tsParseType(); + type = this.finishNode(labeledNode, "TSNamedTupleMember"); + } else if (optional) { + const optionalTypeNode = this.startNodeAtNode(type); + optionalTypeNode.typeAnnotation = type; + type = this.finishNode(optionalTypeNode, "TSOptionalType"); + } + if (rest) { + const restNode = this.startNodeAt(startPos, startLoc); + restNode.typeAnnotation = type; + type = this.finishNode(restNode, "TSRestType"); + } + return type; + } + tsParseTupleType() { + const node = this.startNode(); + node.elementTypes = this.tsParseBracketedList( + "TupleElementTypes", + this.tsParseTupleElementType.bind(this), + /* bracket */ + true, + /* skipFirstToken */ + false + ); + let seenOptionalElement = false; + node.elementTypes.forEach((elementNode) => { + const { type } = elementNode; + if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) { + this.raise(elementNode.start, TypeScriptError.OptionalTypeBeforeRequired); + } + seenOptionalElement ||= type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType"; + if (type === "TSRestType") { + elementNode = elementNode.typeAnnotation; + } + }); + return this.finishNode(node, "TSTupleType"); + } + tsParseTemplateLiteralType() { + const node = this.startNode(); + node.literal = this.parseTemplate({ isTagged: false }); + return this.finishNode(node, "TSLiteralType"); + } + tsParseTypeReference() { + const node = this.startNode(); + node.typeName = this.tsParseEntityName(); + if (!this.hasPrecedingLineBreak() && this.tsMatchLeftRelational()) { + node.typeArguments = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSTypeReference"); + } + tsMatchLeftRelational() { + return this.match(tt.relational) && this.value === "<"; + } + tsMatchRightRelational() { + return this.match(tt.relational) && this.value === ">"; + } + tsParseParenthesizedType() { + const node = this.startNode(); + this.expect(tt.parenL); + node.typeAnnotation = this.tsParseType(); + this.expect(tt.parenR); + return this.finishNode(node, "TSParenthesizedType"); + } + tsParseNonArrayType() { + switch (this.type) { + case tt.string: + case tt.num: + // we don't need bigint type here + // case tt.bigint: + case tt._true: + case tt._false: + return this.tsParseLiteralTypeNode(); + case tt.plusMin: + if (this.value === "-") { + const node = this.startNode(); + const nextToken = this.lookahead(); + if (nextToken.type !== tt.num) { + this.unexpected(); + } + node.literal = this.parseMaybeUnary(); + return this.finishNode(node, "TSLiteralType"); + } + break; + case tt._this: + return this.tsParseThisTypeOrThisTypePredicate(); + case tt._typeof: + return this.tsParseTypeQuery(); + case tt._import: + return this.tsParseImportType(); + case tt.braceL: + return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); + case tt.bracketL: + return this.tsParseTupleType(); + case tt.parenL: + return this.tsParseParenthesizedType(); + // parse template string here + case tt.backQuote: + case tt.dollarBraceL: + return this.tsParseTemplateLiteralType(); + default: { + const { type } = this; + if (tokenIsIdentifier(type) || type === tt._void || type === tt._null) { + const nodeType = type === tt._void ? "TSVoidKeyword" : type === tt._null ? "TSNullKeyword" : keywordTypeFromName(this.value); + if (nodeType !== void 0 && this.lookaheadCharCode() !== 46) { + const node = this.startNode(); + this.next(); + return this.finishNode(node, nodeType); + } + return this.tsParseTypeReference(); + } + } + } + this.unexpected(); + } + tsParseArrayTypeOrHigher() { + let type = this.tsParseNonArrayType(); + while (!this.hasPrecedingLineBreak() && this.eat(tt.bracketL)) { + if (this.match(tt.bracketR)) { + const node = this.startNodeAtNode(type); + node.elementType = type; + this.expect(tt.bracketR); + type = this.finishNode(node, "TSArrayType"); + } else { + const node = this.startNodeAtNode(type); + node.objectType = type; + node.indexType = this.tsParseType(); + this.expect(tt.bracketR); + type = this.finishNode(node, "TSIndexedAccessType"); + } + } + return type; + } + tsParseTypeOperatorOrHigher() { + const isTypeOperator = tokenIsTSTypeOperator(this.type) && !this.containsEsc; + return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual("infer") ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher()); + } + tsParseIntersectionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType( + "TSIntersectionType", + this.tsParseTypeOperatorOrHigher.bind(this), + tt.bitwiseAND + ); + } + tsParseUnionTypeOrHigher() { + return this.tsParseUnionOrIntersectionType( + "TSUnionType", + this.tsParseIntersectionTypeOrHigher.bind(this), + tt.bitwiseOR + ); + } + tsParseNonConditionalType() { + if (this.tsIsStartOfFunctionType()) { + return this.tsParseFunctionOrConstructorType("TSFunctionType"); + } + if (this.match(tt._new)) { + return this.tsParseFunctionOrConstructorType("TSConstructorType"); + } else if (this.isAbstractConstructorSignature()) { + return this.tsParseFunctionOrConstructorType( + "TSConstructorType", + /* abstract */ + true + ); + } + return this.tsParseUnionTypeOrHigher(); + } + /** Be sure to be in a type context before calling this, using `tsInType`. */ + tsParseType() { + assert(this.inType); + const type = this.tsParseNonConditionalType(); + if (this.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(tt._extends)) { + return type; + } + const node = this.startNodeAtNode(type); + node.checkType = type; + node.extendsType = this.tsInDisallowConditionalTypesContext( + () => this.tsParseNonConditionalType() + ); + this.expect(tt.question); + node.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); + this.expect(tt.colon); + node.falseType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); + return this.finishNode(node, "TSConditionalType"); + } + tsIsUnambiguouslyIndexSignature() { + this.next(); + if (tokenIsIdentifier(this.type)) { + this.next(); + return this.match(tt.colon); + } + return false; + } + /** + * Runs `cb` in a type context. + * This should be called one token *before* the first type token, + * so that the call to `next()` is run in type context. + */ + tsInType(cb) { + const oldInType = this.inType; + this.inType = true; + try { + return cb(); + } finally { + this.inType = oldInType; + } + } + tsTryParseIndexSignature(node) { + if (!(this.match(tt.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { + return void 0; + } + this.expect(tt.bracketL); + const id = this.parseIdent(); + id.typeAnnotation = this.tsParseTypeAnnotation(); + this.resetEndLocation(id); + this.expect(tt.bracketR); + node.parameters = [id]; + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, "TSIndexSignature"); + } + // for better error recover + tsParseNoneModifiers(node) { + this.tsParseModifiers({ + modified: node, + allowedModifiers: [], + disallowedModifiers: ["in", "out"], + errorTemplate: TypeScriptError.InvalidModifierOnTypeParameterPositions + }); + } + tsParseTypeParameter(parseModifiers = this.tsParseNoneModifiers.bind(this)) { + const node = this.startNode(); + parseModifiers(node); + node.name = this.tsParseTypeParameterName(); + node.constraint = this.tsEatThenParseType(tt._extends); + node.default = this.tsEatThenParseType(tt.eq); + return this.finishNode(node, "TSTypeParameter"); + } + tsParseTypeParameters(parseModifiers) { + const node = this.startNode(); + if (this.tsMatchLeftRelational() || this.matchJsx("jsxTagStart")) { + this.next(); + } else { + this.unexpected(); + } + const refTrailingCommaPos = { value: -1 }; + node.params = this.tsParseBracketedList( + "TypeParametersOrArguments", + this.tsParseTypeParameter.bind(this, parseModifiers), + /* bracket */ + false, + /* skipFirstToken */ + true, + refTrailingCommaPos + ); + if (node.params.length === 0) { + this.raise(this.start, TypeScriptError.EmptyTypeParameters); + } + if (refTrailingCommaPos.value !== -1) { + this.addExtra(node, "trailingComma", refTrailingCommaPos.value); + } + return this.finishNode(node, "TSTypeParameterDeclaration"); + } + tsTryParseTypeParameters(parseModifiers) { + if (this.tsMatchLeftRelational()) { + return this.tsParseTypeParameters(parseModifiers); + } + } + tsTryParse(f) { + const state = this.getCurLookaheadState(); + const result = f(); + if (result !== void 0 && result !== false) { + return result; + } else { + this.setLookaheadState(state); + return void 0; + } + } + tsTokenCanFollowModifier() { + return (this.match(tt.bracketL) || this.match(tt.braceL) || this.match(tt.star) || this.match(tt.ellipsis) || this.match(tt.privateId) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak(); + } + tsNextTokenCanFollowModifier() { + this.next(true); + return this.tsTokenCanFollowModifier(); + } + /** Parses a modifier matching one the given modifier names. */ + tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) { + const modifier = this.value; + if (allowedModifiers.indexOf(modifier) !== -1 && !this.containsEsc) { + if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) { + return void 0; + } + if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { + return modifier; + } + } + return void 0; + } + tsParseModifiersByMap({ + modified, + map + }) { + for (const key of Object.keys(map)) { + modified[key] = map[key]; + } + } + /** Parses a list of modifiers, in any order. + * If you need a specific order, you must call this function multiple times: + * this.tsParseModifiers({ modified: node, allowedModifiers: ['public'] }); + * this.tsParseModifiers({ modified: node, allowedModifiers: ["abstract", "readonly"] }); + */ + tsParseModifiers({ + modified, + allowedModifiers, + disallowedModifiers, + stopOnStartOfClassStaticBlock, + errorTemplate = TypeScriptError.InvalidModifierOnTypeMember + }) { + const modifiedMap = {}; + const enforceOrder = (loc, modifier, before, after) => { + if (modifier === before && modified[after]) { + this.raise( + loc.column, + TypeScriptError.InvalidModifiersOrder({ orderedModifiers: [before, after] }) + ); + } + }; + const incompatible = (loc, modifier, mod1, mod2) => { + if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) { + this.raise( + loc.column, + TypeScriptError.IncompatibleModifiers({ modifiers: [mod1, mod2] }) + ); + } + }; + for (; ; ) { + const startLoc = this.startLoc; + const modifier = this.tsParseModifier( + allowedModifiers.concat(disallowedModifiers ?? []), + stopOnStartOfClassStaticBlock + ); + if (!modifier) break; + if (tsIsAccessModifier(modifier)) { + if (modified.accessibility) { + this.raise(this.start, TypeScriptError.DuplicateAccessibilityModifier()); + } else { + enforceOrder(startLoc, modifier, modifier, "override"); + enforceOrder(startLoc, modifier, modifier, "static"); + enforceOrder(startLoc, modifier, modifier, "readonly"); + enforceOrder(startLoc, modifier, modifier, "accessor"); + modifiedMap.accessibility = modifier; + modified["accessibility"] = modifier; + } + } else if (tsIsVarianceAnnotations(modifier)) { + if (modified[modifier]) { + this.raise(this.start, TypeScriptError.DuplicateModifier({ modifier })); + } else { + enforceOrder(startLoc, modifier, "in", "out"); + modifiedMap[modifier] = modifier; + modified[modifier] = true; + } + } else if (tsIsClassAccessor(modifier)) { + if (modified[modifier]) { + this.raise(this.start, TypeScriptError.DuplicateModifier({ modifier })); + } else { + incompatible(startLoc, modifier, "accessor", "readonly"); + incompatible(startLoc, modifier, "accessor", "static"); + incompatible(startLoc, modifier, "accessor", "override"); + modifiedMap[modifier] = modifier; + modified[modifier] = true; + } + } else if (modifier === "const") { + if (modified[modifier]) { + this.raise(this.start, TypeScriptError.DuplicateModifier({ modifier })); + } else { + modifiedMap[modifier] = modifier; + modified[modifier] = true; + } + } else { + if (Object.hasOwnProperty.call(modified, modifier)) { + this.raise(this.start, TypeScriptError.DuplicateModifier({ modifier })); + } else { + enforceOrder(startLoc, modifier, "static", "readonly"); + enforceOrder(startLoc, modifier, "static", "override"); + enforceOrder(startLoc, modifier, "override", "readonly"); + enforceOrder(startLoc, modifier, "abstract", "override"); + incompatible(startLoc, modifier, "declare", "override"); + incompatible(startLoc, modifier, "static", "abstract"); + modifiedMap[modifier] = modifier; + modified[modifier] = true; + } + } + if (disallowedModifiers?.includes(modifier)) { + this.raise(this.start, errorTemplate); + } + } + return modifiedMap; + } + tsParseInOutModifiers(node) { + this.tsParseModifiers({ + modified: node, + allowedModifiers: ["in", "out"], + disallowedModifiers: [ + "public", + "private", + "protected", + "readonly", + "declare", + "abstract", + "override" + ], + errorTemplate: TypeScriptError.InvalidModifierOnTypeParameter + }); + } + // Handle type assertions + parseMaybeUnary(refExpressionErrors, sawUnary, incDec, forInit) { + if (!options?.jsx && this.tsMatchLeftRelational()) { + return this.tsParseTypeAssertion(); + } else { + return super.parseMaybeUnary(refExpressionErrors, sawUnary, incDec, forInit); + } + } + tsParseTypeAssertion() { + if (disallowAmbiguousJSXLike) { + this.raise(this.start, TypeScriptError.ReservedTypeAssertion); + } + const result = this.tryParse(() => { + const node = this.startNode(); + const _const = this.tsTryNextParseConstantContext(); + node.typeAnnotation = _const || this.tsNextThenParseType(); + this.expect(tt.relational); + node.expression = this.parseMaybeUnary(); + return this.finishNode(node, "TSTypeAssertion"); + }); + if (result.error) { + return this.tsParseTypeParameters(this.tsParseConstModifier); + } else { + return result.node; + } + } + tsParseTypeArguments() { + const node = this.startNode(); + node.params = this.tsInType( + () => ( + // Temporarily remove a JSX parsing context, which makes us scan different tokens. + this.tsInNoContext(() => { + this.expect(tt.relational); + return this.tsParseDelimitedList( + "TypeParametersOrArguments", + this.tsParseType.bind(this) + ); + }) + ) + ); + if (node.params.length === 0) { + this.raise(this.start, TypeScriptError.EmptyTypeArguments); + } + this.exprAllowed = false; + this.expect(tt.relational); + return this.finishNode(node, "TSTypeParameterInstantiation"); + } + tsParseHeritageClause(token) { + const originalStart = this.start; + const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => { + const node = this.startNode(); + node.expression = this.tsParseEntityName(); + if (this.tsMatchLeftRelational()) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSExpressionWithTypeArguments"); + }); + if (!delimitedList.length) { + this.raise(originalStart, TypeScriptError.EmptyHeritageClauseType({ token })); + } + return delimitedList; + } + tsParseTypeMemberSemicolon() { + if (!this.eat(tt.comma) && !this.isLineTerminator()) { + this.expect(tt.semi); + } + } + tsTryParseAndCatch(f) { + const result = this.tryParse( + (abort) => ( + // @ts-expect-error todo(flow->ts) + f() || abort() + ) + ); + if (result.aborted || !result.node) return void 0; + if (result.error) this.setLookaheadState(result.failState); + return result.node; + } + tsParseSignatureMember(kind, node) { + this.tsFillSignature(tt.colon, node); + this.tsParseTypeMemberSemicolon(); + return this.finishNode(node, kind); + } + tsParsePropertyOrMethodSignature(node, readonly) { + if (this.eat(tt.question)) node.optional = true; + const nodeAny = node; + if (this.match(tt.parenL) || this.tsMatchLeftRelational()) { + if (readonly) { + this.raise(node.start, TypeScriptError.ReadonlyForMethodSignature); + } + const method = nodeAny; + if (method.kind && this.tsMatchLeftRelational()) { + this.raise(this.start, TypeScriptError.AccesorCannotHaveTypeParameters); + } + this.tsFillSignature(tt.colon, method); + this.tsParseTypeMemberSemicolon(); + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; + if (method.kind === "get") { + if (method[paramsKey].length > 0) { + this.raise(this.start, "A 'get' accesor must not have any formal parameters."); + if (this.isThisParam(method[paramsKey][0])) { + this.raise(this.start, TypeScriptError.AccesorCannotDeclareThisParameter); + } + } + } else if (method.kind === "set") { + if (method[paramsKey].length !== 1) { + this.raise(this.start, "A 'get' accesor must not have any formal parameters."); + } else { + const firstParameter = method[paramsKey][0]; + if (this.isThisParam(firstParameter)) { + this.raise(this.start, TypeScriptError.AccesorCannotDeclareThisParameter); + } + if (firstParameter.type === "Identifier" && firstParameter.optional) { + this.raise(this.start, TypeScriptError.SetAccesorCannotHaveOptionalParameter); + } + if (firstParameter.type === "RestElement") { + this.raise(this.start, TypeScriptError.SetAccesorCannotHaveRestParameter); + } + } + if (method[returnTypeKey]) { + this.raise( + method[returnTypeKey].start, + TypeScriptError.SetAccesorCannotHaveReturnType + ); + } + } else { + method.kind = "method"; + } + return this.finishNode(method, "TSMethodSignature"); + } else { + const property = nodeAny; + if (readonly) property.readonly = true; + const type = this.tsTryParseTypeAnnotation(); + if (type) property.typeAnnotation = type; + this.tsParseTypeMemberSemicolon(); + return this.finishNode(property, "TSPropertySignature"); + } + } + tsParseTypeMember() { + const node = this.startNode(); + if (this.match(tt.parenL) || this.tsMatchLeftRelational()) { + return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); + } + if (this.match(tt._new)) { + const id = this.startNode(); + this.next(); + if (this.match(tt.parenL) || this.tsMatchLeftRelational()) { + return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); + } else { + node.key = this.createIdentifier(id, "new"); + return this.tsParsePropertyOrMethodSignature(node, false); + } + } + this.tsParseModifiers({ + modified: node, + allowedModifiers: ["readonly"], + disallowedModifiers: [ + "declare", + "abstract", + "private", + "protected", + "public", + "static", + "override" + ] + }); + const idx = this.tsTryParseIndexSignature(node); + if (idx) { + return idx; + } + this.parsePropertyName(node); + if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) { + node.kind = node.key.name; + this.parsePropertyName(node); + } + return this.tsParsePropertyOrMethodSignature(node, !!node.readonly); + } + tsParseList(kind, parseElement) { + const result = []; + while (!this.tsIsListTerminator(kind)) { + result.push(parseElement()); + } + return result; + } + tsParseObjectTypeMembers() { + this.expect(tt.braceL); + const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); + this.expect(tt.braceR); + return members; + } + tsParseInterfaceDeclaration(node, properties = {}) { + if (this.hasFollowingLineBreak()) return null; + this.expectContextual("interface"); + if (properties.declare) node.declare = true; + if (tokenIsIdentifier(this.type)) { + node.id = this.parseIdent(); + this.checkLValSimple(node.id, acornScope.BIND_TS_INTERFACE); + } else { + node.id = null; + this.raise(this.start, TypeScriptError.MissingInterfaceName); + } + node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)); + if (this.eat(tt._extends)) { + node.extends = this.tsParseHeritageClause("extends"); + } + const body = this.startNode(); + body.body = this.tsParseInterfaceBody(); + node.body = this.finishNode(body, "TSInterfaceBody"); + return this.finishNode(node, "TSInterfaceDeclaration"); + } + /** + * Parse interface body, ensuring the closing brace is read outside of type context + * so that decorators following the interface are properly tokenized. + */ + tsParseInterfaceBody() { + this.expect(tt.braceL); + const oldInType = this.inType; + this.inType = true; + let members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); + this.inType = oldInType; + this.expect(tt.braceR); + return members; + } + tsParseAbstractDeclaration(node) { + if (this.match(tt._class)) { + node.abstract = true; + return this.parseClass(node, true); + } else if (this.ts_isContextual(tokTypes.interface)) { + if (!this.hasFollowingLineBreak()) { + node.abstract = true; + return this.tsParseInterfaceDeclaration(node); + } + } else { + this.unexpected(node.start); + } + } + tsIsDeclarationStart() { + return tokenIsTSDeclarationStart(this.type); + } + tsParseExpressionStatement(node, expr) { + switch (expr.name) { + case "declare": { + const declaration = this.tsTryParseDeclare(node); + if (declaration) { + declaration.declare = true; + return declaration; + } + break; + } + case "global": + if (this.match(tt.braceL)) { + this.enterScope(TS_SCOPE_TS_MODULE); + const mod = node; + mod.global = true; + mod.id = expr; + mod.body = this.tsParseModuleBlock(); + super.exitScope(); + return this.finishNode(mod, "TSModuleDeclaration"); + } + break; + default: + return this.tsParseDeclaration( + node, + expr.name, + /* next */ + false + ); + } + } + tsParseModuleReference() { + return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName( + /* allowReservedWords */ + false + ); + } + tsIsExportDefaultSpecifier() { + const { type } = this; + const isAsync = this.isAsyncFunction(); + const isLet = this.isLet(); + if (tokenIsIdentifier(type)) { + if (isAsync && !this.containsEsc || isLet) { + return false; + } + if ((type === tokTypes.type || type === tokTypes.interface) && !this.containsEsc) { + const ahead = this.lookahead(); + if (tokenIsIdentifier(ahead.type) && !this.isContextualWithState("from", ahead) || ahead.type === tt.braceL) { + return false; + } + } + } else if (!this.match(tt._default)) { + return false; + } + const next = this.nextTokenStart(); + const hasFrom = this.isUnparsedContextual(next, "from"); + if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.type) && hasFrom) { + return true; + } + if (this.match(tt._default) && hasFrom) { + const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4)); + return nextAfterFrom === 34 || nextAfterFrom === 39; + } + return false; + } + tsInAmbientContext(cb) { + const oldIsAmbientContext = this.isAmbientContext; + this.isAmbientContext = true; + try { + return cb(); + } finally { + this.isAmbientContext = oldIsAmbientContext; + } + } + tsCheckLineTerminator(next) { + if (next) { + if (this.hasFollowingLineBreak()) return false; + this.next(); + return true; + } + return !this.isLineTerminator(); + } + tsParseModuleOrNamespaceDeclaration(node, nested = false) { + node.id = this.parseIdent(); + if (!nested) { + this.checkLValSimple(node.id, acornScope.BIND_TS_NAMESPACE); + } + if (this.eat(tt.dot)) { + const inner = this.startNode(); + this.tsParseModuleOrNamespaceDeclaration(inner, true); + node.body = inner; + } else { + this.enterScope(TS_SCOPE_TS_MODULE); + node.body = this.tsParseModuleBlock(); + super.exitScope(); + } + return this.finishNode(node, "TSModuleDeclaration"); + } + checkLValSimple(expr, bindingType = acornScope.BIND_NONE, checkClashes) { + if (expr.type === "TSNonNullExpression" || expr.type === "TSAsExpression") { + expr = expr.expression; + } + return super.checkLValSimple(expr, bindingType, checkClashes); + } + tsParseTypeAliasDeclaration(node) { + node.id = this.parseIdent(); + this.checkLValSimple(node.id, acornScope.BIND_TS_TYPE); + node.typeAnnotation = this.tsInType(() => { + node.typeParameters = this.tsTryParseTypeParameters( + this.tsParseInOutModifiers.bind(this) + ); + this.expect(tt.eq); + if (this.ts_isContextual(tokTypes.interface) && this.lookahead().type !== tt.dot) { + const node2 = this.startNode(); + this.next(); + return this.finishNode(node2, "TSIntrinsicKeyword"); + } + return this.tsParseType(); + }); + this.semicolon(); + return this.finishNode(node, "TSTypeAliasDeclaration"); + } + // Common to tsTryParseDeclare, tsTryParseExportDeclaration, and tsParseExpressionStatement. + tsParseDeclaration(node, value, next) { + switch (value) { + case "abstract": + if (this.tsCheckLineTerminator(next) && (this.match(tt._class) || tokenIsIdentifier(this.type))) { + return this.tsParseAbstractDeclaration(node); + } + break; + case "module": + if (this.tsCheckLineTerminator(next)) { + if (this.match(tt.string)) { + return this.tsParseAmbientExternalModuleDeclaration(node); + } else if (tokenIsIdentifier(this.type)) { + return this.tsParseModuleOrNamespaceDeclaration(node); + } + } + break; + case "namespace": + if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.type)) { + return this.tsParseModuleOrNamespaceDeclaration(node); + } + break; + case "type": + if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.type)) { + return this.tsParseTypeAliasDeclaration(node); + } + break; + } + } + // Note: this won't b·e called unless the keyword is allowed in + // `shouldParseExportDeclaration`. + tsTryParseExportDeclaration() { + return this.tsParseDeclaration( + this.startNode(), + this.value, + /* next */ + true + ); + } + tsParseImportEqualsDeclaration(node, isExport) { + node.isExport = isExport || false; + node.id = this.parseIdent(); + this.checkLValSimple(node.id, acornScope.BIND_LEXICAL); + super.expect(tt.eq); + const moduleReference = this.tsParseModuleReference(); + if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") { + this.raise(moduleReference.start, TypeScriptError.ImportAliasHasImportType); + } + node.moduleReference = moduleReference; + super.semicolon(); + return this.finishNode(node, "TSImportEqualsDeclaration"); + } + isExportDefaultSpecifier() { + if (this.tsIsDeclarationStart()) return false; + const { type } = this; + if (tokenIsIdentifier(type)) { + if (this.isContextual("async") || this.isContextual("let")) { + return false; + } + if ((type === tokTypes.type || type === tokTypes.interface) && !this.containsEsc) { + const ahead = this.lookahead(); + if (tokenIsIdentifier(ahead.type) && !this.isContextualWithState("from", ahead) || ahead.type === tt.braceL) { + return false; + } + } + } else if (!this.match(tt._default)) { + return false; + } + const next = this.nextTokenStart(); + const hasFrom = this.isUnparsedContextual(next, "from"); + if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.type) && hasFrom) { + return true; + } + if (this.match(tt._default) && hasFrom) { + const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4)); + return nextAfterFrom === 34 || nextAfterFrom === 39; + } + return false; + } + parseTemplate({ isTagged = false } = {}) { + let node = this.startNode(); + this.next(); + node.expressions = []; + let curElt = this.parseTemplateElement({ isTagged }); + node.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === tt.eof) this.raise(this.pos, "Unterminated template literal"); + this.expect(tt.dollarBraceL); + node.expressions.push(this.inType ? this.tsParseType() : this.parseExpression()); + this.expect(tt.braceR); + node.quasis.push(curElt = this.parseTemplateElement({ isTagged })); + } + this.next(); + return this.finishNode(node, "TemplateLiteral"); + } + parseFunction(node, statement, allowExpressionBody, isAsync, forInit) { + this.initFunction(node); + if (this.ecmaVersion >= 9 || this.ecmaVersion >= 6 && !isAsync) { + if (this.type === tt.star && statement & FUNC_HANGING_STATEMENT) { + this.unexpected(); + } + node.generator = this.eat(tt.star); + } + if (this.ecmaVersion >= 8) { + node.async = !!isAsync; + } + if (statement & FUNC_STATEMENT) { + node.id = statement & FUNC_NULLABLE_ID && this.type !== tt.name ? null : this.parseIdent(); + } + let oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + const oldMaybeInArrowParameters = this.maybeInArrowParameters; + this.maybeInArrowParameters = false; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(node.async, node.generator)); + if (!(statement & FUNC_STATEMENT)) { + node.id = this.type === tt.name ? this.parseIdent() : null; + } + this.parseFunctionParams(node); + const isDeclaration = statement & FUNC_STATEMENT; + this.parseFunctionBody(node, allowExpressionBody, false, forInit, { + isFunctionDeclaration: isDeclaration + }); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + if (statement & FUNC_STATEMENT && node.id && !(statement & FUNC_HANGING_STATEMENT)) { + if (node.body) { + this.checkLValSimple( + node.id, + this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? acornScope.BIND_VAR : acornScope.BIND_LEXICAL : acornScope.BIND_FUNCTION + ); + } else { + this.checkLValSimple(node.id, acornScope.BIND_NONE); + } + } + this.maybeInArrowParameters = oldMaybeInArrowParameters; + return this.finishNode(node, isDeclaration ? "FunctionDeclaration" : "FunctionExpression"); + } + parseFunctionBody(node, isArrowFunction = false, isMethod = false, forInit = false, tsConfig) { + if (this.match(tt.colon)) { + node.returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon); + } + const bodilessType = tsConfig?.isFunctionDeclaration ? "TSDeclareFunction" : tsConfig?.isClassMethod ? "TSDeclareMethod" : void 0; + if (bodilessType && !this.match(tt.braceL) && this.isLineTerminator()) { + this.exitScope(); + return this.finishNode(node, bodilessType); + } + if (bodilessType === "TSDeclareFunction" && this.isAmbientContext) { + this.raise(node.start, TypeScriptError.DeclareFunctionHasImplementation); + if (node.declare) { + super.parseFunctionBody(node, isArrowFunction, isMethod, false); + return this.finishNode(node, bodilessType); + } + } + super.parseFunctionBody(node, isArrowFunction, isMethod, forInit); + return node; + } + parseNew() { + if (this.containsEsc) this.raiseRecoverable(this.start, "Escape sequence in keyword new"); + let node = this.startNode(); + let meta = this.parseIdent(true); + if (this.ecmaVersion >= 6 && this.eat(tt.dot)) { + node.meta = meta; + let containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + if (node.property.name !== "target") + this.raiseRecoverable( + node.property.start, + "The only valid meta property for new is 'new.target'" + ); + if (containsEsc) + this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); + if (!this["allowNewDotTarget"]) + this.raiseRecoverable( + node.start, + "'new.target' can only be used in functions and class static block" + ); + return this.finishNode(node, "MetaProperty"); + } + let startPos = this.start, startLoc = this.startLoc, isImport = this.type === tt._import; + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true, false); + if (isImport && node.callee.type === "ImportExpression") { + this.raise(startPos, "Cannot use new with import()"); + } + const { callee } = node; + if (callee.type === "TSInstantiationExpression" && !callee.extra?.parenthesized) { + node.typeArguments = callee.typeArguments; + node.callee = callee.expression; + } + if (this.eat(tt.parenL)) + node.arguments = this.parseExprList(tt.parenR, this.ecmaVersion >= 8, false); + else node.arguments = []; + return this.finishNode(node, "NewExpression"); + } + parseExprOp(left, leftStartPos, leftStartLoc, minPrec, forInit) { + if (tt._in.binop > minPrec && !this.hasPrecedingLineBreak()) { + let nodeType; + if (this.isContextual("as")) { + nodeType = "TSAsExpression"; + } + if (this.isContextual("satisfies")) { + nodeType = "TSSatisfiesExpression"; + } + if (nodeType) { + const node = this.startNodeAt(leftStartPos, leftStartLoc); + node.expression = left; + const _const = this.tsTryNextParseConstantContext(); + if (_const) { + node.typeAnnotation = _const; + } else { + node.typeAnnotation = this.tsNextThenParseType(); + } + this.finishNode(node, nodeType); + this.reScan_lt_gt(); + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit); + } + } + return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec, forInit); + } + parseImportSpecifiers() { + let nodes = [], first = true; + if (acornTypeScript.tokenIsIdentifier(this.type)) { + nodes.push(this.parseImportDefaultSpecifier()); + if (!this.eat(tt.comma)) return nodes; + } + if (this.type === tt.star) { + nodes.push(this.parseImportNamespaceSpecifier()); + return nodes; + } + this.expect(tt.braceL); + while (!this.eat(tt.braceR)) { + if (!first) { + this.expect(tt.comma); + if (this.afterTrailingComma(tt.braceR)) break; + } else first = false; + nodes.push(this.parseImportSpecifier()); + } + return nodes; + } + /** + * @param {Node} node this may be ImportDeclaration | + * TsImportEqualsDeclaration + * @returns AnyImport + * */ + parseImport(node) { + let enterHead = this.lookahead(); + node.importKind = "value"; + this.importOrExportOuterKind = "value"; + if (tokenIsIdentifier(enterHead.type) || this.match(tt.star) || this.match(tt.braceL)) { + let ahead = this.lookahead(2); + if ( + // import type, { a } from "b"; + ahead.type !== tt.comma && // import type from "a"; + !this.isContextualWithState("from", ahead) && // import type = require("a"); + ahead.type !== tt.eq && this.ts_eatContextualWithState("type", 1, enterHead) + ) { + this.importOrExportOuterKind = "type"; + node.importKind = "type"; + enterHead = this.lookahead(); + ahead = this.lookahead(2); + } + if (tokenIsIdentifier(enterHead.type) && ahead.type === tt.eq) { + this.next(); + const importNode = this.tsParseImportEqualsDeclaration(node); + this.importOrExportOuterKind = "value"; + return importNode; + } + } + this.next(); + if (this.type === tt.string) { + node.specifiers = []; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected(); + } + this.parseMaybeImportAttributes(node); + this.semicolon(); + this.finishNode(node, "ImportDeclaration"); + this.importOrExportOuterKind = "value"; + if (node.importKind === "type" && node.specifiers.length > 1 && node.specifiers[0].type === "ImportDefaultSpecifier") { + this.raise(node.start, TypeScriptError.TypeImportCannotSpecifyDefaultAndNamed); + } + return node; + } + parseExportDefaultDeclaration() { + if (this.isAbstractClass()) { + const cls = this.startNode(); + this.next(); + cls.abstract = true; + return this.parseClass(cls, true); + } + if (this.match(tokTypes.interface)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); + if (result) return result; + } + return super.parseExportDefaultDeclaration(); + } + parseExportAllDeclaration(node, exports) { + if (this.ecmaVersion >= 11) { + if (this.eatContextual("as")) { + node.exported = this.parseModuleExportName(); + this.checkExport(exports, node.exported, this.lastTokStart); + } else { + node.exported = null; + } + } + this.expectContextual("from"); + if (this.type !== tt.string) this.unexpected(); + node.source = this.parseExprAtom(); + this.parseMaybeImportAttributes(node); + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration"); + } + parseDynamicImport(node) { + this.next(); + node.source = this.parseMaybeAssign(); + if (this.eat(tt.comma)) { + const expr = this.parseExpression(); + node.arguments = [expr]; + } + if (!this.eat(tt.parenR)) { + const errorPos = this.start; + if (this.eat(tt.comma) && this.eat(tt.parenR)) { + this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); + } else { + this.unexpected(errorPos); + } + } + return this.finishNode(node, "ImportExpression"); + } + parseExport(node, exports) { + let enterHead = this.lookahead(); + if (this.ts_eatWithState(tt._import, 2, enterHead)) { + if (this.ts_isContextual(tokTypes.type) && this.lookaheadCharCode() !== 61) { + node.importKind = "type"; + this.importOrExportOuterKind = "type"; + this.next(); + } else { + node.importKind = "value"; + this.importOrExportOuterKind = "value"; + } + const exportEqualsNode = this.tsParseImportEqualsDeclaration( + node, + /* isExport */ + true + ); + this.importOrExportOuterKind = void 0; + return exportEqualsNode; + } else if (this.ts_eatWithState(tt.eq, 2, enterHead)) { + const assign = node; + assign.expression = this.parseExpression(); + this.semicolon(); + this.importOrExportOuterKind = void 0; + return this.finishNode(assign, "TSExportAssignment"); + } else if (this.ts_eatContextualWithState("as", 2, enterHead)) { + const decl = node; + this.expectContextual("namespace"); + decl.id = this.parseIdent(); + this.semicolon(); + this.importOrExportOuterKind = void 0; + return this.finishNode(decl, "TSNamespaceExportDeclaration"); + } else { + const lookahead2 = this.lookahead(2).type; + if (this.ts_isContextualWithState(enterHead, tokTypes.type) && (lookahead2 === tt.braceL || // export type { ... } + lookahead2 === tt.star)) { + this.next(); + this.importOrExportOuterKind = "type"; + node.exportKind = "type"; + } else { + this.importOrExportOuterKind = "value"; + node.exportKind = "value"; + } + this.next(); + if (this.eat(tt.star)) { + return this.parseExportAllDeclaration(node, exports); + } + if (this.eat(tt._default)) { + this.checkExport(exports, "default", this.lastTokStart); + node.declaration = this.parseExportDefaultDeclaration(); + return this.finishNode(node, "ExportDefaultDeclaration"); + } + if (this.shouldParseExportStatement()) { + node.declaration = this.parseExportDeclaration(node); + if (node.declaration.type === "VariableDeclaration") + this.checkVariableExport(exports, node.declaration.declarations); + else this.checkExport(exports, node.declaration.id, node.declaration.id.start); + node.specifiers = []; + node.source = null; + } else { + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(exports); + if (this.eatContextual("from")) { + if (this.type !== tt.string) this.unexpected(); + node.source = this.parseExprAtom(); + this.parseMaybeImportAttributes(node); + } else { + for (let spec of node.specifiers) { + this.checkUnreserved(spec.local); + this.checkLocalExport(spec.local); + if (spec.local.type === "Literal") { + this.raise( + spec.local.start, + "A string literal cannot be used as an exported binding without `from`." + ); + } + } + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration"); + } + } + checkExport(exports, name, _) { + if (!exports) { + return; + } + if (typeof name !== "string") { + name = name.type === "Identifier" ? name.name : name.value; + } + exports[name] = true; + } + parseMaybeDefault(startPos, startLoc, left) { + const node = super.parseMaybeDefault(startPos, startLoc, left); + if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { + this.raise(node.typeAnnotation.start, TypeScriptError.TypeAnnotationAfterAssign); + } + return node; + } + typeCastToParameter(node) { + node.expression.typeAnnotation = node.typeAnnotation; + this.resetEndLocation( + node.expression, + node.typeAnnotation.end, + node.typeAnnotation.loc?.end + ); + return node.expression; + } + toAssignableList(exprList, isBinding) { + if (!exprList) exprList = []; + for (let i = 0; i < exprList.length; i++) { + const expr = exprList[i]; + if (expr?.type === "TSTypeCastExpression") { + exprList[i] = this.typeCastToParameter(expr); + } + } + return super.toAssignableList(exprList, isBinding); + } + reportReservedArrowTypeParam(node) { + if (node.params.length === 1 && !node.extra?.trailingComma && disallowAmbiguousJSXLike) { + this.raise(node.start, TypeScriptError.ReservedArrowTypeParam); + } + } + parseExprAtom(refDestructuringErrors, forInit, forNew) { + if (this.type === tokTypes.jsxText) { + return this.jsx_parseText(); + } else if (this.type === tokTypes.jsxTagStart) { + return this.jsx_parseElement(); + } else if (this.type === tokTypes.at) { + this.parseDecorators(); + return this.parseExprAtom(); + } else if (tokenIsIdentifier(this.type)) { + let canBeArrow = this.potentialArrowAt === this.start; + let startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + let id = this.parseIdent(false); + if (this.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(tt._function)) { + this.overrideContext(tokContexts.f_expr); + return this.parseFunction( + this.startNodeAt(startPos, startLoc), + 0, + false, + true, + forInit + ); + } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(tt.arrow)) + return this.parseArrowExpression( + this.startNodeAt(startPos, startLoc), + [id], + false, + forInit + ); + if (this.ecmaVersion >= 8 && id.name === "async" && this.type === tt.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(tt.arrow)) this.unexpected(); + return this.parseArrowExpression( + this.startNodeAt(startPos, startLoc), + [id], + true, + forInit + ); + } + } + return id; + } else { + return super.parseExprAtom(refDestructuringErrors, forInit, forNew); + } + } + parseExprAtomDefault() { + if (tokenIsIdentifier(this.type)) { + const canBeArrow = this["potentialArrowAt"] === this.start; + const containsEsc = this.containsEsc; + const id = this.parseIdent(); + if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) { + const { type } = this; + if (type === tt._function) { + this.next(); + return this.parseFunction(this.startNodeAtNode(id), void 0, true, true); + } else if (tokenIsIdentifier(type)) { + if (this.lookaheadCharCode() === 61) { + const paramId = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(tt.arrow)) this.unexpected(); + return this.parseArrowExpression(this.startNodeAtNode(id), [paramId], true); + } else { + return id; + } + } + } + if (canBeArrow && this.match(tt.arrow) && !this.canInsertSemicolon()) { + this.next(); + return this.parseArrowExpression(this.startNodeAtNode(id), [id], false); + } + return id; + } else { + this.unexpected(); + } + } + parseIdentNode() { + let node = this.startNode(); + if (tokenIsKeywordOrIdentifier(this.type) && // Taken from super-class method + !((this.type.keyword === "class" || this.type.keyword === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46))) { + node.name = this.value; + } else { + return super.parseIdentNode(); + } + return node; + } + parseVarStatement(node, kind, allowMissingInitializer = false) { + const { isAmbientContext } = this; + this.next(); + super.parseVar(node, false, kind, allowMissingInitializer || isAmbientContext); + this.semicolon(); + const declaration = this.finishNode(node, "VariableDeclaration"); + if (!isAmbientContext) return declaration; + for (const { id, init } of declaration.declarations) { + if (!init) continue; + if (kind !== "const" || !!id.typeAnnotation) { + this.raise(init.start, TypeScriptError.InitializerNotAllowedInAmbientContext); + } else if (init.type !== "StringLiteral" && init.type !== "BooleanLiteral" && init.type !== "NumericLiteral" && init.type !== "BigIntLiteral" && (init.type !== "TemplateLiteral" || init.expressions.length > 0) && !isPossiblyLiteralEnum(init)) { + this.raise( + init.start, + TypeScriptError.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference + ); + } + } + return declaration; + } + parseStatement(context, topLevel, exports) { + if (this.match(tokTypes.at)) { + this.parseDecorators(true); + } + if (this.match(tt._const) && this.isLookaheadContextual("enum")) { + const node = this.startNode(); + this.expect(tt._const); + return this.tsParseEnumDeclaration(node, { const: true }); + } + if (this.ts_isContextual(tokTypes.enum)) { + return this.tsParseEnumDeclaration(this.startNode()); + } + if (this.ts_isContextual(tokTypes.interface)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); + if (result) return result; + } + return super.parseStatement(context, topLevel, exports); + } + // NOTE: unused function + parseAccessModifier() { + return this.tsParseModifier(["public", "protected", "private"]); + } + parsePostMemberNameModifiers(methodOrProp) { + const optional = this.eat(tt.question); + if (optional) methodOrProp.optional = true; + if (methodOrProp.readonly && this.match(tt.parenL)) { + this.raise(methodOrProp.start, TypeScriptError.ClassMethodHasReadonly); + } + if (methodOrProp.declare && this.match(tt.parenL)) { + this.raise(methodOrProp.start, TypeScriptError.ClassMethodHasDeclare); + } + } + // Note: The reason we do this in `parseExpressionStatement` and not `parseStatement` + // is that e.g. `type()` is valid JS, so we must try parsing that first. + // If it's really a type, we will parse `type` as the statement, and can correct it here + // by parsing the rest. + parseExpressionStatement(node, expr) { + const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : void 0; + return decl || super.parseExpressionStatement(node, expr); + } + shouldParseExportStatement() { + if (this.tsIsDeclarationStart()) return true; + if (this.match(tokTypes.at)) { + return true; + } + return super.shouldParseExportStatement(); + } + parseConditional(expr, startPos, startLoc, forInit, refDestructuringErrors) { + if (this.eat(tt.question)) { + let node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(tt.colon); + node.alternate = this.parseMaybeAssign(forInit); + return this.finishNode(node, "ConditionalExpression"); + } + return expr; + } + parseMaybeConditional(forInit, refDestructuringErrors) { + let startPos = this.start, startLoc = this.startLoc; + let expr = this.parseExprOps(forInit, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) return expr; + if (!this.maybeInArrowParameters || !this.match(tt.question)) { + return this.parseConditional(expr, startPos, startLoc, forInit, refDestructuringErrors); + } + const result = this.tryParse( + () => this.parseConditional(expr, startPos, startLoc, forInit, refDestructuringErrors) + ); + if (!result.node) { + if (result.error) { + this.setOptionalParametersError(refDestructuringErrors, result.error); + } + return expr; + } + if (result.error) this.setLookaheadState(result.failState); + return result.node; + } + parseParenItem(node) { + const startPos = this.start; + const startLoc = this.startLoc; + node = super.parseParenItem(node); + if (this.eat(tt.question)) { + node.optional = true; + this.resetEndLocation(node); + } + if (this.match(tt.colon)) { + const typeCastNode = this.startNodeAt(startPos, startLoc); + typeCastNode.expression = node; + typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); + return this.finishNode(typeCastNode, "TSTypeCastExpression"); + } + return node; + } + parseExportDeclaration(node) { + if (!this.isAmbientContext && this.ts_isContextual(tokTypes.declare)) { + return this.tsInAmbientContext(() => this.parseExportDeclaration(node)); + } + const startPos = this.start; + const startLoc = this.startLoc; + const isDeclare = this.eatContextual("declare"); + if (isDeclare && (this.ts_isContextual(tokTypes.declare) || !this.shouldParseExportStatement())) { + this.raise(this.start, TypeScriptError.ExpectedAmbientAfterExportDeclare); + } + const isIdentifier = tokenIsIdentifier(this.type); + const declaration = isIdentifier && this.tsTryParseExportDeclaration() || this.parseStatement(null); + if (!declaration) return null; + if (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) { + node.exportKind = "type"; + } + if (isDeclare) { + this.resetStartLocation(declaration, startPos, startLoc); + declaration.declare = true; + } + return declaration; + } + parseClassId(node, isStatement) { + if (!isStatement && this.isContextual("implements")) { + return; + } + super.parseClassId(node, isStatement); + const typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)); + if (typeParameters) node.typeParameters = typeParameters; + } + parseClassPropertyAnnotation(node) { + if (!node.optional) { + if (this.value === "!" && this.eat(tt.prefix)) { + node.definite = true; + } else if (this.eat(tt.question)) { + node.optional = true; + } + } + const type = this.tsTryParseTypeAnnotation(); + if (type) node.typeAnnotation = type; + } + parseClassField(field) { + const isPrivate = field.key.type === "PrivateIdentifier"; + if (isPrivate) { + if (field.abstract) { + this.raise(field.start, TypeScriptError.PrivateElementHasAbstract); + } + if (field.accessibility) { + this.raise( + field.start, + TypeScriptError.PrivateElementHasAccessibility({ + modifier: field.accessibility + }) + ); + } + this.parseClassPropertyAnnotation(field); + } else { + this.parseClassPropertyAnnotation(field); + if (this.isAmbientContext && !(field.readonly && !field.typeAnnotation) && this.match(tt.eq)) { + this.raise(this.start, TypeScriptError.DeclareClassFieldHasInitializer); + } + if (field.abstract && this.match(tt.eq)) { + const { key } = field; + this.raise( + this.start, + TypeScriptError.AbstractPropertyHasInitializer({ + propertyName: key.type === "Identifier" && !field.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` + }) + ); + } + } + return super.parseClassField(field); + } + parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper) { + const isConstructor = method.kind === "constructor"; + const isPrivate = method.key.type === "PrivateIdentifier"; + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (isPrivate) { + if (typeParameters) method.typeParameters = typeParameters; + if (method.accessibility) { + this.raise( + method.start, + TypeScriptError.PrivateMethodsHasAccessibility({ + modifier: method.accessibility + }) + ); + } + } else { + if (typeParameters && isConstructor) { + this.raise(typeParameters.start, TypeScriptError.ConstructorHasTypeParameters); + } + } + const { declare = false, kind } = method; + if (declare && (kind === "get" || kind === "set")) { + this.raise(method.start, TypeScriptError.DeclareAccessor({ kind })); + } + if (typeParameters) method.typeParameters = typeParameters; + const key = method.key; + if (method.kind === "constructor") { + if (isGenerator) this.raise(key.start, "Constructor can't be a generator"); + if (isAsync) this.raise(key.start, "Constructor can't be an async method"); + } else if (method.static && checkKeyName(method, "prototype")) { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + const value = method.value = this.parseMethod( + isGenerator, + isAsync, + allowsDirectSuper, + true, + method + ); + if (method.kind === "get" && value["params"].length !== 0) + this.raiseRecoverable(value.start, "getter should have no params"); + if (method.kind === "set" && value["params"].length !== 1) + this.raiseRecoverable(value.start, "setter should have exactly one param"); + if (method.kind === "set" && value["params"][0].type === "RestElement") + this.raiseRecoverable(value["params"][0].start, "Setter cannot use rest params"); + return this.finishNode(method, "MethodDefinition"); + } + isClassMethod() { + return this.match(tt.relational); + } + parseClassElement(constructorAllowsSuper) { + if (this.eat(tt.semi)) return null; + let node = this.startNode(); + let keyName = ""; + let isGenerator = false; + let isAsync = false; + let kind = "method"; + let isStatic = false; + const modifiers = [ + "declare", + "private", + "public", + "protected", + "accessor", + "override", + "abstract", + "readonly", + "static" + ]; + const modifierMap = this.tsParseModifiers({ + modified: node, + allowedModifiers: modifiers, + disallowedModifiers: ["in", "out"], + stopOnStartOfClassStaticBlock: true, + errorTemplate: TypeScriptError.InvalidModifierOnTypeParameterPositions + }); + isStatic = Boolean(modifierMap.static); + const callParseClassMemberWithIsStatic = () => { + if (this.tsIsStartOfStaticBlocks()) { + this.next(); + this.next(); + if (this.tsHasSomeModifiers(node, modifiers)) { + this.raise(this.start, TypeScriptError.StaticBlockCannotHaveModifier); + } + if (this.ecmaVersion >= 13) { + super.parseClassStaticBlock(node); + return node; + } + } else { + const idx = this.tsTryParseIndexSignature(node); + if (idx) { + if (node.abstract) { + this.raise(node.start, TypeScriptError.IndexSignatureHasAbstract); + } + if (node.accessibility) { + this.raise( + node.start, + TypeScriptError.IndexSignatureHasAccessibility({ + modifier: node.accessibility + }) + ); + } + if (node.declare) { + this.raise(node.start, TypeScriptError.IndexSignatureHasDeclare); + } + if (node.override) { + this.raise(node.start, TypeScriptError.IndexSignatureHasOverride); + } + return idx; + } + if (!this.inAbstractClass && node.abstract) { + this.raise(node.start, TypeScriptError.NonAbstractClassHasAbstractMethod); + } + if (node.override) { + if (!constructorAllowsSuper) { + this.raise(node.start, TypeScriptError.OverrideNotInSubClass); + } + } + node.static = isStatic; + if (isStatic) { + if (!(this.isClassElementNameStart() || this.type === tt.star)) { + keyName = "static"; + } + } + if (!keyName && this.ecmaVersion >= 8 && this.eatContextual("async")) { + if ((this.isClassElementNameStart() || this.type === tt.star) && !this.canInsertSemicolon()) { + isAsync = true; + } else { + keyName = "async"; + } + } + if (!keyName && (this.ecmaVersion >= 9 || !isAsync) && this.eat(tt.star)) { + isGenerator = true; + } + if (!keyName && !isAsync && !isGenerator) { + const lastValue = this.value; + if (this.eatContextual("get") || this.eatContextual("set")) { + if (this.isClassElementNameStart()) { + kind = lastValue; + } else { + keyName = lastValue; + } + } + } + if (keyName) { + node.computed = false; + node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc); + node.key.name = keyName; + this.finishNode(node.key, "Identifier"); + } else { + this.parseClassElementName(node); + } + this.parsePostMemberNameModifiers(node); + if (this.isClassMethod() || this.ecmaVersion < 13 || this.type === tt.parenL || kind !== "method" || isGenerator || isAsync) { + const isConstructor = !node.static && checkKeyName(node, "constructor"); + const allowsDirectSuper = isConstructor && constructorAllowsSuper; + if (isConstructor && kind !== "method") + this.raise(node.key.start, "Constructor can't have get/set modifier"); + node.kind = isConstructor ? "constructor" : kind; + this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper); + } else { + this.parseClassField(node); + } + return node; + } + }; + if (node.declare) { + this.tsInAmbientContext(callParseClassMemberWithIsStatic); + } else { + callParseClassMemberWithIsStatic(); + } + return node; + } + isClassElementNameStart() { + if (this.tsIsIdentifier()) { + return true; + } + return super.isClassElementNameStart(); + } + parseClassSuper(node) { + super.parseClassSuper(node); + if (node.superClass && (this.tsMatchLeftRelational() || this.match(tt.bitShift))) { + node.superTypeParameters = this.tsParseTypeArgumentsInExpression(); + } + if (this.eatContextual("implements")) { + node.implements = this.tsParseHeritageClause("implements"); + } + } + parseFunctionParams(node) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + if (typeParameters) node.typeParameters = typeParameters; + super.parseFunctionParams(node); + } + // `let x: number;` + parseVarId(decl, kind) { + super.parseVarId(decl, kind); + if (decl.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.value === "!" && this.eat(tt.prefix)) { + decl.definite = true; + } + const type = this.tsTryParseTypeAnnotation(); + if (type) { + decl.id.typeAnnotation = type; + this.resetEndLocation(decl.id); + } + } + // parse the return type of an async arrow function - let foo = (async (): number => {}); + parseArrowExpression(node, params, isAsync, forInit) { + if (this.match(tt.colon)) { + node.returnType = this.tsParseTypeAnnotation(); + } + let oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.enterScope(functionFlags(isAsync, false) | acornScope.SCOPE_ARROW); + this.initFunction(node); + const oldMaybeInArrowParameters = this.maybeInArrowParameters; + if (this.ecmaVersion >= 8) node.async = !!isAsync; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.maybeInArrowParameters = true; + node.params = this.toAssignableList(params, true); + this.maybeInArrowParameters = false; + this.parseFunctionBody(node, true, false, forInit); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + this.maybeInArrowParameters = oldMaybeInArrowParameters; + return this.finishNode(node, "ArrowFunctionExpression"); + } + parseMaybeAssignOrigin(forInit, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) return this.parseYield(forInit); + else this.exprAllowed = false; + } + let ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + oldDoubleProto = refDestructuringErrors.doubleProto; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; + } else { + refDestructuringErrors = new DestructuringErrors(); + ownDestructuringErrors = true; + } + let startPos = this.start, startLoc = this.startLoc; + if (this.type === tt.parenL || tokenIsIdentifier(this.type)) { + this.potentialArrowAt = this.start; + this.potentialArrowInForAwait = forInit === "await"; + } + let left = this.parseMaybeConditional(forInit, refDestructuringErrors); + if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc); + if (this.type.isAssign) { + let node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + if (this.type === tt.eq) left = this.toAssignable(left, true, refDestructuringErrors); + if (!ownDestructuringErrors) { + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; + } + if (refDestructuringErrors.shorthandAssign >= left.start) + refDestructuringErrors.shorthandAssign = -1; + if (!this.maybeInArrowParameters) { + if (this.type === tt.eq) this.checkLValPattern(left); + else this.checkLValSimple(left); + } + node.left = left; + this.next(); + node.right = this.parseMaybeAssign(forInit); + if (oldDoubleProto > -1) refDestructuringErrors.doubleProto = oldDoubleProto; + return this.finishNode(node, "AssignmentExpression"); + } else { + if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true); + } + if (oldParenAssign > -1) refDestructuringErrors.parenthesizedAssign = oldParenAssign; + if (oldTrailingComma > -1) refDestructuringErrors.trailingComma = oldTrailingComma; + return left; + } + parseMaybeAssign(forInit, refExpressionErrors, afterLeftParse) { + let state; + let jsx; + let typeCast; + if (options?.jsx && (this.matchJsx("jsxTagStart") || this.tsMatchLeftRelational())) { + state = this.cloneCurLookaheadState(); + jsx = this.tryParse( + () => this.parseMaybeAssignOrigin(forInit, refExpressionErrors, afterLeftParse), + state + ); + if (!jsx.error) return jsx.node; + const context = this.context; + const currentContext = context[context.length - 1]; + const lastCurrentContext = context[context.length - 2]; + if (currentContext === acornTypeScript.tokContexts.tc_oTag && lastCurrentContext === acornTypeScript.tokContexts.tc_expr) { + context.pop(); + context.pop(); + } else if (currentContext === acornTypeScript.tokContexts.tc_oTag || currentContext === acornTypeScript.tokContexts.tc_expr) { + context.pop(); + } + } + if (!jsx?.error && !this.tsMatchLeftRelational()) { + return this.parseMaybeAssignOrigin(forInit, refExpressionErrors, afterLeftParse); + } + if (!state || this.compareLookaheadState(state, this.getCurLookaheadState())) { + state = this.cloneCurLookaheadState(); + } + let typeParameters; + const arrow = this.tryParse((abort) => { + typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); + const expr = this.parseMaybeAssignOrigin(forInit, refExpressionErrors, afterLeftParse); + if (expr.type !== "ArrowFunctionExpression" || expr.extra?.parenthesized) { + abort(); + } + if (typeParameters?.params.length !== 0) { + this.resetStartLocationFromNode(expr, typeParameters); + } + expr.typeParameters = typeParameters; + return expr; + }, state); + if (!arrow.error && !arrow.aborted) { + if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); + return arrow.node; + } + if (!jsx) { + assert(true); + typeCast = this.tryParse( + () => this.parseMaybeAssignOrigin(forInit, refExpressionErrors, afterLeftParse), + state + ); + if (!typeCast.error) return typeCast.node; + } + if (jsx?.node) { + this.setLookaheadState(jsx.failState); + return jsx.node; + } + if (arrow.node) { + this.setLookaheadState(arrow.failState); + if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); + return arrow.node; + } + if (typeCast?.node) { + this.setLookaheadState(typeCast.failState); + return typeCast.node; + } + if (jsx?.thrown) throw jsx.error; + if (arrow.thrown) throw arrow.error; + if (typeCast?.thrown) throw typeCast.error; + throw jsx?.error || arrow.error || typeCast?.error; + } + parseAssignableListItem(allowModifiers) { + const decorators = []; + while (this.match(tokTypes.at)) { + decorators.push(this.parseDecorator()); + } + const startPos = this.start; + const startLoc = this.startLoc; + let accessibility; + let readonly = false; + let override = false; + if (allowModifiers !== void 0) { + const modified = {}; + this.tsParseModifiers({ + modified, + allowedModifiers: ["public", "private", "protected", "override", "readonly"] + }); + accessibility = modified.accessibility; + override = modified.override; + readonly = modified.readonly; + if (allowModifiers === false && (accessibility || readonly || override)) { + this.raise(startLoc.column, TypeScriptError.UnexpectedParameterModifier); + } + } + const left = this.parseMaybeDefault(startPos, startLoc); + this.parseBindingListItem(left); + const elt = this.parseMaybeDefault(left["start"], left["loc"].start, left); + if (decorators.length) { + elt.decorators = decorators; + } + if (accessibility || readonly || override) { + const pp = this.startNodeAt(startPos, startLoc); + if (accessibility) pp.accessibility = accessibility; + if (readonly) pp.readonly = readonly; + if (override) pp.override = override; + if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { + this.raise(pp.start, TypeScriptError.UnsupportedParameterPropertyKind); + } + pp.parameter = elt; + return this.finishNode(pp, "TSParameterProperty"); + } + return elt; + } + // AssignmentPattern + checkLValInnerPattern(expr, bindingType = acornScope.BIND_NONE, checkClashes) { + switch (expr.type) { + case "TSParameterProperty": + this.checkLValInnerPattern(expr.parameter, bindingType, checkClashes); + break; + default: { + super.checkLValInnerPattern(expr, bindingType, checkClashes); + break; + } + } + } + // Allow type annotations inside of a parameter list. + parseBindingListItem(param) { + if (this.eat(tt.question)) { + if (param.type !== "Identifier" && !this.isAmbientContext && !this.inType) { + this.raise(param.start, TypeScriptError.PatternIsOptional); + } + param.optional = true; + } + const type = this.tsTryParseTypeAnnotation(); + if (type) param.typeAnnotation = type; + this.resetEndLocation(param); + return param; + } + isAssignable(node, isBinding) { + switch (node.type) { + case "TSTypeCastExpression": + return this.isAssignable(node.expression, isBinding); + case "TSParameterProperty": + return true; + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + return true; + case "ObjectExpression": { + const last = node.properties.length - 1; + return node.properties.every((prop, i) => { + return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop); + }); + } + case "Property": + case "ObjectProperty": + return this.isAssignable(node.value); + case "SpreadElement": + return this.isAssignable(node.argument); + case "ArrayExpression": + return node.elements.every( + (element) => element === null || this.isAssignable(element) + ); + case "AssignmentExpression": + return node.operator === "="; + case "ParenthesizedExpression": + return this.isAssignable(node.expression); + case "MemberExpression": + case "OptionalMemberExpression": + return !isBinding; + default: + return false; + } + } + toAssignable(node, isBinding = false, refDestructuringErrors = new DestructuringErrors()) { + switch (node.type) { + case "ParenthesizedExpression": + return this.toAssignableParenthesizedExpression( + node, + isBinding, + refDestructuringErrors + ); + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + if (isBinding) { + } else { + this.raise(node.start, TypeScriptError.UnexpectedTypeCastInParameter); + } + return this.toAssignable(node.expression, isBinding, refDestructuringErrors); + case "MemberExpression": + break; + case "AssignmentExpression": + if (!isBinding && node.left.type === "TSTypeCastExpression") { + node.left = this.typeCastToParameter(node.left); + } + return super.toAssignable(node, isBinding, refDestructuringErrors); + case "TSTypeCastExpression": { + return this.typeCastToParameter(node); + } + default: + return super.toAssignable(node, isBinding, refDestructuringErrors); + } + return node; + } + toAssignableParenthesizedExpression(node, isBinding, refDestructuringErrors) { + switch (node.expression.type) { + case "TSAsExpression": + case "TSSatisfiesExpression": + case "TSNonNullExpression": + case "TSTypeAssertion": + case "ParenthesizedExpression": + return this.toAssignable(node.expression, isBinding, refDestructuringErrors); + default: + return super.toAssignable(node, isBinding, refDestructuringErrors); + } + } + parseBindingAtom() { + switch (this.type) { + case tt._this: + return this.parseIdent( + /* liberal */ + true + ); + default: + return super.parseBindingAtom(); + } + } + shouldParseArrow(exprList) { + let shouldParseArrowRes; + if (this.match(tt.colon)) { + shouldParseArrowRes = exprList.every((expr) => this.isAssignable(expr, true)); + } else { + shouldParseArrowRes = !this.canInsertSemicolon(); + } + if (shouldParseArrowRes) { + if (this.match(tt.colon)) { + const result = this.tryParse((abort) => { + const returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon); + if (this.canInsertSemicolon() || !this.match(tt.arrow)) abort(); + return returnType; + }); + if (result.aborted) { + this.shouldParseArrowReturnType = void 0; + return false; + } + if (!result.thrown) { + if (result.error) this.setLookaheadState(result.failState); + this.shouldParseArrowReturnType = result.node; + } + } + if (!this.match(tt.arrow)) { + this.shouldParseArrowReturnType = void 0; + return false; + } + return true; + } + this.shouldParseArrowReturnType = void 0; + return shouldParseArrowRes; + } + parseParenArrowList(startPos, startLoc, exprList, forInit) { + const node = this.startNodeAt(startPos, startLoc); + node.returnType = this.shouldParseArrowReturnType; + this.shouldParseArrowReturnType = void 0; + return this.parseArrowExpression(node, exprList, false, forInit); + } + parseParenAndDistinguishExpression(canBeArrow, forInit) { + let startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.ecmaVersion >= 8; + if (this.ecmaVersion >= 6) { + const oldMaybeInArrowParameters = this.maybeInArrowParameters; + this.maybeInArrowParameters = true; + this.next(); + let innerStartPos = this.start, innerStartLoc = this.startLoc; + let exprList = [], first = true, lastIsComma = false; + let refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + while (this.type !== tt.parenR) { + first ? first = false : this.expect(tt.comma); + if (allowTrailingComma && this.afterTrailingComma(tt.parenR, true)) { + lastIsComma = true; + break; + } else if (this.type === tt.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === tt.comma) { + this.raise(this.start, "Comma is not permitted after the rest element"); + } + break; + } else { + exprList.push( + this.parseMaybeAssign(forInit, refDestructuringErrors, this.parseParenItem) + ); + } + } + let innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc; + this.expect(tt.parenR); + this.maybeInArrowParameters = oldMaybeInArrowParameters; + if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(tt.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList, forInit); + } + if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart); + if (spreadStart) this.unexpected(spreadStart); + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + if (this.options.preserveParens) { + let par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression"); + } else { + return val; + } + } + parseTaggedTemplateExpression(base, startPos, startLoc, optionalChainMember) { + const node = this.startNodeAt(startPos, startLoc); + node.tag = base; + node.quasi = this.parseTemplate({ isTagged: true }); + if (optionalChainMember) { + this.raise( + startPos, + "Tagged Template Literals are not allowed in optionalChain." + ); + } + return this.finishNode(node, "TaggedTemplateExpression"); + } + shouldParseAsyncArrow() { + if (this.match(tt.colon)) { + const result = this.tryParse((abort) => { + const returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon); + if (this.canInsertSemicolon() || !this.match(tt.arrow)) abort(); + return returnType; + }); + if (result.aborted) { + this.shouldParseAsyncArrowReturnType = void 0; + return false; + } + if (!result.thrown) { + if (result.error) this.setLookaheadState(result.failState); + this.shouldParseAsyncArrowReturnType = result.node; + return !this.canInsertSemicolon() && this.eat(tt.arrow); + } + } else { + return !this.canInsertSemicolon() && this.eat(tt.arrow); + } + } + parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit) { + const arrN = this.startNodeAt(startPos, startLoc); + arrN.returnType = this.shouldParseAsyncArrowReturnType; + this.shouldParseAsyncArrowReturnType = void 0; + return this.parseArrowExpression(arrN, exprList, true, forInit); + } + parseExprList(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + let elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(tt.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) break; + } else first = false; + let elt; + if (allowEmpty && this.type === tt.comma) elt = null; + else if (this.type === tt.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (this.maybeInArrowParameters && this.match(tt.colon)) { + elt.typeAnnotation = this.tsParseTypeAnnotation(); + } + if (refDestructuringErrors && this.type === tt.comma && refDestructuringErrors.trailingComma < 0) + refDestructuringErrors.trailingComma = this.start; + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem); + } + elts.push(elt); + } + return elts; + } + parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) { + let _optionalChained = optionalChained; + if (!this.hasPrecedingLineBreak() && // NODE: replace bang + this.value === "!" && this.match(tt.prefix)) { + this.exprAllowed = false; + this.next(); + const nonNullExpression = this.startNodeAt(startPos, startLoc); + nonNullExpression.expression = base; + base = this.finishNode(nonNullExpression, "TSNonNullExpression"); + return base; + } + let isOptionalCall = false; + if (this.match(tt.questionDot) && this.lookaheadCharCode() === 60) { + if (noCalls) { + return base; + } + base.optional = true; + _optionalChained = isOptionalCall = true; + this.next(); + } + if (this.tsMatchLeftRelational() || this.match(tt.bitShift)) { + let missingParenErrorLoc; + const result = this.tsTryParseAndCatch(() => { + if (!noCalls && this.atPossibleAsyncArrow(base)) { + const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction( + startPos, + startLoc, + forInit + ); + if (asyncArrowFn) { + base = asyncArrowFn; + return base; + } + } + const typeArguments = this.tsParseTypeArgumentsInExpression(); + if (!typeArguments) return base; + if (isOptionalCall && !this.match(tt.parenL)) { + missingParenErrorLoc = this.curPosition(); + return base; + } + if (tokenIsTemplate(this.type) || this.type === tt.backQuote) { + const result2 = this.parseTaggedTemplateExpression( + base, + startPos, + startLoc, + _optionalChained + ); + result2.typeArguments = typeArguments; + return result2; + } + if (!noCalls && this.eat(tt.parenL)) { + let refDestructuringErrors = new DestructuringErrors(); + const node2 = this.startNodeAt(startPos, startLoc); + node2.callee = base; + node2.arguments = this.parseExprList( + tt.parenR, + this.ecmaVersion >= 8, + false, + refDestructuringErrors + ); + this.tsCheckForInvalidTypeCasts(node2.arguments); + node2.typeArguments = typeArguments; + if (_optionalChained) { + node2.optional = isOptionalCall; + } + this.checkExpressionErrors(refDestructuringErrors, true); + base = this.finishNode(node2, "CallExpression"); + return base; + } + const tokenType = this.type; + if ( + // a>c is not (a)>c, but a<(b>>c) + this.tsMatchRightRelational() || // a>>c is not (a)>>c, but a<(b>>>c) + tokenType === tt.bitShift || // ac is (ac + tokenType !== tt.parenL && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak() + ) { + return; + } + const node = this.startNodeAt(startPos, startLoc); + node.expression = base; + node.typeArguments = typeArguments; + return this.finishNode(node, "TSInstantiationExpression"); + }); + if (missingParenErrorLoc) { + this.unexpected(missingParenErrorLoc); + } + if (result) { + if (result.type === "TSInstantiationExpression" && (this.match(tt.dot) || this.match(tt.questionDot) && this.lookaheadCharCode() !== 40)) { + this.raise( + this.start, + TypeScriptError.InvalidPropertyAccessAfterInstantiationExpression + ); + } + base = result; + return base; + } + } + let optionalSupported = this.ecmaVersion >= 11; + let optional = optionalSupported && this.eat(tt.questionDot); + if (noCalls && optional) + this.raise( + this.lastTokStart, + "Optional chaining cannot appear in the callee of new expressions" + ); + let computed = this.eat(tt.bracketL); + if (computed || optional && this.type !== tt.parenL && this.type !== tt.backQuote || this.eat(tt.dot)) { + let node = this.startNodeAt(startPos, startLoc); + node.object = base; + if (computed) { + node.property = this.parseExpression(); + this.expect(tt.bracketR); + } else if (this.type === tt.privateId && base.type !== "Super") { + node.property = this.parsePrivateIdent(); + } else { + node.property = this.parseIdent(this.options.allowReserved !== "never"); + } + node.computed = !!computed; + if (optionalSupported) { + node.optional = optional; + } + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(tt.parenL)) { + const oldMaybeInArrowParameters = this.maybeInArrowParameters; + this.maybeInArrowParameters = true; + let refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + let exprList = this.parseExprList( + tt.parenR, + this.ecmaVersion >= 8, + false, + refDestructuringErrors + ); + if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + if (this.awaitIdentPos > 0) + this.raise( + this.awaitIdentPos, + "Cannot use 'await' as identifier inside an async function" + ); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + base = this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit); + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + let node = this.startNodeAt(startPos, startLoc); + node.callee = base; + node.arguments = exprList; + if (optionalSupported) { + node.optional = optional; + } + base = this.finishNode(node, "CallExpression"); + } + this.maybeInArrowParameters = oldMaybeInArrowParameters; + } else if (this.type === tt.backQuote) { + if (optional || _optionalChained) { + this.raise( + this.start, + "Optional chaining cannot appear in the tag of tagged template expressions" + ); + } + let node = this.startNodeAt(startPos, startLoc); + node.tag = base; + node.quasi = this.parseTemplate({ isTagged: true }); + base = this.finishNode(node, "TaggedTemplateExpression"); + } + return base; + } + parseGetterSetter(prop) { + prop.kind = prop.key.name; + this.parsePropertyName(prop); + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + prop.value = this.parseMethod(false); + if (typeParameters) prop.value.typeParameters = typeParameters; + let paramCount = prop.kind === "get" ? 0 : 1; + const firstParam = prop.value.params[0]; + const hasContextParam = firstParam && this.isThisParam(firstParam); + paramCount = hasContextParam ? paramCount + 1 : paramCount; + if (prop.value.params.length !== paramCount) { + let start = prop.value.start; + if (prop.kind === "get") this.raiseRecoverable(start, "getter should have no params"); + else this.raiseRecoverable(start, "setter should have exactly one param"); + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); + } + } + parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { + if (this.tsMatchLeftRelational()) { + if (isPattern) this.unexpected(); + prop.kind = "init"; + prop.method = true; + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); + prop.value = this.parseMethod(isGenerator, isAsync); + if (typeParameters) prop.value.typeParameters = typeParameters; + return; + } + return super.parsePropertyValue( + prop, + isPattern, + isGenerator, + isAsync, + startPos, + startLoc, + refDestructuringErrors, + containsEsc + ); + } + parseProperty(isPattern, refDestructuringErrors) { + if (!isPattern) { + let decorators = []; + if (this.match(tokTypes.at)) { + while (this.match(tokTypes.at)) { + decorators.push(this.parseDecorator()); + } + } + const property = super.parseProperty(isPattern, refDestructuringErrors); + if (property.type === "SpreadElement") { + if (decorators.length) + this.raise(property.start, DecoratorsError.SpreadElementDecorator); + } + if (decorators.length) { + property.decorators = decorators; + decorators = []; + } + return property; + } + return super.parseProperty(isPattern, refDestructuringErrors); + } + parseCatchClauseParam() { + const param = this.parseBindingAtom(); + let simple = param.type === "Identifier"; + this.enterScope(simple ? acornScope.SCOPE_SIMPLE_CATCH : 0); + this.checkLValPattern( + param, + simple ? acornScope.BIND_SIMPLE_CATCH : acornScope.BIND_LEXICAL + ); + const type = this.tsTryParseTypeAnnotation(); + if (type) { + param.typeAnnotation = type; + this.resetEndLocation(param); + } + this.expect(tt.parenR); + return param; + } + parseClass(node, isStatement) { + const oldInAbstractClass = this.inAbstractClass; + this.inAbstractClass = !!node.abstract; + try { + this.next(); + this.takeDecorators(node); + const oldStrict = this.strict; + this.strict = true; + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + const privateNameMap = this.enterClassBody(); + const classBody = this.startNode(); + let hadConstructor = false; + classBody.body = []; + let decorators = []; + this.expect(tt.braceL); + while (this.type !== tt.braceR) { + if (this.match(tokTypes.at)) { + decorators.push(this.parseDecorator()); + continue; + } + const element = this.parseClassElement(node.superClass !== null); + if (decorators.length) { + element.decorators = decorators; + this.resetStartLocationFromNode(element, decorators[0]); + decorators = []; + } + if (element) { + classBody.body.push(element); + if (element.type === "MethodDefinition" && element.kind === "constructor" && element.value.type === "FunctionExpression") { + if (hadConstructor) { + this.raiseRecoverable(element.start, "Duplicate constructor in the same class"); + } + hadConstructor = true; + if (element.decorators && element.decorators.length > 0) { + this.raise(element.start, DecoratorsError.DecoratorConstructor); + } + } else if (element.key && element.key.type === "PrivateIdentifier" && element.value?.type !== "TSDeclareMethod" && isPrivateNameConflicted(privateNameMap, element)) { + this.raiseRecoverable( + element.key.start, + `Identifier '#${element.key.name}' has already been declared` + ); + } + } + } + this.strict = oldStrict; + this.next(); + if (decorators.length) { + this.raise(this.start, DecoratorsError.TrailingDecorator); + } + node.body = this.finishNode(classBody, "ClassBody"); + this.exitClassBody(); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); + } finally { + this.inAbstractClass = oldInAbstractClass; + } + } + parseClassFunctionParams() { + const typeParameters = this.tsTryParseTypeParameters(); + let params = this.parseBindingList(tt.parenR, false, this.ecmaVersion >= 8, true); + if (typeParameters) params.typeParameters = typeParameters; + return params; + } + parseMethod(isGenerator, isAsync, allowDirectSuper, inClassScope, method) { + let node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.initFunction(node); + if (this.ecmaVersion >= 6) node.generator = isGenerator; + if (this.ecmaVersion >= 8) node.async = !!isAsync; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope( + functionFlags(isAsync, node.generator) | acornScope.SCOPE_SUPER | (allowDirectSuper ? acornScope.SCOPE_DIRECT_SUPER : 0) + ); + this.expect(tt.parenL); + node.params = this.parseClassFunctionParams(); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node, false, true, false, { + isClassMethod: inClassScope + }); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + if (method && method.abstract) { + const hasBody = !!node.body; + if (hasBody) { + const { key } = method; + this.raise( + method.start, + TypeScriptError.AbstractMethodHasImplementation({ + methodName: key.type === "Identifier" && !method.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` + }) + ); + } + } + return this.finishNode(node, "FunctionExpression"); + } + static parse(input, options2) { + if (options2.locations === false) { + throw new Error(`You have to enable options.locations while using acorn-typescript`); + } else { + options2.locations = true; + } + const parser = new this(options2, input); + if (dts) { + parser.isAmbientContext = true; + } + return parser.parse(); + } + static parseExpressionAt(input, pos, options2) { + if (options2.locations === false) { + throw new Error(`You have to enable options.locations while using acorn-typescript`); + } else { + options2.locations = true; + } + const parser = new this(options2, input, pos); + if (dts) { + parser.isAmbientContext = true; + } + parser.nextToken(); + return parser.parseExpression(); + } + parseImportSpecifier() { + const isMaybeTypeOnly = this.ts_isContextual(tokTypes.type); + if (isMaybeTypeOnly) { + let node = this.startNode(); + node.imported = this.parseModuleExportName(); + this.parseTypeOnlyImportExportSpecifier( + node, + /* isImport */ + true, + this.importOrExportOuterKind === "type" + ); + return this.finishNode(node, "ImportSpecifier"); + } else { + const node = super.parseImportSpecifier(); + node.importKind = "value"; + return node; + } + } + parseExportSpecifier(exports) { + const isMaybeTypeOnly = this.ts_isContextual(tokTypes.type); + const isString = this.match(tt.string); + if (!isString && isMaybeTypeOnly) { + let node = this.startNode(); + node.local = this.parseModuleExportName(); + this.parseTypeOnlyImportExportSpecifier( + node, + /* isImport */ + false, + this.importOrExportOuterKind === "type" + ); + this.finishNode(node, "ExportSpecifier"); + this.checkExport(exports, node.exported, node.exported.start); + return node; + } else { + const node = super.parseExportSpecifier(exports); + node.exportKind = "value"; + return node; + } + } + parseTypeOnlyImportExportSpecifier(node, isImport, isInTypeOnlyImportExport) { + const leftOfAsKey = isImport ? "imported" : "local"; + const rightOfAsKey = isImport ? "local" : "exported"; + let leftOfAs = node[leftOfAsKey]; + let rightOfAs; + let hasTypeSpecifier = false; + let canParseAsKeyword = true; + const loc = leftOfAs.start; + if (this.isContextual("as")) { + const firstAs = this.parseIdent(); + if (this.isContextual("as")) { + const secondAs = this.parseIdent(); + if (tokenIsKeywordOrIdentifier(this.type)) { + hasTypeSpecifier = true; + leftOfAs = firstAs; + rightOfAs = isImport ? this.parseIdent() : this.parseModuleExportName(); + canParseAsKeyword = false; + } else { + rightOfAs = secondAs; + canParseAsKeyword = false; + } + } else if (tokenIsKeywordOrIdentifier(this.type)) { + canParseAsKeyword = false; + rightOfAs = isImport ? this.parseIdent() : this.parseModuleExportName(); + } else { + hasTypeSpecifier = true; + leftOfAs = firstAs; + } + } else if (tokenIsKeywordOrIdentifier(this.type)) { + hasTypeSpecifier = true; + if (isImport) { + leftOfAs = super.parseIdent(true); + if (!this.isContextual("as")) { + this.checkUnreserved(leftOfAs); + } + } else { + leftOfAs = this.parseModuleExportName(); + } + } + if (hasTypeSpecifier && isInTypeOnlyImportExport) { + this.raise( + loc, + isImport ? TypeScriptError.TypeModifierIsUsedInTypeImports : TypeScriptError.TypeModifierIsUsedInTypeExports + ); + } + node[leftOfAsKey] = leftOfAs; + node[rightOfAsKey] = rightOfAs; + const kindKey = isImport ? "importKind" : "exportKind"; + node[kindKey] = hasTypeSpecifier ? "type" : "value"; + if (canParseAsKeyword && this.eatContextual("as")) { + node[rightOfAsKey] = isImport ? this.parseIdent() : this.parseModuleExportName(); + } + if (!node[rightOfAsKey]) { + node[rightOfAsKey] = this.copyNode(node[leftOfAsKey]); + } + if (isImport) { + this.checkLValSimple(node[rightOfAsKey], acornScope.BIND_LEXICAL); + } + } + raiseCommonCheck(pos, message, recoverable) { + switch (message) { + case "Comma is not permitted after the rest element": { + if (this.isAmbientContext && this.match(tt.comma) && this.lookaheadCharCode() === 41) { + this.next(); + return; + } else { + return super.raise(pos, message); + } + } + } + return recoverable ? super.raiseRecoverable(pos, message) : super.raise(pos, message); + } + raiseRecoverable(pos, message) { + return this.raiseCommonCheck(pos, message, true); + } + raise(pos, message) { + return this.raiseCommonCheck(pos, message, true); + } + updateContext(prevType) { + const { type } = this; + if (type == tt.braceL) { + var curContext = this.curContext(); + if (curContext == tsTokContexts.tc_oTag) this.context.push(tokContexts.b_expr); + else if (curContext == tsTokContexts.tc_expr) this.context.push(tokContexts.b_tmpl); + else super.updateContext(prevType); + this.exprAllowed = true; + } else if (type === tt.slash && prevType === tokTypes.jsxTagStart) { + this.context.length -= 2; + this.context.push(tsTokContexts.tc_cTag); + this.exprAllowed = false; + } else { + return super.updateContext(prevType); + } + } + // Parses JSX opening tag starting after '<'. + jsx_parseOpeningElementAt(startPos, startLoc) { + let node = this.startNodeAt(startPos, startLoc); + let nodeName = this.jsx_parseElementName(); + if (nodeName) node.name = nodeName; + if (this.match(tt.relational) || this.match(tt.bitShift)) { + const typeArguments = this.tsTryParseAndCatch( + () => this.tsParseTypeArgumentsInExpression() + ); + if (typeArguments) node.typeArguments = typeArguments; + } + node.attributes = []; + while (this.type !== tt.slash && this.type !== tokTypes.jsxTagEnd) + node.attributes.push(this.jsx_parseAttribute()); + node.selfClosing = this.eat(tt.slash); + this.expect(tokTypes.jsxTagEnd); + return this.finishNode(node, nodeName ? "JSXOpeningElement" : "JSXOpeningFragment"); + } + enterScope(flags) { + if (flags === TS_SCOPE_TS_MODULE) { + this.importsStack.push([]); + } + super.enterScope(flags); + const scope = super.currentScope(); + scope.types = []; + scope.enums = []; + scope.constEnums = []; + scope.classes = []; + scope.exportOnlyBindings = []; + } + exitScope() { + const scope = super.currentScope(); + if (scope.flags === TS_SCOPE_TS_MODULE) { + this.importsStack.pop(); + } + super.exitScope(); + } + hasImport(name, allowShadow) { + const len = this.importsStack.length; + if (this.importsStack[len - 1].indexOf(name) > -1) { + return true; + } + if (!allowShadow && len > 1) { + for (let i = 0; i < len - 1; i++) { + if (this.importsStack[i].indexOf(name) > -1) return true; + } + } + return false; + } + maybeExportDefined(scope, name) { + if (this.inModule && scope.flags & acornScope.SCOPE_TOP) { + delete this.undefinedExports[name]; + } + } + declareName(name, bindingType, pos) { + if (bindingType & acornScope.BIND_FLAGS_TS_IMPORT) { + if (this.hasImport(name, true)) { + this.raise(pos, `Identifier '${name}' has already been declared.`); + } + this.importsStack[this.importsStack.length - 1].push(name); + return; + } + const scope = this.currentScope(); + if (bindingType & acornScope.BIND_FLAGS_TS_EXPORT_ONLY) { + this.maybeExportDefined(scope, name); + scope.exportOnlyBindings.push(name); + return; + } + if (bindingType === acornScope.BIND_TS_TYPE || bindingType === acornScope.BIND_TS_INTERFACE) { + if (bindingType === acornScope.BIND_TS_TYPE && scope.types.includes(name)) { + this.raise(pos, `type '${name}' has already been declared.`); + } + scope.types.push(name); + } else { + super.declareName(name, bindingType, pos); + } + if (bindingType & acornScope.BIND_FLAGS_TS_ENUM) scope.enums.push(name); + if (bindingType & acornScope.BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.push(name); + if (bindingType & acornScope.BIND_FLAGS_CLASS) scope.classes.push(name); + } + checkLocalExport(id) { + const { name } = id; + if (this.hasImport(name)) return; + const len = this.scopeStack.length; + for (let i = len - 1; i >= 0; i--) { + const scope = this.scopeStack[i]; + if (scope.types.indexOf(name) > -1 || scope.exportOnlyBindings.indexOf(name) > -1) return; + } + super.checkLocalExport(id); + } + } + return TypeScriptParser; + }; +} +export { + tsPlugin +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/package.json new file mode 100644 index 0000000000000000000000000000000000000000..d7bc01c99bb02c51426cfde30fdd25021eed91c9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/acorn-typescript/package.json @@ -0,0 +1,55 @@ +{ + "name": "@sveltejs/acorn-typescript", + "version": "1.0.10", + "description": "Acorn plugin that parses TypeScript", + "type": "module", + "types": "index.d.ts", + "files": [ + "index.js", + "index.d.ts" + ], + "exports": { + ".": { + "types": "./index.d.ts", + "default": "./index.js" + } + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sveltejs/acorn-typescript.git" + }, + "author": "tyrealhu and the Svelte team", + "license": "MIT", + "bugs": { + "url": "https://github.com/sveltejs/acorn-typescript/issues" + }, + "homepage": "https://github.com/sveltejs/acorn-typescript#readme", + "devDependencies": { + "@changesets/cli": "^2.27.11", + "@svitejs/changesets-changelog-github-compact": "^1.1.0", + "acorn": "^8.14.0", + "acorn-jsx": "~5.3.2", + "cross-env": "^7.0.3", + "esbuild": "^0.25.0", + "prettier": "~3.5.2", + "test262": "git+https://github.com/tc39/test262.git#88ebb1e3755198cd08757bca1698effbbf360345", + "test262-parser-runner": "^0.5.0", + "typescript": "^5.7.3", + "vitest": "^3.0.7" + }, + "peerDependencies": { + "acorn": "^8.9.0" + }, + "scripts": { + "build": "esbuild src/index.ts --bundle --format=esm --outfile=index.js --platform=node --external:acorn", + "format": "prettier --write .", + "check": "tsc --noEmit", + "lint": "prettier --check .", + "test": "vitest run", + "test:update": "cross-env UPDATE_SNAPSHOT=true vitest run && pnpm run format", + "test:test262": "pnpm run build && node ./test/run_test262.js", + "changeset:version": "changeset version && git add --all", + "changeset:release": "changeset publish", + "playground": "pnpm build && node ./playground/index.js" + } +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..22efd0c0dfa3b3dae382a6faf87b40d3e9a23965 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b612f2aa6122dfdabf92dbf4cbc17167bf13514a --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/README.md @@ -0,0 +1,15 @@ +# @sveltejs/adapter-static + +[Adapter](https://svelte.dev/docs/kit/adapters) for SvelteKit apps that prerenders your entire site as a collection of static files. It's also possible to create an SPA with it by specifying a fallback page which renders an empty shell. If you'd like to prerender only some pages and not create an SPA for those left out, you will need to use a different adapter together with [the `prerender` option](https://svelte.dev/docs/kit/page-options#prerender). + +## Docs + +[Docs](https://svelte.dev/docs/kit/adapter-static) + +## Changelog + +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-static/CHANGELOG.md). + +## License + +[MIT](LICENSE) diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..101e02fdef12bd71756c656524cc7ee08f8b4380 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/index.d.ts @@ -0,0 +1,11 @@ +import { Adapter } from '@sveltejs/kit'; + +export interface AdapterOptions { + pages?: string; + assets?: string; + fallback?: string; + precompress?: boolean; + strict?: boolean; +} + +export default function plugin(options?: AdapterOptions): Adapter; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c2b87301c8a88126f804ed9a22c96b42df1df847 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/index.js @@ -0,0 +1,91 @@ +import path from 'node:path'; +import { platforms } from './platforms.js'; + +/** @type {import('./index.js').default} */ +export default function (options) { + return { + name: '@sveltejs/adapter-static', + /** @param {import('./internal.js').Builder2_0_0} builder */ + async adapt(builder) { + if (!options?.fallback && builder.config.kit.router?.type !== 'hash') { + const dynamic_routes = builder.routes.filter((route) => route.prerender !== true); + if (dynamic_routes.length > 0 && options?.strict !== false) { + const prefix = path.relative('.', builder.config.kit.files.routes); + const has_param_routes = builder.routes.some((route) => route.id.includes('[')); + const config_option = + has_param_routes || JSON.stringify(builder.config.kit.prerender.entries) !== '["*"]' + ? ` - adjust the \`prerender.entries\` config option ${ + has_param_routes + ? '(routes with parameters are not part of entry points by default)' + : '' + } — see https://svelte.dev/docs/kit/configuration#prerender for more info.` + : ''; + + builder.log.error( + `@sveltejs/adapter-static: all routes must be fully prerenderable, but found the following routes that are dynamic: +${dynamic_routes.map((route) => ` - ${path.posix.join(prefix, route.id)}`).join('\n')} + +You have the following options: + - set the \`fallback\` option — see https://svelte.dev/docs/kit/single-page-apps#usage for more info. + - add \`export const prerender = true\` to your root \`+layout.js/.ts\` or \`+layout.server.js/.ts\` file. This will try to prerender all pages. + - add \`export const prerender = true\` to any \`+server.js/ts\` files that are not fetched by page \`load\` functions. +${config_option} + - pass \`strict: false\` to \`adapter-static\` to ignore this error. Only do this if you are sure you don't need the routes in question in your final app, as they will be unavailable. See https://github.com/sveltejs/kit/tree/main/packages/adapter-static#strict for more info. + +If this doesn't help, you may need to use a different adapter. @sveltejs/adapter-static can only be used for sites that don't need a server for dynamic rendering, and can run on just a static file server. +See https://svelte.dev/docs/kit/page-options#prerender for more details` + ); + throw new Error('Encountered dynamic routes'); + } + } + + const platform = platforms.find((platform) => platform.test()); + + if (platform) { + if (options) { + builder.log.warn( + `Detected ${platform.name}. Please remove adapter-static options to enable zero-config mode` + ); + } else { + builder.log.info(`Detected ${platform.name}, using zero-config mode`); + } + } + + const { + // @ts-ignore + pages = 'build', + assets = pages, + fallback, + precompress + } = options ?? platform?.defaults ?? /** @type {import('./index.js').AdapterOptions} */ ({}); + + builder.rimraf(assets); + builder.rimraf(pages); + + builder.generateEnvModule(); + builder.writeClient(assets); + builder.writePrerendered(pages); + + if (fallback) { + await builder.generateFallback(path.join(pages, fallback)); + } + + if (precompress) { + builder.log.minor('Compressing assets and pages'); + if (pages === assets) { + await builder.compress(assets); + } else { + await Promise.all([builder.compress(assets), builder.compress(pages)]); + } + } + + if (pages === assets) { + builder.log(`Wrote site to "${pages}"`); + } else { + builder.log(`Wrote pages to "${pages}" and assets to "${assets}"`); + } + + if (!options) platform?.done(builder); + } + }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/package.json new file mode 100644 index 0000000000000000000000000000000000000000..42cc5e5a88b08749ffa37bc43a2adfe330092600 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/package.json @@ -0,0 +1,54 @@ +{ + "name": "@sveltejs/adapter-static", + "version": "3.0.10", + "description": "Adapter for SvelteKit apps that prerenders your entire site as a collection of static files", + "keywords": [ + "adapter", + "deploy", + "hosting", + "ssg", + "static site generation", + "svelte", + "sveltekit" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/sveltejs/kit.git", + "directory": "packages/adapter-static" + }, + "license": "MIT", + "homepage": "https://svelte.dev/docs/kit/adapter-static", + "type": "module", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./index.js" + }, + "./package.json": "./package.json" + }, + "types": "index.d.ts", + "files": [ + "index.js", + "index.d.ts", + "platforms.js" + ], + "devDependencies": { + "@playwright/test": "^1.51.1", + "@sveltejs/vite-plugin-svelte": "^6.0.0-next.3", + "@types/node": "^18.19.119", + "sirv": "^3.0.0", + "svelte": "^5.39.3", + "typescript": "^5.3.3", + "vite": "^6.3.5", + "@sveltejs/kit": "^2.43.7" + }, + "peerDependencies": { + "@sveltejs/kit": "^2.0.0" + }, + "scripts": { + "lint": "prettier --check .", + "check": "tsc", + "format": "pnpm lint --write", + "test": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test" + } +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/platforms.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/platforms.js new file mode 100644 index 0000000000000000000000000000000000000000..6ed42162566865bab57a74149fb20333d0e74d9e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/adapter-static/platforms.js @@ -0,0 +1,76 @@ +import fs from 'node:fs'; +import process from 'node:process'; + +/** + * @typedef {{ + * name: string; + * test: () => boolean; + * defaults: import('./index.js').AdapterOptions; + * done: (builder: import('./internal.js').Builder2_0_0) => void; + * }} + * Platform */ + +// This function is duplicated in adapter-vercel +/** @param {import('./internal.js').Builder2_0_0} builder */ +function static_vercel_config(builder) { + /** @type {any[]} */ + const prerendered_redirects = []; + + /** @type {Record} */ + const overrides = {}; + + for (const [src, redirect] of builder.prerendered.redirects) { + prerendered_redirects.push({ + src, + headers: { + Location: redirect.location + }, + status: redirect.status + }); + } + + for (const [path, page] of builder.prerendered.pages) { + if (path.endsWith('/') && path !== '/') { + prerendered_redirects.push( + { src: path, dest: path.slice(0, -1) }, + { src: path.slice(0, -1), status: 308, headers: { Location: path } } + ); + + overrides[page.file] = { path: path.slice(1, -1) }; + } else { + overrides[page.file] = { path: path.slice(1) }; + } + } + + return { + version: 3, + routes: [ + ...prerendered_redirects, + { + src: `/${builder.getAppPath()}/immutable/.+`, + headers: { + 'cache-control': 'public, immutable, max-age=31536000' + } + }, + { + handle: 'filesystem' + } + ], + overrides + }; +} + +/** @type {Platform[]} */ +export const platforms = [ + { + name: 'Vercel', + test: () => !!process.env.VERCEL, + defaults: { + pages: '.vercel/output/static' + }, + done: (builder) => { + const config = static_vercel_config(builder); + fs.writeFileSync('.vercel/output/config.json', JSON.stringify(config, null, ' ')); + } + } +]; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..22efd0c0dfa3b3dae382a6faf87b40d3e9a23965 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/README.md new file mode 100644 index 0000000000000000000000000000000000000000..372a92e71fa7f231433a339605392850b54bdb40 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/README.md @@ -0,0 +1,18 @@ +# The fastest way to build Svelte apps + +This is the [SvelteKit](https://svelte.dev/docs/kit) framework and CLI. + +The quickest way to get started is via the [sv](https://npmjs.com/package/sv) package: + +```sh +npx sv create my-app +cd my-app +npm install +npm run dev +``` + +See the [documentation](https://svelte.dev/docs/kit) to learn more. + +## Changelog + +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md). diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/package.json new file mode 100644 index 0000000000000000000000000000000000000000..15c80f3765d17678a4a95a830bad0397534e2f17 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/package.json @@ -0,0 +1,134 @@ +{ + "name": "@sveltejs/kit", + "version": "2.60.1", + "description": "SvelteKit is the fastest way to build Svelte apps", + "keywords": [ + "framework", + "official", + "svelte", + "sveltekit", + "vite" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/sveltejs/kit.git", + "directory": "packages/kit" + }, + "license": "MIT", + "homepage": "https://svelte.dev", + "type": "module", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "@sveltejs/acorn-typescript": "^1.0.5", + "@types/cookie": "^0.6.0", + "acorn": "^8.14.1", + "cookie": "^0.6.0", + "devalue": "^5.8.1", + "esm-env": "^1.2.2", + "kleur": "^4.1.5", + "magic-string": "^0.30.5", + "mrmime": "^2.0.0", + "set-cookie-parser": "^3.0.0", + "sirv": "^3.0.0" + }, + "devDependencies": { + "@opentelemetry/api": "^1.0.0", + "@playwright/test": "^1.59.1", + "@sveltejs/vite-plugin-svelte": "^6.0.0-next.3", + "@types/connect": "^3.4.38", + "@types/node": "^18.19.119", + "@types/set-cookie-parser": "^2.4.7", + "dts-buddy": "^0.7.0", + "rollup": "^4.59.0", + "svelte": "^5.55.7", + "typescript": "^5.3.3", + "vite": "^6.4.2", + "vitest": "^4.0.0" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0 || ^6.0.0-next.0 || ^7.0.0", + "@opentelemetry/api": "^1.0.0", + "svelte": "^4.0.0 || ^5.0.0-next.0", + "typescript": "^5.3.3 || ^6.0.0", + "vite": "^5.0.3 || ^6.0.0 || ^7.0.0-beta.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + }, + "typescript": { + "optional": true + } + }, + "bin": { + "svelte-kit": "svelte-kit.js" + }, + "files": [ + "src", + "!src/**/*.spec.js", + "!src/core/**/fixtures", + "!src/core/**/test", + "types", + "svelte-kit.js" + ], + "imports": { + "#app/paths": { + "browser": "./src/runtime/app/paths/client.js", + "default": "./src/runtime/app/paths/server.js" + } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "types": "./types/index.d.ts", + "import": "./src/exports/index.js" + }, + "./internal": { + "types": "./types/index.d.ts", + "import": "./src/exports/internal/index.js" + }, + "./internal/server": { + "types": "./types/index.d.ts", + "import": "./src/exports/internal/server.js" + }, + "./node": { + "types": "./types/index.d.ts", + "import": "./src/exports/node/index.js" + }, + "./node/polyfills": { + "types": "./types/index.d.ts", + "import": "./src/exports/node/polyfills.js" + }, + "./hooks": { + "types": "./types/index.d.ts", + "import": "./src/exports/hooks/index.js" + }, + "./vite": { + "types": "./types/index.d.ts", + "import": "./src/exports/vite/index.js" + } + }, + "types": "types/index.d.ts", + "engines": { + "node": ">=18.13" + }, + "scripts": { + "lint": "prettier --config ../../.prettierrc --check .", + "check": "tsc && cd ./test/types && tsc", + "check:all": "tsc && pnpm -r --filter=\"./**\" check", + "format": "prettier --config ../../.prettierrc --write .", + "test": "pnpm test:unit && pnpm test:integration", + "test:integration": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test", + "test:cross-platform:dev": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:cross-platform:dev", + "test:cross-platform:build": "pnpm test:unit && pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:cross-platform:build", + "test:server-side-route-resolution:dev": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:server-side-route-resolution:dev", + "test:server-side-route-resolution:build": "pnpm test:unit && pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:server-side-route-resolution:build", + "test:svelte-async:dev": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:svelte-async:dev", + "test:svelte-async:build": "pnpm test:unit && pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:svelte-async:build", + "test:unit:dev": "vitest --config kit.vitest.config.js run", + "test:unit:prod": "NODE_ENV=production vitest --config kit.vitest.config.js run csp.spec.js cookie.spec.js", + "test:unit": "pnpm test:unit:dev && pnpm test:unit:prod", + "generate:version": "node scripts/generate-version.js", + "generate:types": "node scripts/generate-dts.js" + } +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/cli.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/cli.js new file mode 100644 index 0000000000000000000000000000000000000000..99024d192d239eb71325020584d1e210b393f872 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/cli.js @@ -0,0 +1,95 @@ +import fs from 'node:fs'; +import process from 'node:process'; +import { parseArgs } from 'node:util'; +import colors from 'kleur'; +import { load_config } from './core/config/index.js'; +import { coalesce_to_error } from './utils/error.js'; + +/** @param {unknown} e */ +function handle_error(e) { + const error = coalesce_to_error(e); + + if (error.name === 'SyntaxError') throw error; + + console.error(colors.bold().red(`> ${error.message}`)); + if (error.stack) { + console.error(colors.gray(error.stack.split('\n').slice(1).join('\n'))); + } + + process.exit(1); +} + +const pkg = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf-8')); + +const help = ` + Usage: svelte-kit [options] + + Commands: + sync Synchronise generated type definitions + + Options: + --version, -v Show version number + --help, -h Show this help message + + Sync Options: + --mode Specify a mode for loading environment variables (default: development) +`; + +let parsed; +try { + parsed = parseArgs({ + options: { + version: { type: 'boolean', short: 'v' }, + help: { type: 'boolean', short: 'h' }, + mode: { type: 'string', default: 'development' } + }, + allowPositionals: true, + strict: true + }); +} catch (err) { + const error = /** @type {Error} */ (err); + console.error(colors.bold().red(`> ${error.message}`)); + console.log(help); + process.exit(1); +} + +const { values, positionals } = parsed; + +if (values.version) { + console.log(pkg.version); + process.exit(0); +} + +if (values.help) { + console.log(help); + process.exit(0); +} + +const command = positionals[0]; + +if (!command) { + console.log(help); + process.exit(0); +} + +if (command === 'sync') { + const config_files = ['js', 'ts'] + .map((ext) => `svelte.config.${ext}`) + .filter((f) => fs.existsSync(f)); + if (config_files.length === 0) { + console.warn(`Missing Svelte config file in ${process.cwd()} — skipping`); + process.exit(0); + } + + try { + const config = await load_config(); + const sync = await import('./core/sync/sync.js'); + sync.all_types(config, values.mode); + } catch (error) { + handle_error(error); + } +} else { + console.error(colors.bold().red(`> Unknown command: ${command}`)); + console.log(help); + process.exit(1); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/constants.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/constants.js new file mode 100644 index 0000000000000000000000000000000000000000..5a6795f3f58d3ace134436a0903d62cfe7e544fe --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/constants.js @@ -0,0 +1,13 @@ +/** + * A fake asset path used in `vite dev` and `vite preview`, so that we can + * serve local assets while verifying that requests are correctly prefixed + */ +export const SVELTE_KIT_ASSETS = '/_svelte_kit_assets'; + +export const GENERATED_COMMENT = '// this file is generated — do not edit it\n'; + +export const ENDPOINT_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS', 'HEAD']; + +export const MUTATIVE_METHODS = ['POST', 'PUT', 'PATCH', 'DELETE']; + +export const PAGE_METHODS = ['GET', 'POST', 'HEAD']; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/adapt/builder.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/adapt/builder.js new file mode 100644 index 0000000000000000000000000000000000000000..42ff2145db31fc33d74805028efbb648fd74b4ee --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/adapt/builder.js @@ -0,0 +1,369 @@ +/** @import { Builder } from '@sveltejs/kit' */ +/** @import { ResolvedConfig } from 'vite' */ +/** @import { RouteDefinition } from '@sveltejs/kit' */ +/** @import { RouteData, ValidatedConfig, BuildData, ServerMetadata, ServerMetadataRoute, Prerendered, PrerenderMap, Logger, RemoteChunk } from 'types' */ +import colors from 'kleur'; +import { createReadStream, createWriteStream, existsSync, statSync } from 'node:fs'; +import { extname, resolve, join, dirname, relative } from 'node:path'; +import { pipeline } from 'node:stream'; +import { promisify } from 'node:util'; +import zlib from 'node:zlib'; +import { copy, rimraf, mkdirp, posixify } from '../../utils/filesystem.js'; +import { generate_manifest } from '../generate_manifest/index.js'; +import { get_route_segments } from '../../utils/routing.js'; +import { get_env } from '../../exports/vite/utils.js'; +import generate_fallback from '../postbuild/fallback.js'; +import { write } from '../sync/utils.js'; +import { list_files } from '../utils.js'; +import { find_server_assets } from '../generate_manifest/find_server_assets.js'; +import { reserved } from '../env.js'; + +const pipe = promisify(pipeline); +const extensions = ['.html', '.js', '.mjs', '.json', '.css', '.svg', '.xml', '.wasm', '.txt']; + +/** + * Creates the Builder which is passed to adapters for building the application. + * @param {{ + * config: ValidatedConfig; + * build_data: BuildData; + * server_metadata: ServerMetadata; + * route_data: RouteData[]; + * prerendered: Prerendered; + * prerender_map: PrerenderMap; + * log: Logger; + * vite_config: ResolvedConfig; + * remotes: RemoteChunk[] + * }} opts + * @returns {Builder} + */ +export function create_builder({ + config, + build_data, + server_metadata, + route_data, + prerendered, + prerender_map, + log, + vite_config, + remotes +}) { + /** @type {Map} */ + const lookup = new Map(); + + /** + * Rather than exposing the internal `RouteData` type, which is subject to change, + * we expose a stable type that adapters can use to group/filter routes + */ + const routes = route_data.map((route) => { + const { config, methods, page, api } = /** @type {ServerMetadataRoute} */ ( + server_metadata.routes.get(route.id) + ); + + /** @type {RouteDefinition} */ + const facade = { + id: route.id, + api, + page, + segments: get_route_segments(route.id).map((segment) => ({ + dynamic: segment.includes('['), + rest: segment.includes('[...'), + content: segment + })), + pattern: route.pattern, + prerender: prerender_map.get(route.id) ?? false, + methods, + config + }; + + lookup.set(facade, route); + + return facade; + }); + + return { + log, + rimraf, + mkdirp, + copy, + + config, + prerendered, + routes, + + async compress(directory) { + if (!existsSync(directory)) { + return; + } + + const files = list_files(directory, (file) => extensions.includes(extname(file))).map( + (file) => resolve(directory, file) + ); + + await Promise.all( + files.flatMap((file) => [compress_file(file, 'gz'), compress_file(file, 'br')]) + ); + }, + + async createEntries(fn) { + const seen = new Set(); + + for (let i = 0; i < route_data.length; i += 1) { + const route = route_data[i]; + if (prerender_map.get(route.id) === true) continue; + const { id, filter, complete } = fn(routes[i]); + + if (seen.has(id)) continue; + seen.add(id); + + const group = [route]; + + // figure out which lower priority routes should be considered fallbacks + for (let j = i + 1; j < route_data.length; j += 1) { + if (prerender_map.get(routes[j].id) === true) continue; + if (filter(routes[j])) { + group.push(route_data[j]); + } + } + + const filtered = new Set(group); + + // heuristic: if /foo/[bar] is included, /foo/[bar].json should + // also be included, since the page likely needs the endpoint + // TODO is this still necessary, given the new way of doing things? + filtered.forEach((route) => { + if (route.page) { + const endpoint = route_data.find((candidate) => candidate.id === route.id + '.json'); + + if (endpoint) { + filtered.add(endpoint); + } + } + }); + + if (filtered.size > 0) { + await complete({ + generateManifest: ({ relativePath }) => + generate_manifest({ + build_data, + prerendered: [], + relative_path: relativePath, + routes: Array.from(filtered), + remotes + }) + }); + } + } + }, + + findServerAssets(route_data) { + return find_server_assets( + build_data, + route_data.map((route) => /** @type {import('types').RouteData} */ (lookup.get(route))) + ); + }, + + async generateFallback(dest) { + const manifest_path = `${config.kit.outDir}/output/server/manifest-full.js`; + const env = get_env(config.kit.env, vite_config.mode); + + const fallback = await generate_fallback({ + manifest_path, + env: { ...env.private, ...env.public } + }); + + if (existsSync(dest)) { + console.log( + colors + .bold() + .yellow( + `Overwriting ${dest} with fallback page. Consider using a different name for the fallback.` + ) + ); + } + + write(dest, fallback); + }, + + generateEnvModule() { + const dest = `${config.kit.outDir}/output/prerendered/dependencies/${config.kit.appDir}/env.js`; + const env = get_env(config.kit.env, vite_config.mode); + + write(dest, `export const env=${JSON.stringify(env.public)}`); + }, + + generateManifest({ relativePath, routes: subset }) { + return generate_manifest({ + build_data, + prerendered: prerendered.paths, + relative_path: relativePath, + routes: subset + ? subset.map((route) => /** @type {import('types').RouteData} */ (lookup.get(route))) + : route_data.filter((route) => prerender_map.get(route.id) !== true), + remotes + }); + }, + + getBuildDirectory(name) { + return `${config.kit.outDir}/${name}`; + }, + + getClientDirectory() { + return `${config.kit.outDir}/output/client`; + }, + + getServerDirectory() { + return `${config.kit.outDir}/output/server`; + }, + + getAppPath() { + return build_data.app_path; + }, + + writeClient(dest) { + return copy(`${config.kit.outDir}/output/client`, dest, { + // avoid making vite build artefacts public + filter: (basename) => basename !== '.vite' + }); + }, + + writePrerendered(dest) { + const source = `${config.kit.outDir}/output/prerendered`; + + return [ + ...copy(`${source}/pages`, dest), + ...copy(`${source}/dependencies`, dest), + ...copy(`${source}/data`, dest) + ]; + }, + + writeServer(dest) { + return copy(`${config.kit.outDir}/output/server`, dest); + }, + + hasServerInstrumentationFile() { + return existsSync(`${config.kit.outDir}/output/server/instrumentation.server.js`); + }, + + instrument({ + entrypoint, + instrumentation, + start = join(dirname(entrypoint), 'start.js'), + module = { + exports: ['default'] + } + }) { + if (!existsSync(instrumentation)) { + throw new Error( + `Instrumentation file ${instrumentation} not found. This is probably a bug in your adapter.` + ); + } + if (!existsSync(entrypoint)) { + throw new Error( + `Entrypoint file ${entrypoint} not found. This is probably a bug in your adapter.` + ); + } + + copy(entrypoint, start); + if (existsSync(`${entrypoint}.map`)) { + copy(`${entrypoint}.map`, `${start}.map`); + } + + const relative_instrumentation = posixify(relative(dirname(entrypoint), instrumentation)); + const relative_start = posixify(relative(dirname(entrypoint), start)); + + const facade = + 'generateText' in module + ? module.generateText({ + instrumentation: relative_instrumentation, + start: relative_start + }) + : create_instrumentation_facade({ + instrumentation: relative_instrumentation, + start: relative_start, + exports: module.exports + }); + + rimraf(entrypoint); + write(entrypoint, facade); + } + }; +} + +/** + * @param {string} file + * @param {'gz' | 'br'} format + */ +async function compress_file(file, format = 'gz') { + const compress = + format == 'br' + ? zlib.createBrotliCompress({ + params: { + [zlib.constants.BROTLI_PARAM_MODE]: zlib.constants.BROTLI_MODE_TEXT, + [zlib.constants.BROTLI_PARAM_QUALITY]: zlib.constants.BROTLI_MAX_QUALITY, + [zlib.constants.BROTLI_PARAM_SIZE_HINT]: statSync(file).size + } + }) + : zlib.createGzip({ level: zlib.constants.Z_BEST_COMPRESSION }); + + const source = createReadStream(file); + const destination = createWriteStream(`${file}.${format}`); + + await pipe(source, compress, destination); +} + +/** + * Given a list of exports, generate a facade that: + * - Imports the instrumentation file + * - Imports `exports` from the entrypoint (dynamically, if `tla` is true) + * - Re-exports `exports` from the entrypoint + * + * `default` receives special treatment: It will be imported as `default` and exported with `export default`. + * + * @param {{ instrumentation: string; start: string; exports: string[] }} opts + * @returns {string} + */ +function create_instrumentation_facade({ instrumentation, start, exports }) { + const import_instrumentation = `import './${instrumentation}';`; + + let alias_index = 0; + const aliases = new Map(); + + for (const name of exports.filter((name) => reserved.has(name))) { + /* + * you can do evil things like `export { c as class }`. + * in order to import these, you need to alias them, and then un-alias them when re-exporting + * this map will allow us to generate the following: + * import { class as _1 } from 'entrypoint'; + * export { _1 as class }; + */ + let alias = `_${alias_index++}`; + while (exports.includes(alias)) { + alias = `_${alias_index++}`; + } + + aliases.set(name, alias); + } + + const import_statements = []; + const export_statements = []; + + for (const name of exports) { + const alias = aliases.get(name); + if (alias) { + import_statements.push(`${name}: ${alias}`); + export_statements.push(`${alias} as ${name}`); + } else { + import_statements.push(`${name}`); + export_statements.push(`${name}`); + } + } + + const entrypoint_facade = [ + `const { ${import_statements.join(', ')} } = await import('./${start}');`, + export_statements.length > 0 ? `export { ${export_statements.join(', ')} };` : '' + ] + .filter(Boolean) + .join('\n'); + + return `${import_instrumentation}\n${entrypoint_facade}`; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/adapt/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/adapt/index.js new file mode 100644 index 0000000000000000000000000000000000000000..48d14116369e86bc5ea84d6e2644b4a45e9a1391 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/adapt/index.js @@ -0,0 +1,44 @@ +import colors from 'kleur'; +import { create_builder } from './builder.js'; + +/** + * @param {import('types').ValidatedConfig} config + * @param {import('types').BuildData} build_data + * @param {import('types').ServerMetadata} server_metadata + * @param {import('types').Prerendered} prerendered + * @param {import('types').PrerenderMap} prerender_map + * @param {import('types').Logger} log + * @param {import('types').RemoteChunk[]} remotes + * @param {import('vite').ResolvedConfig} vite_config + */ +export async function adapt( + config, + build_data, + server_metadata, + prerendered, + prerender_map, + log, + remotes, + vite_config +) { + // This is only called when adapter is truthy, so the cast is safe + const { name, adapt } = /** @type {import('@sveltejs/kit').Adapter} */ (config.kit.adapter); + + console.log(colors.bold().cyan(`\n> Using ${name}`)); + + const builder = create_builder({ + config, + build_data, + server_metadata, + route_data: build_data.manifest_data.routes.filter((route) => route.page || route.endpoint), + prerendered, + prerender_map, + log, + remotes, + vite_config + }); + + await adapt(builder); + + log.success('done'); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/default-error.html b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/default-error.html new file mode 100644 index 0000000000000000000000000000000000000000..c322e1682478b1c60125f1cf29acc8e47a3043ee --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/default-error.html @@ -0,0 +1,80 @@ + + + + + %sveltekit.error.message% + + + + +
+ %sveltekit.status% +
+

%sveltekit.error.message%

+
+
+ + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/index.js new file mode 100644 index 0000000000000000000000000000000000000000..42146a89d4c3f77dc4b1334c638793141b62c15b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/index.js @@ -0,0 +1,175 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import * as url from 'node:url'; +import options from './options.js'; +import { resolve_entry } from '../../utils/filesystem.js'; + +/** + * Loads the template (src/app.html by default) and validates that it has the + * required content. + * @param {string} cwd + * @param {import('types').ValidatedConfig} config + */ +export function load_template(cwd, { kit }) { + const { env, files } = kit; + + const relative = path.relative(cwd, files.appTemplate); + + if (!fs.existsSync(files.appTemplate)) { + throw new Error(`${relative} does not exist`); + } + + const contents = fs.readFileSync(files.appTemplate, 'utf8'); + + const expected_tags = ['%sveltekit.head%', '%sveltekit.body%']; + expected_tags.forEach((tag) => { + if (contents.indexOf(tag) === -1) { + throw new Error(`${relative} is missing ${tag}`); + } + }); + + for (const match of contents.matchAll(/%sveltekit\.env\.([^%]+)%/g)) { + if (!match[1].startsWith(env.publicPrefix)) { + throw new Error( + `Environment variables in ${relative} must start with ${env.publicPrefix} (saw %sveltekit.env.${match[1]}%)` + ); + } + } + + return contents; +} + +/** + * Loads the error page (src/error.html by default) if it exists. + * Falls back to a generic error page content. + * @param {import('types').ValidatedConfig} config + */ +export function load_error_page(config) { + let { errorTemplate } = config.kit.files; + + // Don't do this inside resolving the config, because that would mean + // adding/removing error.html isn't detected and would require a restart. + if (!fs.existsSync(config.kit.files.errorTemplate)) { + errorTemplate = url.fileURLToPath(new URL('./default-error.html', import.meta.url)); + } + + return fs.readFileSync(errorTemplate, 'utf-8'); +} + +/** + * Loads and validates Svelte config file + * @param {{ cwd?: string }} options + * @returns {Promise} + */ +export async function load_config({ cwd = process.cwd() } = {}) { + const config_files = ['js', 'ts'] + .map((ext) => path.join(cwd, `svelte.config.${ext}`)) + .filter((f) => fs.existsSync(f)); + + if (config_files.length === 0) { + console.log( + `No Svelte config file found in ${cwd} - using SvelteKit's default configuration without an adapter.` + ); + return process_config({}, { cwd }); + } + const config_file = config_files[0]; + if (config_files.length > 1) { + console.log( + `Found multiple Svelte config files in ${cwd}: ${config_files.map((f) => path.basename(f)).join(', ')}. Using ${path.basename(config_file)}` + ); + } + const config = await import(`${url.pathToFileURL(config_file).href}?ts=${Date.now()}`); + + try { + return process_config(config.default, { cwd }); + } catch (e) { + const error = /** @type {Error} */ (e); + + // redact the stack trace — it's not helpful to users + error.stack = `Could not load ${config_file}: ${error.message}\n`; + throw error; + } +} + +/** + * @param {import('@sveltejs/kit').Config} config + * @returns {import('types').ValidatedConfig} + */ +function process_config(config, { cwd = process.cwd() } = {}) { + const validated = validate_config(config, cwd); + + validated.kit.outDir = path.resolve(cwd, validated.kit.outDir); + + for (const key in validated.kit.files) { + if (key === 'hooks') { + validated.kit.files.hooks.client = path.resolve(cwd, validated.kit.files.hooks.client); + validated.kit.files.hooks.server = path.resolve(cwd, validated.kit.files.hooks.server); + validated.kit.files.hooks.universal = path.resolve(cwd, validated.kit.files.hooks.universal); + } else { + // @ts-expect-error + validated.kit.files[key] = path.resolve(cwd, validated.kit.files[key]); + } + } + + return validated; +} + +/** + * @param {import('@sveltejs/kit').Config} config + * @param {string} [cwd] + * @returns {import('types').ValidatedConfig} + */ +export function validate_config(config, cwd = process.cwd()) { + if (typeof config !== 'object') { + throw new Error( + 'The Svelte config file must have a configuration object as its default export. See https://svelte.dev/docs/kit/configuration' + ); + } + + /** @type {import('types').ValidatedConfig} */ + const validated = options(config, 'config'); + const files = validated.kit.files; + + files.hooks.client ??= path.join(files.src, 'hooks.client'); + files.hooks.server ??= path.join(files.src, 'hooks.server'); + files.hooks.universal ??= path.join(files.src, 'hooks'); + files.lib ??= path.join(files.src, 'lib'); + files.params ??= path.join(files.src, 'params'); + files.routes ??= path.join(files.src, 'routes'); + files.serviceWorker ??= path.join(files.src, 'service-worker'); + files.appTemplate ??= path.join(files.src, 'app.html'); + files.errorTemplate ??= path.join(files.src, 'error.html'); + + if (validated.kit.router.resolution === 'server') { + if (validated.kit.router.type === 'hash') { + throw new Error( + "The `router.resolution` option cannot be 'server' if `router.type` is 'hash'" + ); + } + if (validated.kit.output.bundleStrategy !== 'split') { + throw new Error( + "The `router.resolution` option cannot be 'server' if `output.bundleStrategy` is 'inline' or 'single'" + ); + } + } + + if (validated.kit.csp?.directives?.['require-trusted-types-for']?.includes('script')) { + if (!validated.kit.csp?.directives?.['trusted-types']?.includes('svelte-trusted-html')) { + throw new Error( + "The `csp.directives['trusted-types']` option must include 'svelte-trusted-html'" + ); + } + if ( + validated.kit.serviceWorker?.register && + resolve_entry(path.resolve(cwd, validated.kit.files.serviceWorker)) && + !validated.kit.csp?.directives?.['trusted-types']?.includes('sveltekit-trusted-url') + ) { + throw new Error( + "The `csp.directives['trusted-types']` option must include 'sveltekit-trusted-url' when `serviceWorker.register` is true" + ); + } + } + + return validated; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/options.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/options.js new file mode 100644 index 0000000000000000000000000000000000000000..ac30ce4fbd94bbcca4a32e557bf76391924ba94c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/options.js @@ -0,0 +1,505 @@ +/** @import { Validator } from './types.js' */ + +import process from 'node:process'; +import colors from 'kleur'; +import { supportsTrustedTypes } from '../sync/utils.js'; + +const directives = object({ + 'child-src': string_array(), + 'default-src': string_array(), + 'frame-src': string_array(), + 'worker-src': string_array(), + 'connect-src': string_array(), + 'font-src': string_array(), + 'img-src': string_array(), + 'manifest-src': string_array(), + 'media-src': string_array(), + 'object-src': string_array(), + 'prefetch-src': string_array(), + 'script-src': string_array(), + 'script-src-elem': string_array(), + 'script-src-attr': string_array(), + 'style-src': string_array(), + 'style-src-elem': string_array(), + 'style-src-attr': string_array(), + 'base-uri': string_array(), + sandbox: string_array(), + 'form-action': string_array(), + 'frame-ancestors': string_array(), + 'navigate-to': string_array(), + 'report-uri': string_array(), + 'report-to': string_array(), + 'require-trusted-types-for': validate(undefined, (input, keypath) => { + assert_trusted_types_supported(keypath); + return string_array()(input, keypath); + }), + 'trusted-types': validate(undefined, (input, keypath) => { + assert_trusted_types_supported(keypath); + return string_array()(input, keypath); + }), + 'upgrade-insecure-requests': boolean(false), + 'require-sri-for': string_array(), + 'block-all-mixed-content': boolean(false), + 'plugin-types': string_array(), + referrer: string_array() +}); + +/** @type {Validator} */ +const options = object( + { + extensions: validate(['.svelte'], (input, keypath) => { + if (!Array.isArray(input) || !input.every((page) => typeof page === 'string')) { + throw new Error(`${keypath} must be an array of strings`); + } + + input.forEach((extension) => { + if (extension[0] !== '.') { + throw new Error(`Each member of ${keypath} must start with '.' — saw '${extension}'`); + } + + if (!/^(\.[a-z0-9]+)+$/i.test(extension)) { + throw new Error(`File extensions must be alphanumeric — saw '${extension}'`); + } + }); + + return input; + }), + + kit: object({ + adapter: validate(null, (input, keypath) => { + if (typeof input !== 'object' || !input.adapt) { + let message = `${keypath} should be an object with an "adapt" method`; + + if (Array.isArray(input) || typeof input === 'string') { + // for the early adapter adopters + message += ', rather than the name of an adapter'; + } + + throw new Error(`${message}. See https://svelte.dev/docs/kit/adapters`); + } + + return input; + }), + + alias: validate({}, (input, keypath) => { + if (typeof input !== 'object') { + throw new Error(`${keypath} should be an object`); + } + + for (const key in input) { + assert_string(input[key], `${keypath}.${key}`); + } + + return input; + }), + + appDir: validate('_app', (input, keypath) => { + assert_string(input, keypath); + + if (input) { + if (input.startsWith('/') || input.endsWith('/')) { + throw new Error( + "config.kit.appDir cannot start or end with '/'. See https://svelte.dev/docs/kit/configuration" + ); + } + } else { + throw new Error(`${keypath} cannot be empty`); + } + + return input; + }), + + csp: object({ + mode: list(['auto', 'hash', 'nonce']), + directives, + reportOnly: directives + }), + + csrf: object({ + checkOrigin: deprecate( + boolean(true), + (keypath) => + `\`${keypath}\` has been deprecated in favour of \`csrf.trustedOrigins\`. It will be removed in a future version` + ), + trustedOrigins: string_array([]) + }), + + embedded: boolean(false), + + env: object({ + dir: string(process.cwd()), + publicPrefix: string('PUBLIC_'), + privatePrefix: string('') + }), + + experimental: object({ + tracing: object({ + server: boolean(false) + }), + instrumentation: object({ + server: boolean(false) + }), + remoteFunctions: boolean(false), + forkPreloads: boolean(false), + handleRenderingErrors: boolean(false) + }), + + files: object({ + src: string('src'), + assets: string('static'), + hooks: object({ + client: string(null), + server: string(null), + universal: string(null) + }), + lib: string(null), + params: string(null), + routes: string(null), + serviceWorker: string(null), + appTemplate: string(null), + errorTemplate: string(null) + }), + + inlineStyleThreshold: number(0), + + moduleExtensions: string_array(['.js', '.ts']), + + outDir: string('.svelte-kit'), + + output: object({ + preloadStrategy: list(['modulepreload', 'preload-js', 'preload-mjs']), + bundleStrategy: list(['split', 'single', 'inline']) + }), + + paths: object({ + base: validate('', (input, keypath) => { + assert_string(input, keypath); + + if (input !== '' && (input.endsWith('/') || !input.startsWith('/'))) { + throw new Error( + `${keypath} option must either be the empty string or a root-relative path that starts but doesn't end with '/'. See https://svelte.dev/docs/kit/configuration#paths` + ); + } + + return input; + }), + assets: validate('', (input, keypath) => { + assert_string(input, keypath); + + if (input) { + if (!/^[a-z]+:\/\//.test(input)) { + throw new Error( + `${keypath} option must be an absolute path, if specified. See https://svelte.dev/docs/kit/configuration#paths` + ); + } + + if (input.endsWith('/')) { + throw new Error( + `${keypath} option must not end with '/'. See https://svelte.dev/docs/kit/configuration#paths` + ); + } + } + + return input; + }), + relative: boolean(true) + }), + + prerender: object({ + concurrency: number(1), + crawl: boolean(true), + entries: validate(['*'], (input, keypath) => { + if (!Array.isArray(input) || !input.every((page) => typeof page === 'string')) { + throw new Error(`${keypath} must be an array of strings`); + } + + input.forEach((page) => { + if (page !== '*' && page[0] !== '/') { + throw new Error( + `Each member of ${keypath} must be either '*' or an absolute path beginning with '/' — saw '${page}'` + ); + } + }); + + return input; + }), + + handleHttpError: validate( + (/** @type {any} */ { message }) => { + throw new Error( + message + + '\nTo suppress or handle this error, implement `handleHttpError` in https://svelte.dev/docs/kit/configuration#prerender' + ); + }, + (input, keypath) => { + if (typeof input === 'function') return input; + if (['fail', 'warn', 'ignore'].includes(input)) return input; + throw new Error(`${keypath} should be "fail", "warn", "ignore" or a custom function`); + } + ), + + handleMissingId: validate( + (/** @type {any} */ { message }) => { + throw new Error( + message + + '\nTo suppress or handle this error, implement `handleMissingId` in https://svelte.dev/docs/kit/configuration#prerender' + ); + }, + (input, keypath) => { + if (typeof input === 'function') return input; + if (['fail', 'warn', 'ignore'].includes(input)) return input; + throw new Error(`${keypath} should be "fail", "warn", "ignore" or a custom function`); + } + ), + + handleEntryGeneratorMismatch: validate( + (/** @type {any} */ { message }) => { + throw new Error( + message + + '\nTo suppress or handle this error, implement `handleEntryGeneratorMismatch` in https://svelte.dev/docs/kit/configuration#prerender' + ); + }, + (input, keypath) => { + if (typeof input === 'function') return input; + if (['fail', 'warn', 'ignore'].includes(input)) return input; + throw new Error(`${keypath} should be "fail", "warn", "ignore" or a custom function`); + } + ), + + handleUnseenRoutes: validate( + (/** @type {any} */ { message }) => { + throw new Error( + message + + '\nTo suppress or handle this error, implement `handleUnseenRoutes` in https://svelte.dev/docs/kit/configuration#prerender' + ); + }, + (input, keypath) => { + if (typeof input === 'function') return input; + if (['fail', 'warn', 'ignore'].includes(input)) return input; + throw new Error(`${keypath} should be "fail", "warn", "ignore" or a custom function`); + } + ), + + origin: validate('http://sveltekit-prerender', (input, keypath) => { + assert_string(input, keypath); + + let origin; + + try { + origin = new URL(input).origin; + } catch { + throw new Error(`${keypath} must be a valid origin`); + } + + if (input !== origin) { + throw new Error(`${keypath} must be a valid origin (${origin} rather than ${input})`); + } + + return origin; + }) + }), + + router: object({ + type: list(['pathname', 'hash']), + resolution: list(['client', 'server']) + }), + + serviceWorker: object({ + register: boolean(true), + // options could be undefined but if it is defined we only validate that + // it's an object since the type comes from the browser itself + options: validate(undefined, object({}, true)), + files: fun((filename) => !/\.DS_Store/.test(filename)) + }), + + typescript: object({ + config: fun((config) => config) + }), + + version: object({ + name: string(Date.now().toString()), + pollInterval: number(0) + }) + }) + }, + true +); + +/** + * @param {Validator} fn + * @param {(keypath: string) => string} get_message + * @returns {Validator} + */ +function deprecate( + fn, + get_message = (keypath) => + `The \`${keypath}\` option is deprecated, and will be removed in a future version` +) { + return (input, keypath) => { + if (input !== undefined) { + console.warn(colors.bold().yellow(get_message(keypath))); + } + + return fn(input, keypath); + }; +} + +/** + * @param {Record} children + * @param {boolean} [allow_unknown] + * @returns {Validator} + */ +function object(children, allow_unknown = false) { + return (input, keypath) => { + /** @type {Record} */ + const output = {}; + + if ((input && typeof input !== 'object') || Array.isArray(input)) { + throw new Error(`${keypath} should be an object`); + } + + for (const key in input) { + if (!(key in children)) { + if (allow_unknown) { + output[key] = input[key]; + } else { + let message = `Unexpected option ${keypath}.${key}`; + + // special case + if (keypath === 'config.kit' && key in options) { + message += ` (did you mean config.${key}?)`; + } + + throw new Error(message); + } + } + } + + for (const key in children) { + const validator = children[key]; + output[key] = validator(input && input[key], `${keypath}.${key}`); + } + + return output; + }; +} + +/** + * @param {any} fallback + * @param {(value: any, keypath: string) => any} fn + * @returns {Validator} + */ +function validate(fallback, fn) { + return (input, keypath) => { + return input === undefined ? fallback : fn(input, keypath); + }; +} + +/** + * @param {string | null} fallback + * @param {boolean} allow_empty + * @returns {Validator} + */ +function string(fallback, allow_empty = true) { + return validate(fallback, (input, keypath) => { + assert_string(input, keypath); + + if (!allow_empty && input === '') { + throw new Error(`${keypath} cannot be empty`); + } + + return input; + }); +} + +/** + * @param {string[] | undefined} [fallback] + * @returns {Validator} + */ +function string_array(fallback) { + return validate(fallback, (input, keypath) => { + if (!Array.isArray(input) || input.some((value) => typeof value !== 'string')) { + throw new Error(`${keypath} must be an array of strings, if specified`); + } + + return input; + }); +} + +/** + * @param {number} fallback + * @returns {Validator} + */ +function number(fallback) { + return validate(fallback, (input, keypath) => { + if (typeof input !== 'number') { + throw new Error(`${keypath} should be a number, if specified`); + } + return input; + }); +} + +/** + * @param {boolean} fallback + * @returns {Validator} + */ +function boolean(fallback) { + return validate(fallback, (input, keypath) => { + if (typeof input !== 'boolean') { + throw new Error(`${keypath} should be true or false, if specified`); + } + return input; + }); +} + +/** + * @param {string[]} options + * @returns {Validator} + */ +function list(options, fallback = options[0]) { + return validate(fallback, (input, keypath) => { + if (!options.includes(input)) { + // prettier-ignore + const msg = options.length > 2 + ? `${keypath} should be one of ${options.slice(0, -1).map(input => `"${input}"`).join(', ')} or "${options[options.length - 1]}"` + : `${keypath} should be either "${options[0]}" or "${options[1]}"`; + + throw new Error(msg); + } + return input; + }); +} + +/** + * @param {(...args: any) => any} fallback + * @returns {Validator} + */ +function fun(fallback) { + return validate(fallback, (input, keypath) => { + if (typeof input !== 'function') { + throw new Error(`${keypath} should be a function, if specified`); + } + return input; + }); +} + +/** + * @param {string} input + * @param {string} keypath + */ +function assert_string(input, keypath) { + if (typeof input !== 'string') { + throw new Error(`${keypath} should be a string, if specified`); + } +} + +/** @param {string} keypath */ +function assert_trusted_types_supported(keypath) { + if (!supportsTrustedTypes()) { + throw new Error( + `${keypath} is not supported by your version of Svelte. Please upgrade to Svelte 5.51.0 or later to use this directive.` + ); + } +} + +export default options; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/types.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..00d005c32886025342e9c4a486eeffbe2ff85550 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/config/types.d.ts @@ -0,0 +1 @@ +export type Validator = (input: T, keypath: string) => T; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/env.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/env.js new file mode 100644 index 0000000000000000000000000000000000000000..455eb0f44b68bda19e06a6e53461a2655fc02095 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/env.js @@ -0,0 +1,152 @@ +import { GENERATED_COMMENT } from '../constants.js'; +import { dedent } from './sync/utils.js'; +import { runtime_base } from './utils.js'; + +/** + * @typedef {'public' | 'private'} EnvType + */ + +/** + * @param {string} id + * @param {Record} env + * @returns {string} + */ +export function create_static_module(id, env) { + /** @type {string[]} */ + const declarations = []; + + for (const key in env) { + if (!valid_identifier.test(key) || reserved.has(key)) { + continue; + } + + const comment = `/** @type {import('${id}').${key}} */`; + const declaration = `export const ${key} = ${JSON.stringify(env[key])};`; + + declarations.push(`${comment}\n${declaration}`); + } + + return GENERATED_COMMENT + declarations.join('\n\n'); +} + +/** + * @param {EnvType} type + * @param {Record | undefined} dev_values If in a development mode, values to pre-populate the module with. + */ +export function create_dynamic_module(type, dev_values) { + if (dev_values) { + const keys = Object.entries(dev_values).map( + ([k, v]) => `${JSON.stringify(k)}: ${JSON.stringify(v)}` + ); + return `export const env = {\n${keys.join(',\n')}\n}`; + } + return `export { ${type}_env as env } from '${runtime_base}/shared-server.js';`; +} + +/** + * @param {EnvType} id + * @param {import('types').Env} env + * @returns {string} + */ +export function create_static_types(id, env) { + const declarations = Object.keys(env[id]) + .filter((k) => valid_identifier.test(k)) + .map((k) => `export const ${k}: string;`); + + return dedent` + declare module '$env/static/${id}' { + ${declarations.join('\n')} + } + `; +} + +/** + * @param {EnvType} id + * @param {import('types').Env} env + * @param {{ + * public_prefix: string; + * private_prefix: string; + * }} prefixes + * @returns {string} + */ +export function create_dynamic_types(id, env, { public_prefix, private_prefix }) { + const properties = Object.keys(env[id]) + .filter((k) => valid_identifier.test(k)) + .map((k) => `${k}: string;`); + + const public_prefixed = `[key: \`${public_prefix}\${string}\`]`; + const private_prefixed = `[key: \`${private_prefix}\${string}\`]`; + + if (id === 'private') { + if (public_prefix) { + properties.push(`${public_prefixed}: undefined;`); + } + properties.push(`${private_prefixed}: string | undefined;`); + } else { + if (private_prefix) { + properties.push(`${private_prefixed}: undefined;`); + } + properties.push(`${public_prefixed}: string | undefined;`); + } + + return dedent` + declare module '$env/dynamic/${id}' { + export const env: { + ${properties.join('\n')} + } + } + `; +} + +export const reserved = new Set([ + 'do', + 'if', + 'in', + 'for', + 'let', + 'new', + 'try', + 'var', + 'case', + 'else', + 'enum', + 'eval', + 'null', + 'this', + 'true', + 'void', + 'with', + 'await', + 'break', + 'catch', + 'class', + 'const', + 'false', + 'super', + 'throw', + 'while', + 'yield', + 'delete', + 'export', + 'import', + 'public', + 'return', + 'static', + 'switch', + 'typeof', + 'default', + 'extends', + 'finally', + 'package', + 'private', + 'continue', + 'debugger', + 'function', + 'arguments', + 'interface', + 'protected', + 'implements', + 'instanceof' +]); + +export const valid_identifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/generate_manifest/find_server_assets.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/generate_manifest/find_server_assets.js new file mode 100644 index 0000000000000000000000000000000000000000..044db841910701b9c0cfd9b445757a7e214c8f90 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/generate_manifest/find_server_assets.js @@ -0,0 +1,56 @@ +import { find_deps } from '../../exports/vite/build/utils.js'; + +/** + * Finds all the assets that are imported by server files associated with `routes` + * @param {import('types').BuildData} build_data + * @param {import('types').RouteData[]} routes + */ +export function find_server_assets(build_data, routes) { + /** + * All nodes actually used in the routes definition (prerendered routes are omitted). + * Root layout/error is always included as they are needed for 404 and root errors. + * @type {Set} + */ + const used_nodes = new Set([0, 1]); + + /** @type {Set} */ + const server_assets = new Set(); + + /** @param {string} id */ + function add_assets(id) { + if (id in build_data.server_manifest) { + const deps = find_deps(build_data.server_manifest, id, false); + for (const asset of deps.assets) { + server_assets.add(asset); + } + } + } + + for (const route of routes) { + if (route.page) { + for (const i of route.page.layouts) used_nodes.add(i); + for (const i of route.page.errors) used_nodes.add(i); + used_nodes.add(route.page.leaf); + } + + if (route.endpoint) { + add_assets(route.endpoint.file); + } + } + + for (const n of used_nodes) { + const node = build_data.manifest_data.nodes[n]; + if (node?.universal) add_assets(node.universal); + if (node?.server) add_assets(node.server); + } + + if (build_data.manifest_data.hooks.server) { + add_assets(build_data.manifest_data.hooks.server); + } + + if (build_data.manifest_data.hooks.universal) { + add_assets(build_data.manifest_data.hooks.universal); + } + + return Array.from(server_assets); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/generate_manifest/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/generate_manifest/index.js new file mode 100644 index 0000000000000000000000000000000000000000..6b2445aa2107986a231cf8a574d81b68bce26b73 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/generate_manifest/index.js @@ -0,0 +1,152 @@ +/** @import { RemoteChunk } from 'types' */ +import fs from 'node:fs'; +import path from 'node:path'; +import * as mime from 'mrmime'; +import { s } from '../../utils/misc.js'; +import { get_mime_lookup } from '../utils.js'; +import { resolve_symlinks } from '../../exports/vite/build/utils.js'; +import { compact } from '../../utils/array.js'; +import { join_relative } from '../../utils/filesystem.js'; +import { dedent } from '../sync/utils.js'; +import { find_server_assets } from './find_server_assets.js'; +import { uneval } from 'devalue'; + +/** + * Generates the data used to write the server-side manifest.js file. This data is used in the Vite + * build process, to power routing, etc. + * @param {{ + * build_data: import('types').BuildData; + * prerendered: string[]; + * relative_path: string; + * routes: import('types').RouteData[]; + * remotes: RemoteChunk[]; + * }} opts + */ +export function generate_manifest({ build_data, prerendered, relative_path, routes, remotes }) { + /** + * @type {Map} The new index of each node in the filtered nodes array + */ + const reindexed = new Map(); + /** + * All nodes actually used in the routes definition (prerendered routes are omitted). + * Root layout/error is always included as they are needed for 404 and root errors. + * @type {Set} + */ + const used_nodes = new Set([0, 1]); + + const server_assets = find_server_assets(build_data, routes); + + for (const route of routes) { + if (route.page) { + for (const i of route.page.layouts) used_nodes.add(i); + for (const i of route.page.errors) used_nodes.add(i); + used_nodes.add(route.page.leaf); + } + } + + const node_paths = compact( + build_data.manifest_data.nodes.map((_, i) => { + if (used_nodes.has(i)) { + reindexed.set(i, reindexed.size); + return join_relative(relative_path, `/nodes/${i}.js`); + } + }) + ); + + /** @type {(path: string) => string} */ + const loader = (path) => `__memo(() => import('${path}'))`; + + const assets = build_data.manifest_data.assets.map((asset) => asset.file); + if (build_data.service_worker) { + assets.push(build_data.service_worker); + } + + // In case of server-side route resolution, we need to include all matchers. Prerendered routes are not part + // of the server manifest, and they could reference matchers that then would not be included. + const matchers = new Set( + build_data.client?.nodes ? Object.keys(build_data.manifest_data.matchers) : undefined + ); + + /** @param {Array} indexes */ + function get_nodes(indexes) { + const string = indexes.map((n) => reindexed.get(n) ?? '').join(','); + + // since JavaScript ignores trailing commas, we need to insert a dummy + // comma so that the array has the correct length if the last item + // is undefined + return `[${string},]`; + } + + const mime_types = get_mime_lookup(build_data.manifest_data); + + /** @type {Record} */ + const files = {}; + for (const file of server_assets) { + files[file] = fs.statSync(path.resolve(build_data.out_dir, 'server', file)).size; + + const ext = path.extname(file); + mime_types[ext] ??= mime.lookup(ext) || ''; + } + + // prettier-ignore + // String representation of + /** @template {import('@sveltejs/kit').SSRManifest} T */ + const manifest_expr = dedent` + { + appDir: ${s(build_data.app_dir)}, + appPath: ${s(build_data.app_path)}, + assets: new Set(${s(assets)}), + mimeTypes: ${s(mime_types)}, + _: { + client: ${uneval(build_data.client)}, + nodes: [ + ${(node_paths).map(loader).join(',\n')} + ], + remotes: { + ${remotes.map((remote) => `'${remote.hash}': ${loader(join_relative(relative_path, `chunks/remote-${remote.hash}.js`))}`).join(',\n')} + }, + routes: [ + ${routes.map(route => { + if (!route.page && !route.endpoint) return; + + route.params.forEach(param => { + if (param.matcher) matchers.add(param.matcher); + }); + + return dedent` + { + id: ${s(route.id)}, + pattern: ${route.pattern}, + params: ${s(route.params)}, + page: ${route.page ? `{ layouts: ${get_nodes(route.page.layouts)}, errors: ${get_nodes(route.page.errors)}, leaf: ${reindexed.get(route.page.leaf)} }` : 'null'}, + endpoint: ${route.endpoint ? loader(join_relative(relative_path, resolve_symlinks(build_data.server_manifest, route.endpoint.file).chunk.file)) : 'null'} + } + `; + }).filter(Boolean).join(',\n')} + ], + prerendered_routes: new Set(${s(prerendered)}), + matchers: async () => { + ${Array.from( + matchers, + type => `const { match: ${type} } = await import ('${(join_relative(relative_path, `/entries/matchers/${type}.js`))}')` + ).join('\n')} + return { ${Array.from(matchers).join(', ')} }; + }, + server_assets: ${s(files)} + } + } + `; + + // Memoize the loaders to prevent Node from doing unnecessary work + // on every dynamic import call + return dedent` + (() => { + function __memo(fn) { + let value; + return () => value ??= (value = fn()); + } + + return ${manifest_expr} + })() + `; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js new file mode 100644 index 0000000000000000000000000000000000000000..2b967e555f2bb13111bba362efadc9fbf2f3692e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js @@ -0,0 +1,285 @@ +/** @import { RemoteChunk } from 'types' */ +import { join } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { validate_server_exports } from '../../utils/exports.js'; +import { load_config } from '../config/index.js'; +import { forked } from '../../utils/fork.js'; +import { installPolyfills } from '../../exports/node/polyfills.js'; +import { ENDPOINT_METHODS } from '../../constants.js'; +import { filter_env } from '../../utils/env.js'; +import { has_server_load, resolve_route } from '../../utils/routing.js'; +import { check_feature } from '../../utils/features.js'; +import { createReadableStream } from '@sveltejs/kit/node'; +import { PageNodes } from '../../utils/page_nodes.js'; +import { build_server_nodes } from '../../exports/vite/build/build_server.js'; + +export default forked(import.meta.url, analyse); + +/** + * @param {{ + * hash: boolean; + * manifest_path: string; + * manifest_data: import('types').ManifestData; + * server_manifest: import('vite').Manifest; + * tracked_features: Record; + * env: Record; + * out: string; + * output_config: import('types').RecursiveRequired; + * remotes: RemoteChunk[]; + * }} opts + */ +async function analyse({ + hash, + manifest_path, + manifest_data, + server_manifest, + tracked_features, + env, + out, + output_config, + remotes +}) { + /** @type {import('@sveltejs/kit').SSRManifest} */ + const manifest = (await import(pathToFileURL(manifest_path).href)).manifest; + + /** @type {import('types').ValidatedKitConfig} */ + const config = (await load_config()).kit; + + const server_root = join(config.outDir, 'output'); + + /** @type {import('types').ServerInternalModule} */ + const internal = await import(pathToFileURL(`${server_root}/server/internal.js`).href); + + installPolyfills(); + + // configure `import { building } from '$app/environment'` — + // essential we do this before analysing the code + internal.set_building(); + + // set env, `read`, and `manifest`, in case they're used in initialisation + const { publicPrefix: public_prefix, privatePrefix: private_prefix } = config.env; + const private_env = filter_env(env, private_prefix, public_prefix); + const public_env = filter_env(env, public_prefix, private_prefix); + internal.set_private_env(private_env); + internal.set_public_env(public_env); + internal.set_manifest(manifest); + internal.set_read_implementation((file) => createReadableStream(`${server_root}/server/${file}`)); + + // first, build server nodes without the client manifest so we can analyse it + build_server_nodes(out, config, manifest_data, server_manifest, null, null, null, output_config); + + /** @type {import('types').ServerMetadata} */ + const metadata = { + nodes: [], + routes: new Map(), + remotes: new Map() + }; + + const nodes = await Promise.all(manifest._.nodes.map((loader) => loader())); + + // analyse nodes + for (const node of nodes) { + if (hash && node.universal) { + const options = Object.keys(node.universal).filter((o) => o !== 'load'); + if (options.length > 0) { + throw new Error( + `Page options are ignored when \`router.type === 'hash'\` (${node.universal_id} has ${options + .filter((o) => o !== 'load') + .map((o) => `'${o}'`) + .join(', ')})` + ); + } + } + + metadata.nodes[node.index] = { + has_server_load: has_server_load(node), + has_universal_load: node.universal?.load !== undefined + }; + } + + // analyse routes + for (const route of manifest._.routes) { + const page = + route.page && + analyse_page( + route.page.layouts.map((n) => (n === undefined ? n : nodes[n])), + nodes[route.page.leaf] + ); + + const endpoint = route.endpoint && analyse_endpoint(route, await route.endpoint()); + + if (page?.prerender && endpoint?.prerender) { + throw new Error(`Cannot prerender a route with both +page and +server files (${route.id})`); + } + + if (page?.config && endpoint?.config) { + for (const key in { ...page.config, ...endpoint.config }) { + if (JSON.stringify(page.config[key]) !== JSON.stringify(endpoint.config[key])) { + throw new Error( + `Mismatched route config for ${route.id} — the +page and +server files must export the same config, if any` + ); + } + } + } + + const route_config = page?.config ?? endpoint?.config ?? {}; + const prerender = page?.prerender ?? endpoint?.prerender; + + if (prerender !== true) { + for (const feature of list_features( + route, + manifest_data, + server_manifest, + tracked_features + )) { + check_feature(route.id, route_config, feature, config.adapter); + } + } + + const page_methods = page?.methods ?? []; + const api_methods = endpoint?.methods ?? []; + const entries = page?.entries ?? endpoint?.entries; + + metadata.routes.set(route.id, { + config: route_config, + methods: Array.from(new Set([...page_methods, ...api_methods])), + page: { + methods: page_methods + }, + api: { + methods: api_methods + }, + prerender, + entries: + entries && (await entries()).map((entry_object) => resolve_route(route.id, entry_object)) + }); + } + + // analyse remotes + for (const remote of remotes) { + const loader = manifest._.remotes[remote.hash]; + const { default: functions } = await loader(); + + const exports = new Map(); + + for (const name in functions) { + const internals = /** @type {import('types').RemoteInternals} */ (functions[name].__); + const type = internals.type; + + exports.set(name, { + type, + dynamic: type !== 'prerender' || internals.dynamic + }); + } + + metadata.remotes.set(remote.hash, exports); + } + + return { metadata }; +} + +/** + * @param {import('types').SSRRoute} route + * @param {import('types').SSREndpoint} mod + */ +function analyse_endpoint(route, mod) { + validate_server_exports(mod, route.id); + + if (mod.prerender && (mod.POST || mod.PATCH || mod.PUT || mod.DELETE)) { + throw new Error( + `Cannot prerender a +server file with POST, PATCH, PUT, or DELETE (${route.id})` + ); + } + + /** @type {Array} */ + const methods = []; + + for (const method of /** @type {import('types').HttpMethod[]} */ (ENDPOINT_METHODS)) { + if (mod[method]) methods.push(method); + } + + if (mod.fallback) { + methods.push('*'); + } + + return { + config: mod.config, + entries: mod.entries, + methods, + prerender: mod.prerender ?? false + }; +} + +/** + * @param {Array} layouts + * @param {import('types').SSRNode} leaf + */ +function analyse_page(layouts, leaf) { + /** @type {Array<'GET' | 'POST'>} */ + const methods = ['GET']; + if (leaf.server?.actions) methods.push('POST'); + + const nodes = new PageNodes([...layouts, leaf]); + nodes.validate(); + + return { + config: nodes.get_config(), + entries: leaf.universal?.entries ?? leaf.server?.entries, + methods, + prerender: nodes.prerender() + }; +} + +/** + * @param {import('types').SSRRoute} route + * @param {import('types').ManifestData} manifest_data + * @param {import('vite').Manifest} server_manifest + * @param {Record} tracked_features + */ +function list_features(route, manifest_data, server_manifest, tracked_features) { + const features = new Set(); + + const route_data = /** @type {import('types').RouteData} */ ( + manifest_data.routes.find((r) => r.id === route.id) + ); + + const visited = new Set(); + /** @param {string} id */ + function visit(id) { + if (visited.has(id)) return; + visited.add(id); + + const chunk = server_manifest[id]; + if (!chunk) return; + + if (chunk.file in tracked_features) { + for (const feature of tracked_features[chunk.file]) { + features.add(feature); + } + } + + if (chunk.imports) { + for (const id of chunk.imports) { + visit(id); + } + } + } + + let page_node = route_data?.leaf; + while (page_node) { + if (page_node.server) visit(page_node.server); + page_node = page_node.parent ?? null; + } + + if (route_data.endpoint) { + visit(route_data.endpoint.file); + } + + if (manifest_data.hooks.server) { + // TODO if hooks.server.js imports `read`, it will be in the entry chunk + // we don't currently account for that case + visit(manifest_data.hooks.server); + } + + return Array.from(features); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/crawl.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/crawl.js new file mode 100644 index 0000000000000000000000000000000000000000..25134d1b4fe9b957eba9117a917d5033ff5841f7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/crawl.js @@ -0,0 +1,243 @@ +import { resolve, decode_uri } from '../../utils/url.js'; +import { decode } from './entities.js'; + +const DOCTYPE = 'DOCTYPE'; +const CDATA_OPEN = '[CDATA['; +const CDATA_CLOSE = ']]>'; +const COMMENT_OPEN = '--'; +const COMMENT_CLOSE = '-->'; + +const TAG_OPEN = /[a-zA-Z]/; +const TAG_CHAR = /[a-zA-Z0-9]/; +const ATTRIBUTE_NAME = /[^\t\n\f />"'=]/; + +const WHITESPACE = /[\s\n\r]/; + +const CRAWLABLE_META_NAME_ATTRS = new Set([ + 'og:url', + 'og:image', + 'og:image:url', + 'og:image:secure_url', + 'og:video', + 'og:video:url', + 'og:video:secure_url', + 'og:audio', + 'og:audio:url', + 'og:audio:secure_url', + 'twitter:image' +]); + +/** + * @param {string} html + * @param {string} base + */ +export function crawl(html, base) { + /** @type {string[]} */ + const ids = []; + + /** @type {string[]} */ + const hrefs = []; + + let i = 0; + main: while (i < html.length) { + const char = html[i]; + + if (char === '<') { + if (html[i + 1] === '!') { + i += 2; + + if (html.slice(i, i + DOCTYPE.length).toUpperCase() === DOCTYPE) { + i += DOCTYPE.length; + while (i < html.length) { + if (html[i++] === '>') { + continue main; + } + } + } + + // skip cdata + if (html.slice(i, i + CDATA_OPEN.length) === CDATA_OPEN) { + i += CDATA_OPEN.length; + while (i < html.length) { + if (html.slice(i, i + CDATA_CLOSE.length) === CDATA_CLOSE) { + i += CDATA_CLOSE.length; + continue main; + } + + i += 1; + } + } + + // skip comments + if (html.slice(i, i + COMMENT_OPEN.length) === COMMENT_OPEN) { + i += COMMENT_OPEN.length; + while (i < html.length) { + if (html.slice(i, i + COMMENT_CLOSE.length) === COMMENT_CLOSE) { + i += COMMENT_CLOSE.length; + continue main; + } + + i += 1; + } + } + } + + // parse opening tags + const start = ++i; + if (TAG_OPEN.test(html[start])) { + while (i < html.length) { + if (!TAG_CHAR.test(html[i])) { + break; + } + + i += 1; + } + + const tag = html.slice(start, i).toUpperCase(); + + /** @type {Record} */ + const attributes = {}; + + if (tag === 'SCRIPT' || tag === 'STYLE') { + while (i < html.length) { + if ( + html[i] === '<' && + html[i + 1] === '/' && + html.slice(i + 2, i + 2 + tag.length).toUpperCase() === tag + ) { + continue main; + } + + i += 1; + } + } + + while (i < html.length) { + const start = i; + + const char = html[start]; + if (char === '>') break; + + if (ATTRIBUTE_NAME.test(char)) { + i += 1; + + while (i < html.length) { + if (!ATTRIBUTE_NAME.test(html[i])) { + break; + } + + i += 1; + } + + const name = html.slice(start, i).toLowerCase(); + + while (WHITESPACE.test(html[i])) i += 1; + + if (html[i] === '=') { + i += 1; + while (WHITESPACE.test(html[i])) i += 1; + + let value; + + if (html[i] === "'" || html[i] === '"') { + const quote = html[i++]; + + const start = i; + let escaped = false; + + while (i < html.length) { + if (escaped) { + escaped = false; + } else { + const char = html[i]; + + if (html[i] === quote) { + break; + } + + if (char === '\\') { + escaped = true; + } + } + + i += 1; + } + + value = html.slice(start, i); + } else { + const start = i; + while (html[i] !== '>' && !WHITESPACE.test(html[i])) i += 1; + value = html.slice(start, i); + + i -= 1; + } + + value = decode(value); + attributes[name] = value; + } else { + i -= 1; + } + } + + i += 1; + } + + const { href, id, name, property, rel, src, srcset, content } = attributes; + + if (href) { + if (tag === 'BASE') { + base = resolve(base, href); + } else if (!rel || !/\bexternal\b/i.test(rel)) { + hrefs.push(resolve(base, href)); + } + } + + if (id) { + ids.push(decode_uri(id)); + } + + if (name && tag === 'A') { + ids.push(decode_uri(name)); + } + + if (src) { + hrefs.push(resolve(base, src)); + } + + if (srcset) { + let value = srcset; + const candidates = []; + let insideURL = true; + value = value.trim(); + for (let i = 0; i < value.length; i++) { + if (value[i] === ',' && (!insideURL || (insideURL && WHITESPACE.test(value[i + 1])))) { + candidates.push(value.slice(0, i)); + value = value.substring(i + 1).trim(); + i = 0; + insideURL = true; + } else if (WHITESPACE.test(value[i])) { + insideURL = false; + } + } + candidates.push(value); + for (const candidate of candidates) { + const src = candidate.split(WHITESPACE)[0]; + if (src) hrefs.push(resolve(base, src)); + } + } + + if (tag === 'META' && content) { + const attr = name ?? property; + + if (attr && CRAWLABLE_META_NAME_ATTRS.has(attr)) { + hrefs.push(resolve(base, content)); + } + } + } + } + + i += 1; + } + + return { ids, hrefs }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/entities.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/entities.js new file mode 100644 index 0000000000000000000000000000000000000000..91888a95b73ee9d1bbe9ff32fab8ceac480ae7ed --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/entities.js @@ -0,0 +1,2252 @@ +/** + * A list of all named HTML entities, from https://html.spec.whatwg.org/multipage/named-characters.html + * @type {Record} + */ +const entities = { + AElig: 'Æ', + 'AElig;': 'Æ', + AMP: '&', + 'AMP;': '&', + Aacute: 'Á', + 'Aacute;': 'Á', + 'Abreve;': 'Ă', + Acirc: 'Â', + 'Acirc;': 'Â', + 'Acy;': 'А', + 'Afr;': '𝔄', + Agrave: 'À', + 'Agrave;': 'À', + 'Alpha;': 'Α', + 'Amacr;': 'Ā', + 'And;': '⩓', + 'Aogon;': 'Ą', + 'Aopf;': '𝔸', + 'ApplyFunction;': '⁡', + Aring: 'Å', + 'Aring;': 'Å', + 'Ascr;': '𝒜', + 'Assign;': '≔', + Atilde: 'Ã', + 'Atilde;': 'Ã', + Auml: 'Ä', + 'Auml;': 'Ä', + 'Backslash;': '∖', + 'Barv;': '⫧', + 'Barwed;': '⌆', + 'Bcy;': 'Б', + 'Because;': '∵', + 'Bernoullis;': 'ℬ', + 'Beta;': 'Β', + 'Bfr;': '𝔅', + 'Bopf;': '𝔹', + 'Breve;': '˘', + 'Bscr;': 'ℬ', + 'Bumpeq;': '≎', + 'CHcy;': 'Ч', + COPY: '©', + 'COPY;': '©', + 'Cacute;': 'Ć', + 'Cap;': '⋒', + 'CapitalDifferentialD;': 'ⅅ', + 'Cayleys;': 'ℭ', + 'Ccaron;': 'Č', + Ccedil: 'Ç', + 'Ccedil;': 'Ç', + 'Ccirc;': 'Ĉ', + 'Cconint;': '∰', + 'Cdot;': 'Ċ', + 'Cedilla;': '¸', + 'CenterDot;': '·', + 'Cfr;': 'ℭ', + 'Chi;': 'Χ', + 'CircleDot;': '⊙', + 'CircleMinus;': '⊖', + 'CirclePlus;': '⊕', + 'CircleTimes;': '⊗', + 'ClockwiseContourIntegral;': '∲', + 'CloseCurlyDoubleQuote;': '”', + 'CloseCurlyQuote;': '’', + 'Colon;': '∷', + 'Colone;': '⩴', + 'Congruent;': '≡', + 'Conint;': '∯', + 'ContourIntegral;': '∮', + 'Copf;': 'ℂ', + 'Coproduct;': '∐', + 'CounterClockwiseContourIntegral;': '∳', + 'Cross;': '⨯', + 'Cscr;': '𝒞', + 'Cup;': '⋓', + 'CupCap;': '≍', + 'DD;': 'ⅅ', + 'DDotrahd;': '⤑', + 'DJcy;': 'Ђ', + 'DScy;': 'Ѕ', + 'DZcy;': 'Џ', + 'Dagger;': '‡', + 'Darr;': '↡', + 'Dashv;': '⫤', + 'Dcaron;': 'Ď', + 'Dcy;': 'Д', + 'Del;': '∇', + 'Delta;': 'Δ', + 'Dfr;': '𝔇', + 'DiacriticalAcute;': '´', + 'DiacriticalDot;': '˙', + 'DiacriticalDoubleAcute;': '˝', + 'DiacriticalGrave;': '`', + 'DiacriticalTilde;': '˜', + 'Diamond;': '⋄', + 'DifferentialD;': 'ⅆ', + 'Dopf;': '𝔻', + 'Dot;': '¨', + 'DotDot;': '⃜', + 'DotEqual;': '≐', + 'DoubleContourIntegral;': '∯', + 'DoubleDot;': '¨', + 'DoubleDownArrow;': '⇓', + 'DoubleLeftArrow;': '⇐', + 'DoubleLeftRightArrow;': '⇔', + 'DoubleLeftTee;': '⫤', + 'DoubleLongLeftArrow;': '⟸', + 'DoubleLongLeftRightArrow;': '⟺', + 'DoubleLongRightArrow;': '⟹', + 'DoubleRightArrow;': '⇒', + 'DoubleRightTee;': '⊨', + 'DoubleUpArrow;': '⇑', + 'DoubleUpDownArrow;': '⇕', + 'DoubleVerticalBar;': '∥', + 'DownArrow;': '↓', + 'DownArrowBar;': '⤓', + 'DownArrowUpArrow;': '⇵', + 'DownBreve;': '̑', + 'DownLeftRightVector;': '⥐', + 'DownLeftTeeVector;': '⥞', + 'DownLeftVector;': '↽', + 'DownLeftVectorBar;': '⥖', + 'DownRightTeeVector;': '⥟', + 'DownRightVector;': '⇁', + 'DownRightVectorBar;': '⥗', + 'DownTee;': '⊤', + 'DownTeeArrow;': '↧', + 'Downarrow;': '⇓', + 'Dscr;': '𝒟', + 'Dstrok;': 'Đ', + 'ENG;': 'Ŋ', + ETH: 'Ð', + 'ETH;': 'Ð', + Eacute: 'É', + 'Eacute;': 'É', + 'Ecaron;': 'Ě', + Ecirc: 'Ê', + 'Ecirc;': 'Ê', + 'Ecy;': 'Э', + 'Edot;': 'Ė', + 'Efr;': '𝔈', + Egrave: 'È', + 'Egrave;': 'È', + 'Element;': '∈', + 'Emacr;': 'Ē', + 'EmptySmallSquare;': '◻', + 'EmptyVerySmallSquare;': '▫', + 'Eogon;': 'Ę', + 'Eopf;': '𝔼', + 'Epsilon;': 'Ε', + 'Equal;': '⩵', + 'EqualTilde;': '≂', + 'Equilibrium;': '⇌', + 'Escr;': 'ℰ', + 'Esim;': '⩳', + 'Eta;': 'Η', + Euml: 'Ë', + 'Euml;': 'Ë', + 'Exists;': '∃', + 'ExponentialE;': 'ⅇ', + 'Fcy;': 'Ф', + 'Ffr;': '𝔉', + 'FilledSmallSquare;': '◼', + 'FilledVerySmallSquare;': '▪', + 'Fopf;': '𝔽', + 'ForAll;': '∀', + 'Fouriertrf;': 'ℱ', + 'Fscr;': 'ℱ', + 'GJcy;': 'Ѓ', + GT: '>', + 'GT;': '>', + 'Gamma;': 'Γ', + 'Gammad;': 'Ϝ', + 'Gbreve;': 'Ğ', + 'Gcedil;': 'Ģ', + 'Gcirc;': 'Ĝ', + 'Gcy;': 'Г', + 'Gdot;': 'Ġ', + 'Gfr;': '𝔊', + 'Gg;': '⋙', + 'Gopf;': '𝔾', + 'GreaterEqual;': '≥', + 'GreaterEqualLess;': '⋛', + 'GreaterFullEqual;': '≧', + 'GreaterGreater;': '⪢', + 'GreaterLess;': '≷', + 'GreaterSlantEqual;': '⩾', + 'GreaterTilde;': '≳', + 'Gscr;': '𝒢', + 'Gt;': '≫', + 'HARDcy;': 'Ъ', + 'Hacek;': 'ˇ', + 'Hat;': '^', + 'Hcirc;': 'Ĥ', + 'Hfr;': 'ℌ', + 'HilbertSpace;': 'ℋ', + 'Hopf;': 'ℍ', + 'HorizontalLine;': '─', + 'Hscr;': 'ℋ', + 'Hstrok;': 'Ħ', + 'HumpDownHump;': '≎', + 'HumpEqual;': '≏', + 'IEcy;': 'Е', + 'IJlig;': 'IJ', + 'IOcy;': 'Ё', + Iacute: 'Í', + 'Iacute;': 'Í', + Icirc: 'Î', + 'Icirc;': 'Î', + 'Icy;': 'И', + 'Idot;': 'İ', + 'Ifr;': 'ℑ', + Igrave: 'Ì', + 'Igrave;': 'Ì', + 'Im;': 'ℑ', + 'Imacr;': 'Ī', + 'ImaginaryI;': 'ⅈ', + 'Implies;': '⇒', + 'Int;': '∬', + 'Integral;': '∫', + 'Intersection;': '⋂', + 'InvisibleComma;': '⁣', + 'InvisibleTimes;': '⁢', + 'Iogon;': 'Į', + 'Iopf;': '𝕀', + 'Iota;': 'Ι', + 'Iscr;': 'ℐ', + 'Itilde;': 'Ĩ', + 'Iukcy;': 'І', + Iuml: 'Ï', + 'Iuml;': 'Ï', + 'Jcirc;': 'Ĵ', + 'Jcy;': 'Й', + 'Jfr;': '𝔍', + 'Jopf;': '𝕁', + 'Jscr;': '𝒥', + 'Jsercy;': 'Ј', + 'Jukcy;': 'Є', + 'KHcy;': 'Х', + 'KJcy;': 'Ќ', + 'Kappa;': 'Κ', + 'Kcedil;': 'Ķ', + 'Kcy;': 'К', + 'Kfr;': '𝔎', + 'Kopf;': '𝕂', + 'Kscr;': '𝒦', + 'LJcy;': 'Љ', + LT: '<', + 'LT;': '<', + 'Lacute;': 'Ĺ', + 'Lambda;': 'Λ', + 'Lang;': '⟪', + 'Laplacetrf;': 'ℒ', + 'Larr;': '↞', + 'Lcaron;': 'Ľ', + 'Lcedil;': 'Ļ', + 'Lcy;': 'Л', + 'LeftAngleBracket;': '⟨', + 'LeftArrow;': '←', + 'LeftArrowBar;': '⇤', + 'LeftArrowRightArrow;': '⇆', + 'LeftCeiling;': '⌈', + 'LeftDoubleBracket;': '⟦', + 'LeftDownTeeVector;': '⥡', + 'LeftDownVector;': '⇃', + 'LeftDownVectorBar;': '⥙', + 'LeftFloor;': '⌊', + 'LeftRightArrow;': '↔', + 'LeftRightVector;': '⥎', + 'LeftTee;': '⊣', + 'LeftTeeArrow;': '↤', + 'LeftTeeVector;': '⥚', + 'LeftTriangle;': '⊲', + 'LeftTriangleBar;': '⧏', + 'LeftTriangleEqual;': '⊴', + 'LeftUpDownVector;': '⥑', + 'LeftUpTeeVector;': '⥠', + 'LeftUpVector;': '↿', + 'LeftUpVectorBar;': '⥘', + 'LeftVector;': '↼', + 'LeftVectorBar;': '⥒', + 'Leftarrow;': '⇐', + 'Leftrightarrow;': '⇔', + 'LessEqualGreater;': '⋚', + 'LessFullEqual;': '≦', + 'LessGreater;': '≶', + 'LessLess;': '⪡', + 'LessSlantEqual;': '⩽', + 'LessTilde;': '≲', + 'Lfr;': '𝔏', + 'Ll;': '⋘', + 'Lleftarrow;': '⇚', + 'Lmidot;': 'Ŀ', + 'LongLeftArrow;': '⟵', + 'LongLeftRightArrow;': '⟷', + 'LongRightArrow;': '⟶', + 'Longleftarrow;': '⟸', + 'Longleftrightarrow;': '⟺', + 'Longrightarrow;': '⟹', + 'Lopf;': '𝕃', + 'LowerLeftArrow;': '↙', + 'LowerRightArrow;': '↘', + 'Lscr;': 'ℒ', + 'Lsh;': '↰', + 'Lstrok;': 'Ł', + 'Lt;': '≪', + 'Map;': '⤅', + 'Mcy;': 'М', + 'MediumSpace;': ' ', + 'Mellintrf;': 'ℳ', + 'Mfr;': '𝔐', + 'MinusPlus;': '∓', + 'Mopf;': '𝕄', + 'Mscr;': 'ℳ', + 'Mu;': 'Μ', + 'NJcy;': 'Њ', + 'Nacute;': 'Ń', + 'Ncaron;': 'Ň', + 'Ncedil;': 'Ņ', + 'Ncy;': 'Н', + 'NegativeMediumSpace;': '​', + 'NegativeThickSpace;': '​', + 'NegativeThinSpace;': '​', + 'NegativeVeryThinSpace;': '​', + 'NestedGreaterGreater;': '≫', + 'NestedLessLess;': '≪', + 'NewLine;': '\n', + 'Nfr;': '𝔑', + 'NoBreak;': '⁠', + 'NonBreakingSpace;': ' ', + 'Nopf;': 'ℕ', + 'Not;': '⫬', + 'NotCongruent;': '≢', + 'NotCupCap;': '≭', + 'NotDoubleVerticalBar;': '∦', + 'NotElement;': '∉', + 'NotEqual;': '≠', + 'NotEqualTilde;': '≂̸', + 'NotExists;': '∄', + 'NotGreater;': '≯', + 'NotGreaterEqual;': '≱', + 'NotGreaterFullEqual;': '≧̸', + 'NotGreaterGreater;': '≫̸', + 'NotGreaterLess;': '≹', + 'NotGreaterSlantEqual;': '⩾̸', + 'NotGreaterTilde;': '≵', + 'NotHumpDownHump;': '≎̸', + 'NotHumpEqual;': '≏̸', + 'NotLeftTriangle;': '⋪', + 'NotLeftTriangleBar;': '⧏̸', + 'NotLeftTriangleEqual;': '⋬', + 'NotLess;': '≮', + 'NotLessEqual;': '≰', + 'NotLessGreater;': '≸', + 'NotLessLess;': '≪̸', + 'NotLessSlantEqual;': '⩽̸', + 'NotLessTilde;': '≴', + 'NotNestedGreaterGreater;': '⪢̸', + 'NotNestedLessLess;': '⪡̸', + 'NotPrecedes;': '⊀', + 'NotPrecedesEqual;': '⪯̸', + 'NotPrecedesSlantEqual;': '⋠', + 'NotReverseElement;': '∌', + 'NotRightTriangle;': '⋫', + 'NotRightTriangleBar;': '⧐̸', + 'NotRightTriangleEqual;': '⋭', + 'NotSquareSubset;': '⊏̸', + 'NotSquareSubsetEqual;': '⋢', + 'NotSquareSuperset;': '⊐̸', + 'NotSquareSupersetEqual;': '⋣', + 'NotSubset;': '⊂⃒', + 'NotSubsetEqual;': '⊈', + 'NotSucceeds;': '⊁', + 'NotSucceedsEqual;': '⪰̸', + 'NotSucceedsSlantEqual;': '⋡', + 'NotSucceedsTilde;': '≿̸', + 'NotSuperset;': '⊃⃒', + 'NotSupersetEqual;': '⊉', + 'NotTilde;': '≁', + 'NotTildeEqual;': '≄', + 'NotTildeFullEqual;': '≇', + 'NotTildeTilde;': '≉', + 'NotVerticalBar;': '∤', + 'Nscr;': '𝒩', + Ntilde: 'Ñ', + 'Ntilde;': 'Ñ', + 'Nu;': 'Ν', + 'OElig;': 'Œ', + Oacute: 'Ó', + 'Oacute;': 'Ó', + Ocirc: 'Ô', + 'Ocirc;': 'Ô', + 'Ocy;': 'О', + 'Odblac;': 'Ő', + 'Ofr;': '𝔒', + Ograve: 'Ò', + 'Ograve;': 'Ò', + 'Omacr;': 'Ō', + 'Omega;': 'Ω', + 'Omicron;': 'Ο', + 'Oopf;': '𝕆', + 'OpenCurlyDoubleQuote;': '“', + 'OpenCurlyQuote;': '‘', + 'Or;': '⩔', + 'Oscr;': '𝒪', + Oslash: 'Ø', + 'Oslash;': 'Ø', + Otilde: 'Õ', + 'Otilde;': 'Õ', + 'Otimes;': '⨷', + Ouml: 'Ö', + 'Ouml;': 'Ö', + 'OverBar;': '‾', + 'OverBrace;': '⏞', + 'OverBracket;': '⎴', + 'OverParenthesis;': '⏜', + 'PartialD;': '∂', + 'Pcy;': 'П', + 'Pfr;': '𝔓', + 'Phi;': 'Φ', + 'Pi;': 'Π', + 'PlusMinus;': '±', + 'Poincareplane;': 'ℌ', + 'Popf;': 'ℙ', + 'Pr;': '⪻', + 'Precedes;': '≺', + 'PrecedesEqual;': '⪯', + 'PrecedesSlantEqual;': '≼', + 'PrecedesTilde;': '≾', + 'Prime;': '″', + 'Product;': '∏', + 'Proportion;': '∷', + 'Proportional;': '∝', + 'Pscr;': '𝒫', + 'Psi;': 'Ψ', + QUOT: '"', + 'QUOT;': '"', + 'Qfr;': '𝔔', + 'Qopf;': 'ℚ', + 'Qscr;': '𝒬', + 'RBarr;': '⤐', + REG: '®', + 'REG;': '®', + 'Racute;': 'Ŕ', + 'Rang;': '⟫', + 'Rarr;': '↠', + 'Rarrtl;': '⤖', + 'Rcaron;': 'Ř', + 'Rcedil;': 'Ŗ', + 'Rcy;': 'Р', + 'Re;': 'ℜ', + 'ReverseElement;': '∋', + 'ReverseEquilibrium;': '⇋', + 'ReverseUpEquilibrium;': '⥯', + 'Rfr;': 'ℜ', + 'Rho;': 'Ρ', + 'RightAngleBracket;': '⟩', + 'RightArrow;': '→', + 'RightArrowBar;': '⇥', + 'RightArrowLeftArrow;': '⇄', + 'RightCeiling;': '⌉', + 'RightDoubleBracket;': '⟧', + 'RightDownTeeVector;': '⥝', + 'RightDownVector;': '⇂', + 'RightDownVectorBar;': '⥕', + 'RightFloor;': '⌋', + 'RightTee;': '⊢', + 'RightTeeArrow;': '↦', + 'RightTeeVector;': '⥛', + 'RightTriangle;': '⊳', + 'RightTriangleBar;': '⧐', + 'RightTriangleEqual;': '⊵', + 'RightUpDownVector;': '⥏', + 'RightUpTeeVector;': '⥜', + 'RightUpVector;': '↾', + 'RightUpVectorBar;': '⥔', + 'RightVector;': '⇀', + 'RightVectorBar;': '⥓', + 'Rightarrow;': '⇒', + 'Ropf;': 'ℝ', + 'RoundImplies;': '⥰', + 'Rrightarrow;': '⇛', + 'Rscr;': 'ℛ', + 'Rsh;': '↱', + 'RuleDelayed;': '⧴', + 'SHCHcy;': 'Щ', + 'SHcy;': 'Ш', + 'SOFTcy;': 'Ь', + 'Sacute;': 'Ś', + 'Sc;': '⪼', + 'Scaron;': 'Š', + 'Scedil;': 'Ş', + 'Scirc;': 'Ŝ', + 'Scy;': 'С', + 'Sfr;': '𝔖', + 'ShortDownArrow;': '↓', + 'ShortLeftArrow;': '←', + 'ShortRightArrow;': '→', + 'ShortUpArrow;': '↑', + 'Sigma;': 'Σ', + 'SmallCircle;': '∘', + 'Sopf;': '𝕊', + 'Sqrt;': '√', + 'Square;': '□', + 'SquareIntersection;': '⊓', + 'SquareSubset;': '⊏', + 'SquareSubsetEqual;': '⊑', + 'SquareSuperset;': '⊐', + 'SquareSupersetEqual;': '⊒', + 'SquareUnion;': '⊔', + 'Sscr;': '𝒮', + 'Star;': '⋆', + 'Sub;': '⋐', + 'Subset;': '⋐', + 'SubsetEqual;': '⊆', + 'Succeeds;': '≻', + 'SucceedsEqual;': '⪰', + 'SucceedsSlantEqual;': '≽', + 'SucceedsTilde;': '≿', + 'SuchThat;': '∋', + 'Sum;': '∑', + 'Sup;': '⋑', + 'Superset;': '⊃', + 'SupersetEqual;': '⊇', + 'Supset;': '⋑', + THORN: 'Þ', + 'THORN;': 'Þ', + 'TRADE;': '™', + 'TSHcy;': 'Ћ', + 'TScy;': 'Ц', + 'Tab;': '\t', + 'Tau;': 'Τ', + 'Tcaron;': 'Ť', + 'Tcedil;': 'Ţ', + 'Tcy;': 'Т', + 'Tfr;': '𝔗', + 'Therefore;': '∴', + 'Theta;': 'Θ', + 'ThickSpace;': '  ', + 'ThinSpace;': ' ', + 'Tilde;': '∼', + 'TildeEqual;': '≃', + 'TildeFullEqual;': '≅', + 'TildeTilde;': '≈', + 'Topf;': '𝕋', + 'TripleDot;': '⃛', + 'Tscr;': '𝒯', + 'Tstrok;': 'Ŧ', + Uacute: 'Ú', + 'Uacute;': 'Ú', + 'Uarr;': '↟', + 'Uarrocir;': '⥉', + 'Ubrcy;': 'Ў', + 'Ubreve;': 'Ŭ', + Ucirc: 'Û', + 'Ucirc;': 'Û', + 'Ucy;': 'У', + 'Udblac;': 'Ű', + 'Ufr;': '𝔘', + Ugrave: 'Ù', + 'Ugrave;': 'Ù', + 'Umacr;': 'Ū', + 'UnderBar;': '_', + 'UnderBrace;': '⏟', + 'UnderBracket;': '⎵', + 'UnderParenthesis;': '⏝', + 'Union;': '⋃', + 'UnionPlus;': '⊎', + 'Uogon;': 'Ų', + 'Uopf;': '𝕌', + 'UpArrow;': '↑', + 'UpArrowBar;': '⤒', + 'UpArrowDownArrow;': '⇅', + 'UpDownArrow;': '↕', + 'UpEquilibrium;': '⥮', + 'UpTee;': '⊥', + 'UpTeeArrow;': '↥', + 'Uparrow;': '⇑', + 'Updownarrow;': '⇕', + 'UpperLeftArrow;': '↖', + 'UpperRightArrow;': '↗', + 'Upsi;': 'ϒ', + 'Upsilon;': 'Υ', + 'Uring;': 'Ů', + 'Uscr;': '𝒰', + 'Utilde;': 'Ũ', + Uuml: 'Ü', + 'Uuml;': 'Ü', + 'VDash;': '⊫', + 'Vbar;': '⫫', + 'Vcy;': 'В', + 'Vdash;': '⊩', + 'Vdashl;': '⫦', + 'Vee;': '⋁', + 'Verbar;': '‖', + 'Vert;': '‖', + 'VerticalBar;': '∣', + 'VerticalLine;': '|', + 'VerticalSeparator;': '❘', + 'VerticalTilde;': '≀', + 'VeryThinSpace;': ' ', + 'Vfr;': '𝔙', + 'Vopf;': '𝕍', + 'Vscr;': '𝒱', + 'Vvdash;': '⊪', + 'Wcirc;': 'Ŵ', + 'Wedge;': '⋀', + 'Wfr;': '𝔚', + 'Wopf;': '𝕎', + 'Wscr;': '𝒲', + 'Xfr;': '𝔛', + 'Xi;': 'Ξ', + 'Xopf;': '𝕏', + 'Xscr;': '𝒳', + 'YAcy;': 'Я', + 'YIcy;': 'Ї', + 'YUcy;': 'Ю', + Yacute: 'Ý', + 'Yacute;': 'Ý', + 'Ycirc;': 'Ŷ', + 'Ycy;': 'Ы', + 'Yfr;': '𝔜', + 'Yopf;': '𝕐', + 'Yscr;': '𝒴', + 'Yuml;': 'Ÿ', + 'ZHcy;': 'Ж', + 'Zacute;': 'Ź', + 'Zcaron;': 'Ž', + 'Zcy;': 'З', + 'Zdot;': 'Ż', + 'ZeroWidthSpace;': '​', + 'Zeta;': 'Ζ', + 'Zfr;': 'ℨ', + 'Zopf;': 'ℤ', + 'Zscr;': '𝒵', + aacute: 'á', + 'aacute;': 'á', + 'abreve;': 'ă', + 'ac;': '∾', + 'acE;': '∾̳', + 'acd;': '∿', + acirc: 'â', + 'acirc;': 'â', + acute: '´', + 'acute;': '´', + 'acy;': 'а', + aelig: 'æ', + 'aelig;': 'æ', + 'af;': '⁡', + 'afr;': '𝔞', + agrave: 'à', + 'agrave;': 'à', + 'alefsym;': 'ℵ', + 'aleph;': 'ℵ', + 'alpha;': 'α', + 'amacr;': 'ā', + 'amalg;': '⨿', + amp: '&', + 'amp;': '&', + 'and;': '∧', + 'andand;': '⩕', + 'andd;': '⩜', + 'andslope;': '⩘', + 'andv;': '⩚', + 'ang;': '∠', + 'ange;': '⦤', + 'angle;': '∠', + 'angmsd;': '∡', + 'angmsdaa;': '⦨', + 'angmsdab;': '⦩', + 'angmsdac;': '⦪', + 'angmsdad;': '⦫', + 'angmsdae;': '⦬', + 'angmsdaf;': '⦭', + 'angmsdag;': '⦮', + 'angmsdah;': '⦯', + 'angrt;': '∟', + 'angrtvb;': '⊾', + 'angrtvbd;': '⦝', + 'angsph;': '∢', + 'angst;': 'Å', + 'angzarr;': '⍼', + 'aogon;': 'ą', + 'aopf;': '𝕒', + 'ap;': '≈', + 'apE;': '⩰', + 'apacir;': '⩯', + 'ape;': '≊', + 'apid;': '≋', + 'apos;': "'", + 'approx;': '≈', + 'approxeq;': '≊', + aring: 'å', + 'aring;': 'å', + 'ascr;': '𝒶', + 'ast;': '*', + 'asymp;': '≈', + 'asympeq;': '≍', + atilde: 'ã', + 'atilde;': 'ã', + auml: 'ä', + 'auml;': 'ä', + 'awconint;': '∳', + 'awint;': '⨑', + 'bNot;': '⫭', + 'backcong;': '≌', + 'backepsilon;': '϶', + 'backprime;': '‵', + 'backsim;': '∽', + 'backsimeq;': '⋍', + 'barvee;': '⊽', + 'barwed;': '⌅', + 'barwedge;': '⌅', + 'bbrk;': '⎵', + 'bbrktbrk;': '⎶', + 'bcong;': '≌', + 'bcy;': 'б', + 'bdquo;': '„', + 'becaus;': '∵', + 'because;': '∵', + 'bemptyv;': '⦰', + 'bepsi;': '϶', + 'bernou;': 'ℬ', + 'beta;': 'β', + 'beth;': 'ℶ', + 'between;': '≬', + 'bfr;': '𝔟', + 'bigcap;': '⋂', + 'bigcirc;': '◯', + 'bigcup;': '⋃', + 'bigodot;': '⨀', + 'bigoplus;': '⨁', + 'bigotimes;': '⨂', + 'bigsqcup;': '⨆', + 'bigstar;': '★', + 'bigtriangledown;': '▽', + 'bigtriangleup;': '△', + 'biguplus;': '⨄', + 'bigvee;': '⋁', + 'bigwedge;': '⋀', + 'bkarow;': '⤍', + 'blacklozenge;': '⧫', + 'blacksquare;': '▪', + 'blacktriangle;': '▴', + 'blacktriangledown;': '▾', + 'blacktriangleleft;': '◂', + 'blacktriangleright;': '▸', + 'blank;': '␣', + 'blk12;': '▒', + 'blk14;': '░', + 'blk34;': '▓', + 'block;': '█', + 'bne;': '=⃥', + 'bnequiv;': '≡⃥', + 'bnot;': '⌐', + 'bopf;': '𝕓', + 'bot;': '⊥', + 'bottom;': '⊥', + 'bowtie;': '⋈', + 'boxDL;': '╗', + 'boxDR;': '╔', + 'boxDl;': '╖', + 'boxDr;': '╓', + 'boxH;': '═', + 'boxHD;': '╦', + 'boxHU;': '╩', + 'boxHd;': '╤', + 'boxHu;': '╧', + 'boxUL;': '╝', + 'boxUR;': '╚', + 'boxUl;': '╜', + 'boxUr;': '╙', + 'boxV;': '║', + 'boxVH;': '╬', + 'boxVL;': '╣', + 'boxVR;': '╠', + 'boxVh;': '╫', + 'boxVl;': '╢', + 'boxVr;': '╟', + 'boxbox;': '⧉', + 'boxdL;': '╕', + 'boxdR;': '╒', + 'boxdl;': '┐', + 'boxdr;': '┌', + 'boxh;': '─', + 'boxhD;': '╥', + 'boxhU;': '╨', + 'boxhd;': '┬', + 'boxhu;': '┴', + 'boxminus;': '⊟', + 'boxplus;': '⊞', + 'boxtimes;': '⊠', + 'boxuL;': '╛', + 'boxuR;': '╘', + 'boxul;': '┘', + 'boxur;': '└', + 'boxv;': '│', + 'boxvH;': '╪', + 'boxvL;': '╡', + 'boxvR;': '╞', + 'boxvh;': '┼', + 'boxvl;': '┤', + 'boxvr;': '├', + 'bprime;': '‵', + 'breve;': '˘', + brvbar: '¦', + 'brvbar;': '¦', + 'bscr;': '𝒷', + 'bsemi;': '⁏', + 'bsim;': '∽', + 'bsime;': '⋍', + 'bsol;': '\\', + 'bsolb;': '⧅', + 'bsolhsub;': '⟈', + 'bull;': '•', + 'bullet;': '•', + 'bump;': '≎', + 'bumpE;': '⪮', + 'bumpe;': '≏', + 'bumpeq;': '≏', + 'cacute;': 'ć', + 'cap;': '∩', + 'capand;': '⩄', + 'capbrcup;': '⩉', + 'capcap;': '⩋', + 'capcup;': '⩇', + 'capdot;': '⩀', + 'caps;': '∩︀', + 'caret;': '⁁', + 'caron;': 'ˇ', + 'ccaps;': '⩍', + 'ccaron;': 'č', + ccedil: 'ç', + 'ccedil;': 'ç', + 'ccirc;': 'ĉ', + 'ccups;': '⩌', + 'ccupssm;': '⩐', + 'cdot;': 'ċ', + cedil: '¸', + 'cedil;': '¸', + 'cemptyv;': '⦲', + cent: '¢', + 'cent;': '¢', + 'centerdot;': '·', + 'cfr;': '𝔠', + 'chcy;': 'ч', + 'check;': '✓', + 'checkmark;': '✓', + 'chi;': 'χ', + 'cir;': '○', + 'cirE;': '⧃', + 'circ;': 'ˆ', + 'circeq;': '≗', + 'circlearrowleft;': '↺', + 'circlearrowright;': '↻', + 'circledR;': '®', + 'circledS;': 'Ⓢ', + 'circledast;': '⊛', + 'circledcirc;': '⊚', + 'circleddash;': '⊝', + 'cire;': '≗', + 'cirfnint;': '⨐', + 'cirmid;': '⫯', + 'cirscir;': '⧂', + 'clubs;': '♣', + 'clubsuit;': '♣', + 'colon;': ':', + 'colone;': '≔', + 'coloneq;': '≔', + 'comma;': ',', + 'commat;': '@', + 'comp;': '∁', + 'compfn;': '∘', + 'complement;': '∁', + 'complexes;': 'ℂ', + 'cong;': '≅', + 'congdot;': '⩭', + 'conint;': '∮', + 'copf;': '𝕔', + 'coprod;': '∐', + copy: '©', + 'copy;': '©', + 'copysr;': '℗', + 'crarr;': '↵', + 'cross;': '✗', + 'cscr;': '𝒸', + 'csub;': '⫏', + 'csube;': '⫑', + 'csup;': '⫐', + 'csupe;': '⫒', + 'ctdot;': '⋯', + 'cudarrl;': '⤸', + 'cudarrr;': '⤵', + 'cuepr;': '⋞', + 'cuesc;': '⋟', + 'cularr;': '↶', + 'cularrp;': '⤽', + 'cup;': '∪', + 'cupbrcap;': '⩈', + 'cupcap;': '⩆', + 'cupcup;': '⩊', + 'cupdot;': '⊍', + 'cupor;': '⩅', + 'cups;': '∪︀', + 'curarr;': '↷', + 'curarrm;': '⤼', + 'curlyeqprec;': '⋞', + 'curlyeqsucc;': '⋟', + 'curlyvee;': '⋎', + 'curlywedge;': '⋏', + curren: '¤', + 'curren;': '¤', + 'curvearrowleft;': '↶', + 'curvearrowright;': '↷', + 'cuvee;': '⋎', + 'cuwed;': '⋏', + 'cwconint;': '∲', + 'cwint;': '∱', + 'cylcty;': '⌭', + 'dArr;': '⇓', + 'dHar;': '⥥', + 'dagger;': '†', + 'daleth;': 'ℸ', + 'darr;': '↓', + 'dash;': '‐', + 'dashv;': '⊣', + 'dbkarow;': '⤏', + 'dblac;': '˝', + 'dcaron;': 'ď', + 'dcy;': 'д', + 'dd;': 'ⅆ', + 'ddagger;': '‡', + 'ddarr;': '⇊', + 'ddotseq;': '⩷', + deg: '°', + 'deg;': '°', + 'delta;': 'δ', + 'demptyv;': '⦱', + 'dfisht;': '⥿', + 'dfr;': '𝔡', + 'dharl;': '⇃', + 'dharr;': '⇂', + 'diam;': '⋄', + 'diamond;': '⋄', + 'diamondsuit;': '♦', + 'diams;': '♦', + 'die;': '¨', + 'digamma;': 'ϝ', + 'disin;': '⋲', + 'div;': '÷', + divide: '÷', + 'divide;': '÷', + 'divideontimes;': '⋇', + 'divonx;': '⋇', + 'djcy;': 'ђ', + 'dlcorn;': '⌞', + 'dlcrop;': '⌍', + 'dollar;': '$', + 'dopf;': '𝕕', + 'dot;': '˙', + 'doteq;': '≐', + 'doteqdot;': '≑', + 'dotminus;': '∸', + 'dotplus;': '∔', + 'dotsquare;': '⊡', + 'doublebarwedge;': '⌆', + 'downarrow;': '↓', + 'downdownarrows;': '⇊', + 'downharpoonleft;': '⇃', + 'downharpoonright;': '⇂', + 'drbkarow;': '⤐', + 'drcorn;': '⌟', + 'drcrop;': '⌌', + 'dscr;': '𝒹', + 'dscy;': 'ѕ', + 'dsol;': '⧶', + 'dstrok;': 'đ', + 'dtdot;': '⋱', + 'dtri;': '▿', + 'dtrif;': '▾', + 'duarr;': '⇵', + 'duhar;': '⥯', + 'dwangle;': '⦦', + 'dzcy;': 'џ', + 'dzigrarr;': '⟿', + 'eDDot;': '⩷', + 'eDot;': '≑', + eacute: 'é', + 'eacute;': 'é', + 'easter;': '⩮', + 'ecaron;': 'ě', + 'ecir;': '≖', + ecirc: 'ê', + 'ecirc;': 'ê', + 'ecolon;': '≕', + 'ecy;': 'э', + 'edot;': 'ė', + 'ee;': 'ⅇ', + 'efDot;': '≒', + 'efr;': '𝔢', + 'eg;': '⪚', + egrave: 'è', + 'egrave;': 'è', + 'egs;': '⪖', + 'egsdot;': '⪘', + 'el;': '⪙', + 'elinters;': '⏧', + 'ell;': 'ℓ', + 'els;': '⪕', + 'elsdot;': '⪗', + 'emacr;': 'ē', + 'empty;': '∅', + 'emptyset;': '∅', + 'emptyv;': '∅', + 'emsp13;': ' ', + 'emsp14;': ' ', + 'emsp;': ' ', + 'eng;': 'ŋ', + 'ensp;': ' ', + 'eogon;': 'ę', + 'eopf;': '𝕖', + 'epar;': '⋕', + 'eparsl;': '⧣', + 'eplus;': '⩱', + 'epsi;': 'ε', + 'epsilon;': 'ε', + 'epsiv;': 'ϵ', + 'eqcirc;': '≖', + 'eqcolon;': '≕', + 'eqsim;': '≂', + 'eqslantgtr;': '⪖', + 'eqslantless;': '⪕', + 'equals;': '=', + 'equest;': '≟', + 'equiv;': '≡', + 'equivDD;': '⩸', + 'eqvparsl;': '⧥', + 'erDot;': '≓', + 'erarr;': '⥱', + 'escr;': 'ℯ', + 'esdot;': '≐', + 'esim;': '≂', + 'eta;': 'η', + eth: 'ð', + 'eth;': 'ð', + euml: 'ë', + 'euml;': 'ë', + 'euro;': '€', + 'excl;': '!', + 'exist;': '∃', + 'expectation;': 'ℰ', + 'exponentiale;': 'ⅇ', + 'fallingdotseq;': '≒', + 'fcy;': 'ф', + 'female;': '♀', + 'ffilig;': 'ffi', + 'fflig;': 'ff', + 'ffllig;': 'ffl', + 'ffr;': '𝔣', + 'filig;': 'fi', + 'fjlig;': 'fj', + 'flat;': '♭', + 'fllig;': 'fl', + 'fltns;': '▱', + 'fnof;': 'ƒ', + 'fopf;': '𝕗', + 'forall;': '∀', + 'fork;': '⋔', + 'forkv;': '⫙', + 'fpartint;': '⨍', + frac12: '½', + 'frac12;': '½', + 'frac13;': '⅓', + frac14: '¼', + 'frac14;': '¼', + 'frac15;': '⅕', + 'frac16;': '⅙', + 'frac18;': '⅛', + 'frac23;': '⅔', + 'frac25;': '⅖', + frac34: '¾', + 'frac34;': '¾', + 'frac35;': '⅗', + 'frac38;': '⅜', + 'frac45;': '⅘', + 'frac56;': '⅚', + 'frac58;': '⅝', + 'frac78;': '⅞', + 'frasl;': '⁄', + 'frown;': '⌢', + 'fscr;': '𝒻', + 'gE;': '≧', + 'gEl;': '⪌', + 'gacute;': 'ǵ', + 'gamma;': 'γ', + 'gammad;': 'ϝ', + 'gap;': '⪆', + 'gbreve;': 'ğ', + 'gcirc;': 'ĝ', + 'gcy;': 'г', + 'gdot;': 'ġ', + 'ge;': '≥', + 'gel;': '⋛', + 'geq;': '≥', + 'geqq;': '≧', + 'geqslant;': '⩾', + 'ges;': '⩾', + 'gescc;': '⪩', + 'gesdot;': '⪀', + 'gesdoto;': '⪂', + 'gesdotol;': '⪄', + 'gesl;': '⋛︀', + 'gesles;': '⪔', + 'gfr;': '𝔤', + 'gg;': '≫', + 'ggg;': '⋙', + 'gimel;': 'ℷ', + 'gjcy;': 'ѓ', + 'gl;': '≷', + 'glE;': '⪒', + 'gla;': '⪥', + 'glj;': '⪤', + 'gnE;': '≩', + 'gnap;': '⪊', + 'gnapprox;': '⪊', + 'gne;': '⪈', + 'gneq;': '⪈', + 'gneqq;': '≩', + 'gnsim;': '⋧', + 'gopf;': '𝕘', + 'grave;': '`', + 'gscr;': 'ℊ', + 'gsim;': '≳', + 'gsime;': '⪎', + 'gsiml;': '⪐', + gt: '>', + 'gt;': '>', + 'gtcc;': '⪧', + 'gtcir;': '⩺', + 'gtdot;': '⋗', + 'gtlPar;': '⦕', + 'gtquest;': '⩼', + 'gtrapprox;': '⪆', + 'gtrarr;': '⥸', + 'gtrdot;': '⋗', + 'gtreqless;': '⋛', + 'gtreqqless;': '⪌', + 'gtrless;': '≷', + 'gtrsim;': '≳', + 'gvertneqq;': '≩︀', + 'gvnE;': '≩︀', + 'hArr;': '⇔', + 'hairsp;': ' ', + 'half;': '½', + 'hamilt;': 'ℋ', + 'hardcy;': 'ъ', + 'harr;': '↔', + 'harrcir;': '⥈', + 'harrw;': '↭', + 'hbar;': 'ℏ', + 'hcirc;': 'ĥ', + 'hearts;': '♥', + 'heartsuit;': '♥', + 'hellip;': '…', + 'hercon;': '⊹', + 'hfr;': '𝔥', + 'hksearow;': '⤥', + 'hkswarow;': '⤦', + 'hoarr;': '⇿', + 'homtht;': '∻', + 'hookleftarrow;': '↩', + 'hookrightarrow;': '↪', + 'hopf;': '𝕙', + 'horbar;': '―', + 'hscr;': '𝒽', + 'hslash;': 'ℏ', + 'hstrok;': 'ħ', + 'hybull;': '⁃', + 'hyphen;': '‐', + iacute: 'í', + 'iacute;': 'í', + 'ic;': '⁣', + icirc: 'î', + 'icirc;': 'î', + 'icy;': 'и', + 'iecy;': 'е', + iexcl: '¡', + 'iexcl;': '¡', + 'iff;': '⇔', + 'ifr;': '𝔦', + igrave: 'ì', + 'igrave;': 'ì', + 'ii;': 'ⅈ', + 'iiiint;': '⨌', + 'iiint;': '∭', + 'iinfin;': '⧜', + 'iiota;': '℩', + 'ijlig;': 'ij', + 'imacr;': 'ī', + 'image;': 'ℑ', + 'imagline;': 'ℐ', + 'imagpart;': 'ℑ', + 'imath;': 'ı', + 'imof;': '⊷', + 'imped;': 'Ƶ', + 'in;': '∈', + 'incare;': '℅', + 'infin;': '∞', + 'infintie;': '⧝', + 'inodot;': 'ı', + 'int;': '∫', + 'intcal;': '⊺', + 'integers;': 'ℤ', + 'intercal;': '⊺', + 'intlarhk;': '⨗', + 'intprod;': '⨼', + 'iocy;': 'ё', + 'iogon;': 'į', + 'iopf;': '𝕚', + 'iota;': 'ι', + 'iprod;': '⨼', + iquest: '¿', + 'iquest;': '¿', + 'iscr;': '𝒾', + 'isin;': '∈', + 'isinE;': '⋹', + 'isindot;': '⋵', + 'isins;': '⋴', + 'isinsv;': '⋳', + 'isinv;': '∈', + 'it;': '⁢', + 'itilde;': 'ĩ', + 'iukcy;': 'і', + iuml: 'ï', + 'iuml;': 'ï', + 'jcirc;': 'ĵ', + 'jcy;': 'й', + 'jfr;': '𝔧', + 'jmath;': 'ȷ', + 'jopf;': '𝕛', + 'jscr;': '𝒿', + 'jsercy;': 'ј', + 'jukcy;': 'є', + 'kappa;': 'κ', + 'kappav;': 'ϰ', + 'kcedil;': 'ķ', + 'kcy;': 'к', + 'kfr;': '𝔨', + 'kgreen;': 'ĸ', + 'khcy;': 'х', + 'kjcy;': 'ќ', + 'kopf;': '𝕜', + 'kscr;': '𝓀', + 'lAarr;': '⇚', + 'lArr;': '⇐', + 'lAtail;': '⤛', + 'lBarr;': '⤎', + 'lE;': '≦', + 'lEg;': '⪋', + 'lHar;': '⥢', + 'lacute;': 'ĺ', + 'laemptyv;': '⦴', + 'lagran;': 'ℒ', + 'lambda;': 'λ', + 'lang;': '⟨', + 'langd;': '⦑', + 'langle;': '⟨', + 'lap;': '⪅', + laquo: '«', + 'laquo;': '«', + 'larr;': '←', + 'larrb;': '⇤', + 'larrbfs;': '⤟', + 'larrfs;': '⤝', + 'larrhk;': '↩', + 'larrlp;': '↫', + 'larrpl;': '⤹', + 'larrsim;': '⥳', + 'larrtl;': '↢', + 'lat;': '⪫', + 'latail;': '⤙', + 'late;': '⪭', + 'lates;': '⪭︀', + 'lbarr;': '⤌', + 'lbbrk;': '❲', + 'lbrace;': '{', + 'lbrack;': '[', + 'lbrke;': '⦋', + 'lbrksld;': '⦏', + 'lbrkslu;': '⦍', + 'lcaron;': 'ľ', + 'lcedil;': 'ļ', + 'lceil;': '⌈', + 'lcub;': '{', + 'lcy;': 'л', + 'ldca;': '⤶', + 'ldquo;': '“', + 'ldquor;': '„', + 'ldrdhar;': '⥧', + 'ldrushar;': '⥋', + 'ldsh;': '↲', + 'le;': '≤', + 'leftarrow;': '←', + 'leftarrowtail;': '↢', + 'leftharpoondown;': '↽', + 'leftharpoonup;': '↼', + 'leftleftarrows;': '⇇', + 'leftrightarrow;': '↔', + 'leftrightarrows;': '⇆', + 'leftrightharpoons;': '⇋', + 'leftrightsquigarrow;': '↭', + 'leftthreetimes;': '⋋', + 'leg;': '⋚', + 'leq;': '≤', + 'leqq;': '≦', + 'leqslant;': '⩽', + 'les;': '⩽', + 'lescc;': '⪨', + 'lesdot;': '⩿', + 'lesdoto;': '⪁', + 'lesdotor;': '⪃', + 'lesg;': '⋚︀', + 'lesges;': '⪓', + 'lessapprox;': '⪅', + 'lessdot;': '⋖', + 'lesseqgtr;': '⋚', + 'lesseqqgtr;': '⪋', + 'lessgtr;': '≶', + 'lesssim;': '≲', + 'lfisht;': '⥼', + 'lfloor;': '⌊', + 'lfr;': '𝔩', + 'lg;': '≶', + 'lgE;': '⪑', + 'lhard;': '↽', + 'lharu;': '↼', + 'lharul;': '⥪', + 'lhblk;': '▄', + 'ljcy;': 'љ', + 'll;': '≪', + 'llarr;': '⇇', + 'llcorner;': '⌞', + 'llhard;': '⥫', + 'lltri;': '◺', + 'lmidot;': 'ŀ', + 'lmoust;': '⎰', + 'lmoustache;': '⎰', + 'lnE;': '≨', + 'lnap;': '⪉', + 'lnapprox;': '⪉', + 'lne;': '⪇', + 'lneq;': '⪇', + 'lneqq;': '≨', + 'lnsim;': '⋦', + 'loang;': '⟬', + 'loarr;': '⇽', + 'lobrk;': '⟦', + 'longleftarrow;': '⟵', + 'longleftrightarrow;': '⟷', + 'longmapsto;': '⟼', + 'longrightarrow;': '⟶', + 'looparrowleft;': '↫', + 'looparrowright;': '↬', + 'lopar;': '⦅', + 'lopf;': '𝕝', + 'loplus;': '⨭', + 'lotimes;': '⨴', + 'lowast;': '∗', + 'lowbar;': '_', + 'loz;': '◊', + 'lozenge;': '◊', + 'lozf;': '⧫', + 'lpar;': '(', + 'lparlt;': '⦓', + 'lrarr;': '⇆', + 'lrcorner;': '⌟', + 'lrhar;': '⇋', + 'lrhard;': '⥭', + 'lrm;': '‎', + 'lrtri;': '⊿', + 'lsaquo;': '‹', + 'lscr;': '𝓁', + 'lsh;': '↰', + 'lsim;': '≲', + 'lsime;': '⪍', + 'lsimg;': '⪏', + 'lsqb;': '[', + 'lsquo;': '‘', + 'lsquor;': '‚', + 'lstrok;': 'ł', + lt: '<', + 'lt;': '<', + 'ltcc;': '⪦', + 'ltcir;': '⩹', + 'ltdot;': '⋖', + 'lthree;': '⋋', + 'ltimes;': '⋉', + 'ltlarr;': '⥶', + 'ltquest;': '⩻', + 'ltrPar;': '⦖', + 'ltri;': '◃', + 'ltrie;': '⊴', + 'ltrif;': '◂', + 'lurdshar;': '⥊', + 'luruhar;': '⥦', + 'lvertneqq;': '≨︀', + 'lvnE;': '≨︀', + 'mDDot;': '∺', + macr: '¯', + 'macr;': '¯', + 'male;': '♂', + 'malt;': '✠', + 'maltese;': '✠', + 'map;': '↦', + 'mapsto;': '↦', + 'mapstodown;': '↧', + 'mapstoleft;': '↤', + 'mapstoup;': '↥', + 'marker;': '▮', + 'mcomma;': '⨩', + 'mcy;': 'м', + 'mdash;': '—', + 'measuredangle;': '∡', + 'mfr;': '𝔪', + 'mho;': '℧', + micro: 'µ', + 'micro;': 'µ', + 'mid;': '∣', + 'midast;': '*', + 'midcir;': '⫰', + middot: '·', + 'middot;': '·', + 'minus;': '−', + 'minusb;': '⊟', + 'minusd;': '∸', + 'minusdu;': '⨪', + 'mlcp;': '⫛', + 'mldr;': '…', + 'mnplus;': '∓', + 'models;': '⊧', + 'mopf;': '𝕞', + 'mp;': '∓', + 'mscr;': '𝓂', + 'mstpos;': '∾', + 'mu;': 'μ', + 'multimap;': '⊸', + 'mumap;': '⊸', + 'nGg;': '⋙̸', + 'nGt;': '≫⃒', + 'nGtv;': '≫̸', + 'nLeftarrow;': '⇍', + 'nLeftrightarrow;': '⇎', + 'nLl;': '⋘̸', + 'nLt;': '≪⃒', + 'nLtv;': '≪̸', + 'nRightarrow;': '⇏', + 'nVDash;': '⊯', + 'nVdash;': '⊮', + 'nabla;': '∇', + 'nacute;': 'ń', + 'nang;': '∠⃒', + 'nap;': '≉', + 'napE;': '⩰̸', + 'napid;': '≋̸', + 'napos;': 'ʼn', + 'napprox;': '≉', + 'natur;': '♮', + 'natural;': '♮', + 'naturals;': 'ℕ', + nbsp: ' ', + 'nbsp;': ' ', + 'nbump;': '≎̸', + 'nbumpe;': '≏̸', + 'ncap;': '⩃', + 'ncaron;': 'ň', + 'ncedil;': 'ņ', + 'ncong;': '≇', + 'ncongdot;': '⩭̸', + 'ncup;': '⩂', + 'ncy;': 'н', + 'ndash;': '–', + 'ne;': '≠', + 'neArr;': '⇗', + 'nearhk;': '⤤', + 'nearr;': '↗', + 'nearrow;': '↗', + 'nedot;': '≐̸', + 'nequiv;': '≢', + 'nesear;': '⤨', + 'nesim;': '≂̸', + 'nexist;': '∄', + 'nexists;': '∄', + 'nfr;': '𝔫', + 'ngE;': '≧̸', + 'nge;': '≱', + 'ngeq;': '≱', + 'ngeqq;': '≧̸', + 'ngeqslant;': '⩾̸', + 'nges;': '⩾̸', + 'ngsim;': '≵', + 'ngt;': '≯', + 'ngtr;': '≯', + 'nhArr;': '⇎', + 'nharr;': '↮', + 'nhpar;': '⫲', + 'ni;': '∋', + 'nis;': '⋼', + 'nisd;': '⋺', + 'niv;': '∋', + 'njcy;': 'њ', + 'nlArr;': '⇍', + 'nlE;': '≦̸', + 'nlarr;': '↚', + 'nldr;': '‥', + 'nle;': '≰', + 'nleftarrow;': '↚', + 'nleftrightarrow;': '↮', + 'nleq;': '≰', + 'nleqq;': '≦̸', + 'nleqslant;': '⩽̸', + 'nles;': '⩽̸', + 'nless;': '≮', + 'nlsim;': '≴', + 'nlt;': '≮', + 'nltri;': '⋪', + 'nltrie;': '⋬', + 'nmid;': '∤', + 'nopf;': '𝕟', + not: '¬', + 'not;': '¬', + 'notin;': '∉', + 'notinE;': '⋹̸', + 'notindot;': '⋵̸', + 'notinva;': '∉', + 'notinvb;': '⋷', + 'notinvc;': '⋶', + 'notni;': '∌', + 'notniva;': '∌', + 'notnivb;': '⋾', + 'notnivc;': '⋽', + 'npar;': '∦', + 'nparallel;': '∦', + 'nparsl;': '⫽⃥', + 'npart;': '∂̸', + 'npolint;': '⨔', + 'npr;': '⊀', + 'nprcue;': '⋠', + 'npre;': '⪯̸', + 'nprec;': '⊀', + 'npreceq;': '⪯̸', + 'nrArr;': '⇏', + 'nrarr;': '↛', + 'nrarrc;': '⤳̸', + 'nrarrw;': '↝̸', + 'nrightarrow;': '↛', + 'nrtri;': '⋫', + 'nrtrie;': '⋭', + 'nsc;': '⊁', + 'nsccue;': '⋡', + 'nsce;': '⪰̸', + 'nscr;': '𝓃', + 'nshortmid;': '∤', + 'nshortparallel;': '∦', + 'nsim;': '≁', + 'nsime;': '≄', + 'nsimeq;': '≄', + 'nsmid;': '∤', + 'nspar;': '∦', + 'nsqsube;': '⋢', + 'nsqsupe;': '⋣', + 'nsub;': '⊄', + 'nsubE;': '⫅̸', + 'nsube;': '⊈', + 'nsubset;': '⊂⃒', + 'nsubseteq;': '⊈', + 'nsubseteqq;': '⫅̸', + 'nsucc;': '⊁', + 'nsucceq;': '⪰̸', + 'nsup;': '⊅', + 'nsupE;': '⫆̸', + 'nsupe;': '⊉', + 'nsupset;': '⊃⃒', + 'nsupseteq;': '⊉', + 'nsupseteqq;': '⫆̸', + 'ntgl;': '≹', + ntilde: 'ñ', + 'ntilde;': 'ñ', + 'ntlg;': '≸', + 'ntriangleleft;': '⋪', + 'ntrianglelefteq;': '⋬', + 'ntriangleright;': '⋫', + 'ntrianglerighteq;': '⋭', + 'nu;': 'ν', + 'num;': '#', + 'numero;': '№', + 'numsp;': ' ', + 'nvDash;': '⊭', + 'nvHarr;': '⤄', + 'nvap;': '≍⃒', + 'nvdash;': '⊬', + 'nvge;': '≥⃒', + 'nvgt;': '>⃒', + 'nvinfin;': '⧞', + 'nvlArr;': '⤂', + 'nvle;': '≤⃒', + 'nvlt;': '<⃒', + 'nvltrie;': '⊴⃒', + 'nvrArr;': '⤃', + 'nvrtrie;': '⊵⃒', + 'nvsim;': '∼⃒', + 'nwArr;': '⇖', + 'nwarhk;': '⤣', + 'nwarr;': '↖', + 'nwarrow;': '↖', + 'nwnear;': '⤧', + 'oS;': 'Ⓢ', + oacute: 'ó', + 'oacute;': 'ó', + 'oast;': '⊛', + 'ocir;': '⊚', + ocirc: 'ô', + 'ocirc;': 'ô', + 'ocy;': 'о', + 'odash;': '⊝', + 'odblac;': 'ő', + 'odiv;': '⨸', + 'odot;': '⊙', + 'odsold;': '⦼', + 'oelig;': 'œ', + 'ofcir;': '⦿', + 'ofr;': '𝔬', + 'ogon;': '˛', + ograve: 'ò', + 'ograve;': 'ò', + 'ogt;': '⧁', + 'ohbar;': '⦵', + 'ohm;': 'Ω', + 'oint;': '∮', + 'olarr;': '↺', + 'olcir;': '⦾', + 'olcross;': '⦻', + 'oline;': '‾', + 'olt;': '⧀', + 'omacr;': 'ō', + 'omega;': 'ω', + 'omicron;': 'ο', + 'omid;': '⦶', + 'ominus;': '⊖', + 'oopf;': '𝕠', + 'opar;': '⦷', + 'operp;': '⦹', + 'oplus;': '⊕', + 'or;': '∨', + 'orarr;': '↻', + 'ord;': '⩝', + 'order;': 'ℴ', + 'orderof;': 'ℴ', + ordf: 'ª', + 'ordf;': 'ª', + ordm: 'º', + 'ordm;': 'º', + 'origof;': '⊶', + 'oror;': '⩖', + 'orslope;': '⩗', + 'orv;': '⩛', + 'oscr;': 'ℴ', + oslash: 'ø', + 'oslash;': 'ø', + 'osol;': '⊘', + otilde: 'õ', + 'otilde;': 'õ', + 'otimes;': '⊗', + 'otimesas;': '⨶', + ouml: 'ö', + 'ouml;': 'ö', + 'ovbar;': '⌽', + 'par;': '∥', + para: '¶', + 'para;': '¶', + 'parallel;': '∥', + 'parsim;': '⫳', + 'parsl;': '⫽', + 'part;': '∂', + 'pcy;': 'п', + 'percnt;': '%', + 'period;': '.', + 'permil;': '‰', + 'perp;': '⊥', + 'pertenk;': '‱', + 'pfr;': '𝔭', + 'phi;': 'φ', + 'phiv;': 'ϕ', + 'phmmat;': 'ℳ', + 'phone;': '☎', + 'pi;': 'π', + 'pitchfork;': '⋔', + 'piv;': 'ϖ', + 'planck;': 'ℏ', + 'planckh;': 'ℎ', + 'plankv;': 'ℏ', + 'plus;': '+', + 'plusacir;': '⨣', + 'plusb;': '⊞', + 'pluscir;': '⨢', + 'plusdo;': '∔', + 'plusdu;': '⨥', + 'pluse;': '⩲', + plusmn: '±', + 'plusmn;': '±', + 'plussim;': '⨦', + 'plustwo;': '⨧', + 'pm;': '±', + 'pointint;': '⨕', + 'popf;': '𝕡', + pound: '£', + 'pound;': '£', + 'pr;': '≺', + 'prE;': '⪳', + 'prap;': '⪷', + 'prcue;': '≼', + 'pre;': '⪯', + 'prec;': '≺', + 'precapprox;': '⪷', + 'preccurlyeq;': '≼', + 'preceq;': '⪯', + 'precnapprox;': '⪹', + 'precneqq;': '⪵', + 'precnsim;': '⋨', + 'precsim;': '≾', + 'prime;': '′', + 'primes;': 'ℙ', + 'prnE;': '⪵', + 'prnap;': '⪹', + 'prnsim;': '⋨', + 'prod;': '∏', + 'profalar;': '⌮', + 'profline;': '⌒', + 'profsurf;': '⌓', + 'prop;': '∝', + 'propto;': '∝', + 'prsim;': '≾', + 'prurel;': '⊰', + 'pscr;': '𝓅', + 'psi;': 'ψ', + 'puncsp;': ' ', + 'qfr;': '𝔮', + 'qint;': '⨌', + 'qopf;': '𝕢', + 'qprime;': '⁗', + 'qscr;': '𝓆', + 'quaternions;': 'ℍ', + 'quatint;': '⨖', + 'quest;': '?', + 'questeq;': '≟', + quot: '"', + 'quot;': '"', + 'rAarr;': '⇛', + 'rArr;': '⇒', + 'rAtail;': '⤜', + 'rBarr;': '⤏', + 'rHar;': '⥤', + 'race;': '∽̱', + 'racute;': 'ŕ', + 'radic;': '√', + 'raemptyv;': '⦳', + 'rang;': '⟩', + 'rangd;': '⦒', + 'range;': '⦥', + 'rangle;': '⟩', + raquo: '»', + 'raquo;': '»', + 'rarr;': '→', + 'rarrap;': '⥵', + 'rarrb;': '⇥', + 'rarrbfs;': '⤠', + 'rarrc;': '⤳', + 'rarrfs;': '⤞', + 'rarrhk;': '↪', + 'rarrlp;': '↬', + 'rarrpl;': '⥅', + 'rarrsim;': '⥴', + 'rarrtl;': '↣', + 'rarrw;': '↝', + 'ratail;': '⤚', + 'ratio;': '∶', + 'rationals;': 'ℚ', + 'rbarr;': '⤍', + 'rbbrk;': '❳', + 'rbrace;': '}', + 'rbrack;': ']', + 'rbrke;': '⦌', + 'rbrksld;': '⦎', + 'rbrkslu;': '⦐', + 'rcaron;': 'ř', + 'rcedil;': 'ŗ', + 'rceil;': '⌉', + 'rcub;': '}', + 'rcy;': 'р', + 'rdca;': '⤷', + 'rdldhar;': '⥩', + 'rdquo;': '”', + 'rdquor;': '”', + 'rdsh;': '↳', + 'real;': 'ℜ', + 'realine;': 'ℛ', + 'realpart;': 'ℜ', + 'reals;': 'ℝ', + 'rect;': '▭', + reg: '®', + 'reg;': '®', + 'rfisht;': '⥽', + 'rfloor;': '⌋', + 'rfr;': '𝔯', + 'rhard;': '⇁', + 'rharu;': '⇀', + 'rharul;': '⥬', + 'rho;': 'ρ', + 'rhov;': 'ϱ', + 'rightarrow;': '→', + 'rightarrowtail;': '↣', + 'rightharpoondown;': '⇁', + 'rightharpoonup;': '⇀', + 'rightleftarrows;': '⇄', + 'rightleftharpoons;': '⇌', + 'rightrightarrows;': '⇉', + 'rightsquigarrow;': '↝', + 'rightthreetimes;': '⋌', + 'ring;': '˚', + 'risingdotseq;': '≓', + 'rlarr;': '⇄', + 'rlhar;': '⇌', + 'rlm;': '‏', + 'rmoust;': '⎱', + 'rmoustache;': '⎱', + 'rnmid;': '⫮', + 'roang;': '⟭', + 'roarr;': '⇾', + 'robrk;': '⟧', + 'ropar;': '⦆', + 'ropf;': '𝕣', + 'roplus;': '⨮', + 'rotimes;': '⨵', + 'rpar;': ')', + 'rpargt;': '⦔', + 'rppolint;': '⨒', + 'rrarr;': '⇉', + 'rsaquo;': '›', + 'rscr;': '𝓇', + 'rsh;': '↱', + 'rsqb;': ']', + 'rsquo;': '’', + 'rsquor;': '’', + 'rthree;': '⋌', + 'rtimes;': '⋊', + 'rtri;': '▹', + 'rtrie;': '⊵', + 'rtrif;': '▸', + 'rtriltri;': '⧎', + 'ruluhar;': '⥨', + 'rx;': '℞', + 'sacute;': 'ś', + 'sbquo;': '‚', + 'sc;': '≻', + 'scE;': '⪴', + 'scap;': '⪸', + 'scaron;': 'š', + 'sccue;': '≽', + 'sce;': '⪰', + 'scedil;': 'ş', + 'scirc;': 'ŝ', + 'scnE;': '⪶', + 'scnap;': '⪺', + 'scnsim;': '⋩', + 'scpolint;': '⨓', + 'scsim;': '≿', + 'scy;': 'с', + 'sdot;': '⋅', + 'sdotb;': '⊡', + 'sdote;': '⩦', + 'seArr;': '⇘', + 'searhk;': '⤥', + 'searr;': '↘', + 'searrow;': '↘', + sect: '§', + 'sect;': '§', + 'semi;': ';', + 'seswar;': '⤩', + 'setminus;': '∖', + 'setmn;': '∖', + 'sext;': '✶', + 'sfr;': '𝔰', + 'sfrown;': '⌢', + 'sharp;': '♯', + 'shchcy;': 'щ', + 'shcy;': 'ш', + 'shortmid;': '∣', + 'shortparallel;': '∥', + shy: '­', + 'shy;': '­', + 'sigma;': 'σ', + 'sigmaf;': 'ς', + 'sigmav;': 'ς', + 'sim;': '∼', + 'simdot;': '⩪', + 'sime;': '≃', + 'simeq;': '≃', + 'simg;': '⪞', + 'simgE;': '⪠', + 'siml;': '⪝', + 'simlE;': '⪟', + 'simne;': '≆', + 'simplus;': '⨤', + 'simrarr;': '⥲', + 'slarr;': '←', + 'smallsetminus;': '∖', + 'smashp;': '⨳', + 'smeparsl;': '⧤', + 'smid;': '∣', + 'smile;': '⌣', + 'smt;': '⪪', + 'smte;': '⪬', + 'smtes;': '⪬︀', + 'softcy;': 'ь', + 'sol;': '/', + 'solb;': '⧄', + 'solbar;': '⌿', + 'sopf;': '𝕤', + 'spades;': '♠', + 'spadesuit;': '♠', + 'spar;': '∥', + 'sqcap;': '⊓', + 'sqcaps;': '⊓︀', + 'sqcup;': '⊔', + 'sqcups;': '⊔︀', + 'sqsub;': '⊏', + 'sqsube;': '⊑', + 'sqsubset;': '⊏', + 'sqsubseteq;': '⊑', + 'sqsup;': '⊐', + 'sqsupe;': '⊒', + 'sqsupset;': '⊐', + 'sqsupseteq;': '⊒', + 'squ;': '□', + 'square;': '□', + 'squarf;': '▪', + 'squf;': '▪', + 'srarr;': '→', + 'sscr;': '𝓈', + 'ssetmn;': '∖', + 'ssmile;': '⌣', + 'sstarf;': '⋆', + 'star;': '☆', + 'starf;': '★', + 'straightepsilon;': 'ϵ', + 'straightphi;': 'ϕ', + 'strns;': '¯', + 'sub;': '⊂', + 'subE;': '⫅', + 'subdot;': '⪽', + 'sube;': '⊆', + 'subedot;': '⫃', + 'submult;': '⫁', + 'subnE;': '⫋', + 'subne;': '⊊', + 'subplus;': '⪿', + 'subrarr;': '⥹', + 'subset;': '⊂', + 'subseteq;': '⊆', + 'subseteqq;': '⫅', + 'subsetneq;': '⊊', + 'subsetneqq;': '⫋', + 'subsim;': '⫇', + 'subsub;': '⫕', + 'subsup;': '⫓', + 'succ;': '≻', + 'succapprox;': '⪸', + 'succcurlyeq;': '≽', + 'succeq;': '⪰', + 'succnapprox;': '⪺', + 'succneqq;': '⪶', + 'succnsim;': '⋩', + 'succsim;': '≿', + 'sum;': '∑', + 'sung;': '♪', + sup1: '¹', + 'sup1;': '¹', + sup2: '²', + 'sup2;': '²', + sup3: '³', + 'sup3;': '³', + 'sup;': '⊃', + 'supE;': '⫆', + 'supdot;': '⪾', + 'supdsub;': '⫘', + 'supe;': '⊇', + 'supedot;': '⫄', + 'suphsol;': '⟉', + 'suphsub;': '⫗', + 'suplarr;': '⥻', + 'supmult;': '⫂', + 'supnE;': '⫌', + 'supne;': '⊋', + 'supplus;': '⫀', + 'supset;': '⊃', + 'supseteq;': '⊇', + 'supseteqq;': '⫆', + 'supsetneq;': '⊋', + 'supsetneqq;': '⫌', + 'supsim;': '⫈', + 'supsub;': '⫔', + 'supsup;': '⫖', + 'swArr;': '⇙', + 'swarhk;': '⤦', + 'swarr;': '↙', + 'swarrow;': '↙', + 'swnwar;': '⤪', + szlig: 'ß', + 'szlig;': 'ß', + 'target;': '⌖', + 'tau;': 'τ', + 'tbrk;': '⎴', + 'tcaron;': 'ť', + 'tcedil;': 'ţ', + 'tcy;': 'т', + 'tdot;': '⃛', + 'telrec;': '⌕', + 'tfr;': '𝔱', + 'there4;': '∴', + 'therefore;': '∴', + 'theta;': 'θ', + 'thetasym;': 'ϑ', + 'thetav;': 'ϑ', + 'thickapprox;': '≈', + 'thicksim;': '∼', + 'thinsp;': ' ', + 'thkap;': '≈', + 'thksim;': '∼', + thorn: 'þ', + 'thorn;': 'þ', + 'tilde;': '˜', + times: '×', + 'times;': '×', + 'timesb;': '⊠', + 'timesbar;': '⨱', + 'timesd;': '⨰', + 'tint;': '∭', + 'toea;': '⤨', + 'top;': '⊤', + 'topbot;': '⌶', + 'topcir;': '⫱', + 'topf;': '𝕥', + 'topfork;': '⫚', + 'tosa;': '⤩', + 'tprime;': '‴', + 'trade;': '™', + 'triangle;': '▵', + 'triangledown;': '▿', + 'triangleleft;': '◃', + 'trianglelefteq;': '⊴', + 'triangleq;': '≜', + 'triangleright;': '▹', + 'trianglerighteq;': '⊵', + 'tridot;': '◬', + 'trie;': '≜', + 'triminus;': '⨺', + 'triplus;': '⨹', + 'trisb;': '⧍', + 'tritime;': '⨻', + 'trpezium;': '⏢', + 'tscr;': '𝓉', + 'tscy;': 'ц', + 'tshcy;': 'ћ', + 'tstrok;': 'ŧ', + 'twixt;': '≬', + 'twoheadleftarrow;': '↞', + 'twoheadrightarrow;': '↠', + 'uArr;': '⇑', + 'uHar;': '⥣', + uacute: 'ú', + 'uacute;': 'ú', + 'uarr;': '↑', + 'ubrcy;': 'ў', + 'ubreve;': 'ŭ', + ucirc: 'û', + 'ucirc;': 'û', + 'ucy;': 'у', + 'udarr;': '⇅', + 'udblac;': 'ű', + 'udhar;': '⥮', + 'ufisht;': '⥾', + 'ufr;': '𝔲', + ugrave: 'ù', + 'ugrave;': 'ù', + 'uharl;': '↿', + 'uharr;': '↾', + 'uhblk;': '▀', + 'ulcorn;': '⌜', + 'ulcorner;': '⌜', + 'ulcrop;': '⌏', + 'ultri;': '◸', + 'umacr;': 'ū', + uml: '¨', + 'uml;': '¨', + 'uogon;': 'ų', + 'uopf;': '𝕦', + 'uparrow;': '↑', + 'updownarrow;': '↕', + 'upharpoonleft;': '↿', + 'upharpoonright;': '↾', + 'uplus;': '⊎', + 'upsi;': 'υ', + 'upsih;': 'ϒ', + 'upsilon;': 'υ', + 'upuparrows;': '⇈', + 'urcorn;': '⌝', + 'urcorner;': '⌝', + 'urcrop;': '⌎', + 'uring;': 'ů', + 'urtri;': '◹', + 'uscr;': '𝓊', + 'utdot;': '⋰', + 'utilde;': 'ũ', + 'utri;': '▵', + 'utrif;': '▴', + 'uuarr;': '⇈', + uuml: 'ü', + 'uuml;': 'ü', + 'uwangle;': '⦧', + 'vArr;': '⇕', + 'vBar;': '⫨', + 'vBarv;': '⫩', + 'vDash;': '⊨', + 'vangrt;': '⦜', + 'varepsilon;': 'ϵ', + 'varkappa;': 'ϰ', + 'varnothing;': '∅', + 'varphi;': 'ϕ', + 'varpi;': 'ϖ', + 'varpropto;': '∝', + 'varr;': '↕', + 'varrho;': 'ϱ', + 'varsigma;': 'ς', + 'varsubsetneq;': '⊊︀', + 'varsubsetneqq;': '⫋︀', + 'varsupsetneq;': '⊋︀', + 'varsupsetneqq;': '⫌︀', + 'vartheta;': 'ϑ', + 'vartriangleleft;': '⊲', + 'vartriangleright;': '⊳', + 'vcy;': 'в', + 'vdash;': '⊢', + 'vee;': '∨', + 'veebar;': '⊻', + 'veeeq;': '≚', + 'vellip;': '⋮', + 'verbar;': '|', + 'vert;': '|', + 'vfr;': '𝔳', + 'vltri;': '⊲', + 'vnsub;': '⊂⃒', + 'vnsup;': '⊃⃒', + 'vopf;': '𝕧', + 'vprop;': '∝', + 'vrtri;': '⊳', + 'vscr;': '𝓋', + 'vsubnE;': '⫋︀', + 'vsubne;': '⊊︀', + 'vsupnE;': '⫌︀', + 'vsupne;': '⊋︀', + 'vzigzag;': '⦚', + 'wcirc;': 'ŵ', + 'wedbar;': '⩟', + 'wedge;': '∧', + 'wedgeq;': '≙', + 'weierp;': '℘', + 'wfr;': '𝔴', + 'wopf;': '𝕨', + 'wp;': '℘', + 'wr;': '≀', + 'wreath;': '≀', + 'wscr;': '𝓌', + 'xcap;': '⋂', + 'xcirc;': '◯', + 'xcup;': '⋃', + 'xdtri;': '▽', + 'xfr;': '𝔵', + 'xhArr;': '⟺', + 'xharr;': '⟷', + 'xi;': 'ξ', + 'xlArr;': '⟸', + 'xlarr;': '⟵', + 'xmap;': '⟼', + 'xnis;': '⋻', + 'xodot;': '⨀', + 'xopf;': '𝕩', + 'xoplus;': '⨁', + 'xotime;': '⨂', + 'xrArr;': '⟹', + 'xrarr;': '⟶', + 'xscr;': '𝓍', + 'xsqcup;': '⨆', + 'xuplus;': '⨄', + 'xutri;': '△', + 'xvee;': '⋁', + 'xwedge;': '⋀', + yacute: 'ý', + 'yacute;': 'ý', + 'yacy;': 'я', + 'ycirc;': 'ŷ', + 'ycy;': 'ы', + yen: '¥', + 'yen;': '¥', + 'yfr;': '𝔶', + 'yicy;': 'ї', + 'yopf;': '𝕪', + 'yscr;': '𝓎', + 'yucy;': 'ю', + yuml: 'ÿ', + 'yuml;': 'ÿ', + 'zacute;': 'ź', + 'zcaron;': 'ž', + 'zcy;': 'з', + 'zdot;': 'ż', + 'zeetrf;': 'ℨ', + 'zeta;': 'ζ', + 'zfr;': '𝔷', + 'zhcy;': 'ж', + 'zigrarr;': '⇝', + 'zopf;': '𝕫', + 'zscr;': '𝓏', + 'zwj;': '‍', + 'zwnj;': '‌' +}; + +const numeric = /&#(x)?([0-9a-f]+);/i; +const named = new RegExp( + `&(${Object.keys(entities) + .sort((a, b) => b.length - a.length) + .join('|')})`, + 'g' +); + +/** @param {string} str */ +export function decode(str) { + return str + .replace(numeric, (_match, hex, code) => String.fromCharCode(hex ? parseInt(code, 16) : +code)) + .replace(named, (_match, entity) => entities[entity]); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/fallback.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/fallback.js new file mode 100644 index 0000000000000000000000000000000000000000..39356887a2896401394a41be6a8fea32568b68fe --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/fallback.js @@ -0,0 +1,55 @@ +import { readFileSync } from 'node:fs'; +import { join } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { installPolyfills } from '../../exports/node/polyfills.js'; +import { load_config } from '../config/index.js'; +import { forked } from '../../utils/fork.js'; + +export default forked(import.meta.url, generate_fallback); + +/** + * @param {{ + * manifest_path: string; + * env: Record + * }} opts + */ +async function generate_fallback({ manifest_path, env }) { + /** @type {import('types').ValidatedKitConfig} */ + const config = (await load_config()).kit; + + installPolyfills(); + + const server_root = join(config.outDir, 'output'); + + /** @type {import('types').ServerInternalModule} */ + const { set_building } = await import(pathToFileURL(`${server_root}/server/internal.js`).href); + + /** @type {import('types').ServerModule} */ + const { Server } = await import(pathToFileURL(`${server_root}/server/index.js`).href); + + /** @type {import('@sveltejs/kit').SSRManifest} */ + const manifest = (await import(pathToFileURL(manifest_path).href)).manifest; + + set_building(); + + const server = new Server(manifest); + await server.init({ env }); + + const response = await server.respond(new Request(config.prerender.origin + '/[fallback]'), { + getClientAddress: () => { + throw new Error('Cannot read clientAddress during prerendering'); + }, + prerendering: { + fallback: true, + dependencies: new Map(), + remote_responses: new Map() + }, + read: (file) => readFileSync(join(config.files.assets, file)) + }); + + if (response.ok) { + return await response.text(); + } + + throw new Error(`Could not create a fallback page — failed with status ${response.status}`); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js new file mode 100644 index 0000000000000000000000000000000000000000..12223d2722ce1c320c1daf15e748d1845e2b4602 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js @@ -0,0 +1,597 @@ +import { existsSync, readFileSync, statSync, writeFileSync } from 'node:fs'; +import { dirname, join } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { installPolyfills } from '../../exports/node/polyfills.js'; +import { mkdirp, posixify, walk } from '../../utils/filesystem.js'; +import { noop } from '../../utils/functions.js'; +import { decode_uri, is_root_relative, resolve } from '../../utils/url.js'; +import { escape_html } from '../../utils/escape.js'; +import { logger } from '../utils.js'; +import { load_config } from '../config/index.js'; +import { get_route_segments } from '../../utils/routing.js'; +import { queue } from './queue.js'; +import { crawl } from './crawl.js'; +import { forked } from '../../utils/fork.js'; +import * as devalue from 'devalue'; +import { createReadableStream } from '@sveltejs/kit/node'; +import generate_fallback from './fallback.js'; +import { stringify_remote_arg } from '../../runtime/shared.js'; +import { filter_env } from '../../utils/env.js'; + +export default forked(import.meta.url, prerender); + +// https://html.spec.whatwg.org/multipage/browsing-the-web.html#scrolling-to-a-fragment +// "If fragment is the empty string, then return the special value top of the document." +// ...and +// "If decodedFragment is an ASCII case-insensitive match for the string 'top', then return the top of the document." +const SPECIAL_HASHLINKS = new Set(['', 'top']); + +/** + * @param {{ + * hash: boolean; + * out: string; + * manifest_path: string; + * metadata: import('types').ServerMetadata; + * verbose: boolean; + * env: Record + * }} opts + */ +async function prerender({ hash, out, manifest_path, metadata, verbose, env }) { + /** @type {import('@sveltejs/kit').SSRManifest} */ + const manifest = (await import(pathToFileURL(manifest_path).href)).manifest; + + /** @type {import('types').ServerInternalModule} */ + const internal = await import(pathToFileURL(`${out}/server/internal.js`).href); + + /** @type {import('types').ServerModule} */ + const { Server } = await import(pathToFileURL(`${out}/server/index.js`).href); + + // configure `import { building } from '$app/environment'` — + // essential we do this before analysing the code + internal.set_building(); + internal.set_prerendering(); + + /** + * @template {{message: string}} T + * @template {Omit} K + * @param {import('types').Logger} log + * @param {'fail' | 'warn' | 'ignore' | ((details: T) => void)} input + * @param {(details: K) => string} format + * @returns {(details: K) => void} + */ + function normalise_error_handler(log, input, format) { + switch (input) { + case 'fail': + return (details) => { + throw new Error(format(details)); + }; + case 'warn': + return (details) => { + log.error(format(details)); + }; + case 'ignore': + return noop; + default: + // @ts-expect-error TS thinks T might be of a different kind, but it's not + return (details) => input({ ...details, message: format(details) }); + } + } + + const OK = 2; + const REDIRECT = 3; + + /** @type {import('types').Prerendered} */ + const prerendered = { + pages: new Map(), + assets: new Map(), + redirects: new Map(), + paths: [] + }; + + /** @type {import('types').PrerenderMap} */ + const prerender_map = new Map(); + + for (const [id, { prerender }] of metadata.routes) { + if (prerender !== undefined) { + prerender_map.set(id, prerender); + } + } + + /** @type {Set} */ + const prerendered_routes = new Set(); + + /** @type {import('types').ValidatedKitConfig} */ + const config = (await load_config()).kit; + + if (hash) { + const fallback = await generate_fallback({ + manifest_path, + env + }); + + const file = output_filename('/', true); + const dest = `${config.outDir}/output/prerendered/pages/${file}`; + + mkdirp(dirname(dest)); + writeFileSync(dest, fallback); + + prerendered.pages.set('/', { file }); + + return { prerendered, prerender_map }; + } + + const emulator = await config.adapter?.emulate?.(); + + /** @type {import('types').Logger} */ + const log = logger({ verbose }); + + installPolyfills(); + + /** @type {Map} */ + const saved = new Map(); + + const handle_http_error = normalise_error_handler( + log, + config.prerender.handleHttpError, + ({ status, path, referrer, referenceType }) => { + const message = + status === 404 && !path.startsWith(config.paths.base) + ? `${path} does not begin with \`base\`, which is configured in \`paths.base\` and can be imported from \`$app/paths\` - see https://svelte.dev/docs/kit/configuration#paths for more info` + : path; + + return `${status} ${message}${referrer ? ` (${referenceType} from ${referrer})` : ''}`; + } + ); + + const handle_missing_id = normalise_error_handler( + log, + config.prerender.handleMissingId, + ({ path, id, referrers }) => { + return ( + `The following pages contain links to ${path}#${id}, but no element with id="${id}" exists on ${path} - see the \`handleMissingId\` option in https://svelte.dev/docs/kit/configuration#prerender for more info:` + + referrers.map((l) => `\n - ${l}`).join('') + ); + } + ); + + const handle_entry_generator_mismatch = normalise_error_handler( + log, + config.prerender.handleEntryGeneratorMismatch, + ({ generatedFromId, entry, matchedId }) => { + return `The entries export from ${generatedFromId} generated entry ${entry}, which was matched by ${matchedId} - see the \`handleEntryGeneratorMismatch\` option in https://svelte.dev/docs/kit/configuration#prerender for more info.`; + } + ); + + const handle_not_prerendered_route = normalise_error_handler( + log, + config.prerender.handleUnseenRoutes, + ({ routes }) => { + const list = routes.map((id) => ` - ${id}`).join('\n'); + return `The following routes were marked as prerenderable, but were not prerendered because they were not found while crawling your app:\n${list}\n\nSee the \`handleUnseenRoutes\` option in https://svelte.dev/docs/kit/configuration#prerender for more info.`; + } + ); + + const q = queue(config.prerender.concurrency); + + /** + * @param {string} path + * @param {boolean} is_html + */ + function output_filename(path, is_html) { + const file = path.slice(config.paths.base.length + 1) || 'index.html'; + + if (is_html && !file.endsWith('.html')) { + return file + (file.endsWith('/') ? 'index.html' : '.html'); + } + + return file; + } + + const files = new Set(walk(`${out}/client`).map(posixify)); + files.add(`${config.appDir}/env.js`); + + const immutable = `${config.appDir}/immutable`; + if (existsSync(`${out}/server/${immutable}`)) { + for (const file of walk(`${out}/server/${immutable}`)) { + files.add(posixify(`${config.appDir}/immutable/${file}`)); + } + } + + const remote_prefix = `${config.paths.base}/${config.appDir}/remote/`; + + const seen = new Set(); + const written = new Set(); + const remote_responses = new Map(); + + /** @type {Map>} */ + const expected_hashlinks = new Map(); + + /** @type {Map} */ + const actual_hashlinks = new Map(); + + /** + * @param {string | null} referrer + * @param {string} decoded + * @param {string} [encoded] + * @param {string} [generated_from_id] + */ + function enqueue(referrer, decoded, encoded, generated_from_id) { + if (seen.has(decoded)) return; + seen.add(decoded); + + const file = decoded.slice(config.paths.base.length + 1); + if (files.has(file)) return; + + return q.add(() => visit(decoded, encoded || encodeURI(decoded), referrer, generated_from_id)); + } + + /** + * @param {string} decoded + * @param {string} encoded + * @param {string?} referrer + * @param {string} [generated_from_id] + */ + async function visit(decoded, encoded, referrer, generated_from_id) { + if (!decoded.startsWith(config.paths.base)) { + handle_http_error({ status: 404, path: decoded, referrer, referenceType: 'linked' }); + return; + } + + /** @type {Map} */ + const dependencies = new Map(); + + const response = await server.respond(new Request(config.prerender.origin + encoded), { + getClientAddress() { + throw new Error('Cannot read clientAddress during prerendering'); + }, + prerendering: { + dependencies, + remote_responses + }, + read: (file) => { + // stuff we just wrote + const filepath = saved.get(file); + if (filepath) return readFileSync(filepath); + + // Static assets emitted during build + if (file.startsWith(config.appDir)) { + return readFileSync(`${out}/server/${file}`); + } + + // stuff in `static` + return readFileSync(join(config.files.assets, file)); + }, + emulator + }); + + const encoded_id = response.headers.get('x-sveltekit-routeid'); + const decoded_id = encoded_id && decode_uri(encoded_id); + if ( + decoded_id !== null && + generated_from_id !== undefined && + decoded_id !== generated_from_id + ) { + handle_entry_generator_mismatch({ + generatedFromId: generated_from_id, + entry: decoded, + matchedId: decoded_id + }); + } + + const body = Buffer.from(await response.arrayBuffer()); + + const category = decoded.startsWith(remote_prefix) ? 'data' : 'pages'; + save(category, response, body, decoded, encoded, referrer, 'linked'); + + for (const [dependency_path, result] of dependencies) { + // this seems circuitous, but using new URL allows us to not care + // whether dependency_path is encoded or not + const encoded_dependency_path = new URL(dependency_path, 'http://localhost').pathname; + const decoded_dependency_path = decode_uri(encoded_dependency_path); + + const headers = Object.fromEntries(result.response.headers); + + const prerender = headers['x-sveltekit-prerender']; + if (prerender) { + const encoded_route_id = headers['x-sveltekit-routeid']; + if (encoded_route_id != null) { + const route_id = decode_uri(encoded_route_id); + const existing_value = prerender_map.get(route_id); + if (existing_value !== 'auto') { + prerender_map.set(route_id, prerender === 'true' ? true : 'auto'); + } + } + } + + const body = result.body ?? new Uint8Array(await result.response.arrayBuffer()); + + const category = decoded_dependency_path.startsWith(remote_prefix) ? 'data' : 'dependencies'; + + save( + category, + result.response, + body, + decoded_dependency_path, + encoded_dependency_path, + decoded, + 'fetched' + ); + } + + // avoid triggering `filterSerializeResponseHeaders` guard + const headers = Object.fromEntries(response.headers); + + // if it's a 200 HTML response, crawl it. Skip error responses, as we don't save those + if (response.ok && config.prerender.crawl && headers['content-type'] === 'text/html') { + const { ids, hrefs } = crawl(body.toString(), decoded); + + actual_hashlinks.set(decoded, ids); + + /** @param {string} href */ + const removePrerenderOrigin = (href) => { + if (href.startsWith(config.prerender.origin)) { + if (href === config.prerender.origin) return '/'; + if (href.at(config.prerender.origin.length) !== '/') return href; + return href.slice(config.prerender.origin.length); + } + return href; + }; + + for (const href of hrefs.map(removePrerenderOrigin)) { + if (!is_root_relative(href)) continue; + + const { pathname, search, hash } = new URL(href, 'http://localhost'); + + if (search) { + // TODO warn that query strings have no effect on statically-exported pages + } + + if (hash) { + const key = decode_uri(pathname + hash); + + if (!expected_hashlinks.has(key)) { + expected_hashlinks.set(key, new Set()); + } + + /** @type {Set} */ (expected_hashlinks.get(key)).add(decoded); + } + + void enqueue(decoded, decode_uri(pathname), pathname); + } + } + } + + /** + * @param {'pages' | 'dependencies' | 'data'} category + * @param {Response} response + * @param {string | Uint8Array} body + * @param {string} decoded + * @param {string} encoded + * @param {string | null} referrer + * @param {'linked' | 'fetched'} referenceType + */ + function save(category, response, body, decoded, encoded, referrer, referenceType) { + const response_type = Math.floor(response.status / 100); + const headers = Object.fromEntries(response.headers); + + const type = headers['content-type']; + const is_html = response_type === REDIRECT || type === 'text/html'; + + const file = output_filename(decoded, is_html); + const dest = `${config.outDir}/output/prerendered/${category}/${file}`; + + if (written.has(file)) return; + + const encoded_route_id = response.headers.get('x-sveltekit-routeid'); + const route_id = encoded_route_id != null ? decode_uri(encoded_route_id) : null; + if (route_id !== null) prerendered_routes.add(route_id); + + if (response_type === REDIRECT) { + const location = headers['location']; + + if (location) { + const resolved = resolve(encoded, location); + if (is_root_relative(resolved)) { + void enqueue(decoded, decode_uri(resolved), resolved); + } + + if (!headers['x-sveltekit-normalize']) { + mkdirp(dirname(dest)); + + log.warn(`${response.status} ${decoded} -> ${location}`); + + writeFileSync( + dest, + `` + ); + + written.add(file); + + if (!prerendered.redirects.has(decoded)) { + prerendered.redirects.set(decoded, { + status: response.status, + location: resolved + }); + + prerendered.paths.push(decoded); + } + } + } else { + log.warn(`location header missing on redirect received from ${decoded}`); + } + + return; + } + + if (response.status === 200) { + if (existsSync(dest) && statSync(dest).isDirectory()) { + throw new Error( + `Cannot save ${decoded} as it is already a directory. See https://svelte.dev/docs/kit/page-options#prerender-route-conflicts for more information` + ); + } + + const dir = dirname(dest); + + if (existsSync(dir) && !statSync(dir).isDirectory()) { + const parent = decoded.split('/').slice(0, -1).join('/'); + throw new Error( + `Cannot save ${decoded} as ${parent} is already a file. See https://svelte.dev/docs/kit/page-options#prerender-route-conflicts for more information` + ); + } + + mkdirp(dir); + + log.info(`${response.status} ${decoded}`); + writeFileSync(dest, body); + written.add(file); + + if (is_html) { + prerendered.pages.set(decoded, { + file + }); + } else { + prerendered.assets.set(decoded, { + type + }); + } + + prerendered.paths.push(decoded); + } else if (response_type !== OK) { + handle_http_error({ status: response.status, path: decoded, referrer, referenceType }); + } + + manifest.assets.add(file); + saved.set(file, dest); + } + + /** @type {Array<{ id: string, entries: Array}>} */ + const route_level_entries = []; + for (const [id, { entries }] of metadata.routes.entries()) { + if (entries) { + route_level_entries.push({ id, entries }); + } + } + + let should_prerender = false; + + for (const value of prerender_map.values()) { + if (value) { + should_prerender = true; + break; + } + } + + // the user's remote function modules may reference environment variables, + // `read` or the `manifest` at the top-level so we need to set them before + // evaluating those modules to avoid potential runtime errors + const { publicPrefix: public_prefix, privatePrefix: private_prefix } = config.env; + const private_env = filter_env(env, private_prefix, public_prefix); + const public_env = filter_env(env, public_prefix, private_prefix); + internal.set_private_env(private_env); + internal.set_public_env(public_env); + internal.set_manifest(manifest); + internal.set_read_implementation((file) => createReadableStream(`${out}/server/${file}`)); + + /** @type {Array} */ + const prerender_functions = []; + + for (const loader of Object.values(manifest._.remotes)) { + const module = await loader(); + + for (const fn of Object.values(module.default)) { + if (fn?.__?.type === 'prerender') { + prerender_functions.push(fn.__); + should_prerender = true; + } + } + } + + if (!should_prerender) { + return { prerendered, prerender_map }; + } + + // only run the server after the `should_prerender` check so that we + // don't run the user's init hook unnecessarily + const server = new Server(manifest); + await server.init({ + env, + read: (file) => createReadableStream(`${config.outDir}/output/server/${file}`) + }); + + log.info('Prerendering'); + + for (const entry of config.prerender.entries) { + if (entry === '*') { + for (const [id, prerender] of prerender_map) { + if (prerender) { + // remove optional parameters from the route + const segments = get_route_segments(id).filter((segment) => !segment.startsWith('[[')); + const processed_id = '/' + segments.join('/'); + + if (processed_id.includes('[')) continue; + const path = `/${get_route_segments(processed_id).join('/')}`; + void enqueue(null, config.paths.base + path); + } + } + } else { + void enqueue(null, config.paths.base + entry); + } + } + + for (const { id, entries } of route_level_entries) { + for (const entry of entries) { + void enqueue(null, config.paths.base + entry, undefined, id); + } + } + + const transport = (await internal.get_hooks()).transport ?? {}; + for (const internals of prerender_functions) { + if (internals.has_arg) { + for (const arg of (await internals.inputs?.()) ?? []) { + void enqueue( + null, + remote_prefix + internals.id + '/' + stringify_remote_arg(arg, transport) + ); + } + } else { + void enqueue(null, remote_prefix + internals.id); + } + } + + await q.done(); + + // handle invalid fragment links + for (const [key, referrers] of expected_hashlinks) { + const index = key.indexOf('#'); + const path = key.slice(0, index); + const id = key.slice(index + 1); + + const hashlinks = actual_hashlinks.get(path); + // ignore fragment links to pages that were not prerendered + if (!hashlinks) continue; + + if (!hashlinks.includes(id) && !SPECIAL_HASHLINKS.has(id)) { + handle_missing_id({ id, path, referrers: Array.from(referrers) }); + } + } + + /** @type {string[]} */ + const not_prerendered = []; + + for (const [route_id, prerender] of prerender_map) { + if (prerender === true && !prerendered_routes.has(route_id)) { + not_prerendered.push(route_id); + } + } + + if (not_prerendered.length > 0) { + handle_not_prerendered_route({ routes: not_prerendered }); + } + + return { prerendered, prerender_map }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/queue.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/queue.js new file mode 100644 index 0000000000000000000000000000000000000000..a816e6eb2350c16835e99509e0c4bca2b116640d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/postbuild/queue.js @@ -0,0 +1,72 @@ +/** @import { PromiseWithResolvers } from '../../utils/promise.js' */ +import { with_resolvers } from '../../utils/promise.js'; + +/** + * @typedef {{ + * fn: () => Promise, + * fulfil: (value: any) => void, + * reject: (error: Error) => void + * }} Task + */ + +/** @param {number} concurrency */ +export function queue(concurrency) { + /** @type {Task[]} */ + const tasks = []; + const { promise, resolve, reject } = /** @type {PromiseWithResolvers} */ (with_resolvers()); + + let current = 0; + let closed = false; + + promise.catch(() => { + // this is necessary in case a catch handler is never added + // to the done promise by the user + }); + + function dequeue() { + if (current < concurrency) { + const task = tasks.shift(); + + if (task) { + current += 1; + const promise = Promise.resolve(task.fn()); + + void promise + .then(task.fulfil, (err) => { + task.reject(err); + reject(err); + }) + .then(() => { + current -= 1; + dequeue(); + }); + } else if (current === 0) { + closed = true; + resolve(); + } + } + } + + return { + /** @param {() => any} fn */ + add: (fn) => { + if (closed) throw new Error('Cannot add tasks to a queue that has ended'); + + const promise = new Promise((fulfil, reject) => { + tasks.push({ fn, fulfil, reject }); + }); + + dequeue(); + return promise; + }, + + done: () => { + if (current === 0) { + closed = true; + resolve(); + } + + return promise; + } + }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/conflict.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/conflict.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5facdc78dd5c43e64ca0c641ed583c7d7adf1e63 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/index.js @@ -0,0 +1,613 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import colors from 'kleur'; +import { lookup } from 'mrmime'; +import { list_files, runtime_directory } from '../../utils.js'; +import { posixify, resolve_entry } from '../../../utils/filesystem.js'; +import { parse_route_id } from '../../../utils/routing.js'; +import { sort_routes } from './sort.js'; +import { isSvelte5Plus } from '../utils.js'; +import { + create_node_analyser, + get_page_options +} from '../../../exports/vite/static_analysis/index.js'; + +/** + * Generates the manifest data used for the client-side manifest and types generation. + * @param {{ + * config: import('types').ValidatedConfig; + * fallback?: string; + * cwd?: string; + * }} opts + * @returns {import('types').ManifestData} + */ +export default function create_manifest_data({ + config, + fallback = `${runtime_directory}/components/${isSvelte5Plus() ? 'svelte-5' : 'svelte-4'}`, + cwd = process.cwd() +}) { + const assets = create_assets(config); + const hooks = create_hooks(config, cwd); + const matchers = create_matchers(config, cwd); + const { nodes, routes } = create_routes_and_nodes(cwd, config, fallback); + + for (const route of routes) { + for (const param of route.params) { + if (param.matcher && !matchers[param.matcher]) { + throw new Error(`No matcher found for parameter '${param.matcher}' in route ${route.id}`); + } + } + } + + return { + assets, + hooks, + matchers, + nodes, + routes + }; +} + +/** + * @param {import('types').ValidatedConfig} config + */ +export function create_assets(config) { + return list_files(config.kit.files.assets).map((file) => ({ + file, + size: fs.statSync(path.resolve(config.kit.files.assets, file)).size, + type: lookup(file) || null + })); +} + +/** + * @param {import('types').ValidatedConfig} config + * @param {string} cwd + */ +function create_hooks(config, cwd) { + const client = resolve_entry(config.kit.files.hooks.client); + const server = resolve_entry(config.kit.files.hooks.server); + const universal = resolve_entry(config.kit.files.hooks.universal); + + return { + client: client && posixify(path.relative(cwd, client)), + server: server && posixify(path.relative(cwd, server)), + universal: universal && posixify(path.relative(cwd, universal)) + }; +} + +/** + * @param {import('types').ValidatedConfig} config + * @param {string} cwd + */ +function create_matchers(config, cwd) { + const params_base = path.relative(cwd, config.kit.files.params); + + /** @type {Record} */ + const matchers = {}; + if (fs.existsSync(config.kit.files.params)) { + for (const file of fs.readdirSync(config.kit.files.params)) { + const ext = path.extname(file); + if (!config.kit.moduleExtensions.includes(ext)) continue; + const type = file.slice(0, -ext.length); + + if (/^\w+$/.test(type)) { + const matcher_file = path.join(params_base, file); + + // Disallow same matcher with different extensions + if (matchers[type]) { + throw new Error(`Duplicate matchers: ${matcher_file} and ${matchers[type]}`); + } else { + matchers[type] = matcher_file; + } + } else { + // Allow for matcher test collocation + if (type.endsWith('.test') || type.endsWith('.spec')) continue; + + throw new Error( + `Matcher names can only have underscores and alphanumeric characters — "${file}" is invalid` + ); + } + } + } + + return matchers; +} + +/** + * @param {import('types').ValidatedConfig} config + * @param {string} cwd + * @param {string} fallback + */ +function create_routes_and_nodes(cwd, config, fallback) { + /** @type {import('types').RouteData[]} */ + const routes = []; + + const routes_base = posixify(path.relative(cwd, config.kit.files.routes)); + + const valid_extensions = [...config.extensions, ...config.kit.moduleExtensions]; + + /** @type {import('types').PageNode[]} */ + const nodes = []; + + if (fs.existsSync(config.kit.files.routes)) { + /** + * @param {number} depth + * @param {string} id + * @param {string} segment + * @param {import('types').RouteData | null} parent + */ + const walk = (depth, id, segment, parent) => { + const unescaped = id.replace(/\[([ux])\+([^\]]+)\]/gi, (match, type, code) => { + if (match !== match.toLowerCase()) { + throw new Error(`Character escape sequence in ${id} must be lowercase`); + } + + if (!/[0-9a-f]+/.test(code)) { + throw new Error(`Invalid character escape sequence in ${id}`); + } + + if (type === 'x') { + if (code.length !== 2) { + throw new Error(`Hexadecimal escape sequence in ${id} must be two characters`); + } + + return String.fromCharCode(parseInt(code, 16)); + } else { + if (code.length < 4 || code.length > 6) { + throw new Error( + `Unicode escape sequence in ${id} must be between four and six characters` + ); + } + + return String.fromCharCode(parseInt(code, 16)); + } + }); + + if (/\]\[/.test(unescaped)) { + throw new Error(`Invalid route ${id} — parameters must be separated`); + } + + if (count_occurrences('[', id) !== count_occurrences(']', id)) { + throw new Error(`Invalid route ${id} — brackets are unbalanced`); + } + + if (/#/.test(segment)) { + // Vite will barf on files with # in them + throw new Error(`Route ${id} should be renamed to ${id.replace(/#/g, '[x+23]')}`); + } + + if (/\[\.\.\.\w+\]\/\[\[/.test(id)) { + throw new Error( + `Invalid route ${id} — an [[optional]] route segment cannot follow a [...rest] route segment` + ); + } + + if (/\[\[\.\.\./.test(id)) { + throw new Error( + `Invalid route ${id} — a rest route segment is always optional, remove the outer square brackets` + ); + } + + const { pattern, params } = parse_route_id(id); + + /** @type {import('types').RouteData} */ + const route = { + id, + parent, + + segment, + pattern, + params, + + layout: null, + error: null, + leaf: null, + page: null, + endpoint: null + }; + + // important to do this before walking children, so that child + // routes appear later + routes.push(route); + + // if we don't do this, the route map becomes unwieldy to console.log + Object.defineProperty(route, 'parent', { enumerable: false }); + + const dir = path.join(cwd, routes_base, id); + + // We can't use withFileTypes because of a NodeJs bug which returns wrong results + // with isDirectory() in case of symlinks: https://github.com/nodejs/node/issues/30646 + const files = fs.readdirSync(dir).map((name) => ({ + is_dir: fs.statSync(path.join(dir, name)).isDirectory(), + name + })); + + // process files first + for (const file of files) { + if (file.is_dir) continue; + + const ext = valid_extensions.find((ext) => file.name.endsWith(ext)); + if (!ext) continue; + + if (!file.name.startsWith('+')) { + const name = file.name.slice(0, -ext.length); + // check if it is a valid route filename but missing the + prefix + const typo = + /^(?:(page(?:@(.*))?)|(layout(?:@(.*))?)|(error))$/.test(name) || + /^(?:(server)|(page(?:(@[a-zA-Z0-9_-]*))?(\.server)?)|(layout(?:(@[a-zA-Z0-9_-]*))?(\.server)?))$/.test( + name + ); + if (typo) { + console.log( + colors + .bold() + .yellow( + `Missing route file prefix. Did you mean +${file.name}?` + + ` at ${path.join(dir, file.name)}` + ) + ); + } + + continue; + } + + if (file.name.endsWith('.d.ts')) { + let name = file.name.slice(0, -5); + const ext = valid_extensions.find((ext) => name.endsWith(ext)); + if (ext) name = name.slice(0, -ext.length); + + const valid = + /^\+(?:(page(?:@(.*))?)|(layout(?:@(.*))?)|(error))$/.test(name) || + /^\+(?:(server)|(page(?:(@[a-zA-Z0-9_-]*))?(\.server)?)|(layout(?:(@[a-zA-Z0-9_-]*))?(\.server)?))$/.test( + name + ); + + if (valid) continue; + } + + const project_relative = posixify(path.relative(cwd, path.join(dir, file.name))); + + const item = analyze( + project_relative, + file.name, + config.extensions, + config.kit.moduleExtensions + ); + + if (config.kit.router.type === 'hash' && item.kind === 'server') { + throw new Error( + `Cannot use server-only files in an app with \`router.type === 'hash': ${project_relative}` + ); + } + + /** + * @param {string} type + * @param {string} existing_file + */ + function duplicate_files_error(type, existing_file) { + return new Error( + `Multiple ${type} files found in ${routes_base}${route.id} : ${path.basename( + existing_file + )} and ${file.name}` + ); + } + + if (item.kind === 'component') { + if (item.is_error) { + route.error = { + depth, + component: project_relative + }; + } else if (item.is_layout) { + if (!route.layout) { + route.layout = { depth, child_pages: [] }; + } else if (route.layout.component) { + throw duplicate_files_error('layout component', route.layout.component); + } + + route.layout.component = project_relative; + if (item.uses_layout !== undefined) route.layout.parent_id = item.uses_layout; + } else { + if (!route.leaf) { + route.leaf = { depth }; + } else if (route.leaf.component) { + throw duplicate_files_error('page component', route.leaf.component); + } + + route.leaf.component = project_relative; + if (item.uses_layout !== undefined) route.leaf.parent_id = item.uses_layout; + } + } else if (item.is_layout) { + if (!route.layout) { + route.layout = { depth, child_pages: [] }; + } else if (route.layout[item.kind]) { + throw duplicate_files_error( + item.kind + ' layout module', + /** @type {string} */ (route.layout[item.kind]) + ); + } + + route.layout[item.kind] = project_relative; + } else if (item.is_page) { + if (!route.leaf) { + route.leaf = { depth }; + } else if (route.leaf[item.kind]) { + throw duplicate_files_error( + item.kind + ' page module', + /** @type {string} */ (route.leaf[item.kind]) + ); + } + + route.leaf[item.kind] = project_relative; + } else { + if (route.endpoint) { + throw duplicate_files_error('endpoint', route.endpoint.file); + } + + route.endpoint = { + file: project_relative, + page_options: null // will be filled later + }; + } + } + + // then handle children + for (const file of files) { + if (file.is_dir) { + walk(depth + 1, path.posix.join(id, file.name), file.name, route); + } + } + }; + + walk(0, '/', '', null); + + if (routes.length === 1) { + const root = routes[0]; + if (!root.leaf && !root.error && !root.layout && !root.endpoint) { + throw new Error( + 'No routes found. If you are using a custom src/routes directory, make sure it is specified in your Svelte config file' + ); + } + } + } else { + // If there's no routes directory, we'll just create a single empty route. This ensures the root layout and + // error components are included in the manifest, which is needed for subsequent build/dev commands to work + routes.push({ + id: '/', + segment: '', + pattern: /^$/, + params: [], + parent: null, + layout: null, + error: null, + leaf: null, + page: null, + endpoint: null + }); + } + + prevent_conflicts(routes); + + const root = routes[0]; + + if (!root.layout?.component) { + if (!root.layout) root.layout = { depth: 0, child_pages: [] }; + root.layout.component = posixify(path.relative(cwd, `${fallback}/layout.svelte`)); + } + + if (!root.error?.component) { + if (!root.error) root.error = { depth: 0 }; + root.error.component = posixify(path.relative(cwd, `${fallback}/error.svelte`)); + } + + // we do layouts/errors first as they are more likely to be reused, + // and smaller indexes take fewer bytes. also, this guarantees that + // the default error/layout are 0/1 + for (const route of routes) { + if (route.layout) { + if (!route.layout?.component) { + route.layout.component = posixify(path.relative(cwd, `${fallback}/layout.svelte`)); + } + nodes.push(route.layout); + } + if (route.error) nodes.push(route.error); + } + + for (const route of routes) { + if (route.leaf) nodes.push(route.leaf); + } + + const indexes = new Map(nodes.map((node, i) => [node, i])); + + const node_analyser = create_node_analyser(); + + for (const route of routes) { + if (!route.leaf) continue; + + route.page = { + layouts: [], + errors: [], + leaf: /** @type {number} */ (indexes.get(route.leaf)) + }; + + /** @type {import('types').RouteData | null} */ + let current_route = route; + let current_node = route.leaf; + let parent_id = route.leaf.parent_id; + + while (current_route) { + if (parent_id === undefined || current_route.segment === parent_id) { + if (current_route.layout || current_route.error) { + route.page.layouts.unshift( + current_route.layout ? indexes.get(current_route.layout) : undefined + ); + route.page.errors.unshift( + current_route.error ? indexes.get(current_route.error) : undefined + ); + } + + if (current_route.layout) { + /** @type {import('types').PageNode[]} */ (current_route.layout.child_pages).push( + route.leaf + ); + current_node.parent = current_node = current_route.layout; + parent_id = current_node.parent_id; + } else { + parent_id = undefined; + } + } + + current_route = current_route.parent; + } + + if (parent_id !== undefined) { + throw new Error(`${current_node.component} references missing segment "${parent_id}"`); + } + } + + for (const node of nodes) { + node.page_options = node_analyser.get_page_options(node); + } + + for (const route of routes) { + if (route.endpoint) { + route.endpoint.page_options = get_page_options(route.endpoint.file); + } + } + + return { + nodes, + routes: sort_routes(routes) + }; +} + +/** + * @param {string} project_relative + * @param {string} file + * @param {string[]} component_extensions + * @param {string[]} module_extensions + * @returns {import('./types.js').RouteFile} + */ +function analyze(project_relative, file, component_extensions, module_extensions) { + const component_extension = component_extensions.find((ext) => file.endsWith(ext)); + if (component_extension) { + const name = file.slice(0, -component_extension.length); + const pattern = /^\+(?:(page(?:@(.*))?)|(layout(?:@(.*))?)|(error))$/; + const match = pattern.exec(name); + if (!match) { + throw new Error(`Files prefixed with + are reserved (saw ${project_relative})`); + } + + return { + kind: 'component', + is_page: !!match[1], + is_layout: !!match[3], + is_error: !!match[5], + uses_layout: match[2] ?? match[4] + }; + } + + const module_extension = module_extensions.find((ext) => file.endsWith(ext)); + if (module_extension) { + const name = file.slice(0, -module_extension.length); + const pattern = + /^\+(?:(server)|(page(?:(@[a-zA-Z0-9_-]*))?(\.server)?)|(layout(?:(@[a-zA-Z0-9_-]*))?(\.server)?))$/; + const match = pattern.exec(name); + if (!match) { + throw new Error(`Files prefixed with + are reserved (saw ${project_relative})`); + } else if (match[3] || match[6]) { + throw new Error( + // prettier-ignore + `Only Svelte files can reference named layouts. Remove '${match[3] || match[6]}' from ${file} (at ${project_relative})` + ); + } + + const kind = match[1] || match[4] || match[7] ? 'server' : 'universal'; + + return { + kind, + is_page: !!match[2], + is_layout: !!match[5] + }; + } + + throw new Error(`Files and directories prefixed with + are reserved (saw ${project_relative})`); +} + +/** + * @param {string} needle + * @param {string} haystack + */ +function count_occurrences(needle, haystack) { + let count = 0; + for (let i = 0; i < haystack.length; i += 1) { + if (haystack[i] === needle) count += 1; + } + return count; +} + +/** @param {import('types').RouteData[]} routes */ +function prevent_conflicts(routes) { + /** @type {Map} */ + const lookup = new Map(); + + for (const route of routes) { + if (!route.leaf && !route.endpoint) continue; + + const normalized = normalize_route_id(route.id); + + // find all permutations created by optional parameters + const split = normalized.split(/<\?(.+?)>/g); + + let permutations = [/** @type {string} */ (split[0])]; + + // turn `x/[[optional]]/y` into `x/y` and `x/[required]/y` + for (let i = 1; i < split.length; i += 2) { + const matcher = split[i]; + const next = split[i + 1]; + + permutations = permutations.reduce((a, b) => { + a.push(b + next); + if (!(matcher === '*' && b.endsWith('//'))) a.push(b + `<${matcher}>${next}`); + return a; + }, /** @type {string[]} */ ([])); + } + + for (const permutation of permutations) { + // remove leading/trailing/duplicated slashes caused by prior + // manipulation of optional parameters and (groups) + const key = permutation + .replace(/\/{2,}/, '/') + .replace(/^\//, '') + .replace(/\/$/, ''); + + if (lookup.has(key)) { + throw new Error( + `The "${lookup.get(key)}" and "${route.id}" routes conflict with each other` + ); + } + + lookup.set(key, route.id); + } + } +} + +/** @param {string} id */ +function normalize_route_id(id) { + return ( + id + // remove groups + .replace(/(?<=^|\/)\(.+?\)(?=$|\/)/g, '') + + .replace(/\[[ux]\+([0-9a-f]+)\]/g, (_, x) => + String.fromCharCode(parseInt(x, 16)).replace(/\//g, '%2f') + ) + + // replace `[param]` with `<*>`, `[param=x]` with ``, and `[[param]]` with `` + .replace( + /\[(?:(\[)|(\.\.\.))?.+?(=.+?)?\]\]?/g, + (_, optional, rest, matcher) => `<${optional ? '?' : ''}${rest ?? ''}${matcher ?? '*'}>` + ) + ); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/sort.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/sort.js new file mode 100644 index 0000000000000000000000000000000000000000..1629d146bf3e9b6dc4cc63eb66fbc98d11323e40 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/sort.js @@ -0,0 +1,162 @@ +import { get_route_segments } from '../../../utils/routing.js'; + +/** + * @typedef {{ + * type: 'static' | 'required' | 'optional' | 'rest'; + * content: string; + * matched: boolean; + * }} Part + */ + +/** + * @typedef {Part[]} Segment + */ + +const EMPTY = { type: 'static', content: '', matched: false }; + +/** @param {import('types').RouteData[]} routes */ +export function sort_routes(routes) { + /** @type {Map} */ + const segment_cache = new Map(); + + /** @param {string} segment */ + function get_parts(segment) { + if (!segment_cache.has(segment)) { + segment_cache.set(segment, split(segment)); + } + + return segment_cache.get(segment); + } + + /** @param {string} id */ + function split(id) { + /** @type {Part[]} */ + const parts = []; + + let i = 0; + while (i <= id.length) { + const start = id.indexOf('[', i); + if (start === -1) { + parts.push({ type: 'static', content: id.slice(i), matched: false }); + break; + } + + parts.push({ type: 'static', content: id.slice(i, start), matched: false }); + + const type = id[start + 1] === '[' ? 'optional' : id[start + 1] === '.' ? 'rest' : 'required'; + const delimiter = type === 'optional' ? ']]' : ']'; + const end = id.indexOf(delimiter, start); + + if (end === -1) { + throw new Error(`Invalid route ID ${id}`); + } + + const content = id.slice(start, (i = end + delimiter.length)); + + parts.push({ + type, + content, + matched: content.includes('=') + }); + } + + return parts; + } + + return routes.sort((route_a, route_b) => { + const segments_a = split_route_id(route_a.id).map(get_parts); + const segments_b = split_route_id(route_b.id).map(get_parts); + + for (let i = 0; i < Math.max(segments_a.length, segments_b.length); i += 1) { + const segment_a = segments_a[i] ?? [EMPTY]; + const segment_b = segments_b[i] ?? [EMPTY]; + + for (let j = 0; j < Math.max(segment_a.length, segment_b.length); j += 1) { + const a = segment_a[j]; + const b = segment_b[j]; + + // first part of each segment is always static + // (though it may be the empty string), then + // it alternates between dynamic and static + // (i.e. [foo][bar] is disallowed) + const dynamic = j % 2 === 1; + + if (dynamic) { + if (!a) return -1; + if (!b) return +1; + + // get the next static chunk, so we can handle [...rest] edge cases + const next_a = segment_a[j + 1].content || segments_a[i + 1]?.[0].content; + const next_b = segment_b[j + 1].content || segments_b[i + 1]?.[0].content; + + // `[...rest]/x` outranks `[...rest]` + if (a.type === 'rest' && b.type === 'rest') { + if (next_a && next_b) continue; + if (next_a) return -1; + if (next_b) return +1; + } + + // `[...rest]/x` outranks `[required]` or `[required]/[required]` + // but not `[required]/x` + if (a.type === 'rest') { + return next_a && !next_b ? -1 : +1; + } + + if (b.type === 'rest') { + return next_b && !next_a ? +1 : -1; + } + + // part with matcher outranks one without + if (a.matched !== b.matched) { + return a.matched ? -1 : +1; + } + + if (a.type !== b.type) { + // `[...rest]` has already been accounted for, so here + // we're comparing between `[required]` and `[[optional]]` + if (a.type === 'required') return -1; + if (b.type === 'required') return +1; + } + } else if (a.content !== b.content) { + // shallower path outranks deeper path + if (a === EMPTY) return -1; + if (b === EMPTY) return +1; + + return sort_static(a.content, b.content); + } + } + } + + return route_a.id < route_b.id ? +1 : -1; + }); +} + +/** @param {string} id */ +function split_route_id(id) { + return get_route_segments( + id + // remove all [[optional]] parts unless they're at the very end + // or it ends with a route group + .replace(/\[\[[^\]]+\]\](?!(?:\/\([^/]+\))*$)/g, '') + ).filter(Boolean); +} + +/** + * Sort two strings lexicographically, except `foobar` outranks `foo` + * @param {string} a + * @param {string} b + */ +function sort_static(a, b) { + if (a === b) return 0; + + for (let i = 0; true; i += 1) { + const char_a = a[i]; + const char_b = b[i]; + + if (char_a !== char_b) { + if (char_a === undefined) return +1; + if (char_b === undefined) return -1; + return char_a < char_b ? -1 : +1; + } + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/types.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ec5c01b8e9d421acdcc7cd0fbec06c353c06acab --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/create_manifest_data/types.d.ts @@ -0,0 +1,37 @@ +import { PageNode } from 'types'; + +interface Part { + dynamic: boolean; + optional: boolean; + rest: boolean; + type: string | null; +} + +interface RouteTreeNode { + error: PageNode | undefined; + layout: PageNode | undefined; +} + +export type RouteTree = Map; + +interface RouteComponent { + kind: 'component'; + is_page: boolean; + is_layout: boolean; + is_error: boolean; + uses_layout: string | undefined; +} + +interface RouteSharedModule { + kind: 'universal'; + is_page: boolean; + is_layout: boolean; +} + +interface RouteServerModule { + kind: 'server'; + is_page: boolean; + is_layout: boolean; +} + +export type RouteFile = RouteComponent | RouteSharedModule | RouteServerModule; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/sync.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/sync.js new file mode 100644 index 0000000000000000000000000000000000000000..d9680e8ab65f3a024b607efe85bf85f55de2c1f4 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/sync.js @@ -0,0 +1,96 @@ +import path from 'node:path'; +import create_manifest_data from './create_manifest_data/index.js'; +import { write_client_manifest } from './write_client_manifest.js'; +import { write_root } from './write_root.js'; +import { write_tsconfig } from './write_tsconfig.js'; +import { write_types, write_all_types } from './write_types/index.js'; +import { write_ambient } from './write_ambient.js'; +import { write_non_ambient } from './write_non_ambient.js'; +import { write_server } from './write_server.js'; +import { + create_node_analyser, + get_page_options +} from '../../exports/vite/static_analysis/index.js'; + +/** + * Initialize SvelteKit's generated files that only depend on the config and mode. + * @param {import('types').ValidatedConfig} config + * @param {string} mode + */ +export function init(config, mode) { + write_tsconfig(config.kit); + write_ambient(config.kit, mode); +} + +/** + * Update SvelteKit's generated files + * @param {import('types').ValidatedConfig} config + */ +export function create(config) { + const manifest_data = create_manifest_data({ config }); + + const output = path.join(config.kit.outDir, 'generated'); + + write_client_manifest(config.kit, manifest_data, `${output}/client`); + write_server(config, output); + write_root(manifest_data, config, output); + write_all_types(config, manifest_data); + write_non_ambient(config.kit, manifest_data); + + return { manifest_data }; +} + +/** + * Update SvelteKit's generated files in response to a single file content update. + * Do not call this when the file in question was created/deleted. + * + * @param {import('types').ValidatedConfig} config + * @param {import('types').ManifestData} manifest_data + * @param {string} file + */ +export function update(config, manifest_data, file) { + const node_analyser = create_node_analyser(); + + for (const node of manifest_data.nodes) { + node.page_options = node_analyser.get_page_options(node); + } + + for (const route of manifest_data.routes) { + if (route.endpoint) { + route.endpoint.page_options = get_page_options(route.endpoint.file); + } + } + + write_types(config, manifest_data, file); + write_non_ambient(config.kit, manifest_data); +} + +/** + * Run sync.init and sync.create in series, returning the result from sync.create. + * @param {import('types').ValidatedConfig} config + * @param {string} mode The Vite mode + */ +export function all(config, mode) { + init(config, mode); + return create(config); +} + +/** + * Run sync.init and then generate all type files. + * @param {import('types').ValidatedConfig} config + * @param {string} mode The Vite mode + */ +export function all_types(config, mode) { + init(config, mode); + const manifest_data = create_manifest_data({ config }); + write_all_types(config, manifest_data); + write_non_ambient(config.kit, manifest_data); +} + +/** + * Regenerate __SERVER__/internal.js in response to src/{app.html,error.html,service-worker.js} changing + * @param {import('types').ValidatedConfig} config + */ +export function server(config) { + write_server(config, path.join(config.kit.outDir, 'generated')); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/ts.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/ts.js new file mode 100644 index 0000000000000000000000000000000000000000..61c79e37f882d09bf3063934d1d61cdde13c5b84 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/ts.js @@ -0,0 +1,6 @@ +/** @type {import('typescript')} */ +// @ts-ignore +export let ts = undefined; +try { + ts = (await import('typescript')).default; +} catch {} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/utils.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..106360654b1f192cd5d6b5123a618f9ad88fb516 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/utils.js @@ -0,0 +1,85 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { mkdirp } from '../../utils/filesystem.js'; +import { import_peer } from '../../utils/import.js'; + +/** @type {{ VERSION: string }} */ +const { VERSION } = await import_peer('svelte/compiler'); + +const [MAJOR, MINOR] = VERSION.split('.').map(Number); + +/** @type {Map} */ +const previous_contents = new Map(); + +/** + * @param {string} file + * @param {string} code + */ +export function write_if_changed(file, code) { + if (code !== previous_contents.get(file)) { + write(file, code); + } +} + +/** + * @param {string} file + * @param {string} code + */ +export function write(file, code) { + previous_contents.set(file, code); + mkdirp(path.dirname(file)); + fs.writeFileSync(file, code); +} + +/** @type {WeakMap} */ +const dedent_map = new WeakMap(); + +/** + * Allows indenting template strings without the extra indentation ending up in the result. + * Still allows indentation of lines relative to one another in the template string. + * @param {TemplateStringsArray} strings + * @param {any[]} values + */ +export function dedent(strings, ...values) { + let dedented = dedent_map.get(strings); + + if (!dedented) { + const indentation = /** @type {RegExpExecArray} */ (/\n?([ \t]*)/.exec(strings[0]))[1]; + const pattern = new RegExp(`^${indentation}`, 'gm'); + + dedented = { + strings: strings.map((str) => str.replace(pattern, '')), + indents: [] + }; + + let current = '\n'; + + for (let i = 0; i < values.length; i += 1) { + const string = dedented.strings[i]; + const match = /\n([ \t]*)$/.exec(string); + + if (match) current = match[0]; + dedented.indents[i] = current; + } + + dedent_map.set(strings, dedented); + } + + let str = dedented.strings[0]; + for (let i = 0; i < values.length; i += 1) { + str += String(values[i]).replace(/\n/g, dedented.indents[i]) + dedented.strings[i + 1]; + } + + str = str.trim(); + + return str; +} + +export function isSvelte5Plus() { + return MAJOR >= 5; +} + +// TODO 3.0 remove this once we can bump the peerDep range +export function supportsTrustedTypes() { + return (MAJOR === 5 && MINOR >= 51) || MAJOR > 5; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_ambient.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_ambient.js new file mode 100644 index 0000000000000000000000000000000000000000..1f2188097ade6fe54d680f7d5702ad3df652dc81 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_ambient.js @@ -0,0 +1,63 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { get_env } from '../../exports/vite/utils.js'; +import { GENERATED_COMMENT } from '../../constants.js'; +import { create_dynamic_types, create_static_types } from '../env.js'; +import { write_if_changed } from './utils.js'; + +// TODO these types should be described in a neutral place, rather than +// inside either `packages/kit` or `svelte.dev/docs/kit` +const descriptions_dir = fileURLToPath(new URL('../../../src/types/synthetic', import.meta.url)); + +/** @param {string} filename */ +function read_description(filename) { + const content = fs.readFileSync(`${descriptions_dir}/${filename}`, 'utf8'); + return `/**\n${content + .trim() + .split('\n') + .map((line) => ` * ${line}`) + .join('\n')}\n */`; +} + +/** + * @param {import('types').Env} env + * @param {{ + * public_prefix: string; + * private_prefix: string; + * }} prefixes + */ +const template = (env, prefixes) => ` +${GENERATED_COMMENT} + +/// + +${read_description('$env+static+private.md')} +${create_static_types('private', env)} + +${read_description('$env+static+public.md')} +${create_static_types('public', env)} + +${read_description('$env+dynamic+private.md')} +${create_dynamic_types('private', env, prefixes)} + +${read_description('$env+dynamic+public.md')} +${create_dynamic_types('public', env, prefixes)} +`; + +/** + * Writes ambient declarations including types reference to @sveltejs/kit, + * and the existing environment variables in process.env to + * $env/static/private and $env/static/public + * @param {import('types').ValidatedKitConfig} config + * @param {string} mode The Vite mode + */ +export function write_ambient(config, mode) { + const env = get_env(config.env, mode); + const { publicPrefix: public_prefix, privatePrefix: private_prefix } = config.env; + + write_if_changed( + path.join(config.outDir, 'ambient.d.ts'), + template(env, { public_prefix, private_prefix }) + ); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_client_manifest.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_client_manifest.js new file mode 100644 index 0000000000000000000000000000000000000000..7495e3134854f75f960aa46885a0f394d17e8a78 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_client_manifest.js @@ -0,0 +1,203 @@ +import path from 'node:path'; +import { relative_path, resolve_entry } from '../../utils/filesystem.js'; +import { s } from '../../utils/misc.js'; +import { dedent, isSvelte5Plus, write_if_changed } from './utils.js'; +import colors from 'kleur'; + +/** + * Writes the client manifest to disk. The manifest is used to power the router. It contains the + * list of routes and corresponding Svelte components (i.e. pages and layouts). + * @param {import('types').ValidatedKitConfig} kit + * @param {import('types').ManifestData} manifest_data + * @param {string} output + * @param {import('types').ServerMetadata['nodes']} [metadata] If this is omitted, we have to assume that all routes with a `+layout/page.server.js` file have a server load function + */ +export function write_client_manifest(kit, manifest_data, output, metadata) { + const client_routing = kit.router.resolution === 'client'; + + /** + * Creates a module that exports a `CSRPageNode` + * @param {import('types').PageNode} node + */ + function generate_node(node) { + const declarations = []; + + if (node.universal) { + declarations.push( + `import * as universal from ${s(relative_path(`${output}/nodes`, node.universal))};`, + 'export { universal };' + ); + } + + if (node.component) { + declarations.push( + `export { default as component } from ${s( + relative_path(`${output}/nodes`, node.component) + )};` + ); + } + + return declarations.join('\n'); + } + + /** @type {Map} */ + const indices = new Map(); + const nodes = manifest_data.nodes + .map((node, i) => { + indices.set(node, i); + + write_if_changed(`${output}/nodes/${i}.js`, generate_node(node)); + return `() => import('./nodes/${i}')`; + }) + // If route resolution happens on the server, we only need the root layout and root error page + // upfront, the rest is loaded on demand as the user navigates the app + .slice(0, client_routing ? manifest_data.nodes.length : 2) + .join(',\n'); + + const layouts_with_server_load = new Set(); + + let dictionary = dedent` + { + ${manifest_data.routes + .map((route) => { + if (route.page) { + const errors = route.page.errors.slice(1).map((n) => n ?? ''); + const layouts = route.page.layouts.slice(1).map((n) => n ?? ''); + + while (layouts.at(-1) === '') layouts.pop(); + while (errors.at(-1) === '') errors.pop(); + + let leaf_has_server_load = false; + if (route.leaf) { + if (metadata) { + const i = /** @type {number} */ (indices.get(route.leaf)); + + leaf_has_server_load = metadata[i].has_server_load; + } else if (route.leaf.server) { + leaf_has_server_load = true; + } + } + + // Encode whether or not the route uses server data + // using the ones' complement, to save space + const array = [`${leaf_has_server_load ? '~' : ''}${route.page.leaf}`]; + + // Encode whether or not the layout uses server data. + // It's a different method compared to pages because layouts + // are reused across pages, so we save space by doing it this way. + route.page.layouts.forEach((layout) => { + if (layout == undefined) return; + + let layout_has_server_load = false; + + if (metadata) { + layout_has_server_load = metadata[layout].has_server_load; + } else if (manifest_data.nodes[layout].server) { + layout_has_server_load = true; + } + + if (layout_has_server_load) { + layouts_with_server_load.add(layout); + } + }); + + // only include non-root layout/error nodes if they exist + if (layouts.length > 0 || errors.length > 0) array.push(`[${layouts.join(',')}]`); + if (errors.length > 0) array.push(`[${errors.join(',')}]`); + + return `${s(route.id)}: [${array.join(',')}]`; + } + }) + .filter(Boolean) + .join(',\n')} + } + `; + + if (!client_routing) { + dictionary = '{}'; + const root_layout = layouts_with_server_load.has(0); + layouts_with_server_load.clear(); + if (root_layout) layouts_with_server_load.add(0); + } + + const client_hooks_file = resolve_entry(kit.files.hooks.client); + const universal_hooks_file = resolve_entry(kit.files.hooks.universal); + + const typo = resolve_entry('src/+hooks.client'); + if (typo) { + console.log( + colors + .bold() + .yellow( + `Unexpected + prefix. Did you mean ${typo.split('/').at(-1)?.slice(1)}?` + + ` at ${path.resolve(typo)}` + ) + ); + } + + // Stringified version of + /** @type {import('../../runtime/client/types.js').SvelteKitApp} */ + write_if_changed( + `${output}/app.js`, + dedent` + ${ + client_hooks_file + ? `import * as client_hooks from '${relative_path(output, client_hooks_file)}';` + : '' + } + ${ + universal_hooks_file + ? `import * as universal_hooks from '${relative_path(output, universal_hooks_file)}';` + : '' + } + + ${client_routing ? "export { matchers } from './matchers.js';" : 'export const matchers = {};'} + + export const nodes = [ + ${nodes} + ]; + + export const server_loads = [${[...layouts_with_server_load].join(',')}]; + + export const dictionary = ${dictionary}; + + export const hooks = { + handleError: ${ + client_hooks_file ? 'client_hooks.handleError || ' : '' + }(({ error }) => { console.error(error) }), + ${client_hooks_file ? 'init: client_hooks.init,' : ''} + reroute: ${universal_hooks_file ? 'universal_hooks.reroute || ' : ''}(() => {}), + transport: ${universal_hooks_file ? 'universal_hooks.transport || ' : ''}{} + }; + + export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode])); + export const encoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.encode])); + + export const hash = ${s(kit.router.type === 'hash')}; + + export const decode = (type, value) => decoders[type](value); + + export { default as root } from '../root.${isSvelte5Plus() ? 'js' : 'svelte'}'; + ` + ); + + if (client_routing) { + // write matchers to a separate module so that we don't + // need to worry about name conflicts + const imports = []; + const matchers = []; + + for (const key in manifest_data.matchers) { + const src = manifest_data.matchers[key]; + + imports.push(`import { match as ${key} } from ${s(relative_path(output, src))};`); + matchers.push(key); + } + + const module = imports.length + ? `${imports.join('\n')}\n\nexport const matchers = { ${matchers.join(', ')} };` + : 'export const matchers = {};'; + + write_if_changed(`${output}/matchers.js`, module); + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_non_ambient.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_non_ambient.js new file mode 100644 index 0000000000000000000000000000000000000000..3b92b73dbc1b4338ba05a51d7762d4b2c7bc368a --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_non_ambient.js @@ -0,0 +1,266 @@ +import path from 'node:path'; +import { GENERATED_COMMENT } from '../../constants.js'; +import { posixify } from '../../utils/filesystem.js'; +import { write_if_changed } from './utils.js'; +import { s } from '../../utils/misc.js'; +import { get_route_segments } from '../../utils/routing.js'; + +const replace_optional_params = (/** @type {string} */ id) => + id.replace(/\/\[\[[^\]]+\]\]/g, '${string}'); +const replace_required_params = (/** @type {string} */ id) => + id.replace(/\/\[[^\]]+\]/g, '/${string}'); +/** Convert route ID to pathname by removing layout groups */ +const remove_group_segments = (/** @type {string} */ id) => { + return '/' + get_route_segments(id).join('/'); +}; + +/** + * Get pathnames to add based on trailingSlash settings + * @param {string} pathname + * @param {import('types').RouteData} route + * @returns {string[]} + */ +function get_pathnames_for_trailing_slash(pathname, route) { + if (pathname === '/') { + return [pathname]; + } + + /** @type {Set} */ + const pathnames = new Set(); + + /** + * @param {{ trailingSlash?: import('types').TrailingSlash } | null | undefined} page_options + */ + const add_pathnames = (page_options) => { + if (page_options === null || page_options?.trailingSlash === 'ignore') { + pathnames.add(pathname); + pathnames.add(pathname + '/'); + } else if (page_options?.trailingSlash === 'always') { + pathnames.add(pathname + '/'); + } else { + pathnames.add(pathname); + } + }; + + if (route.leaf) add_pathnames(route.leaf.page_options ?? null); + if (route.endpoint) add_pathnames(route.endpoint.page_options); + + return Array.from(pathnames); +} + +// `declare module "svelte/elements"` needs to happen in a non-ambient module, and dts-buddy generates one big ambient module, +// so we can't add it there - therefore generate the typings ourselves here. +// We're not using the `declare namespace svelteHTML` variant because that one doesn't augment the HTMLAttributes interface +// people could use to type their own components. +// The T generic is needed or else there's a "all declarations must have identical type parameters" error. +const template = ` +${GENERATED_COMMENT} + +declare module "svelte/elements" { + export interface HTMLAttributes { + 'data-sveltekit-keepfocus'?: true | '' | 'off' | undefined | null; + 'data-sveltekit-noscroll'?: true | '' | 'off' | undefined | null; + 'data-sveltekit-preload-code'?: + | true + | '' + | 'eager' + | 'viewport' + | 'hover' + | 'tap' + | 'off' + | undefined + | null; + 'data-sveltekit-preload-data'?: true | '' | 'hover' | 'tap' | 'off' | undefined | null; + 'data-sveltekit-reload'?: true | '' | 'off' | undefined | null; + 'data-sveltekit-replacestate'?: true | '' | 'off' | undefined | null; + } +} + +export {}; +`; + +/** + * Generate app types interface extension + * @param {import('types').ManifestData} manifest_data + * @param {import('types').ValidatedKitConfig} config + */ +function generate_app_types(manifest_data, config) { + /** @param {string} matcher */ + const path_to_matcher = (matcher) => + posixify(path.relative(config.outDir, path.join(config.files.params, matcher + '.js'))); + + /** @type {Map} */ + const matcher_types = new Map(); + + /** @param {string | undefined} matcher */ + const get_matcher_type = (matcher) => { + if (!matcher) return 'string'; + + let type = matcher_types.get(matcher); + if (!type) { + type = `MatcherParam`; + matcher_types.set(matcher, type); + } + + return type; + }; + + /** @param {Set | null} matchers */ + const get_matchers_type = (matchers) => { + if (matchers === null) return 'string'; + + return Array.from(matchers) + .map((matcher) => get_matcher_type(matcher)) + .join(' | '); + }; + + /** @type {Set} */ + const route_ids = new Set(manifest_data.routes.map((route) => route.id)); + + /** + * @param {string} id + * @returns {string[]} + */ + const get_ancestor_route_ids = (id) => { + /** @type {string[]} */ + const ancestors = []; + + if (route_ids.has('/')) { + ancestors.push('/'); + } + + let current = ''; + for (const segment of id.slice(1).split('/')) { + if (!segment) continue; + + current += '/' + segment; + if (route_ids.has(current)) { + ancestors.push(current); + } + } + + return ancestors; + }; + + /** @type {Set} */ + const pathnames = new Set(); + + /** @type {string[]} */ + const dynamic_routes = []; + + /** @type {string[]} */ + const layouts = []; + + /** @type {Map | null }>>} */ + const layout_params_by_route = new Map( + manifest_data.routes.map((route) => [ + route.id, + new Map( + route.params.map((p) => [ + p.name, + { optional: p.optional, matchers: p.matcher ? new Set([p.matcher]) : null } + ]) + ) + ]) + ); + + for (const route of manifest_data.routes) { + const ancestors = get_ancestor_route_ids(route.id); + + for (const ancestor_id of ancestors) { + const ancestor_params = layout_params_by_route.get(ancestor_id); + if (!ancestor_params) continue; + + for (const p of route.params) { + const matcher = p.matcher ?? null; + const entry = ancestor_params.get(p.name); + if (!entry) { + ancestor_params.set(p.name, { + optional: true, + matchers: matcher === null ? null : new Set([matcher]) + }); + continue; + } + + if (entry.matchers === null) continue; + + if (matcher === null) { + entry.matchers = null; + continue; + } + + entry.matchers.add(matcher); + } + } + } + + for (const route of manifest_data.routes) { + const pathname = remove_group_segments(route.id); + let normalized_pathname = pathname; + + /** @type {(path: string) => string} */ + let serialise = s; + + if (route.params.length > 0) { + const params = route.params.map((p) => { + const type = get_matcher_type(p.matcher); + return `${p.name}${p.optional ? '?:' : ':'} ${type}`; + }); + const route_type = `${s(route.id)}: { ${params.join('; ')} }`; + + dynamic_routes.push(route_type); + + normalized_pathname = replace_required_params(replace_optional_params(pathname)); + serialise = (p) => `\`${p}\` & {}`; + } + + for (const p of get_pathnames_for_trailing_slash(normalized_pathname, route)) { + pathnames.add(serialise(p)); + } + + let layout_type = 'Record'; + + const layout_params = layout_params_by_route.get(route.id); + if (layout_params) { + const params = Array.from(layout_params) + .map(([name, { optional, matchers }]) => { + const type = get_matchers_type(matchers); + return `${name}${optional ? '?:' : ':'} ${type}`; + }) + .join('; '); + + if (params.length > 0) layout_type = `{ ${params} }`; + } + + layouts.push(`${s(route.id)}: ${layout_type}`); + } + + const assets = manifest_data.assets.map((asset) => s('/' + asset.file)); + + return [ + 'declare module "$app/types" {', + '\ttype MatcherParam = M extends (param : string) => param is (infer U extends string) ? U : string;', + '', + '\texport interface AppTypes {', + `\t\tRouteId(): ${manifest_data.routes.map((r) => s(r.id)).join(' | ')};`, + `\t\tRouteParams(): {\n\t\t\t${dynamic_routes.join(';\n\t\t\t')}\n\t\t};`, + `\t\tLayoutParams(): {\n\t\t\t${layouts.join(';\n\t\t\t')}\n\t\t};`, + `\t\tPathname(): ${Array.from(pathnames).join(' | ')};`, + '\t\tResolvedPathname(): `${"" | `/${string}`}${ReturnType}`;', + `\t\tAsset(): ${assets.concat('string & {}').join(' | ')};`, + '\t}', + '}' + ].join('\n'); +} + +/** + * Writes non-ambient declarations to the output directory + * @param {import('types').ValidatedKitConfig} config + * @param {import('types').ManifestData} manifest_data + */ +export function write_non_ambient(config, manifest_data) { + const app_types = generate_app_types(manifest_data, config); + const content = [template, app_types].join('\n\n'); + + write_if_changed(path.join(config.outDir, 'non-ambient.d.ts'), content); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_root.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_root.js new file mode 100644 index 0000000000000000000000000000000000000000..445c17e45dbca3263549930a2e2cfa4e4f63a34f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_root.js @@ -0,0 +1,196 @@ +import { dedent, isSvelte5Plus, write_if_changed } from './utils.js'; + +/** + * @param {import('types').ManifestData} manifest_data + * @param {import('types').ValidatedConfig} config + * @param {string} output + */ +export function write_root(manifest_data, config, output) { + // TODO remove default layout altogether + + const use_boundaries = config.kit.experimental.handleRenderingErrors && isSvelte5Plus(); + + const max_depth = Math.max( + ...manifest_data.routes.map((route) => + route.page ? route.page.layouts.filter(Boolean).length + 1 : 0 + ), + 1 + ); + + const levels = []; + for (let i = 0; i <= max_depth; i += 1) { + levels.push(i); + } + + let l = max_depth; + /** @type {string} */ + let pyramid; + + if (isSvelte5Plus() && use_boundaries) { + // with the @const we force the data[depth] access to be derived, which is important to not fire updates needlessly + // TODO in Svelte 5 we should rethink the client.js side, we can likely make data a $state and only update indexes that changed there, simplifying this a lot + pyramid = dedent` + {#snippet pyramid(depth)} + {@const Pyramid = constructors[depth]} + {#snippet failed(error)} + {@const ErrorPage = errors[depth]} + + {/snippet} + + {#if constructors[depth + 1]} + {@const d = data[depth]} + + + {@render pyramid(depth + 1)} + + {:else} + {@const d = data[depth]} + + + {/if} + + {/snippet} + + {@render pyramid(0)} + `; + } else { + pyramid = dedent` + ${ + isSvelte5Plus() + ? ` + ` + : `` + }`; + + while (l--) { + pyramid = dedent` + {#if constructors[${l + 1}]} + ${ + isSvelte5Plus() + ? dedent`{@const Pyramid_${l} = constructors[${l}]} + + + ${pyramid} + ` + : dedent` + ${pyramid} + ` + } + + {:else} + ${ + isSvelte5Plus() + ? dedent` + {@const Pyramid_${l} = constructors[${l}]} + + + ` + : dedent`` + } + + {/if} + `; + } + } + + write_if_changed( + `${output}/root.svelte`, + dedent` + + ${isSvelte5Plus() ? '' : ''} + + + ${pyramid} + + {#if mounted} +
+ {#if navigated} + {title} + {/if} +
+ {/if} + ` + ); + + if (isSvelte5Plus()) { + write_if_changed( + `${output}/root.js`, + dedent` + import { asClassComponent } from 'svelte/legacy'; + import Root from './root.svelte'; + export default asClassComponent(Root); + ` + ); + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_server.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_server.js new file mode 100644 index 0000000000000000000000000000000000000000..711a007345e024f0087622c63b83caaaf5fe25b5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_server.js @@ -0,0 +1,143 @@ +import path from 'node:path'; +import process from 'node:process'; +import { hash } from '../../utils/hash.js'; +import { posixify, resolve_entry } from '../../utils/filesystem.js'; +import { s } from '../../utils/misc.js'; +import { load_error_page, load_template } from '../config/index.js'; +import { runtime_directory } from '../utils.js'; +import { isSvelte5Plus, write_if_changed } from './utils.js'; +import colors from 'kleur'; +import { escape_html } from '../../utils/escape.js'; + +/** + * @param {{ + * server_hooks: string | null; + * universal_hooks: string | null; + * config: import('types').ValidatedConfig; + * has_service_worker: boolean; + * runtime_directory: string; + * template: string; + * error_page: string; + * }} opts + */ +const server_template = ({ + config, + server_hooks, + universal_hooks, + has_service_worker, + runtime_directory, + template, + error_page +}) => ` +import root from '../root.${isSvelte5Plus() ? 'js' : 'svelte'}'; +import { set_building, set_prerendering } from '__sveltekit/environment'; +import { set_assets } from '$app/paths/internal/server'; +import { set_manifest, set_read_implementation } from '__sveltekit/server'; +import { set_private_env, set_public_env } from '${runtime_directory}/shared-server.js'; + +export const options = { + app_template_contains_nonce: ${template.includes('%sveltekit.nonce%')}, + async: ${s(!!config.compilerOptions?.experimental?.async)}, + csp: ${s(config.kit.csp)}, + csrf_check_origin: ${s(config.kit.csrf.checkOrigin && !config.kit.csrf.trustedOrigins.includes('*'))}, + csrf_trusted_origins: ${s(config.kit.csrf.trustedOrigins)}, + embedded: ${config.kit.embedded}, + env_public_prefix: '${config.kit.env.publicPrefix}', + env_private_prefix: '${config.kit.env.privatePrefix}', + hash_routing: ${s(config.kit.router.type === 'hash')}, + hooks: null, // added lazily, via \`get_hooks\` + preload_strategy: ${s(config.kit.output.preloadStrategy)}, + root, + service_worker: ${has_service_worker}, + service_worker_options: ${config.kit.serviceWorker.register ? s(config.kit.serviceWorker.options) : 'null'}, + server_error_boundaries: ${s(!!config.kit.experimental.handleRenderingErrors)}, + templates: { + app: ({ head, body, assets, nonce, env }) => ${s(template) + .replace('%sveltekit.head%', '" + head + "') + .replace('%sveltekit.body%', '" + body + "') + .replace(/%sveltekit\.assets%/g, '" + assets + "') + .replace(/%sveltekit\.nonce%/g, '" + nonce + "') + .replace(/%sveltekit\.version%/g, escape_html(config.kit.version.name)) + .replace( + /%sveltekit\.env\.([^%]+)%/g, + (_match, capture) => `" + (env[${s(capture)}] ?? "") + "` + )}, + error: ({ status, message }) => ${s(error_page) + .replace(/%sveltekit\.status%/g, '" + status + "') + .replace(/%sveltekit\.error\.message%/g, '" + message + "')} + }, + version_hash: ${s(hash(config.kit.version.name))} +}; + +export async function get_hooks() { + let handle; + let handleFetch; + let handleError; + let handleValidationError; + let init; + ${server_hooks ? `({ handle, handleFetch, handleError, handleValidationError, init } = await import(${s(server_hooks)}));` : ''} + + let reroute; + let transport; + ${universal_hooks ? `({ reroute, transport } = await import(${s(universal_hooks)}));` : ''} + + return { + handle, + handleFetch, + handleError, + handleValidationError, + init, + reroute, + transport + }; +} + +export { set_assets, set_building, set_manifest, set_prerendering, set_private_env, set_public_env, set_read_implementation }; +`; + +// TODO need to re-run this whenever src/app.html or src/error.html are +// created or changed, or src/service-worker.js is created or deleted. +// Also, need to check that updating hooks.server.js works + +/** + * Write server configuration to disk + * @param {import('types').ValidatedConfig} config + * @param {string} output + */ +export function write_server(config, output) { + const server_hooks_file = resolve_entry(config.kit.files.hooks.server); + const universal_hooks_file = resolve_entry(config.kit.files.hooks.universal); + + const typo = resolve_entry('src/+hooks.server'); + if (typo) { + console.log( + colors + .bold() + .yellow( + `Unexpected + prefix. Did you mean ${typo.split('/').at(-1)?.slice(1)}?` + + ` at ${path.resolve(typo)}` + ) + ); + } + + /** @param {string} file */ + function relative(file) { + return posixify(path.relative(`${output}/server`, file)); + } + + // Contains the stringified version of + /** @type {import('types').SSROptions} */ + write_if_changed( + `${output}/server/internal.js`, + server_template({ + config, + server_hooks: server_hooks_file ? relative(server_hooks_file) : null, + universal_hooks: universal_hooks_file ? relative(universal_hooks_file) : null, + has_service_worker: + config.kit.serviceWorker.register && !!resolve_entry(config.kit.files.serviceWorker), + runtime_directory: relative(runtime_directory), + template: load_template(process.cwd(), config), + error_page: load_error_page(config) + }) + ); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_tsconfig.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_tsconfig.js new file mode 100644 index 0000000000000000000000000000000000000000..d0f6330e1b1f25cd4d77c4bfeb644184d19e2d5b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_tsconfig.js @@ -0,0 +1,245 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import colors from 'kleur'; +import { posixify } from '../../utils/filesystem.js'; +import { write_if_changed } from './utils.js'; + +/** + * @param {string} cwd + * @param {string} file + */ +function maybe_file(cwd, file) { + const resolved = path.resolve(cwd, file); + if (fs.existsSync(resolved)) { + return resolved; + } +} + +/** + * @param {string} file + */ +function project_relative(file) { + return posixify(path.relative('.', file)); +} + +/** + * @param {string} file + */ +function remove_trailing_slashstar(file) { + if (file.endsWith('/*')) { + return file.slice(0, -2); + } else { + return file; + } +} + +/** + * Generates the tsconfig that the user's tsconfig inherits from. + * @param {import('types').ValidatedKitConfig} kit + */ +export function write_tsconfig(kit, cwd = process.cwd()) { + const out = path.join(kit.outDir, 'tsconfig.json'); + + const user_config = load_user_tsconfig(cwd); + if (user_config) validate_user_config(cwd, out, user_config); + + write_if_changed(out, JSON.stringify(get_tsconfig(kit), null, '\t')); +} + +/** + * Generates the tsconfig that the user's tsconfig inherits from. + * @param {import('types').ValidatedKitConfig} kit + */ +export function get_tsconfig(kit) { + /** @param {string} file */ + const config_relative = (file) => posixify(path.relative(kit.outDir, file)); + + const include = new Set([ + 'ambient.d.ts', // careful: changing this name would be a breaking change, because it's referenced in the service-workers documentation + 'non-ambient.d.ts', + './types/**/$types.d.ts', + config_relative('vite.config.js'), + config_relative('vite.config.ts') + ]); + const src_includes = [kit.files.routes, kit.files.lib, kit.files.src].filter((dir) => { + const relative = path.relative(kit.files.src, dir); + return !relative || relative.startsWith('..'); + }); + for (const dir of src_includes) { + include.add(config_relative(`${dir}/**/*.js`)); + include.add(config_relative(`${dir}/**/*.ts`)); + include.add(config_relative(`${dir}/**/*.svelte`)); + } + + // Test folder is a special case - we advocate putting tests in a top-level test folder + // and it's not configurable (should we make it?) + const test_folder = project_relative('test'); + include.add(config_relative(`${test_folder}/**/*.js`)); + include.add(config_relative(`${test_folder}/**/*.ts`)); + include.add(config_relative(`${test_folder}/**/*.svelte`)); + const tests_folder = project_relative('tests'); + include.add(config_relative(`${tests_folder}/**/*.js`)); + include.add(config_relative(`${tests_folder}/**/*.ts`)); + include.add(config_relative(`${tests_folder}/**/*.svelte`)); + + const exclude = [config_relative('node_modules/**')]; + // Add service worker to exclude list so that worker types references in it don't spill over into the rest of the app + // (i.e. suddenly ServiceWorkerGlobalScope would be available throughout the app, and some types might even clash) + if (path.extname(kit.files.serviceWorker)) { + exclude.push(config_relative(kit.files.serviceWorker)); + } else { + exclude.push(config_relative(`${kit.files.serviceWorker}.js`)); + exclude.push(config_relative(`${kit.files.serviceWorker}/**/*.js`)); + exclude.push(config_relative(`${kit.files.serviceWorker}.ts`)); + exclude.push(config_relative(`${kit.files.serviceWorker}/**/*.ts`)); + exclude.push(config_relative(`${kit.files.serviceWorker}.d.ts`)); + exclude.push(config_relative(`${kit.files.serviceWorker}/**/*.d.ts`)); + } + + const config = { + compilerOptions: { + // generated options + paths: { + ...get_tsconfig_paths(kit), + '$app/types': ['./types/index.d.ts'] + }, + rootDirs: [config_relative('.'), './types'], + + // essential options + // svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript + // to enforce using \`import type\` instead of \`import\` for Types. + // Also, TypeScript doesn't know about import usages in the template because it only sees the + // script of a Svelte file. Therefore preserve all value imports. + verbatimModuleSyntax: true, + // Vite compiles modules one at a time + isolatedModules: true, + + // This is required for svelte-package to work as expected + // Can be overwritten + lib: ['esnext', 'DOM', 'DOM.Iterable'], + moduleResolution: 'bundler', + module: 'esnext', + noEmit: true, // prevent tsconfig error "overwriting input files" - Vite handles the build and ignores this + target: 'esnext', + types: ['node'] + }, + include: [...include], + exclude + }; + + return kit.typescript.config(config) ?? config; +} + +/** @param {string} cwd */ +function load_user_tsconfig(cwd) { + const file = maybe_file(cwd, 'tsconfig.json') || maybe_file(cwd, 'jsconfig.json'); + + if (!file) return; + + // we have to eval the file, since it's not parseable as JSON (contains comments) + const json = fs.readFileSync(file, 'utf-8'); + + return { + kind: path.basename(file), + options: (0, eval)(`(${json})`) + }; +} + +/** + * @param {string} cwd + * @param {string} out + * @param {{ kind: string, options: any }} config + */ +function validate_user_config(cwd, out, config) { + // we need to check that the user's tsconfig extends the framework config + const extend = config.options.extends; + const extends_framework_config = + typeof extend === 'string' + ? path.resolve(cwd, extend) === out + : Array.isArray(extend) + ? extend.some((e) => path.resolve(cwd, e) === out) + : false; + + const options = config.options.compilerOptions || {}; + + if (extends_framework_config) { + const { paths, baseUrl } = options; + + // TODO: baseUrl will be removed in TypeScript 7.0 + if (baseUrl || paths) { + console.warn( + colors + .bold() + .yellow( + `You have specified a baseUrl and/or paths in your ${config.kind} which interferes with SvelteKit's auto-generated tsconfig.json. ` + + 'Remove it to avoid problems with intellisense. For path aliases, use `kit.alias` instead: https://svelte.dev/docs/kit/configuration#alias' + ) + ); + } + } else { + let relative = posixify(path.relative('.', out)); + if (!relative.startsWith('./')) relative = './' + relative; + + console.warn( + colors + .bold() + .yellow(`Your ${config.kind} should extend the configuration generated by SvelteKit:`) + ); + console.warn(`{\n "extends": "${relative}"\n}`); + } +} + +// +const alias_regex = /^(.+?)(\/\*)?$/; +// +const value_regex = /^(.*?)((\/\*)|(\.\w+))?$/; + +/** + * Generates tsconfig path aliases from kit's aliases. + * Related to vite alias creation. + * + * @param {import('types').ValidatedKitConfig} config + */ +function get_tsconfig_paths(config) { + /** @param {string} file */ + const config_relative = (file) => { + let relative_path = path.relative(config.outDir, file); + if (!relative_path.startsWith('..')) { + relative_path = './' + relative_path; + } + return posixify(relative_path); + }; + + const alias = { ...config.alias }; + if (fs.existsSync(project_relative(config.files.lib))) { + alias['$lib'] = project_relative(config.files.lib); + } + + /** @type {Record} */ + const paths = {}; + + for (const [key, value] of Object.entries(alias)) { + const key_match = alias_regex.exec(key); + if (!key_match) throw new Error(`Invalid alias key: ${key}`); + + const value_match = value_regex.exec(value); + if (!value_match) throw new Error(`Invalid alias value: ${value}`); + + const rel_path = config_relative(remove_trailing_slashstar(value)); + const slashstar = key_match[2]; + + if (slashstar) { + paths[key] = [rel_path + '/*']; + } else { + paths[key] = [rel_path]; + const fileending = value_match[4]; + + if (!fileending && !(key + '/*' in alias)) { + paths[key + '/*'] = [rel_path + '/*']; + } + } + } + + return paths; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js new file mode 100644 index 0000000000000000000000000000000000000000..bbf63ec456001557d5e15e378c2c52606ec92c3f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/sync/write_types/index.js @@ -0,0 +1,869 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import MagicString from 'magic-string'; +import { posixify, rimraf, walk } from '../../../utils/filesystem.js'; +import { compact } from '../../../utils/array.js'; +import { ts } from '../ts.js'; +const remove_relative_parent_traversals = (/** @type {string} */ path) => + path.replace(/\.\.\//g, ''); +const is_whitespace = (/** @type {string} */ char) => /\s/.test(char); + +/** + * @typedef {{ + * file_name: string; + * modified: boolean; + * code: string; + * exports: any[]; + * } | null} Proxy + * + * @typedef {{ + * server: Proxy, + * universal: Proxy + * }} Proxies + * + * @typedef {Map} RoutesMap + */ + +const cwd = process.cwd(); + +/** + * Creates types for the whole manifest + * @param {import('types').ValidatedConfig} config + * @param {import('types').ManifestData} manifest_data + */ +export function write_all_types(config, manifest_data) { + if (!ts) return; + + const types_dir = `${config.kit.outDir}/types`; + + // empty out files that no longer need to exist + const routes_dir = remove_relative_parent_traversals( + posixify(path.relative('.', config.kit.files.routes)) + ); + const expected_directories = new Set( + manifest_data.routes.map((route) => path.join(routes_dir, route.id)) + ); + + if (fs.existsSync(types_dir)) { + for (const file of walk(types_dir)) { + const dir = path.dirname(file); + if (!expected_directories.has(dir)) { + rimraf(path.join(types_dir, file)); + } + } + } + + // Read/write meta data on each invocation, not once per node process, + // it could be invoked by another process in the meantime. + const meta_data_file = `${types_dir}/route_meta_data.json`; + const has_meta_data = fs.existsSync(meta_data_file); + const meta_data = has_meta_data + ? /** @type {Record} */ (JSON.parse(fs.readFileSync(meta_data_file, 'utf-8'))) + : {}; + const routes_map = create_routes_map(manifest_data); + // For each directory, write $types.d.ts + for (const route of manifest_data.routes) { + if (!route.leaf && !route.layout && !route.endpoint) continue; // nothing to do + + const outdir = path.join(config.kit.outDir, 'types', routes_dir, route.id); + + // check if the types are out of date + /** @type {string[]} */ + const input_files = []; + + /** @type {import('types').PageNode | null} */ + let node = route.leaf; + while (node) { + if (node.universal) input_files.push(node.universal); + if (node.server) input_files.push(node.server); + node = node.parent ?? null; + } + + /** @type {import('types').PageNode | null} */ + node = route.layout; + while (node) { + if (node.universal) input_files.push(node.universal); + if (node.server) input_files.push(node.server); + node = node.parent ?? null; + } + + if (route.endpoint) { + input_files.push(route.endpoint.file); + } + + try { + fs.mkdirSync(outdir, { recursive: true }); + } catch {} + + const output_files = compact( + fs.readdirSync(outdir).map((name) => { + const stats = fs.statSync(path.join(outdir, name)); + if (stats.isDirectory()) return; + return { + name, + updated: stats.mtimeMs + }; + }) + ); + + const source_last_updated = Math.max( + // ctimeMs includes move operations whereas mtimeMs does not + ...input_files.map((file) => fs.statSync(file).ctimeMs) + ); + const types_last_updated = Math.max(...output_files.map((file) => file.updated)); + + const should_generate = + // source files were generated more recently than the types + source_last_updated > types_last_updated || + // no meta data file exists yet + !has_meta_data || + // some file was deleted + !meta_data[route.id]?.every((file) => input_files.includes(file)); + + if (should_generate) { + // track which old files end up being surplus to requirements + const to_delete = new Set(output_files.map((file) => file.name)); + update_types(config, routes_map, route, to_delete); + meta_data[route.id] = input_files; + } + } + + fs.writeFileSync(meta_data_file, JSON.stringify(meta_data, null, '\t')); +} + +/** + * Creates types related to the given file. This should only be called + * if the file in question was edited, not if it was created/deleted/moved. + * @param {import('types').ValidatedConfig} config + * @param {import('types').ManifestData} manifest_data + * @param {string} file + */ +export function write_types(config, manifest_data, file) { + if (!ts) return; + + if (!path.basename(file).startsWith('+')) { + // Not a route file + return; + } + + const id = '/' + posixify(path.relative(config.kit.files.routes, path.dirname(file))); + + const route = manifest_data.routes.find((route) => route.id === id); + if (!route) return; + if (!route.leaf && !route.layout && !route.endpoint) return; // nothing to do + + update_types(config, create_routes_map(manifest_data), route); +} + +/** + * Collect all leafs into a leaf -> route map + * @param {import('types').ManifestData} manifest_data + */ +function create_routes_map(manifest_data) { + /** @type {RoutesMap} */ + const map = new Map(); + for (const route of manifest_data.routes) { + if (route.leaf) { + map.set(route.leaf, { route, proxies: { server: null, universal: null } }); + } + } + return map; +} + +/** + * Update types for a specific route + * @param {import('types').ValidatedConfig} config + * @param {RoutesMap} routes + * @param {import('types').RouteData} route + * @param {Set} [to_delete] + */ +function update_types(config, routes, route, to_delete = new Set()) { + const routes_dir = remove_relative_parent_traversals( + posixify(path.relative('.', config.kit.files.routes)) + ); + const outdir = path.join(config.kit.outDir, 'types', routes_dir, route.id); + + // now generate new types + const imports = ["import type * as Kit from '@sveltejs/kit';"]; + + /** @type {string[]} */ + const declarations = []; + + /** @type {string[]} */ + const exports = []; + + // add 'Expand' helper + // Makes sure a type is "repackaged" and therefore more readable + declarations.push('type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;'); + + // returns the predicate of a matcher's type guard - or string if there is no type guard + declarations.push( + 'type MatcherParam = M extends (param : string) => param is (infer U extends string) ? U : string;' + ); + + declarations.push( + 'type RouteParams = ' + generate_params_type(route.params, outdir, config) + ';' + ); + + if (route.params.length > 0) { + exports.push( + 'export type EntryGenerator = () => Promise> | Array;' + ); + } + + declarations.push(`type RouteId = '${route.id}';`); + + // These could also be placed in our public types, but it would bloat them unnecessarily and we may want to change these in the future + if (route.layout || route.leaf) { + declarations.push( + // If T extends the empty object, void is also allowed as a return type + 'type MaybeWithVoid = {} extends T ? T | void : T;', + + // Returns the key of the object whose values are required. + 'export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];', + + // Helper type to get the correct output type for load functions. It should be passed the parent type to check what types from App.PageData are still required. + // If none, void is also allowed as a return type. + 'type OutputDataShape = MaybeWithVoid> & Partial> & Record>', + + // null & {} == null, we need to prevent that in some situations + 'type EnsureDefined = T extends null | undefined ? {} : T;', + + // Takes a union type and returns a union type where each type also has all properties + // of all possible types (typed as undefined), making accessing them more ergonomic + 'type OptionalUnion, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude]?: never } & U : never;', + + // Re-export `Snapshot` from @sveltejs/kit — in future we could use this to infer from the return type of `snapshot.capture` + 'export type Snapshot = Kit.Snapshot;' + ); + } + + if (route.leaf) { + let route_info = routes.get(route.leaf); + if (!route_info) { + // This should be defined, but belts and braces + route_info = { route, proxies: { server: null, universal: null } }; + routes.set(route.leaf, route_info); + } + + const { + declarations: d, + exports: e, + proxies + } = process_node(route.leaf, outdir, true, route_info.proxies); + + exports.push(...e); + declarations.push(...d); + + if (proxies.server) { + route_info.proxies.server = proxies.server; + if (proxies.server?.modified) to_delete.delete(proxies.server.file_name); + } + if (proxies.universal) { + route_info.proxies.universal = proxies.universal; + if (proxies.universal?.modified) to_delete.delete(proxies.universal.file_name); + } + + if (route.leaf.server) { + exports.push( + 'export type Action | void = Record | void> = Kit.Action' + ); + exports.push( + 'export type Actions | void = Record | void> = Kit.Actions' + ); + } + + if (route.leaf.server) { + exports.push( + 'export type PageProps = { params: RouteParams; data: PageData; form: ActionData }' + ); + } else { + exports.push('export type PageProps = { params: RouteParams; data: PageData }'); + } + } + + if (route.layout) { + let all_pages_have_load = true; + /** @type {import('types').RouteParam[]} */ + const layout_params = []; + const ids = ['RouteId']; + + route.layout.child_pages?.forEach((page) => { + const leaf = routes.get(page); + if (leaf) { + if (leaf.route.page) ids.push(`"${leaf.route.id}"`); + + for (const param of leaf.route.params) { + // skip if already added + if (layout_params.some((p) => p.name === param.name)) continue; + layout_params.push({ ...param, optional: true }); + } + + ensureProxies(page, leaf.proxies); + + if ( + // Be defensive - if a proxy doesn't exist (because it couldn't be created), assume a load function exists. + // If we didn't and it's a false negative, the user could wrongfully get a type error on layouts. + (leaf.proxies.server && !leaf.proxies.server.exports.includes('load')) || + (leaf.proxies.universal && !leaf.proxies.universal.exports.includes('load')) + ) { + all_pages_have_load = false; + } + } + if (!page.server && !page.universal) { + all_pages_have_load = false; + } + }); + + if (route.id === '/') { + // root layout is used for fallback error page, where ID can be null + ids.push('null'); + } + + declarations.push(`type LayoutRouteId = ${ids.join(' | ')}`); + + declarations.push( + 'type LayoutParams = RouteParams & ' + generate_params_type(layout_params, outdir, config) + ); + + const { + exports: e, + declarations: d, + proxies + } = process_node( + route.layout, + outdir, + false, + { server: null, universal: null }, + all_pages_have_load + ); + + exports.push(...e); + declarations.push(...d); + + if (proxies.server?.modified) to_delete.delete(proxies.server.file_name); + if (proxies.universal?.modified) to_delete.delete(proxies.universal.file_name); + + exports.push( + 'export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }' + ); + } + + if (route.endpoint) { + exports.push('export type RequestHandler = Kit.RequestHandler;'); + } + + if (route.leaf?.server || route.layout?.server || route.endpoint) { + exports.push('export type RequestEvent = Kit.RequestEvent;'); + } + + const output = [imports.join('\n'), declarations.join('\n'), exports.join('\n')] + .filter(Boolean) + .join('\n\n'); + + fs.writeFileSync(`${outdir}/$types.d.ts`, output); + to_delete.delete('$types.d.ts'); + + for (const file of to_delete) { + fs.unlinkSync(path.join(outdir, file)); + } +} + +/** + * @param {import('types').PageNode} node + * @param {string} outdir + * @param {boolean} is_page + * @param {Proxies} proxies + * @param {boolean} [all_pages_have_load] + */ +function process_node(node, outdir, is_page, proxies, all_pages_have_load = true) { + const params = `${is_page ? 'Route' : 'Layout'}Params`; + const prefix = is_page ? 'Page' : 'Layout'; + + const route_id = is_page ? 'RouteId' : 'LayoutRouteId'; + + /** @type {string[]} */ + const declarations = []; + /** @type {string[]} */ + const exports = []; + + /** @type {string} */ + let server_data; + /** @type {string} */ + let data; + + ensureProxies(node, proxies); + + if (node.server) { + const basename = path.basename(node.server); + const proxy = proxies.server; + if (proxy?.modified) { + fs.writeFileSync(`${outdir}/proxy${basename}`, proxy.code); + } + + server_data = get_data_type(node.server, 'null', proxy, true); + + const parent_type = `${prefix}ServerParentData`; + + declarations.push(`type ${parent_type} = ${get_parent_type(node, 'LayoutServerData')};`); + + // +page.js load present -> server can return all-optional data + const output_data_shape = + node.universal || (!is_page && all_pages_have_load) + ? 'Partial & Record | void' + : `OutputDataShape<${parent_type}>`; + exports.push( + `export type ${prefix}ServerLoad = Kit.ServerLoad<${params}, ${parent_type}, OutputData, ${route_id}>;` + ); + + exports.push(`export type ${prefix}ServerLoadEvent = Parameters<${prefix}ServerLoad>[0];`); + + if (is_page) { + let type = 'unknown'; + if (proxy && proxy.exports.includes('actions')) { + // If the file wasn't tweaked, we can use the return type of the original file. + // The advantage is that type updates are reflected without saving. + const from = proxy.modified + ? `./proxy${replace_ext_with_js(basename)}` + : path_to_original(outdir, node.server); + + exports.push( + 'type ExcludeActionFailure = T extends Kit.ActionFailure ? never : T extends void ? never : T;', + 'type ActionsSuccess any>> = { [Key in keyof T]: ExcludeActionFailure>>; }[keyof T];', + 'type ExtractActionFailure = T extends Kit.ActionFailure ? X extends void ? never : X : never;', + 'type ActionsFailure any>> = { [Key in keyof T]: Exclude>>, void>; }[keyof T];', + `type ActionsExport = typeof import('${from}').actions`, + 'export type SubmitFunction = Kit.SubmitFunction>, Expand>>' + ); + + type = 'Expand> | null'; + } + exports.push(`export type ActionData = ${type};`); + } + } else { + server_data = 'null'; + } + exports.push(`export type ${prefix}ServerData = ${server_data};`); + + const parent_type = `${prefix}ParentData`; + declarations.push(`type ${parent_type} = ${get_parent_type(node, 'LayoutData')};`); + + if (node.universal) { + const proxy = proxies.universal; + if (proxy?.modified) { + fs.writeFileSync(`${outdir}/proxy${path.basename(node.universal)}`, proxy.code); + } + + const type = get_data_type( + node.universal, + `${parent_type} & EnsureDefined<${prefix}ServerData>`, + proxy + ); + + data = `Expand & OptionalUnion>>`; + + const output_data_shape = + !is_page && all_pages_have_load + ? 'Partial & Record | void' + : `OutputDataShape<${parent_type}>`; + exports.push( + `export type ${prefix}Load = Kit.Load<${params}, ${prefix}ServerData, ${parent_type}, OutputData, ${route_id}>;` + ); + + exports.push(`export type ${prefix}LoadEvent = Parameters<${prefix}Load>[0];`); + } else if (server_data === 'null') { + data = `Expand<${parent_type}>`; + } else { + data = `Expand & EnsureDefined<${prefix}ServerData>>`; + } + + exports.push(`export type ${prefix}Data = ${data};`); + + return { declarations, exports, proxies }; + + /** + * @param {string} file_path + * @param {string} fallback + * @param {Proxy} proxy + * @param {boolean} expand + */ + function get_data_type(file_path, fallback, proxy, expand = false) { + if (proxy) { + if (proxy.exports.includes('load')) { + // If the file wasn't tweaked, we can use the return type of the original file. + // The advantage is that type updates are reflected without saving. + const from = proxy.modified + ? `./proxy${replace_ext_with_js(path.basename(file_path))}` + : path_to_original(outdir, file_path); + const type = `Kit.LoadProperties>>`; + return expand ? `Expand>>` : type; + } else { + return fallback; + } + } else { + return 'unknown'; + } + } +} + +/** + * This function populates the proxies object, if necessary and not already done. + * Proxies are used to tweak the code of a file before it's typechecked. + * They are needed in two places - when generating the types for a page or layout. + * To not do the same work twice, we generate the proxies once and pass them around. + * + * @param {import('types').PageNode} node + * @param {Proxies} proxies + */ +function ensureProxies(node, proxies) { + if (node.server && !proxies.server) { + proxies.server = createProxy(node.server, true); + } + + if (node.universal && !proxies.universal) { + proxies.universal = createProxy(node.universal, false); + } +} + +/** + * @param {string} file_path + * @param {boolean} is_server + * @returns {Proxy} + */ +function createProxy(file_path, is_server) { + const proxy = tweak_types(fs.readFileSync(file_path, 'utf8'), is_server); + if (proxy) { + return { + ...proxy, + file_name: `proxy${path.basename(file_path)}` + }; + } else { + return null; + } +} + +/** + * Get the parent type string by recursively looking up the parent layout and accumulate them to one type. + * @param {import('types').PageNode} node + * @param {string} type + */ +function get_parent_type(node, type) { + const parent_imports = []; + + let parent = node.parent; + + while (parent) { + const d = node.depth - parent.depth; + // unshift because we need it the other way round for the import string + parent_imports.unshift( + `${d === 0 ? '' : `import('${'../'.repeat(d)}${'$types.js'}').`}${type}` + ); + parent = parent.parent; + } + + let parent_str = `EnsureDefined<${parent_imports[0] || '{}'}>`; + for (let i = 1; i < parent_imports.length; i++) { + // Omit is necessary because a parent could have a property with the same key which would + // cause a type conflict. At runtime the child overwrites the parent property in this case, + // so reflect that in the type definition. + // EnsureDefined is necessary because {something: string} & null becomes null. + // Output types of server loads can be null but when passed in through the `parent` parameter they are the empty object instead. + parent_str = `Omit<${parent_str}, keyof ${parent_imports[i]}> & EnsureDefined<${parent_imports[i]}>`; + } + return parent_str; +} + +/** + * @param {string} outdir + * @param {string} file_path + */ +function path_to_original(outdir, file_path) { + return posixify(path.relative(outdir, path.join(cwd, replace_ext_with_js(file_path)))); +} + +/** + * @param {string} file_path + */ +function replace_ext_with_js(file_path) { + // Another extension than `.js` (or nothing, but that fails with node16 moduleResolution) + // will result in TS failing to lookup the file + const ext = path.extname(file_path); + return file_path.slice(0, -ext.length) + '.js'; +} + +/** + * @param {import('types').RouteParam[]} params + * @param {string} outdir + * @param {import('types').ValidatedConfig} config + */ +function generate_params_type(params, outdir, config) { + /** @param {string} matcher */ + const path_to_matcher = (matcher) => + posixify(path.relative(outdir, path.join(config.kit.files.params, matcher + '.js'))); + + return `{ ${params + .map( + (param) => + `${param.name}${param.optional ? '?' : ''}: ${ + param.matcher + ? `MatcherParam` + : 'string' + }` + ) + .join('; ')} }`; +} + +/** + * @param {string} content + * @param {boolean} is_server + * @returns {Omit, 'file_name'> | null} + */ +export function tweak_types(content, is_server) { + const names = new Set(is_server ? ['load', 'actions'] : ['load']); + + try { + let modified = false; + + const ast = ts.createSourceFile( + 'filename.ts', + content, + ts.ScriptTarget.Latest, + false, + ts.ScriptKind.TS + ); + + const code = new MagicString(content); + + const exports = new Map(); + + ast.forEachChild((node) => { + if ( + ts.isExportDeclaration(node) && + node.exportClause && + ts.isNamedExports(node.exportClause) + ) { + node.exportClause.elements.forEach((element) => { + const exported = element.name; + if (names.has(element.name.text)) { + const local = element.propertyName || element.name; + exports.set(exported.text, local.text); + } + }); + } + + if ( + ts.canHaveModifiers(node) && + ts.getModifiers(node)?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword) + ) { + if (ts.isFunctionDeclaration(node) && node.name?.text && names.has(node.name?.text)) { + exports.set(node.name.text, node.name.text); + } + + if (ts.isVariableStatement(node)) { + node.declarationList.declarations.forEach((declaration) => { + if (ts.isIdentifier(declaration.name) && names.has(declaration.name.text)) { + exports.set(declaration.name.text, declaration.name.text); + } + }); + } + } + }); + + /** + * @param {import('typescript').Node} node + * @param {import('typescript').Node} value + */ + function replace_jsdoc_type_tags(node, value) { + let _modified = false; + // @ts-ignore + if (node.jsDoc) { + // @ts-ignore + for (const comment of node.jsDoc) { + for (const tag of comment.tags ?? []) { + if (ts.isJSDocTypeTag(tag)) { + const is_fn = + ts.isFunctionDeclaration(value) || + ts.isFunctionExpression(value) || + ts.isArrowFunction(value); + + if (is_fn && value.parameters?.length > 0) { + const name = ts.isIdentifier(value.parameters[0].name) + ? value.parameters[0].name.text + : 'event'; + code.overwrite(tag.tagName.pos, tag.tagName.end, 'param'); + code.prependRight(tag.typeExpression.pos + 1, 'Parameters<'); + code.appendLeft(tag.typeExpression.end - 1, '>[0]'); + code.appendLeft(tag.typeExpression.end, ` ${name}`); + } else { + code.overwrite(tag.pos, tag.end, ''); + } + _modified = true; + } + } + } + } + modified = modified || _modified; + return _modified; + } + + ast.forEachChild((node) => { + if (ts.isFunctionDeclaration(node) && node.name?.text && node.name?.text === 'load') { + // remove JSDoc comment above `export function load ...` + replace_jsdoc_type_tags(node, node); + } + + if (ts.isVariableStatement(node)) { + // remove JSDoc comment above `export const load = ...` + if ( + ts.isIdentifier(node.declarationList.declarations[0].name) && + names.has(node.declarationList.declarations[0].name.text) && + node.declarationList.declarations[0].initializer + ) { + replace_jsdoc_type_tags(node, node.declarationList.declarations[0].initializer); + } + + for (const declaration of node.declarationList.declarations) { + if ( + ts.isIdentifier(declaration.name) && + declaration.name.text === 'load' && + declaration.initializer + ) { + // edge case — remove JSDoc comment above individual export + replace_jsdoc_type_tags(declaration, declaration.initializer); + + // remove type from `export const load: Load ...` + if (declaration.type) { + let a = declaration.type.pos; + const b = declaration.type.end; + while (is_whitespace(content[a])) a += 1; + + const type = content.slice(a, b); + code.remove(declaration.name.end, declaration.type.end); + + const rhs = declaration.initializer; + + if ( + rhs && + (ts.isArrowFunction(rhs) || ts.isFunctionExpression(rhs)) && + rhs.parameters.length + ) { + const arg = rhs.parameters[0]; + const add_parens = content[arg.pos - 1] !== '('; + + if (add_parens) code.prependRight(arg.pos, '('); + + if (arg && !arg.type) { + code.appendLeft( + arg.name.end, + `: Parameters<${type}>[0]` + (add_parens ? ')' : '') + ); + } else { + // prevent "type X is imported but not used" (isn't silenced by @ts-nocheck) when svelte-check runs + code.append(`;null as any as ${type};`); + } + } else { + // prevent "type X is imported but not used" (isn't silenced by @ts-nocheck) when svelte-check runs + code.append(`;null as any as ${type};`); + } + + modified = true; + } + } else if ( + is_server && + ts.isIdentifier(declaration.name) && + declaration.name?.text === 'actions' && + declaration.initializer + ) { + // remove JSDoc comment from `export const actions = ..` + const removed = replace_jsdoc_type_tags(node, declaration.initializer); + // ... and move type to each individual action + if (removed) { + const rhs = declaration.initializer; + if (ts.isObjectLiteralExpression(rhs)) { + for (const prop of rhs.properties) { + if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)) { + const rhs = prop.initializer; + const replaced = replace_jsdoc_type_tags(prop, rhs); + if ( + !replaced && + rhs && + (ts.isArrowFunction(rhs) || ts.isFunctionExpression(rhs)) && + rhs.parameters?.[0] + ) { + const name = ts.isIdentifier(rhs.parameters[0].name) + ? rhs.parameters[0].name.text + : 'event'; + code.prependRight( + rhs.pos, + `/** @param {import('./$types').RequestEvent} ${name} */ ` + ); + } + } + } + } + } + + // remove type from `export const actions: Actions ...` + if (declaration.type) { + let a = declaration.type.pos; + const b = declaration.type.end; + while (is_whitespace(content[a])) a += 1; + + const type = content.slice(a, b); + code.remove(declaration.name.end, declaration.type.end); + code.append(`;null as any as ${type};`); + modified = true; + + // ... and move type to each individual action + const rhs = declaration.initializer; + if (ts.isObjectLiteralExpression(rhs)) { + for (const prop of rhs.properties) { + if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name)) { + const rhs = prop.initializer; + + if ( + rhs && + (ts.isArrowFunction(rhs) || ts.isFunctionExpression(rhs)) && + rhs.parameters.length + ) { + const arg = rhs.parameters[0]; + const add_parens = content[arg.pos - 1] !== '('; + + if (add_parens) code.prependRight(arg.pos, '('); + + if (arg && !arg.type) { + code.appendLeft( + arg.name.end, + ": import('./$types').RequestEvent" + (add_parens ? ')' : '') + ); + } + } + } + } + } + } + } + } + } + }); + + if (modified) { + // Ignore all type errors so they don't show up twice when svelte-check runs + // Account for possible @ts-check which would overwrite @ts-nocheck + if (code.original.startsWith('// @ts-check')) { + code.prependLeft('// @ts-check'.length, '\n// @ts-nocheck\n'); + } else { + code.prepend('// @ts-nocheck\n'); + } + } + + return { + modified, + code: code.toString(), + exports: Array.from(exports.keys()) + }; + } catch { + return null; + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/utils.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..3bbcdea712ff97e792265d64763a1caa17f2a160 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/core/utils.js @@ -0,0 +1,86 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import { fileURLToPath } from 'node:url'; +import colors from 'kleur'; +import { posixify, to_fs } from '../utils/filesystem.js'; +import { noop } from '../utils/functions.js'; + +/** + * Resolved path of the `runtime` directory + * + * TODO Windows issue: + * Vite or sth else somehow sets the driver letter inconsistently to lower or upper case depending on the run environment. + * In playwright debug mode run through VS Code this a root-to-lowercase conversion is needed in order for the tests to run. + * If we do this conversion in other cases it has the opposite effect though and fails. + */ +export const runtime_directory = posixify(fileURLToPath(new URL('../runtime', import.meta.url))); + +/** + * This allows us to import SvelteKit internals that aren't exposed via `pkg.exports` in a + * way that works whether `@sveltejs/kit` is installed inside the project's `node_modules` + * or in a workspace root + */ +export const runtime_base = runtime_directory.startsWith(process.cwd()) + ? `/${path.relative('.', runtime_directory)}` + : to_fs(runtime_directory); + +/** @param {{ verbose: boolean }} opts */ +export function logger({ verbose }) { + /** @type {import('types').Logger} */ + const log = (msg) => console.log(msg.replace(/^/gm, ' ')); + + /** @param {string} msg */ + const err = (msg) => console.error(msg.replace(/^/gm, ' ')); + + log.success = (msg) => log(colors.green(`✔ ${msg}`)); + log.error = (msg) => err(colors.bold().red(msg)); + log.warn = (msg) => log(colors.bold().yellow(msg)); + + log.minor = verbose ? (msg) => log(colors.grey(msg)) : noop; + log.info = verbose ? log : noop; + + return log; +} + +/** @param {import('types').ManifestData} manifest_data */ +export function get_mime_lookup(manifest_data) { + /** @type {Record} */ + const mime = {}; + + manifest_data.assets.forEach((asset) => { + if (asset.type) { + const ext = path.extname(asset.file); + mime[ext] = asset.type; + } + }); + + return mime; +} + +/** + * @param {string} dir + * @param {(file: string) => boolean} [filter] + */ +export function list_files(dir, filter) { + /** @type {string[]} */ + const files = []; + + /** @param {string} current */ + function walk(current) { + for (const file of fs.readdirSync(path.resolve(dir, current))) { + const child = path.posix.join(current, file); + if (fs.statSync(path.resolve(dir, child)).isDirectory()) { + walk(child); + } else { + if (!filter || filter(child)) { + files.push(child); + } + } + } + } + + if (fs.existsSync(dir)) walk(''); + + return files; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/hooks/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/hooks/index.js new file mode 100644 index 0000000000000000000000000000000000000000..98e1e53a5ac211ece0db3d9b82afd5ce75d9dacb --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/hooks/index.js @@ -0,0 +1 @@ +export { sequence } from './sequence.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/hooks/sequence.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/hooks/sequence.js new file mode 100644 index 0000000000000000000000000000000000000000..3668c500cebb19d78761db7f460143826cf220ac --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/hooks/sequence.js @@ -0,0 +1,145 @@ +/** @import { Handle, RequestEvent, ResolveOptions } from '@sveltejs/kit' */ +/** @import { MaybePromise } from 'types' */ +import { + merge_tracing, + get_request_store, + with_request_store +} from '@sveltejs/kit/internal/server'; + +/** + * A helper function for sequencing multiple `handle` calls in a middleware-like manner. + * The behavior for the `handle` options is as follows: + * - `transformPageChunk` is applied in reverse order and merged + * - `preload` is applied in forward order, the first option "wins" and no `preload` options after it are called + * - `filterSerializedResponseHeaders` behaves the same as `preload` + * + * ```js + * /// file: src/hooks.server.js + * import { sequence } from '@sveltejs/kit/hooks'; + * + * /// type: import('@sveltejs/kit').Handle + * async function first({ event, resolve }) { + * console.log('first pre-processing'); + * const result = await resolve(event, { + * transformPageChunk: ({ html }) => { + * // transforms are applied in reverse order + * console.log('first transform'); + * return html; + * }, + * preload: () => { + * // this one wins as it's the first defined in the chain + * console.log('first preload'); + * return true; + * } + * }); + * console.log('first post-processing'); + * return result; + * } + * + * /// type: import('@sveltejs/kit').Handle + * async function second({ event, resolve }) { + * console.log('second pre-processing'); + * const result = await resolve(event, { + * transformPageChunk: ({ html }) => { + * console.log('second transform'); + * return html; + * }, + * preload: () => { + * console.log('second preload'); + * return true; + * }, + * filterSerializedResponseHeaders: () => { + * // this one wins as it's the first defined in the chain + * console.log('second filterSerializedResponseHeaders'); + * return true; + * } + * }); + * console.log('second post-processing'); + * return result; + * } + * + * export const handle = sequence(first, second); + * ``` + * + * The example above would print: + * + * ``` + * first pre-processing + * first preload + * second pre-processing + * second filterSerializedResponseHeaders + * second transform + * first transform + * second post-processing + * first post-processing + * ``` + * + * @param {...Handle} handlers The chain of `handle` functions + * @returns {Handle} + */ +export function sequence(...handlers) { + const length = handlers.length; + if (!length) return ({ event, resolve }) => resolve(event); + + return ({ event, resolve }) => { + const { state } = get_request_store(); + return apply_handle(0, event, {}); + + /** + * @param {number} i + * @param {RequestEvent} event + * @param {ResolveOptions | undefined} parent_options + * @returns {MaybePromise} + */ + function apply_handle(i, event, parent_options) { + const handle = handlers[i]; + + return state.tracing.record_span({ + name: `sveltekit.handle.sequenced.${handle.name ? handle.name : i}`, + attributes: {}, + fn: async (current) => { + const traced_event = merge_tracing(event, current); + return await with_request_store({ event: traced_event, state }, () => + handle({ + event: traced_event, + resolve: (event, options) => { + /** @type {ResolveOptions['transformPageChunk']} */ + const transformPageChunk = async ({ html, done }) => { + if (options?.transformPageChunk) { + html = (await options.transformPageChunk({ html, done })) ?? ''; + } + + if (parent_options?.transformPageChunk) { + html = (await parent_options.transformPageChunk({ html, done })) ?? ''; + } + + return html; + }; + + /** @type {ResolveOptions['filterSerializedResponseHeaders']} */ + const filterSerializedResponseHeaders = + parent_options?.filterSerializedResponseHeaders ?? + options?.filterSerializedResponseHeaders; + + /** @type {ResolveOptions['preload']} */ + const preload = parent_options?.preload ?? options?.preload; + + return i < length - 1 + ? apply_handle(i + 1, event, { + transformPageChunk, + filterSerializedResponseHeaders, + preload + }) + : resolve(event, { + transformPageChunk, + filterSerializedResponseHeaders, + preload + }); + } + }) + ); + } + }); + } + }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c6e2b7c465ff80d481fc5dfa69a081497faca529 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/index.js @@ -0,0 +1,308 @@ +/** @import { StandardSchemaV1 } from '@standard-schema/spec' */ + +import { HttpError, Redirect, ActionFailure, ValidationError } from './internal/index.js'; +import { BROWSER, DEV } from 'esm-env'; +import { + add_data_suffix, + add_resolution_suffix, + has_data_suffix, + has_resolution_suffix, + strip_data_suffix, + strip_resolution_suffix +} from '../runtime/pathname.js'; +import { text_encoder } from '../runtime/utils.js'; + +export { VERSION } from '../version.js'; + +// TODO 3.0: remove these types as they are not used anymore (we can't remove them yet because that would be a breaking change) +/** + * @template {number} TNumber + * @template {any[]} [TArray=[]] + * @typedef {TNumber extends TArray['length'] ? TArray[number] : LessThan} LessThan + */ + +/** + * @template {number} TStart + * @template {number} TEnd + * @typedef {Exclude, LessThan>} NumericRange + */ + +// Keep the status codes as `number` because restricting to certain numbers makes it unnecessarily hard to use compared to the benefits +// (we have runtime errors already to check for invalid codes). Also see https://github.com/sveltejs/kit/issues/11780 + +// we have to repeat the JSDoc because the display for function overloads is broken +// see https://github.com/microsoft/TypeScript/issues/55056 + +/** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param {App.Error} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @overload + * @param {number} status + * @param {App.Error} body + * @return {never} + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ +/** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @overload + * @param {number} status + * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} [body] + * @return {never} + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ +/** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param {{ message: string } extends App.Error ? App.Error | string | undefined : never} body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @return {never} + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ +export function error(status, body) { + if ((!BROWSER || DEV) && (isNaN(status) || status < 400 || status > 599)) { + throw new Error(`HTTP error status codes must be between 400 and 599 — ${status} is invalid`); + } + + throw new HttpError(status, body); +} + +/** + * Checks whether this is an error thrown by {@link error}. + * @template {number} T + * @param {unknown} e + * @param {T} [status] The status to filter for. + * @return {e is (HttpError & { status: T extends undefined ? never : T })} + */ +export function isHttpError(e, status) { + if (!(e instanceof HttpError)) return false; + return !status || e.status === status; +} + +/** + * Redirect a request. When called during request handling, SvelteKit will return a redirect response. + * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it. + * + * Most common status codes: + * * `303 See Other`: redirect as a GET request (often used after a form POST request) + * * `307 Temporary Redirect`: redirect will keep the request method + * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page + * + * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages) + * + * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number)} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308. + * @param {string | URL} location The location to redirect to. + * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location. + * @throws {Error} If the provided status is invalid or the location cannot be used as a header value. + * @return {never} + */ +export function redirect(status, location) { + if ((!BROWSER || DEV) && (isNaN(status) || status < 300 || status > 308)) { + throw new Error('Invalid status code'); + } + + throw new Redirect( + // @ts-ignore + status, + location.toString() + ); +} + +/** + * Checks whether this is a redirect thrown by {@link redirect}. + * @param {unknown} e The object to check. + * @return {e is Redirect} + */ +export function isRedirect(e) { + return e instanceof Redirect; +} + +/** + * Create a JSON `Response` object from the supplied data. + * @param {any} data The value that will be serialized as JSON. + * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically. + */ +export function json(data, init) { + // TODO deprecate this in favour of `Response.json` when it's + // more widely supported + const body = JSON.stringify(data); + + // we can't just do `text(JSON.stringify(data), init)` because + // it will set a default `content-type` header. duplicated code + // means less duplicated work + const headers = new Headers(init?.headers); + if (!headers.has('content-length')) { + headers.set('content-length', text_encoder.encode(body).byteLength.toString()); + } + + if (!headers.has('content-type')) { + headers.set('content-type', 'application/json'); + } + + return new Response(body, { + ...init, + headers + }); +} + +/** + * Create a `Response` object from the supplied body. + * @param {string} body The value that will be used as-is. + * @param {ResponseInit} [init] Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically. + */ +export function text(body, init) { + const headers = new Headers(init?.headers); + if (!headers.has('content-length')) { + const encoded = text_encoder.encode(body); + headers.set('content-length', encoded.byteLength.toString()); + return new Response(encoded, { + ...init, + headers + }); + } + + return new Response(body, { + ...init, + headers + }); +} + +/** + * Create an `ActionFailure` object. Call when form submission fails. + * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @overload + * @param {number} status + * @returns {import('./public.js').ActionFailure} + */ +/** + * Create an `ActionFailure` object. Call when form submission fails. + * @template [T=undefined] + * @param {number} status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param {T} data Data associated with the failure (e.g. validation errors) + * @overload + * @param {number} status + * @param {T} data + * @returns {import('./public.js').ActionFailure} + */ +/** + * Create an `ActionFailure` object. Call when form submission fails. + * @param {number} status + * @param {any} [data] + * @returns {import('./public.js').ActionFailure} + */ +export function fail(status, data) { + // @ts-expect-error unique symbol missing + return new ActionFailure(status, data); +} + +/** + * Checks whether this is an action failure thrown by {@link fail}. + * @param {unknown} e The object to check. + * @return {e is import('./public.js').ActionFailure} + */ +export function isActionFailure(e) { + return e instanceof ActionFailure; +} + +/** + * Use this to throw a validation error to imperatively fail form validation. + * Can be used in combination with `issue` passed to form actions to create field-specific issues. + * + * @example + * ```ts + * import { invalid } from '@sveltejs/kit'; + * import { form } from '$app/server'; + * import { tryLogin } from '$lib/server/auth'; + * import * as v from 'valibot'; + * + * export const login = form( + * v.object({ name: v.string(), _password: v.string() }), + * async ({ name, _password }) => { + * const success = tryLogin(name, _password); + * if (!success) { + * invalid('Incorrect username or password'); + * } + * + * // ... + * } + * ); + * ``` + * @param {...(StandardSchemaV1.Issue | string)} issues + * @returns {never} + * @since 2.47.3 + */ +export function invalid(...issues) { + throw new ValidationError( + issues.map((issue) => (typeof issue === 'string' ? { message: issue } : issue)) + ); +} + +/** + * Checks whether this is an validation error thrown by {@link invalid}. + * @param {unknown} e The object to check. + * @return {e is import('./public.js').ActionFailure} + * @since 2.47.3 + */ +export function isValidationError(e) { + return e instanceof ValidationError; +} + +/** + * Strips possible SvelteKit-internal suffixes and trailing slashes from the URL pathname. + * Returns the normalized URL as well as a method for adding the potential suffix back + * based on a new pathname (possibly including search) or URL. + * ```js + * import { normalizeUrl } from '@sveltejs/kit'; + * + * const { url, denormalize } = normalizeUrl('/blog/post/__data.json'); + * console.log(url.pathname); // /blog/post + * console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json + * ``` + * @param {URL | string} url + * @returns {{ url: URL, wasNormalized: boolean, denormalize: (url?: string | URL) => URL }} + * @since 2.18.0 + */ +export function normalizeUrl(url) { + url = new URL(url, 'a://a'); + + const is_route_resolution = has_resolution_suffix(url.pathname); + const is_data_request = has_data_suffix(url.pathname); + const has_trailing_slash = url.pathname !== '/' && url.pathname.endsWith('/'); + + if (is_route_resolution) { + url.pathname = strip_resolution_suffix(url.pathname); + } else if (is_data_request) { + url.pathname = strip_data_suffix(url.pathname); + } else if (has_trailing_slash) { + url.pathname = url.pathname.slice(0, -1); + } + + return { + url, + wasNormalized: is_data_request || is_route_resolution || has_trailing_slash, + denormalize: (new_url = url) => { + new_url = new URL(new_url, url); + if (is_route_resolution) { + new_url.pathname = add_resolution_suffix(new_url.pathname); + } else if (is_data_request) { + new_url.pathname = add_data_suffix(new_url.pathname); + } else if (has_trailing_slash && !new_url.pathname.endsWith('/')) { + new_url.pathname += '/'; + } + return new_url; + } + }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/event.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/event.js new file mode 100644 index 0000000000000000000000000000000000000000..9d658494e1be2b3accd73610fc02698998d6dd10 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/event.js @@ -0,0 +1,85 @@ +/** @import { RequestEvent } from '@sveltejs/kit' */ +/** @import { RequestStore } from 'types' */ +/** @import { AsyncLocalStorage } from 'node:async_hooks' */ + +import { IN_WEBCONTAINER } from '../../runtime/server/constants.js'; + +/** @type {RequestStore | null} */ +let sync_store = null; + +/** @type {AsyncLocalStorage | null} */ +let als; + +import('node:async_hooks') + .then((hooks) => (als = new hooks.AsyncLocalStorage())) + .catch(() => { + // can't use AsyncLocalStorage, but can still call getRequestEvent synchronously. + // this isn't behind `supports` because it's basically just StackBlitz (i.e. + // in-browser usage) that doesn't support it AFAICT + }); + +/** + * Returns the current `RequestEvent`. Can be used inside server hooks, server `load` functions, actions, and endpoints (and functions called by them). + * + * In environments without [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage), this must be called synchronously (i.e. not after an `await`). + * @since 2.20.0 + * + * @returns {RequestEvent} + */ +export function getRequestEvent() { + const event = try_get_request_store()?.event; + + if (!event) { + let message = + 'Can only read the current request event inside functions invoked during `handle`, such as server `load` functions, actions, endpoints, and other server hooks.'; + + if (!als) { + message += + ' In environments without `AsyncLocalStorage`, the event must be read synchronously, not after an `await`.'; + } + + throw new Error(message); + } + + return event; +} + +export function get_request_store() { + const result = try_get_request_store(); + if (!result) { + let message = 'Could not get the request store.'; + + if (als) { + message += ' This is an internal error.'; + } else { + message += + ' In environments without `AsyncLocalStorage`, the request store (used by e.g. remote functions) must be accessed synchronously, not after an `await`.' + + ' If it was accessed synchronously then this is an internal error.'; + } + + throw new Error(message); + } + return result; +} + +export function try_get_request_store() { + return sync_store ?? als?.getStore() ?? null; +} + +/** + * @template T + * @param {RequestStore | null} store + * @param {() => T} fn + */ +export function with_request_store(store, fn) { + try { + sync_store = store; + return als ? als.run(store, fn) : fn(); + } finally { + // Since AsyncLocalStorage is not working in webcontainers, we don't reset `sync_store` + // and handle only one request at a time in `src/runtime/server/index.js`. + if (!IN_WEBCONTAINER) { + sync_store = null; + } + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/index.js new file mode 100644 index 0000000000000000000000000000000000000000..eb9589c368d486ceec3820a5de92f72431ef8e0f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/index.js @@ -0,0 +1,90 @@ +/** @import { StandardSchemaV1 } from '@standard-schema/spec' */ + +export class HttpError { + /** + * @param {number} status + * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body + */ + constructor(status, body) { + this.status = status; + if (typeof body === 'string') { + this.body = { message: body }; + } else if (body) { + this.body = body; + } else { + this.body = { message: `Error: ${status}` }; + } + } + + toString() { + return JSON.stringify(this.body); + } +} + +export class Redirect { + /** + * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status + * @param {string} location + */ + constructor(status, location) { + try { + new Headers({ location }); + } catch { + throw new Error( + `Invalid redirect location ${JSON.stringify(location)}: ` + + 'this string contains characters that cannot be used in HTTP headers' + ); + } + + this.status = status; + this.location = location; + } +} + +/** + * An error that was thrown from within the SvelteKit runtime that is not fatal and doesn't result in a 500, such as a 404. + * `SvelteKitError` goes through `handleError`. + * @extends Error + */ +export class SvelteKitError extends Error { + /** + * @param {number} status + * @param {string} text + * @param {string} message + */ + constructor(status, text, message) { + super(message); + this.status = status; + this.text = text; + } +} + +/** + * @template [T=undefined] + */ +export class ActionFailure { + /** + * @param {number} status + * @param {T} data + */ + constructor(status, data) { + this.status = status; + this.data = data; + } +} + +/** + * Error thrown when form validation fails imperatively + */ +export class ValidationError extends Error { + /** + * @param {StandardSchemaV1.Issue[]} issues + */ + constructor(issues) { + super('Validation failed'); + this.name = 'ValidationError'; + this.issues = issues; + } +} + +export { init_remote_functions } from './remote-functions.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/remote-functions.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/remote-functions.js new file mode 100644 index 0000000000000000000000000000000000000000..f7da7b41742d661928f03c7ac1a260fd8bf4a2ec --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/remote-functions.js @@ -0,0 +1,28 @@ +/** @import { RemoteInternals } from 'types' */ + +/** @type {RemoteInternals['type'][]} */ +const types = ['command', 'form', 'prerender', 'query', 'query_batch', 'query_live']; + +/** + * @param {Record} module + * @param {string} file + * @param {string} hash + */ +export function init_remote_functions(module, file, hash) { + if (module.default) { + throw new Error( + `Cannot export \`default\` from a remote module (${file}) — please use named exports instead` + ); + } + + for (const [name, fn] of Object.entries(module)) { + if (!types.includes(fn?.__?.type)) { + throw new Error( + `\`${name}\` exported from ${file} is invalid — all exports from this file must be remote functions` + ); + } + + fn.__.id = `${hash}/${name}`; + fn.__.name = name; + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/server.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/server.js new file mode 100644 index 0000000000000000000000000000000000000000..ed425062637fe3d74ea038d5bb2a685674e6c739 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/internal/server.js @@ -0,0 +1,22 @@ +/** + * @template {{ tracing: { enabled: boolean, root: import('@opentelemetry/api').Span, current: import('@opentelemetry/api').Span } }} T + * @param {T} event_like + * @param {import('@opentelemetry/api').Span} current + * @returns {T} + */ +export function merge_tracing(event_like, current) { + return { + ...event_like, + tracing: { + ...event_like.tracing, + current + } + }; +} + +export { + with_request_store, + getRequestEvent, + get_request_store, + try_get_request_store +} from './event.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/node/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/node/index.js new file mode 100644 index 0000000000000000000000000000000000000000..81bd5cf6c63d24b4d7587dae5b130601dfd80130 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/node/index.js @@ -0,0 +1,251 @@ +import { createReadStream } from 'node:fs'; +import { Readable } from 'node:stream'; +import * as set_cookie_parser from 'set-cookie-parser'; +import { SvelteKitError } from '../internal/index.js'; +import { noop } from '../../utils/functions.js'; + +/** + * @param {import('http').IncomingMessage} req + * @param {number} [body_size_limit] + */ +function get_raw_body(req, body_size_limit) { + const h = req.headers; + + if (!h['content-type']) { + return null; + } + + const content_length = Number(h['content-length']); + const has_content_length = Number.isFinite(content_length); + + // check if no request body + if ( + (req.httpVersionMajor === 1 && !has_content_length && h['transfer-encoding'] == null) || + content_length === 0 + ) { + return null; + } + + if (req.destroyed) { + const readable = new ReadableStream(); + void readable.cancel(); + return readable; + } + + let size = 0; + let cancelled = false; + + return new ReadableStream({ + start(controller) { + if (body_size_limit !== undefined && has_content_length && content_length > body_size_limit) { + let message = `Content-length of ${content_length} exceeds limit of ${body_size_limit} bytes.`; + + if (body_size_limit === 0) { + // https://github.com/sveltejs/kit/pull/11589 + // TODO this exists to aid migration — remove in a future version + message += ' To disable body size limits, specify Infinity rather than 0.'; + } + + const error = new SvelteKitError(413, 'Payload Too Large', message); + + controller.error(error); + return; + } + + req.on('error', (error) => { + cancelled = true; + controller.error(error); + }); + + req.on('end', () => { + if (cancelled) return; + controller.close(); + }); + + req.on('data', (chunk) => { + if (cancelled) return; + + size += chunk.length; + + if (body_size_limit !== undefined && size > body_size_limit) { + cancelled = true; + + const message = `request body size exceeded BODY_SIZE_LIMIT of ${body_size_limit}`; + + const error = new SvelteKitError(413, 'Payload Too Large', message); + controller.error(error); + + return; + } + + if (has_content_length && size > content_length) { + cancelled = true; + + const message = `request body size exceeded content-length of ${content_length}`; + + const error = new SvelteKitError(413, 'Payload Too Large', message); + controller.error(error); + + return; + } + + controller.enqueue(chunk); + + if (controller.desiredSize === null || controller.desiredSize <= 0) { + req.pause(); + } + }); + }, + + pull() { + req.resume(); + }, + + cancel(reason) { + cancelled = true; + req.destroy(reason); + } + }); +} + +/** + * @param {{ + * request: import('http').IncomingMessage; + * base: string; + * bodySizeLimit?: number; + * }} options + * @returns {Promise} + */ +// TODO 3.0 make the signature synchronous? +// eslint-disable-next-line @typescript-eslint/require-await +export async function getRequest({ request, base, bodySizeLimit }) { + let headers = /** @type {Record} */ (request.headers); + if (request.httpVersionMajor >= 2) { + // the Request constructor rejects headers with ':' in the name + headers = Object.assign({}, headers); + // https://www.rfc-editor.org/rfc/rfc9113.html#section-8.3.1-2.3.5 + if (headers[':authority']) { + headers.host = headers[':authority']; + } + delete headers[':authority']; + delete headers[':method']; + delete headers[':path']; + delete headers[':scheme']; + } + + // TODO: Whenever Node >=22 is minimum supported version, we can use `request.readableAborted` + // @see https://github.com/nodejs/node/blob/5cf3c3e24c7257a0c6192ed8ef71efec8ddac22b/lib/internal/streams/readable.js#L1443-L1453 + const controller = new AbortController(); + let errored = false; + let end_emitted = false; + request.once('error', () => (errored = true)); + request.once('end', () => (end_emitted = true)); + request.once('close', () => { + if ((errored || request.destroyed) && !end_emitted) { + controller.abort(); + } + }); + + return new Request(base + request.url, { + // @ts-expect-error + duplex: 'half', + method: request.method, + headers: Object.entries(headers), + signal: controller.signal, + body: + request.method === 'GET' || request.method === 'HEAD' + ? undefined + : get_raw_body(request, bodySizeLimit) + }); +} + +/** + * @param {import('http').ServerResponse} res + * @param {Response} response + * @returns {Promise} + */ +// TODO 3.0 make the signature synchronous? +// eslint-disable-next-line @typescript-eslint/require-await +export async function setResponse(res, response) { + for (const [key, value] of response.headers) { + try { + res.setHeader( + key, + key === 'set-cookie' + ? set_cookie_parser.splitCookiesString( + // This is absurd but necessary, TODO: investigate why + /** @type {string}*/ (response.headers.get(key)) + ) + : value + ); + } catch (error) { + res.getHeaderNames().forEach((name) => res.removeHeader(name)); + res.writeHead(500).end(String(error)); + return; + } + } + + res.writeHead(response.status); + + if (!response.body) { + res.end(); + return; + } + + if (response.body.locked) { + res.end( + 'Fatal error: Response body is locked. ' + + "This can happen when the response was already read (for example through 'response.json()' or 'response.text()')." + ); + return; + } + + const reader = response.body.getReader(); + + if (res.destroyed) { + void reader.cancel(); + return; + } + + const cancel = (/** @type {Error|undefined} */ error) => { + res.off('close', cancel); + res.off('error', cancel); + + // If the reader has already been interrupted with an error earlier, + // then it will appear here, it is useless, but it needs to be catch. + reader.cancel(error).catch(noop); + if (error) res.destroy(error); + }; + + res.on('close', cancel); + res.on('error', cancel); + + void next(); + async function next() { + try { + for (;;) { + const { done, value } = await reader.read(); + + if (done) break; + + if (!res.write(value)) { + res.once('drain', next); + return; + } + } + res.end(); + } catch (error) { + cancel(error instanceof Error ? error : new Error(String(error))); + } + } +} + +/** + * Converts a file on disk to a readable stream + * @param {string} file + * @returns {ReadableStream} + * @since 2.4.0 + */ +export function createReadableStream(file) { + return /** @type {ReadableStream} */ (Readable.toWeb(createReadStream(file))); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/node/polyfills.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/node/polyfills.js new file mode 100644 index 0000000000000000000000000000000000000000..347c68cea2e93c8d184d2ba8f5b9583ee1686b5c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/node/polyfills.js @@ -0,0 +1,30 @@ +import buffer from 'node:buffer'; +import { webcrypto as crypto } from 'node:crypto'; + +// `buffer.File` was added in Node 18.13.0 while the `File` global was added in Node 20.0.0 +const File = /** @type {import('node:buffer') & { File?: File}} */ (buffer).File; + +/** @type {Record} */ +const globals = { + crypto, + File +}; + +// exported for dev/preview and node environments +/** + * Make various web APIs available as globals: + * - `crypto` + * - `File` + */ +export function installPolyfills() { + for (const name in globals) { + if (name in globalThis) continue; + + Object.defineProperty(globalThis, name, { + enumerable: true, + configurable: true, + writable: true, + value: globals[name] + }); + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/public.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/public.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1bae4ca70b47325d83820e858ef62354a56e4936 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/public.d.ts @@ -0,0 +1,2324 @@ +import 'svelte'; // pick up `declare module "*.svelte"` +import 'vite/client'; // pick up `declare module "*.jpg"`, etc. +import '../types/ambient.js'; + +import { + AdapterEntry, + CspDirectives, + HttpMethod, + Logger, + MaybePromise, + Prerendered, + PrerenderEntryGeneratorMismatchHandlerValue, + PrerenderHttpErrorHandlerValue, + PrerenderMissingIdHandlerValue, + PrerenderUnseenRoutesHandlerValue, + PrerenderOption, + RequestOptions, + RouteSegment, + DeepPartial, + IsAny +} from '../types/private.js'; +import { BuildData, SSRNodeLoader, SSRRoute, ValidatedConfig } from 'types'; +import { SvelteConfig } from '@sveltejs/vite-plugin-svelte'; +import { StandardSchemaV1 } from '@standard-schema/spec'; +import { + RouteId as AppRouteId, + LayoutParams as AppLayoutParams, + ResolvedPathname +} from '$app/types'; + +export { PrerenderOption } from '../types/private.js'; + +// @ts-ignore this is an optional peer dependency so could be missing. Written like this so dts-buddy preserves the ts-ignore +type Span = import('@opentelemetry/api').Span; + +/** + * [Adapters](https://svelte.dev/docs/kit/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing. + */ +export interface Adapter { + /** + * The name of the adapter, using for logging. Will typically correspond to the package name. + */ + name: string; + /** + * This function is called after SvelteKit has built your app. + * @param builder An object provided by SvelteKit that contains methods for adapting the app + */ + adapt: (builder: Builder) => MaybePromise; + /** + * Checks called during dev and build to determine whether specific features will work in production with this adapter. + */ + supports?: { + /** + * Test support for `read` from `$app/server`. + * @param details.config The merged adapter-specific route config exported from the route with `export const config` + */ + read?: (details: { config: any; route: { id: string } }) => boolean; + + /** + * Test support for `instrumentation.server.js`. To pass, the adapter must support running `instrumentation.server.js` prior to the application code. + * @since 2.31.0 + */ + instrumentation?: () => boolean; + }; + /** + * Creates an `Emulator`, which allows the adapter to influence the environment + * during dev, build and prerendering. + */ + emulate?: () => MaybePromise; +} + +export type LoadProperties | void> = input extends void + ? undefined // needs to be undefined, because void will break intellisense + : input extends Record + ? input + : unknown; + +export type AwaitedActions any>> = OptionalUnion< + { + [Key in keyof T]: UnpackValidationError>>; + }[keyof T] +>; + +// Takes a union type and returns a union type where each type also has all properties +// of all possible types (typed as undefined), making accessing them more ergonomic +type OptionalUnion< + U extends Record, // not unknown, else interfaces don't satisfy this constraint + A extends keyof U = U extends U ? keyof U : never +> = U extends unknown ? { [P in Exclude]?: never } & U : never; + +declare const uniqueSymbol: unique symbol; + +export interface ActionFailure { + status: number; + data: T; + [uniqueSymbol]: true; // necessary or else UnpackValidationError could wrongly unpack objects with the same shape as ActionFailure +} + +type UnpackValidationError = + T extends ActionFailure + ? X + : T extends void + ? undefined // needs to be undefined, because void will corrupt union type + : T; + +/** + * This object is passed to the `adapt` function of adapters. + * It contains various methods and properties that are useful for adapting the app. + */ +export interface Builder { + /** Print messages to the console. `log.info` and `log.minor` are silent unless Vite's `logLevel` is `info`. */ + log: Logger; + /** Remove `dir` and all its contents. */ + rimraf: (dir: string) => void; + /** Create `dir` and any required parent directories. */ + mkdirp: (dir: string) => void; + + /** The fully resolved Svelte config. */ + config: ValidatedConfig; + /** Information about prerendered pages and assets, if any. */ + prerendered: Prerendered; + /** An array of all routes (including prerendered) */ + routes: RouteDefinition[]; + + // TODO 3.0 remove this method + /** + * Create separate functions that map to one or more routes of your app. + * @param fn A function that groups a set of routes into an entry point + * @deprecated Use `builder.routes` instead + */ + createEntries: (fn: (route: RouteDefinition) => AdapterEntry) => Promise; + + /** + * Find all the assets imported by server files belonging to `routes` + */ + findServerAssets: (routes: RouteDefinition[]) => string[]; + + /** + * Generate a fallback page for a static webserver to use when no route is matched. Useful for single-page apps. + */ + generateFallback: (dest: string) => Promise; + + /** + * Generate a module exposing build-time environment variables as `$env/dynamic/public`. + */ + generateEnvModule: () => void; + + /** + * Generate a server-side manifest to initialise the SvelteKit [server](https://svelte.dev/docs/kit/@sveltejs-kit#Server) with. + * @param opts a relative path to the base directory of the app and optionally in which format (esm or cjs) the manifest should be generated + */ + generateManifest: (opts: { relativePath: string; routes?: RouteDefinition[] }) => string; + + /** + * Resolve a path to the `name` directory inside `outDir`, e.g. `/path/to/.svelte-kit/my-adapter`. + * @param name path to the file, relative to the build directory + */ + getBuildDirectory: (name: string) => string; + /** Get the fully resolved path to the directory containing client-side assets, including the contents of your `static` directory. */ + getClientDirectory: () => string; + /** Get the fully resolved path to the directory containing server-side code. */ + getServerDirectory: () => string; + /** Get the application path including any configured `base` path, e.g. `my-base-path/_app`. */ + getAppPath: () => string; + + /** + * Write client assets to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writeClient: (dest: string) => string[]; + /** + * Write prerendered files to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writePrerendered: (dest: string) => string[]; + /** + * Write server-side code to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writeServer: (dest: string) => string[]; + /** + * Copy a file or directory. + * @param from the source file or directory + * @param to the destination file or directory + * @param opts.filter a function to determine whether a file or directory should be copied + * @param opts.replace a map of strings to replace + * @returns an array of files that were copied + */ + copy: ( + from: string, + to: string, + opts?: { + filter?(basename: string): boolean; + replace?: Record; + } + ) => string[]; + + /** + * Check if the server instrumentation file exists. + * @returns true if the server instrumentation file exists, false otherwise + * @since 2.31.0 + */ + hasServerInstrumentationFile: () => boolean; + + /** + * Instrument `entrypoint` with `instrumentation`. + * + * Renames `entrypoint` to `start` and creates a new module at + * `entrypoint` which imports `instrumentation` and then dynamically imports `start`. This allows + * the module hooks necessary for instrumentation libraries to be loaded prior to any application code. + * + * Caveats: + * - "Live exports" will not work. If your adapter uses live exports, your users will need to manually import the server instrumentation on startup. + * - If `tla` is `false`, OTEL auto-instrumentation may not work properly. Use it if your environment supports it. + * - Use `hasServerInstrumentationFile` to check if the user has a server instrumentation file; if they don't, you shouldn't do this. + * + * @param options an object containing the following properties: + * @param options.entrypoint the path to the entrypoint to trace. + * @param options.instrumentation the path to the instrumentation file. + * @param options.start the name of the start file. This is what `entrypoint` will be renamed to. + * @param options.module configuration for the resulting entrypoint module. + * @param options.module.exports + * @param options.module.generateText a function that receives the relative paths to the instrumentation and start files, and generates the text of the module to be traced. If not provided, the default implementation will be used, which uses top-level await. + * @since 2.31.0 + */ + instrument: (args: { + entrypoint: string; + instrumentation: string; + start?: string; + module?: + | { + exports: string[]; + } + | { + generateText: (args: { instrumentation: string; start: string }) => string; + }; + }) => void; + + /** + * Compress files in `directory` with gzip and brotli, where appropriate. Generates `.gz` and `.br` files alongside the originals. + * @param {string} directory The directory containing the files to be compressed + */ + compress: (directory: string) => Promise; +} + +/** + * An extension of [`vite-plugin-svelte`'s options](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#svelte-options). + */ +export interface Config extends SvelteConfig { + /** + * SvelteKit options. + * + * @see https://svelte.dev/docs/kit/configuration + */ + kit?: KitConfig; + /** Any additional options required by tooling that integrates with Svelte. */ + [key: string]: any; +} + +export interface Cookies { + /** + * Gets a cookie that was previously set with `cookies.set`, or from the request headers. + * @param name the name of the cookie + * @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options) + */ + get: (name: string, opts?: import('cookie').CookieParseOptions) => string | undefined; + + /** + * Gets all cookies that were previously set with `cookies.set`, or from the request headers. + * @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options) + */ + getAll: (opts?: import('cookie').CookieParseOptions) => Array<{ name: string; value: string }>; + + /** + * Sets a cookie. This will add a `set-cookie` header to the response, but also make the cookie available via `cookies.get` or `cookies.getAll` during the current request. + * + * The `httpOnly` and `secure` options are `true` by default (except on http://localhost, where `secure` is `false`), and must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP. The `sameSite` option defaults to `lax`. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * @param name the name of the cookie + * @param value the cookie value + * @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + set: ( + name: string, + value: string, + opts: import('cookie').CookieSerializeOptions & { path: string } + ) => void; + + /** + * Deletes a cookie by setting its value to an empty string and setting the expiry date in the past. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * @param name the name of the cookie + * @param opts the options, passed directly to `cookie.serialize`. The `path` must match the path of the cookie you want to delete. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + delete: (name: string, opts: import('cookie').CookieSerializeOptions & { path: string }) => void; + + /** + * Serialize a cookie name-value pair into a `Set-Cookie` header string, but don't apply it to the response. + * + * The `httpOnly` and `secure` options are `true` by default (except on http://localhost, where `secure` is `false`), and must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP. The `sameSite` option defaults to `lax`. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * + * @param name the name of the cookie + * @param value the cookie value + * @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + serialize: ( + name: string, + value: string, + opts: import('cookie').CookieSerializeOptions & { path: string } + ) => string; +} + +/** + * A collection of functions that influence the environment during dev, build and prerendering + */ +export interface Emulator { + /** + * A function that is called with the current route `config` and `prerender` option + * and returns an `App.Platform` object + */ + platform?(details: { config: any; prerender: PrerenderOption }): MaybePromise; +} + +export interface KitConfig { + /** + * Your [adapter](https://svelte.dev/docs/kit/adapters) is run when executing `vite build`. It determines how the output is converted for different platforms. + * @default undefined + */ + adapter?: Adapter; + /** + * An object containing zero or more aliases used to replace values in `import` statements. These aliases are automatically passed to Vite and TypeScript. + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * alias: { + * // this will match a file + * 'my-file': 'path/to/my-file.js', + * + * // this will match a directory and its contents + * // (`my-directory/x` resolves to `path/to/my-directory/x`) + * 'my-directory': 'path/to/my-directory', + * + * // an alias ending /* will only match + * // the contents of a directory, not the directory itself + * 'my-directory/*': 'path/to/my-directory/*' + * } + * } + * }; + * ``` + * + * > [!NOTE] You will need to run `npm run dev` to have SvelteKit automatically generate the required alias configuration in `jsconfig.json` or `tsconfig.json`. + * @default {} + */ + alias?: Record; + /** + * The directory where SvelteKit keeps its stuff, including static assets (such as JS and CSS) and internally-used routes. + * + * If `paths.assets` is specified, there will be two app directories — `${paths.assets}/${appDir}` and `${paths.base}/${appDir}`. + * @default "_app" + */ + appDir?: string; + /** + * [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) configuration. CSP helps to protect your users against cross-site scripting (XSS) attacks, by limiting the places resources can be loaded from. For example, a configuration like this... + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * csp: { + * directives: { + * 'script-src': ['self'] + * }, + * // must be specified with either the `report-uri` or `report-to` directives, or both + * reportOnly: { + * 'script-src': ['self'], + * 'report-uri': ['/'] + * } + * } + * } + * }; + * + * export default config; + * ``` + * + * ...would prevent scripts loading from external sites. SvelteKit will augment the specified directives with nonces or hashes (depending on `mode`) for any inline styles and scripts it generates. + * + * To add a nonce for scripts and links manually included in `src/app.html`, you may use the placeholder `%sveltekit.nonce%` (for example ` + * + * + * + * + * + * ``` + * @default 'split' + * @since 2.13.0 + */ + bundleStrategy?: 'split' | 'single' | 'inline'; + }; + paths?: { + /** + * An absolute path that your app's files are served from. This is useful if your files are served from a storage bucket of some kind. + * @default "" + */ + assets?: '' | `http://${string}` | `https://${string}`; + /** + * A root-relative path that must start, but not end with `/` (e.g. `/base-path`), unless it is the empty string. This specifies where your app is served from and allows the app to live on a non-root path. Note that you need to prepend all your root-relative links with the base value or they will point to the root of your domain, not your `base` (this is how the browser works). You can use [`base` from `$app/paths`](https://svelte.dev/docs/kit/$app-paths#base) for that: `Link`. If you find yourself writing this often, it may make sense to extract this into a reusable component. + * @default "" + */ + base?: '' | `/${string}`; + /** + * Whether to use relative asset paths. + * + * If `true`, `base` and `assets` imported from `$app/paths` will be replaced with relative asset paths during server-side rendering, resulting in more portable HTML. + * If `false`, `%sveltekit.assets%` and references to build artifacts will always be root-relative paths, unless `paths.assets` is an external URL + * + * [Single-page app](https://svelte.dev/docs/kit/single-page-apps) fallback pages will always use absolute paths, regardless of this setting. + * + * If your app uses a `` element, you should set this to `false`, otherwise asset URLs will incorrectly be resolved against the `` URL rather than the current page. + * + * In 1.0, `undefined` was a valid value, which was set by default. In that case, if `paths.assets` was not external, SvelteKit would replace `%sveltekit.assets%` with a relative path and use relative paths to reference build artifacts, but `base` and `assets` imported from `$app/paths` would be as specified in your config. + * + * @default true + * @since 1.9.0 + */ + relative?: boolean; + }; + /** + * See [Prerendering](https://svelte.dev/docs/kit/page-options#prerender). + */ + prerender?: { + /** + * How many pages can be prerendered simultaneously. JS is single-threaded, but in cases where prerendering performance is network-bound (for example loading content from a remote CMS) this can speed things up by processing other tasks while waiting on the network response. + * @default 1 + */ + concurrency?: number; + /** + * Whether SvelteKit should find pages to prerender by following links from `entries`. + * @default true + */ + crawl?: boolean; + /** + * An array of pages to prerender, or start crawling from (if `crawl: true`). The `*` string includes all routes containing no required `[parameters]` with optional parameters included as being empty (since SvelteKit doesn't know what value any parameters should have). + * @default ["*"] + */ + entries?: Array<'*' | `/${string}`>; + /** + * How to respond to HTTP errors encountered while prerendering the app. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `status`, `path`, `referrer`, `referenceType` and `message` properties. If you `throw` from this function, the build will fail + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * prerender: { + * handleHttpError: ({ path, referrer, message }) => { + * // ignore deliberate link to shiny 404 page + * if (path === '/not-found' && referrer === '/blog/how-we-built-our-404-page') { + * return; + * } + * + * // otherwise fail the build + * throw new Error(message); + * } + * } + * } + * }; + * ``` + * + * @default "fail" + * @since 1.15.7 + */ + handleHttpError?: PrerenderHttpErrorHandlerValue; + /** + * How to respond when hash links from one prerendered page to another don't correspond to an `id` on the destination page. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `path`, `id`, `referrers` and `message` properties. If you `throw` from this function, the build will fail + * + * @default "fail" + * @since 1.15.7 + */ + handleMissingId?: PrerenderMissingIdHandlerValue; + /** + * How to respond when an entry generated by the `entries` export doesn't match the route it was generated from. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `generatedFromId`, `entry`, `matchedId` and `message` properties. If you `throw` from this function, the build will fail + * + * @default "fail" + * @since 1.16.0 + */ + handleEntryGeneratorMismatch?: PrerenderEntryGeneratorMismatchHandlerValue; + /** + * How to respond when a route is marked as prerenderable but has not been prerendered. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with a `routes` property which contains all routes that haven't been prerendered. If you `throw` from this function, the build will fail + * + * The default behavior is to fail the build. This may be undesirable when you know that some of your routes may never be reached under certain + * circumstances such as a CMS not returning data for a specific area, resulting in certain routes never being reached. + * + * @default "fail" + * @since 2.16.0 + */ + handleUnseenRoutes?: PrerenderUnseenRoutesHandlerValue; + /** + * The value of `url.origin` during prerendering; useful if it is included in rendered content. + * @default "http://sveltekit-prerender" + */ + origin?: string; + }; + router?: { + /** + * What type of client-side router to use. + * - `'pathname'` is the default and means the current URL pathname determines the route + * - `'hash'` means the route is determined by `location.hash`. In this case, SSR and prerendering are disabled. This is only recommended if `pathname` is not an option, for example because you don't control the webserver where your app is deployed. + * It comes with some caveats: you can't use server-side rendering (or indeed any server logic), and you have to make sure that the links in your app all start with #/, or they won't work. Beyond that, everything works exactly like a normal SvelteKit app. + * + * @default "pathname" + * @since 2.14.0 + */ + type?: 'pathname' | 'hash'; + /** + * How to determine which route to load when navigating to a new page. + * + * By default, SvelteKit will serve a route manifest to the browser. + * When navigating, this manifest is used (along with the `reroute` hook, if it exists) to determine which components to load and which `load` functions to run. + * Because everything happens on the client, this decision can be made immediately. The drawback is that the manifest needs to be + * loaded and parsed before the first navigation can happen, which may have an impact if your app contains many routes. + * + * Alternatively, SvelteKit can determine the route on the server. This means that for every navigation to a path that has not yet been visited, the server will be asked to determine the route. + * This has several advantages: + * - The client does not need to load the routing manifest upfront, which can lead to faster initial page loads + * - The list of routes is hidden from public view + * - The server has an opportunity to intercept each navigation (for example through a middleware), enabling (for example) A/B testing opaque to SvelteKit + + * The drawback is that for unvisited paths, resolution will take slightly longer (though this is mitigated by [preloading](https://svelte.dev/docs/kit/link-options#data-sveltekit-preload-data)). + * + * > [!NOTE] When using server-side route resolution and prerendering, the resolution is prerendered along with the route itself. + * + * @default "client" + * @since 2.17.0 + */ + resolution?: 'client' | 'server'; + }; + serviceWorker?: { + /** + * Determine which files in your `static` directory will be available in `$service-worker.files`. + * @default (filename) => !/\.DS_Store/.test(filename) + */ + files?: (file: string) => boolean; + } & ( + | { + /** + * Whether to automatically register the service worker, if it exists. + * @default true + */ + register: true; + /** + * Options for serviceWorker.register("...", options); + */ + options?: RegistrationOptions; + } + | { + /** + * Whether to automatically register the service worker, if it exists. + * @default true + */ + register?: false; + } + ); + typescript?: { + /** + * A function that allows you to edit the generated `tsconfig.json`. You can mutate the config (recommended) or return a new one. + * This is useful for extending a shared `tsconfig.json` in a monorepo root, for example. + * + * Note that any paths configured here should be relative to the generated config file, which is written to `.svelte-kit/tsconfig.json`. + * + * @default (config) => config + * @since 1.3.0 + */ + config?: (config: Record) => Record | void; + }; + /** + * Client-side navigation can be buggy if you deploy a new version of your app while people are using it. If the code for the new page is already loaded, it may have stale content; if it isn't, the app's route manifest may point to a JavaScript file that no longer exists. + * SvelteKit helps you solve this problem through version management. + * If SvelteKit encounters an error while loading the page and detects that a new version has been deployed (using the `name` specified here, which defaults to a timestamp of the build) it will fall back to traditional full-page navigation. + * Not all navigations will result in an error though, for example if the JavaScript for the next page is already loaded. If you still want to force a full-page navigation in these cases, use techniques such as setting the `pollInterval` and then using `beforeNavigate`: + * ```html + * /// file: +layout.svelte + * + * ``` + * + * If you set `pollInterval` to a non-zero value, SvelteKit will poll for new versions in the background and set the value of [`updated.current`](https://svelte.dev/docs/kit/$app-state#updated) `true` when it detects one. + */ + version?: { + /** + * The current app version string. If specified, this must be deterministic (e.g. a commit ref rather than `Math.random()` or `Date.now().toString()`), otherwise defaults to a timestamp of the build. + * + * For example, to use the current commit hash, you could do use `git rev-parse HEAD`: + * + * ```js + * /// file: svelte.config.js + * import * as child_process from 'node:child_process'; + * + * export default { + * kit: { + * version: { + * name: child_process.execSync('git rev-parse HEAD').toString().trim() + * } + * } + * }; + * ``` + */ + name?: string; + /** + * The interval in milliseconds to poll for version changes. If this is `0`, no polling occurs. + * @default 0 + */ + pollInterval?: number; + }; +} + +/** + * The [`handle`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) hook runs every time the SvelteKit server receives a [request](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Request) and + * determines the [response](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Response). + * It receives an `event` object representing the request and a function called `resolve`, which renders the route and generates a `Response`. + * This allows you to modify response headers or bodies, or bypass SvelteKit entirely (for implementing routes programmatically, for example). + */ +export type Handle = (input: { + event: RequestEvent; + resolve: (event: RequestEvent, opts?: ResolveOptions) => MaybePromise; +}) => MaybePromise; + +/** + * The server-side [`handleError`](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while responding to a request. + * + * If an unexpected error is thrown during loading or rendering, this function will be called with the error and the event. + * Make sure that this function _never_ throws an error. + */ +export type HandleServerError = (input: { + error: unknown; + event: RequestEvent; + status: number; + message: string; +}) => MaybePromise; + +/** + * The [`handleValidationError`](https://svelte.dev/docs/kit/hooks#Server-hooks-handleValidationError) hook runs when the argument to a remote function fails validation. + * + * It will be called with the validation issues and the event, and must return an object shape that matches `App.Error`. + */ +export type HandleValidationError = + (input: { issues: Issue[]; event: RequestEvent }) => MaybePromise; + +/** + * The client-side [`handleError`](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while navigating. + * + * If an unexpected error is thrown during loading or the following render, this function will be called with the error and the event. + * Make sure that this function _never_ throws an error. + */ +export type HandleClientError = (input: { + error: unknown; + event: NavigationEvent; + status: number; + message: string; +}) => MaybePromise; + +/** + * The [`handleFetch`](https://svelte.dev/docs/kit/hooks#Server-hooks-handleFetch) hook allows you to modify (or replace) the result of an [`event.fetch`](https://svelte.dev/docs/kit/load#Making-fetch-requests) call that runs on the server (or during prerendering) inside an endpoint, `load`, `action`, `handle`, `handleError` or `reroute`. + */ +export type HandleFetch = (input: { + event: RequestEvent; + request: Request; + fetch: typeof fetch; +}) => MaybePromise; + +/** + * The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked before the server responds to its first request + * @since 2.10.0 + */ +export type ServerInit = () => MaybePromise; + +/** + * The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked once the app starts in the browser + * @since 2.10.0 + */ +export type ClientInit = () => MaybePromise; + +/** + * The [`reroute`](https://svelte.dev/docs/kit/hooks#Universal-hooks-reroute) hook allows you to modify the URL before it is used to determine which route to render. + * @since 2.3.0 + */ +export type Reroute = (event: { url: URL; fetch: typeof fetch }) => MaybePromise; + +/** + * The [`transport`](https://svelte.dev/docs/kit/hooks#Universal-hooks-transport) hook allows you to transport custom types across the server/client boundary. + * + * Each transporter has a pair of `encode` and `decode` functions. On the server, `encode` determines whether a value is an instance of the custom type and, if so, returns a non-falsy encoding of the value which can be an object or an array (or `false` otherwise). + * + * In the browser, `decode` turns the encoding back into an instance of the custom type. + * + * ```ts + * import type { Transport } from '@sveltejs/kit'; + * + * declare class MyCustomType { + * data: any + * } + * + * // hooks.js + * export const transport: Transport = { + * MyCustomType: { + * encode: (value) => value instanceof MyCustomType && [value.data], + * decode: ([data]) => new MyCustomType(data) + * } + * }; + * ``` + * @since 2.11.0 + */ +export type Transport = Record; + +/** + * A member of the [`transport`](https://svelte.dev/docs/kit/hooks#Universal-hooks-transport) hook. + */ +export interface Transporter< + T = any, + U = Exclude +> { + encode: (value: T) => false | U; + decode: (data: U) => T; +} + +/** + * The generic form of `PageLoad` and `LayoutLoad`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `Load` directly. + */ +export type Load< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + InputData extends Record | null = Record | null, + ParentData extends Record = Record, + OutputData extends Record | void = Record | void, + RouteId extends AppRouteId | null = AppRouteId | null +> = (event: LoadEvent) => MaybePromise; + +/** + * The generic form of `PageLoadEvent` and `LayoutLoadEvent`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `LoadEvent` directly. + */ +export interface LoadEvent< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + Data extends Record | null = Record | null, + ParentData extends Record = Record, + RouteId extends AppRouteId | null = AppRouteId | null +> extends NavigationEvent { + /** + * `fetch` is equivalent to the [native `fetch` web API](https://developer.mozilla.org/en-US/docs/Web/API/fetch), with a few additional features: + * + * - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request. + * - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context). + * - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call. + * - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) + * - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request. + * + * You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies) + */ + fetch: typeof fetch; + /** + * Contains the data returned by the route's server `load` function (in `+layout.server.js` or `+page.server.js`), if any. + */ + data: Data; + /** + * If you need to set headers for the response, you can do so using the this method. This is useful if you want the page to be cached, for example: + * + * ```js + * /// file: src/routes/blog/+page.js + * export async function load({ fetch, setHeaders }) { + * const url = `https://cms.example.com/articles.json`; + * const response = await fetch(url); + * + * setHeaders({ + * age: response.headers.get('age'), + * 'cache-control': response.headers.get('cache-control') + * }); + * + * return response.json(); + * } + * ``` + * + * Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once. + * + * You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API in a server-only `load` function instead. + * + * `setHeaders` has no effect when a `load` function runs in the browser. + */ + setHeaders: (headers: Record) => void; + /** + * `await parent()` returns data from parent `+layout.js` `load` functions. + * Implicitly, a missing `+layout.js` is treated as a `({ data }) => data` function, meaning that it will return and forward data from parent `+layout.server.js` files. + * + * Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data. + */ + parent: () => Promise; + /** + * This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun. + * + * Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`. + * + * URLs can be absolute or relative to the page being loaded, and must be [encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). + * + * Custom identifiers have to be prefixed with one or more lowercase letters followed by a colon to conform to the [URI specification](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * The following example shows how to use `depends` to register a dependency on a custom identifier, which is `invalidate`d after a button click, making the `load` function rerun. + * + * ```js + * /// file: src/routes/+page.js + * let count = 0; + * export async function load({ depends }) { + * depends('increase:count'); + * + * return { count: count++ }; + * } + * ``` + * + * ```html + * /// file: src/routes/+page.svelte + * + * + *

{data.count}

+ * + * ``` + */ + depends: (...deps: Array<`${string}:${string}`>) => void; + /** + * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example: + * + * ```js + * /// file: src/routes/+page.server.js + * export async function load({ untrack, url }) { + * // Untrack url.pathname so that path changes don't trigger a rerun + * if (untrack(() => url.pathname === '/')) { + * return { message: 'Welcome!' }; + * } + * } + * ``` + */ + untrack: (fn: () => T) => T; + + /** + * Access to spans for tracing. If tracing is not enabled or the function is being run in the browser, these spans will do nothing. + * @since 2.31.0 + */ + tracing: { + /** Whether tracing is enabled. */ + enabled: boolean; + /** The root span for the request. This span is named `sveltekit.handle.root`. */ + root: Span; + /** The span associated with the current `load` function. */ + current: Span; + }; +} + +export interface NavigationEvent< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + RouteId extends AppRouteId | null = AppRouteId | null +> { + /** + * The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object + */ + params: Params; + /** + * Info about the current route + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * The URL of the current page + */ + url: URL; +} + +/** + * Information about the target of a specific navigation. + */ +export interface NavigationTarget< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + RouteId extends AppRouteId | null = AppRouteId | null +> { + /** + * Parameters of the target page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + * Is `null` if the target is not part of the SvelteKit app (could not be resolved to a route). + */ + params: Params | null; + /** + * Info about the target route + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId | null; + }; + /** + * The URL that is navigated to + */ + url: URL; + /** + * The scroll position associated with this navigation. + * + * For the `from` target, this is the scroll position at the moment of navigation. + * + * For the `to` target, this represents the scroll position that will be or was restored: + * - In `beforeNavigate` and `onNavigate`, this is only available for `popstate` navigations (back/forward button) + * and will be `null` for other navigation types, since the final scroll position isn't known + * ahead of time. + * - In `afterNavigate`, this is always the scroll position that was applied after the navigation + * completed. + */ + scroll: { x: number; y: number } | null; +} + +/** + * - `enter`: The app has hydrated/started + * - `form`: The user submitted a `

` + * - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ +export type NavigationType = 'enter' | 'form' | 'leave' | 'link' | 'goto' | 'popstate'; + +export interface NavigationBase { + /** + * Where navigation was triggered from + */ + from: NavigationTarget | null; + /** + * Where navigation is going to/has gone to + */ + to: NavigationTarget | null; + /** + * Whether or not the navigation will result in the page being unloaded (i.e. not a client-side navigation). + */ + willUnload: boolean; + /** + * A promise that resolves once the navigation is complete, and rejects if the navigation + * fails or is aborted. In the case of a `willUnload` navigation, the promise will never resolve + */ + complete: Promise; +} + +export interface NavigationEnter extends NavigationBase { + /** + * The type of navigation: + * - `enter`: The app has hydrated/started + */ + type: 'enter'; + + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: undefined; + + /** + * Dispatched `Event` object when navigation occurred by `popstate` or `link`. + */ + event?: undefined; +} + +export type NavigationExternal = NavigationGoto | NavigationLeave; + +export interface NavigationGoto extends NavigationBase { + /** + * The type of navigation: + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + */ + type: 'goto'; + + // TODO 3.0 remove this property, so that it only exists when type is 'popstate' + // (would possibly be a breaking change to do it prior to that) + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: undefined; +} + +export interface NavigationLeave extends NavigationBase { + /** + * The type of navigation: + * - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring + */ + type: 'leave'; + + // TODO 3.0 remove this property, so that it only exists when type is 'popstate' + // (would possibly be a breaking change to do it prior to that) + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: undefined; +} + +export interface NavigationFormSubmit extends NavigationBase { + /** + * The type of navigation: + * - `form`: The user submitted a `` + */ + type: 'form'; + + /** + * The `SubmitEvent` that caused the navigation + */ + event: SubmitEvent; + + // TODO 3.0 remove this property, so that it only exists when type is 'popstate' + // (would possibly be a breaking change to do it prior to that) + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: undefined; +} + +export interface NavigationPopState extends NavigationBase { + /** + * The type of navigation: + * - `popstate`: Navigation was triggered by back/forward navigation + */ + type: 'popstate'; + + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta: number; + + /** + * The `PopStateEvent` that caused the navigation + */ + event: PopStateEvent; +} + +export interface NavigationLink extends NavigationBase { + /** + * The type of navigation: + * - `link`: Navigation was triggered by a link click + */ + type: 'link'; + + /** + * The `PointerEvent` that caused the navigation + */ + event: PointerEvent; + + // TODO 3.0 remove this property, so that it only exists when type is 'popstate' + // (would possibly be a breaking change to do it prior to that) + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: undefined; +} + +export type Navigation = + | NavigationExternal + | NavigationFormSubmit + | NavigationPopState + | NavigationLink; + +/** + * The argument passed to [`beforeNavigate`](https://svelte.dev/docs/kit/$app-navigation#beforeNavigate) callbacks. + */ +export type BeforeNavigate = Navigation & { + /** + * Call this to prevent the navigation from starting. + */ + cancel: () => void; +}; + +/** + * The argument passed to [`onNavigate`](https://svelte.dev/docs/kit/$app-navigation#onNavigate) callbacks. + */ +export type OnNavigate = Navigation & { + type: Exclude; + /** + * Since `onNavigate` callbacks are called immediately before a client-side navigation, they will never be called with a navigation that unloads the page. + */ + willUnload: false; +}; + +/** + * The argument passed to [`afterNavigate`](https://svelte.dev/docs/kit/$app-navigation#afterNavigate) callbacks. + */ +export type AfterNavigate = (Navigation | NavigationEnter) & { + type: Exclude; + /** + * Since `afterNavigate` callbacks are called after a navigation completes, they will never be called with a navigation that unloads the page. + */ + willUnload: false; +}; + +/** + * The shape of the [`page`](https://svelte.dev/docs/kit/$app-state#page) reactive object and the [`$page`](https://svelte.dev/docs/kit/$app-stores) store. + */ +export interface Page< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + RouteId extends AppRouteId | null = AppRouteId | null +> { + /** + * The URL of the current page. + */ + url: URL & { pathname: ResolvedPathname }; + /** + * The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + */ + params: Params; + /** + * Info about the current route. + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * HTTP status code of the current page. + */ + status: number; + /** + * The error object of the current page, if any. Filled from the `handleError` hooks. + */ + error: App.Error | null; + /** + * The merged result of all data from all `load` functions on the current page. You can type a common denominator through `App.PageData`. + */ + data: App.PageData & Record; + /** + * The page state, which can be manipulated using the [`pushState`](https://svelte.dev/docs/kit/$app-navigation#pushState) and [`replaceState`](https://svelte.dev/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`. + */ + state: App.PageState; + /** + * Filled only after a form submission. See [form actions](https://svelte.dev/docs/kit/form-actions) for more info. + */ + form: any; +} + +/** + * The shape of a param matcher. See [matching](https://svelte.dev/docs/kit/advanced-routing#Matching) for more info. + */ +export type ParamMatcher = (param: string) => boolean; + +/** + * A single entry yielded by [`requested`](https://svelte.dev/docs/kit/$app-server#requested) + * when called with a regular `query`. `arg` is the validated argument (the input *after* + * the query's schema validated and transformed it, if applicable); `query` is a + * `RemoteQuery` bound to the client's original cache key, so `refresh()` / `set()` will + * update the correct client entry. + */ +export type RequestedEntry = { + arg: Validated; + query: RemoteQuery; +}; + +/** + * A single entry yielded by [`requested`](https://svelte.dev/docs/kit/$app-server#requested) + * when called with a `query.live`. `arg` is the validated argument; `query` is a + * `RemoteLiveQuery` bound to the client's original cache key, so `reconnect()` targets + * the correct client subscription. + */ +export type LiveRequestedEntry = { + arg: Validated; + query: RemoteLiveQuery; +}; + +export type QueryRequestedResult = Iterable> & + AsyncIterable> & { + /** + * Call `refresh` on all queries selected by this `requested` invocation. + * This is identical to: + * ```ts + * import { requested } from '$app/server'; + * + * for await (const { query } of requested(getPost, ...)) { + * void query.refresh(); + * } + * ``` + */ + refreshAll: () => Promise; + }; + +export type LiveQueryRequestedResult = Iterable< + LiveRequestedEntry +> & + AsyncIterable> & { + /** + * Call `reconnect` on all live queries selected by this `requested` invocation. + * This is identical to: + * ```ts + * import { requested } from '$app/server'; + * + * for await (const { query } of requested(liveQuery, ...)) { + * void query.reconnect(); + * } + * ``` + */ + reconnectAll: () => Promise; + }; + +export type RequestedResult = + | QueryRequestedResult + | LiveQueryRequestedResult; + +export interface RequestEvent< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + RouteId extends AppRouteId | null = AppRouteId | null +> { + /** + * Get or set cookies related to the current request + */ + cookies: Cookies; + /** + * `fetch` is equivalent to the [native `fetch` web API](https://developer.mozilla.org/en-US/docs/Web/API/fetch), with a few additional features: + * + * - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request. + * - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context). + * - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call. + * - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) + * - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request. + * + * You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies). + */ + fetch: typeof fetch; + /** + * The client's IP address, set by the adapter. + */ + getClientAddress: () => string; + /** + * Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle). + */ + locals: App.Locals; + /** + * The parameters of the current route - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + */ + params: Params; + /** + * Additional data made available through the adapter. + */ + platform: Readonly | undefined; + /** + * The original request object. + */ + request: Request; + /** + * Info about the current route. + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * If you need to set headers for the response, you can do so using the this method. This is useful if you want the page to be cached, for example: + * + * ```js + * /// file: src/routes/blog/+page.js + * export async function load({ fetch, setHeaders }) { + * const url = `https://cms.example.com/articles.json`; + * const response = await fetch(url); + * + * setHeaders({ + * age: response.headers.get('age'), + * 'cache-control': response.headers.get('cache-control') + * }); + * + * return response.json(); + * } + * ``` + * + * Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once. + * + * You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API instead. + */ + setHeaders: (headers: Record) => void; + /** + * The requested URL. + */ + url: URL; + /** + * `true` if the request comes from the client asking for `+page/layout.server.js` data. The `url` property will be stripped of the internal information + * related to the data request in this case. Use this property instead if the distinction is important to you. + */ + isDataRequest: boolean; + /** + * `true` for `+server.js` calls coming from SvelteKit without the overhead of actually making an HTTP request. This happens when you make same-origin `fetch` requests on the server. + */ + isSubRequest: boolean; + + /** + * Access to spans for tracing. If tracing is not enabled, these spans will do nothing. + * @since 2.31.0 + */ + tracing: { + /** Whether tracing is enabled. */ + enabled: boolean; + /** The root span for the request. This span is named `sveltekit.handle.root`. */ + root: Span; + /** The span associated with the current `handle` hook, `load` function, or form action. */ + current: Span; + }; + + /** + * `true` if the request comes from the client via a remote function. The `url` property will be stripped of the internal information + * related to the data request in this case. Use this property instead if the distinction is important to you. + */ + isRemoteRequest: boolean; +} + +/** + * A `(event: RequestEvent) => Response` function exported from a `+server.js` file that corresponds to an HTTP verb (`GET`, `PUT`, `PATCH`, etc) and handles requests with that method. + * + * It receives `Params` as the first generic argument, which you can skip by using [generated types](https://svelte.dev/docs/kit/types#Generated-types) instead. + */ +export type RequestHandler< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + RouteId extends AppRouteId | null = AppRouteId | null +> = (event: RequestEvent) => MaybePromise; + +export interface ResolveOptions { + /** + * Applies custom transforms to HTML. If `done` is true, it's the final chunk. Chunks are not guaranteed to be well-formed HTML + * (they could include an element's opening tag but not its closing tag, for example) + * but they will always be split at sensible boundaries such as `%sveltekit.head%` or layout/page components. + * @param input the html chunk and the info if this is the last chunk + */ + transformPageChunk?: (input: { html: string; done: boolean }) => MaybePromise; + /** + * Determines which headers should be included in serialized responses when a `load` function loads a resource with `fetch`. + * By default, none will be included. + * @param name header name + * @param value header value + */ + filterSerializedResponseHeaders?: (name: string, value: string) => boolean; + /** + * Determines what should be added to the `` tag to preload it. + * By default, `js` and `css` files will be preloaded. + * @param input the type of the file and its path + */ + preload?: (input: { type: 'font' | 'css' | 'js' | 'asset'; path: string }) => boolean; +} + +export interface RouteDefinition { + id: string; + api: { + methods: Array; + }; + page: { + methods: Array>; + }; + pattern: RegExp; + prerender: PrerenderOption; + segments: RouteSegment[]; + methods: Array; + config: Config; +} + +export class Server { + constructor(manifest: SSRManifest); + init(options: ServerInitOptions): Promise; + respond(request: Request, options: RequestOptions): Promise; +} + +export interface ServerInitOptions { + /** A map of environment variables. */ + env: Record; + /** A function that turns an asset filename into a `ReadableStream`. Required for the `read` export from `$app/server` to work. */ + read?: (file: string) => MaybePromise; +} + +export interface SSRManifest { + appDir: string; + appPath: string; + /** Static files from `kit.config.files.assets` and the service worker (if any). */ + assets: Set; + mimeTypes: Record; + + /** private fields */ + _: { + client: NonNullable; + nodes: SSRNodeLoader[]; + /** hashed filename -> import to that file */ + remotes: Record Promise>; + routes: SSRRoute[]; + prerendered_routes: Set; + matchers: () => Promise>; + /** A `[file]: size` map of all assets imported by server code. */ + server_assets: Record; + }; +} + +/** + * The generic form of `PageServerLoad` and `LayoutServerLoad`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `ServerLoad` directly. + */ +export type ServerLoad< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + ParentData extends Record = Record, + OutputData extends Record | void = Record | void, + RouteId extends AppRouteId | null = AppRouteId | null +> = (event: ServerLoadEvent) => MaybePromise; + +export interface ServerLoadEvent< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + ParentData extends Record = Record, + RouteId extends AppRouteId | null = AppRouteId | null +> extends RequestEvent { + /** + * `await parent()` returns data from parent `+layout.server.js` `load` functions. + * + * Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data. + */ + parent: () => Promise; + /** + * This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun. + * + * Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`. + * + * URLs can be absolute or relative to the page being loaded, and must be [encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). + * + * Custom identifiers have to be prefixed with one or more lowercase letters followed by a colon to conform to the [URI specification](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * The following example shows how to use `depends` to register a dependency on a custom identifier, which is `invalidate`d after a button click, making the `load` function rerun. + * + * ```js + * /// file: src/routes/+page.js + * let count = 0; + * export async function load({ depends }) { + * depends('increase:count'); + * + * return { count: count++ }; + * } + * ``` + * + * ```html + * /// file: src/routes/+page.svelte + * + * + *

{data.count}

+ * + * ``` + */ + depends: (...deps: string[]) => void; + /** + * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example: + * + * ```js + * /// file: src/routes/+page.js + * export async function load({ untrack, url }) { + * // Untrack url.pathname so that path changes don't trigger a rerun + * if (untrack(() => url.pathname === '/')) { + * return { message: 'Welcome!' }; + * } + * } + * ``` + */ + untrack: (fn: () => T) => T; + + /** + * Access to spans for tracing. If tracing is not enabled, these spans will do nothing. + * @since 2.31.0 + */ + tracing: { + /** Whether tracing is enabled. */ + enabled: boolean; + /** The root span for the request. This span is named `sveltekit.handle.root`. */ + root: Span; + /** The span associated with the current server `load` function. */ + current: Span; + }; +} + +/** + * Shape of a form action method that is part of `export const actions = {...}` in `+page.server.js`. + * See [form actions](https://svelte.dev/docs/kit/form-actions) for more information. + */ +export type Action< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + OutputData extends Record | void = Record | void, + RouteId extends AppRouteId | null = AppRouteId | null +> = (event: RequestEvent) => MaybePromise; + +/** + * Shape of the `export const actions = {...}` object in `+page.server.js`. + * See [form actions](https://svelte.dev/docs/kit/form-actions) for more information. + */ +export type Actions< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + OutputData extends Record | void = Record | void, + RouteId extends AppRouteId | null = AppRouteId | null +> = Record>; + +/** + * When calling a form action via fetch, the response will be one of these shapes. + * ```svelte + * { + * return ({ result }) => { + * // result is of type ActionResult + * }; + * }} + * ``` + */ +export type ActionResult< + Success extends Record | undefined = Record, + Failure extends Record | undefined = Record +> = + | { type: 'success'; status: number; data?: Success } + | { type: 'failure'; status: number; data?: Failure } + | { type: 'redirect'; status: number; location: string } + | { type: 'error'; status?: number; error: any }; + +/** + * The object returned by the [`error`](https://svelte.dev/docs/kit/@sveltejs-kit#error) function. + */ +export interface HttpError { + /** The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses), in the range 400-599. */ + status: number; + /** The content of the error. */ + body: App.Error; +} + +/** + * The object returned by the [`redirect`](https://svelte.dev/docs/kit/@sveltejs-kit#redirect) function. + */ +export interface Redirect { + /** The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages), in the range 300-308. */ + status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308; + /** The location to redirect to. */ + location: string; +} + +export type SubmitFunction< + Success extends Record | undefined = Record, + Failure extends Record | undefined = Record +> = (input: { + action: URL; + formData: FormData; + formElement: HTMLFormElement; + controller: AbortController; + submitter: HTMLElement | null; + cancel: () => void; +}) => MaybePromise< + | void + | ((opts: { + formData: FormData; + formElement: HTMLFormElement; + action: URL; + result: ActionResult; + /** + * Call this to get the default behavior of a form submission response. + * @param options Set `reset: false` if you don't want the `` values to be reset after a successful submission. + * @param invalidateAll Set `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission. + */ + update: (options?: { reset?: boolean; invalidateAll?: boolean }) => Promise; + }) => MaybePromise) +>; + +/** + * The type of `export const snapshot` exported from a page or layout component. + */ +export interface Snapshot { + capture: () => T; + restore: (snapshot: T) => void; +} + +// If T is unknown or has an index signature, the types below will recurse indefinitely and create giant unions that TS can't handle +type WillRecurseIndefinitely = unknown extends T ? true : string extends keyof T ? true : false; + +// Input type mappings for form fields +type InputTypeMap = { + text: string; + email: string; + password: string; + url: string; + tel: string; + search: string; + number: number; + range: number; + date: string; + 'datetime-local': string; + time: string; + month: string; + week: string; + color: string; + checkbox: boolean | string[]; + radio: string; + file: File; + hidden: string | number | boolean; + submit: string | number | boolean; + button: string; + reset: string; + image: string; + select: string; + 'select multiple': string[]; + 'file multiple': File[]; +}; + +// Valid input types for a given value type +export type RemoteFormFieldType = { + [K in keyof InputTypeMap]: T extends InputTypeMap[K] ? K : never; +}[keyof InputTypeMap]; + +// Input element properties based on type +type InputElementProps = T extends 'checkbox' | 'radio' + ? { + name: string; + type: T; + value?: string; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get checked(): boolean; + set checked(value: boolean); + readonly defaultChecked?: boolean; + } + : T extends 'file' + ? { + name: string; + type: 'file'; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get files(): FileList | null; + set files(v: FileList | null); + } + : T extends 'select' + ? { + name: string; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get value(): string; + set value(v: string); + } + : T extends 'select multiple' + ? { + name: string; + multiple: true; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get value(): string[]; + set value(v: string[]); + } + : T extends 'text' + ? { + name: string; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get value(): string | number; + set value(v: string | number); + readonly defaultValue?: string | number; + } + : { + name: string; + type: T; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get value(): string | number; + set value(v: string | number); + readonly defaultValue?: string | number; + }; + +type RemoteFormFieldMethods = { + /** The values that will be submitted */ + value(): DeepPartial; + /** Set the values that will be submitted */ + set(input: DeepPartial): DeepPartial; + /** Validation issues, if any */ + issues(): RemoteFormIssue[] | undefined; +}; + +// These two types use "T extends unknown ? .. : .." to distribute over unions. +// Example: if "type T = A | b" then "keyof T" only contains keys that both A and B have, with "KeysOfUnion" we get the keys of both A and B +type KeysOfUnion = T extends unknown ? keyof T : never; +type ValueOfUnionKey = T extends unknown + ? K extends keyof T + ? T[K] + : never + : never; + +export type RemoteFormFieldValue = string | string[] | number | boolean | File | File[]; + +type AsArgs = Type extends 'checkbox' + ? Value extends string[] + ? [type: Type, value: Value[number] | (string & {})] + : Value extends boolean + ? [type: Type] | [type: Type, value: boolean] + : [type: Type] | [type: Type, value: Value | (string & {})] + : Type extends 'submit' | 'hidden' + ? Value extends string + ? [type: Type, value: Value | (string & {})] + : [type: Type, value: Value] + : Type extends 'radio' + ? [type: Type, value: Value | (string & {})] + : Type extends 'file' | 'file multiple' + ? [type: Type] + : [type: Type] | [type: Type, value: Value | (string & {})]; + +/** + * Form field accessor type that provides name(), value(), and issues() methods + */ +export type RemoteFormField = RemoteFormFieldMethods & { + /** + * Returns an object that can be spread onto an input element with the correct type attribute, + * aria-invalid attribute if the field is invalid, and appropriate value/checked property getters/setters. + * @example + * ```svelte + * + * + * + * ``` + */ + as>(...args: AsArgs): InputElementProps; +}; + +type RemoteFormFieldContainer = RemoteFormFieldMethods & { + /** Validation issues belonging to this or any of the fields that belong to it, if any */ + allIssues(): RemoteFormIssue[] | undefined; +}; + +type UnknownField = RemoteFormFieldMethods & { + /** Validation issues belonging to this or any of the fields that belong to it, if any */ + allIssues(): RemoteFormIssue[] | undefined; + /** + * Returns an object that can be spread onto an input element with the correct type attribute, + * aria-invalid attribute if the field is invalid, and appropriate value/checked property getters/setters. + * @example + * ```svelte + * + * + * + * ``` + */ + as>(...args: AsArgs): InputElementProps; +} & { + [key: string | number]: UnknownField; +}; + +type RemoteFormFieldsRoot = + IsAny extends true + ? RecursiveFormFields + : Input extends void + ? { + /** Validation issues, if any */ + issues(): RemoteFormIssue[] | undefined; + /** Validation issues belonging to this or any of the fields that belong to it, if any */ + allIssues(): RemoteFormIssue[] | undefined; + } + : RemoteFormFields; + +/** + * Recursive type to build form fields structure with proxy access + */ +export type RemoteFormFields = + WillRecurseIndefinitely extends true + ? RecursiveFormFields + : NonNullable extends string | number | boolean | File + ? RemoteFormField> + : // [NonNullable] is used to prevent distributing over union while still allowing + // nullable wrappers (e.g. `string[] | undefined` from a schema with `.default([])`) + // to be treated as arrays; only the last condition should distribute over unions + [NonNullable] extends [string[] | File[]] + ? RemoteFormField> & { + [K in number]: RemoteFormField[number]>; + } + : [NonNullable] extends [Array] + ? RemoteFormFieldContainer> & { + [K in number]: RemoteFormFields; + } + : RemoteFormFieldContainer & { + [K in KeysOfUnion]-?: RemoteFormFields>; + }; + +// By breaking this out into its own type, we avoid the TS recursion depth limit +type RecursiveFormFields = RemoteFormFieldContainer & { + [key: string | number]: UnknownField; +}; + +type MaybeArray = T | T[]; + +export interface RemoteFormInput { + [key: string]: MaybeArray; +} + +export interface RemoteFormIssue { + message: string; + path: Array; +} + +// If the schema specifies `id` as a string or number, ensure that `for(...)` +// only accepts that type. Otherwise, accept `string | number` +type ExtractId = Input extends { id: infer Id } + ? Id extends string | number + ? Id + : string | number + : string | number; + +/** + * A function and proxy object used to imperatively create validation errors in form handlers. + * + * Access properties to create field-specific issues: `issue.fieldName('message')`. + * The type structure mirrors the input data structure for type-safe field access. + * Call `invalid(issue.foo(...), issue.nested.bar(...))` to throw a validation error. + */ +export type InvalidField = + WillRecurseIndefinitely extends true + ? Record + : NonNullable extends string | number | boolean | File + ? (message: string) => StandardSchemaV1.Issue + : NonNullable extends Array + ? { + [K in number]: InvalidField; + } & ((message: string) => StandardSchemaV1.Issue) + : NonNullable extends RemoteFormInput + ? { + [K in keyof T]-?: InvalidField; + } & ((message: string) => StandardSchemaV1.Issue) + : Record; + +/** + * A validation error thrown by `invalid`. + */ +export interface ValidationError { + /** The validation issues */ + issues: StandardSchemaV1.Issue[]; +} + +/** + * The type of a remote `form` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#form) for full documentation. + */ +export type RemoteForm = { + /** Attachment that sets up an event handler that intercepts the form submission on the client to prevent a full page reload */ + [attachment: symbol]: (node: HTMLFormElement) => void; + method: 'POST'; + /** The URL to send the form to. */ + action: string; + /** Use the `enhance` method to influence what happens when the form is submitted. */ + enhance( + callback: (opts: { + form: HTMLFormElement; + data: Input; + submit: () => Promise & { + updates: (...updates: RemoteQueryUpdate[]) => Promise; + }; + }) => MaybePromise + ): { + method: 'POST'; + action: string; + [attachment: symbol]: (node: HTMLFormElement) => void; + }; + /** + * Create an instance of the form for the given `id`. + * The `id` is stringified and used for deduplication to potentially reuse existing instances. + * Useful when you have multiple forms that use the same remote form action, for example in a loop. + * ```svelte + * {#each todos as todo} + * {@const todoForm = updateTodo.for(todo.id)} + * + * {#if todoForm.result?.invalid}

Invalid data

{/if} + * ... + * + * {/each} + * ``` + */ + for(id: ExtractId): Omit, 'for'>; + /** Preflight checks */ + preflight(schema: StandardSchemaV1): RemoteForm; + /** Validate the form contents programmatically */ + validate(options?: { + /** Set this to `true` to also show validation issues of fields that haven't been touched yet. */ + includeUntouched?: boolean; + /** Set this to `true` to only run the `preflight` validation. */ + preflightOnly?: boolean; + }): Promise; + /** The result of the form submission */ + get result(): Output | undefined; + /** The number of pending submissions */ + get pending(): number; + /** Access form fields using object notation */ + fields: RemoteFormFieldsRoot; +}; + +/** + * The type of a remote `command` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#command) for full documentation. + */ +export type RemoteCommand = { + (arg: undefined extends Input ? Input | void : Input): Promise & { + updates(...updates: RemoteQueryUpdate[]): Promise; + }; + /** The number of pending command executions */ + get pending(): number; +}; + +export type RemoteQueryUpdate = + | RemoteQuery + | RemoteLiveQuery + | RemoteQueryFunction + | RemoteLiveQueryFunction + | RemoteQueryOverride; + +export type RemoteResource = Promise & { + /** The error in case the query fails. Most often this is a [`HttpError`](https://svelte.dev/docs/kit/@sveltejs-kit#HttpError) but it isn't guaranteed to be. */ + get error(): any; + /** `true` before the first result is available and during refreshes */ + get loading(): boolean; +} & ( + | { + /** The current value of the query. Undefined until `ready` is `true` */ + get current(): undefined; + ready: false; + } + | { + /** The current value of the query. Undefined until `ready` is `true` */ + get current(): T; + ready: true; + } + ); + +export type RemoteQuery = RemoteResource & { + /** + * Returns a plain promise with the result. + * Unlike awaiting the resource directly, this can only be used _outside_ render + * (i.e. in load functions, event handlers and so on) + */ + run(): Promise; + /** + * On the client, this function will update the value of the query without re-fetching it. + * + * On the server, this can be called in the context of a `command` or `form` and the specified data will accompany the action response back to the client. + * This prevents SvelteKit needing to refresh all queries on the page in a second server round-trip. + */ + set(value: T): void; + /** + * On the client, this function will re-fetch the query from the server. + * + * On the server, this can be called in the context of a `command` or `form` and the refreshed data will accompany the action response back to the client. + * This prevents SvelteKit needing to refresh all queries on the page in a second server round-trip. + */ + refresh(): Promise; + /** + * Temporarily override a query's value during a [single-flight mutation](https://svelte.dev/docs/kit/remote-functions#Single-flight-mutations) to provide optimistic updates. + * + * ```svelte + * + * + *
{ + * await submit().updates( + * todos.withOverride((todos) => [...todos, { text: data.get('text') }]) + * ); + * })}> + * + * + *
+ * ``` + */ + withOverride(update: (current: T) => T): RemoteQueryOverride; +}; + +export type RemoteLiveQuery = RemoteResource & { + /** + * Returns an async iterator with live updates. + * Unlike awaiting the resource directly, this can only be used _outside_ render + * (i.e. in load functions, event handlers and so on) + */ + run(): AsyncGenerator; + /** `true` if the live stream is currently connected. */ + readonly connected: boolean; + /** `true` once the current live stream iterator is done. */ + readonly done: boolean; + /** Reconnects the live stream immediately. */ + reconnect(): Promise; +}; + +export type RemoteQueryOverride = () => void; + +/** + * The type of a remote `prerender` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#prerender) for full documentation. + */ +export type RemotePrerenderFunction = ( + arg: undefined extends Input ? Input | void : Input +) => RemoteResource; + +/** + * The return value of a remote `query` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query) for full documentation. + * + * The optional `Validated` generic parameter represents the argument type *after* the + * query's schema has validated and (optionally) transformed it — this is the type the + * query's implementation function receives on the server, and the type yielded by + * [`requested`](https://svelte.dev/docs/kit/$app-server#requested). For queries declared + * with [Standard Schema](https://standardschema.dev/) it differs from `Input` when the + * schema contains a transform (e.g. `v.pipe(v.number(), v.transform(String))` has + * `Input = number` but `Validated = string`). For `'unchecked'` validators and queries + * without arguments it defaults to `Input`. + */ +export type RemoteQueryFunction = ( + arg: undefined extends Input ? Input | void : Input +) => RemoteQuery; + +/** + * The type of a remote `query.live` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query.live) for full documentation. + * + * The optional `Validated` generic parameter represents the argument type *after* the + * query's schema has validated and (optionally) transformed it, and matches the type + * yielded by [`requested`](https://svelte.dev/docs/kit/$app-server#requested). + */ +export type RemoteLiveQueryFunction = ( + arg: undefined extends Input ? Input | void : Input +) => RemoteLiveQuery; + +export * from './index.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/build_server.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/build_server.js new file mode 100644 index 0000000000000000000000000000000000000000..a960a20b828d8a96a59b44e3386d450380106a3b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/build_server.js @@ -0,0 +1,260 @@ +import fs from 'node:fs'; +import { mkdirp } from '../../../utils/filesystem.js'; +import { + create_function_as_string, + filter_fonts, + find_deps, + generate_placeholder, + resolve_symlinks +} from './utils.js'; +import { s } from '../../../utils/misc.js'; +import { normalizePath } from 'vite'; +import { basename } from 'node:path'; +import { fix_css_urls } from '../../../utils/css.js'; +import { escape_for_interpolation } from '../../../utils/escape.js'; + +/** + * @param {string} out + * @param {import('types').ValidatedKitConfig} kit + * @param {import('types').ManifestData} manifest_data + * @param {import('vite').Manifest} server_manifest + * @param {import('vite').Manifest | null} client_manifest + * @param {string | null} assets_path + * @param {import('vite').Rollup.RollupOutput['output'] | null} client_chunks + * @param {import('types').RecursiveRequired} output_config + */ +export function build_server_nodes( + out, + kit, + manifest_data, + server_manifest, + client_manifest, + assets_path, + client_chunks, + output_config +) { + mkdirp(`${out}/server/nodes`); + mkdirp(`${out}/server/stylesheets`); + + /** + * Stylesheet names and their contents which are below the inline threshold + * @type {Map} + */ + const stylesheets_to_inline = new Map(); + + /** + * For CSS inlining, we either store a string or a function that returns the + * styles with the correct relative URLs + * @type {(css: string, eager_assets: Set) => string} + */ + let prepare_css_for_inlining = (css) => s(css); + + if (client_chunks && kit.inlineStyleThreshold > 0 && output_config.bundleStrategy === 'split') { + for (const chunk of client_chunks) { + if (chunk.type !== 'asset' || !chunk.fileName.endsWith('.css')) { + continue; + } + + const source = chunk.source.toString(); + if (source.length < kit.inlineStyleThreshold) { + stylesheets_to_inline.set(chunk.fileName, source); + } + } + + // If the client CSS has URL references to assets, we need to adjust the + // relative path so that they are correct when inlined into the document. + // Although `paths.assets` is static, we need to pass in a fake path + // `/_svelte_kit_assets` at runtime when running `vite preview` + if (kit.paths.assets || kit.paths.relative) { + const static_assets = new Set( + manifest_data.assets.map((asset) => decodeURIComponent(asset.file)) + ); + + const segments = /** @type {string} */ (assets_path).split('/'); + const static_asset_prefix = segments.map(() => '..').join('/') + '/'; + + prepare_css_for_inlining = (css, eager_assets) => { + const assets_placeholder = generate_placeholder(css, 'ASSETS'); + const base_placeholder = generate_placeholder(css, 'BASE'); + + const transformed_css = fix_css_urls({ + css, + vite_assets: eager_assets, + static_assets, + paths_assets: assets_placeholder, + base: base_placeholder, + static_asset_prefix + }); + + // only convert to a function if we have adjusted any URLs + if (css !== transformed_css) { + const escaped = escape_for_interpolation(transformed_css, [ + { + placeholder: assets_placeholder, + replacement: '${assets}' + }, + { + placeholder: base_placeholder, + replacement: '${base}' + } + ]); + return create_function_as_string('css', ['assets', 'base'], escaped); + } + + return s(css); + }; + } + } + + for (let i = 0; i < manifest_data.nodes.length; i++) { + const node = manifest_data.nodes[i]; + + /** @type {string[]} */ + const imports = []; + + // String representation of + /** @type {import('types').SSRNode} */ + /** @type {string[]} */ + const exports = [`export const index = ${i};`]; + + /** @type {string[]} */ + let imported = []; + + /** @type {string[]} */ + let stylesheets = []; + + /** @type {string[]} */ + let fonts = []; + + /** @type {Set} */ + const eager_assets = new Set(); + + if (node.component && client_manifest) { + exports.push( + 'let component_cache;', + `export const component = async () => component_cache ??= (await import('../${ + resolve_symlinks(server_manifest, node.component).chunk.file + }')).default;` + ); + } + + if (node.universal) { + if (!!node.page_options && node.page_options.ssr === false) { + exports.push(`export const universal = ${s(node.page_options, null, 2)};`); + } else { + imports.push( + `import * as universal from '../${resolve_symlinks(server_manifest, node.universal).chunk.file}';` + ); + // TODO: when building for analysis, explain why the file was loaded on the server if we fail to load it + exports.push('export { universal };'); + } + exports.push(`export const universal_id = ${s(node.universal)};`); + } + + if (node.server) { + imports.push( + `import * as server from '../${resolve_symlinks(server_manifest, node.server).chunk.file}';` + ); + exports.push('export { server };'); + exports.push(`export const server_id = ${s(node.server)};`); + } + + if ( + client_manifest && + (node.universal || node.component) && + output_config.bundleStrategy === 'split' + ) { + const entry_path = `${normalizePath(kit.outDir)}/generated/client-optimized/nodes/${i}.js`; + const entry = find_deps(client_manifest, entry_path, true); + + // Eagerly load client stylesheets and fonts imported by the SSR-ed page to avoid FOUC. + // However, if it is not used during SSR (not present in the server manifest), + // then it can be lazily loaded in the browser. + + /** @type {import('types').AssetDependencies | undefined} */ + let component; + if (node.component) { + component = find_deps(server_manifest, node.component, true); + } + + /** @type {import('types').AssetDependencies | undefined} */ + let universal; + if (node.universal) { + universal = find_deps(server_manifest, node.universal, true); + } + + /** @type {Set} */ + const eager_css = new Set(); + + entry.stylesheet_map.forEach((value, filepath) => { + // pages and layouts are renamed to node indexes when optimised for the client + // so we use the original filename instead to check against the server manifest + if (filepath === entry_path) { + filepath = node.component ?? filepath; + } + + if (component?.stylesheet_map.has(filepath) || universal?.stylesheet_map.has(filepath)) { + value.css.forEach((file) => eager_css.add(file)); + value.assets.forEach((file) => eager_assets.add(file)); + } + }); + + imported = entry.imports; + stylesheets = Array.from(eager_css); + fonts = filter_fonts(Array.from(eager_assets)); + } + + exports.push( + `export const imports = ${s(imported)};`, + `export const stylesheets = ${s(stylesheets)};`, + `export const fonts = ${s(fonts)};` + ); + + /** + * Assets that have been processed by Vite (decoded and with the asset path stripped) + * @type {Set} + */ + let vite_assets = new Set(); + + // Keep track of Vite asset filenames so that we avoid touching unrelated ones + // when adjusting the inlined CSS + if (stylesheets_to_inline.size && assets_path && eager_assets.size) { + vite_assets = new Set( + Array.from(eager_assets).map((asset) => { + return decodeURIComponent(asset.replace(`${assets_path}/`, '')); + }) + ); + } + + if (stylesheets_to_inline.size) { + /** @type {string[]} */ + const inline_styles = []; + + stylesheets.forEach((file, i) => { + if (stylesheets_to_inline.has(file)) { + const filename = basename(file); + const dest = `${out}/server/stylesheets/${filename}.js`; + + const css = /** @type {string} */ (stylesheets_to_inline.get(file)); + + fs.writeFileSync( + dest, + `// ${filename}\nexport default ${prepare_css_for_inlining(css, vite_assets)};` + ); + const name = `stylesheet_${i}`; + imports.push(`import ${name} from '../stylesheets/${filename}.js';`); + inline_styles.push(`\t${s(file)}: ${name}`); + } + }); + + if (inline_styles.length > 0) { + exports.push(`export const inline_styles = () => ({\n${inline_styles.join(',\n')}\n});`); + } + } + + fs.writeFileSync( + `${out}/server/nodes/${i}.js`, + `${imports.join('\n')}\n\n${exports.join('\n')}\n` + ); + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/build_service_worker.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/build_service_worker.js new file mode 100644 index 0000000000000000000000000000000000000000..41412112c18ce83da0e56c7542854b6d8656ef15 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/build_service_worker.js @@ -0,0 +1,149 @@ +import fs from 'node:fs'; +import process from 'node:process'; +import * as vite from 'vite'; +import { dedent } from '../../../core/sync/utils.js'; +import { s } from '../../../utils/misc.js'; +import { get_config_aliases, strip_virtual_prefix, get_env, normalize_id } from '../utils.js'; +import { create_static_module } from '../../../core/env.js'; +import { env_static_public, service_worker } from '../module_ids.js'; + +// @ts-ignore `vite.rolldownVersion` only exists in `rolldown-vite` +const is_rolldown = !!vite.rolldownVersion; + +/** + * @param {string} out + * @param {import('types').ValidatedKitConfig} kit + * @param {import('vite').ResolvedConfig} vite_config + * @param {import('types').ManifestData} manifest_data + * @param {string} service_worker_entry_file + * @param {import('types').Prerendered} prerendered + * @param {import('vite').Manifest} client_manifest + */ +export async function build_service_worker( + out, + kit, + vite_config, + manifest_data, + service_worker_entry_file, + prerendered, + client_manifest +) { + const build = new Set(); + for (const key in client_manifest) { + const { file, css = [], assets = [] } = client_manifest[key]; + build.add(file); + css.forEach((file) => build.add(file)); + assets.forEach((file) => build.add(file)); + } + + // in a service worker, `location` is the location of the service worker itself, + // which is guaranteed to be `/service-worker.js` + const base = "location.pathname.split('/').slice(0, -1).join('/')"; + + const service_worker_code = dedent` + export const base = /*@__PURE__*/ ${base}; + + export const build = [ + ${Array.from(build) + .map((file) => `base + ${s(`/${file}`)}`) + .join(',\n')} + ]; + + export const files = [ + ${manifest_data.assets + .filter((asset) => kit.serviceWorker.files(asset.file)) + .map((asset) => `base + ${s(`/${asset.file}`)}`) + .join(',\n')} + ]; + + export const prerendered = [ + ${prerendered.paths.map((path) => `base + ${s(path.replace(kit.paths.base, ''))}`).join(',\n')} + ]; + + export const version = ${s(kit.version.name)}; + `; + + const env = get_env(kit.env, vite_config.mode); + + /** + * @type {import('vite').Plugin} + */ + const sw_virtual_modules = { + name: 'service-worker-build-virtual-modules', + resolveId(id) { + if (id.startsWith('$env/') || id.startsWith('$app/') || id === '$service-worker') { + // ids with :$ don't work with reverse proxies like nginx + return `\0virtual:${id.substring(1)}`; + } + }, + + load(id) { + if (!id.startsWith('\0virtual:')) return; + + if (id === service_worker) { + return service_worker_code; + } + + if (id === env_static_public) { + return create_static_module('$env/static/public', env.public); + } + + const normalized_cwd = vite.normalizePath(process.cwd()); + const normalized_lib = vite.normalizePath(kit.files.lib); + const relative = normalize_id(id, normalized_lib, normalized_cwd); + const stripped = strip_virtual_prefix(relative); + throw new Error( + `Cannot import ${stripped} into service-worker code. Only the modules $service-worker and $env/static/public are available in service workers.` + ); + } + }; + + /** @type {import('vite').InlineConfig} */ + const config = { + build: { + modulePreload: false, + rollupOptions: { + input: { + 'service-worker': service_worker_entry_file + }, + output: { + // .mjs so that esbuild doesn't incorrectly inject `export` https://github.com/vitejs/vite/issues/15379 + entryFileNames: `service-worker.${is_rolldown ? 'js' : 'mjs'}`, + assetFileNames: `${kit.appDir}/immutable/assets/[name].[hash][extname]`, + inlineDynamicImports: !is_rolldown ? true : undefined + } + }, + outDir: `${out}/client`, + emptyOutDir: false, + minify: vite_config.build.minify + }, + configFile: false, + define: vite_config.define, + publicDir: false, + plugins: [sw_virtual_modules], + resolve: { + alias: [...get_config_aliases(kit)] + }, + experimental: { + renderBuiltUrl(filename) { + return { + runtime: `new URL(${JSON.stringify(filename)}, location.href).pathname` + }; + } + } + }; + + // we must reference Vite 8 options conditionally. Otherwise, older Vite + // versions throw an error about unknown config options + if (is_rolldown && config?.build?.rollupOptions?.output) { + // @ts-ignore only available in Vite 8 + config.build.rollupOptions.output.codeSplitting = true; + } + + await vite.build(config); + + // rename .mjs to .js to avoid incorrect MIME types with ancient webservers + if (!is_rolldown) { + fs.renameSync(`${out}/client/service-worker.mjs`, `${out}/client/service-worker.js`); + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/remote.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/remote.js new file mode 100644 index 0000000000000000000000000000000000000000..4e9d60aaacb4fa21b0858de8a3754f8a8e6e7cc5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/remote.js @@ -0,0 +1,126 @@ +/** @import { ServerMetadata } from 'types' */ +/** @import { Rollup } from 'vite' */ + +import fs from 'node:fs'; +import path from 'node:path'; +import { Parser } from 'acorn'; +import MagicString from 'magic-string'; +import { posixify } from '../../../utils/filesystem.js'; +import { import_peer } from '../../../utils/import.js'; + +/** + * @param {string} out + * @param {Array<{ hash: string, file: string }>} remotes + * @param {ServerMetadata} metadata + * @param {string} cwd + * @param {Rollup.OutputBundle} server_bundle + * @param {NonNullable['sourcemap']} sourcemap + */ +export async function treeshake_prerendered_remotes( + out, + remotes, + metadata, + cwd, + server_bundle, + sourcemap +) { + if (remotes.length === 0) return; + + const vite = /** @type {typeof import('vite')} */ (await import_peer('vite')); + + for (const remote of remotes) { + const exports_map = metadata.remotes.get(remote.hash); + if (!exports_map) continue; + + /** @type {string[]} */ + const dynamic = []; + /** @type {string[]} */ + const prerendered = []; + + for (const [name, value] of exports_map) { + (value.dynamic ? dynamic : prerendered).push(name); + } + + if (prerendered.length === 0) continue; // nothing to treeshake + + // remove file extension + const remote_filename = path.basename(remote.file).split('.').slice(0, -1).join('.'); + + const remote_chunk = Object.values(server_bundle).find((chunk) => { + return chunk.name === remote_filename; + }); + + if (!remote_chunk) continue; + + const chunk_path = posixify(path.relative(cwd, `${out}/server/${remote_chunk.fileName}`)); + + const code = fs.readFileSync(chunk_path, 'utf-8'); + const parsed = Parser.parse(code, { sourceType: 'module', ecmaVersion: 'latest' }); + const modified_code = new MagicString(code); + + for (const fn of prerendered) { + for (const node of parsed.body) { + const declaration = + node.type === 'ExportNamedDeclaration' + ? node.declaration + : node.type === 'VariableDeclaration' + ? node + : null; + + if (!declaration || declaration.type !== 'VariableDeclaration') continue; + + for (const declarator of declaration.declarations) { + if (declarator.id.type === 'Identifier' && declarator.id.name === fn) { + modified_code.overwrite( + node.start, + node.end, + `const ${fn} = prerender('unchecked', () => { throw new Error('Unexpectedly called prerender function. Did you forget to set { dynamic: true } ?') });` + ); + } + } + } + } + + for (const node of parsed.body) { + if (node.type === 'ExportDefaultDeclaration') { + modified_code.remove(node.start, node.end); + } + } + + const stubbed = modified_code.toString(); + fs.writeFileSync(chunk_path, stubbed); + + const bundle = /** @type {import('vite').Rollup.RollupOutput} */ ( + await vite.build({ + configFile: false, + build: { + write: false, + ssr: true, + target: 'esnext', + sourcemap, + rollupOptions: { + // avoid resolving imports + external: (id) => !id.endsWith(chunk_path), + input: { + treeshaken: chunk_path + } + } + } + }) + ); + + const chunk = bundle.output.find( + (output) => output.type === 'chunk' && output.name === 'treeshaken' + ); + if (chunk && chunk.type === 'chunk') { + fs.writeFileSync(chunk_path, chunk.code); + + const chunk_sourcemap = bundle.output.find( + (output) => output.type === 'asset' && output.fileName === chunk.fileName + '.map' + ); + if (chunk_sourcemap && chunk_sourcemap.type === 'asset') { + fs.writeFileSync(chunk_path + '.map', chunk_sourcemap.source); + } + } + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/utils.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..303841266c4d0b8923c74ec6a13f8e14b1e70db6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/build/utils.js @@ -0,0 +1,162 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { normalizePath } from 'vite'; + +/** + * Adds transitive JS and CSS dependencies to the js and css inputs. + * @param {import('vite').Manifest} manifest + * @param {string} entry + * @param {boolean} add_dynamic_css + * @returns {import('types').AssetDependencies} + */ +export function find_deps(manifest, entry, add_dynamic_css) { + /** @type {Set} */ + const seen = new Set(); + + /** @type {Set} */ + const imports = new Set(); + + /** @type {Set} */ + const stylesheets = new Set(); + + /** @type {Set} */ + const imported_assets = new Set(); + + /** @type {Map; assets: Set }>} */ + const stylesheet_map = new Map(); + + /** + * @param {string} current + * @param {boolean} add_js + * @param {string} initial_importer + * @param {number} dynamic_import_depth + */ + function traverse(current, add_js, initial_importer, dynamic_import_depth) { + if (seen.has(current)) return; + seen.add(current); + + const { chunk } = resolve_symlinks(manifest, current); + + if (add_js) imports.add(chunk.file); + + if (chunk.assets) { + chunk.assets.forEach((asset) => imported_assets.add(asset)); + } + + if (chunk.css) { + chunk.css.forEach((file) => stylesheets.add(file)); + } + + if (chunk.imports) { + chunk.imports.forEach((file) => + traverse(file, add_js, initial_importer, dynamic_import_depth) + ); + } + + if (!add_dynamic_css) return; + + if ((chunk.css || chunk.assets) && dynamic_import_depth <= 1) { + // group files based on the initial importer because if a file is only ever + // a transitive dependency, it doesn't have a suitable name we can map back to + // the server manifest + if (stylesheet_map.has(initial_importer)) { + const { css, assets } = /** @type {{ css: Set; assets: Set }} */ ( + stylesheet_map.get(initial_importer) + ); + if (chunk.css) chunk.css.forEach((file) => css.add(file)); + if (chunk.assets) chunk.assets.forEach((file) => assets.add(file)); + } else { + stylesheet_map.set(initial_importer, { + css: new Set(chunk.css), + assets: new Set(chunk.assets) + }); + } + } + + if (chunk.dynamicImports) { + dynamic_import_depth++; + chunk.dynamicImports.forEach((file) => { + traverse(file, false, file, dynamic_import_depth); + }); + } + } + + const { chunk, file } = resolve_symlinks(manifest, entry); + + traverse(file, true, entry, 0); + + const assets = Array.from(imported_assets); + + return { + assets, + file: chunk.file, + imports: Array.from(imports), + stylesheets: Array.from(stylesheets), + // TODO do we need this separately? + fonts: filter_fonts(assets), + stylesheet_map + }; +} + +/** + * @param {import('vite').Manifest} manifest + * @param {string} file + */ +export function resolve_symlinks(manifest, file) { + while (!manifest[file]) { + const next = normalizePath(path.relative('.', fs.realpathSync(file))); + if (next === file) throw new Error(`Could not find file "${file}" in Vite manifest`); + file = next; + } + + const chunk = manifest[file]; + + return { chunk, file }; +} + +/** + * @param {string[]} assets + * @returns {string[]} + */ +export function filter_fonts(assets) { + return assets.filter((asset) => /\.(woff2?|ttf|otf)$/.test(asset)); +} + +/** + * @param {import('types').ValidatedKitConfig} config + * @returns {string} + */ +export function assets_base(config) { + return (config.paths.assets || config.paths.base || '.') + '/'; +} + +/** + * Writes a function with arguments used by a template literal. + * This helps us store strings in a module and inject values at runtime. + * @param {string} name The name of the function + * @param {string[]} placeholder_names The names of the placeholders in the string + * @param {string} str A string with placeholders such as "Hello ${arg0}". + * It must have backslashes, backticks and dollar signs already escaped. + * @returns {string} The function written as a string + */ +export function create_function_as_string(name, placeholder_names, str) { + const args = placeholder_names ? placeholder_names.join(', ') : ''; + return `function ${name}(${args}) { return \`${str}\`; }`; +} + +/** + * Guarantees that the generated placeholder is not already present in the content. + * @param {string} content + * @param {string} key + * @returns {string} + */ +export function generate_placeholder(content, key) { + let id = 1; + let placeholder = `__SVELTEKIT_${key}_${id}__`; + + while (content.includes(placeholder)) { + placeholder = `__SVELTEKIT_${key}_${++id}__`; + } + + return placeholder; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js new file mode 100644 index 0000000000000000000000000000000000000000..fcbd8f3c38d7f45dde91ffc46c38aeb9b01ad120 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js @@ -0,0 +1,682 @@ +/** @import { RequestEvent } from '@sveltejs/kit' */ +/** @import { PrerenderOption, UniversalNode } from 'types' */ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; +import { URL } from 'node:url'; +import { AsyncLocalStorage } from 'node:async_hooks'; +import colors from 'kleur'; +import sirv from 'sirv'; +import { isCSSRequest, loadEnv, buildErrorMessage } from 'vite'; +import { createReadableStream, getRequest, setResponse } from '../../../exports/node/index.js'; +import { installPolyfills } from '../../../exports/node/polyfills.js'; +import { coalesce_to_error } from '../../../utils/error.js'; +import { from_fs, posixify, resolve_entry, to_fs } from '../../../utils/filesystem.js'; +import { load_error_page } from '../../../core/config/index.js'; +import { SVELTE_KIT_ASSETS } from '../../../constants.js'; +import * as sync from '../../../core/sync/sync.js'; +import { get_mime_lookup, runtime_base } from '../../../core/utils.js'; +import { compact } from '../../../utils/array.js'; +import { is_chrome_devtools_request, not_found } from '../utils.js'; +import { SCHEME } from '../../../utils/url.js'; +import { check_feature } from '../../../utils/features.js'; +import { escape_html } from '../../../utils/escape.js'; + +const cwd = process.cwd(); +// vite-specifc queries that we should skip handling for css urls +const vite_css_query_regex = /(?:\?|&)(?:raw|url|inline)(?:&|$)/; + +/** + * @param {import('vite').ViteDevServer} vite + * @param {import('vite').ResolvedConfig} vite_config + * @param {import('types').ValidatedConfig} svelte_config + * @param {() => Array<{ hash: string, file: string }>} get_remotes + * @return {Promise void>>} + */ +export async function dev(vite, vite_config, svelte_config, get_remotes) { + installPolyfills(); + + /** @type {AsyncLocalStorage<{ event: RequestEvent, config: any, prerender: PrerenderOption }>} */ + const async_local_storage = new AsyncLocalStorage(); + + globalThis.__SVELTEKIT_TRACK__ = (label) => { + const context = async_local_storage.getStore(); + if (!context || context.prerender === true) return; + + check_feature( + /** @type {string} */ (context.event.route.id), + context.config, + label, + svelte_config.kit.adapter + ); + }; + + const fetch = globalThis.fetch; + globalThis.fetch = (info, init) => { + if (typeof info === 'string' && !SCHEME.test(info)) { + throw new Error( + `Cannot use relative URL (${info}) with global fetch — use \`event.fetch\` instead: https://svelte.dev/docs/kit/web-standards#fetch-apis` + ); + } + + return fetch(info, init); + }; + + sync.init(svelte_config, vite_config.mode); + + /** @type {import('types').ManifestData} */ + let manifest_data; + /** @type {import('@sveltejs/kit').SSRManifest} */ + let manifest; + + /** @type {Error | null} */ + let manifest_error = null; + + /** @param {string} url */ + async function loud_ssr_load_module(url) { + try { + return await vite.ssrLoadModule(url, { fixStacktrace: true }); + } catch (/** @type {unknown} */ e) { + const err = /** @type {import('rollup').RollupError} */ (e); + const msg = buildErrorMessage(err, [colors.red(`Internal server error: ${err.message}`)]); + + if (!vite.config.logger.hasErrorLogged(err)) { + vite.config.logger.error(msg, { error: err }); + } + + vite.ws.send({ + type: 'error', + err: /** @type {import('vite').ErrorPayload['err']} */ ({ + ...err, + // these properties are non-enumerable and will + // not be serialized unless we explicitly include them + message: err.message, + stack: err.stack ?? '' + }) + }); + + throw err; + } + } + + /** @param {string} id */ + async function resolve(id) { + const url = id.startsWith('..') ? to_fs(path.resolve(id)) : `/${id}`; + + const module = await loud_ssr_load_module(url); + + const module_node = await vite.moduleGraph.getModuleByUrl(url); + if (!module_node) throw new Error(`Could not find node for ${url}`); + + return { module, module_node, url }; + } + + function update_manifest() { + try { + ({ manifest_data } = sync.create(svelte_config)); + + if (manifest_error) { + manifest_error = null; + vite.ws.send({ type: 'full-reload' }); + } + } catch (error) { + manifest_error = /** @type {Error} */ (error); + + console.error(colors.bold().red(manifest_error.message)); + vite.ws.send({ + type: 'error', + err: { + message: manifest_error.message ?? 'Invalid routes', + stack: '' + } + }); + + return; + } + + manifest = { + appDir: svelte_config.kit.appDir, + appPath: svelte_config.kit.appDir, + assets: new Set(manifest_data.assets.map((asset) => asset.file)), + mimeTypes: get_mime_lookup(manifest_data), + _: { + client: { + start: `${runtime_base}/client/entry.js`, + app: `${to_fs(svelte_config.kit.outDir)}/generated/client/app.js`, + imports: [], + stylesheets: [], + fonts: [], + uses_env_dynamic_public: true, + nodes: + svelte_config.kit.router.resolution === 'client' + ? undefined + : manifest_data.nodes.map((node, i) => { + if (node.component || node.universal) { + return `${svelte_config.kit.paths.base}${to_fs(svelte_config.kit.outDir)}/generated/client/nodes/${i}.js`; + } + }), + // `css` is not necessary in dev, as the JS file from `nodes` will reference the CSS file + routes: + svelte_config.kit.router.resolution === 'client' + ? undefined + : compact( + manifest_data.routes.map((route) => { + if (!route.page) return; + + return { + id: route.id, + pattern: route.pattern, + params: route.params, + layouts: route.page.layouts.map((l) => + l !== undefined ? [!!manifest_data.nodes[l].server, l] : undefined + ), + errors: route.page.errors, + leaf: [!!manifest_data.nodes[route.page.leaf].server, route.page.leaf] + }; + }) + ) + }, + server_assets: new Proxy( + {}, + { + has: (_, /** @type {string} */ file) => fs.existsSync(from_fs(file)), + get: (_, /** @type {string} */ file) => fs.statSync(from_fs(file)).size + } + ), + nodes: manifest_data.nodes.map((node, index) => { + return async () => { + /** @type {import('types').SSRNode} */ + const result = {}; + result.index = index; + result.universal_id = node.universal; + result.server_id = node.server; + + // these are unused in dev, but it's easier to include them + result.imports = []; + result.stylesheets = []; + result.fonts = []; + + /** @type {import('vite').ModuleNode[]} */ + const module_nodes = []; + + if (node.component) { + result.component = async () => { + const { module_node, module } = await resolve( + /** @type {string} */ (node.component) + ); + + module_nodes.push(module_node); + + return module.default; + }; + } + + if (node.universal) { + if (node.page_options?.ssr === false) { + result.universal = /** @type {UniversalNode} */ (node.page_options); + } else { + // TODO: explain why the file was loaded on the server if we fail to load it + const { module, module_node } = await resolve(node.universal); + module_nodes.push(module_node); + result.universal = module; + } + } + + if (node.server) { + const { module } = await resolve(node.server); + result.server = module; + } + + // in dev we inline all styles to avoid FOUC. this gets populated lazily so that + // components/stylesheets loaded via import() during `load` are included + result.inline_styles = async () => { + /** @type {Set} */ + const deps = new Set(); + + for (const module_node of module_nodes) { + await find_deps(vite, module_node, deps); + } + + /** @type {Record} */ + const styles = {}; + + for (const dep of deps) { + if (isCSSRequest(dep.url) && !vite_css_query_regex.test(dep.url)) { + const inlineCssUrl = dep.url.includes('?') + ? dep.url.replace('?', '?inline&') + : dep.url + '?inline'; + try { + const mod = await vite.ssrLoadModule(inlineCssUrl); + styles[dep.url] = mod.default; + } catch { + // this can happen with dynamically imported modules, I think + // because the Vite module graph doesn't distinguish between + // static and dynamic imports? TODO investigate, submit fix + } + } + } + + return styles; + }; + + return result; + }; + }), + prerendered_routes: new Set(), + get remotes() { + return Object.fromEntries( + get_remotes().map((remote) => [ + remote.hash, + () => vite.ssrLoadModule(remote.file).then((module) => ({ default: module })) + ]) + ); + }, + routes: compact( + manifest_data.routes.map((route) => { + if (!route.page && !route.endpoint) return null; + + const endpoint = route.endpoint; + + return { + id: route.id, + pattern: route.pattern, + params: route.params, + page: route.page, + endpoint: endpoint + ? async () => { + const url = path.resolve(cwd, endpoint.file); + return await loud_ssr_load_module(url); + } + : null, + endpoint_id: endpoint?.file + }; + }) + ), + matchers: async () => { + /** @type {Record} */ + const matchers = {}; + + for (const key in manifest_data.matchers) { + const file = manifest_data.matchers[key]; + const url = path.resolve(cwd, file); + const module = await vite.ssrLoadModule(url, { fixStacktrace: true }); + + if (module.match) { + matchers[key] = module.match; + } else { + throw new Error(`${file} does not export a \`match\` function`); + } + } + + return matchers; + } + } + }; + } + + /** @param {Error} error */ + function fix_stack_trace(error) { + try { + vite.ssrFixStacktrace(error); + } catch { + // ssrFixStacktrace can fail on StackBlitz web containers and we don't know why + // by ignoring it the line numbers are wrong, but at least we can show the error + } + return error.stack; + } + + update_manifest(); + + /** + * @param {string} event + * @param {(file: string) => void} cb + */ + const watch = (event, cb) => { + vite.watcher.on(event, (file) => { + if ( + file.startsWith(svelte_config.kit.files.routes + path.sep) || + file.startsWith(svelte_config.kit.files.params + path.sep) || + svelte_config.kit.moduleExtensions.some((ext) => file.endsWith(`.remote${ext}`)) || + // in contrast to server hooks, client hooks are written to the client manifest + // and therefore need rebuilding when they are added/removed + file.startsWith(svelte_config.kit.files.hooks.client) + ) { + cb(file); + } + }); + }; + /** @type {NodeJS.Timeout | null } */ + let timeout = null; + /** @param {() => void} to_run */ + const debounce = (to_run) => { + timeout && clearTimeout(timeout); + timeout = setTimeout(() => { + timeout = null; + to_run(); + }, 100); + }; + + // flag to skip watchers if server is already restarting + let restarting = false; + + // Debounce add/unlink events because in case of folder deletion or moves + // they fire in rapid succession, causing needless invocations. + // These watchers only run for routes, param matchers, and client hooks. + watch('add', () => debounce(update_manifest)); + watch('unlink', () => debounce(update_manifest)); + watch('change', (file) => { + // Don't run for a single file if the whole manifest is about to get updated + // Unless it's a file where the trailing slash page option might have changed + if (timeout || restarting || !/\+(page|layout|server).*$/.test(file)) return; + sync.update(svelte_config, manifest_data, file); + }); + + const { appTemplate, errorTemplate, serviceWorker, hooks } = svelte_config.kit.files; + + // vite client only executes a full reload if the triggering html file path is index.html + // kit defaults to src/app.html, so unless user changed that to index.html + // send the vite client a full-reload event without path being set + if (appTemplate !== 'index.html') { + vite.watcher.on('change', (file) => { + if (file === appTemplate && !restarting) { + vite.ws.send({ type: 'full-reload' }); + } + }); + } + + vite.watcher.on('all', (_, file) => { + if ( + file === appTemplate || + file === errorTemplate || + file.startsWith(serviceWorker) || + file.startsWith(hooks.server) + ) { + sync.server(svelte_config); + } + }); + + vite.watcher.on('change', async (file) => { + // changing the svelte config requires restarting the dev server + // the config is only read on start and passed on to vite-plugin-svelte + // which needs up-to-date values to operate correctly + if (file.match(/[/\\]svelte\.config\.[jt]s$/)) { + console.log(`svelte config changed, restarting vite dev-server. changed file: ${file}`); + restarting = true; + await vite.restart(); + } + }); + + const assets = svelte_config.kit.paths.assets ? SVELTE_KIT_ASSETS : svelte_config.kit.paths.base; + const asset_server = sirv(svelte_config.kit.files.assets, { + dev: true, + etag: true, + maxAge: 0, + extensions: [], + setHeaders: (res) => { + res.setHeader('access-control-allow-origin', '*'); + } + }); + + vite.middlewares.use((req, res, next) => { + const base = `${vite.config.server.https ? 'https' : 'http'}://${ + req.headers[':authority'] || req.headers.host + }`; + + const decoded = decodeURI(new URL(base + req.url).pathname); + + if (decoded.startsWith(assets)) { + const pathname = decoded.slice(assets.length); + const file = svelte_config.kit.files.assets + pathname; + + if (fs.existsSync(file) && !fs.statSync(file).isDirectory()) { + if (has_correct_case(file, svelte_config.kit.files.assets)) { + req.url = encodeURI(pathname); // don't need query/hash + asset_server(req, res); + return; + } + } + } + + next(); + }); + + const env = loadEnv(vite_config.mode, svelte_config.kit.env.dir, ''); + const emulator = await svelte_config.kit.adapter?.emulate?.(); + + return () => { + const serve_static_middleware = vite.middlewares.stack.find( + (middleware) => + /** @type {Function} */ (middleware.handle).name === 'viteServeStaticMiddleware' + ); + + // Vite will give a 403 on URLs like /test, /static, and /package.json preventing us from + // serving routes with those names. See https://github.com/vitejs/vite/issues/7363 + remove_static_middlewares(vite.middlewares); + + vite.middlewares.use(async (req, res) => { + // Vite's base middleware strips out the base path. Restore it + const original_url = req.url; + req.url = req.originalUrl; + try { + const base = `${vite.config.server.https ? 'https' : 'http'}://${ + req.headers[':authority'] || req.headers.host + }`; + + const decoded = decodeURI(new URL(base + req.url).pathname); + const file = posixify(path.resolve(decoded.slice(svelte_config.kit.paths.base.length + 1))); + const is_file = fs.existsSync(file) && !fs.statSync(file).isDirectory(); + const allowed = + !vite_config.server.fs.strict || + vite_config.server.fs.allow.some((dir) => file.startsWith(dir)); + + if (is_file && allowed) { + req.url = original_url; + // @ts-expect-error + serve_static_middleware.handle(req, res); + return; + } + + if (is_chrome_devtools_request(decoded, res)) { + return; + } + + if (!decoded.startsWith(svelte_config.kit.paths.base)) { + return not_found(req, res, svelte_config.kit.paths.base); + } + + if (decoded === svelte_config.kit.paths.base + '/service-worker.js') { + const resolved = resolve_entry(svelte_config.kit.files.serviceWorker); + + if (resolved) { + res.writeHead(200, { + 'content-type': 'application/javascript' + }); + res.end(`import '${svelte_config.kit.paths.base}${to_fs(resolved)}';`); + } else { + res.writeHead(404); + res.end('not found'); + } + + return; + } + + const resolved_instrumentation = resolve_entry( + path.join(svelte_config.kit.files.src, 'instrumentation.server') + ); + + if (resolved_instrumentation) { + await vite.ssrLoadModule(resolved_instrumentation); + } + + // we have to import `Server` before calling `set_assets` + const { Server } = /** @type {import('types').ServerModule} */ ( + await vite.ssrLoadModule(`${runtime_base}/server/index.js`, { fixStacktrace: true }) + ); + + const { set_fix_stack_trace } = await vite.ssrLoadModule( + `${runtime_base}/shared-server.js` + ); + set_fix_stack_trace(fix_stack_trace); + + const { set_assets } = await vite.ssrLoadModule('$app/paths/internal/server'); + set_assets(assets); + + const server = new Server(manifest); + + await server.init({ + env, + read: (file) => createReadableStream(from_fs(file)) + }); + + const request = await getRequest({ + base, + request: req + }); + + if (manifest_error) { + console.error(colors.bold().red(manifest_error.message)); + + const error_page = load_error_page(svelte_config); + + /** @param {{ status: number; message: string }} opts */ + const error_template = ({ status, message }) => { + return error_page + .replace(/%sveltekit\.status%/g, String(status)) + .replace(/%sveltekit\.error\.message%/g, escape_html(message)); + }; + + res.writeHead(500, { + 'Content-Type': 'text/html; charset=utf-8' + }); + res.end( + error_template({ status: 500, message: manifest_error.message ?? 'Invalid routes' }) + ); + + return; + } + + const rendered = await server.respond(request, { + getClientAddress: () => { + const { remoteAddress } = req.socket; + if (remoteAddress) return remoteAddress; + throw new Error('Could not determine clientAddress'); + }, + read: (file) => { + if (file in manifest._.server_assets) { + return fs.readFileSync(from_fs(file)); + } + + return fs.readFileSync(path.join(svelte_config.kit.files.assets, file)); + }, + before_handle: (event, config, prerender) => { + async_local_storage.enterWith({ event, config, prerender }); + }, + emulator + }); + + if (rendered.status === 404) { + // @ts-expect-error + serve_static_middleware.handle(req, res, () => { + void setResponse(res, rendered); + }); + } else { + void setResponse(res, rendered); + } + } catch (e) { + const error = coalesce_to_error(e); + res.statusCode = 500; + res.end(fix_stack_trace(error)); + } + }); + }; +} + +/** + * @param {import('connect').Server} server + */ +function remove_static_middlewares(server) { + const static_middlewares = ['viteServeStaticMiddleware', 'viteServePublicMiddleware']; + for (let i = server.stack.length - 1; i > 0; i--) { + // @ts-expect-error using internals + if (static_middlewares.includes(server.stack[i].handle.name)) { + server.stack.splice(i, 1); + } + } +} + +/** + * @param {import('vite').ViteDevServer} vite + * @param {import('vite').ModuleNode | import('vite').EnvironmentModuleNode} node + * @param {Set} deps + */ +async function find_deps(vite, node, deps) { + // since `ssrTransformResult.deps` contains URLs instead of `ModuleNode`s, this process is asynchronous. + // instead of using `await`, we resolve all branches in parallel. + /** @type {Promise[]} */ + const branches = []; + + /** @param {import('vite').ModuleNode | import('vite').EnvironmentModuleNode} node */ + async function add(node) { + if (!deps.has(node)) { + deps.add(node); + await find_deps(vite, node, deps); + } + } + + /** @param {string} url */ + async function add_by_url(url) { + const node = await get_server_module_by_url(vite, url); + + if (node) { + await add(node); + } + } + + const transform_result = + /** @type {import('vite').ModuleNode} */ (node).ssrTransformResult || node.transformResult; + + if (transform_result) { + if (transform_result.deps) { + transform_result.deps.forEach((url) => branches.push(add_by_url(url))); + } + + if (transform_result.dynamicDeps) { + transform_result.dynamicDeps.forEach((url) => branches.push(add_by_url(url))); + } + } else { + node.importedModules.forEach((node) => branches.push(add(node))); + } + + await Promise.all(branches); +} + +/** + * @param {import('vite').ViteDevServer} vite + * @param {string} url + */ +function get_server_module_by_url(vite, url) { + return vite.environments + ? vite.environments.ssr.moduleGraph.getModuleByUrl(url) + : vite.moduleGraph.getModuleByUrl(url, true); +} + +/** + * Determine if a file is being requested with the correct case, + * to ensure consistent behaviour between dev and prod and across + * operating systems. Note that we can't use realpath here, + * because we don't want to follow symlinks + * @param {string} file + * @param {string} assets + * @returns {boolean} + */ +function has_correct_case(file, assets) { + if (file === assets) return true; + + const parent = path.dirname(file); + + if (fs.readdirSync(parent).includes(path.basename(file))) { + return has_correct_case(parent, assets); + } + + return false; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/index.js new file mode 100644 index 0000000000000000000000000000000000000000..fe829e73e240d283f9f7557ffc60ebfe6973b1b6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/index.js @@ -0,0 +1,1486 @@ +/** @import { Options } from '@sveltejs/vite-plugin-svelte' */ +/** @import { PreprocessorGroup } from 'svelte/compiler' */ +/** @import { ConfigEnv, Manifest, Plugin, ResolvedConfig, UserConfig, ViteDevServer } from 'vite' */ +import fs from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; + +import colors from 'kleur'; + +import { copy, mkdirp, posixify, read, resolve_entry, rimraf } from '../../utils/filesystem.js'; +import { create_static_module, create_dynamic_module } from '../../core/env.js'; +import * as sync from '../../core/sync/sync.js'; +import { create_assets } from '../../core/sync/create_manifest_data/index.js'; +import { runtime_directory, logger } from '../../core/utils.js'; +import { load_config } from '../../core/config/index.js'; +import { generate_manifest } from '../../core/generate_manifest/index.js'; +import { build_server_nodes } from './build/build_server.js'; +import { build_service_worker } from './build/build_service_worker.js'; +import { assets_base, find_deps, resolve_symlinks } from './build/utils.js'; +import { dev } from './dev/index.js'; +import { preview } from './preview/index.js'; +import { + error_for_missing_config, + get_config_aliases, + get_env, + normalize_id, + stackless +} from './utils.js'; +import { write_client_manifest } from '../../core/sync/write_client_manifest.js'; +import prerender from '../../core/postbuild/prerender.js'; +import analyse from '../../core/postbuild/analyse.js'; +import { s } from '../../utils/misc.js'; +import { hash } from '../../utils/hash.js'; +import { dedent, isSvelte5Plus } from '../../core/sync/utils.js'; +import { + env_dynamic_private, + env_dynamic_public, + env_static_private, + env_static_public, + service_worker, + sveltekit_environment, + sveltekit_server +} from './module_ids.js'; +import { import_peer } from '../../utils/import.js'; +import { compact } from '../../utils/array.js'; +import { should_ignore, has_children } from './static_analysis/utils.js'; +import { treeshake_prerendered_remotes } from './build/remote.js'; + +const cwd = posixify(process.cwd()); + +/** @type {import('./types.js').EnforcedConfig} */ +const enforced_config = { + appType: true, + base: true, + build: { + cssCodeSplit: true, + emptyOutDir: true, + lib: { + entry: true, + name: true, + formats: true + }, + manifest: true, + outDir: true, + rollupOptions: { + input: true, + output: { + format: true, + entryFileNames: true, + chunkFileNames: true, + assetFileNames: true + }, + preserveEntrySignatures: true + }, + ssr: true + }, + publicDir: true, + resolve: { + alias: { + $app: true, + $lib: true, + '$service-worker': true + } + }, + root: true +}; + +const options_regex = /(export\s+const\s+(prerender|csr|ssr|trailingSlash))\s*=/s; + +/** @type {Set} */ +const warned = new Set(); + +/** @type {PreprocessorGroup} */ +const warning_preprocessor = { + script: ({ content, filename }) => { + if (!filename) return; + + const basename = path.basename(filename); + if (basename.startsWith('+page.') || basename.startsWith('+layout.')) { + const match = content.match(options_regex); + if (match && match.index !== undefined && !should_ignore(content, match.index)) { + const fixed = basename.replace('.svelte', '(.server).js/ts'); + + const message = + `\n${colors.bold().red(path.relative('.', filename))}\n` + + `\`${match[1]}\` will be ignored — move it to ${fixed} instead. See https://svelte.dev/docs/kit/page-options for more information.`; + + if (!warned.has(message)) { + console.log(message); + warned.add(message); + } + } + } + }, + markup: ({ content, filename }) => { + if (!filename) return; + + const basename = path.basename(filename); + + if (basename.startsWith('+layout.') && !has_children(content, isSvelte5Plus())) { + const message = + `\n${colors.bold().red(path.relative('.', filename))}\n` + + `\`\`${isSvelte5Plus() ? ' or `{@render ...}` tag' : ''}` + + ' missing — inner content will not be rendered'; + + if (!warned.has(message)) { + console.log(message); + warned.add(message); + } + } + } +}; + +/** + * Returns the SvelteKit Vite plugins. + * @returns {Promise} + */ +export async function sveltekit() { + const svelte_config = await load_config(); + + /** @type {Options['preprocess']} */ + let preprocess = svelte_config.preprocess; + if (Array.isArray(preprocess)) { + preprocess = [...preprocess, warning_preprocessor]; + } else if (preprocess) { + preprocess = [preprocess, warning_preprocessor]; + } else { + preprocess = warning_preprocessor; + } + + /** @type {Options} */ + const vite_plugin_svelte_options = { + configFile: false, + extensions: svelte_config.extensions, + preprocess, + onwarn: svelte_config.onwarn, + compilerOptions: { + // @ts-ignore - ignore this property when running `pnpm check` against Svelte 5 in the ecosystem CI + hydratable: isSvelte5Plus() ? undefined : true, + ...svelte_config.compilerOptions + }, + ...svelte_config.vitePlugin + }; + + const { svelte } = await import_peer('@sveltejs/vite-plugin-svelte'); + + return [...svelte(vite_plugin_svelte_options), ...(await kit({ svelte_config }))]; +} + +// These variables live outside the `kit()` function because it is re-invoked by each Vite build + +let secondary_build_started = false; + +/** @type {import('types').ManifestData} */ +let manifest_data; + +/** @type {import('types').ServerMetadata | undefined} only set at build time once analysis is finished */ +let build_metadata = undefined; + +/** + * Returns the SvelteKit Vite plugin. Vite executes Rollup hooks as well as some of its own. + * Background reading is available at: + * - https://vitejs.dev/guide/api-plugin.html + * - https://rollupjs.org/guide/en/#plugin-development + * + * You can get an idea of the lifecycle by looking at the flow charts here: + * - https://rollupjs.org/guide/en/#build-hooks + * - https://rollupjs.org/guide/en/#output-generation-hooks + * + * @param {{ svelte_config: import('types').ValidatedConfig }} options + * @return {Promise} + */ +async function kit({ svelte_config }) { + /** @type {typeof import('vite')} */ + const vite = await import_peer('vite'); + + // @ts-ignore `vite.rolldownVersion` only exists in `vite 8` + const is_rolldown = !!vite.rolldownVersion; + + const { kit } = svelte_config; + const out = `${kit.outDir}/output`; + + const version_hash = hash(kit.version.name); + + /** @type {ResolvedConfig} */ + let vite_config; + + /** @type {ConfigEnv} */ + let vite_config_env; + + /** @type {boolean} */ + let is_build; + + /** @type {{ public: Record; private: Record }} */ + let env; + + /** @type {() => Promise} */ + let finalise; + + /** @type {UserConfig} */ + let initial_config; + + const service_worker_entry_file = resolve_entry(kit.files.serviceWorker); + const parsed_service_worker = path.parse(kit.files.serviceWorker); + + const normalized_cwd = vite.normalizePath(cwd); + const normalized_lib = vite.normalizePath(kit.files.lib); + const normalized_node_modules = vite.normalizePath(path.resolve('node_modules')); + + /** + * A map showing which features (such as `$app/server:read`) are defined + * in which chunks, so that we can later determine which routes use which features + * @type {Record} + */ + const tracked_features = {}; + + const sourcemapIgnoreList = /** @param {string} relative_path */ (relative_path) => + relative_path.includes('node_modules') || relative_path.includes(kit.outDir); + + /** @type {Plugin} */ + const plugin_setup = { + name: 'vite-plugin-sveltekit-setup', + + /** + * Build the SvelteKit-provided Vite config to be merged with the user's vite.config.js file. + * @see https://vitejs.dev/guide/api-plugin.html#config + */ + config: { + order: 'pre', + handler(config, config_env) { + initial_config = config; + vite_config_env = config_env; + is_build = config_env.command === 'build'; + + env = get_env(kit.env, vite_config_env.mode); + + const allow = new Set([ + kit.files.lib, + kit.files.routes, + kit.outDir, + path.resolve('src'), // TODO this isn't correct if user changed all his files to sth else than src (like in test/options) + path.resolve('node_modules'), + path.resolve(vite.searchForWorkspaceRoot(cwd), 'node_modules') + ]); + + // We can only add directories to the allow list, so we find out + // if there's a client hooks file and pass its directory + const client_hooks = resolve_entry(kit.files.hooks.client); + if (client_hooks) allow.add(path.dirname(client_hooks)); + + const generated = path.posix.join(kit.outDir, 'generated'); + + // dev and preview config can be shared + /** @type {UserConfig} */ + const new_config = { + resolve: { + alias: [ + { find: '__SERVER__', replacement: `${generated}/server` }, + { find: '$app', replacement: `${runtime_directory}/app` }, + ...get_config_aliases(kit) + ] + }, + root: cwd, + server: { + cors: { preflightContinue: true }, + fs: { + allow: [...allow] + }, + sourcemapIgnoreList, + watch: { + ignored: [ + // Ignore all siblings of config.kit.outDir/generated + `${posixify(kit.outDir)}/!(generated)` + ] + } + }, + preview: { + cors: { preflightContinue: true } + }, + optimizeDeps: { + entries: [ + `${kit.files.routes}/**/+*.{svelte,js,ts}`, + `!${kit.files.routes}/**/+*server.*` + ], + exclude: [ + // Without this SvelteKit will be prebundled on the client, which means we end up with two versions of Redirect etc. + // Also see https://github.com/sveltejs/kit/issues/5952#issuecomment-1218844057 + '@sveltejs/kit', + // exclude kit features so that libraries using them work even when they are prebundled + // this does not affect app code, just handling of imported libraries that use $app or $env + '$app', + '$env' + ] + }, + ssr: { + noExternal: [ + // This ensures that esm-env is inlined into the server output with the + // export conditions resolved correctly through Vite. This prevents adapters + // that bundle later on from resolving the export conditions incorrectly + // and for example include browser-only code in the server output + // because they for example use esbuild.build with `platform: 'browser'` + 'esm-env', + // This forces `$app/*` modules to be bundled, since they depend on + // virtual modules like `__sveltekit/environment` (this isn't a valid bare + // import, but it works with vite-node's externalization logic, which + // uses basic concatenation) + '@sveltejs/kit/src/runtime' + ] + } + }; + + if (kit.experimental.remoteFunctions) { + // treat .remote.js files as empty for the purposes of prebundling + // detects rolldown to avoid a warning message in vite 8 beta + const remote_id_filter = new RegExp( + `.remote(${kit.moduleExtensions.join('|')})$`.replaceAll('.', '\\.') + ); + new_config.optimizeDeps ??= {}; // for some reason ts says this could be undefined even though it was set above + if (is_rolldown) { + // @ts-ignore + new_config.optimizeDeps.rolldownOptions ??= {}; + // @ts-ignore + new_config.optimizeDeps.rolldownOptions.plugins ??= []; + // @ts-ignore + new_config.optimizeDeps.rolldownOptions.plugins.push({ + name: 'vite-plugin-sveltekit-setup:optimize-remote-functions', + load: { + filter: { id: remote_id_filter }, + handler() { + return ''; + } + } + }); + } else { + new_config.optimizeDeps.esbuildOptions ??= {}; + new_config.optimizeDeps.esbuildOptions.plugins ??= []; + new_config.optimizeDeps.esbuildOptions.plugins.push({ + name: 'vite-plugin-sveltekit-setup:optimize-remote-functions', + setup(build) { + build.onLoad({ filter: remote_id_filter }, () => ({ contents: '' })); + } + }); + } + } + + const define = { + __SVELTEKIT_APP_DIR__: s(kit.appDir), + __SVELTEKIT_EMBEDDED__: s(kit.embedded), + __SVELTEKIT_FORK_PRELOADS__: s(kit.experimental.forkPreloads), + __SVELTEKIT_PATHS_ASSETS__: s(kit.paths.assets), + __SVELTEKIT_PATHS_BASE__: s(kit.paths.base), + __SVELTEKIT_PATHS_RELATIVE__: s(kit.paths.relative), + __SVELTEKIT_CLIENT_ROUTING__: s(kit.router.resolution === 'client'), + __SVELTEKIT_HASH_ROUTING__: s(kit.router.type === 'hash'), + __SVELTEKIT_SERVER_TRACING_ENABLED__: s(kit.experimental.tracing.server), + __SVELTEKIT_EXPERIMENTAL_USE_TRANSFORM_ERROR__: s(kit.experimental.handleRenderingErrors) + }; + + if (is_build) { + if (!new_config.build) new_config.build = {}; + new_config.build.ssr = !secondary_build_started; + + new_config.define = { + ...define, + __SVELTEKIT_ADAPTER_NAME__: s(kit.adapter?.name), + __SVELTEKIT_APP_VERSION_FILE__: s(`${kit.appDir}/version.json`), + __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: s(kit.version.pollInterval), + __SVELTEKIT_PAYLOAD__: new_config.build.ssr + ? '{}' + : `globalThis.__sveltekit_${version_hash}` + }; + + if (!secondary_build_started) { + manifest_data = sync.all(svelte_config, config_env.mode).manifest_data; + // During the initial server build we don't know yet + new_config.define.__SVELTEKIT_HAS_SERVER_LOAD__ = 'true'; + new_config.define.__SVELTEKIT_HAS_UNIVERSAL_LOAD__ = 'true'; + } else { + const nodes = Object.values( + /** @type {import('types').ServerMetadata} */ (build_metadata).nodes + ); + + // Through the finished analysis we can now check if any node has server or universal load functions + const has_server_load = nodes.some((node) => node.has_server_load); + const has_universal_load = nodes.some((node) => node.has_universal_load); + + new_config.define.__SVELTEKIT_HAS_SERVER_LOAD__ = s(has_server_load); + new_config.define.__SVELTEKIT_HAS_UNIVERSAL_LOAD__ = s(has_universal_load); + } + } else { + new_config.define = { + ...define, + __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: '0', + __SVELTEKIT_PAYLOAD__: 'globalThis.__sveltekit_dev', + __SVELTEKIT_HAS_SERVER_LOAD__: 'true', + __SVELTEKIT_HAS_UNIVERSAL_LOAD__: 'true' + }; + + // @ts-ignore this prevents a reference error if `client.js` is imported on the server + globalThis.__sveltekit_dev = {}; + + // These Kit dependencies are packaged as CommonJS, which means they must always be externalized. + // Without this, the tests will still pass but `pnpm dev` will fail in projects that link `@sveltejs/kit`. + /** @type {NonNullable} */ (new_config.ssr).external = [ + 'cookie', + 'set-cookie-parser' + ]; + } + + warn_overridden_config(config, new_config); + + return new_config; + } + }, + + /** + * Stores the final config. + */ + configResolved(config) { + vite_config = config; + } + }; + + /** @type {Plugin} */ + const plugin_virtual_modules = { + name: 'vite-plugin-sveltekit-virtual-modules', + + resolveId(id, importer) { + if (id === '__sveltekit/manifest') { + return `${kit.outDir}/generated/client-optimized/app.js`; + } + + // If importing from a service-worker, only allow $service-worker & $env/static/public, but none of the other virtual modules. + // This check won't catch transitive imports, but it will warn when the import comes from a service-worker directly. + // Transitive imports will be caught during the build. + // TODO move this logic to plugin_guard + if (importer) { + const parsed_importer = path.parse(importer); + + const importer_is_service_worker = + parsed_importer.dir === parsed_service_worker.dir && + parsed_importer.name === parsed_service_worker.name; + + if (importer_is_service_worker && id !== '$service-worker' && id !== '$env/static/public') { + throw new Error( + `Cannot import ${normalize_id( + id, + normalized_lib, + normalized_cwd + )} into service-worker code. Only the modules $service-worker and $env/static/public are available in service workers.` + ); + } + } + + // treat $env/static/[public|private] as virtual + if (id.startsWith('$env/') || id === '$service-worker') { + // ids with :$ don't work with reverse proxies like nginx + return `\0virtual:${id.substring(1)}`; + } + + if (id === '__sveltekit/remote') { + return `${runtime_directory}/client/remote-functions/index.js`; + } + + if (id.startsWith('__sveltekit/')) { + return `\0virtual:${id}`; + } + }, + + load(id, options) { + const browser = !options?.ssr; + + const global = is_build + ? `globalThis.__sveltekit_${version_hash}` + : 'globalThis.__sveltekit_dev'; + + switch (id) { + case env_static_private: + return create_static_module('$env/static/private', env.private); + + case env_static_public: + return create_static_module('$env/static/public', env.public); + + case env_dynamic_private: + return create_dynamic_module( + 'private', + vite_config_env.command === 'serve' ? env.private : undefined + ); + + case env_dynamic_public: + // populate `$env/dynamic/public` from `window` + if (browser) { + return `export const env = ${global}.env;`; + } + + return create_dynamic_module( + 'public', + vite_config_env.command === 'serve' ? env.public : undefined + ); + + case service_worker: + return create_service_worker_module(svelte_config); + + case sveltekit_environment: { + const { version } = svelte_config.kit; + + return dedent` + export const version = ${s(version.name)}; + export let building = false; + export let prerendering = false; + + export function set_building() { + building = true; + } + + export function set_prerendering() { + prerendering = true; + } + `; + } + + case sveltekit_server: { + return dedent` + export let read_implementation = null; + + export let manifest = null; + + export function set_read_implementation(fn) { + read_implementation = fn; + } + + export function set_manifest(_) { + manifest = _; + } + `; + } + } + } + }; + + /** @type {Map>} */ + const import_map = new Map(); + const server_only_pattern = /.*\.server\..+/; + + /** + * Ensures that client-side code can't accidentally import server-side code, + * whether in `*.server.js` files, `$app/server`, `$lib/server`, or `$env/[static|dynamic]/private` + * @type {Plugin} + */ + const plugin_guard = { + name: 'vite-plugin-sveltekit-guard', + + // Run this plugin before built-in resolution, so that relative imports + // are added to the module graph + enforce: 'pre', + + async resolveId(id, importer, options) { + if (importer && !importer.endsWith('index.html')) { + const resolved = await this.resolve(id, importer, { ...options, skipSelf: true }); + + if (resolved) { + const normalized = normalize_id(resolved.id, normalized_lib, normalized_cwd); + + let importers = import_map.get(normalized); + + if (!importers) { + importers = new Set(); + import_map.set(normalized, importers); + } + + importers.add(normalize_id(importer, normalized_lib, normalized_cwd)); + } + } + }, + + load(id, options) { + if (options?.ssr === true || process.env.TEST === 'true') { + return; + } + + // skip .server.js files outside the cwd or in node_modules, as the filename might not mean 'server-only module' in this context + const is_internal = id.startsWith(normalized_cwd) && !id.startsWith(normalized_node_modules); + + const normalized = normalize_id(id, normalized_lib, normalized_cwd); + + const is_server_only = + normalized === '$env/static/private' || + normalized === '$env/dynamic/private' || + normalized === '$app/server' || + normalized.startsWith('$lib/server/') || + (is_internal && server_only_pattern.test(path.basename(id))); + + if (is_server_only) { + // in dev, this doesn't exist, so we need to create it + manifest_data ??= sync.all(svelte_config, vite_config_env.mode).manifest_data; + + /** @type {Set} */ + const entrypoints = new Set(); + for (const node of manifest_data.nodes) { + if (node.component) entrypoints.add(node.component); + if (node.universal) entrypoints.add(node.universal); + } + + if (manifest_data.hooks.client) entrypoints.add(manifest_data.hooks.client); + if (manifest_data.hooks.universal) entrypoints.add(manifest_data.hooks.universal); + + const normalized = normalize_id(id, normalized_lib, normalized_cwd); + const chain = [normalized]; + + let current = normalized; + let includes_remote_file = false; + + while (true) { + const importers = import_map.get(current); + if (!importers) break; + + const candidates = Array.from(importers).filter((importer) => !chain.includes(importer)); + if (candidates.length === 0) break; + + chain.push((current = candidates[0])); + + includes_remote_file ||= svelte_config.kit.moduleExtensions.some((ext) => { + return current.endsWith(`.remote${ext}`); + }); + + if (entrypoints.has(current)) { + const pyramid = chain + .reverse() + .map((id, i) => { + return `${' '.repeat(i + 1)}${id}`; + }) + .join(' imports\n'); + + if (includes_remote_file) { + error_for_missing_config( + 'remote functions', + 'kit.experimental.remoteFunctions', + 'true' + ); + } + + let message = `Cannot import ${normalized} into code that runs in the browser, as this could leak sensitive information.`; + message += `\n\n${pyramid}`; + message += `\n\nIf you're only using the import as a type, change it to \`import type\`.`; + + throw stackless(message); + } + } + + throw new Error('An impossible situation occurred'); + } + } + }; + + /** @type {ViteDevServer} */ + let dev_server; + + /** @type {Array<{ hash: string, file: string }>} */ + const remotes = []; + + /** @type {Map} Maps remote hash -> original module id */ + const remote_original_by_hash = new Map(); + + /** @type {Set} Track which remote hashes have already been emitted */ + const emitted_remote_hashes = new Set(); + + /** @type {Plugin} */ + const plugin_remote = { + name: 'vite-plugin-sveltekit-remote', + + resolveId(id) { + if (id.startsWith('\0sveltekit-remote:')) return id; + }, + + load(id) { + // On-the-fly generated entry point for remote file just forwards the original module + // We're not using manualChunks because it can cause problems with circular dependencies + // (e.g. https://github.com/sveltejs/kit/issues/14679) and module ordering in general + // (e.g. https://github.com/sveltejs/kit/issues/14590). + if (id.startsWith('\0sveltekit-remote:')) { + const hash_id = id.slice('\0sveltekit-remote:'.length); + const original = remote_original_by_hash.get(hash_id); + if (!original) throw new Error(`Expected to find metadata for remote file ${id}`); + return `import * as m from ${s(original)};\nexport default m;`; + } + }, + + configureServer(_dev_server) { + dev_server = _dev_server; + }, + + async transform(code, id, opts) { + const normalized = normalize_id(id, normalized_lib, normalized_cwd); + if (!svelte_config.kit.moduleExtensions.some((ext) => normalized.endsWith(`.remote${ext}`))) { + return; + } + + const file = posixify(path.relative(cwd, id)); + const remote = { + hash: hash(file), + file + }; + + remotes.push(remote); + + if (opts?.ssr) { + // we need to add an `await Promise.resolve()` because if the user imports this function + // on the client AND in a load function when loading the client module we will trigger + // an ssrLoadModule during dev. During a link preload, the module can be mistakenly + // loaded and transformed twice and the first time all its exports would be undefined + // triggering a dev server error. By adding a microtask we ensure that the module is fully loaded + + // Extra newlines to prevent syntax errors around missing semicolons or comments + code += + '\n\n' + + dedent` + import * as $$_self_$$ from './${path.basename(id)}'; + import { init_remote_functions as $$_init_$$ } from '@sveltejs/kit/internal'; + + ${dev_server ? 'await Promise.resolve()' : ''} + + $$_init_$$($$_self_$$, ${s(file)}, ${s(remote.hash)}); + + for (const [name, fn] of Object.entries($$_self_$$)) { + fn.__.id = ${s(remote.hash)} + '/' + name; + fn.__.name = name; + } + `; + + // Emit a dedicated entry chunk for this remote in SSR builds (prod only) + if (!dev_server) { + remote_original_by_hash.set(remote.hash, id); + if (!emitted_remote_hashes.has(remote.hash)) { + this.emitFile({ + type: 'chunk', + id: `\0sveltekit-remote:${remote.hash}`, + name: `remote-${remote.hash}` + }); + emitted_remote_hashes.add(remote.hash); + } + } + + return code; + } + + // For the client, read the exports and create a new module that only contains fetch functions with the correct metadata + + /** @type {Map} */ + const map = new Map(); + + // in dev, load the server module here (which will result in this hook + // being called again with `opts.ssr === true` if the module isn't + // already loaded) so we can determine what it exports + if (dev_server) { + const module = await dev_server.ssrLoadModule(id); + + for (const [name, value] of Object.entries(module)) { + const type = value?.__?.type; + if (type) { + map.set(name, type); + } + } + } + + // in prod, we already built and analysed the server code before + // building the client code, so `remote_exports` is populated + else if (build_metadata?.remotes) { + const exports = build_metadata?.remotes.get(remote.hash); + if (!exports) throw new Error('Expected to find metadata for remote file ' + id); + + for (const [name, value] of exports) { + map.set(name, value.type); + } + } + + let namespace = '__remote'; + let uid = 1; + while (map.has(namespace)) namespace = `__remote${uid++}`; + + const exports = Array.from(map).map(([name, type]) => { + return `export const ${name} = ${namespace}.${type}('${remote.hash}/${name}');`; + }); + + let result = `import * as ${namespace} from '__sveltekit/remote';\n\n${exports.join('\n')}\n`; + + if (dev_server) { + result += `\nimport.meta.hot?.accept();\n`; + } + + return { + code: result + }; + } + }; + + /** @type {Plugin} */ + const plugin_compile = { + name: 'vite-plugin-sveltekit-compile', + + /** + * Build the SvelteKit-provided Vite config to be merged with the user's vite.config.js file. + * @see https://vitejs.dev/guide/api-plugin.html#config + */ + config: { + // avoids overwriting the base setting that's also set by Vitest + order: 'pre', + handler(config) { + /** @type {UserConfig} */ + let new_config; + + const kit_paths_base = kit.paths.base || '/'; + + if (is_build) { + const ssr = /** @type {boolean} */ (config.build?.ssr); + const prefix = `${kit.appDir}/immutable`; + + /** @type {Record} */ + const input = {}; + + if (ssr) { + input.index = `${runtime_directory}/server/index.js`; + input.internal = `${kit.outDir}/generated/server/internal.js`; + input['remote-entry'] = `${runtime_directory}/app/server/remote/index.js`; + + // add entry points for every endpoint... + manifest_data.routes.forEach((route) => { + if (route.endpoint) { + const resolved = path.resolve(route.endpoint.file); + const relative = decodeURIComponent(path.relative(kit.files.routes, resolved)); + const name = posixify( + path.join('entries/endpoints', relative.replace(/\.js$/, '')) + ); + input[name] = resolved; + } + }); + + // ...and every component used by pages... + manifest_data.nodes.forEach((node) => { + for (const file of [node.component, node.universal, node.server]) { + if (file) { + const resolved = path.resolve(file); + const relative = decodeURIComponent(path.relative(kit.files.routes, resolved)); + + const name = relative.startsWith('..') + ? posixify(path.join('entries/fallbacks', path.basename(file))) + : posixify(path.join('entries/pages', relative.replace(/\.js$/, ''))); + input[name] = resolved; + } + } + }); + + // ...and every matcher + Object.entries(manifest_data.matchers).forEach(([key, file]) => { + const name = posixify(path.join('entries/matchers', key)); + input[name] = path.resolve(file); + }); + + // ...and the hooks files + if (manifest_data.hooks.server) { + input['entries/hooks.server'] = path.resolve(manifest_data.hooks.server); + } + if (manifest_data.hooks.universal) { + input['entries/hooks.universal'] = path.resolve(manifest_data.hooks.universal); + } + + // ...and the server instrumentation file + const server_instrumentation = resolve_entry( + path.join(kit.files.src, 'instrumentation.server') + ); + if (server_instrumentation) { + const { adapter } = kit; + if (adapter && !adapter.supports?.instrumentation?.()) { + throw new Error(`${server_instrumentation} is unsupported in ${adapter.name}.`); + } + if (!kit.experimental.instrumentation.server) { + error_for_missing_config( + '`instrumentation.server.js`', + 'kit.experimental.instrumentation.server', + 'true' + ); + } + input['instrumentation.server'] = server_instrumentation; + } + } else if (svelte_config.kit.output.bundleStrategy !== 'split') { + input['bundle'] = `${runtime_directory}/client/bundle.js`; + } else { + input['entry/start'] = `${runtime_directory}/client/entry.js`; + input['entry/app'] = `${kit.outDir}/generated/client-optimized/app.js`; + manifest_data.nodes.forEach((node, i) => { + if (node.component || node.universal) { + input[`nodes/${i}`] = `${kit.outDir}/generated/client-optimized/nodes/${i}.js`; + } + }); + } + + // see the kit.output.preloadStrategy option for details on why we have multiple options here + const ext = kit.output.preloadStrategy === 'preload-mjs' ? 'mjs' : 'js'; + + // We could always use a relative asset base path here, but it's better for performance not to. + // E.g. Vite generates `new URL('/asset.png', import.meta).href` for a relative path vs just '/asset.png'. + // That's larger and takes longer to run and also causes an HTML diff between SSR and client + // causing us to do a more expensive hydration check. + const client_base = + kit.paths.relative !== false || kit.paths.assets ? './' : kit_paths_base; + + const inline = !ssr && svelte_config.kit.output.bundleStrategy === 'inline'; + const split = ssr || svelte_config.kit.output.bundleStrategy === 'split'; + + new_config = { + base: ssr ? assets_base(kit) : client_base, + build: { + copyPublicDir: !ssr, + cssCodeSplit: svelte_config.kit.output.bundleStrategy !== 'inline', + cssMinify: + initial_config.build?.minify == null ? true : !!initial_config.build.minify, + manifest: true, + outDir: `${out}/${ssr ? 'server' : 'client'}`, + rollupOptions: { + input: inline ? input['bundle'] : input, + output: { + format: inline ? 'iife' : 'esm', + name: `__sveltekit_${version_hash}.app`, + entryFileNames: ssr ? '[name].js' : `${prefix}/[name].[hash].${ext}`, + chunkFileNames: ssr ? 'chunks/[name].js' : `${prefix}/chunks/[hash].${ext}`, + assetFileNames: `${prefix}/assets/[name].[hash][extname]`, + hoistTransitiveImports: false, + sourcemapIgnoreList, + inlineDynamicImports: is_rolldown ? undefined : !split + }, + preserveEntrySignatures: 'strict', + onwarn(warning, handler) { + if ( + (is_rolldown + ? warning.code === 'IMPORT_IS_UNDEFINED' + : warning.code === 'MISSING_EXPORT') && + warning.id === `${kit.outDir}/generated/client-optimized/app.js` + ) { + // ignore e.g. undefined `handleError` hook when + // referencing `client_hooks.handleError` + return; + } + + handler(warning); + } + }, + ssrEmitAssets: true, + target: ssr ? 'node18.13' : undefined + }, + publicDir: kit.files.assets, + worker: { + rollupOptions: { + output: { + entryFileNames: `${prefix}/workers/[name]-[hash].js`, + chunkFileNames: `${prefix}/workers/chunks/[hash].js`, + assetFileNames: `${prefix}/workers/assets/[name]-[hash][extname]`, + hoistTransitiveImports: false + } + } + } + }; + + // we must reference Vite 8 options conditionally. Otherwise, older Vite + // versions throw an error about unknown config options + if (is_rolldown && new_config?.build?.rollupOptions?.output) { + // @ts-ignore only available in Vite 8 + new_config.build.rollupOptions.output.codeSplitting = split; + } + } else { + new_config = { + appType: 'custom', + base: kit_paths_base, + build: { + rollupOptions: { + // Vite dependency crawler needs an explicit JS entry point + // even though server otherwise works without it + input: `${runtime_directory}/client/entry.js` + } + }, + publicDir: kit.files.assets + }; + } + + warn_overridden_config(config, new_config); + + return new_config; + } + }, + + /** + * Adds the SvelteKit middleware to do SSR in dev mode. + * @see https://vitejs.dev/guide/api-plugin.html#configureserver + */ + async configureServer(vite) { + return await dev(vite, vite_config, svelte_config, () => remotes); + }, + + /** + * Adds the SvelteKit middleware to do SSR in preview mode. + * @see https://vitejs.dev/guide/api-plugin.html#configurepreviewserver + */ + configurePreviewServer(vite) { + return preview(vite, vite_config, svelte_config); + }, + + /** + * Clears the output directories. + */ + buildStart() { + if (secondary_build_started) return; + + if (is_build) { + if (!vite_config.build.watch) { + rimraf(out); + } + mkdirp(out); + } + }, + + renderChunk(code, chunk) { + if (code.includes('__SVELTEKIT_TRACK__')) { + return { + // Rolldown changes our single quotes to double quotes so we need it in the regex too + code: code.replace(/__SVELTEKIT_TRACK__\(['"](.+?)['"]\)/g, (_, label) => { + (tracked_features[chunk.name + '.js'] ??= []).push(label); + // put extra whitespace at the end of the comment to preserve the source size and avoid interfering with source maps + return `/* track ${label} */`; + }), + map: null // TODO we may need to generate a sourcemap in future + }; + } + }, + + generateBundle() { + if (vite_config.build.ssr) return; + + this.emitFile({ + type: 'asset', + fileName: `${kit.appDir}/version.json`, + source: s({ version: kit.version.name }) + }); + }, + + /** + * Vite builds a single bundle. We need three bundles: client, server, and service worker. + * The user's package.json scripts will invoke the Vite CLI to execute the server build. We + * then use this hook to kick off builds for the client and service worker. + */ + writeBundle: { + sequential: true, + async handler(_options, server_bundle) { + if (secondary_build_started) return; // only run this once + + const verbose = vite_config.logLevel === 'info'; + const log = logger({ verbose }); + + /** @type {Manifest} */ + const server_manifest = JSON.parse(read(`${out}/server/.vite/manifest.json`)); + + /** @type {import('types').BuildData} */ + const build_data = { + app_dir: kit.appDir, + app_path: `${kit.paths.base.slice(1)}${kit.paths.base ? '/' : ''}${kit.appDir}`, + manifest_data, + out_dir: out, + service_worker: service_worker_entry_file ? 'service-worker.js' : null, // TODO make file configurable? + client: null, + server_manifest + }; + + const manifest_path = `${out}/server/manifest-full.js`; + fs.writeFileSync( + manifest_path, + `export const manifest = ${generate_manifest({ + build_data, + prerendered: [], + relative_path: '.', + routes: manifest_data.routes, + remotes + })};\n` + ); + + log.info('Analysing routes'); + + const { metadata } = await analyse({ + hash: kit.router.type === 'hash', + manifest_path, + manifest_data, + server_manifest, + tracked_features, + env: { ...env.private, ...env.public }, + out, + output_config: svelte_config.output, + remotes + }); + + build_metadata = metadata; + + log.info('Building app'); + + // create client build + write_client_manifest( + kit, + manifest_data, + `${kit.outDir}/generated/client-optimized`, + metadata.nodes + ); + + secondary_build_started = true; + + let client_chunks; + + try { + const bundle = /** @type {import('vite').Rollup.RollupOutput} */ ( + await vite.build({ + configFile: vite_config.configFile, + // CLI args + mode: vite_config_env.mode, + logLevel: vite_config.logLevel, + clearScreen: vite_config.clearScreen, + build: { + minify: initial_config.build?.minify, + assetsInlineLimit: vite_config.build.assetsInlineLimit, + sourcemap: vite_config.build.sourcemap + }, + optimizeDeps: { + force: vite_config.optimizeDeps.force + } + }) + ); + + client_chunks = bundle.output; + } catch (e) { + const error = + e instanceof Error ? e : new Error(/** @type {any} */ (e).message ?? e ?? ''); + + // without this, errors that occur during the secondary build + // will be logged twice + throw stackless(error.stack ?? error.message); + } + + // We use `build.ssrEmitAssets` so that asset URLs created from + // imports in server-only modules correspond to files in the build, + // but we don't want to copy over CSS imports as these are already + // accounted for in the client bundle. In most cases it would be + // a no-op, but for SSR builds `url(...)` paths are handled + // differently (relative for client, absolute for server) + // resulting in different hashes, and thus duplication + const ssr_stylesheets = new Set( + Object.values(server_manifest) + .map((chunk) => chunk.css ?? []) + .flat() + ); + + const assets_path = `${kit.appDir}/immutable/assets`; + const server_assets = `${out}/server/${assets_path}`; + const client_assets = `${out}/client/${assets_path}`; + + if (fs.existsSync(server_assets)) { + for (const file of fs.readdirSync(server_assets)) { + const src = `${server_assets}/${file}`; + const dest = `${client_assets}/${file}`; + + if (fs.existsSync(dest) || ssr_stylesheets.has(`${assets_path}/${file}`)) { + continue; + } + + if (file.endsWith('.css')) { + // make absolute paths in CSS relative, for portability + const content = fs + .readFileSync(src, 'utf-8') + .replaceAll(`${kit.paths.base}/${assets_path}`, '.'); + + fs.writeFileSync(src, content); + } + + copy(src, dest); + } + } + + /** @type {Manifest} */ + const client_manifest = JSON.parse(read(`${out}/client/.vite/manifest.json`)); + + /** + * @param {string} entry + * @param {boolean} [add_dynamic_css] + */ + const deps_of = (entry, add_dynamic_css = false) => + find_deps(client_manifest, posixify(path.relative('.', entry)), add_dynamic_css); + + if (svelte_config.kit.output.bundleStrategy === 'split') { + const start = deps_of(`${runtime_directory}/client/entry.js`); + const app = deps_of(`${kit.outDir}/generated/client-optimized/app.js`); + + build_data.client = { + start: start.file, + app: app.file, + imports: [...start.imports, ...app.imports], + stylesheets: [...start.stylesheets, ...app.stylesheets], + fonts: [...start.fonts, ...app.fonts], + uses_env_dynamic_public: client_chunks.some( + (chunk) => chunk.type === 'chunk' && chunk.modules[env_dynamic_public] + ) + }; + + // In case of server-side route resolution, we create a purpose-built route manifest that is + // similar to that on the client, with as much information computed upfront so that we + // don't need to include any code of the actual routes in the server bundle. + if (svelte_config.kit.router.resolution === 'server') { + const nodes = manifest_data.nodes.map((node, i) => { + if (node.component || node.universal) { + const entry = `${kit.outDir}/generated/client-optimized/nodes/${i}.js`; + const deps = deps_of(entry, true); + const file = resolve_symlinks( + client_manifest, + `${kit.outDir}/generated/client-optimized/nodes/${i}.js` + ).chunk.file; + + return { file, css: deps.stylesheets }; + } + }); + build_data.client.nodes = nodes.map((node) => node?.file); + build_data.client.css = nodes.map((node) => node?.css); + + build_data.client.routes = compact( + manifest_data.routes.map((route) => { + if (!route.page) return; + + return { + id: route.id, + pattern: route.pattern, + params: route.params, + layouts: route.page.layouts.map((l) => + l !== undefined ? [metadata.nodes[l].has_server_load, l] : undefined + ), + errors: route.page.errors, + leaf: [metadata.nodes[route.page.leaf].has_server_load, route.page.leaf] + }; + }) + ); + } + } else { + const start = deps_of(`${runtime_directory}/client/bundle.js`); + + build_data.client = { + start: start.file, + imports: start.imports, + stylesheets: start.stylesheets, + fonts: start.fonts, + uses_env_dynamic_public: client_chunks.some( + (chunk) => chunk.type === 'chunk' && chunk.modules[env_dynamic_public] + ) + }; + + if (svelte_config.kit.output.bundleStrategy === 'inline') { + const style = /** @type {import('vite').Rollup.OutputAsset} */ ( + client_chunks.find( + (chunk) => + chunk.type === 'asset' && + chunk.names.length === 1 && + chunk.names[0] === 'style.css' + ) + ); + + build_data.client.inline = { + script: read(`${out}/client/${start.file}`), + style: /** @type {string | undefined} */ (style?.source) + }; + } + } + + // regenerate manifest now that we have client entry... + fs.writeFileSync( + manifest_path, + `export const manifest = ${generate_manifest({ + build_data, + prerendered: [], + relative_path: '.', + routes: manifest_data.routes, + remotes + })};\n` + ); + + // regenerate nodes with the client manifest... + build_server_nodes( + out, + kit, + manifest_data, + server_manifest, + client_manifest, + assets_path, + client_chunks, + svelte_config.kit.output + ); + + // ...and prerender + const { prerendered, prerender_map } = await prerender({ + hash: kit.router.type === 'hash', + out, + manifest_path, + metadata, + verbose, + env: { ...env.private, ...env.public } + }); + + await treeshake_prerendered_remotes( + out, + remotes, + metadata, + cwd, + server_bundle, + vite_config.build.sourcemap + ); + + // generate a new manifest that doesn't include prerendered pages + fs.writeFileSync( + `${out}/server/manifest.js`, + `export const manifest = ${generate_manifest({ + build_data, + prerendered: prerendered.paths, + relative_path: '.', + routes: manifest_data.routes.filter((route) => prerender_map.get(route.id) !== true), + remotes + })};\n` + ); + + if (service_worker_entry_file) { + if (kit.paths.assets) { + throw new Error('Cannot use service worker alongside config.kit.paths.assets'); + } + + log.info('Building service worker'); + + await build_service_worker( + out, + kit, + { + ...vite_config, + build: { + ...vite_config.build, + minify: initial_config.build?.minify ?? true + } + }, + manifest_data, + service_worker_entry_file, + prerendered, + client_manifest + ); + } + + // we need to defer this to closeBundle, so that adapters copy files + // created by other Vite plugins + finalise = async () => { + console.log( + `\nRun ${colors + .bold() + .cyan('npm run preview')} to preview your production build locally.` + ); + + if (kit.adapter) { + const { adapt } = await import('../../core/adapt/index.js'); + await adapt( + svelte_config, + build_data, + metadata, + prerendered, + prerender_map, + log, + remotes, + vite_config + ); + } else { + console.log(colors.bold().yellow('\nNo adapter specified')); + + const link = colors.bold().cyan('https://svelte.dev/docs/kit/adapters'); + console.log( + `See ${link} to learn how to configure your app to run on the platform of your choosing` + ); + } + + secondary_build_started = false; + }; + } + }, + + /** + * Runs the adapter. + */ + closeBundle: { + sequential: true, + async handler() { + if (!vite_config.build.ssr) return; + await finalise?.(); + } + } + }; + + return [ + plugin_setup, + kit.experimental.remoteFunctions && plugin_remote, + plugin_virtual_modules, + plugin_guard, + plugin_compile + ].filter((p) => !!p); +} + +/** + * @param {UserConfig} config + * @param {UserConfig} resolved_config + */ +function warn_overridden_config(config, resolved_config) { + const overridden = find_overridden_config(config, resolved_config, enforced_config, '', []); + + if (overridden.length > 0) { + console.error( + colors.bold().red('The following Vite config options will be overridden by SvelteKit:') + + overridden.map((key) => `\n - ${key}`).join('') + ); + } +} + +/** + * @param {Record} config + * @param {Record} resolved_config + * @param {import('./types.js').EnforcedConfig} enforced_config + * @param {string} path + * @param {string[]} out used locally to compute the return value + */ +function find_overridden_config(config, resolved_config, enforced_config, path, out) { + if (config == null || resolved_config == null) { + return out; + } + + for (const key in enforced_config) { + if (typeof config === 'object' && key in config && key in resolved_config) { + const enforced = enforced_config[key]; + + if (enforced === true) { + if (config[key] !== resolved_config[key]) { + out.push(path + key); + } + } else { + find_overridden_config(config[key], resolved_config[key], enforced, path + key + '.', out); + } + } + } + return out; +} + +/** + * @param {import('types').ValidatedConfig} config + */ +const create_service_worker_module = (config) => dedent` + if (typeof self === 'undefined' || self instanceof ServiceWorkerGlobalScope === false) { + throw new Error('This module can only be imported inside a service worker'); + } + + export const build = []; + export const files = [ + ${create_assets(config) + .filter((asset) => config.kit.serviceWorker.files(asset.file)) + .map((asset) => `${s(`${config.kit.paths.base}/${asset.file}`)}`) + .join(',\n')} + ]; + export const prerendered = []; + export const version = ${s(config.kit.version.name)}; +`; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/module_ids.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/module_ids.js new file mode 100644 index 0000000000000000000000000000000000000000..69325f3edf41e92f9b539b1798dc67b4cddc4318 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/module_ids.js @@ -0,0 +1,16 @@ +import { fileURLToPath } from 'node:url'; +import { posixify } from '../../utils/filesystem.js'; + +export const env_static_private = '\0virtual:env/static/private'; +export const env_static_public = '\0virtual:env/static/public'; +export const env_dynamic_private = '\0virtual:env/dynamic/private'; +export const env_dynamic_public = '\0virtual:env/dynamic/public'; + +export const service_worker = '\0virtual:service-worker'; + +export const sveltekit_environment = '\0virtual:__sveltekit/environment'; +export const sveltekit_server = '\0virtual:__sveltekit/server'; + +export const app_server = posixify( + fileURLToPath(new URL('../../runtime/app/server/index.js', import.meta.url)) +); diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/preview/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/preview/index.js new file mode 100644 index 0000000000000000000000000000000000000000..3b900845f9af0692fb5bc070ad4c0a8e37ed6976 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/preview/index.js @@ -0,0 +1,265 @@ +import fs from 'node:fs'; +import { join } from 'node:path'; +import { pathToFileURL } from 'node:url'; +import { lookup } from 'mrmime'; +import sirv from 'sirv'; +import { loadEnv, normalizePath } from 'vite'; +import { createReadableStream, getRequest, setResponse } from '../../../exports/node/index.js'; +import { installPolyfills } from '../../../exports/node/polyfills.js'; +import { SVELTE_KIT_ASSETS } from '../../../constants.js'; +import { is_chrome_devtools_request, not_found } from '../utils.js'; + +/** @typedef {import('http').IncomingMessage} Req */ +/** @typedef {import('http').ServerResponse} Res */ +/** @typedef {(req: Req, res: Res, next: () => void) => void} Handler */ + +/** + * @param {import('vite').PreviewServer} vite + * @param {import('vite').ResolvedConfig} vite_config + * @param {import('types').ValidatedConfig} svelte_config + */ +export async function preview(vite, vite_config, svelte_config) { + installPolyfills(); + + const { paths } = svelte_config.kit; + const base = paths.base; + const assets = paths.assets ? SVELTE_KIT_ASSETS : paths.base; + + const protocol = vite_config.preview.https ? 'https' : 'http'; + + const etag = `"${Date.now()}"`; + + const dir = join(svelte_config.kit.outDir, 'output/server'); + + if (!fs.existsSync(dir)) { + throw new Error(`Server files not found at ${dir}, did you run \`build\` first?`); + } + + const instrumentation = join(dir, 'instrumentation.server.js'); + if (fs.existsSync(instrumentation)) { + await import(pathToFileURL(instrumentation).href); + } + + /** @type {import('types').ServerInternalModule} */ + const { set_assets } = await import(pathToFileURL(join(dir, 'internal.js')).href); + + /** @type {import('types').ServerModule} */ + const { Server } = await import(pathToFileURL(join(dir, 'index.js')).href); + + const { manifest } = await import(pathToFileURL(join(dir, 'manifest.js')).href); + + set_assets(assets); + + const server = new Server(manifest); + await server.init({ + env: loadEnv(vite_config.mode, svelte_config.kit.env.dir, ''), + read: (file) => createReadableStream(`${dir}/${file}`) + }); + + const emulator = await svelte_config.kit.adapter?.emulate?.(); + + return () => { + // Remove the base middleware. It screws with the URL. + // It also only lets through requests beginning with the base path, so that requests beginning + // with the assets URL never reach us. We could serve assets separately before the base + // middleware, but we'd need that to occur after the compression and cors middlewares, so would + // need to insert it manually into the stack, which would be at least as bad as doing this. + for (let i = vite.middlewares.stack.length - 1; i > 0; i--) { + // @ts-expect-error using internals + if (vite.middlewares.stack[i].handle.name === 'viteBaseMiddleware') { + vite.middlewares.stack.splice(i, 1); + } + } + + // generated client assets and the contents of `static` + vite.middlewares.use( + scoped( + assets, + sirv(join(svelte_config.kit.outDir, 'output/client'), { + setHeaders: (res, pathname) => { + // only apply to immutable directory, not e.g. version.json + if (pathname.startsWith(`/${svelte_config.kit.appDir}/immutable`)) { + res.setHeader('cache-control', 'public,max-age=31536000,immutable'); + } + } + }) + ) + ); + + vite.middlewares.use((req, res, next) => { + const original_url = /** @type {string} */ (req.url); + const { pathname, search } = new URL(original_url, 'http://dummy'); + + // if `paths.base === '/a/b/c`, then the root route is `/a/b/c/`, + // regardless of the `trailingSlash` route option + if (base.length > 1 && pathname === base) { + let location = base + '/'; + if (search) location += search; + res.writeHead(307, { + location + }); + res.end(); + return; + } + + if (is_chrome_devtools_request(pathname, res)) { + return; + } + + if (pathname.startsWith(base)) { + next(); + } else { + res.statusCode = 404; + not_found(req, res, base); + } + }); + + // prerendered dependencies + vite.middlewares.use( + scoped(base, mutable(join(svelte_config.kit.outDir, 'output/prerendered/dependencies'))) + ); + + // prerendered pages (we can't just use sirv because we need to + // preserve the correct trailingSlash behaviour) + vite.middlewares.use( + scoped(base, (req, res, next) => { + let if_none_match_value = req.headers['if-none-match']; + + if (if_none_match_value?.startsWith('W/"')) { + if_none_match_value = if_none_match_value.substring(2); + } + + if (if_none_match_value === etag) { + res.statusCode = 304; + res.end(); + return; + } + + const { pathname, search } = new URL(/** @type {string} */ (req.url), 'http://dummy'); + + const dir = pathname.startsWith(`/${svelte_config.kit.appDir}/remote/`) ? 'data' : 'pages'; + + let filename = normalizePath( + join(svelte_config.kit.outDir, `output/prerendered/${dir}` + pathname) + ); + + try { + filename = decodeURI(filename); + } catch { + // malformed URI + } + + let prerendered = is_file(filename); + + if (!prerendered) { + const has_trailing_slash = pathname.endsWith('/'); + const html_filename = `${filename}${has_trailing_slash ? 'index.html' : '.html'}`; + + /** @type {string | undefined} */ + let redirect; + + if (is_file(html_filename)) { + filename = html_filename; + prerendered = true; + } else if (has_trailing_slash) { + if (is_file(filename.slice(0, -1) + '.html')) { + redirect = pathname.slice(0, -1); + } + } else if (is_file(filename + '/index.html')) { + redirect = pathname + '/'; + } + + if (redirect) { + if (search) redirect += search; + res.writeHead(307, { + location: redirect + }); + + res.end(); + + return; + } + } + + if (prerendered) { + res.writeHead(200, { + 'content-type': lookup(pathname) || 'text/html', + etag + }); + + fs.createReadStream(filename).pipe(res); + } else { + next(); + } + }) + ); + + // SSR + vite.middlewares.use(async (req, res) => { + const host = req.headers[':authority'] || req.headers.host; + + const request = await getRequest({ + base: `${protocol}://${host}`, + request: req + }); + + await setResponse( + res, + await server.respond(request, { + getClientAddress: () => { + const { remoteAddress } = req.socket; + if (remoteAddress) return remoteAddress; + throw new Error('Could not determine clientAddress'); + }, + read: (file) => { + if (file in manifest._.server_assets) { + return fs.readFileSync(join(dir, file)); + } + + return fs.readFileSync(join(svelte_config.kit.files.assets, file)); + }, + emulator + }) + ); + }); + }; +} + +/** + * @param {string} dir + * @returns {Handler} + */ +const mutable = (dir) => + fs.existsSync(dir) + ? sirv(dir, { + etag: true, + maxAge: 0 + }) + : (_req, _res, next) => next(); + +/** + * @param {string} scope + * @param {Handler} handler + * @returns {Handler} + */ +function scoped(scope, handler) { + if (scope === '') return handler; + + return (req, res, next) => { + if (req.url?.startsWith(scope)) { + const original_url = req.url; + req.url = req.url.slice(scope.length); + handler(req, res, () => { + req.url = original_url; + next(); + }); + } else { + next(); + } + }; +} + +/** @param {string} path */ +function is_file(path) { + return fs.existsSync(path) && !fs.statSync(path).isDirectory(); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/static_analysis/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/static_analysis/index.js new file mode 100644 index 0000000000000000000000000000000000000000..6d4248032da5f97e8e34ca650e3e9db6025d3137 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/static_analysis/index.js @@ -0,0 +1,301 @@ +import { tsPlugin } from '@sveltejs/acorn-typescript'; +import { Parser } from 'acorn'; +import { read } from '../../../utils/filesystem.js'; + +const valid_page_options_array = /** @type {const} */ ([ + 'ssr', + 'prerender', + 'csr', + 'trailingSlash', + 'config', + 'entries', + 'load' +]); + +/** @type {Set} */ +const valid_page_options = new Set(valid_page_options_array); + +/** @typedef {typeof valid_page_options_array[number]} ValidPageOption */ +/** @typedef {Partial>} PageOptions */ + +const skip_parsing_regex = new RegExp( + `${Array.from(valid_page_options).join('|')}|(?:export[\\s\\n]+\\*[\\s\\n]+from)` +); + +const parser = Parser.extend(tsPlugin()); + +/** + * Collects page options from a +page.js/+layout.js file, ignoring reassignments + * and using the declared value (except for load functions, for which the value is `true`). + * Returns `null` if any export is too difficult to analyse. + * @param {string} filename The name of the file to report when an error occurs + * @param {string} input + * @returns {PageOptions | null} + */ +export function statically_analyse_page_options(filename, input) { + // if there's a chance there are no page exports or an unparseable + // export all declaration, then we can skip the AST parsing which is expensive + if (!skip_parsing_regex.test(input)) { + return {}; + } + + try { + const source = parser.parse(input, { + sourceType: 'module', + ecmaVersion: 'latest' + }); + + /** @type {Map} */ + const page_options = new Map(); + + for (const statement of source.body) { + // ignore export all declarations with aliases that are not page options + if ( + statement.type === 'ExportAllDeclaration' && + statement.exported && + !valid_page_options.has(get_name(statement.exported)) + ) { + continue; + } + + if ( + statement.type === 'ExportDefaultDeclaration' || + statement.type === 'ExportAllDeclaration' + ) { + return null; + } else if (statement.type !== 'ExportNamedDeclaration') { + continue; + } + + if (statement.specifiers.length) { + /** @type {Map} */ + const export_specifiers = new Map(); + for (const specifier of statement.specifiers) { + const exported_name = get_name(specifier.exported); + if (!valid_page_options.has(exported_name)) { + continue; + } + + if (statement.source) { + return null; + } + + export_specifiers.set(get_name(specifier.local), exported_name); + } + + for (const statement of source.body) { + switch (statement.type) { + case 'ImportDeclaration': { + for (const import_specifier of statement.specifiers) { + if (export_specifiers.has(import_specifier.local.name)) { + return null; + } + } + break; + } + case 'ExportNamedDeclaration': + case 'VariableDeclaration': + case 'FunctionDeclaration': + case 'ClassDeclaration': { + const declaration = + statement.type === 'ExportNamedDeclaration' ? statement.declaration : statement; + + if (!declaration) { + break; + } + + // class and function declarations + if (declaration.type !== 'VariableDeclaration') { + if (export_specifiers.has(declaration.id.name)) { + return null; + } + break; + } + + for (const variable_declarator of declaration.declarations) { + if ( + variable_declarator.id.type !== 'Identifier' || + !export_specifiers.has(variable_declarator.id.name) + ) { + continue; + } + + if (variable_declarator.init?.type === 'Literal') { + page_options.set( + /** @type {string} */ (export_specifiers.get(variable_declarator.id.name)), + variable_declarator.init.value + ); + export_specifiers.delete(variable_declarator.id.name); + continue; + } + + // Special case: We only want to know that 'load' is exported (in a way that doesn't cause truthy checks in other places to trigger) + if (variable_declarator.id.name === 'load') { + page_options.set('load', null); + export_specifiers.delete('load'); + continue; + } + + // references a declaration we can't easily evaluate statically + return null; + } + break; + } + } + } + + // there were some export specifiers that we couldn't resolve + if (export_specifiers.size) { + return null; + } + continue; + } + + if (!statement.declaration) { + continue; + } + + // class and function declarations + if (statement.declaration.type !== 'VariableDeclaration') { + if (valid_page_options.has(statement.declaration.id.name)) { + // Special case: We only want to know that 'load' is exported (in a way that doesn't cause truthy checks in other places to trigger) + if (statement.declaration.id.name === 'load') { + page_options.set('load', null); + } else { + return null; + } + } + continue; + } + + for (const declaration of statement.declaration.declarations) { + if (declaration.id.type !== 'Identifier') { + return null; + } + + if (!valid_page_options.has(declaration.id.name)) { + continue; + } + + if (declaration.init?.type === 'Literal') { + page_options.set(declaration.id.name, declaration.init.value); + continue; + } + + // Special case: We only want to know that 'load' is exported (in a way that doesn't cause truthy checks in other places to trigger) + if (declaration.id.name === 'load') { + page_options.set('load', null); + continue; + } + + // references a declaration we can't easily evaluate statically + return null; + } + } + + return Object.fromEntries(page_options); + } catch (error) { + if (error instanceof Error) { + error.message = `Failed to statically analyse page options for ${filename}. ${error.message}`; + } + throw error; + } +} + +/** + * @param {import('acorn').Identifier | import('acorn').Literal} node + * @returns {string} + */ +function get_name(node) { + return node.type === 'Identifier' ? node.name : /** @type {string} */ (node.value); +} + +/** + * Reads and statically analyses a file for page options + * @param {string} filepath + * @returns {PageOptions | null} Returns the page options for the file or `null` if unanalysable + */ +export function get_page_options(filepath) { + try { + const input = read(filepath); + const page_options = statically_analyse_page_options(filepath, input); + if (page_options === null) { + return null; + } + + return page_options; + } catch { + return null; + } +} + +export function create_node_analyser() { + const static_exports = new Map(); + + /** + * @param {string | undefined} key + * @param {PageOptions | null} page_options + */ + const cache = (key, page_options) => { + if (key) static_exports.set(key, { page_options, children: [] }); + }; + + /** + * Computes the final page options (may include load function as `load: null`; special case) for a node (if possible). Otherwise, returns `null`. + * @param {import('types').PageNode} node + * @returns {PageOptions | null} + */ + const crawl = (node) => { + const key = node.universal || node.server; + if (key && static_exports.has(key)) { + return { ...static_exports.get(key)?.page_options }; + } + + /** @type {PageOptions} */ + let page_options = {}; + + if (node.parent) { + const parent_options = crawl(node.parent); + + const parent_key = node.parent.universal || node.parent.server; + if (key && parent_key) { + static_exports.get(parent_key)?.children.push(key); + } + + if (parent_options === null) { + // if the parent cannot be analysed, we can't know what page options + // the child node inherits, so we also mark it as unanalysable + cache(key, null); + return null; + } + + page_options = { ...parent_options }; + } + + if (node.server) { + const server_page_options = get_page_options(node.server); + if (server_page_options === null) { + cache(key, null); + return null; + } + page_options = { ...page_options, ...server_page_options }; + } + + if (node.universal) { + const universal_page_options = get_page_options(node.universal); + if (universal_page_options === null) { + cache(key, null); + return null; + } + page_options = { ...page_options, ...universal_page_options }; + } + + cache(key, page_options); + + return page_options; + }; + + return { + get_page_options: crawl + }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/static_analysis/utils.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/static_analysis/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..c39cc064d8be8356e236c4a06b2c2a2fb5b728fa --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/exports/vite/static_analysis/utils.js @@ -0,0 +1,118 @@ +/** + * Check if content has children rendering (slot, @render, or children prop forwarding) + * @param {string} content - The markup content + * @param {boolean} is_svelte_5_plus - Whether the project uses Svelte 5+ + * @returns {boolean} + */ +export function has_children(content, is_svelte_5_plus) { + return ( + content.includes('') { + in_html_comment = false; + i += 2; // Skip the '-->' part + continue; + } + + // If we're in any comment, skip processing + if (in_single_line_comment || in_multi_line_comment || in_html_comment) { + continue; + } + + // Handle escape sequences in strings + if ((in_single_quote || in_double_quote || in_template_literal) && char === '\\') { + i++; // Skip the escaped character + continue; + } + + // Handle string boundaries + if (!in_double_quote && !in_template_literal && char === "'") { + in_single_quote = !in_single_quote; + continue; + } + + if (!in_single_quote && !in_template_literal && char === '"') { + in_double_quote = !in_double_quote; + continue; + } + + if (!in_single_quote && !in_double_quote && char === '`') { + in_template_literal = !in_template_literal; + continue; + } + + // If we're inside any string, don't process comment delimiters + if (in_single_quote || in_double_quote || in_template_literal) { + continue; + } + + // Check for comment starts + if (next_two === '//') { + in_single_line_comment = true; + i++; // Skip the second '/' + continue; + } + + if (next_two === '/*') { + in_multi_line_comment = true; + i++; // Skip the '*' + continue; + } + + if (next_four === ' + * + * + *

Currently at {page.url.pathname}

+ * + * {#if page.error} + * Problem detected + * {:else} + * All systems operational + * {/if} + * ``` + * + * Changes to `page` are available exclusively with runes. (The legacy reactivity syntax will not reflect any changes) + * + * ```svelte + * + * + * ``` + * + * On the server, values can only be read during rendering (in other words _not_ in e.g. `load` functions). In the browser, the values can be read at any time. + * + * @type {import('@sveltejs/kit').Page} + */ +export const page = BROWSER ? client_page : server_page; + +/** + * A read-only object representing an in-progress navigation, with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties. + * Values are `null` when no navigation is occurring, or during server rendering. + * @type {import('@sveltejs/kit').Navigation | { from: null, to: null, type: null, willUnload: null, delta: null, complete: null }} + */ +// @ts-expect-error +export const navigating = BROWSER ? client_navigating : server_navigating; + +/** + * A read-only reactive value that's initially `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update `current` to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling. + * @type {{ get current(): boolean; check(): Promise; }} + */ +export const updated = BROWSER ? client_updated : server_updated; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/app/state/server.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/app/state/server.js new file mode 100644 index 0000000000000000000000000000000000000000..0be169314fc4d88b5b088c4cf759fa0a5c1f5cc8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/app/state/server.js @@ -0,0 +1,63 @@ +import { DEV } from 'esm-env'; +import { getContext } from 'svelte'; + +function context() { + return getContext('__request__'); +} + +/** @param {string} name */ +function context_dev(name) { + try { + return context(); + } catch { + throw new Error( + `Can only read '${name}' on the server during rendering (not in e.g. \`load\` functions), as it is bound to the current request via component context. This prevents state from leaking between users. ` + + 'For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server' + ); + } +} + +export const page = { + get data() { + return (DEV ? context_dev('page.data') : context()).page.data; + }, + get error() { + return (DEV ? context_dev('page.error') : context()).page.error; + }, + get form() { + return (DEV ? context_dev('page.form') : context()).page.form; + }, + get params() { + return (DEV ? context_dev('page.params') : context()).page.params; + }, + get route() { + return (DEV ? context_dev('page.route') : context()).page.route; + }, + get state() { + return (DEV ? context_dev('page.state') : context()).page.state; + }, + get status() { + return (DEV ? context_dev('page.status') : context()).page.status; + }, + get url() { + return (DEV ? context_dev('page.url') : context()).page.url; + } +}; + +export const navigating = { + from: null, + to: null, + type: null, + willUnload: null, + delta: null, + complete: null +}; + +export const updated = { + get current() { + return false; + }, + check: () => { + throw new Error('Can only call updated.check() in the browser'); + } +}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/app/stores.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/app/stores.js new file mode 100644 index 0000000000000000000000000000000000000000..11e84fee7dbd5eec000f178cd707dbf1b734886e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/app/stores.js @@ -0,0 +1,101 @@ +import { getContext } from 'svelte'; +import { BROWSER, DEV } from 'esm-env'; +import { stores as browser_stores } from '../client/client.js'; + +/** + * A function that returns all of the contextual stores. On the server, this must be called during component initialization. + * Only use this if you need to defer store subscription until after the component has mounted, for some reason. + * + * @deprecated Use `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + */ +export const getStores = () => { + const stores = BROWSER ? browser_stores : getContext('__svelte__'); + + return { + /** @type {typeof page} */ + page: { + subscribe: stores.page.subscribe + }, + /** @type {typeof navigating} */ + navigating: { + subscribe: stores.navigating.subscribe + }, + /** @type {typeof updated} */ + updated: stores.updated + }; +}; + +/** + * A readable store whose value contains page data. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `page` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * @type {import('svelte/store').Readable} + */ +export const page = { + subscribe(fn) { + const store = DEV ? get_store('page') : getStores().page; + return store.subscribe(fn); + } +}; + +/** + * A readable store. + * When navigating starts, its value is a `Navigation` object with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties. + * When navigating finishes, its value reverts to `null`. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `navigating` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * @type {import('svelte/store').Readable} + */ +export const navigating = { + subscribe(fn) { + const store = DEV ? get_store('navigating') : getStores().navigating; + return store.subscribe(fn); + } +}; + +/** + * A readable store whose initial value is `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update the store value to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `updated` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * @type {import('svelte/store').Readable & { check(): Promise }} + */ +export const updated = { + subscribe(fn) { + const store = DEV ? get_store('updated') : getStores().updated; + + if (BROWSER) { + updated.check = store.check; + } + + return store.subscribe(fn); + }, + check: () => { + throw new Error( + BROWSER + ? 'Cannot check updated store before subscribing' + : 'Can only check updated store in browser' + ); + } +}; + +/** + * @template {keyof ReturnType} Name + * @param {Name} name + * @returns {ReturnType[Name]} + */ +function get_store(name) { + try { + return getStores()[name]; + } catch { + throw new Error( + `Cannot subscribe to '${name}' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.` + + 'For more information, see https://svelte.dev/docs/kit/state-management#avoid-shared-state-on-the-server' + ); + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/bundle.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/bundle.js new file mode 100644 index 0000000000000000000000000000000000000000..f375d02e83551c4cd980e4acbaccffded634de4b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/bundle.js @@ -0,0 +1,17 @@ +/* if `bundleStrategy` is 'single' or 'inline', this file is used as the entry point */ + +import * as kit from './entry.js'; + +// @ts-expect-error +import * as app from '__sveltekit/manifest'; + +/** + * + * @param {HTMLElement} element + * @param {import('./types.js').HydrateOptions} options + */ +export function start(element, options) { + void kit.start(app, element, options); +} + +export { app }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/client.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/client.js new file mode 100644 index 0000000000000000000000000000000000000000..1f4985fb4d26ad4300b4b6df989beb9f5838cf49 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/client.js @@ -0,0 +1,3366 @@ +/** @import { RemoteQueryCacheEntry } from './remote-functions/query.svelte.js' */ +/** @import { RemoteLiveQueryCacheEntry } from './remote-functions/query-live.svelte.js' */ +import { BROWSER, DEV } from 'esm-env'; +import * as svelte from 'svelte'; +import { HttpError, Redirect, SvelteKitError } from '@sveltejs/kit/internal'; +const { onMount, tick } = svelte; +// Svelte 4 and under don't have `untrack`, so we have to fallback if `untrack` is not exported +const untrack = svelte.untrack ?? ((value) => value()); +import { + decode_params, + decode_pathname, + strip_hash, + make_trackable, + normalize_path +} from '../../utils/url.js'; +import { dev_fetch, initial_fetch, lock_fetch, subsequent_fetch, unlock_fetch } from './fetcher.js'; +import { parse, parse_server_route } from './parse.js'; +import * as storage from './session-storage.js'; +import { + find_anchor, + resolve_url, + get_link_info, + get_router_options, + is_external_url, + origin, + scroll_state, + notifiable_store, + create_updated_store, + load_css +} from './utils.js'; +import { base } from '$app/paths'; +import * as devalue from 'devalue'; +import { + HISTORY_INDEX, + NAVIGATION_INDEX, + PRELOAD_PRIORITIES, + SCROLL_KEY, + STATES_KEY, + SNAPSHOT_KEY, + PAGE_URL_KEY +} from './constants.js'; +import { validate_page_exports } from '../../utils/exports.js'; +import { noop } from '../../utils/functions.js'; +import { compact } from '../../utils/array.js'; +import { + INVALIDATED_PARAM, + TRAILING_SLASH_PARAM, + create_remote_key, + validate_depends, + validate_load_response +} from '../shared.js'; +import { get_message, get_status } from '../../utils/error.js'; +import { writable } from 'svelte/store'; +import { page, update, navigating } from './state.svelte.js'; +import { add_data_suffix, add_resolution_suffix } from '../pathname.js'; +import { noop_span } from '../telemetry/noop.js'; +import { read_ndjson } from './ndjson.js'; + +export { load_css }; +const ICON_REL_ATTRIBUTES = new Set(['icon', 'shortcut icon', 'apple-touch-icon']); + +let errored = false; +/** + * Set via transformError, reset and read at the end of navigate. + * Necessary because a navigation might succeed loading but during rendering + * an error occurs, at which point the navigation result needs to be overridden with the error result. + * TODO this is all very hacky, rethink for SvelteKit 3 where we can assume Svelte 5 and do an overhaul of client.js + * @type {{ error: App.Error, status: number } | null} + */ +let rendering_error = null; + +// We track the scroll position associated with each history entry in sessionStorage, +// rather than on history.state itself, because when navigation is driven by +// popstate it's too late to update the scroll position associated with the +// state we're navigating from +/** + * history index -> { x, y } + * @type {Record} + */ +const scroll_positions = storage.get(SCROLL_KEY) ?? {}; + +/** + * navigation index -> any + * @type {Record} + */ +const snapshots = storage.get(SNAPSHOT_KEY) ?? {}; + +if (DEV && BROWSER) { + let warned = false; + + const current_module_url = import.meta.url.split('?')[0]; // remove query params that vite adds to the URL when it is loaded from node_modules + + const warn = () => { + if (warned) return; + + // Rather than saving a pointer to the original history methods, which would prevent monkeypatching by other libs, + // inspect the stack trace to see if we're being called from within SvelteKit. + let stack = new Error().stack?.split('\n'); + if (!stack) return; + if (!stack[0].includes('https:') && !stack[0].includes('http:')) stack = stack.slice(1); // Chrome includes the error message in the stack + stack = stack.slice(2); // remove `warn` and the place where `warn` was called + // Can be falsy if was called directly from an anonymous function + if (stack[0]?.includes(current_module_url)) return; + + warned = true; + + console.warn( + "Avoid using `history.pushState(...)` and `history.replaceState(...)` as these will conflict with SvelteKit's router. Use the `pushState` and `replaceState` imports from `$app/navigation` instead." + ); + }; + + const push_state = history.pushState; + history.pushState = (...args) => { + warn(); + return push_state.apply(history, args); + }; + + const replace_state = history.replaceState; + history.replaceState = (...args) => { + warn(); + return replace_state.apply(history, args); + }; +} + +export const stores = { + url: /* @__PURE__ */ notifiable_store({}), + page: /* @__PURE__ */ notifiable_store({}), + navigating: /* @__PURE__ */ writable( + /** @type {import('@sveltejs/kit').Navigation | null} */ (null) + ), + updated: /* @__PURE__ */ create_updated_store() +}; + +/** @param {number} index */ +function update_scroll_positions(index) { + scroll_positions[index] = scroll_state(); +} + +/** + * @param {number} current_history_index + * @param {number} current_navigation_index + */ +function clear_onward_history(current_history_index, current_navigation_index) { + // if we navigated back, then pushed a new state, we can + // release memory by pruning the scroll/snapshot lookup + let i = current_history_index + 1; + while (scroll_positions[i]) { + delete scroll_positions[i]; + i += 1; + } + + i = current_navigation_index + 1; + while (snapshots[i]) { + delete snapshots[i]; + i += 1; + } +} + +/** + * Loads `href` the old-fashioned way, with a full page reload. + * Returns a `Promise` that never resolves (to prevent any + * subsequent work, e.g. history manipulation, from happening) + * @param {URL} url + * @param {boolean} [replace] If `true`, will replace the current `history` entry rather than creating a new one with `pushState` + */ +function native_navigation(url, replace = false) { + if (replace) { + location.replace(url.href); + } else { + location.href = url.href; + } + return new Promise(noop); +} + +/** + * Checks whether a service worker is registered, and if it is, + * tries to update it. + */ +async function update_service_worker() { + if ('serviceWorker' in navigator) { + const registration = await navigator.serviceWorker.getRegistration(base || '/'); + if (registration) { + await registration.update(); + } + } +} + +/** @type {import('types').CSRRoute[]} All routes of the app. Only available when kit.router.resolution=client */ +let routes; +/** @type {import('types').CSRPageNodeLoader} */ +let default_layout_loader; +/** @type {import('types').CSRPageNodeLoader} */ +let default_error_loader; +/** @type {HTMLElement} */ +let container; +/** @type {HTMLElement} */ +let target; + +/** @type {import('./types.js').SvelteKitApp} */ +export let app; + +/** + * Data that was serialized during SSR for queries/forms/commands. + * This is cleared before client-side loads run. + * @type {Record} + */ +export let query_responses = {}; + +/** + * Data that was serialized during SSR for prerender functions. + * This persists across client-side navigations. + * @type {Record} + */ +export let prerender_responses = {}; + +/** @type {Array<((url: URL) => boolean)>} */ +const invalidated = []; + +/** + * An array of the `+layout.svelte` and `+page.svelte` component instances + * that currently live on the page — used for capturing and restoring snapshots. + * It's updated/manipulated through `bind:this` in `Root.svelte`. + * @type {import('svelte').SvelteComponent[]} + */ +const components = []; + +/** @type {{id: string, token: {}, promise: Promise, fork: Promise | null} | null} */ +let load_cache = null; + +function discard_load_cache() { + void load_cache?.fork?.then((f) => f?.discard()); + load_cache = null; +} + +/** + * @type {Map>} + * Cache for client-side rerouting, since it could contain async calls which we want to + * avoid running multiple times which would slow down navigations (e.g. else preloading + * wouldn't help because on navigation it would be called again). Since `reroute` should be + * a pure function (i.e. always return the same) value it's safe to cache across navigations. + * The server reroute calls don't need to be cached because they are called using `import(...)` + * which is cached per the JS spec. + */ +const reroute_cache = new Map(); + +/** + * Note on before_navigate_callbacks, on_navigate_callbacks and after_navigate_callbacks: + * do not re-assign as some closures keep references to these Sets + */ +/** @type {Set<(navigation: import('@sveltejs/kit').BeforeNavigate) => void>} */ +const before_navigate_callbacks = new Set(); + +/** @type {Set<(navigation: import('@sveltejs/kit').OnNavigate) => import('types').MaybePromise<(() => void) | void>>} */ +const on_navigate_callbacks = new Set(); + +/** @type {Set<(navigation: import('@sveltejs/kit').AfterNavigate) => void>} */ +const after_navigate_callbacks = new Set(); + +/** @type {import('./types.js').NavigationState & { nav: import('@sveltejs/kit').NavigationEvent }} */ +let current = { + branch: [], + error: null, + // @ts-ignore - we need the initial value to be null + url: null, + // @ts-ignore - we need the initial value to be null + nav: null +}; + +/** this being true means we SSR'd */ +let hydrated = false; +let started = false; +let autoscroll = true; +let updating = false; +let is_navigating = false; +let hash_navigating = false; +/** True as soon as there happened one client-side navigation (excluding the SvelteKit-initialized initial one when in SPA mode) */ +let has_navigated = false; + +let force_invalidation = false; + +/** @type {import('svelte').SvelteComponent} */ +let root; + +/** @type {number} keeping track of the history index in order to prevent popstate navigation events if needed */ +let current_history_index; + +/** @type {number} */ +let current_navigation_index; + +/** @type {{}} */ +let token; + +/** + * A set of tokens which are associated to current preloads. + * If a preload becomes a real navigation, it's removed from the set. + * If a preload token is in the set and the preload errors, the error + * handling logic (for example reloading) is skipped. + */ +const preload_tokens = new Set(); + +/** @type {Promise | null} */ +export let pending_invalidate; + +/** + * @type {Map>>} + * A map of query id -> payload -> query internals for all active queries. + */ +export const query_map = new Map(); + +/** + * @type {Map>>} + * A map of id -> payload -> live query internals for all active queries. + */ +export const live_query_map = new Map(); + +/** + * @param {import('./types.js').SvelteKitApp} _app + * @param {HTMLElement} _target + * @param {Parameters[1]} [hydrate] + */ +export async function start(_app, _target, hydrate) { + if (DEV && _target === document.body) { + console.warn( + 'Placing %sveltekit.body% directly inside is not recommended, as your app may break for users who have certain browser extensions installed.\n\nConsider wrapping it in an element:\n\n
\n %sveltekit.body%\n
' + ); + } + + if (__SVELTEKIT_PAYLOAD__) { + query_responses = __SVELTEKIT_PAYLOAD__.query ?? {}; + prerender_responses = __SVELTEKIT_PAYLOAD__.prerender ?? {}; + } + + // detect basic auth credentials in the current URL + // https://github.com/sveltejs/kit/pull/11179 + // if so, refresh the page without credentials + if (document.URL !== location.href) { + // eslint-disable-next-line no-self-assign + location.href = location.href; + } + + app = _app; + + await _app.hooks.init?.(); + + routes = __SVELTEKIT_CLIENT_ROUTING__ ? parse(_app) : []; + container = __SVELTEKIT_EMBEDDED__ ? _target : document.documentElement; + target = _target; + + // we import the root layout/error nodes eagerly, so that + // connectivity errors after initialisation don't nuke the app + default_layout_loader = _app.nodes[0]; + default_error_loader = _app.nodes[1]; + void default_layout_loader(); + void default_error_loader(); + + current_history_index = history.state?.[HISTORY_INDEX]; + current_navigation_index = history.state?.[NAVIGATION_INDEX]; + + if (!current_history_index) { + // we use Date.now() as an offset so that cross-document navigations + // within the app don't result in data loss + current_history_index = current_navigation_index = Date.now(); + + // create initial history entry, so we can return here + history.replaceState( + { + ...history.state, + [HISTORY_INDEX]: current_history_index, + [NAVIGATION_INDEX]: current_navigation_index + }, + '' + ); + } + + // if we reload the page, or Cmd-Shift-T back to it, + // recover scroll position + const scroll = scroll_positions[current_history_index]; + function restore_scroll() { + if (scroll) { + history.scrollRestoration = 'manual'; + scrollTo(scroll.x, scroll.y); + } + } + + if (hydrate) { + restore_scroll(); + + await _hydrate(target, hydrate); + } else { + await navigate({ + type: 'enter', + url: resolve_url(app.hash ? decode_hash(new URL(location.href)) : location.href), + replace_state: true + }); + + restore_scroll(); + } + + _start_router(); +} + +async function _invalidate(include_load_functions = true, reset_page_state = true) { + // Accept all invalidations as they come, don't swallow any while another invalidation + // is running because subsequent invalidations may make earlier ones outdated, + // but batch multiple synchronous invalidations. + await (pending_invalidate ||= Promise.resolve()); + if (!pending_invalidate) return; + pending_invalidate = null; + + const nav_token = (token = {}); + const intent = await get_navigation_intent(current.url, true); + + // Clear preload, it might be affected by the invalidation. + // Also solves an edge case where a preload is triggered, the navigation for it + // was then triggered and is still running while the invalidation kicks in, + // at which point the invalidation should take over and "win". + discard_load_cache(); + + // Rerun queries + /** @type {Map>} */ + const live_query_reconnects = new Map(); + if (force_invalidation) { + for (const entries of query_map.values()) { + for (const { resource } of entries.values()) { + void resource.refresh(); + } + } + + for (const [query_id, entries] of live_query_map) { + for (const [payload, { resource }] of entries) { + const key = create_remote_key(query_id, payload); + const promise = resource.reconnect(); + promise.catch(noop); + live_query_reconnects.set(key, promise); + } + } + } + + if (include_load_functions) { + const prev_state = page.state; + const navigation_result = intent && (await load_route(intent)); + if (!navigation_result || nav_token !== token) return; + + if (navigation_result.type === 'redirect') { + return _goto( + new URL(navigation_result.location, current.url).href, + { replaceState: true }, + 1, + nav_token + ); + } + + // This is a bit hacky but allows us not having to pass that boolean around, making things harder to reason about + if (!reset_page_state) { + navigation_result.props.page.state = prev_state; + } + update(navigation_result.props.page); + current = { ...navigation_result.state, nav: current.nav }; + reset_invalidation(); + root.$set(navigation_result.props); + } else { + reset_invalidation(); + } + + // only wait for promises that are connected to queries that still exist + /** @type {Promise[]} */ + const promises = []; + for (const entries of query_map.values()) { + for (const { resource } of entries.values()) { + promises.push(resource); + } + } + for (const [query_id, entries] of live_query_map) { + for (const payload of entries.keys()) { + const key = create_remote_key(query_id, payload); + const promise = live_query_reconnects.get(key); + if (promise) { + promises.push(promise); + } + } + } + + // Don't use allSettled yet because it's too new + await Promise.all(promises).catch(noop); +} + +function reset_invalidation() { + invalidated.length = 0; + force_invalidation = false; +} + +/** @param {number} index */ +function capture_snapshot(index) { + if (components.some((c) => c?.snapshot)) { + snapshots[index] = components.map((c) => c?.snapshot?.capture()); + } +} + +/** @param {number} index */ +function restore_snapshot(index) { + snapshots[index]?.forEach((value, i) => { + components[i]?.snapshot?.restore(value); + }); +} + +function persist_state() { + update_scroll_positions(current_history_index); + storage.set(SCROLL_KEY, scroll_positions); + + capture_snapshot(current_navigation_index); + storage.set(SNAPSHOT_KEY, snapshots); +} + +/** + * @param {string | URL} url + * @param {{ replaceState?: boolean; noScroll?: boolean; keepFocus?: boolean; invalidateAll?: boolean; invalidate?: Array boolean)>; state?: Record }} options + * @param {number} redirect_count + * @param {{}} [nav_token] + */ +export async function _goto(url, options, redirect_count, nav_token) { + /** @type {Set} */ + let query_keys; + /** @type {Set} */ + let live_query_keys; + + // Clear preload cache when invalidateAll is true to ensure fresh data + // after form submissions or explicit invalidations + if (options.invalidateAll) { + discard_load_cache(); + } + + await navigate({ + type: 'goto', + url: resolve_url(url), + keepfocus: options.keepFocus, + noscroll: options.noScroll, + replace_state: options.replaceState, + state: options.state, + redirect_count, + nav_token, + accept: () => { + if (options.invalidateAll) { + force_invalidation = true; + query_keys = new Set(); + for (const [id, entries] of query_map) { + for (const payload of entries.keys()) { + query_keys.add(create_remote_key(id, payload)); + } + } + live_query_keys = new Set(); + for (const [id, entries] of live_query_map) { + for (const payload of entries.keys()) { + live_query_keys.add(create_remote_key(id, payload)); + } + } + } + + if (options.invalidate) { + options.invalidate.forEach(push_invalidated); + } + } + }); + + if (options.invalidateAll) { + // TODO the ticks shouldn't be necessary, something inside Svelte itself is buggy + // when a query in a layout that still exists after page change is refreshed earlier than this + void svelte + .tick() + .then(svelte.tick) + .then(() => { + for (const [id, entries] of query_map) { + for (const [payload, { resource }] of entries) { + if (query_keys?.has(create_remote_key(id, payload))) { + void resource.refresh(); + } + } + } + for (const [id, entries] of live_query_map) { + for (const [payload, { resource }] of entries) { + if (live_query_keys?.has(create_remote_key(id, payload))) { + void resource.reconnect(); + } + } + } + }); + } +} + +/** @param {import('./types.js').NavigationIntent} intent */ +async function _preload_data(intent) { + // Reuse the existing pending preload if it's for the same navigation. + // Prevents an edge case where same preload is triggered multiple times, + // then a later one is becoming the real navigation and the preload tokens + // get out of sync. + if (intent.id !== load_cache?.id) { + discard_load_cache(); + + const preload = {}; + preload_tokens.add(preload); + load_cache = { + id: intent.id, + token: preload, + promise: load_route({ ...intent, preload }).then((result) => { + preload_tokens.delete(preload); + if (result.type === 'loaded' && result.state.error) { + // Don't cache errors, because they might be transient + discard_load_cache(); + } + return result; + }), + fork: null + }; + + if (__SVELTEKIT_FORK_PRELOADS__ && svelte.fork) { + const lc = load_cache; + + lc.fork = lc.promise.then((result) => { + // if load_cache was discarded before load_cache.promise could + // resolve, bail rather than creating an orphan fork + if (lc === load_cache && result.type === 'loaded') { + try { + return svelte.fork(() => { + root.$set(result.props); + update(result.props.page); + }); + } catch { + // if it errors, it's because the experimental flag isn't enabled in Svelte + } + } + + return null; + }); + } + } + + return load_cache.promise; +} + +/** + * @param {URL} url + * @returns {Promise} + */ +async function _preload_code(url) { + const route = (await get_navigation_intent(url, false))?.route; + + if (route) { + await Promise.all( + /** @type {[has_server_load: boolean, node_loader: import('types').CSRPageNodeLoader][]} */ ( + [...route.layouts, route.leaf].filter(Boolean) + ).map((load) => load[1]()) + ); + } +} + +/** + * @param {import('./types.js').NavigationFinished} result + * @param {HTMLElement} target + * @param {boolean} hydrate + */ +async function initialize(result, target, hydrate) { + if (DEV && result.state.error && document.querySelector('vite-error-overlay')) return; + + /** @type {import('@sveltejs/kit').NavigationEvent} */ + const nav = { + params: current.params, + route: { id: current.route?.id ?? null }, + url: new URL(location.href) + }; + + current = { + ...result.state, + nav + }; + + const style = document.querySelector('style[data-sveltekit]'); + if (style) style.remove(); + + update(/** @type {import('@sveltejs/kit').Page} */ (result.props.page)); + + root = new app.root({ + target, + props: { ...result.props, stores, components }, + hydrate, + // @ts-ignore Svelte 5 specific: asynchronously instantiate the component, i.e. don't call flushSync + sync: false, + // @ts-ignore Svelte 5 specific: transformError allows to transform errors before they are passed to boundaries + transformError: __SVELTEKIT_EXPERIMENTAL_USE_TRANSFORM_ERROR__ + ? /** @param {unknown} e */ async (e) => { + const error = await handle_error(e, current.nav); + rendering_error = { error, status: get_status(e) }; + page.error = error; + page.status = rendering_error.status; + return error; + } + : undefined + }); + + // Wait for a microtask in case svelte experimental async is enabled, + // which causes component script blocks to run asynchronously + void (await Promise.resolve()); + + restore_snapshot(current_navigation_index); + + if (hydrate) { + /** @type {import('@sveltejs/kit').AfterNavigate} */ + const navigation = { + from: null, + to: { + ...nav, + scroll: scroll_positions[current_history_index] ?? scroll_state() + }, + willUnload: false, + type: 'enter', + complete: Promise.resolve() + }; + + after_navigate_callbacks.forEach((fn) => fn(navigation)); + } + + started = true; +} + +/** + * + * @param {{ + * url: URL; + * params: Record; + * branch: Array; + * errors?: Array; + * status: number; + * error: App.Error | null; + * route: import('types').CSRRoute | null; + * form?: Record | null; + * }} opts + */ +async function get_navigation_result_from_branch({ + url, + params, + branch, + errors, + status, + error, + route, + form +}) { + /** @type {import('types').TrailingSlash} */ + let slash = 'never'; + + // if `paths.base === '/a/b/c`, then the root route is always `/a/b/c/`, regardless of + // the `trailingSlash` route option, so that relative paths to JS and CSS work + if (base && (url.pathname === base || url.pathname === base + '/')) { + slash = 'always'; + } else { + for (const node of branch) { + if (node?.slash !== undefined) slash = node.slash; + } + } + + url.pathname = normalize_path(url.pathname, slash); + // eslint-disable-next-line no-self-assign + url.search = url.search; // turn `/?` into `/` + + /** @type {import('./types.js').NavigationFinished} */ + const result = { + type: 'loaded', + state: { + url, + params, + branch, + error, + route + }, + props: { + // @ts-ignore Somehow it's getting SvelteComponent and SvelteComponentDev mixed up + constructors: compact(branch).map((branch_node) => branch_node.node.component), + page: clone_page(page) + } + }; + + if (errors && __SVELTEKIT_EXPERIMENTAL_USE_TRANSFORM_ERROR__) { + let last_idx = -1; + result.props.errors = await Promise.all( + // eslint-disable-next-line @typescript-eslint/await-thenable + branch + .map((b, i) => { + if (i === 0) return undefined; // root layout wraps root error component, not the other way around + if (!b) return null; + + i--; + // Find the closest error component up to the previous branch + while (i > last_idx + 1 && !errors[i]) i -= 1; + last_idx = i; + return errors[i]?.() + .then((e) => e.component) + .catch(() => undefined); + }) + // filter out indexes where there was no branch, but keep indexes where there was a branch but no error component + .filter((e) => e !== null) + ); + } + + if (error && __SVELTEKIT_EXPERIMENTAL_USE_TRANSFORM_ERROR__) { + result.props.error = error; + } + + if (form !== undefined) { + result.props.form = form; + } + + let data = {}; + let data_changed = !page; + + let p = 0; + + for (let i = 0; i < Math.max(branch.length, current.branch.length); i += 1) { + const node = branch[i]; + const prev = current.branch[i]; + + if (node?.data !== prev?.data) data_changed = true; + if (!node) continue; + + data = { ...data, ...node.data }; + + // Only set props if the node actually updated. This prevents needless rerenders. + if (data_changed) { + result.props[`data_${p}`] = data; + } + + p += 1; + } + + const page_changed = + !current.url || + url.href !== current.url.href || + current.error !== error || + (form !== undefined && form !== page.form) || + data_changed; + + if (page_changed) { + result.props.page = { + error, + params, + route: { + id: route?.id ?? null + }, + state: {}, + status, + url: new URL(url), + form: form ?? null, + // The whole page store is updated, but this way the object reference stays the same + data: data_changed ? data : page.data + }; + } + + return result; +} + +/** + * Call the universal load function of the given node, if it exists. + * + * @param {{ + * loader: import('types').CSRPageNodeLoader; + * parent: () => Promise>; + * url: URL; + * params: Record; + * route: { id: string | null }; + * server_data_node: import('./types.js').DataNode | null; + * }} options + * @returns {Promise} + */ +async function load_node({ loader, parent, url, params, route, server_data_node }) { + /** @type {Record | null} */ + let data = null; + + let is_tracking = true; + + /** @type {import('types').Uses} */ + const uses = { + dependencies: new Set(), + params: new Set(), + parent: false, + route: false, + url: false, + search_params: new Set() + }; + + const node = await loader(); + + if (DEV) { + validate_page_exports(node.universal); + + if (node.universal && app.hash) { + const options = Object.keys(node.universal).filter((o) => o !== 'load'); + + if (options.length > 0) { + throw new Error( + `Page options are ignored when \`router.type === 'hash'\` (${route.id} has ${options + .filter((o) => o !== 'load') + .map((o) => `'${o}'`) + .join(', ')})` + ); + } + } + } + + if (__SVELTEKIT_HAS_UNIVERSAL_LOAD__ && node.universal?.load) { + /** @param {string[]} deps */ + function depends(...deps) { + for (const dep of deps) { + if (DEV) validate_depends(/** @type {string} */ (route.id), dep); + + const { href } = new URL(dep, url); + uses.dependencies.add(href); + } + } + + /** @type {import('@sveltejs/kit').LoadEvent} */ + const load_input = { + tracing: { enabled: false, root: noop_span, current: noop_span }, + route: new Proxy(route, { + get: (target, key) => { + if (is_tracking) { + uses.route = true; + } + return target[/** @type {'id'} */ (key)]; + } + }), + params: new Proxy(params, { + get: (target, key) => { + if (is_tracking) { + uses.params.add(/** @type {string} */ (key)); + } + return target[/** @type {string} */ (key)]; + } + }), + data: server_data_node?.data ?? null, + url: make_trackable( + url, + () => { + if (is_tracking) { + uses.url = true; + } + }, + (param) => { + if (is_tracking) { + uses.search_params.add(param); + } + }, + app.hash + ), + async fetch(resource, init) { + if (resource instanceof Request) { + // we're not allowed to modify the received `Request` object, so in order + // to fixup relative urls we create a new equivalent `init` object instead + init = { + // the request body must be consumed in memory until browsers + // implement streaming request bodies and/or the body getter + body: + resource.method === 'GET' || resource.method === 'HEAD' + ? undefined + : await resource.blob(), + cache: resource.cache, + credentials: resource.credentials, + // the server sets headers to `undefined` if there are no headers but + // the client defaults to an empty Headers object in the Request object. + // To keep the two values in sync, we explicitly set the headers to `undefined`. + // Also, not sure why, but sometimes 0 is evaluated as truthy so we need to + // explicitly compare the headers length to a number here + headers: [...resource.headers].length > 0 ? resource?.headers : undefined, + integrity: resource.integrity, + keepalive: resource.keepalive, + method: resource.method, + mode: resource.mode, + redirect: resource.redirect, + referrer: resource.referrer, + referrerPolicy: resource.referrerPolicy, + signal: resource.signal, + ...init + }; + } + + const { resolved, promise } = resolve_fetch_url(resource, init, url); + + if (is_tracking) { + depends(resolved.href); + } + + return promise; + }, + setHeaders: noop, + depends, + parent() { + if (is_tracking) { + uses.parent = true; + } + return parent(); + }, + untrack(fn) { + is_tracking = false; + try { + return fn(); + } finally { + is_tracking = true; + } + } + }; + + if (DEV) { + try { + lock_fetch(); + data = (await node.universal.load.call(null, load_input)) ?? null; + validate_load_response(data, `related to route '${route.id}'`); + } finally { + unlock_fetch(); + } + } else { + data = (await node.universal.load.call(null, load_input)) ?? null; + } + } + + return { + node, + loader, + server: server_data_node, + universal: node.universal?.load ? { type: 'data', data, uses } : null, + data: data ?? server_data_node?.data ?? null, + slash: node.universal?.trailingSlash ?? server_data_node?.slash + }; +} + +/** + * @param {Request | string | URL} input + * @param {RequestInit | undefined} init + * @param {URL} url + */ +function resolve_fetch_url(input, init, url) { + let requested = input instanceof Request ? input.url : input; + + // we must fixup relative urls so they are resolved from the target page + const resolved = new URL(requested, url); + + // match ssr serialized data url, which is important to find cached responses + if (resolved.origin === url.origin) { + requested = resolved.href.slice(url.origin.length); + } + + // prerendered pages may be served from any origin, so `initial_fetch` urls shouldn't be resolved + const promise = started + ? subsequent_fetch(requested, resolved.href, init) + : initial_fetch(requested, init); + + return { resolved, promise }; +} + +/** + * @param {boolean} parent_changed + * @param {boolean} route_changed + * @param {boolean} url_changed + * @param {Set} search_params_changed + * @param {import('types').Uses | undefined} uses + * @param {Record} params + */ +function has_changed( + parent_changed, + route_changed, + url_changed, + search_params_changed, + uses, + params +) { + if (force_invalidation) return true; + + if (!uses) return false; + + if (uses.parent && parent_changed) return true; + if (uses.route && route_changed) return true; + if (uses.url && url_changed) return true; + + for (const tracked_params of uses.search_params) { + if (search_params_changed.has(tracked_params)) return true; + } + + for (const param of uses.params) { + if (params[param] !== current.params[param]) return true; + } + + for (const href of uses.dependencies) { + if (invalidated.some((fn) => fn(new URL(href)))) return true; + } + + return false; +} + +/** + * @param {import('types').ServerDataNode | import('types').ServerDataSkippedNode | null} node + * @param {import('./types.js').DataNode | null} [previous] + * @returns {import('./types.js').DataNode | null} + */ +function create_data_node(node, previous) { + if (node?.type === 'data') return node; + if (node?.type === 'skip') return previous ?? null; + return null; +} + +/** + * @param {URL | null} old_url + * @param {URL} new_url + */ +function diff_search_params(old_url, new_url) { + if (!old_url) return new Set(new_url.searchParams.keys()); + + const changed = new Set([...old_url.searchParams.keys(), ...new_url.searchParams.keys()]); + + for (const key of changed) { + const old_values = old_url.searchParams.getAll(key); + const new_values = new_url.searchParams.getAll(key); + + if ( + old_values.every((value) => new_values.includes(value)) && + new_values.every((value) => old_values.includes(value)) + ) { + changed.delete(key); + } + } + + return changed; +} + +/** + * @param {Omit & { error: App.Error }} opts + * @returns {import('./types.js').NavigationFinished} + */ +function preload_error({ error, url, route, params }) { + return { + type: 'loaded', + state: { + error, + url, + route, + params, + branch: [] + }, + props: { + page: clone_page(page), + constructors: [] + } + }; +} + +/** + * @param {import('./types.js').NavigationIntent & { preload?: {} }} intent + * @returns {Promise} + */ +async function load_route({ id, invalidating, url, params, route, preload }) { + if (load_cache?.id === id) { + // the preload becomes the real navigation + preload_tokens.delete(load_cache.token); + return load_cache.promise; + } + + const { errors, layouts, leaf } = route; + + const loaders = [...layouts, leaf]; + + // preload modules to avoid waterfall, but handle rejections + // so they don't get reported to Sentry et al (we don't need + // to act on the failures at this point) + errors.forEach((loader) => loader?.().catch(noop)); + loaders.forEach((loader) => loader?.[1]().catch(noop)); + + /** @type {import('types').ServerNodesResponse | import('types').ServerRedirectNode | null} */ + let server_data = null; + const url_changed = current.url ? id !== get_page_key(current.url) : false; + const route_changed = current.route ? route.id !== current.route.id : false; + const search_params_changed = diff_search_params(current.url, url); + + let parent_invalid = false; + + if (__SVELTEKIT_HAS_SERVER_LOAD__) { + const invalid_server_nodes = loaders.map((loader, i) => { + const previous = current.branch[i]; + + const invalid = + !!loader?.[0] && + (previous?.loader !== loader[1] || + has_changed( + parent_invalid, + route_changed, + url_changed, + search_params_changed, + previous.server?.uses, + params + )); + + if (invalid) { + // For the next one + parent_invalid = true; + } + + return invalid; + }); + + if (invalid_server_nodes.some(Boolean)) { + try { + server_data = await load_data(url, invalid_server_nodes); + } catch (error) { + const handled_error = await handle_error(error, { url, params, route: { id } }); + + if (preload_tokens.has(preload)) { + return preload_error({ error: handled_error, url, params, route }); + } + + return load_root_error_page({ + status: get_status(error), + error: handled_error, + url, + route + }); + } + + if (server_data.type === 'redirect') { + return server_data; + } + } + } + + const server_data_nodes = server_data?.nodes; + + let parent_changed = false; + + const branch_promises = loaders.map(async (loader, i) => { + if (!loader) return; + + /** @type {import('./types.js').BranchNode | undefined} */ + const previous = current.branch[i]; + + const server_data_node = server_data_nodes?.[i]; + + // reuse data from previous load if it's still valid + const valid = + (!server_data_node || server_data_node.type === 'skip') && + loader[1] === previous?.loader && + !has_changed( + parent_changed, + route_changed, + url_changed, + search_params_changed, + previous.universal?.uses, + params + ); + if (valid) return previous; + + parent_changed = true; + + if (server_data_node?.type === 'error') { + // rethrow and catch below + throw server_data_node; + } + + return load_node({ + loader: loader[1], + url, + params, + route, + parent: async () => { + const data = {}; + for (let j = 0; j < i; j += 1) { + Object.assign(data, (await branch_promises[j])?.data); + } + return data; + }, + server_data_node: create_data_node( + // server_data_node is undefined if it wasn't reloaded from the server; + // and if current loader uses server data, we want to reuse previous data. + server_data_node === undefined && loader[0] ? { type: 'skip' } : (server_data_node ?? null), + loader[0] ? previous?.server : undefined + ) + }); + }); + + // if we don't do this, rejections will be unhandled + for (const p of branch_promises) p.catch(noop); + + /** @type {Array} */ + const branch = []; + + for (let i = 0; i < loaders.length; i += 1) { + if (loaders[i]) { + try { + branch.push(await branch_promises[i]); + } catch (err) { + if (err instanceof Redirect) { + return { + type: 'redirect', + location: err.location + }; + } + + if (preload_tokens.has(preload)) { + return preload_error({ + error: await handle_error(err, { params, url, route: { id: route.id } }), + url, + params, + route + }); + } + + let status = get_status(err); + /** @type {App.Error} */ + let error; + + if (server_data_nodes?.includes(/** @type {import('types').ServerErrorNode} */ (err))) { + // this is the server error rethrown above, reconstruct but don't invoke + // the client error handler; it should've already been handled on the server + status = /** @type {import('types').ServerErrorNode} */ (err).status ?? status; + error = /** @type {import('types').ServerErrorNode} */ (err).error; + } else if (err instanceof HttpError) { + error = err.body; + } else { + // Referenced node could have been removed due to redeploy, check + const updated = await stores.updated.check(); + if (updated) { + // Before reloading, try to update the service worker if it exists + await update_service_worker(); + return await native_navigation(url); + } + + error = await handle_error(err, { params, url, route: { id: route.id } }); + } + + const error_load = await load_nearest_error_page(i, branch, errors); + if (error_load) { + return get_navigation_result_from_branch({ + url, + params, + branch: branch.slice(0, error_load.idx).concat(error_load.node), + errors, + status, + error, + route + }); + } else { + return await server_fallback(url, { id: route.id }, error, status); + } + } + } else { + // push an empty slot so we can rewind past gaps to the + // layout that corresponds with an +error.svelte page + branch.push(undefined); + } + } + + return get_navigation_result_from_branch({ + url, + params, + branch, + errors, + status: 200, + error: null, + route, + // Reset `form` on navigation, but not invalidation + form: invalidating ? undefined : null + }); +} + +/** + * @param {number} i Start index to backtrack from + * @param {Array} branch Branch to backtrack + * @param {Array} errors All error pages for this branch + * @returns {Promise<{idx: number; node: import('./types.js').BranchNode} | undefined>} + */ +async function load_nearest_error_page(i, branch, errors) { + while (i--) { + if (errors[i]) { + let j = i; + while (!branch[j]) j -= 1; + try { + return { + idx: j + 1, + node: { + node: await /** @type {import('types').CSRPageNodeLoader } */ (errors[i])(), + loader: /** @type {import('types').CSRPageNodeLoader } */ (errors[i]), + data: {}, + server: null, + universal: null + } + }; + } catch { + continue; + } + } + } +} + +/** + * @param {{ + * status: number; + * error: App.Error; + * url: URL; + * route: { id: string | null } + * }} opts + * @returns {Promise} + */ +async function load_root_error_page({ status, error, url, route }) { + /** @type {Record} */ + const params = {}; // error page does not have params + + /** @type {import('types').ServerDataNode | null} */ + let server_data_node = null; + + if (__SVELTEKIT_HAS_SERVER_LOAD__) { + const default_layout_has_server_load = app.server_loads[0] === 0; + + if (default_layout_has_server_load) { + // TODO post-https://github.com/sveltejs/kit/discussions/6124 we can use + // existing root layout data + try { + const server_data = await load_data(url, [true]); + + if ( + server_data.type !== 'data' || + (server_data.nodes[0] && server_data.nodes[0].type !== 'data') + ) { + throw 0; + } + + server_data_node = server_data.nodes[0] ?? null; + } catch { + // at this point we have no choice but to fall back to the server, if it wouldn't + // bring us right back here, turning this into an endless loop + if (url.origin !== origin || url.pathname !== location.pathname || hydrated) { + await native_navigation(url); + } + } + } + } + + try { + const root_layout = await load_node({ + loader: default_layout_loader, + url, + params, + route, + parent: () => Promise.resolve({}), + server_data_node: create_data_node(server_data_node) + }); + + /** @type {import('./types.js').BranchNode} */ + const root_error = { + node: await default_error_loader(), + loader: default_error_loader, + universal: null, + server: null, + data: null + }; + + return get_navigation_result_from_branch({ + url, + params, + branch: [root_layout, root_error], + status, + error, + errors: [], + route: null + }); + } catch (error) { + if (error instanceof Redirect) { + // @ts-expect-error TODO investigate this + return _goto(new URL(error.location, location.href), {}, 0); + } + + // TODO: this falls back to the server when a server exists, but what about SPA mode? + throw error; + } +} + +/** + * Resolve the relative rerouted URL for a client-side navigation + * @param {URL} url + * @returns {Promise} + */ +async function get_rerouted_url(url) { + const href = url.href; + + if (reroute_cache.has(href)) { + return reroute_cache.get(href); + } + + let rerouted; + + try { + const promise = (async () => { + // reroute could alter the given URL, so we pass a copy + let rerouted = + (await app.hooks.reroute({ + url: new URL(url), + fetch: async (input, init) => { + return resolve_fetch_url(input, init, url).promise; + } + })) ?? url; + + if (typeof rerouted === 'string') { + const tmp = new URL(url); // do not mutate the incoming URL + + if (app.hash) { + tmp.hash = rerouted; + } else { + tmp.pathname = rerouted; + } + + rerouted = tmp; + } + + return rerouted; + })(); + + reroute_cache.set(href, promise); + rerouted = await promise; + } catch (e) { + reroute_cache.delete(href); + if (DEV) { + // in development, print the error... + console.error(e); + + // ...and pause execution, since otherwise we will immediately reload the page + debugger; // eslint-disable-line + } + + // fall back to native navigation + return; + } + + return rerouted; +} + +/** + * Resolve the full info (which route, params, etc.) for a client-side navigation from the URL, + * taking the reroute hook into account. If this isn't a client-side-navigation (or the URL is undefined), + * returns undefined. + * @param {URL | undefined} url + * @param {boolean} invalidating + * @returns {Promise} + */ +export async function get_navigation_intent(url, invalidating) { + if (!url) return; + if (is_external_url(url, base, app.hash)) return; + + if (__SVELTEKIT_CLIENT_ROUTING__) { + const rerouted = await get_rerouted_url(url); + if (!rerouted) return; + + const path = get_url_path(rerouted); + + for (const route of routes) { + const params = route.exec(path); + + if (params) { + return { + id: get_page_key(url), + invalidating, + route, + params: decode_params(params), + url + }; + } + } + } else { + /** @type {{ route?: import('types').CSRRouteServer, params: Record}} */ + const { route, params } = await import( + /* @vite-ignore */ + add_resolution_suffix(url.pathname) + ); + + if (!route) return; + + return { + id: get_page_key(url), + invalidating, + route: parse_server_route(route, app.nodes), + params, + url + }; + } +} + +/** @param {URL} url */ +function get_url_path(url) { + return ( + decode_pathname( + app.hash ? url.hash.replace(/^#/, '').replace(/[?#].+/, '') : url.pathname.slice(base.length) + ) || '/' + ); +} + +/** @param {URL} url */ +function get_page_key(url) { + return (app.hash ? url.hash.replace(/^#/, '') : url.pathname) + url.search; +} + +/** + * @param {{ + * url: URL; + * type: import('@sveltejs/kit').Navigation["type"]; + * intent?: import('./types.js').NavigationIntent; + * delta?: number; + * event?: PopStateEvent | MouseEvent; + * scroll?: { x: number, y: number }; + * }} opts + */ +function _before_navigate({ url, type, intent, delta, event, scroll }) { + let should_block = false; + + const nav = create_navigation(current, intent, url, type, scroll ?? null); + + if (delta !== undefined) { + nav.navigation.delta = delta; + } + + if (event !== undefined) { + // @ts-ignore + nav.navigation.event = event; + } + + const cancellable = { + ...nav.navigation, + cancel: () => { + should_block = true; + nav.reject(new Error('navigation cancelled')); + } + }; + + if (!is_navigating) { + // Don't run the event during redirects + before_navigate_callbacks.forEach((fn) => fn(cancellable)); + } + + return should_block ? null : nav; +} + +/** + * @param {{ + * type: import('@sveltejs/kit').NavigationType; + * url: URL; + * popped?: { + * state: Record; + * scroll: { x: number, y: number }; + * delta: number; + * }; + * keepfocus?: boolean; + * noscroll?: boolean; + * replace_state?: boolean; + * state?: Record; + * redirect_count?: number; + * nav_token?: {}; + * accept?: () => void; + * block?: () => void; + * event?: Event + * }} opts + */ +async function navigate({ + type, + url, + popped, + keepfocus, + noscroll, + replace_state, + state = {}, + redirect_count = 0, + nav_token = {}, + accept = noop, + block = noop, + event +}) { + const prev_token = token; + token = nav_token; + + const intent = await get_navigation_intent(url, false); + const nav = + type === 'enter' + ? create_navigation(current, intent, url, type) + : _before_navigate({ + url, + type, + delta: popped?.delta, + intent, + scroll: popped?.scroll, + // @ts-ignore + event + }); + + if (!nav) { + block(); + if (token === nav_token) token = prev_token; + return; + } + + // store this before calling `accept()`, which may change the index + const previous_history_index = current_history_index; + const previous_navigation_index = current_navigation_index; + + accept(); + + is_navigating = true; + + if (started && nav.navigation.type !== 'enter') { + stores.navigating.set((navigating.current = nav.navigation)); + } + + let navigation_result = intent && (await load_route(intent)); + + if (!navigation_result) { + if (is_external_url(url, base, app.hash)) { + if (DEV && app.hash) { + // Special case for hash mode during DEV: If someone accidentally forgets to use a hash for the link, + // they would end up here in an endless loop. Fall back to error page in that case + navigation_result = await server_fallback( + url, + { id: null }, + await handle_error( + new SvelteKitError( + 404, + 'Not Found', + `Not found: ${url.pathname} (did you forget the hash?)` + ), + { + url, + params: {}, + route: { id: null } + } + ), + 404, + replace_state + ); + } else { + return await native_navigation(url, replace_state); + } + } else { + navigation_result = await server_fallback( + url, + { id: null }, + await handle_error(new SvelteKitError(404, 'Not Found', `Not found: ${url.pathname}`), { + url, + params: {}, + route: { id: null } + }), + 404, + replace_state + ); + } + } + + // if this is an internal navigation intent, use the normalized + // URL for the rest of the function + url = intent?.url || url; + + // abort if user navigated during update + if (token !== nav_token) { + nav.reject(new Error('navigation aborted')); + return false; + } + + if (navigation_result.type === 'redirect') { + // whatwg fetch spec https://fetch.spec.whatwg.org/#http-redirect-fetch says to error after 20 redirects + if (redirect_count < 20) { + await navigate({ + type, + url: new URL(navigation_result.location, url), + popped, + keepfocus, + noscroll, + replace_state, + state, + redirect_count: redirect_count + 1, + nav_token + }); + + nav.fulfil(undefined); + return; + } + + navigation_result = await load_root_error_page({ + status: 500, + error: await handle_error(new Error('Redirect loop'), { + url, + params: {}, + route: { id: null } + }), + url, + route: { id: null } + }); + } else if (/** @type {number} */ (navigation_result.props.page.status) >= 400) { + const updated = await stores.updated.check(); + if (updated) { + // Before reloading, try to update the service worker if it exists + await update_service_worker(); + await native_navigation(url, replace_state); + } + } + + // reset invalidation only after a finished navigation. If there are redirects or + // additional invalidations, they should get the same invalidation treatment + reset_invalidation(); + + updating = true; + + update_scroll_positions(previous_history_index); + capture_snapshot(previous_navigation_index); + + // ensure the url pathname matches the page's trailing slash option + if (navigation_result.props.page.url.pathname !== url.pathname) { + url.pathname = navigation_result.props.page.url.pathname; + } + + state = popped ? popped.state : state; + + if (!popped) { + // this is a new navigation, rather than a popstate + const change = replace_state ? 0 : 1; + + const entry = { + [HISTORY_INDEX]: (current_history_index += change), + [NAVIGATION_INDEX]: (current_navigation_index += change), + [STATES_KEY]: state + }; + + const fn = replace_state ? history.replaceState : history.pushState; + fn.call(history, entry, '', url); + + if (!replace_state) { + clear_onward_history(current_history_index, current_navigation_index); + } + } + + // also compare ids to avoid using wrong fork (e.g. a new one could've been added while navigating) + const load_cache_fork = intent && load_cache?.id === intent.id ? load_cache.fork : null; + // reset preload synchronously after the history state has been set to avoid race conditions + if (load_cache?.fork && !load_cache_fork) { + // discard fork of different route + discard_load_cache(); + } + load_cache = null; + + navigation_result.props.page.state = state; + + /** + * @type {Promise | undefined} + */ + let commit_promise; + if (started) { + const after_navigate = ( + await Promise.all( + // eslint-disable-next-line @typescript-eslint/await-thenable -- we need to await because they can be asynchronous + Array.from(on_navigate_callbacks, (fn) => + fn(/** @type {import('@sveltejs/kit').OnNavigate} */ (nav.navigation)) + ) + ) + ).filter(/** @returns {value is () => void} */ (value) => typeof value === 'function'); + + if (after_navigate.length > 0) { + function cleanup() { + after_navigate.forEach((fn) => { + after_navigate_callbacks.delete(fn); + }); + } + + after_navigate.push(cleanup); + + after_navigate.forEach((fn) => { + after_navigate_callbacks.add(fn); + }); + } + + // Type-casts are save because we know this resolved a proper SvelteKit route + const target = /** @type {import('@sveltejs/kit').NavigationTarget} */ (nav.navigation.to); + current = { + ...navigation_result.state, + nav: { + params: /** @type {Record} */ (target.params), + route: target.route, + url: target.url + } + }; + + // reset url before updating page store + if (navigation_result.props.page) { + navigation_result.props.page.url = url; + } + + const fork = load_cache_fork && (await load_cache_fork); + + if (fork) { + commit_promise = fork.commit(); + } else { + rendering_error = null; // TODO this can break with forks, rethink for SvelteKit 3 where we can assume Svelte 5 + root.$set(navigation_result.props); + // Check for sync rendering error + if (rendering_error) { + Object.assign(navigation_result.props.page, rendering_error); + } + update(navigation_result.props.page); + + commit_promise = svelte.settled?.(); + } + + has_navigated = true; + } else { + await initialize(navigation_result, target, false); + } + + const { activeElement } = document; + + await commit_promise; + + // TODO 3.0 remote — the double tick is probably necessary because + // of some store shenanigans. `settled()` and `f.commit()` + // should resolve after DOM updates in newer versions + await svelte.tick(); + await svelte.tick(); + + if (token !== nav_token) { + // a new navigation happened while we were waiting for the DOM to update, so abort + nav.reject(new Error('navigation aborted')); + return false; + } + + // Check for async rendering error + if (navigation_result.props.page && rendering_error) { + Object.assign(navigation_result.props.page, rendering_error); + } + + // we reset scroll before dealing with focus, to avoid a flash of unscrolled content + /** @type {Element | null | ''} */ + let deep_linked = null; + + if (autoscroll) { + const scroll = popped ? popped.scroll : noscroll ? scroll_state() : null; + if (scroll) { + scrollTo(scroll.x, scroll.y); + } else if ((deep_linked = url.hash && document.getElementById(get_id(url)))) { + // Here we use `scrollIntoView` on the element instead of `scrollTo` + // because it natively supports the `scroll-margin` and `scroll-behavior` + // CSS properties. + deep_linked.scrollIntoView(); + } else { + scrollTo(0, 0); + } + } + + const changed_focus = + // reset focus only if any manual focus management didn't override it + document.activeElement !== activeElement && + // also refocus when activeElement is body already because the + // focus event might not have been fired on it yet + document.activeElement !== document.body; + + if (!keepfocus && !changed_focus) { + // We don't need to manually restore the scroll position if we're navigating + // to a fragment identifier. It is automatically done for us when we set the + // sequential navigation starting point with `location.replace` + reset_focus(url, !deep_linked); + } + + autoscroll = true; + + is_navigating = false; + + if (type === 'popstate') { + restore_snapshot(current_navigation_index); + } + + nav.fulfil(undefined); + + // Update to.scroll to the actual scroll position after navigation completed + if (nav.navigation.to) { + nav.navigation.to.scroll = scroll_state(); + } + + after_navigate_callbacks.forEach((fn) => + fn(/** @type {import('@sveltejs/kit').AfterNavigate} */ (nav.navigation)) + ); + + stores.navigating.set((navigating.current = null)); + + updating = false; +} + +/** + * Does a full page reload if it wouldn't result in an endless loop in the SPA case + * @param {URL} url + * @param {{ id: string | null }} route + * @param {App.Error} error + * @param {number} status + * @param {boolean} [replace_state] + * @returns {Promise} + */ +async function server_fallback(url, route, error, status, replace_state) { + if (url.origin === origin && url.pathname === location.pathname && !hydrated) { + // We would reload the same page we're currently on, which isn't hydrated, + // which means no SSR, which means we would end up in an endless loop + return await load_root_error_page({ + status, + error, + url, + route + }); + } + + if (DEV && status !== 404) { + console.error( + 'An error occurred while loading the page. This will cause a full page reload. (This message will only appear during development.)' + ); + + debugger; // eslint-disable-line + } + + return await native_navigation(url, replace_state); +} + +if (import.meta.hot) { + import.meta.hot.on('vite:beforeUpdate', () => { + if (current.error) location.reload(); + }); +} + +/** @typedef {(typeof PRELOAD_PRIORITIES)['hover'] | (typeof PRELOAD_PRIORITIES)['tap']} PreloadDataPriority */ + +function setup_preload() { + /** @type {NodeJS.Timeout} */ + let mousemove_timeout; + /** @type {{ element: Element | SVGAElement | undefined; href: string | SVGAnimatedString | undefined }} */ + let current_a = { element: undefined, href: undefined }; + /** @type {PreloadDataPriority} */ + let current_priority; + + container.addEventListener('mousemove', (event) => { + const target = /** @type {Element} */ (event.target); + + clearTimeout(mousemove_timeout); + mousemove_timeout = setTimeout(() => { + void preload(target, PRELOAD_PRIORITIES.hover); + }, 20); + }); + + /** @param {Event} event */ + function tap(event) { + if (event.defaultPrevented) return; + void preload(/** @type {Element} */ (event.composedPath()[0]), PRELOAD_PRIORITIES.tap); + } + + container.addEventListener('mousedown', tap); + container.addEventListener('touchstart', tap, { passive: true }); + + const observer = new IntersectionObserver( + (entries) => { + for (const entry of entries) { + if (entry.isIntersecting) { + void _preload_code(new URL(/** @type {HTMLAnchorElement} */ (entry.target).href)); + observer.unobserve(entry.target); + } + } + }, + { threshold: 0 } + ); + + /** + * @param {Element} element + * @param {PreloadDataPriority} priority + */ + async function preload(element, priority) { + const a = find_anchor(element, container); + + // we don't want to preload data again if the user has already hovered/tapped + const interacted = + a === current_a.element && a?.href === current_a.href && priority >= current_priority; + if (!a || interacted) return; + + const { url, external, download } = get_link_info(a, base, app.hash); + if (external || download) return; + + const options = get_router_options(a); + + // we don't want to preload data for a page we're already on + const same_url = url && get_page_key(current.url) === get_page_key(url); + if (options.reload || same_url) return; + + if (priority <= options.preload_data) { + current_a = { element: a, href: a.href }; + // we don't want to preload data again on tap if we've already preloaded it on hover + current_priority = PRELOAD_PRIORITIES.tap; + + const intent = await get_navigation_intent(url, false); + if (!intent) return; + + if (DEV) { + void _preload_data(intent).then((result) => { + if (result.type === 'loaded' && result.state.error) { + console.warn( + `Preloading data for ${intent.url.pathname} failed with the following error: ${result.state.error.message}\n` + + 'If this error is transient, you can ignore it. Otherwise, consider disabling preloading for this route. ' + + 'This route was preloaded due to a data-sveltekit-preload-data attribute. ' + + 'See https://svelte.dev/docs/kit/link-options for more info' + ); + } + }); + } else { + void _preload_data(intent); + } + } else if (priority <= options.preload_code) { + current_a = { element: a, href: a.href }; + current_priority = priority; + void _preload_code(/** @type {URL} */ (url)); + } + } + + function after_navigate() { + observer.disconnect(); + + for (const a of container.querySelectorAll('a')) { + const { url, external, download } = get_link_info(a, base, app.hash); + if (external || download) continue; + + const options = get_router_options(a); + if (options.reload) continue; + + if (options.preload_code === PRELOAD_PRIORITIES.viewport) { + observer.observe(a); + } + + if (options.preload_code === PRELOAD_PRIORITIES.eager) { + void _preload_code(/** @type {URL} */ (url)); + } + } + } + + after_navigate_callbacks.add(after_navigate); + after_navigate(); +} + +/** + * @param {unknown} error + * @param {import('@sveltejs/kit').NavigationEvent} event + * @returns {import('types').MaybePromise} + */ +function handle_error(error, event) { + if (error instanceof HttpError) { + return error.body; + } + + if (DEV) { + errored = true; + console.warn('The next HMR update will cause the page to reload'); + } + + const status = get_status(error); + const message = get_message(error); + + return ( + app.hooks.handleError({ error, event, status, message }) ?? /** @type {any} */ ({ message }) + ); +} + +/** + * @template {Function} T + * @param {Set} callbacks + * @param {T} callback + */ +function add_navigation_callback(callbacks, callback) { + onMount(() => { + callbacks.add(callback); + + return () => { + callbacks.delete(callback); + }; + }); +} + +/** + * A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a URL. + * + * `afterNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * @param {(navigation: import('@sveltejs/kit').AfterNavigate) => void} callback + * @returns {void} + */ +export function afterNavigate(callback) { + add_navigation_callback(after_navigate_callbacks, callback); +} + +/** + * A navigation interceptor that triggers before we navigate to a URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls. + * + * Calling `cancel()` will prevent the navigation from completing. If `navigation.type === 'leave'` — meaning the user is navigating away from the app (or closing the tab) — calling `cancel` will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user's response. + * + * When a navigation isn't to a SvelteKit-owned route (and therefore controlled by SvelteKit's client-side router), `navigation.to.route.id` will be `null`. + * + * If the navigation will (if not cancelled) cause the document to unload — in other words `'leave'` navigations and `'link'` navigations where `navigation.to.route === null` — `navigation.willUnload` is `true`. + * + * `beforeNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * @param {(navigation: import('@sveltejs/kit').BeforeNavigate) => void} callback + * @returns {void} + */ +export function beforeNavigate(callback) { + add_navigation_callback(before_navigate_callbacks, callback); +} + +/** + * A lifecycle function that runs the supplied `callback` immediately before we navigate to a new URL except during full-page navigations. + * + * If you return a `Promise`, SvelteKit will wait for it to resolve before completing the navigation. This allows you to — for example — use `document.startViewTransition`. Avoid promises that are slow to resolve, since navigation will appear stalled to the user. + * + * If a function (or a `Promise` that resolves to a function) is returned from the callback, it will be called once the DOM has updated. + * + * `onNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * @param {(navigation: import('@sveltejs/kit').OnNavigate) => import('types').MaybePromise<(() => void) | void>} callback + * @returns {void} + */ +export function onNavigate(callback) { + add_navigation_callback(on_navigate_callbacks, callback); +} + +/** + * If called when the page is being updated following a navigation (in `onMount` or `afterNavigate` or an action, for example), this disables SvelteKit's built-in scroll handling. + * This is generally discouraged, since it breaks user expectations. + * @returns {void} + */ +export function disableScrollHandling() { + if (!BROWSER) { + throw new Error('Cannot call disableScrollHandling() on the server'); + } + + if (DEV && started && !updating) { + throw new Error('Can only disable scroll handling during navigation'); + } + + if (updating || !started) { + autoscroll = false; + } +} + +/** + * Allows you to navigate programmatically to a given route, with options such as keeping the current element focused. + * Returns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified `url`. + * + * For external URLs, use `window.location = url` instead of calling `goto(url)`. + * + * @param {string | URL} url Where to navigate to. Note that if you've set [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths) and the URL is root-relative, you need to prepend the base path if you want to navigate within the app. + * @param {Object} [opts] Options related to the navigation + * @param {boolean} [opts.replaceState] If `true`, will replace the current `history` entry rather than creating a new one with `pushState` + * @param {boolean} [opts.noScroll] If `true`, the browser will maintain its scroll position rather than scrolling to the top of the page after navigation + * @param {boolean} [opts.keepFocus] If `true`, the currently focused element will retain focus after navigation. Otherwise, focus will be reset to the body + * @param {boolean} [opts.invalidateAll] If `true`, all `load` functions of the page will be rerun. See https://svelte.dev/docs/kit/load#rerunning-load-functions for more info on invalidation. + * @param {Array boolean)>} [opts.invalidate] Causes any load functions to re-run if they depend on one of the urls + * @param {App.PageState} [opts.state] An optional object that will be available as `page.state` + * @returns {Promise} + */ +export function goto(url, opts = {}) { + if (!BROWSER) { + throw new Error('Cannot call goto(...) on the server'); + } + + url = new URL(resolve_url(url)); + + if (url.origin !== origin) { + return Promise.reject( + new Error( + DEV + ? `Cannot use \`goto\` with an external URL. Use \`window.location = "${url}"\` instead` + : 'goto: invalid URL' + ) + ); + } + + return _goto(url, opts, 0); +} + +/** + * Causes any `load` functions belonging to the currently active page to re-run if they depend on the `url` in question, via `fetch` or `depends`. Returns a `Promise` that resolves when the page is subsequently updated. + * + * If the argument is given as a `string` or `URL`, it must resolve to the same URL that was passed to `fetch` or `depends` (including query parameters). + * To create a custom identifier, use a string beginning with `[a-z]+:` (e.g. `custom:state`) — this is a valid URL. + * + * The `function` argument can be used define a custom predicate. It receives the full `URL` and causes `load` to rerun if `true` is returned. + * This can be useful if you want to invalidate based on a pattern instead of a exact match. + * + * ```ts + * // Example: Match '/path' regardless of the query parameters + * import { invalidate } from '$app/navigation'; + * + * invalidate((url) => url.pathname === '/path'); + * ``` + * @param {string | URL | ((url: URL) => boolean)} resource The invalidated URL + * @returns {Promise} + */ +export function invalidate(resource) { + if (!BROWSER) { + throw new Error('Cannot call invalidate(...) on the server'); + } + + push_invalidated(resource); + + return _invalidate(); +} + +/** + * @param {string | URL | ((url: URL) => boolean)} resource The invalidated URL + */ +function push_invalidated(resource) { + if (typeof resource === 'function') { + invalidated.push(resource); + } else { + const { href } = new URL(resource, location.href); + invalidated.push((url) => url.href === href); + } +} + +/** + * Causes all `load` and `query` functions belonging to the currently active page to re-run. Returns a `Promise` that resolves when the page is subsequently updated. + * @returns {Promise} + */ +export function invalidateAll() { + if (!BROWSER) { + throw new Error('Cannot call invalidateAll() on the server'); + } + + force_invalidation = true; + return _invalidate(); +} + +/** + * Causes all currently active remote functions to refresh, and all `load` functions belonging to the currently active page to re-run (unless disabled via the option argument). + * Returns a `Promise` that resolves when the page is subsequently updated. + * @param {{ includeLoadFunctions?: boolean }} [options] + * @returns {Promise} + */ +export function refreshAll({ includeLoadFunctions = true } = {}) { + if (!BROWSER) { + throw new Error('Cannot call refreshAll() on the server'); + } + + force_invalidation = true; + return _invalidate(includeLoadFunctions, false); +} + +/** + * Programmatically preloads the given page, which means + * 1. ensuring that the code for the page is loaded, and + * 2. calling the page's load function with the appropriate options. + * + * This is the same behaviour that SvelteKit triggers when the user taps or mouses over an `` element with `data-sveltekit-preload-data`. + * If the next navigation is to `href`, the values returned from load will be used, making navigation instantaneous. + * Returns a Promise that resolves with the result of running the new route's `load` functions once the preload is complete. + * + * @param {string} href Page to preload + * @returns {Promise<{ type: 'loaded'; status: number; data: Record } | { type: 'redirect'; location: string }>} + */ +export async function preloadData(href) { + if (!BROWSER) { + throw new Error('Cannot call preloadData(...) on the server'); + } + + const url = resolve_url(href); + const intent = await get_navigation_intent(url, false); + + if (!intent) { + throw new Error(`Attempted to preload a URL that does not belong to this app: ${url}`); + } + + const result = await _preload_data(intent); + if (result.type === 'redirect') { + return { + type: result.type, + location: result.location + }; + } + + const { status, data } = result.props.page ?? page; + return { type: result.type, status, data }; +} + +/** + * Programmatically imports the code for routes that haven't yet been fetched. + * Typically, you might call this to speed up subsequent navigation. + * + * You can specify routes by any matching pathname such as `/about` (to match `src/routes/about/+page.svelte`) or `/blog/*` (to match `src/routes/blog/[slug]/+page.svelte`). + * + * Unlike `preloadData`, this won't call `load` functions. + * Returns a Promise that resolves when the modules have been imported. + * + * @param {string} pathname + * @returns {Promise} + */ +export async function preloadCode(pathname) { + if (!BROWSER) { + throw new Error('Cannot call preloadCode(...) on the server'); + } + + const url = new URL(pathname, current.url); + + if (DEV) { + if (!pathname.startsWith('/')) { + throw new Error( + 'argument passed to preloadCode must be a pathname (i.e. "/about" rather than "http://example.com/about"' + ); + } + + if (!pathname.startsWith(base)) { + throw new Error( + `pathname passed to preloadCode must start with \`paths.base\` (i.e. "${base}${pathname}" rather than "${pathname}")` + ); + } + + if (__SVELTEKIT_CLIENT_ROUTING__) { + const rerouted = await get_rerouted_url(url); + if (!rerouted || !routes.find((route) => route.exec(get_url_path(rerouted)))) { + throw new Error(`'${pathname}' did not match any routes`); + } + } + } + + return _preload_code(url); +} + +/** + * Programmatically create a new history entry with the given `page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing). + * + * @param {string | URL} url + * @param {App.PageState} state + * @returns {void} + */ +export function pushState(url, state) { + if (!BROWSER) { + throw new Error('Cannot call pushState(...) on the server'); + } + + if (DEV) { + if (!started) { + throw new Error('Cannot call pushState(...) before router is initialized'); + } + + try { + // use `devalue.stringify` as a convenient way to ensure we exclude values that can't be properly rehydrated, such as custom class instances + devalue.stringify(state); + } catch (error) { + // @ts-expect-error + throw new Error(`Could not serialize state${error.path}`, { cause: error }); + } + } + + update_scroll_positions(current_history_index); + + const opts = { + [HISTORY_INDEX]: (current_history_index += 1), + [NAVIGATION_INDEX]: current_navigation_index, + [PAGE_URL_KEY]: page.url.href, + [STATES_KEY]: state + }; + + history.pushState(opts, '', resolve_url(url)); + has_navigated = true; + + page.state = state; + root.$set({ + // we need to assign a new page object so that subscribers are correctly notified + page: untrack(() => clone_page(page)) + }); + + clear_onward_history(current_history_index, current_navigation_index); +} + +/** + * Programmatically replace the current history entry with the given `page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing). + * + * @param {string | URL} url + * @param {App.PageState} state + * @returns {void} + */ +export function replaceState(url, state) { + if (!BROWSER) { + throw new Error('Cannot call replaceState(...) on the server'); + } + + if (DEV) { + if (!started) { + throw new Error('Cannot call replaceState(...) before router is initialized'); + } + + try { + // use `devalue.stringify` as a convenient way to ensure we exclude values that can't be properly rehydrated, such as custom class instances + devalue.stringify(state); + } catch (error) { + // @ts-expect-error + throw new Error(`Could not serialize state${error.path}`, { cause: error }); + } + } + + const opts = { + [HISTORY_INDEX]: current_history_index, + [NAVIGATION_INDEX]: current_navigation_index, + [PAGE_URL_KEY]: page.url.href, + [STATES_KEY]: state + }; + + history.replaceState(opts, '', resolve_url(url)); + + page.state = state; + root.$set({ + page: untrack(() => clone_page(page)) + }); +} + +/** + * This action updates the `form` property of the current page with the given data and updates `page.status`. + * In case of an error, it redirects to the nearest error page. + * @template {Record | undefined} Success + * @template {Record | undefined} Failure + * @param {import('@sveltejs/kit').ActionResult} result + * @returns {Promise} + */ +export async function applyAction(result) { + if (!BROWSER) { + throw new Error('Cannot call applyAction(...) on the server'); + } + + if (result.type === 'error') { + await set_nearest_error_page(result.error, result.status); + } else if (result.type === 'redirect') { + await _goto(result.location, { invalidateAll: true }, 0); + } else { + page.form = result.data; + page.status = result.status; + + /** @type {Record} */ + root.$set({ + // this brings Svelte's view of the world in line with SvelteKit's + // after use:enhance reset the form.... + form: null, + page: clone_page(page) + }); + + // ...so that setting the `form` prop takes effect and isn't ignored + await tick(); + root.$set({ form: result.data }); + + if (result.type === 'success') { + reset_focus(page.url); + } + } +} + +/** + * @param {App.Error} error + * @param {number} status + */ +export async function set_nearest_error_page(error, status = 500) { + const url = new URL(location.href); + + const { branch, route } = current; + if (!route) return; + + const error_load = await load_nearest_error_page(current.branch.length, branch, route.errors); + if (error_load) { + const navigation_result = await get_navigation_result_from_branch({ + url, + params: current.params, + branch: branch.slice(0, error_load.idx).concat(error_load.node), + status, + error, + // do not set errors, we haven't changed the page so the previous ones are still current + route + }); + + current = { ...navigation_result.state, nav: current.nav }; + + root.$set(navigation_result.props); + update(navigation_result.props.page); + + void tick().then(() => reset_focus(current.url)); + } +} + +function _start_router() { + history.scrollRestoration = 'manual'; + + // Adopted from Nuxt.js + // Reset scrollRestoration to auto when leaving page, allowing page reload + // and back-navigation from other pages to use the browser to restore the + // scrolling position. + addEventListener('beforeunload', (e) => { + let should_block = false; + + persist_state(); + + if (!is_navigating) { + const nav = create_navigation(current, undefined, null, 'leave'); + + // If we're navigating, beforeNavigate was already called. If we end up in here during navigation, + // it's due to an external or full-page-reload link, for which we don't want to call the hook again. + /** @type {import('@sveltejs/kit').BeforeNavigate} */ + const navigation = { + ...nav.navigation, + cancel: () => { + should_block = true; + nav.reject(new Error('navigation cancelled')); + } + }; + + before_navigate_callbacks.forEach((fn) => fn(navigation)); + } + + if (should_block) { + e.preventDefault(); + e.returnValue = ''; + } else { + history.scrollRestoration = 'auto'; + } + }); + + addEventListener('visibilitychange', () => { + if (document.visibilityState === 'hidden') { + persist_state(); + } + }); + + // @ts-expect-error this isn't supported everywhere yet + if (!navigator.connection?.saveData) { + setup_preload(); + } + + /** @param {MouseEvent} event */ + container.addEventListener('click', async (event) => { + // Adapted from https://github.com/visionmedia/page.js + // MIT license https://github.com/visionmedia/page.js#license + if (event.button || event.which !== 1) return; + if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return; + if (event.defaultPrevented) return; + + const a = find_anchor(/** @type {Element} */ (event.composedPath()[0]), container); + if (!a) return; + + const { url, external, target, download } = get_link_info(a, base, app.hash); + if (!url) return; + + // bail out before `beforeNavigate` if link opens in a different tab + if (target === '_parent' || target === '_top') { + if (window.parent !== window) return; + } else if (target && target !== '_self') { + return; + } + + const options = get_router_options(a); + const is_svg_a_element = a instanceof SVGAElement; + + // Ignore URL protocols that differ to the current one and are not http(s) (e.g. `mailto:`, `tel:`, `myapp:`, etc.) + // This may be wrong when the protocol is x: and the link goes to y:.. which should be treated as an external + // navigation, but it's not clear how to handle that case and it's not likely to come up in practice. + // MEMO: Without this condition, firefox will open mailer twice. + // See: + // - https://github.com/sveltejs/kit/issues/4045 + // - https://github.com/sveltejs/kit/issues/5725 + // - https://github.com/sveltejs/kit/issues/6496 + if ( + !is_svg_a_element && + url.protocol !== location.protocol && + !(url.protocol === 'https:' || url.protocol === 'http:') + ) + return; + + if (download) return; + + const [nonhash, hash] = (app.hash ? url.hash.replace(/^#/, '') : url.href).split('#'); + const same_pathname = nonhash === strip_hash(location); + + // Ignore the following but fire beforeNavigate + if (external || (options.reload && (!same_pathname || !hash))) { + if (_before_navigate({ url, type: 'link', event })) { + // set `navigating` to `true` to prevent `beforeNavigate` callbacks + // being called when the page unloads + is_navigating = true; + } else { + event.preventDefault(); + } + + return; + } + + // Check if new url only differs by hash and use the browser default behavior in that case + // This will ensure the `hashchange` event is fired + // Removing the hash does a full page navigation in the browser, so make sure a hash is present + if (hash !== undefined && same_pathname) { + // If we are trying to navigate to the same hash, we should only + // attempt to scroll to that element and avoid any history changes. + // Otherwise, this can cause Firefox to incorrectly assign a null + // history state value without any signal that we can detect. + const [, current_hash] = current.url.href.split('#'); + if (current_hash === hash) { + event.preventDefault(); + + // We're already on /# and click on a link that goes to /#, or we're on + // /#top and click on a link that goes to /#top. In those cases just go to + // the top of the page, and avoid a history change. + if (hash === '' || (hash === 'top' && a.ownerDocument.getElementById('top') === null)) { + scrollTo({ top: 0 }); + } else { + const element = a.ownerDocument.getElementById(decodeURIComponent(hash)); + if (element) { + element.scrollIntoView(); + element.focus(); + } + } + + return; + } + // set this flag to distinguish between navigations triggered by + // clicking a hash link and those triggered by popstate + hash_navigating = true; + + update_scroll_positions(current_history_index); + + update_url(url); + + if (!options.replace_state) return; + + // hashchange event shouldn't occur if the router is replacing state. + hash_navigating = false; + } + + event.preventDefault(); + + // allow the browser to repaint before navigating — + // this prevents INP scores being penalised + await new Promise((fulfil) => { + requestAnimationFrame(() => { + setTimeout(fulfil, 0); + }); + + setTimeout(fulfil, 100); // fallback for edge case where rAF doesn't fire because e.g. tab was backgrounded + }); + + await navigate({ + type: 'link', + url, + keepfocus: options.keepfocus, + noscroll: options.noscroll, + replace_state: options.replace_state ?? url.href === location.href, + event + }); + }); + + container.addEventListener('submit', (event) => { + if (event.defaultPrevented) return; + + const form = /** @type {HTMLFormElement} */ ( + HTMLFormElement.prototype.cloneNode.call(event.target) + ); + + const submitter = /** @type {HTMLButtonElement | HTMLInputElement | null} */ (event.submitter); + + const target = submitter?.formTarget || form.target; + + if (target === '_blank') return; + + const method = submitter?.formMethod || form.method; + + if (method !== 'get') return; + + // It is impossible to use form actions with hash router, so we just ignore handling them here + const url = new URL( + (submitter?.hasAttribute('formaction') && submitter?.formAction) || form.action + ); + + if (is_external_url(url, base, false)) return; + + const event_form = /** @type {HTMLFormElement} */ (event.target); + + const options = get_router_options(event_form); + if (options.reload) return; + + event.preventDefault(); + event.stopPropagation(); + + const data = new FormData(event_form, submitter); + + // @ts-expect-error `URLSearchParams(fd)` is kosher, but typescript doesn't know that + url.search = new URLSearchParams(data).toString(); + + void navigate({ + type: 'form', + url, + keepfocus: options.keepfocus, + noscroll: options.noscroll, + replace_state: options.replace_state ?? url.href === location.href, + event + }); + }); + + addEventListener('popstate', async (event) => { + if (resetting_focus) return; + + if (event.state?.[HISTORY_INDEX]) { + const history_index = event.state[HISTORY_INDEX]; + token = {}; + + // if a popstate-driven navigation is cancelled, we need to counteract it + // with history.go, which means we end up back here, hence this check + if (history_index === current_history_index) return; + + const scroll = scroll_positions[history_index]; + const state = event.state[STATES_KEY] ?? {}; + const url = new URL(event.state[PAGE_URL_KEY] ?? location.href); + const navigation_index = event.state[NAVIGATION_INDEX]; + const is_hash_change = current.url ? strip_hash(location) === strip_hash(current.url) : false; + const shallow = + navigation_index === current_navigation_index && (has_navigated || is_hash_change); + + if (shallow) { + // We don't need to navigate, we just need to update scroll and/or state. + // This happens with hash links and `pushState`/`replaceState`. The + // exception is if we haven't navigated yet, since we could have + // got here after a modal navigation then a reload + if (state !== page.state) { + page.state = state; + } + + update_url(url); + + scroll_positions[current_history_index] = scroll_state(); + if (scroll) scrollTo(scroll.x, scroll.y); + + current_history_index = history_index; + return; + } + + const delta = history_index - current_history_index; + + await navigate({ + type: 'popstate', + url, + popped: { + state, + scroll, + delta + }, + accept: () => { + current_history_index = history_index; + current_navigation_index = navigation_index; + }, + block: () => { + history.go(-delta); + }, + nav_token: token, + event + }); + } else { + // since popstate event is also emitted when an anchor referencing the same + // document is clicked, we have to check that the router isn't already handling + // the navigation. otherwise we would be updating the page store twice. + if (!hash_navigating) { + const url = new URL(location.href); + update_url(url); + + // if the user edits the hash via the browser URL bar, trigger a full-page + // reload to align with pathname router behavior + if (app.hash) { + location.reload(); + } + } + } + }); + + addEventListener('hashchange', () => { + // if the hashchange happened as a result of clicking on a link, + // we need to update history, otherwise we have to leave it alone + if (hash_navigating) { + hash_navigating = false; + history.replaceState( + { + ...history.state, + [HISTORY_INDEX]: ++current_history_index, + [NAVIGATION_INDEX]: current_navigation_index + }, + '', + location.href + ); + } + }); + + // fix link[rel=icon], because browsers will occasionally try to load relative + // URLs after a pushState/replaceState, resulting in a 404 — see + // https://github.com/sveltejs/kit/issues/3748#issuecomment-1125980897 + for (const link of document.querySelectorAll('link')) { + if (ICON_REL_ATTRIBUTES.has(link.rel)) { + link.href = link.href; // eslint-disable-line + } + } + + addEventListener('pageshow', (event) => { + // If the user navigates to another site and then uses the back button and + // bfcache hits, we need to set navigating to null, the site doesn't know + // the navigation away from it was successful. + // Info about bfcache here: https://web.dev/bfcache + if (event.persisted) { + stores.navigating.set((navigating.current = null)); + } + }); + + /** + * @param {URL} url + */ + function update_url(url) { + current.url = page.url = url; + stores.page.set(clone_page(page)); + stores.page.notify(); + } +} + +/** + * @param {HTMLElement} target + * @param {import('./types.js').HydrateOptions} opts + */ +async function _hydrate( + target, + { status = 200, error, node_ids, params, route, server_route, data: server_data_nodes, form } +) { + hydrated = true; + + const url = new URL(location.href); + + /** @type {import('types').CSRRoute | undefined} */ + let parsed_route; + + if (__SVELTEKIT_CLIENT_ROUTING__) { + if (!__SVELTEKIT_EMBEDDED__) { + // See https://github.com/sveltejs/kit/pull/4935#issuecomment-1328093358 for one motivation + // of determining the params on the client side. + ({ params = {}, route = { id: null } } = (await get_navigation_intent(url, false)) || {}); + } + + parsed_route = routes.find(({ id }) => id === route.id); + } else { + // undefined in case of 404 + if (server_route) { + parsed_route = route = parse_server_route(server_route, app.nodes); + } else { + route = { id: null }; + params = {}; + } + } + + /** @type {import('./types.js').NavigationFinished | undefined} */ + let result; + let hydrate = true; + + try { + const branch_promises = node_ids.map(async (n, i) => { + const server_data_node = server_data_nodes[i]; + // Type isn't completely accurate, we still need to deserialize uses + if (server_data_node?.uses) { + server_data_node.uses = deserialize_uses(server_data_node.uses); + } + + return load_node({ + loader: app.nodes[n], + url, + params, + route, + parent: async () => { + const data = {}; + for (let j = 0; j < i; j += 1) { + Object.assign(data, (await branch_promises[j]).data); + } + return data; + }, + server_data_node: create_data_node(server_data_node) + }); + }); + + /** @type {Array} */ + const branch = await Promise.all(branch_promises); + + // server-side will have compacted the branch, reinstate empty slots + // so that error boundaries can be lined up correctly + if (parsed_route) { + const layouts = parsed_route.layouts; + for (let i = 0; i < layouts.length; i++) { + if (!layouts[i]) { + branch.splice(i, 0, undefined); + } + } + } + + result = await get_navigation_result_from_branch({ + url, + params, + branch, + status, + error, + errors: parsed_route?.errors, // TODO load earlier? + form, + route: parsed_route ?? null + }); + } catch (error) { + if (error instanceof Redirect) { + // this is a real edge case — `load` would need to return + // a redirect but only in the browser + await native_navigation(new URL(error.location, location.href)); + return; + } + + result = await load_root_error_page({ + status: get_status(error), + error: await handle_error(error, { url, params, route }), + url, + route + }); + + target.textContent = ''; + hydrate = false; + } finally { + query_responses = {}; + } + + if (result.props.page) { + result.props.page.state = {}; + } + + await initialize(result, target, hydrate); +} + +/** + * @param {URL} url + * @param {boolean[]} invalid + * @returns {Promise} + */ +async function load_data(url, invalid) { + const data_url = new URL(url); + data_url.pathname = add_data_suffix(url.pathname); + if (url.pathname.endsWith('/')) { + data_url.searchParams.append(TRAILING_SLASH_PARAM, '1'); + } + if (DEV && url.searchParams.has(INVALIDATED_PARAM)) { + throw new Error(`Cannot used reserved query parameter "${INVALIDATED_PARAM}"`); + } + data_url.searchParams.append(INVALIDATED_PARAM, invalid.map((i) => (i ? '1' : '0')).join('')); + + // use window.fetch directly to allow using a 3rd party-patched fetch implementation + const fetcher = DEV ? dev_fetch : window.fetch; + const res = await fetcher(data_url.href, {}); + + if (!res.ok) { + // error message is a JSON-stringified string which devalue can't handle at the top level + // turn it into a HttpError to not call handleError on the client again (was already handled on the server) + // if `__data.json` doesn't exist or the server has an internal error, + // avoid parsing the HTML error page as a JSON + /** @type {string | undefined} */ + let message; + if (res.headers.get('content-type')?.includes('application/json')) { + message = await res.json(); + } else if (res.status === 404) { + message = 'Not Found'; + } else if (res.status === 500) { + message = 'Internal Error'; + } + throw new HttpError(res.status, message); + } + + // TODO: fix eslint error / figure out if it actually applies to our situation + // eslint-disable-next-line + return new Promise(async (resolve) => { + /** + * Map of deferred promises that will be resolved by a subsequent chunk of data + * @type {Map} + */ + const deferreds = new Map(); + const reader = /** @type {ReadableStream} */ (res.body).getReader(); + + /** + * @param {any} data + */ + function deserialize(data) { + return devalue.unflatten(data, { + ...app.decoders, + Promise: (id) => { + return new Promise((fulfil, reject) => { + deferreds.set(id, { fulfil, reject }); + }); + } + }); + } + + for await (const node of read_ndjson(reader)) { + if (node.type === 'redirect') { + return resolve(node); + } + + if (node.type === 'data') { + // This is the first (and possibly only, if no pending promises) chunk + node.nodes?.forEach((/** @type {any} */ node) => { + if (node?.type === 'data') { + node.uses = deserialize_uses(node.uses); + node.data = deserialize(node.data); + } + }); + + resolve(node); + } else if (node.type === 'chunk') { + // This is a subsequent chunk containing deferred data + const { id, data, error } = node; + const deferred = /** @type {import('types').Deferred} */ (deferreds.get(id)); + deferreds.delete(id); + + if (error) { + deferred.reject(deserialize(error)); + } else { + deferred.fulfil(deserialize(data)); + } + } + } + }); + + // TODO edge case handling necessary? stream() read fails? +} + +/** + * @param {any} uses + * @return {import('types').Uses} + */ +function deserialize_uses(uses) { + return { + dependencies: new Set(uses?.dependencies ?? []), + params: new Set(uses?.params ?? []), + parent: !!uses?.parent, + route: !!uses?.route, + url: !!uses?.url, + search_params: new Set(uses?.search_params ?? []) + }; +} + +/** + * This flag is used to avoid client-side navigation when we're only using + * `location.replace()` to set focus. + */ +let resetting_focus = false; + +/** + * @param {URL} url + * @param {boolean} [scroll] + */ +function reset_focus(url, scroll = true) { + const autofocus = document.querySelector('[autofocus]'); + if (autofocus) { + // @ts-ignore + autofocus.focus(); + } else { + // Reset page selection and focus + + // Mimic the browsers' behaviour and set the sequential focus navigation + // starting point to the fragment identifier. + const id = get_id(url); + if (id && document.getElementById(id)) { + const { x, y } = scroll_state(); + + // `element.focus()` doesn't work on Safari and Firefox Ubuntu so we need + // to use this hack with `location.replace()` instead. + setTimeout(() => { + const history_state = history.state; + + resetting_focus = true; + location.replace(new URL(`#${id}`, location.href)); + + // Firefox has a bug that sets the history state to `null` so we need to + // restore it after. See https://bugzilla.mozilla.org/show_bug.cgi?id=1199924 + // This is also needed to restore the original hash if we're using hash routing + history.replaceState(history_state, '', url); + + // If scroll management has already happened earlier, we need to restore + // the scroll position after setting the sequential focus navigation starting point + if (scroll) scrollTo(x, y); + resetting_focus = false; + }); + } else { + // If the ID doesn't exist, we try to mimic browsers' behaviour as closely + // as possible by targeting the first scrollable region. Unfortunately, it's + // not a perfect match — e.g. shift-tabbing won't immediately cycle up from + // the end of the page on Chromium + // See https://html.spec.whatwg.org/multipage/interaction.html#get-the-focusable-area + const root = document.body; + const tabindex = root.getAttribute('tabindex'); + + root.tabIndex = -1; + // TODO: remove this when we switch to TypeScript 6 + // @ts-ignore options.focusVisible is only typed in TypeScript 6 + // See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#browser_compatibility + root.focus({ preventScroll: true, focusVisible: false }); + + // restore `tabindex` as to prevent `root` from stealing input from elements + if (tabindex !== null) { + root.setAttribute('tabindex', tabindex); + } else { + root.removeAttribute('tabindex'); + } + } + + // capture current selection, so we can compare the state after + // snapshot restoration and afterNavigate callbacks have run + const selection = getSelection(); + + if (selection && selection.type !== 'None') { + /** @type {Range[]} */ + const ranges = []; + + for (let i = 0; i < selection.rangeCount; i += 1) { + ranges.push(selection.getRangeAt(i)); + } + + setTimeout(() => { + if (selection.rangeCount !== ranges.length) return; + + for (let i = 0; i < selection.rangeCount; i += 1) { + const a = ranges[i]; + const b = selection.getRangeAt(i); + + // we need to do a deep comparison rather than just `a !== b` because + // Safari behaves differently to other browsers + if ( + a.commonAncestorContainer !== b.commonAncestorContainer || + a.startContainer !== b.startContainer || + a.endContainer !== b.endContainer || + a.startOffset !== b.startOffset || + a.endOffset !== b.endOffset + ) { + return; + } + } + + // if the selection hasn't changed (as a result of an element being (auto)focused, + // or a programmatic selection, we reset everything as part of the navigation) + // fixes https://github.com/sveltejs/kit/issues/8439 + selection.removeAllRanges(); + }); + } + } +} + +/** + * @template {import('@sveltejs/kit').NavigationType} T + * @param {import('./types.js').NavigationState} current + * @param {import('./types.js').NavigationIntent | undefined} intent + * @param {URL | null} url + * @param {T} type + * @param {{ x: number, y: number } | null} [target_scroll] The scroll position for the target (for popstate navigations) + */ +function create_navigation(current, intent, url, type, target_scroll = null) { + /** @type {(value: any) => void} */ + let fulfil; + + /** @type {(error: any) => void} */ + let reject; + + const complete = new Promise((f, r) => { + fulfil = f; + reject = r; + }); + + // Handle any errors off-chain so that it doesn't show up as an unhandled rejection + complete.catch(noop); + + /** @type {(import('@sveltejs/kit').Navigation | import('@sveltejs/kit').AfterNavigate) & { type: T }} */ + const navigation = /** @type {any} */ ({ + from: { + params: current.params, + route: { id: current.route?.id ?? null }, + url: current.url, + scroll: scroll_state() + }, + to: url && { + params: intent?.params ?? null, + route: { id: intent?.route?.id ?? null }, + url, + scroll: target_scroll + }, + willUnload: !intent, + type, + complete + }); + + return { + navigation, + // @ts-expect-error + fulfil, + // @ts-expect-error + reject + }; +} + +/** + * TODO: remove this in 3.0 when the page store is also removed + * + * We need to assign a new page object so that subscribers are correctly notified. + * However, spreading `{ ...page }` returns an empty object so we manually + * assign to each property instead. + * + * @param {import('@sveltejs/kit').Page} page + */ +function clone_page(page) { + return { + data: page.data, + error: page.error, + form: page.form, + params: page.params, + route: page.route, + state: page.state, + status: page.status, + url: page.url + }; +} + +/** + * @param {URL} url + * @returns {URL} + */ +function decode_hash(url) { + const new_url = new URL(url); + // Safari, for some reason, does change # to %23, when entered through the address bar + new_url.hash = decodeURIComponent(url.hash); + return new_url; +} + +/** + * @param {URL} url + * @returns {string} + */ +function get_id(url) { + let id; + + if (app.hash) { + const [, , second] = url.hash.split('#', 3); + id = second ?? ''; + } else { + id = url.hash.slice(1); + } + + return decodeURIComponent(id); +} + +if (DEV) { + // Nasty hack to silence harmless warnings the user can do nothing about + const console_warn = console.warn; + console.warn = function warn(...args) { + if ( + args.length === 1 && + /<(Layout|Page|Error)(_[\w$]+)?> was created (with unknown|without expected) prop '(data|form)'/.test( + args[0] + ) + ) { + return; + } + console_warn(...args); + }; + + if (import.meta.hot) { + import.meta.hot.on('vite:beforeUpdate', () => { + if (errored) { + location.reload(); + } + }); + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/constants.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/constants.js new file mode 100644 index 0000000000000000000000000000000000000000..982c25d7debe1aeef5ae8206016e6c639e970b27 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/constants.js @@ -0,0 +1,16 @@ +export const SNAPSHOT_KEY = 'sveltekit:snapshot'; +export const SCROLL_KEY = 'sveltekit:scroll'; +export const STATES_KEY = 'sveltekit:states'; +export const PAGE_URL_KEY = 'sveltekit:pageurl'; + +export const HISTORY_INDEX = 'sveltekit:history'; +export const NAVIGATION_INDEX = 'sveltekit:navigation'; + +export const PRELOAD_PRIORITIES = /** @type {const} */ ({ + tap: 1, + hover: 2, + viewport: 3, + eager: 4, + off: -1, + false: -1 +}); diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/entry.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/entry.js new file mode 100644 index 0000000000000000000000000000000000000000..74b0fb283a58c3a406b0a2378938d2df307abe51 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/entry.js @@ -0,0 +1,3 @@ +// we expose this as a separate entry point (rather than treating client.js as the entry point) +// so that everything other than `start`/`load_css` can be treeshaken +export { start, load_css } from './client.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/fetcher.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/fetcher.js new file mode 100644 index 0000000000000000000000000000000000000000..f832c67a4274a1dbff4c985803acf04fd92c4ec0 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/fetcher.js @@ -0,0 +1,179 @@ +import { BROWSER, DEV } from 'esm-env'; +import { noop } from '../../utils/functions.js'; +import { hash } from '../../utils/hash.js'; +import { base64_decode } from '../utils.js'; + +let loading = 0; + +/** @type {typeof fetch} */ +const native_fetch = BROWSER ? window.fetch : /** @type {any} */ (noop); + +export function lock_fetch() { + loading += 1; +} + +export function unlock_fetch() { + loading -= 1; +} + +if (DEV && BROWSER) { + let can_inspect_stack_trace = false; + + // detect whether async stack traces work + // eslint-disable-next-line @typescript-eslint/require-await + const check_stack_trace = async () => { + const stack = /** @type {string} */ (new Error().stack); + can_inspect_stack_trace = stack.includes('check_stack_trace'); + }; + + void check_stack_trace(); + + /** + * @param {RequestInfo | URL} input + * @param {RequestInit & Record | undefined} init + */ + window.fetch = (input, init) => { + // Check if fetch was called via load_node. the lock method only checks if it was called at the + // same time, but not necessarily if it was called from `load`. + // We use just the filename as the method name sometimes does not appear on the CI. + const url = input instanceof Request ? input.url : input.toString(); + const stack_array = /** @type {string} */ (new Error().stack).split('\n'); + // We need to do a cutoff because Safari and Firefox maintain the stack + // across events and for example traces a `fetch` call triggered from a button + // back to the creation of the event listener and the element creation itself, + // where at some point client.js will show up, leading to false positives. + const cutoff = stack_array.findIndex((a) => a.includes('load@') || a.includes('at load')); + const stack = stack_array.slice(0, cutoff + 2).join('\n'); + + const in_load_heuristic = can_inspect_stack_trace + ? stack.includes('src/runtime/client/client.js') + : loading; + + // This flag is set in initial_fetch and subsequent_fetch + const used_kit_fetch = init?.__sveltekit_fetch__; + + if (in_load_heuristic && !used_kit_fetch) { + console.warn( + `Loading ${url} using \`window.fetch\`. For best results, use the \`fetch\` that is passed to your \`load\` function: https://svelte.dev/docs/kit/load#making-fetch-requests` + ); + } + + const method = input instanceof Request ? input.method : init?.method || 'GET'; + + if (method !== 'GET') { + cache.delete(build_selector(input)); + } + + return native_fetch(input, init); + }; +} else if (BROWSER) { + window.fetch = (input, init) => { + const method = input instanceof Request ? input.method : init?.method || 'GET'; + + if (method !== 'GET') { + cache.delete(build_selector(input)); + } + + return native_fetch(input, init); + }; +} + +const cache = new Map(); + +/** + * Should be called on the initial run of load functions that hydrate the page. + * Saves any requests with cache-control max-age to the cache. + * @param {URL | string} resource + * @param {RequestInit} [opts] + */ +export function initial_fetch(resource, opts) { + const selector = build_selector(resource, opts); + + const script = document.querySelector(selector); + if (script?.textContent) { + script.remove(); // In case multiple script tags match the same selector + let { body, ...init } = JSON.parse(script.textContent); + + const ttl = script.getAttribute('data-ttl'); + if (ttl) cache.set(selector, { body, init, ttl: 1000 * Number(ttl) }); + const b64 = script.getAttribute('data-b64'); + if (b64 !== null) { + // Can't use native_fetch('data:...;base64,${body}') + // csp can block the request + body = base64_decode(body); + } + + return Promise.resolve(new Response(body, init)); + } + + return DEV ? dev_fetch(resource, opts) : window.fetch(resource, opts); +} + +/** + * Tries to get the response from the cache, if max-age allows it, else does a fetch. + * @param {URL | string} resource + * @param {string} resolved + * @param {RequestInit} [opts] + */ +export function subsequent_fetch(resource, resolved, opts) { + if (cache.size > 0) { + const selector = build_selector(resource, opts); + const cached = cache.get(selector); + if (cached) { + // https://developer.mozilla.org/en-US/docs/Web/API/Request/cache#value + if ( + performance.now() < cached.ttl && + ['default', 'force-cache', 'only-if-cached', undefined].includes(opts?.cache) + ) { + return new Response(cached.body, cached.init); + } + + cache.delete(selector); + } + } + + return DEV ? dev_fetch(resolved, opts) : window.fetch(resolved, opts); +} + +/** + * @param {RequestInfo | URL} resource + * @param {RequestInit & Record | undefined} opts + */ +export function dev_fetch(resource, opts) { + const patched_opts = { ...opts }; + // This assigns the __sveltekit_fetch__ flag and makes it non-enumerable + Object.defineProperty(patched_opts, '__sveltekit_fetch__', { + value: true, + writable: true, + configurable: true + }); + return window.fetch(resource, patched_opts); +} + +/** + * Build the cache key for a given request + * @param {URL | RequestInfo} resource + * @param {RequestInit} [opts] + */ +function build_selector(resource, opts) { + const url = JSON.stringify(resource instanceof Request ? resource.url : resource); + + let selector = `script[data-sveltekit-fetched][data-url=${url}]`; + + if (opts?.headers || opts?.body) { + /** @type {import('types').StrictBody[]} */ + const values = []; + + if (opts.headers) { + values.push([...new Headers(opts.headers)].join(',')); + } + + if (opts.body && (typeof opts.body === 'string' || ArrayBuffer.isView(opts.body))) { + values.push(opts.body); + } + + selector += `[data-hash="${hash(...values)}"]`; + } + + return selector; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/ndjson.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/ndjson.js new file mode 100644 index 0000000000000000000000000000000000000000..1077eec8406e76c2eb63d4a8677e18ca71ed73f4 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/ndjson.js @@ -0,0 +1,42 @@ +/** + * Yields parsed JSON objects from a ReadableStream of newline-delimited JSON. + * Each yielded value is the raw `JSON.parse`'d object — callers handle deserialization. + * @param {ReadableStreamDefaultReader} reader + */ +export async function* read_ndjson(reader) { + let done = false; + let buffer = ''; + const decoder = new TextDecoder(); + + while (true) { + let split = buffer.indexOf('\n'); + while (split !== -1) { + const line = buffer.slice(0, split).trim(); + buffer = buffer.slice(split + 1); + + if (line) { + yield JSON.parse(line); + } + + split = buffer.indexOf('\n'); + } + + if (done) { + const line = buffer.trim(); + if (line) { + yield JSON.parse(line); + } + return; + } + + const chunk = await reader.read(); + done = chunk.done; + if (chunk.value) { + buffer += decoder.decode(chunk.value, { stream: true }); + } + + if (done) { + buffer += decoder.decode(); + } + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/parse.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/parse.js new file mode 100644 index 0000000000000000000000000000000000000000..20445fc9cef0ca0445499b586022242b30597427 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/parse.js @@ -0,0 +1,77 @@ +import { exec, parse_route_id } from '../../utils/routing.js'; + +/** + * @param {import('./types.js').SvelteKitApp} app + * @returns {import('types').CSRRoute[]} + */ +export function parse({ nodes, server_loads, dictionary, matchers }) { + const layouts_with_server_load = new Set(server_loads); + + return Object.entries(dictionary).map(([id, [leaf, layouts, errors]]) => { + const { pattern, params } = parse_route_id(id); + + /** @type {import('types').CSRRoute} */ + const route = { + id, + /** @param {string} path */ + exec: (path) => { + const match = pattern.exec(path); + if (match) return exec(match, params, matchers); + }, + errors: [1, ...(errors || [])].map((n) => nodes[n]), + layouts: [0, ...(layouts || [])].map(create_layout_loader), + leaf: create_leaf_loader(leaf) + }; + + // bit of a hack, but ensures that layout/error node lists are the same + // length, without which the wrong data will be applied if the route + // manifest looks like `[[a, b], [c,], d]` + route.errors.length = route.layouts.length = Math.max( + route.errors.length, + route.layouts.length + ); + + return route; + }); + + /** + * @param {number} id + * @returns {[boolean, import('types').CSRPageNodeLoader]} + */ + function create_leaf_loader(id) { + // whether or not the route uses the server data is + // encoded using the ones' complement, to save space + const uses_server_data = id < 0; + if (uses_server_data) id = ~id; + return [uses_server_data, nodes[id]]; + } + + /** + * @param {number | undefined} id + * @returns {[boolean, import('types').CSRPageNodeLoader] | undefined} + */ + function create_layout_loader(id) { + // whether or not the layout uses the server data is + // encoded in the layouts array, to save space + return id === undefined ? id : [layouts_with_server_load.has(id), nodes[id]]; + } +} + +/** + * @param {import('types').CSRRouteServer} input + * @param {import('types').CSRPageNodeLoader[]} app_nodes Will be modified if a new node is loaded that's not already in the array + * @returns {import('types').CSRRoute} + */ +export function parse_server_route({ nodes, id, leaf, layouts, errors }, app_nodes) { + return { + id, + exec: () => ({}), // dummy function; exec already happened on the server + // By writing to app_nodes only when a loader at that index is not already defined, + // we ensure that loaders have referential equality when they load the same node. + // Code elsewhere in client.js relies on this referential equality to determine + // if a loader is different and should therefore (re-)run. + errors: errors.map((n) => (n ? (app_nodes[n] ||= nodes[n]) : undefined)), + layouts: layouts.map((n) => (n ? [n[0], (app_nodes[n[1]] ||= nodes[n[1]])] : undefined)), + leaf: [leaf[0], (app_nodes[leaf[1]] ||= nodes[leaf[1]])] + }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/remote-functions/command.svelte.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/remote-functions/command.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..4004b99a5672e06e6c7d062b4d47c2e43d19fb95 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/remote-functions/command.svelte.js @@ -0,0 +1,124 @@ +/** @import { RemoteCommand, RemoteQueryUpdate } from '@sveltejs/kit' */ +/** @import { RemoteFunctionResponse } from 'types' */ +import { app_dir, base } from '$app/paths/internal/client'; +import * as devalue from 'devalue'; +import { HttpError } from '@sveltejs/kit/internal'; +import { app } from '../client.js'; +import { stringify_remote_arg } from '../../shared.js'; +import { + get_remote_request_headers, + apply_refreshes, + categorize_updates, + apply_reconnections +} from './shared.svelte.js'; + +/** + * Client-version of the `command` function from `$app/server`. + * @param {string} id + * @returns {RemoteCommand} + */ +export function command(id) { + /** @type {number} */ + let pending_count = $state(0); + + // Careful: This function MUST be synchronous (can't use the async keyword) because the return type has to be a promise with an updates() method. + // If we make it async, the return type will be a promise that resolves to a promise with an updates() method, which is not what we want. + /** @type {RemoteCommand} */ + const command_function = (arg) => { + let overrides = /** @type {Array<() => void> | null} */ (null); + + /** @type {Set | null} */ + let refreshes = null; + + /** @type {Error | undefined} */ + let updates_error; + + // Increment pending count when command starts + pending_count++; + + // No one should call commands during rendering, but this is belt and braces. + // Do this here, after Svelte's reactivity context is gone. + const headers = { + 'Content-Type': 'application/json', + ...get_remote_request_headers() + }; + + /** @type {Promise & { updates: (...args: RemoteQueryUpdate[]) => Promise }} */ + const promise = (async () => { + try { + // Wait a tick to give room for the `updates` method to be called + await Promise.resolve(); + + if (updates_error) { + throw updates_error; + } + + const response = await fetch(`${base}/${app_dir}/remote/${id}`, { + method: 'POST', + body: JSON.stringify({ + payload: stringify_remote_arg(arg, app.hooks.transport, false), + refreshes: Array.from(refreshes ?? []) + }), + headers + }); + + if (!response.ok) { + // We only end up here in case of a network error or if the server has an internal error + // (which shouldn't happen because we handle errors on the server and always send a 200 response) + throw new Error('Failed to execute remote function'); + } + + const result = /** @type {RemoteFunctionResponse} */ (await response.json()); + if (result.type === 'redirect') { + throw new Error( + 'Redirects are not allowed in commands. Return a result instead and use goto on the client' + ); + } else if (result.type === 'error') { + throw new HttpError(result.status ?? 500, result.error); + } else { + if (result.refreshes) { + apply_refreshes(result.refreshes); + } + + if (result.reconnects) { + apply_reconnections(result.reconnects); + } + + return devalue.parse(result.result, app.decoders); + } + } finally { + overrides?.forEach((fn) => fn()); + + // Decrement pending count when command completes + pending_count--; + } + })(); + + let updates_called = false; + promise.updates = (...args) => { + if (updates_called) { + console.warn( + 'Updates can only be sent once per command invocation. Ignoring additional updates.' + ); + return promise; + } + updates_called = true; + + try { + ({ refreshes, overrides } = categorize_updates(args)); + } catch (error) { + updates_error = /** @type {Error} */ (error); + } + + return promise; + }; + + return promise; + }; + + Object.defineProperty(command_function, 'pending', { + get: () => pending_count + }); + + return command_function; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/remote-functions/form.svelte.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/remote-functions/form.svelte.js new file mode 100644 index 0000000000000000000000000000000000000000..a74bbdfe347307d49ef0ff4d5cae30bfdbccb101 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/src/runtime/client/remote-functions/form.svelte.js @@ -0,0 +1,742 @@ +/** @import { StandardSchemaV1 } from '@standard-schema/spec' */ +/** @import { RemoteFormInput, RemoteForm, RemoteQueryUpdate } from '@sveltejs/kit' */ +/** @import { InternalRemoteFormIssue, RemoteFunctionResponse } from 'types' */ +import { app_dir, base } from '$app/paths/internal/client'; +import * as devalue from 'devalue'; +import { DEV } from 'esm-env'; +import { HttpError } from '@sveltejs/kit/internal'; +import { app, query_responses, _goto, set_nearest_error_page, invalidateAll } from '../client.js'; +import { tick } from 'svelte'; +import { apply_refreshes, categorize_updates, apply_reconnections } from './shared.svelte.js'; +import { createAttachmentKey } from 'svelte/attachments'; +import { + convert_formdata, + flatten_issues, + create_field_proxy, + deep_set, + set_nested_value, + throw_on_old_property_access, + build_path_string, + normalize_issue, + serialize_binary_form, + BINARY_FORM_CONTENT_TYPE +} from '../../form-utils.js'; + +/** + * Merge client issues into server issues. Server issues are persisted unless + * a client-issue exists for the same path, in which case the client-issue overrides it. + * @param {FormData} form_data + * @param {InternalRemoteFormIssue[]} current_issues + * @param {InternalRemoteFormIssue[]} client_issues + * @returns {InternalRemoteFormIssue[]} + */ +function merge_with_server_issues(form_data, current_issues, client_issues) { + const merged = [ + ...current_issues.filter( + (issue) => issue.server && !client_issues.some((i) => i.name === issue.name) + ), + ...client_issues + ]; + + const keys = Array.from(form_data.keys()); + + return merged.sort((a, b) => keys.indexOf(a.name) - keys.indexOf(b.name)); +} + +/** + * Client-version of the `form` function from `$app/server`. + * @template {RemoteFormInput} T + * @template U + * @param {string} id + * @returns {RemoteForm} + */ +export function form(id) { + /** @type {Map }>} */ + const instances = new Map(); + + /** @param {string | number | boolean} [key] */ + function create_instance(key) { + const action_id_without_key = id; + const action_id = id + (key != undefined ? `/${JSON.stringify(key)}` : ''); + const action = '?/remote=' + encodeURIComponent(action_id); + + /** + * @type {Record} + */ + let input = $state({}); + + /** @type {InternalRemoteFormIssue[]} */ + let raw_issues = $state.raw([]); + + const issues = $derived(flatten_issues(raw_issues)); + + /** @type {any} */ + let result = $state.raw(query_responses[action_id]); + + /** @type {number} */ + let pending_count = $state(0); + + /** @type {StandardSchemaV1 | undefined} */ + let preflight_schema = undefined; + + /** @type {HTMLFormElement | null} */ + let element = null; + + /** @type {Record} */ + let touched = {}; + + let submitted = false; + + /** @type {InternalRemoteFormIssue[] | null} */ + let unread_issues = null; + + /** + * In dev, warn if there are validation issues going unread + */ + function warn_on_missing_issue_reads() { + unread_issues = raw_issues; + + setTimeout(() => { + if (unread_issues === null) { + return; + } + + if (unread_issues.length > 0) { + const message = `Form submission had invalid data, but the validation issues were ignored:`; + const summary = unread_issues + .map((issue) => + issue.path.length === 0 + ? ` - ${issue.message}` + : ` - ${issue.path.join('.')} (${issue.message})` + ) + .join('\n'); + const suggestion = `Make sure you provide actionable feedback to users, using e.g. \`myForm.fields.myField.issues()\` or \`myForm.fields.allIssues()\``; + + console.warn(`${message}\n\n${summary}\n\n${suggestion}`); + } + + unread_issues = null; + }); + } + + /** + * @param {FormData} form_data + * @returns {Record} + */ + function convert(form_data) { + const data = convert_formdata(form_data); + if (key !== undefined && !form_data.has('id')) { + data.id = key; + } + return data; + } + + /** + * @param {HTMLFormElement} form + * @param {FormData} form_data + * @param {Parameters['enhance']>[0]} callback + */ + async function handle_submit(form, form_data, callback) { + const data = convert(form_data); + + submitted = true; + + // Increment pending count immediately so that `pending` reflects + // the in-progress state during async preflight validation + pending_count++; + + const validated = await preflight_schema?.['~standard'].validate(data); + + if (validated?.issues) { + raw_issues = merge_with_server_issues( + form_data, + raw_issues, + validated.issues.map((issue) => normalize_issue(issue, false)) + ); + + if (DEV) { + warn_on_missing_issue_reads(); + } + + pending_count--; + return; + } + + // Preflight passed - clear stale client-side preflight issues + if (preflight_schema) { + raw_issues = raw_issues.filter((issue) => issue.server); + } + + // TODO 3.0 remove this warning + if (DEV) { + const error = () => { + throw new Error( + 'Remote form functions no longer get passed a FormData object. The payload is now a POJO. See https://kit.svelte.dev/docs/remote-functions#form for details.' + ); + }; + for (const key of [ + 'append', + 'delete', + 'entries', + 'forEach', + 'get', + 'getAll', + 'has', + 'keys', + 'set', + 'values' + ]) { + if (!(key in data)) { + Object.defineProperty(data, key, { get: error }); + } + } + } + + try { + await callback({ + form, + data, + submit: () => submit(form_data) + }); + } catch (e) { + const error = e instanceof HttpError ? e.body : { message: /** @type {any} */ (e).message }; + const status = e instanceof HttpError ? e.status : 500; + void set_nearest_error_page(error, status); + } finally { + pending_count--; + } + } + + /** + * @param {FormData} data + * @returns {Promise & { updates: (...args: any[]) => Promise }} + */ + function submit(data) { + // Store a reference to the current instance and increment the usage count for the duration + // of the request. This ensures that the instance is not deleted in case of an optimistic update + // (e.g. when deleting an item in a list) that fails and wants to surface an error to the user afterwards. + // If the instance would be deleted in the meantime, the error property would be assigned to the old, + // no-longer-visible instance, so it would never be shown to the user. + const entry = instances.get(key); + if (entry) { + entry.count++; + } + + let overrides = /** @type {Array<() => void> | null} */ (null); + + /** @type {Set | null} */ + let refreshes = null; + + /** @type {Error | undefined} */ + let updates_error; + + /** @type {Promise & { updates: (...args: RemoteQueryUpdate[]) => Promise }} */ + const promise = (async () => { + try { + await Promise.resolve(); + + if (updates_error) { + throw updates_error; + } + + const { blob } = serialize_binary_form(convert(data), { + remote_refreshes: Array.from(refreshes ?? []) + }); + + const response = await fetch(`${base}/${app_dir}/remote/${action_id_without_key}`, { + method: 'POST', + headers: { + 'Content-Type': BINARY_FORM_CONTENT_TYPE, + // Forms cannot be called during rendering, so it's save to use location here + 'x-sveltekit-pathname': location.pathname, + 'x-sveltekit-search': location.search + }, + body: blob + }); + + if (!response.ok) { + // We only end up here in case of a network error or if the server has an internal error + // (which shouldn't happen because we handle errors on the server and always send a 200 response) + throw new Error('Failed to execute remote function'); + } + + const form_result = /** @type { RemoteFunctionResponse} */ (await response.json()); + + // reset issues in case it's a redirect or error (but issues passed in that case) + raw_issues = []; + result = undefined; + + if (form_result.type === 'result') { + ({ issues: raw_issues = [], result } = devalue.parse(form_result.result, app.decoders)); + const succeeded = raw_issues.length === 0; + + if (succeeded) { + if (refreshes === null && !form_result.refreshes && !form_result.reconnects) { + void invalidateAll(); + } else { + if (form_result.refreshes) { + apply_refreshes(form_result.refreshes); + } + if (form_result.reconnects) { + apply_reconnections(form_result.reconnects); + } + } + } else { + if (DEV) { + warn_on_missing_issue_reads(); + } + } + + return succeeded; + } else if (form_result.type === 'redirect') { + const stringified_refreshes = form_result.refreshes ?? ''; + const stringified_reconnects = form_result.reconnects ?? ''; + if (stringified_refreshes) { + apply_refreshes(stringified_refreshes); + } + + if (stringified_reconnects) { + apply_reconnections(stringified_reconnects); + } + + // Use internal version to allow redirects to external URLs + void _goto( + form_result.location, + { + invalidateAll: + refreshes === null && !stringified_refreshes && !stringified_reconnects + }, + 0 + ); + return true; + } else { + throw new HttpError(form_result.status ?? 500, form_result.error); + } + } catch (e) { + result = undefined; + throw e; + } finally { + overrides?.forEach((fn) => fn()); + + void tick().then(() => { + if (entry) { + entry.count--; + if (entry.count === 0) { + instances.delete(key); + } + } + }); + } + })(); + + let updates_called = false; + promise.updates = (...args) => { + if (updates_called) { + console.warn( + 'Updates can only be sent once per form submission. Ignoring additional updates.' + ); + return promise; + } + updates_called = true; + + try { + ({ refreshes, overrides } = categorize_updates(args)); + } catch (error) { + updates_error = /** @type {Error} */ (error); + } + + return promise; + }; + + return promise; + } + + /** @type {RemoteForm} */ + const instance = {}; + + instance.method = 'POST'; + instance.action = action; + + /** @param {Parameters['enhance']>[0]} callback */ + const form_onsubmit = (callback) => { + /** @param {SubmitEvent} event */ + return async (event) => { + const form = /** @type {HTMLFormElement} */ (event.target); + const method = event.submitter?.hasAttribute('formmethod') + ? /** @type {HTMLButtonElement | HTMLInputElement} */ (event.submitter).formMethod + : clone(form).method; + + if (method !== 'post') return; + + const action = new URL( + // We can't do submitter.formAction directly because that property is always set + event.submitter?.hasAttribute('formaction') + ? /** @type {HTMLButtonElement | HTMLInputElement} */ (event.submitter).formAction + : clone(form).action + ); + + if (action.searchParams.get('/remote') !== action_id) { + return; + } + + const target = event.submitter?.hasAttribute('formtarget') + ? /** @type {HTMLButtonElement | HTMLInputElement} */ (event.submitter).formTarget + : clone(form).target; + + if (target === '_blank') { + return; + } + + event.preventDefault(); + + const form_data = new FormData(form, event.submitter); + + if (DEV) { + validate_form_data(form_data, clone(form).enctype); + } + + await handle_submit(form, form_data, callback); + }; + }; + + /** @param {(event: SubmitEvent) => void} onsubmit */ + function create_attachment(onsubmit) { + return (/** @type {HTMLFormElement} */ form) => { + if (element) { + let message = `A form object can only be attached to a single \`
\` element`; + if (DEV && !key) { + const name = id.split('/').pop(); + message += `. To create multiple instances, use \`${name}.for(key)\``; + } + + throw new Error(message); + } + + element = form; + + touched = {}; + + form.addEventListener('submit', onsubmit); + + /** @param {Event} e */ + const handle_input = (e) => { + // strictly speaking it can be an HTMLTextAreaElement or HTMLSelectElement + // but that makes the types unnecessarily awkward + const element = /** @type {HTMLInputElement} */ (e.target); + + let name = element.name; + if (!name) return; + + const is_array = name.endsWith('[]'); + if (is_array) name = name.slice(0, -2); + + const is_file = element.type === 'file'; + + touched[name] = true; + + if (is_array) { + let value; + + if (element.tagName === 'SELECT') { + value = Array.from( + element.querySelectorAll('option:checked'), + (e) => /** @type {HTMLOptionElement} */ (e).value + ); + } else { + const elements = /** @type {HTMLInputElement[]} */ ( + Array.from(form.querySelectorAll(`[name="${name}[]"]`)) + ); + + if (DEV) { + for (const e of elements) { + if ((e.type === 'file') !== is_file) { + throw new Error( + `Cannot mix and match file and non-file inputs under the same name ("${element.name}")` + ); + } + } + } + + value = is_file + ? elements.map((input) => Array.from(input.files ?? [])).flat() + : elements.map((element) => element.value); + if (element.type === 'checkbox') { + value = /** @type {string[]} */ (value.filter((_, i) => elements[i].checked)); + } + } + + set_nested_value(input, name, value); + } else if (is_file) { + if (DEV && element.multiple) { + throw new Error( + `Can only use the \`multiple\` attribute when \`name\` includes a \`[]\` suffix — consider changing "${name}" to "${name}[]"` + ); + } + + const file = /** @type {HTMLInputElement & { files: FileList }} */ (element).files[0]; + + if (file) { + set_nested_value(input, name, file); + } else { + // Remove the property by setting to undefined and clean up + const path_parts = name.split(/\.|\[|\]/).filter(Boolean); + let current = /** @type {any} */ (input); + for (let i = 0; i < path_parts.length - 1; i++) { + if (current[path_parts[i]] == null) return; + current = current[path_parts[i]]; + } + delete current[path_parts[path_parts.length - 1]]; + } + } else { + set_nested_value( + input, + name, + element.type === 'checkbox' && !element.checked ? null : element.value + ); + } + + name = name.replace(/^[nb]:/, ''); + + touched[name] = true; + }; + + form.addEventListener('input', handle_input); + + const handle_reset = async () => { + // need to wait a moment, because the `reset` event occurs before + // the inputs are actually updated (so that it can be cancelled) + await tick(); + + input = convert_formdata(new FormData(form)); + }; + + form.addEventListener('reset', handle_reset); + + return () => { + form.removeEventListener('submit', onsubmit); + form.removeEventListener('input', handle_input); + form.removeEventListener('reset', handle_reset); + element = null; + preflight_schema = undefined; + }; + }; + } + + instance[createAttachmentKey()] = create_attachment( + form_onsubmit(({ submit, form }) => + submit().then((succeeded) => { + if (succeeded) { + form.reset(); + } + }) + ) + ); + + let validate_id = 0; + + // TODO 3.0 remove + if (DEV) { + throw_on_old_property_access(instance); + + Object.defineProperty(instance, 'buttonProps', { + get() { + throw new Error( + '`form.buttonProps` has been removed: Instead of ` + * ``` + */ + depends: (...deps: Array<`${string}:${string}`>) => void; + /** + * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example: + * + * ```js + * /// file: src/routes/+page.server.js + * export async function load({ untrack, url }) { + * // Untrack url.pathname so that path changes don't trigger a rerun + * if (untrack(() => url.pathname === '/')) { + * return { message: 'Welcome!' }; + * } + * } + * ``` + */ + untrack: (fn: () => T) => T; + + /** + * Access to spans for tracing. If tracing is not enabled or the function is being run in the browser, these spans will do nothing. + * @since 2.31.0 + */ + tracing: { + /** Whether tracing is enabled. */ + enabled: boolean; + /** The root span for the request. This span is named `sveltekit.handle.root`. */ + root: Span; + /** The span associated with the current `load` function. */ + current: Span; + }; + } + + export interface NavigationEvent< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + RouteId extends AppRouteId | null = AppRouteId | null + > { + /** + * The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object + */ + params: Params; + /** + * Info about the current route + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * The URL of the current page + */ + url: URL; + } + + /** + * Information about the target of a specific navigation. + */ + export interface NavigationTarget< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + RouteId extends AppRouteId | null = AppRouteId | null + > { + /** + * Parameters of the target page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + * Is `null` if the target is not part of the SvelteKit app (could not be resolved to a route). + */ + params: Params | null; + /** + * Info about the target route + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId | null; + }; + /** + * The URL that is navigated to + */ + url: URL; + /** + * The scroll position associated with this navigation. + * + * For the `from` target, this is the scroll position at the moment of navigation. + * + * For the `to` target, this represents the scroll position that will be or was restored: + * - In `beforeNavigate` and `onNavigate`, this is only available for `popstate` navigations (back/forward button) + * and will be `null` for other navigation types, since the final scroll position isn't known + * ahead of time. + * - In `afterNavigate`, this is always the scroll position that was applied after the navigation + * completed. + */ + scroll: { x: number; y: number } | null; + } + + /** + * - `enter`: The app has hydrated/started + * - `form`: The user submitted a `` + * - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + export type NavigationType = 'enter' | 'form' | 'leave' | 'link' | 'goto' | 'popstate'; + + export interface NavigationBase { + /** + * Where navigation was triggered from + */ + from: NavigationTarget | null; + /** + * Where navigation is going to/has gone to + */ + to: NavigationTarget | null; + /** + * Whether or not the navigation will result in the page being unloaded (i.e. not a client-side navigation). + */ + willUnload: boolean; + /** + * A promise that resolves once the navigation is complete, and rejects if the navigation + * fails or is aborted. In the case of a `willUnload` navigation, the promise will never resolve + */ + complete: Promise; + } + + export interface NavigationEnter extends NavigationBase { + /** + * The type of navigation: + * - `enter`: The app has hydrated/started + */ + type: 'enter'; + + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: undefined; + + /** + * Dispatched `Event` object when navigation occurred by `popstate` or `link`. + */ + event?: undefined; + } + + export type NavigationExternal = NavigationGoto | NavigationLeave; + + export interface NavigationGoto extends NavigationBase { + /** + * The type of navigation: + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + */ + type: 'goto'; + + // TODO 3.0 remove this property, so that it only exists when type is 'popstate' + // (would possibly be a breaking change to do it prior to that) + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: undefined; + } + + export interface NavigationLeave extends NavigationBase { + /** + * The type of navigation: + * - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring + */ + type: 'leave'; + + // TODO 3.0 remove this property, so that it only exists when type is 'popstate' + // (would possibly be a breaking change to do it prior to that) + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: undefined; + } + + export interface NavigationFormSubmit extends NavigationBase { + /** + * The type of navigation: + * - `form`: The user submitted a `` + */ + type: 'form'; + + /** + * The `SubmitEvent` that caused the navigation + */ + event: SubmitEvent; + + // TODO 3.0 remove this property, so that it only exists when type is 'popstate' + // (would possibly be a breaking change to do it prior to that) + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: undefined; + } + + export interface NavigationPopState extends NavigationBase { + /** + * The type of navigation: + * - `popstate`: Navigation was triggered by back/forward navigation + */ + type: 'popstate'; + + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta: number; + + /** + * The `PopStateEvent` that caused the navigation + */ + event: PopStateEvent; + } + + export interface NavigationLink extends NavigationBase { + /** + * The type of navigation: + * - `link`: Navigation was triggered by a link click + */ + type: 'link'; + + /** + * The `PointerEvent` that caused the navigation + */ + event: PointerEvent; + + // TODO 3.0 remove this property, so that it only exists when type is 'popstate' + // (would possibly be a breaking change to do it prior to that) + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: undefined; + } + + export type Navigation = + | NavigationExternal + | NavigationFormSubmit + | NavigationPopState + | NavigationLink; + + /** + * The argument passed to [`beforeNavigate`](https://svelte.dev/docs/kit/$app-navigation#beforeNavigate) callbacks. + */ + export type BeforeNavigate = Navigation & { + /** + * Call this to prevent the navigation from starting. + */ + cancel: () => void; + }; + + /** + * The argument passed to [`onNavigate`](https://svelte.dev/docs/kit/$app-navigation#onNavigate) callbacks. + */ + export type OnNavigate = Navigation & { + type: Exclude; + /** + * Since `onNavigate` callbacks are called immediately before a client-side navigation, they will never be called with a navigation that unloads the page. + */ + willUnload: false; + }; + + /** + * The argument passed to [`afterNavigate`](https://svelte.dev/docs/kit/$app-navigation#afterNavigate) callbacks. + */ + export type AfterNavigate = (Navigation | NavigationEnter) & { + type: Exclude; + /** + * Since `afterNavigate` callbacks are called after a navigation completes, they will never be called with a navigation that unloads the page. + */ + willUnload: false; + }; + + /** + * The shape of the [`page`](https://svelte.dev/docs/kit/$app-state#page) reactive object and the [`$page`](https://svelte.dev/docs/kit/$app-stores) store. + */ + export interface Page< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + RouteId extends AppRouteId | null = AppRouteId | null + > { + /** + * The URL of the current page. + */ + url: URL & { pathname: ResolvedPathname }; + /** + * The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + */ + params: Params; + /** + * Info about the current route. + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * HTTP status code of the current page. + */ + status: number; + /** + * The error object of the current page, if any. Filled from the `handleError` hooks. + */ + error: App.Error | null; + /** + * The merged result of all data from all `load` functions on the current page. You can type a common denominator through `App.PageData`. + */ + data: App.PageData & Record; + /** + * The page state, which can be manipulated using the [`pushState`](https://svelte.dev/docs/kit/$app-navigation#pushState) and [`replaceState`](https://svelte.dev/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`. + */ + state: App.PageState; + /** + * Filled only after a form submission. See [form actions](https://svelte.dev/docs/kit/form-actions) for more info. + */ + form: any; + } + + /** + * The shape of a param matcher. See [matching](https://svelte.dev/docs/kit/advanced-routing#Matching) for more info. + */ + export type ParamMatcher = (param: string) => boolean; + + /** + * A single entry yielded by [`requested`](https://svelte.dev/docs/kit/$app-server#requested) + * when called with a regular `query`. `arg` is the validated argument (the input *after* + * the query's schema validated and transformed it, if applicable); `query` is a + * `RemoteQuery` bound to the client's original cache key, so `refresh()` / `set()` will + * update the correct client entry. + */ + export type RequestedEntry = { + arg: Validated; + query: RemoteQuery; + }; + + /** + * A single entry yielded by [`requested`](https://svelte.dev/docs/kit/$app-server#requested) + * when called with a `query.live`. `arg` is the validated argument; `query` is a + * `RemoteLiveQuery` bound to the client's original cache key, so `reconnect()` targets + * the correct client subscription. + */ + export type LiveRequestedEntry = { + arg: Validated; + query: RemoteLiveQuery; + }; + + export type QueryRequestedResult = Iterable> & + AsyncIterable> & { + /** + * Call `refresh` on all queries selected by this `requested` invocation. + * This is identical to: + * ```ts + * import { requested } from '$app/server'; + * + * for await (const { query } of requested(getPost, ...)) { + * void query.refresh(); + * } + * ``` + */ + refreshAll: () => Promise; + }; + + export type LiveQueryRequestedResult = Iterable< + LiveRequestedEntry + > & + AsyncIterable> & { + /** + * Call `reconnect` on all live queries selected by this `requested` invocation. + * This is identical to: + * ```ts + * import { requested } from '$app/server'; + * + * for await (const { query } of requested(liveQuery, ...)) { + * void query.reconnect(); + * } + * ``` + */ + reconnectAll: () => Promise; + }; + + export type RequestedResult = + | QueryRequestedResult + | LiveQueryRequestedResult; + + export interface RequestEvent< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + RouteId extends AppRouteId | null = AppRouteId | null + > { + /** + * Get or set cookies related to the current request + */ + cookies: Cookies; + /** + * `fetch` is equivalent to the [native `fetch` web API](https://developer.mozilla.org/en-US/docs/Web/API/fetch), with a few additional features: + * + * - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request. + * - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context). + * - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call. + * - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) + * - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request. + * + * You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies). + */ + fetch: typeof fetch; + /** + * The client's IP address, set by the adapter. + */ + getClientAddress: () => string; + /** + * Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle). + */ + locals: App.Locals; + /** + * The parameters of the current route - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + */ + params: Params; + /** + * Additional data made available through the adapter. + */ + platform: Readonly | undefined; + /** + * The original request object. + */ + request: Request; + /** + * Info about the current route. + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * If you need to set headers for the response, you can do so using the this method. This is useful if you want the page to be cached, for example: + * + * ```js + * /// file: src/routes/blog/+page.js + * export async function load({ fetch, setHeaders }) { + * const url = `https://cms.example.com/articles.json`; + * const response = await fetch(url); + * + * setHeaders({ + * age: response.headers.get('age'), + * 'cache-control': response.headers.get('cache-control') + * }); + * + * return response.json(); + * } + * ``` + * + * Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once. + * + * You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API instead. + */ + setHeaders: (headers: Record) => void; + /** + * The requested URL. + */ + url: URL; + /** + * `true` if the request comes from the client asking for `+page/layout.server.js` data. The `url` property will be stripped of the internal information + * related to the data request in this case. Use this property instead if the distinction is important to you. + */ + isDataRequest: boolean; + /** + * `true` for `+server.js` calls coming from SvelteKit without the overhead of actually making an HTTP request. This happens when you make same-origin `fetch` requests on the server. + */ + isSubRequest: boolean; + + /** + * Access to spans for tracing. If tracing is not enabled, these spans will do nothing. + * @since 2.31.0 + */ + tracing: { + /** Whether tracing is enabled. */ + enabled: boolean; + /** The root span for the request. This span is named `sveltekit.handle.root`. */ + root: Span; + /** The span associated with the current `handle` hook, `load` function, or form action. */ + current: Span; + }; + + /** + * `true` if the request comes from the client via a remote function. The `url` property will be stripped of the internal information + * related to the data request in this case. Use this property instead if the distinction is important to you. + */ + isRemoteRequest: boolean; + } + + /** + * A `(event: RequestEvent) => Response` function exported from a `+server.js` file that corresponds to an HTTP verb (`GET`, `PUT`, `PATCH`, etc) and handles requests with that method. + * + * It receives `Params` as the first generic argument, which you can skip by using [generated types](https://svelte.dev/docs/kit/types#Generated-types) instead. + */ + export type RequestHandler< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + RouteId extends AppRouteId | null = AppRouteId | null + > = (event: RequestEvent) => MaybePromise; + + export interface ResolveOptions { + /** + * Applies custom transforms to HTML. If `done` is true, it's the final chunk. Chunks are not guaranteed to be well-formed HTML + * (they could include an element's opening tag but not its closing tag, for example) + * but they will always be split at sensible boundaries such as `%sveltekit.head%` or layout/page components. + * @param input the html chunk and the info if this is the last chunk + */ + transformPageChunk?: (input: { html: string; done: boolean }) => MaybePromise; + /** + * Determines which headers should be included in serialized responses when a `load` function loads a resource with `fetch`. + * By default, none will be included. + * @param name header name + * @param value header value + */ + filterSerializedResponseHeaders?: (name: string, value: string) => boolean; + /** + * Determines what should be added to the `` tag to preload it. + * By default, `js` and `css` files will be preloaded. + * @param input the type of the file and its path + */ + preload?: (input: { type: 'font' | 'css' | 'js' | 'asset'; path: string }) => boolean; + } + + export interface RouteDefinition { + id: string; + api: { + methods: Array; + }; + page: { + methods: Array>; + }; + pattern: RegExp; + prerender: PrerenderOption; + segments: RouteSegment[]; + methods: Array; + config: Config; + } + + export class Server { + constructor(manifest: SSRManifest); + init(options: ServerInitOptions): Promise; + respond(request: Request, options: RequestOptions): Promise; + } + + export interface ServerInitOptions { + /** A map of environment variables. */ + env: Record; + /** A function that turns an asset filename into a `ReadableStream`. Required for the `read` export from `$app/server` to work. */ + read?: (file: string) => MaybePromise; + } + + export interface SSRManifest { + appDir: string; + appPath: string; + /** Static files from `kit.config.files.assets` and the service worker (if any). */ + assets: Set; + mimeTypes: Record; + + /** private fields */ + _: { + client: NonNullable; + nodes: SSRNodeLoader[]; + /** hashed filename -> import to that file */ + remotes: Record Promise>; + routes: SSRRoute[]; + prerendered_routes: Set; + matchers: () => Promise>; + /** A `[file]: size` map of all assets imported by server code. */ + server_assets: Record; + }; + } + + /** + * The generic form of `PageServerLoad` and `LayoutServerLoad`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `ServerLoad` directly. + */ + export type ServerLoad< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + ParentData extends Record = Record, + OutputData extends Record | void = Record | void, + RouteId extends AppRouteId | null = AppRouteId | null + > = (event: ServerLoadEvent) => MaybePromise; + + export interface ServerLoadEvent< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + ParentData extends Record = Record, + RouteId extends AppRouteId | null = AppRouteId | null + > extends RequestEvent { + /** + * `await parent()` returns data from parent `+layout.server.js` `load` functions. + * + * Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data. + */ + parent: () => Promise; + /** + * This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun. + * + * Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`. + * + * URLs can be absolute or relative to the page being loaded, and must be [encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). + * + * Custom identifiers have to be prefixed with one or more lowercase letters followed by a colon to conform to the [URI specification](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * The following example shows how to use `depends` to register a dependency on a custom identifier, which is `invalidate`d after a button click, making the `load` function rerun. + * + * ```js + * /// file: src/routes/+page.js + * let count = 0; + * export async function load({ depends }) { + * depends('increase:count'); + * + * return { count: count++ }; + * } + * ``` + * + * ```html + * /// file: src/routes/+page.svelte + * + * + *

{data.count}

+ * + * ``` + */ + depends: (...deps: string[]) => void; + /** + * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example: + * + * ```js + * /// file: src/routes/+page.js + * export async function load({ untrack, url }) { + * // Untrack url.pathname so that path changes don't trigger a rerun + * if (untrack(() => url.pathname === '/')) { + * return { message: 'Welcome!' }; + * } + * } + * ``` + */ + untrack: (fn: () => T) => T; + + /** + * Access to spans for tracing. If tracing is not enabled, these spans will do nothing. + * @since 2.31.0 + */ + tracing: { + /** Whether tracing is enabled. */ + enabled: boolean; + /** The root span for the request. This span is named `sveltekit.handle.root`. */ + root: Span; + /** The span associated with the current server `load` function. */ + current: Span; + }; + } + + /** + * Shape of a form action method that is part of `export const actions = {...}` in `+page.server.js`. + * See [form actions](https://svelte.dev/docs/kit/form-actions) for more information. + */ + export type Action< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + OutputData extends Record | void = Record | void, + RouteId extends AppRouteId | null = AppRouteId | null + > = (event: RequestEvent) => MaybePromise; + + /** + * Shape of the `export const actions = {...}` object in `+page.server.js`. + * See [form actions](https://svelte.dev/docs/kit/form-actions) for more information. + */ + export type Actions< + Params extends AppLayoutParams<'/'> = AppLayoutParams<'/'>, + OutputData extends Record | void = Record | void, + RouteId extends AppRouteId | null = AppRouteId | null + > = Record>; + + /** + * When calling a form action via fetch, the response will be one of these shapes. + * ```svelte + * { + * return ({ result }) => { + * // result is of type ActionResult + * }; + * }} + * ``` + */ + export type ActionResult< + Success extends Record | undefined = Record, + Failure extends Record | undefined = Record + > = + | { type: 'success'; status: number; data?: Success } + | { type: 'failure'; status: number; data?: Failure } + | { type: 'redirect'; status: number; location: string } + | { type: 'error'; status?: number; error: any }; + + /** + * The object returned by the [`error`](https://svelte.dev/docs/kit/@sveltejs-kit#error) function. + */ + export interface HttpError { + /** The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses), in the range 400-599. */ + status: number; + /** The content of the error. */ + body: App.Error; + } + + /** + * The object returned by the [`redirect`](https://svelte.dev/docs/kit/@sveltejs-kit#redirect) function. + */ + export interface Redirect { + /** The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages), in the range 300-308. */ + status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308; + /** The location to redirect to. */ + location: string; + } + + export type SubmitFunction< + Success extends Record | undefined = Record, + Failure extends Record | undefined = Record + > = (input: { + action: URL; + formData: FormData; + formElement: HTMLFormElement; + controller: AbortController; + submitter: HTMLElement | null; + cancel: () => void; + }) => MaybePromise< + | void + | ((opts: { + formData: FormData; + formElement: HTMLFormElement; + action: URL; + result: ActionResult; + /** + * Call this to get the default behavior of a form submission response. + * @param options Set `reset: false` if you don't want the `` values to be reset after a successful submission. + * @param invalidateAll Set `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission. + */ + update: (options?: { reset?: boolean; invalidateAll?: boolean }) => Promise; + }) => MaybePromise) + >; + + /** + * The type of `export const snapshot` exported from a page or layout component. + */ + export interface Snapshot { + capture: () => T; + restore: (snapshot: T) => void; + } + + // If T is unknown or has an index signature, the types below will recurse indefinitely and create giant unions that TS can't handle + type WillRecurseIndefinitely = unknown extends T ? true : string extends keyof T ? true : false; + + // Input type mappings for form fields + type InputTypeMap = { + text: string; + email: string; + password: string; + url: string; + tel: string; + search: string; + number: number; + range: number; + date: string; + 'datetime-local': string; + time: string; + month: string; + week: string; + color: string; + checkbox: boolean | string[]; + radio: string; + file: File; + hidden: string | number | boolean; + submit: string | number | boolean; + button: string; + reset: string; + image: string; + select: string; + 'select multiple': string[]; + 'file multiple': File[]; + }; + + // Valid input types for a given value type + export type RemoteFormFieldType = { + [K in keyof InputTypeMap]: T extends InputTypeMap[K] ? K : never; + }[keyof InputTypeMap]; + + // Input element properties based on type + type InputElementProps = T extends 'checkbox' | 'radio' + ? { + name: string; + type: T; + value?: string; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get checked(): boolean; + set checked(value: boolean); + readonly defaultChecked?: boolean; + } + : T extends 'file' + ? { + name: string; + type: 'file'; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get files(): FileList | null; + set files(v: FileList | null); + } + : T extends 'select' + ? { + name: string; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get value(): string; + set value(v: string); + } + : T extends 'select multiple' + ? { + name: string; + multiple: true; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get value(): string[]; + set value(v: string[]); + } + : T extends 'text' + ? { + name: string; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get value(): string | number; + set value(v: string | number); + readonly defaultValue?: string | number; + } + : { + name: string; + type: T; + 'aria-invalid': boolean | 'false' | 'true' | undefined; + get value(): string | number; + set value(v: string | number); + readonly defaultValue?: string | number; + }; + + type RemoteFormFieldMethods = { + /** The values that will be submitted */ + value(): DeepPartial; + /** Set the values that will be submitted */ + set(input: DeepPartial): DeepPartial; + /** Validation issues, if any */ + issues(): RemoteFormIssue[] | undefined; + }; + + // These two types use "T extends unknown ? .. : .." to distribute over unions. + // Example: if "type T = A | b" then "keyof T" only contains keys that both A and B have, with "KeysOfUnion" we get the keys of both A and B + type KeysOfUnion = T extends unknown ? keyof T : never; + type ValueOfUnionKey = T extends unknown + ? K extends keyof T + ? T[K] + : never + : never; + + export type RemoteFormFieldValue = string | string[] | number | boolean | File | File[]; + + type AsArgs = Type extends 'checkbox' + ? Value extends string[] + ? [type: Type, value: Value[number] | (string & {})] + : Value extends boolean + ? [type: Type] | [type: Type, value: boolean] + : [type: Type] | [type: Type, value: Value | (string & {})] + : Type extends 'submit' | 'hidden' + ? Value extends string + ? [type: Type, value: Value | (string & {})] + : [type: Type, value: Value] + : Type extends 'radio' + ? [type: Type, value: Value | (string & {})] + : Type extends 'file' | 'file multiple' + ? [type: Type] + : [type: Type] | [type: Type, value: Value | (string & {})]; + + /** + * Form field accessor type that provides name(), value(), and issues() methods + */ + export type RemoteFormField = RemoteFormFieldMethods & { + /** + * Returns an object that can be spread onto an input element with the correct type attribute, + * aria-invalid attribute if the field is invalid, and appropriate value/checked property getters/setters. + * @example + * ```svelte + * + * + * + * ``` + */ + as>(...args: AsArgs): InputElementProps; + }; + + type RemoteFormFieldContainer = RemoteFormFieldMethods & { + /** Validation issues belonging to this or any of the fields that belong to it, if any */ + allIssues(): RemoteFormIssue[] | undefined; + }; + + type UnknownField = RemoteFormFieldMethods & { + /** Validation issues belonging to this or any of the fields that belong to it, if any */ + allIssues(): RemoteFormIssue[] | undefined; + /** + * Returns an object that can be spread onto an input element with the correct type attribute, + * aria-invalid attribute if the field is invalid, and appropriate value/checked property getters/setters. + * @example + * ```svelte + * + * + * + * ``` + */ + as>(...args: AsArgs): InputElementProps; + } & { + [key: string | number]: UnknownField; + }; + + type RemoteFormFieldsRoot = + IsAny extends true + ? RecursiveFormFields + : Input extends void + ? { + /** Validation issues, if any */ + issues(): RemoteFormIssue[] | undefined; + /** Validation issues belonging to this or any of the fields that belong to it, if any */ + allIssues(): RemoteFormIssue[] | undefined; + } + : RemoteFormFields; + + /** + * Recursive type to build form fields structure with proxy access + */ + export type RemoteFormFields = + WillRecurseIndefinitely extends true + ? RecursiveFormFields + : NonNullable extends string | number | boolean | File + ? RemoteFormField> + : // [NonNullable] is used to prevent distributing over union while still allowing + // nullable wrappers (e.g. `string[] | undefined` from a schema with `.default([])`) + // to be treated as arrays; only the last condition should distribute over unions + [NonNullable] extends [string[] | File[]] + ? RemoteFormField> & { + [K in number]: RemoteFormField[number]>; + } + : [NonNullable] extends [Array] + ? RemoteFormFieldContainer> & { + [K in number]: RemoteFormFields; + } + : RemoteFormFieldContainer & { + [K in KeysOfUnion]-?: RemoteFormFields>; + }; + + // By breaking this out into its own type, we avoid the TS recursion depth limit + type RecursiveFormFields = RemoteFormFieldContainer & { + [key: string | number]: UnknownField; + }; + + type MaybeArray = T | T[]; + + export interface RemoteFormInput { + [key: string]: MaybeArray; + } + + export interface RemoteFormIssue { + message: string; + path: Array; + } + + // If the schema specifies `id` as a string or number, ensure that `for(...)` + // only accepts that type. Otherwise, accept `string | number` + type ExtractId = Input extends { id: infer Id } + ? Id extends string | number + ? Id + : string | number + : string | number; + + /** + * A function and proxy object used to imperatively create validation errors in form handlers. + * + * Access properties to create field-specific issues: `issue.fieldName('message')`. + * The type structure mirrors the input data structure for type-safe field access. + * Call `invalid(issue.foo(...), issue.nested.bar(...))` to throw a validation error. + */ + export type InvalidField = + WillRecurseIndefinitely extends true + ? Record + : NonNullable extends string | number | boolean | File + ? (message: string) => StandardSchemaV1.Issue + : NonNullable extends Array + ? { + [K in number]: InvalidField; + } & ((message: string) => StandardSchemaV1.Issue) + : NonNullable extends RemoteFormInput + ? { + [K in keyof T]-?: InvalidField; + } & ((message: string) => StandardSchemaV1.Issue) + : Record; + + /** + * A validation error thrown by `invalid`. + */ + export interface ValidationError { + /** The validation issues */ + issues: StandardSchemaV1.Issue[]; + } + + /** + * The type of a remote `form` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#form) for full documentation. + */ + export type RemoteForm = { + /** Attachment that sets up an event handler that intercepts the form submission on the client to prevent a full page reload */ + [attachment: symbol]: (node: HTMLFormElement) => void; + method: 'POST'; + /** The URL to send the form to. */ + action: string; + /** Use the `enhance` method to influence what happens when the form is submitted. */ + enhance( + callback: (opts: { + form: HTMLFormElement; + data: Input; + submit: () => Promise & { + updates: (...updates: RemoteQueryUpdate[]) => Promise; + }; + }) => MaybePromise + ): { + method: 'POST'; + action: string; + [attachment: symbol]: (node: HTMLFormElement) => void; + }; + /** + * Create an instance of the form for the given `id`. + * The `id` is stringified and used for deduplication to potentially reuse existing instances. + * Useful when you have multiple forms that use the same remote form action, for example in a loop. + * ```svelte + * {#each todos as todo} + * {@const todoForm = updateTodo.for(todo.id)} + * + * {#if todoForm.result?.invalid}

Invalid data

{/if} + * ... + * + * {/each} + * ``` + */ + for(id: ExtractId): Omit, 'for'>; + /** Preflight checks */ + preflight(schema: StandardSchemaV1): RemoteForm; + /** Validate the form contents programmatically */ + validate(options?: { + /** Set this to `true` to also show validation issues of fields that haven't been touched yet. */ + includeUntouched?: boolean; + /** Set this to `true` to only run the `preflight` validation. */ + preflightOnly?: boolean; + }): Promise; + /** The result of the form submission */ + get result(): Output | undefined; + /** The number of pending submissions */ + get pending(): number; + /** Access form fields using object notation */ + fields: RemoteFormFieldsRoot; + }; + + /** + * The type of a remote `command` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#command) for full documentation. + */ + export type RemoteCommand = { + (arg: undefined extends Input ? Input | void : Input): Promise & { + updates(...updates: RemoteQueryUpdate[]): Promise; + }; + /** The number of pending command executions */ + get pending(): number; + }; + + export type RemoteQueryUpdate = + | RemoteQuery + | RemoteLiveQuery + | RemoteQueryFunction + | RemoteLiveQueryFunction + | RemoteQueryOverride; + + export type RemoteResource = Promise & { + /** The error in case the query fails. Most often this is a [`HttpError`](https://svelte.dev/docs/kit/@sveltejs-kit#HttpError) but it isn't guaranteed to be. */ + get error(): any; + /** `true` before the first result is available and during refreshes */ + get loading(): boolean; + } & ( + | { + /** The current value of the query. Undefined until `ready` is `true` */ + get current(): undefined; + ready: false; + } + | { + /** The current value of the query. Undefined until `ready` is `true` */ + get current(): T; + ready: true; + } + ); + + export type RemoteQuery = RemoteResource & { + /** + * Returns a plain promise with the result. + * Unlike awaiting the resource directly, this can only be used _outside_ render + * (i.e. in load functions, event handlers and so on) + */ + run(): Promise; + /** + * On the client, this function will update the value of the query without re-fetching it. + * + * On the server, this can be called in the context of a `command` or `form` and the specified data will accompany the action response back to the client. + * This prevents SvelteKit needing to refresh all queries on the page in a second server round-trip. + */ + set(value: T): void; + /** + * On the client, this function will re-fetch the query from the server. + * + * On the server, this can be called in the context of a `command` or `form` and the refreshed data will accompany the action response back to the client. + * This prevents SvelteKit needing to refresh all queries on the page in a second server round-trip. + */ + refresh(): Promise; + /** + * Temporarily override a query's value during a [single-flight mutation](https://svelte.dev/docs/kit/remote-functions#Single-flight-mutations) to provide optimistic updates. + * + * ```svelte + * + * + *
{ + * await submit().updates( + * todos.withOverride((todos) => [...todos, { text: data.get('text') }]) + * ); + * })}> + * + * + *
+ * ``` + */ + withOverride(update: (current: T) => T): RemoteQueryOverride; + }; + + export type RemoteLiveQuery = RemoteResource & { + /** + * Returns an async iterator with live updates. + * Unlike awaiting the resource directly, this can only be used _outside_ render + * (i.e. in load functions, event handlers and so on) + */ + run(): AsyncGenerator; + /** `true` if the live stream is currently connected. */ + readonly connected: boolean; + /** `true` once the current live stream iterator is done. */ + readonly done: boolean; + /** Reconnects the live stream immediately. */ + reconnect(): Promise; + }; + + export type RemoteQueryOverride = () => void; + + /** + * The type of a remote `prerender` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#prerender) for full documentation. + */ + export type RemotePrerenderFunction = ( + arg: undefined extends Input ? Input | void : Input + ) => RemoteResource; + + /** + * The return value of a remote `query` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query) for full documentation. + * + * The optional `Validated` generic parameter represents the argument type *after* the + * query's schema has validated and (optionally) transformed it — this is the type the + * query's implementation function receives on the server, and the type yielded by + * [`requested`](https://svelte.dev/docs/kit/$app-server#requested). For queries declared + * with [Standard Schema](https://standardschema.dev/) it differs from `Input` when the + * schema contains a transform (e.g. `v.pipe(v.number(), v.transform(String))` has + * `Input = number` but `Validated = string`). For `'unchecked'` validators and queries + * without arguments it defaults to `Input`. + */ + export type RemoteQueryFunction = ( + arg: undefined extends Input ? Input | void : Input + ) => RemoteQuery; + + /** + * The type of a remote `query.live` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query.live) for full documentation. + * + * The optional `Validated` generic parameter represents the argument type *after* the + * query's schema has validated and (optionally) transformed it, and matches the type + * yielded by [`requested`](https://svelte.dev/docs/kit/$app-server#requested). + */ + export type RemoteLiveQueryFunction = ( + arg: undefined extends Input ? Input | void : Input + ) => RemoteLiveQuery; + interface AdapterEntry { + /** + * A string that uniquely identifies an HTTP service (e.g. serverless function) and is used for deduplication. + * For example, `/foo/a-[b]` and `/foo/[c]` are different routes, but would both + * be represented in a Netlify _redirects file as `/foo/:param`, so they share an ID + */ + id: string; + + /** + * A function that compares the candidate route with the current route to determine + * if it should be grouped with the current route. + * + * Use cases: + * - Fallback pages: `/foo/[c]` is a fallback for `/foo/a-[b]`, and `/[...catchall]` is a fallback for all routes + * - Grouping routes that share a common `config`: `/foo` should be deployed to the edge, `/bar` and `/baz` should be deployed to a serverless function + */ + filter(route: RouteDefinition): boolean; + + /** + * A function that is invoked once the entry has been created. This is where you + * should write the function to the filesystem and generate redirect manifests. + */ + complete(entry: { generateManifest(opts: { relativePath: string }): string }): MaybePromise; + } + + // Based on https://github.com/josh-hemphill/csp-typed-directives/blob/latest/src/csp.types.ts + // + // MIT License + // + // Copyright (c) 2021-present, Joshua Hemphill + // Copyright (c) 2021, Tecnico Corporation + // + // Permission is hereby granted, free of charge, to any person obtaining a copy + // of this software and associated documentation files (the "Software"), to deal + // in the Software without restriction, including without limitation the rights + // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + // copies of the Software, and to permit persons to whom the Software is + // furnished to do so, subject to the following conditions: + // + // The above copyright notice and this permission notice shall be included in all + // copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + // SOFTWARE. + + namespace Csp { + type ActionSource = 'strict-dynamic' | 'report-sample'; + type BaseSource = + | 'self' + | 'unsafe-eval' + | 'unsafe-hashes' + | 'unsafe-inline' + | 'wasm-unsafe-eval' + | 'none'; + type CryptoSource = `${'nonce' | 'sha256' | 'sha384' | 'sha512'}-${string}`; + type FrameSource = HostSource | SchemeSource | 'self' | 'none'; + type HostNameScheme = `${string}.${string}` | 'localhost'; + type HostSource = `${HostProtocolSchemes}${HostNameScheme}${PortScheme}`; + type HostProtocolSchemes = `${string}://` | ''; + type HttpDelineator = '/' | '?' | '#' | '\\'; + type PortScheme = `:${number}` | '' | ':*'; + type SchemeSource = 'http:' | 'https:' | 'data:' | 'mediastream:' | 'blob:' | 'filesystem:'; + type Source = HostSource | SchemeSource | CryptoSource | BaseSource; + type Sources = Source[]; + } + + interface CspDirectives { + 'child-src'?: Csp.Sources; + 'default-src'?: Array; + 'frame-src'?: Csp.Sources; + 'worker-src'?: Csp.Sources; + 'connect-src'?: Csp.Sources; + 'font-src'?: Csp.Sources; + 'img-src'?: Csp.Sources; + 'manifest-src'?: Csp.Sources; + 'media-src'?: Csp.Sources; + 'object-src'?: Csp.Sources; + 'prefetch-src'?: Csp.Sources; + 'script-src'?: Array; + 'script-src-elem'?: Csp.Sources; + 'script-src-attr'?: Csp.Sources; + 'style-src'?: Array; + 'style-src-elem'?: Csp.Sources; + 'style-src-attr'?: Csp.Sources; + 'base-uri'?: Array; + sandbox?: Array< + | 'allow-downloads-without-user-activation' + | 'allow-forms' + | 'allow-modals' + | 'allow-orientation-lock' + | 'allow-pointer-lock' + | 'allow-popups' + | 'allow-popups-to-escape-sandbox' + | 'allow-presentation' + | 'allow-same-origin' + | 'allow-scripts' + | 'allow-storage-access-by-user-activation' + | 'allow-top-navigation' + | 'allow-top-navigation-by-user-activation' + >; + 'form-action'?: Array; + 'frame-ancestors'?: Array; + 'navigate-to'?: Array; + 'report-uri'?: string[]; + 'report-to'?: string[]; + + 'require-trusted-types-for'?: Array<'script'>; + 'trusted-types'?: Array<'none' | 'allow-duplicates' | '*' | string>; + 'upgrade-insecure-requests'?: boolean; + + /** @deprecated */ + 'require-sri-for'?: Array<'script' | 'style' | 'script style'>; + + /** @deprecated */ + 'block-all-mixed-content'?: boolean; + + /** @deprecated */ + 'plugin-types'?: Array<`${string}/${string}` | 'none'>; + + /** @deprecated */ + referrer?: Array< + | 'no-referrer' + | 'no-referrer-when-downgrade' + | 'origin' + | 'origin-when-cross-origin' + | 'same-origin' + | 'strict-origin' + | 'strict-origin-when-cross-origin' + | 'unsafe-url' + | 'none' + >; + } + + type HttpMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS'; + + interface Logger { + (msg: string): void; + success(msg: string): void; + error(msg: string): void; + warn(msg: string): void; + minor(msg: string): void; + info(msg: string): void; + } + + type MaybePromise = T | Promise; + + interface Prerendered { + /** + * A map of `path` to `{ file }` objects, where a path like `/foo` corresponds to `foo.html` and a path like `/bar/` corresponds to `bar/index.html`. + */ + pages: Map< + string, + { + /** The location of the .html file relative to the output directory */ + file: string; + } + >; + /** + * A map of `path` to `{ type }` objects. + */ + assets: Map< + string, + { + /** The MIME type of the asset */ + type: string; + } + >; + /** + * A map of redirects encountered during prerendering. + */ + redirects: Map< + string, + { + status: number; + location: string; + } + >; + /** An array of prerendered paths (without trailing slashes, regardless of the trailingSlash config) */ + paths: string[]; + } + + interface PrerenderHttpErrorHandler { + (details: { + status: number; + path: string; + referrer: string | null; + referenceType: 'linked' | 'fetched'; + message: string; + }): void; + } + + interface PrerenderMissingIdHandler { + (details: { path: string; id: string; referrers: string[]; message: string }): void; + } + + interface PrerenderEntryGeneratorMismatchHandler { + (details: { generatedFromId: string; entry: string; matchedId: string; message: string }): void; + } + + interface PrerenderUnseenRoutesHandler { + (details: { routes: string[]; message: string }): void; + } + + type PrerenderHttpErrorHandlerValue = 'fail' | 'warn' | 'ignore' | PrerenderHttpErrorHandler; + type PrerenderMissingIdHandlerValue = 'fail' | 'warn' | 'ignore' | PrerenderMissingIdHandler; + type PrerenderUnseenRoutesHandlerValue = + | 'fail' + | 'warn' + | 'ignore' + | PrerenderUnseenRoutesHandler; + type PrerenderEntryGeneratorMismatchHandlerValue = + | 'fail' + | 'warn' + | 'ignore' + | PrerenderEntryGeneratorMismatchHandler; + + export type PrerenderOption = boolean | 'auto'; + + interface RequestOptions { + getClientAddress(): string; + platform?: App.Platform; + } + + interface RouteSegment { + content: string; + dynamic: boolean; + rest: boolean; + } + + /** @default 'never' */ + type TrailingSlash = 'never' | 'always' | 'ignore'; + + type DeepPartial = T extends Record | unknown[] + ? { + [K in keyof T]?: T[K] extends Record | unknown[] + ? DeepPartial + : T[K]; + } + : T | undefined; + + type IsAny = 0 extends 1 & T ? true : false; + interface Asset { + file: string; + size: number; + type: string | null; + } + + interface BuildData { + app_dir: string; + app_path: string; + manifest_data: ManifestData; + out_dir: string; + service_worker: string | null; + client: { + /** Path to the client entry point. */ + start: string; + /** Path to the generated `app.js` file that contains the client manifest. Only set in case of `bundleStrategy === 'split'`. */ + app?: string; + /** JS files that the client entry point relies on. */ + imports: string[]; + /** + * JS files that represent the entry points of the layouts/pages. + * An entry is undefined if the layout/page has no component or universal file (i.e. only has a `.server.js` file). + * Only set in case of `router.resolution === 'server'`. + */ + nodes?: Array; + /** + * CSS files referenced in the entry points of the layouts/pages. + * An entry is undefined if the layout/page has no component or universal file (i.e. only has a `.server.js` file) or if has no CSS. + * Only set in case of `router.resolution === 'server'`. + */ + css?: Array; + /** + * Contains the client route manifest in a form suitable for the server which is used for server-side route resolution. + * Notably, it contains all routes, regardless of whether they are prerendered or not (those are missing in the optimized server route manifest). + * Only set in case of `router.resolution === 'server'`. + */ + routes?: SSRClientRoute[]; + stylesheets: string[]; + fonts: string[]; + uses_env_dynamic_public: boolean; + /** Only set in case of `bundleStrategy === 'inline'`. */ + inline?: { + script: string; + style: string | undefined; + }; + } | null; + server_manifest: import('vite').Manifest; + } + + interface ManifestData { + /** Static files from `kit.config.files.assets`. */ + assets: Asset[]; + hooks: { + client: string | null; + server: string | null; + universal: string | null; + }; + nodes: PageNode[]; + routes: RouteData[]; + matchers: Record; + } + + interface PageNode { + depth: number; + /** The `+page/layout.svelte`. */ + component?: string; // TODO supply default component if it's missing (bit of an edge case) + /** The `+page/layout.js/.ts`. */ + universal?: string; + /** The `+page/layout.server.js/ts`. */ + server?: string; + parent_id?: string; + parent?: PageNode; + /** Filled with the pages that reference this layout (if this is a layout). */ + child_pages?: PageNode[]; + /** The final page options for a node if it was statically analysable */ + page_options?: PageOptions | null; + } + + type RecursiveRequired = { + // Recursive implementation of TypeScript's Required utility type. + // Will recursively continue until it reaches a primitive or Function + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + [K in keyof T]-?: Extract extends never // If it does not have a Function type + ? RecursiveRequired // recursively continue through. + : T[K]; // Use the exact type for everything else + }; + + interface RouteParam { + name: string; + matcher: string; + optional: boolean; + rest: boolean; + chained: boolean; + } + + /** + * Represents a route segment in the app. It can either be an intermediate node + * with only layout/error pages, or a leaf, at which point either `page` and `leaf` + * or `endpoint` is set. + */ + interface RouteData { + id: string; + parent: RouteData | null; + + segment: string; + pattern: RegExp; + params: RouteParam[]; + + layout: PageNode | null; + error: PageNode | null; + leaf: PageNode | null; + + page: { + layouts: Array; + errors: Array; + leaf: number; + } | null; + + endpoint: { + file: string; + /** The final page options for the endpoint if it was statically analysable */ + page_options: PageOptions | null; + } | null; + } + + interface SSRComponent { + default: { + render( + props: Record, + opts: { context: Map; csp?: { nonce?: string; hash?: boolean } } + ): { + html: string; + head: string; + css: { + code: string; + map: any; // TODO + }; + /** Until we require all Svelte versions that support hashes, this might not be defined */ + hashes?: { + script: Array<`sha256-${string}`>; + }; + }; + }; + } + + type SSRComponentLoader = () => Promise; + + interface UniversalNode { + /** Is `null` in case static analysis succeeds but the node is ssr=false */ + load?: Load; + prerender?: PrerenderOption; + ssr?: boolean; + csr?: boolean; + trailingSlash?: TrailingSlash; + config?: any; + entries?: PrerenderEntryGenerator; + } + + interface ServerNode { + load?: ServerLoad; + prerender?: PrerenderOption; + ssr?: boolean; + csr?: boolean; + trailingSlash?: TrailingSlash; + actions?: Actions; + config?: any; + entries?: PrerenderEntryGenerator; + } + + interface SSRNode { + /** index into the `nodes` array in the generated `client/app.js`. */ + index: number; + /** external JS files that are loaded on the client. `imports[0]` is the entry point (e.g. `client/nodes/0.js`) */ + imports: string[]; + /** external CSS files that are loaded on the client */ + stylesheets: string[]; + /** external font files that are loaded on the client */ + fonts: string[]; + + universal_id?: string; + server_id?: string; + + /** inlined styles */ + inline_styles?(): MaybePromise< + Record string)> + >; + /** Svelte component */ + component?: SSRComponentLoader; + /** +page.js or +layout.js */ + universal?: UniversalNode; + /** +page.server.js, +layout.server.js, or +server.js */ + server?: ServerNode; + } + + type SSRNodeLoader = () => Promise; + + interface PageNodeIndexes { + errors: Array; + layouts: Array; + leaf: number; + } + + type PrerenderEntryGenerator = () => MaybePromise>>; + + type SSREndpoint = Partial> & { + prerender?: PrerenderOption; + trailingSlash?: TrailingSlash; + config?: any; + entries?: PrerenderEntryGenerator; + fallback?: RequestHandler; + }; + + interface SSRRoute { + id: string; + pattern: RegExp; + params: RouteParam[]; + page: PageNodeIndexes | null; + endpoint: (() => Promise) | null; + endpoint_id?: string; + } + + interface SSRClientRoute { + id: string; + pattern: RegExp; + params: RouteParam[]; + errors: Array; + layouts: Array<[has_server_load: boolean, node_id: number] | undefined>; + leaf: [has_server_load: boolean, node_id: number]; + } + + type ValidatedConfig = Config & { + kit: ValidatedKitConfig; + extensions: string[]; + }; + + type ValidatedKitConfig = Omit, 'adapter'> & { + adapter?: Adapter; + }; + /** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ + export function error(status: number, body: App.Error): never; + /** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ + export function error(status: number, body?: { + message: string; + } extends App.Error ? App.Error | string | undefined : never): never; + /** + * Checks whether this is an error thrown by {@link error}. + * @param status The status to filter for. + * */ + export function isHttpError(e: unknown, status?: T): e is (HttpError_1 & { + status: T extends undefined ? never : T; + }); + /** + * Redirect a request. When called during request handling, SvelteKit will return a redirect response. + * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it. + * + * Most common status codes: + * * `303 See Other`: redirect as a GET request (often used after a form POST request) + * * `307 Temporary Redirect`: redirect will keep the request method + * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page + * + * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages) + * + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308. + * @param location The location to redirect to. + * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location. + * @throws {Error} If the provided status is invalid or the location cannot be used as a header value. + * */ + export function redirect(status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number), location: string | URL): never; + /** + * Checks whether this is a redirect thrown by {@link redirect}. + * @param e The object to check. + * */ + export function isRedirect(e: unknown): e is Redirect_1; + /** + * Create a JSON `Response` object from the supplied data. + * @param data The value that will be serialized as JSON. + * @param init Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically. + */ + export function json(data: any, init?: ResponseInit): Response; + /** + * Create a `Response` object from the supplied body. + * @param body The value that will be used as-is. + * @param init Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically. + */ + export function text(body: string, init?: ResponseInit): Response; + /** + * Create an `ActionFailure` object. Call when form submission fails. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * */ + export function fail(status: number): ActionFailure; + /** + * Create an `ActionFailure` object. Call when form submission fails. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param data Data associated with the failure (e.g. validation errors) + * */ + export function fail(status: number, data: T): ActionFailure; + /** + * Checks whether this is an action failure thrown by {@link fail}. + * @param e The object to check. + * */ + export function isActionFailure(e: unknown): e is ActionFailure; + /** + * Use this to throw a validation error to imperatively fail form validation. + * Can be used in combination with `issue` passed to form actions to create field-specific issues. + * + * @example + * ```ts + * import { invalid } from '@sveltejs/kit'; + * import { form } from '$app/server'; + * import { tryLogin } from '$lib/server/auth'; + * import * as v from 'valibot'; + * + * export const login = form( + * v.object({ name: v.string(), _password: v.string() }), + * async ({ name, _password }) => { + * const success = tryLogin(name, _password); + * if (!success) { + * invalid('Incorrect username or password'); + * } + * + * // ... + * } + * ); + * ``` + * @since 2.47.3 + */ + export function invalid(...issues: (StandardSchemaV1.Issue | string)[]): never; + /** + * Checks whether this is an validation error thrown by {@link invalid}. + * @param e The object to check. + * @since 2.47.3 + */ + export function isValidationError(e: unknown): e is ActionFailure; + /** + * Strips possible SvelteKit-internal suffixes and trailing slashes from the URL pathname. + * Returns the normalized URL as well as a method for adding the potential suffix back + * based on a new pathname (possibly including search) or URL. + * ```js + * import { normalizeUrl } from '@sveltejs/kit'; + * + * const { url, denormalize } = normalizeUrl('/blog/post/__data.json'); + * console.log(url.pathname); // /blog/post + * console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json + * ``` + * @since 2.18.0 + */ + export function normalizeUrl(url: URL | string): { + url: URL; + wasNormalized: boolean; + denormalize: (url?: string | URL) => URL; + }; + export type LessThan = TNumber extends TArray["length"] ? TArray[number] : LessThan; + export type NumericRange = Exclude, LessThan>; + type ValidPageOption = (typeof valid_page_options_array)[number]; + type PageOptions = Partial>; + const valid_page_options_array: readonly ["ssr", "prerender", "csr", "trailingSlash", "config", "entries", "load"]; + export const VERSION: string; + class HttpError_1 { + + constructor(status: number, body: { + message: string; + } extends App.Error ? (App.Error | string | undefined) : App.Error); + status: number; + body: App.Error; + toString(): string; + } + class Redirect_1 { + + constructor(status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308, location: string); + status: 301 | 302 | 303 | 307 | 308 | 300 | 304 | 305 | 306; + location: string; + } + + export {}; +} + +declare module '@sveltejs/kit/hooks' { + import type { Handle } from '@sveltejs/kit'; + /** + * A helper function for sequencing multiple `handle` calls in a middleware-like manner. + * The behavior for the `handle` options is as follows: + * - `transformPageChunk` is applied in reverse order and merged + * - `preload` is applied in forward order, the first option "wins" and no `preload` options after it are called + * - `filterSerializedResponseHeaders` behaves the same as `preload` + * + * ```js + * /// file: src/hooks.server.js + * import { sequence } from '@sveltejs/kit/hooks'; + * + * /// type: import('@sveltejs/kit').Handle + * async function first({ event, resolve }) { + * console.log('first pre-processing'); + * const result = await resolve(event, { + * transformPageChunk: ({ html }) => { + * // transforms are applied in reverse order + * console.log('first transform'); + * return html; + * }, + * preload: () => { + * // this one wins as it's the first defined in the chain + * console.log('first preload'); + * return true; + * } + * }); + * console.log('first post-processing'); + * return result; + * } + * + * /// type: import('@sveltejs/kit').Handle + * async function second({ event, resolve }) { + * console.log('second pre-processing'); + * const result = await resolve(event, { + * transformPageChunk: ({ html }) => { + * console.log('second transform'); + * return html; + * }, + * preload: () => { + * console.log('second preload'); + * return true; + * }, + * filterSerializedResponseHeaders: () => { + * // this one wins as it's the first defined in the chain + * console.log('second filterSerializedResponseHeaders'); + * return true; + * } + * }); + * console.log('second post-processing'); + * return result; + * } + * + * export const handle = sequence(first, second); + * ``` + * + * The example above would print: + * + * ``` + * first pre-processing + * first preload + * second pre-processing + * second filterSerializedResponseHeaders + * second transform + * first transform + * second post-processing + * first post-processing + * ``` + * + * @param handlers The chain of `handle` functions + * */ + export function sequence(...handlers: Handle[]): Handle; + + export {}; +} + +declare module '@sveltejs/kit/node' { + export function getRequest({ request, base, bodySizeLimit }: { + request: import("http").IncomingMessage; + base: string; + bodySizeLimit?: number; + }): Promise; + + export function setResponse(res: import("http").ServerResponse, response: Response): Promise; + /** + * Converts a file on disk to a readable stream + * @since 2.4.0 + */ + export function createReadableStream(file: string): ReadableStream; + + export {}; +} + +declare module '@sveltejs/kit/node/polyfills' { + /** + * Make various web APIs available as globals: + * - `crypto` + * - `File` + */ + export function installPolyfills(): void; + + export {}; +} + +declare module '@sveltejs/kit/vite' { + import type { Plugin } from 'vite'; + /** + * Returns the SvelteKit Vite plugins. + * */ + export function sveltekit(): Promise; + + export {}; +} + +declare module '$app/environment' { + /** + * `true` if the app is running in the browser. + */ + export const browser: boolean; + + /** + * Whether the dev server is running. This is not guaranteed to correspond to `NODE_ENV` or `MODE`. + */ + export const dev: boolean; + + /** + * SvelteKit analyses your app during the `build` step by running it. During this process, `building` is `true`. This also applies during prerendering. + */ + export const building: boolean; + + /** + * The value of `config.kit.version.name`. + */ + export const version: string; + + export {}; +} + +declare module '$app/forms' { + /** + * Use this function to deserialize the response from a form submission. + * Usage: + * + * ```js + * import { deserialize } from '$app/forms'; + * + * async function handleSubmit(event) { + * const response = await fetch('/form?/action', { + * method: 'POST', + * body: new FormData(event.target) + * }); + * + * const result = deserialize(await response.text()); + * // ... + * } + * ``` + * */ + export function deserialize | undefined, Failure extends Record | undefined>(result: string): import("@sveltejs/kit").ActionResult; + /** + * This action enhances a `
` element that otherwise would work without JavaScript. + * + * The `submit` function is called upon submission with the given FormData and the `action` that should be triggered. + * If `cancel` is called, the form will not be submitted. + * You can use the abort `controller` to cancel the submission in case another one starts. + * If a function is returned, that function is called with the response from the server. + * If nothing is returned, the fallback will be used. + * + * If this function or its return value isn't set, it + * - falls back to updating the `form` prop with the returned data if the action is on the same page as the form + * - updates `page.status` + * - resets the `` element and invalidates all data in case of successful submission with no redirect response + * - redirects in case of a redirect response + * - redirects to the nearest error page in case of an unexpected error + * + * If you provide a custom function with a callback and want to use the default behavior, invoke `update` in your callback. + * It accepts an options object + * - `reset: false` if you don't want the `` values to be reset after a successful submission + * - `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission + * @param form_element The form element + * @param submit Submit callback + */ + export function enhance | undefined, Failure extends Record | undefined>(form_element: HTMLFormElement, submit?: import("@sveltejs/kit").SubmitFunction): { + destroy(): void; + }; + /** + * This action updates the `form` property of the current page with the given data and updates `page.status`. + * In case of an error, it redirects to the nearest error page. + * */ + export function applyAction | undefined, Failure extends Record | undefined>(result: import("@sveltejs/kit").ActionResult): Promise; + + export {}; +} + +declare module '$app/navigation' { + /** + * A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a URL. + * + * `afterNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * */ + export function afterNavigate(callback: (navigation: import("@sveltejs/kit").AfterNavigate) => void): void; + /** + * A navigation interceptor that triggers before we navigate to a URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls. + * + * Calling `cancel()` will prevent the navigation from completing. If `navigation.type === 'leave'` — meaning the user is navigating away from the app (or closing the tab) — calling `cancel` will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user's response. + * + * When a navigation isn't to a SvelteKit-owned route (and therefore controlled by SvelteKit's client-side router), `navigation.to.route.id` will be `null`. + * + * If the navigation will (if not cancelled) cause the document to unload — in other words `'leave'` navigations and `'link'` navigations where `navigation.to.route === null` — `navigation.willUnload` is `true`. + * + * `beforeNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * */ + export function beforeNavigate(callback: (navigation: import("@sveltejs/kit").BeforeNavigate) => void): void; + /** + * A lifecycle function that runs the supplied `callback` immediately before we navigate to a new URL except during full-page navigations. + * + * If you return a `Promise`, SvelteKit will wait for it to resolve before completing the navigation. This allows you to — for example — use `document.startViewTransition`. Avoid promises that are slow to resolve, since navigation will appear stalled to the user. + * + * If a function (or a `Promise` that resolves to a function) is returned from the callback, it will be called once the DOM has updated. + * + * `onNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * */ + export function onNavigate(callback: (navigation: import("@sveltejs/kit").OnNavigate) => MaybePromise<(() => void) | void>): void; + /** + * If called when the page is being updated following a navigation (in `onMount` or `afterNavigate` or an action, for example), this disables SvelteKit's built-in scroll handling. + * This is generally discouraged, since it breaks user expectations. + * */ + export function disableScrollHandling(): void; + /** + * Allows you to navigate programmatically to a given route, with options such as keeping the current element focused. + * Returns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified `url`. + * + * For external URLs, use `window.location = url` instead of calling `goto(url)`. + * + * @param url Where to navigate to. Note that if you've set [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths) and the URL is root-relative, you need to prepend the base path if you want to navigate within the app. + * @param {Object} opts Options related to the navigation + * */ + export function goto(url: string | URL, opts?: { + replaceState?: boolean | undefined; + noScroll?: boolean | undefined; + keepFocus?: boolean | undefined; + invalidateAll?: boolean | undefined; + invalidate?: (string | URL | ((url: URL) => boolean))[] | undefined; + state?: App.PageState | undefined; + }): Promise; + /** + * Causes any `load` functions belonging to the currently active page to re-run if they depend on the `url` in question, via `fetch` or `depends`. Returns a `Promise` that resolves when the page is subsequently updated. + * + * If the argument is given as a `string` or `URL`, it must resolve to the same URL that was passed to `fetch` or `depends` (including query parameters). + * To create a custom identifier, use a string beginning with `[a-z]+:` (e.g. `custom:state`) — this is a valid URL. + * + * The `function` argument can be used define a custom predicate. It receives the full `URL` and causes `load` to rerun if `true` is returned. + * This can be useful if you want to invalidate based on a pattern instead of a exact match. + * + * ```ts + * // Example: Match '/path' regardless of the query parameters + * import { invalidate } from '$app/navigation'; + * + * invalidate((url) => url.pathname === '/path'); + * ``` + * @param resource The invalidated URL + * */ + export function invalidate(resource: string | URL | ((url: URL) => boolean)): Promise; + /** + * Causes all `load` and `query` functions belonging to the currently active page to re-run. Returns a `Promise` that resolves when the page is subsequently updated. + * */ + export function invalidateAll(): Promise; + /** + * Causes all currently active remote functions to refresh, and all `load` functions belonging to the currently active page to re-run (unless disabled via the option argument). + * Returns a `Promise` that resolves when the page is subsequently updated. + * */ + export function refreshAll({ includeLoadFunctions }?: { + includeLoadFunctions?: boolean; + }): Promise; + /** + * Programmatically preloads the given page, which means + * 1. ensuring that the code for the page is loaded, and + * 2. calling the page's load function with the appropriate options. + * + * This is the same behaviour that SvelteKit triggers when the user taps or mouses over an `` element with `data-sveltekit-preload-data`. + * If the next navigation is to `href`, the values returned from load will be used, making navigation instantaneous. + * Returns a Promise that resolves with the result of running the new route's `load` functions once the preload is complete. + * + * @param href Page to preload + * */ + export function preloadData(href: string): Promise<{ + type: "loaded"; + status: number; + data: Record; + } | { + type: "redirect"; + location: string; + }>; + /** + * Programmatically imports the code for routes that haven't yet been fetched. + * Typically, you might call this to speed up subsequent navigation. + * + * You can specify routes by any matching pathname such as `/about` (to match `src/routes/about/+page.svelte`) or `/blog/*` (to match `src/routes/blog/[slug]/+page.svelte`). + * + * Unlike `preloadData`, this won't call `load` functions. + * Returns a Promise that resolves when the modules have been imported. + * + * */ + export function preloadCode(pathname: string): Promise; + /** + * Programmatically create a new history entry with the given `page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing). + * + * */ + export function pushState(url: string | URL, state: App.PageState): void; + /** + * Programmatically replace the current history entry with the given `page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing). + * + * */ + export function replaceState(url: string | URL, state: App.PageState): void; + type MaybePromise = T | Promise; + + export {}; +} + +declare module '$app/paths' { + import type { RouteIdWithSearchOrHash, PathnameWithSearchOrHash, ResolvedPathname, RouteId, RouteParams, Asset, Pathname as Pathname_1 } from '$app/types'; + /** + * A string that matches [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths). + * + * Example usage: `Link` + * + * @deprecated Use [`resolve(...)`](https://svelte.dev/docs/kit/$app-paths#resolve) instead + */ + export let base: '' | `/${string}`; + + /** + * An absolute path that matches [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths). + * + * > [!NOTE] If a value for `config.kit.paths.assets` is specified, it will be replaced with `'/_svelte_kit_assets'` during `vite dev` or `vite preview`, since the assets don't yet live at their eventual URL. + * + * @deprecated Use [`asset(...)`](https://svelte.dev/docs/kit/$app-paths#asset) instead + */ + export let assets: '' | `https://${string}` | `http://${string}` | '/_svelte_kit_assets'; + + /** + * @deprecated Use [`resolve(...)`](https://svelte.dev/docs/kit/$app-paths#resolve) instead + */ + export function resolveRoute( + ...args: ResolveArgs + ): ResolvedPathname; + type StripSearchOrHash = T extends `${infer Pathname}?${string}` + ? Pathname + : T extends `${infer Pathname}#${string}` + ? Pathname + : T; + + type ResolveArgs = + T extends RouteId + ? RouteParams extends Record + ? [route: T] + : [route: T, params: RouteParams] + : StripSearchOrHash extends infer U extends RouteId + ? RouteParams extends Record + ? [route: T] + : [route: T, params: RouteParams] + : [route: T]; + /** + * Resolve the URL of an asset in your `static` directory, by prefixing it with [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths) if configured, or otherwise by prefixing it with the base path. + * + * During server rendering, the base path is relative and depends on the page currently being rendered. + * + * @example + * ```svelte + * + * + * a potato + * ``` + * @since 2.26 + * + * */ + export function asset(file: Asset): string; + /** + * Resolve a pathname by prefixing it with the base path, if any, or resolve a route ID by populating dynamic segments with parameters. + * + * During server rendering, the base path is relative and depends on the page currently being rendered. + * + * @example + * ```js + * import { resolve } from '$app/paths'; + * + * // using a pathname + * const resolved = resolve(`/blog/hello-world`); + * + * // using a route ID plus parameters + * const resolved = resolve('/blog/[slug]', { + * slug: 'hello-world' + * }); + * ``` + * @since 2.26 + * + * */ + export function resolve(...args: ResolveArgs): ResolvedPathname; + /** + * Match a path or URL to a route ID and extracts any parameters. + * + * @example + * ```js + * import { match } from '$app/paths'; + * + * const route = await match('/blog/hello-world'); + * + * if (route?.id === '/blog/[slug]') { + * const slug = route.params.slug; + * const response = await fetch(`/api/posts/${slug}`); + * const post = await response.json(); + * } + * ``` + * @since 2.52.0 + * + * */ + export function match(url: Pathname_1 | URL | (string & {})): Promise<{ + id: RouteId; + params: Record; + } | null>; + + export {}; +} + +declare module '$app/server' { + import type { RequestEvent, RemoteCommand, RemoteForm, RemoteFormInput, InvalidField, RemotePrerenderFunction, RemoteQueryFunction, RemoteLiveQueryFunction, QueryRequestedResult, LiveQueryRequestedResult } from '@sveltejs/kit'; + import type { StandardSchemaV1 } from '@standard-schema/spec'; + /** + * Read the contents of an imported asset from the filesystem + * @example + * ```js + * import { read } from '$app/server'; + * import somefile from './somefile.txt'; + * + * const asset = read(somefile); + * const text = await asset.text(); + * ``` + * @since 2.4.0 + */ + export function read(asset: string): Response; + /** + * Returns the current `RequestEvent`. Can be used inside server hooks, server `load` functions, actions, and endpoints (and functions called by them). + * + * In environments without [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage), this must be called synchronously (i.e. not after an `await`). + * @since 2.20.0 + * + * */ + export function getRequestEvent(): RequestEvent; + /** + * Creates a remote command. When called from the browser, the function will be invoked on the server via a `fetch` call. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#command) for full documentation. + * + * @since 2.27 + */ + export function command(fn: () => MaybePromise): RemoteCommand; + /** + * Creates a remote command. When called from the browser, the function will be invoked on the server via a `fetch` call. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#command) for full documentation. + * + * @since 2.27 + */ + export function command(validate: "unchecked", fn: (arg: Input) => MaybePromise): RemoteCommand; + /** + * Creates a remote command. When called from the browser, the function will be invoked on the server via a `fetch` call. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#command) for full documentation. + * + * @since 2.27 + */ + export function command(validate: Schema, fn: (arg: StandardSchemaV1.InferOutput) => MaybePromise): RemoteCommand, Output>; + /** + * Creates a form object that can be spread onto a `` element. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#form) for full documentation. + * + * @since 2.27 + */ + export function form(fn: () => MaybePromise): RemoteForm; + /** + * Creates a form object that can be spread onto a `` element. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#form) for full documentation. + * + * @since 2.27 + */ + export function form(validate: "unchecked", fn: (data: Input, issue: InvalidField) => MaybePromise): RemoteForm; + /** + * Creates a form object that can be spread onto a `` element. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#form) for full documentation. + * + * @since 2.27 + */ + export function form>, Output>(validate: Schema, fn: (data: StandardSchemaV1.InferOutput, issue: InvalidField>) => MaybePromise): RemoteForm, Output>; + /** + * Creates a remote prerender function. When called from the browser, the function will be invoked on the server via a `fetch` call. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#prerender) for full documentation. + * + * @since 2.27 + */ + export function prerender(fn: () => MaybePromise, options?: { + inputs?: RemotePrerenderInputsGenerator; + dynamic?: boolean; + } | undefined): RemotePrerenderFunction; + /** + * Creates a remote prerender function. When called from the browser, the function will be invoked on the server via a `fetch` call. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#prerender) for full documentation. + * + * @since 2.27 + */ + export function prerender(validate: "unchecked", fn: (arg: Input) => MaybePromise, options?: { + inputs?: RemotePrerenderInputsGenerator; + dynamic?: boolean; + } | undefined): RemotePrerenderFunction; + /** + * Creates a remote prerender function. When called from the browser, the function will be invoked on the server via a `fetch` call. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#prerender) for full documentation. + * + * @since 2.27 + */ + export function prerender(schema: Schema, fn: (arg: StandardSchemaV1.InferOutput) => MaybePromise, options?: { + inputs?: RemotePrerenderInputsGenerator>; + dynamic?: boolean; + } | undefined): RemotePrerenderFunction, Output>; + /** + * Creates a remote query. When called from the browser, the function will be invoked on the server via a `fetch` call. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query) for full documentation. + * + * @since 2.27 + */ + export function query(fn: () => MaybePromise): RemoteQueryFunction; + /** + * Creates a remote query. When called from the browser, the function will be invoked on the server via a `fetch` call. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query) for full documentation. + * + * @since 2.27 + */ + export function query(validate: "unchecked", fn: (arg: Input) => MaybePromise): RemoteQueryFunction; + /** + * Creates a remote query. When called from the browser, the function will be invoked on the server via a `fetch` call. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query) for full documentation. + * + * @since 2.27 + */ + export function query(schema: Schema, fn: (arg: StandardSchemaV1.InferOutput) => MaybePromise): RemoteQueryFunction, Output, StandardSchemaV1.InferOutput>; + export namespace query { + /** + * Creates a batch query function that collects multiple calls and executes them in a single request + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query.batch) for full documentation. + * + * @since 2.35 + */ + function batch(validate: "unchecked", fn: (args: Input[]) => MaybePromise<(arg: Input, idx: number) => Output>): RemoteQueryFunction; + /** + * Creates a batch query function that collects multiple calls and executes them in a single request + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query.batch) for full documentation. + * + * @since 2.35 + */ + function batch(schema: Schema, fn: (args: StandardSchemaV1.InferOutput[]) => MaybePromise<(arg: StandardSchemaV1.InferOutput, idx: number) => Output>): RemoteQueryFunction, Output, StandardSchemaV1.InferOutput>; + /** + * Creates a live remote query. When called from the browser, the function will be invoked on the server via a streaming `fetch` call. + * + * See [Remote functions](https://svelte.dev/docs/kit/remote-functions#query.live) for full documentation. + * + * */ + function live(fn: (arg: void) => RemoteLiveQueryUserFunctionReturnType): RemoteLiveQueryFunction; + + function live(validate: "unchecked", fn: (arg: Input) => RemoteLiveQueryUserFunctionReturnType): RemoteLiveQueryFunction; + + function live(schema: Schema, fn: (arg: StandardSchemaV1.InferOutput) => RemoteLiveQueryUserFunctionReturnType): RemoteLiveQueryFunction, Output, StandardSchemaV1.InferOutput>; + } + /** + * In the context of a remote `command` or `form` request, returns an iterable + * of `{ arg, query }` entries for the refreshes requested by the client, up to + * the supplied `limit`. Each `query` is a `RemoteQuery` bound to the original + * client-side cache key, so `refresh()` / `set()` propagate correctly even when + * the query's schema transforms the input. `arg` is the *validated* argument, + * i.e. the value after the schema has run (so `InferOutput` for queries + * declared with a Standard Schema). + * + * Arguments that fail validation or exceed `limit` are recorded as failures in + * the response to the client. + * + * @example + * ```ts + * import { requested } from '$app/server'; + * + * for (const { arg, query } of requested(getPost, 5)) { + * // `arg` is the validated argument; `query` is bound to the client's + * // cache key. It's safe to throw away this promise -- SvelteKit will + * // await it and forward any errors to the client. + * void query.refresh(); + * } + * ``` + * + * As a shorthand for the above, you can also call `refreshAll` on the result: + * + * @example + * ```ts + * import { requested } from '$app/server'; + * + * await requested(getPost, 5).refreshAll(); + * ``` + * + * Works with `query.batch` as well — refreshes for individual entries are + * collected into a single batched call. + * + * For live queries, the same applies, but with `reconnect` and `reconnectAll`. + * + * */ + export function requested(query: RemoteQueryFunction, limit: number): QueryRequestedResult; + /** + * In the context of a remote `command` or `form` request, returns an iterable + * of `{ arg, query }` entries for the reconnects requested by the client, up to + * the supplied `limit`. Each `query` is a `RemoteLiveQuery` bound to the original + * client-side cache key, so `reconnect()` propagates correctly even when + * the query's schema transforms the input. `arg` is the *validated* argument. + * + * Arguments that fail validation or exceed `limit` are recorded as failures in + * the response to the client. + * + * @example + * ```ts + * import { requested } from '$app/server'; + * + * for (const { query } of requested(getPost, 5)) { + * void query.reconnect(); + * } + * ``` + * + * As a shorthand, you can also call `reconnectAll` on the result: + * + * @example + * ```ts + * import { requested } from '$app/server'; + * + * await requested(getPost, 5).reconnectAll(); + * ``` + * + * */ + export function requested(query: RemoteLiveQueryFunction, limit: number): LiveQueryRequestedResult; + type RemoteLiveQueryUserFunctionReturnType = MaybePromise< + | AsyncGenerator + | AsyncIterator + | AsyncIterable + | Generator + | Iterator + | Iterable + >; + type RemotePrerenderInputsGenerator = () => MaybePromise; + type MaybePromise = T | Promise; + + export {}; +} + +declare module '$app/state' { + /** + * A read-only reactive object with information about the current page, serving several use cases: + * - retrieving the combined `data` of all pages/layouts anywhere in your component tree (also see [loading data](https://svelte.dev/docs/kit/load)) + * - retrieving the current value of the `form` prop anywhere in your component tree (also see [form actions](https://svelte.dev/docs/kit/form-actions)) + * - retrieving the page state that was set through `goto`, `pushState` or `replaceState` (also see [goto](https://svelte.dev/docs/kit/$app-navigation#goto) and [shallow routing](https://svelte.dev/docs/kit/shallow-routing)) + * - retrieving metadata such as the URL you're on, the current route and its parameters, and whether or not there was an error + * + * ```svelte + * + * + * + *

Currently at {page.url.pathname}

+ * + * {#if page.error} + * Problem detected + * {:else} + * All systems operational + * {/if} + * ``` + * + * Changes to `page` are available exclusively with runes. (The legacy reactivity syntax will not reflect any changes) + * + * ```svelte + * + * + * ``` + * + * On the server, values can only be read during rendering (in other words _not_ in e.g. `load` functions). In the browser, the values can be read at any time. + * + * */ + export const page: import("@sveltejs/kit").Page; + /** + * A read-only object representing an in-progress navigation, with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties. + * Values are `null` when no navigation is occurring, or during server rendering. + * */ + export const navigating: import("@sveltejs/kit").Navigation | { + from: null; + to: null; + type: null; + willUnload: null; + delta: null; + complete: null; + }; + /** + * A read-only reactive value that's initially `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update `current` to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling. + * */ + export const updated: { + get current(): boolean; + check(): Promise; + }; + + export {}; +} + +declare module '$app/stores' { + export function getStores(): { + + page: typeof page; + + navigating: typeof navigating; + + updated: typeof updated; + }; + /** + * A readable store whose value contains page data. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `page` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * */ + export const page: import("svelte/store").Readable; + /** + * A readable store. + * When navigating starts, its value is a `Navigation` object with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties. + * When navigating finishes, its value reverts to `null`. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `navigating` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * */ + export const navigating: import("svelte/store").Readable; + /** + * A readable store whose initial value is `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update the store value to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `updated` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * */ + export const updated: import("svelte/store").Readable & { + check(): Promise; + }; + + export {}; +}/** + * It's possible to tell SvelteKit how to type objects inside your app by declaring the `App` namespace. By default, a new project will have a file called `src/app.d.ts` containing the following: + * + * ```ts + * declare global { + * namespace App { + * // interface Error {} + * // interface Locals {} + * // interface PageData {} + * // interface PageState {} + * // interface Platform {} + * } + * } + * + * export {}; + * ``` + * + * The `export {}` line exists because without it, the file would be treated as an _ambient module_ which prevents you from adding `import` declarations. + * If you need to add ambient `declare module` declarations, do so in a separate file like `src/ambient.d.ts`. + * + * By populating these interfaces, you will gain type safety when using `event.locals`, `event.platform`, and `data` from `load` functions. + */ +declare namespace App { + /** + * Defines the common shape of expected and unexpected errors. Expected errors are thrown using the `error` function. Unexpected errors are handled by the `handleError` hooks which should return this shape. + */ + export interface Error { + message: string; + } + + /** + * The interface that defines `event.locals`, which can be accessed in server [hooks](https://svelte.dev/docs/kit/hooks) (`handle`, and `handleError`), server-only `load` functions, and `+server.js` files. + */ + export interface Locals {} + + /** + * Defines the common shape of the [page.data state](https://svelte.dev/docs/kit/$app-state#page) and [$page.data store](https://svelte.dev/docs/kit/$app-stores#page) - that is, the data that is shared between all pages. + * The `Load` and `ServerLoad` functions in `./$types` will be narrowed accordingly. + * Use optional properties for data that is only present on specific pages. Do not add an index signature (`[key: string]: any`). + */ + export interface PageData {} + + /** + * The shape of the `page.state` object, which can be manipulated using the [`pushState`](https://svelte.dev/docs/kit/$app-navigation#pushState) and [`replaceState`](https://svelte.dev/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`. + */ + export interface PageState {} + + /** + * If your adapter provides [platform-specific context](https://svelte.dev/docs/kit/adapters#Platform-specific-context) via `event.platform`, you can specify it here. + */ + export interface Platform {} +} + +/** + * This module is only available to [service workers](https://svelte.dev/docs/kit/service-workers). + */ +declare module '$service-worker' { + /** + * The `base` path of the deployment. Typically this is equivalent to `config.kit.paths.base`, but it is calculated from `location.pathname` meaning that it will continue to work correctly if the site is deployed to a subdirectory. + * Note that there is a `base` but no `assets`, since service workers cannot be used if `config.kit.paths.assets` is specified. + */ + export const base: string; + /** + * An array of URL strings representing the files generated by Vite, suitable for caching with `cache.addAll(build)`. + * During development, this is an empty array. + */ + export const build: string[]; + /** + * An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](https://svelte.dev/docs/kit/configuration#serviceWorker) + */ + export const files: string[]; + /** + * An array of pathnames corresponding to prerendered pages and endpoints. + * During development, this is an empty array. + */ + export const prerendered: string[]; + /** + * See [`config.kit.version`](https://svelte.dev/docs/kit/configuration#version). It's useful for generating unique cache names inside your service worker, so that a later deployment of your app can invalidate old caches. + */ + export const version: string; +} + +/** + * This module contains generated types for the routes in your app. + */ +declare module '$app/types' { + /** + * Interface for all generated app types. This gets extended via declaration merging. DO NOT USE THIS INTERFACE DIRECTLY. + */ + export interface AppTypes { + // These are all functions so that we can leverage function overloads to get the correct type. + // Using the return types directly would error with a "not the same type" error. + // https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces + RouteId(): string; + RouteParams(): Record>; + LayoutParams(): Record>; + Pathname(): string; + ResolvedPathname(): string; + Asset(): string; + } + + /** + * A union of all the route IDs in your app. Used for `page.route.id` and `event.route.id`. + */ + export type RouteId = ReturnType; + + /** + * `RouteId`, but possibly suffixed with a search string and/or hash. + */ + export type RouteIdWithSearchOrHash = RouteId | `${RouteId}?${string}` | `${RouteId}#${string}`; + + /** + * A utility for getting the parameters associated with a given route. + */ + export type RouteParams = T extends keyof ReturnType + ? ReturnType[T] + : Record; + + /** + * A utility for getting the parameters associated with a given layout, which is similar to `RouteParams` but also includes optional parameters for any child route. + */ + export type LayoutParams = T extends keyof ReturnType + ? ReturnType[T] + : Record; + + /** + * A union of all valid pathnames in your app. + */ + export type Pathname = ReturnType; + + /** + * `Pathname`, but possibly suffixed with a search string and/or hash. + */ + export type PathnameWithSearchOrHash = + | Pathname + | `${Pathname}?${string}` + | `${Pathname}#${string}`; + + /** + * `Pathname`, but possibly prefixed with a base path. Used for `page.url.pathname`. + */ + export type ResolvedPathname = ReturnType; + + /** + * A union of all the filenames of assets contained in your `static` directory. + */ + export type Asset = ReturnType; +} + +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/types/index.d.ts.map b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/types/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..a3e8cc850689c4bcd442f957c4b66e83d4259214 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/kit/types/index.d.ts.map @@ -0,0 +1,243 @@ +{ + "version": 3, + "file": "index.d.ts", + "names": [ + "Span", + "Adapter", + "LoadProperties", + "AwaitedActions", + "OptionalUnion", + "uniqueSymbol", + "ActionFailure", + "UnpackValidationError", + "Builder", + "Config", + "Cookies", + "Emulator", + "KitConfig", + "Handle", + "HandleServerError", + "HandleValidationError", + "HandleClientError", + "HandleFetch", + "ServerInit", + "ClientInit", + "Reroute", + "Transport", + "Transporter", + "Load", + "LoadEvent", + "NavigationEvent", + "NavigationTarget", + "NavigationType", + "NavigationBase", + "NavigationEnter", + "NavigationExternal", + "NavigationGoto", + "NavigationLeave", + "NavigationFormSubmit", + "NavigationPopState", + "NavigationLink", + "Navigation", + "BeforeNavigate", + "OnNavigate", + "AfterNavigate", + "Page", + "ParamMatcher", + "RequestedEntry", + "LiveRequestedEntry", + "QueryRequestedResult", + "LiveQueryRequestedResult", + "RequestedResult", + "RequestEvent", + "RequestHandler", + "ResolveOptions", + "RouteDefinition", + "Server", + "ServerInitOptions", + "SSRManifest", + "ServerLoad", + "ServerLoadEvent", + "Action", + "Actions", + "ActionResult", + "HttpError", + "Redirect", + "SubmitFunction", + "Snapshot", + "WillRecurseIndefinitely", + "InputTypeMap", + "RemoteFormFieldType", + "InputElementProps", + "RemoteFormFieldMethods", + "KeysOfUnion", + "ValueOfUnionKey", + "RemoteFormFieldValue", + "AsArgs", + "RemoteFormField", + "RemoteFormFieldContainer", + "UnknownField", + "RemoteFormFieldsRoot", + "RemoteFormFields", + "RecursiveFormFields", + "MaybeArray", + "RemoteFormInput", + "RemoteFormIssue", + "ExtractId", + "InvalidField", + "ValidationError", + "RemoteForm", + "RemoteCommand", + "RemoteQueryUpdate", + "RemoteResource", + "RemoteQuery", + "RemoteLiveQuery", + "RemoteQueryOverride", + "RemotePrerenderFunction", + "RemoteQueryFunction", + "RemoteLiveQueryFunction", + "AdapterEntry", + "Csp", + "CspDirectives", + "HttpMethod", + "Logger", + "MaybePromise", + "Prerendered", + "PrerenderHttpErrorHandler", + "PrerenderMissingIdHandler", + "PrerenderEntryGeneratorMismatchHandler", + "PrerenderUnseenRoutesHandler", + "PrerenderHttpErrorHandlerValue", + "PrerenderMissingIdHandlerValue", + "PrerenderUnseenRoutesHandlerValue", + "PrerenderEntryGeneratorMismatchHandlerValue", + "PrerenderOption", + "RequestOptions", + "RouteSegment", + "TrailingSlash", + "DeepPartial", + "IsAny", + "Asset", + "BuildData", + "ManifestData", + "PageNode", + "RecursiveRequired", + "RouteParam", + "RouteData", + "SSRComponent", + "SSRComponentLoader", + "UniversalNode", + "ServerNode", + "SSRNode", + "SSRNodeLoader", + "PageNodeIndexes", + "PrerenderEntryGenerator", + "SSREndpoint", + "SSRRoute", + "SSRClientRoute", + "ValidatedConfig", + "ValidatedKitConfig", + "isHttpError", + "redirect", + "isRedirect", + "json", + "text", + "isActionFailure", + "invalid", + "isValidationError", + "normalizeUrl", + "ValidPageOption", + "PageOptions", + "valid_page_options_array", + "VERSION", + "sequence", + "getRequest", + "setResponse", + "createReadableStream", + "installPolyfills", + "sveltekit", + "browser", + "dev", + "building", + "version", + "deserialize", + "enhance", + "applyAction", + "afterNavigate", + "beforeNavigate", + "onNavigate", + "disableScrollHandling", + "goto", + "invalidate", + "invalidateAll", + "refreshAll", + "preloadData", + "preloadCode", + "pushState", + "replaceState", + "base", + "assets", + "resolveRoute", + "StripSearchOrHash", + "ResolveArgs", + "asset", + "resolve", + "match", + "read", + "getRequestEvent", + "RemoteLiveQueryUserFunctionReturnType", + "RemotePrerenderInputsGenerator", + "page", + "navigating", + "updated", + "getStores" + ], + "sources": [ + "../src/exports/public.d.ts", + "../src/exports/internal/index.js", + "../src/types/private.d.ts", + "../src/types/internal.d.ts", + "../src/exports/index.js", + "../src/exports/vite/static_analysis/index.js", + "../src/version.js", + "../src/exports/hooks/sequence.js", + "../src/exports/node/index.js", + "../src/exports/node/polyfills.js", + "../src/exports/vite/index.js", + "../src/runtime/app/environment/types.d.ts", + "../src/runtime/app/forms.js", + "../src/runtime/client/client.js", + "../src/runtime/app/paths/public.d.ts", + "../src/runtime/app/paths/types.d.ts", + "../src/runtime/app/paths/client.js", + "../src/runtime/app/server/index.js", + "../src/exports/internal/event.js", + "../src/runtime/app/state/index.js", + "../src/runtime/app/stores.js" + ], + "sourcesContent": [ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null + ], + "mappings": ";;;;;;;;MAiCKA,IAAIA;;;;;kBAKQC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;MAQrBC,aAAaA;;;;;OAKJC,YAAYA;;kBAETC,aAAaA;;;;;;MAMzBC,qBAAqBA;;;;;;;;;;;kBAWTC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8IPC,MAAMA;;;;;;;;;;;kBAWNC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4DPC,QAAQA;;;;;;;;kBAQRC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAklBdC,MAAMA;;;;;;;;;;;aAWNC,iBAAiBA;;;;;;;;;;;;aAYjBC,qBAAqBA;;;;;;;;;aASrBC,iBAAiBA;;;;;;;;;;aAUjBC,WAAWA;;;;;;;;;;aAUXC,UAAUA;;;;;;aAMVC,UAAUA;;;;;;aAMVC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;aA0BPC,SAASA;;;;;kBAKJC,WAAWA;;;;;;;;;;;;aAYhBC,IAAIA;;;;;;;;;;;;kBAYCC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyHTC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0BfC,gBAAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA6CrBC,cAAcA;;kBAETC,cAAcA;;;;;;;;;;;;;;;;;;;;kBAoBdC,eAAeA;;;;;;;;;;;;;;;;;;aAkBpBC,kBAAkBA;;kBAEbC,cAAcA;;;;;;;;;;;;;;;kBAedC,eAAeA;;;;;;;;;;;;;;;kBAefC,oBAAoBA;;;;;;;;;;;;;;;;;;;;kBAoBpBC,kBAAkBA;;;;;;;;;;;;;;;;;;kBAkBlBC,cAAcA;;;;;;;;;;;;;;;;;;;;aAoBnBC,UAAUA;;;;;;;;;aASVC,cAAcA;;;;;;;;;;aAUdC,UAAUA;;;;;;;;;;;aAWVC,aAAaA;;;;;;;;;;;kBAWRC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA8CTC,YAAYA;;;;;;;;;aASZC,cAAcA;;;;;;;;;;;aAWdC,kBAAkBA;;;;;aAKlBC,oBAAoBA;;;;;;;;;;;;;;;;aAgBpBC,wBAAwBA;;;;;;;;;;;;;;;;;;aAkBxBC,eAAeA;;;;kBAIVC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA+GjBC,cAAcA;;;;;kBAKTC,cAAcA;;;;;;;;;;;;;;;;;;;;;;;kBAuBdC,eAAeA;;;;;;;;;;;;;;;cAenBC,MAAMA;;;;;;kBAMFC,iBAAiBA;;;;;;;kBAOjBC,WAAWA;;;;;;;;;;;;;;;;;;;;;;;;;aAyBhBC,UAAUA;;;;;;;kBAOLC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAkFpBC,MAAMA;;;;;;;;;;aAUNC,OAAOA;;;;;;;;;;;;;;;;aAgBPC,YAAYA;;;;;;;;;;;;kBC5xDXC,SAASA;;;;;;;;;;kBAqBTC,QAAQA;;;;;;;aDoyDTC,cAAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6BTC,QAAQA;;;;;;MAMpBC,uBAAuBA;;;MAGvBC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA6BLC,mBAAmBA;;;;;MAK1BC,iBAAiBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkDjBC,sBAAsBA;;;;;;;;;;;MAWtBC,WAAWA;MACXC,eAAeA;;;;;;aAMRC,oBAAoBA;;MAE3BC,MAAMA;;;;;;;;;;;;;;;;;;;aAmBCC,eAAeA;;;;;;;;;;;;;;MActBC,wBAAwBA;;;;;MAKxBC,YAAYA;;;;;;;;;;;;;;;;;;MAkBZC,oBAAoBA;;;;;;;;;;;;;;;aAebC,gBAAgBA;;;;;;;;;;;;;;;;;;;;;MAqBvBC,mBAAmBA;;;;MAInBC,UAAUA;;kBAEEC,eAAeA;;;;kBAIfC,eAAeA;;;;;;;MAO3BC,SAASA;;;;;;;;;;;;;aAaFC,YAAYA;;;;;;;;;;;;;;;;;;kBAkBPC,eAAeA;;;;;;;;aAQpBC,UAAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAuDVC,aAAaA;;;;;;;;aAQbC,iBAAiBA;;;;;;;aAOjBC,cAAcA;;;;;;;;;;;;;;;;;;aAkBdC,WAAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA2CXC,eAAeA;;;;;;;;;;;;;;;aAefC,mBAAmBA;;;;;aAKnBC,uBAAuBA;;;;;;;;;;;;;;;;aAgBvBC,mBAAmBA;;;;;;;;;;;aAWnBC,uBAAuBA;;;WEzwElBC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAkDZC,GAAGA;;;;;;;;;;;;;;;;;;;;;WAqBHC,aAAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmElBC,UAAUA;;WAELC,MAAMA;;;;;;;;;MASXC,YAAYA;;WAEPC,WAAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAmCXC,yBAAyBA;;;;;;;;;;WAUzBC,yBAAyBA;;;;WAIzBC,sCAAsCA;;;;WAItCC,4BAA4BA;;;;MAIjCC,8BAA8BA;MAC9BC,8BAA8BA;MAC9BC,iCAAiCA;;;;;MAKjCC,2CAA2CA;;;;;;aAM3CC,eAAeA;;WAIVC,cAAcA;;;;;WAKdC,YAAYA;;;;;;;MAOjBC,aAAaA;;MAEbC,WAAWA;;;;;;;;MAQXC,KAAKA;WCtMAC,KAAKA;;;;;;WAeLC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAuHTC,YAAYA;;;;;;;;;;;;;WAkBZC,QAAQA;;;;;;;;;;;;;;;;MAkCbC,iBAAiBA;;;;;;;;;WAWZC,UAAUA;;;;;;;;;;;;;WAaVC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;WAqJTC,YAAYA;;;;;;;;;;;;;;;;;;;;MAoBjBC,kBAAkBA;;WAEbC,aAAaA;;;;;;;;;;;WAWbC,UAAUA;;;;;;;;;;;WAWVC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;MAyBZC,aAAaA;;WA+BRC,eAAeA;;;;;;MAMpBC,uBAAuBA;;MAGvBC,WAAWA;;;;;;;;WAQNC,QAAQA;;;;;;;;;WASRC,cAAcA;;;;;;;;;MA+CnBC,eAAeA;;;;;MAKfC,kBAAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCvfdC,WAAWA;;;;;;;;;;;;;;;;;;;iBAsBXC,QAAQA;;;;;iBAiBRC,UAAUA;;;;;;iBASVC,IAAIA;;;;;;iBA4BJC,IAAIA;;;;;;;;;;;;;;;;iBAkDJC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+BfC,OAAOA;;;;;;iBAYPC,iBAAiBA;;;;;;;;;;;;;;iBAmBjBC,YAAYA;;;;;;;MCpQ2BC,eAAeA;MACjBC,WAAWA;OAd1DC,wBAAwBA;cCDjBC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBC4EJC,QAAQA;;;;;;iBCyCFC,UAAUA;;;;;;iBAgDVC,WAAWA;;;;;iBAgFjBC,oBAAoBA;;;;;;;;;;;iBCtOpBC,gBAAgBA;;;;;;;;;;iBCuHVC,SAASA;;;;;;;;;cCtIlBC,OAAOA;;;;;cAKPC,GAAGA;;;;;cAKHC,QAAQA;;;;;cAKRC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;iBCaJC,WAAWA;;;;;;;;;;;;;;;;;;;;;;;;iBAgDXC,OAAOA;;;;;;;iBCs4EDC,WAAWA;;;;;;;;;;;iBA9UjBC,aAAaA;;;;;;;;;;;;iBAiBbC,cAAcA;;;;;;;;;;iBAedC,UAAUA;;;;;iBASVC,qBAAqBA;;;;;;;;;;iBA8BrBC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCJC,UAAUA;;;;iBA0BVC,aAAaA;;;;;iBAebC,UAAUA;;;;;;;;;;;;;;iBAqBJC,WAAWA;;;;;;;;;;;;;;;;;;iBAoCXC,WAAWA;;;;;iBAsCjBC,SAASA;;;;;iBA+CTC,YAAYA;MXhxEhBzE,YAAYA;;;;;;;;;;;;;;YY/Ib0E,IAAIA;;;;;;;;;YASJC,MAAMA;;;;;iBAKDC,YAAYA;;;MCnBvBC,iBAAiBA;;;;;;MAMVC,WAAWA;;;;;;;;;;;;;;;;;;;;;;;;;;iBCWPC,KAAKA;;;;;;;;;;;;;;;;;;;;;iBA6BLC,OAAOA;;;;;;;;;;;;;;;;;;;iBAmCDC,KAAKA;;;;;;;;;;;;;;;;;;;;;;;iBCrEXC,IAAIA;;;;;;;;iBCSJC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MfmTnBC,qCAAqCA;;;;;;;;MA0LrCC,8BAA8BA;MD9W9BrF,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ciB1GXsF,IAAIA;;;;;cAQJC,UAAUA;;;;;;;;;;;cAMVC,OAAOA;;;;;;;;;iBCrDPC,SAASA;;;;;;;;;;;;;;;cAyBTH,IAAIA;;;;;;;;;;cAiBJC,UAAUA;;;;;;;;cAeVC,OAAOA", + "ignoreList": [] +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..df659d46b774218fb5cb363228ca8cc4d2888900 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2020-Present [these people](https://github.com/sveltejs/language-tools/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/dist/src/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/dist/src/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..629d63b96309b05f3d47c42c3da9a72ff523abc3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/dist/src/index.d.ts @@ -0,0 +1,35 @@ +type ConfigSource = 'svelte' | 'vite'; +interface SvelteConfig { + compilerOptions?: Record; + preprocess?: unknown; + extensions?: string[]; + kit?: unknown; + vitePlugin?: unknown; + [key: string]: unknown; +} +interface LoadedConfig { + config: SvelteConfig; + configFilePath: string; + configSource: ConfigSource; +} +interface FailedConfig { + error: unknown; + configFilePath: string; + configSource: ConfigSource; +} +type LoadConfigResult = LoadedConfig | FailedConfig | undefined; +/** + * Loads the Svelte configuration by searching for `vite.config` and `svelte.config` files. + * + * If `traverse` is true, it starts from the provided directory and traverses up the directory tree until it finds a config or reaches the root. + * Else it only checks the provided directory. + * + * `vite.config` with either vite-plugin-svelte or the SvelteKit plugin providing options is preferred over `svelte.config`. + * + * The results are cached to optimize subsequent calls. + */ +export declare function loadConfig(dir: string, { traverse, clearCache }?: { + traverse?: boolean; + clearCache?: boolean; +}): Promise; +export {}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/dist/src/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/dist/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..ad82d129bc84dbdd14cb5bcbb0893cb7ff730ef8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/dist/src/index.js @@ -0,0 +1,180 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.loadConfig = loadConfig; +const node_fs_1 = __importDefault(require("node:fs")); +const node_path_1 = __importDefault(require("node:path")); +const node_url_1 = require("node:url"); +const VITE_CONFIG_EXTENSIONS = ['js', 'mjs', 'ts', 'cjs', 'mts', 'cts']; +const SVELTE_CONFIG_EXTENSIONS = ['js', 'cjs', 'mjs']; +const SVELTE_CONFIG_TS_EXTENSIONS = ['ts', 'mts']; +const cache = new Map(); +/** + * This function encapsulates the import call in a way + * that TypeScript does not transpile `import()`. + * https://github.com/microsoft/TypeScript/issues/43329 + */ +const dynamicImport = new Function('modulePath', 'return import(modulePath)'); +/** + * Loads the Svelte configuration by searching for `vite.config` and `svelte.config` files. + * + * If `traverse` is true, it starts from the provided directory and traverses up the directory tree until it finds a config or reaches the root. + * Else it only checks the provided directory. + * + * `vite.config` with either vite-plugin-svelte or the SvelteKit plugin providing options is preferred over `svelte.config`. + * + * The results are cached to optimize subsequent calls. + */ +function loadConfig(dir, { traverse = true, clearCache = false } = {}) { + if (clearCache) + cache.clear(); + const startDir = node_path_1.default.resolve(dir); + const cached = cache.get(startDir); + if (cached) { + return cached; + } + const loading = loadConfigUncached(startDir, traverse); + cache.set(startDir, loading); + return loading; +} +async function loadConfigUncached(dir, traverse) { + let currentDir = dir; + const dirs = [dir]; + while (true) { + const result = await loadConfigFromDirectory(currentDir); + if (result) { + if (isLoadedConfig(result)) { + // Cache the loaded config for all traversed directories + for (const d of dirs) { + cache.set(d, Promise.resolve(result)); + } + } + else { + cache.delete(dir); + } + return result; + } + if (!traverse) { + return undefined; + } + const parentDir = node_path_1.default.dirname(currentDir); + if (parentDir === currentDir) { + return undefined; + } + currentDir = parentDir; + dirs.push(currentDir); + } +} +async function loadConfigFromDirectory(dir) { + const viteConfigPath = findConfigInDirectory(dir, 'vite.config', VITE_CONFIG_EXTENSIONS); + let viteError; + if (viteConfigPath) { + const result = await loadSvelteConfigFromVite(dir, viteConfigPath); + if (isLoadedConfig(result)) { + return result; + } + if (result?.error) { + viteError = result; + } + } + const svelteConfigPath = findConfigInDirectory(dir, 'svelte.config', getSvelteConfigExtensions()); + if (!svelteConfigPath) { + return viteError; + } + return (await loadSvelteConfig(svelteConfigPath)) ?? viteError; +} +let resolving = null; +async function loadSvelteConfigFromVite(root, configFilePath) { + const vite = await tryImportVite(root); + if (!vite) { + return undefined; + } + // Make sure that only one Vite config is resolved at a time, to prevent race conditions with multiple + // calls to `loadConfig` ending up with changing the process' current working directory mid-resolution. + await resolving; + let resolve; + resolving = new Promise((r) => (resolve = r)); + const cwd = process.cwd(); + try { + process.chdir(root); + const resolved = await vite.resolveConfig({ root, configFile: configFilePath, logLevel: 'error' }, 'serve'); + const kitPlugin = resolved.plugins.find((plugin) => plugin.name === 'vite-plugin-sveltekit-setup'); + const kitOptions = kitPlugin?.api?.options; + if (kitOptions) { + const { preprocess, compilerOptions, extensions, vitePlugin, ...kit } = kitOptions; + return { + config: { preprocess, compilerOptions, extensions, vitePlugin, kit }, + configFilePath, + configSource: 'vite' + }; + } + const sveltePlugin = resolved.plugins.find((plugin) => plugin.name === 'vite-plugin-svelte:config'); + const options = sveltePlugin?.api?.options; + if (options) { + return { + config: options, + configFilePath, + configSource: 'vite' + }; + } + } + catch (error) { + return { + error, + configFilePath, + configSource: 'vite' + }; + } + finally { + process.chdir(cwd); + resolve(); + } +} +async function loadSvelteConfig(configFilePath) { + try { + const config = (await dynamicImport((0, node_url_1.pathToFileURL)(configFilePath).href))?.default; + if (!config) { + throw new Error('Missing exports in the config. Make sure to include "export default config" or "module.exports = config"'); + } + return { + config, + configFilePath, + configSource: 'svelte' + }; + } + catch (error) { + return { + error, + configFilePath, + configSource: 'svelte' + }; + } +} +async function tryImportVite(fromPath) { + try { + const main = require.resolve('vite', { paths: [fromPath] }); + return await dynamicImport((0, node_url_1.pathToFileURL)(main).href); + } + catch { + return undefined; + } +} +function findConfigInDirectory(dir, basename, extensions) { + for (const extension of extensions) { + const configPath = node_path_1.default.join(dir, `${basename}.${extension}`); + if (node_fs_1.default.existsSync(configPath)) { + return configPath; + } + } +} +function getSvelteConfigExtensions() { + return process.features && 'typescript' in process.features && process.features.typescript + ? [...SVELTE_CONFIG_EXTENSIONS, ...SVELTE_CONFIG_TS_EXTENSIONS] + : SVELTE_CONFIG_EXTENSIONS; +} +function isLoadedConfig(result) { + return !!result && 'config' in result; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/dist/src/index.js.map b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/dist/src/index.js.map new file mode 100644 index 0000000000000000000000000000000000000000..5278bf2e7eac5913accafa36741208346c965400 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/dist/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;AA+DA,gCAeC;AA9ED,sDAAyB;AACzB,0DAA6B;AAC7B,uCAA8C;AAE9C,MAAM,sBAAsB,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AACjF,MAAM,wBAAwB,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAC/D,MAAM,2BAA2B,GAAG,CAAC,IAAI,EAAE,KAAK,CAAU,CAAC;AAoC3D,MAAM,KAAK,GAAG,IAAI,GAAG,EAAqC,CAAC;AAE3D;;;;GAIG;AACH,MAAM,aAAa,GAAG,IAAI,QAAQ,CAAC,YAAY,EAAE,2BAA2B,CAE3D,CAAC;AAElB;;;;;;;;;GASG;AACH,SAAgB,UAAU,CACtB,GAAW,EACX,EAAE,QAAQ,GAAG,IAAI,EAAE,UAAU,GAAG,KAAK,KAAmD,EAAE;IAE1F,IAAI,UAAU;QAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IAE9B,MAAM,QAAQ,GAAG,mBAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnC,IAAI,MAAM,EAAE,CAAC;QACT,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,OAAO,GAAG,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACvD,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7B,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,KAAK,UAAU,kBAAkB,CAAC,GAAW,EAAE,QAAiB;IAC5D,IAAI,UAAU,GAAG,GAAG,CAAC;IACrB,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IAEnB,OAAO,IAAI,EAAE,CAAC;QACV,MAAM,MAAM,GAAG,MAAM,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACzD,IAAI,MAAM,EAAE,CAAC;YACT,IAAI,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;gBACzB,wDAAwD;gBACxD,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;oBACnB,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC1C,CAAC;YACL,CAAC;iBAAM,CAAC;gBACJ,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACtB,CAAC;YACD,OAAO,MAAM,CAAC;QAClB,CAAC;QAED,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,MAAM,SAAS,GAAG,mBAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;YAC3B,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,UAAU,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC1B,CAAC;AACL,CAAC;AAED,KAAK,UAAU,uBAAuB,CAAC,GAAW;IAC9C,MAAM,cAAc,GAAG,qBAAqB,CAAC,GAAG,EAAE,aAAa,EAAE,sBAAsB,CAAC,CAAC;IACzF,IAAI,SAAmC,CAAC;IAExC,IAAI,cAAc,EAAE,CAAC;QACjB,MAAM,MAAM,GAAG,MAAM,wBAAwB,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QACnE,IAAI,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,OAAO,MAAM,CAAC;QAClB,CAAC;QACD,IAAI,MAAM,EAAE,KAAK,EAAE,CAAC;YAChB,SAAS,GAAG,MAAM,CAAC;QACvB,CAAC;IACL,CAAC;IAED,MAAM,gBAAgB,GAAG,qBAAqB,CAC1C,GAAG,EACH,eAAe,EACf,yBAAyB,EAAE,CAC9B,CAAC;IACF,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACpB,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,OAAO,CAAC,MAAM,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,IAAI,SAAS,CAAC;AACnE,CAAC;AAED,IAAI,SAAS,GAAyB,IAAI,CAAC;AAE3C,KAAK,UAAU,wBAAwB,CACnC,IAAY,EACZ,cAAsB;IAEtB,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,sGAAsG;IACtG,uGAAuG;IACvG,MAAM,SAAS,CAAC;IAEhB,IAAI,OAAO,CAAC;IACZ,SAAS,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;IAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE1B,IAAI,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CACrC,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,EACvD,OAAO,CACV,CAAC;QACF,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CACnC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,6BAA6B,CAC5D,CAAC;QACF,MAAM,UAAU,GAAG,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC;QAC3C,IAAI,UAAU,EAAE,CAAC;YACb,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,GAAG,EAAE,GAAG,UAAU,CAAC;YACnF,OAAO;gBACH,MAAM,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE;gBACpE,cAAc;gBACd,YAAY,EAAE,MAAM;aACvB,CAAC;QACN,CAAC;QAED,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CACtC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,2BAA2B,CAC1D,CAAC;QACF,MAAM,OAAO,GAAG,YAAY,EAAE,GAAG,EAAE,OAAO,CAAC;QAC3C,IAAI,OAAO,EAAE,CAAC;YACV,OAAO;gBACH,MAAM,EAAE,OAAO;gBACf,cAAc;gBACd,YAAY,EAAE,MAAM;aACvB,CAAC;QACN,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO;YACH,KAAK;YACL,cAAc;YACd,YAAY,EAAE,MAAM;SACvB,CAAC;IACN,CAAC;YAAS,CAAC;QACP,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAQ,EAAE,CAAC;IACf,CAAC;AACL,CAAC;AAED,KAAK,UAAU,gBAAgB,CAAC,cAAsB;IAClD,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,CAAC,MAAM,aAAa,CAAC,IAAA,wBAAa,EAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC;QAClF,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CACX,0GAA0G,CAC7G,CAAC;QACN,CAAC;QAED,OAAO;YACH,MAAM;YACN,cAAc;YACd,YAAY,EAAE,QAAQ;SACzB,CAAC;IACN,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO;YACH,KAAK;YACL,cAAc;YACd,YAAY,EAAE,QAAQ;SACzB,CAAC;IACN,CAAC;AACL,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,QAAgB;IACzC,IAAI,CAAC;QACD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC5D,OAAO,MAAM,aAAa,CAAC,IAAA,wBAAa,EAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,SAAS,CAAC;IACrB,CAAC;AACL,CAAC;AAED,SAAS,qBAAqB,CAC1B,GAAW,EACX,QAAyC,EACzC,UAA6B;IAE7B,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,MAAM,UAAU,GAAG,mBAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,IAAI,SAAS,EAAE,CAAC,CAAC;QAC9D,IAAI,iBAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5B,OAAO,UAAU,CAAC;QACtB,CAAC;IACL,CAAC;AACL,CAAC;AAED,SAAS,yBAAyB;IAC9B,OAAO,OAAO,CAAC,QAAQ,IAAI,YAAY,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,UAAU;QACtF,CAAC,CAAC,CAAC,GAAG,wBAAwB,EAAE,GAAG,2BAA2B,CAAC;QAC/D,CAAC,CAAC,wBAAwB,CAAC;AACnC,CAAC;AAED,SAAS,cAAc,CAAC,MAAwB;IAC5C,OAAO,CAAC,CAAC,MAAM,IAAI,QAAQ,IAAI,MAAM,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ede40567cbcd935316dd9826ae3b71c0562b6833 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/load-config/package.json @@ -0,0 +1,31 @@ +{ + "name": "@sveltejs/load-config", + "version": "0.1.1", + "description": "Load Svelte config via vite.config or svelte.config", + "repository": { + "type": "git", + "url": "git+https://github.com/sveltejs/language-tools.git" + }, + "main": "dist/src/index.js", + "typings": "dist/src/index.d.ts", + "exports": { + ".": { + "types": "./dist/src/index.d.ts", + "default": "./dist/src/index.js" + } + }, + "files": [ + "dist/src" + ], + "engines": { + "node": ">= 18.0.0" + }, + "license": "MIT", + "devDependencies": { + "@types/node": "^18.0.0", + "typescript": "^6.0.3" + }, + "scripts": { + "build": "tsc" + } +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..c1a5d8f07a261030581a794a667eb58701637e92 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 [these people](https://github.com/sveltejs/vite-plugin-svelte/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/README.md new file mode 100644 index 0000000000000000000000000000000000000000..14dfbbbb6053d36ba335aaec7911beb3afae6c11 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/README.md @@ -0,0 +1,26 @@ +# @sveltejs/vite-plugin-svelte-inspector + +A [Svelte](https://svelte.dev) inspector plugin for [Vite](https://vitejs.dev). + +## Usage + +This plugin is automatically installed as a dependency of [@sveltejs/vite-plugin-svelte](https://www.npmjs.com/package/@sveltejs/vite-plugin-svelte). + +You can enable it in `svelte.config.js` by adding the `vitePlugin.inspector` option. + +```js +// svelte.config.js +export default { + vitePlugin: { + inspector: true + } +}; +``` + +Now simply press `alt-x` (`option-x` on MacOS) on a page served by the Vite dev server to activate inspect mode. Click on a highlighted element to jump to its source code in your editor. + +Also check out the [docs](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/inspector.md) for customization options. + +## License + +[MIT](./LICENSE) diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/package.json new file mode 100644 index 0000000000000000000000000000000000000000..dbc5c76dfe2faeee564753459d83e8012f47dd53 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/package.json @@ -0,0 +1,54 @@ +{ + "name": "@sveltejs/vite-plugin-svelte-inspector", + "version": "5.0.2", + "license": "MIT", + "author": "dominikg", + "files": [ + "src", + "types" + ], + "type": "module", + "types": "types/index.d.ts", + "exports": { + ".": { + "types": "./types/index.d.ts", + "default": "./src/index.js" + } + }, + "engines": { + "node": "^20.19 || ^22.12 || >=24" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sveltejs/vite-plugin-svelte.git", + "directory": "packages/vite-plugin-svelte-inspector" + }, + "keywords": [ + "vite-plugin", + "vite plugin", + "vite", + "svelte" + ], + "bugs": { + "url": "https://github.com/sveltejs/vite-plugin-svelte/issues" + }, + "homepage": "https://github.com/sveltejs/vite-plugin-svelte#readme", + "dependencies": { + "obug": "^2.1.0" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^6.0.0-next.0", + "svelte": "^5.0.0", + "vite": "^6.3.0 || ^7.0.0" + }, + "devDependencies": { + "@types/debug": "^4.1.12", + "svelte": "^5.45.4", + "vite": "^7.2.6" + }, + "scripts": { + "check:publint": "publint --strict", + "check:types": "tsc --noEmit", + "generate:types": "dts-buddy -m \"@sveltejs/vite-plugin-svelte-inspector:src/public.d.ts\"" + } +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/debug.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/debug.js new file mode 100644 index 0000000000000000000000000000000000000000..82554e6a8a7800c1b36a676a489200a9da61e122 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/debug.js @@ -0,0 +1,3 @@ +import { createDebug } from 'obug'; + +export const debug = createDebug('vite-plugin-svelte-inspector'); diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..18a48a544d740f3922ce925b0ae6412fb0267571 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/index.js @@ -0,0 +1,127 @@ +import { normalizePath } from 'vite'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { debug } from './debug.js'; +import { defaultInspectorOptions, parseEnvironmentOptions } from './options.js'; +import { cleanUrl } from './utils.js'; + +function getInspectorPath() { + const pluginPath = normalizePath(path.dirname(fileURLToPath(import.meta.url))); + return pluginPath.replace( + /\/vite-plugin-svelte-inspector\/src$/, + '/vite-plugin-svelte-inspector/src/runtime/' + ); +} + +/** + * @param {Partial} [options] + * @returns {import('vite').Plugin} + */ +export function svelteInspector(options) { + const inspectorPath = getInspectorPath(); + debug(`svelte inspector path: ${inspectorPath}`); + + /** @type {import('vite').ResolvedConfig} */ + let viteConfig; + /** @type {import('./public.d.ts').Options} */ + let inspectorOptions; + let disabled = false; + + return { + name: 'vite-plugin-svelte-inspector', + apply: 'serve', + enforce: 'pre', + + applyToEnvironment(env) { + return !disabled && env.config.consumer === 'client'; + }, + + configResolved(config) { + viteConfig = config; + const environmentOptions = parseEnvironmentOptions(config); + if (environmentOptions === false) { + debug('environment options set to false, inspector disabled'); + disabled = true; + return; + } + + // Handle config from svelte.config.js through vite-plugin-svelte + const vps = config.plugins.find((p) => p.name === 'vite-plugin-svelte:config'); + const configFileOptions = vps?.api?.options?.inspector; + + // vite-plugin-svelte can only pass options through it's `api` instead of `options`. + // that means this plugin could be created but should be disabled, so we check this case here. + if (vps && !options && !configFileOptions && !environmentOptions) { + debug("vite-plugin-svelte didn't pass options, inspector disabled"); + disabled = true; + return; + } + + if (environmentOptions === true) { + inspectorOptions = defaultInspectorOptions; + } else { + inspectorOptions = { + ...defaultInspectorOptions, + ...configFileOptions, + ...options, + ...(environmentOptions || {}) + }; + } + + inspectorOptions.__internal = { + base: config.base?.replace(/\/$/, '') || '' + }; + }, + resolveId: { + filter: { + id: /^virtual:svelte-inspector-/ + }, + async handler(id) { + if (disabled) { + return; + } + if (id === 'virtual:svelte-inspector-options') { + return id; + } else if (id.startsWith('virtual:svelte-inspector-path:')) { + return id.replace('virtual:svelte-inspector-path:', inspectorPath); + } + } + }, + load: { + filter: { + id: { + include: [`${inspectorPath}/**`, /^virtual:svelte-inspector-options$/], + exclude: [/style&lang\.css$/] + } + }, + async handler(id) { + if (disabled) { + return; + } + if (id === 'virtual:svelte-inspector-options') { + return `export default ${JSON.stringify(inspectorOptions ?? {})}`; + } else if (id.startsWith(inspectorPath)) { + // read file ourselves to avoid getting shut out by vites fs.allow check + const file = cleanUrl(id); + if (fs.existsSync(id)) { + return await fs.promises.readFile(file, 'utf-8'); + } else { + viteConfig.logger.error( + `[vite-plugin-svelte-inspector] failed to find svelte-inspector: ${id}` + ); + } + } + } + }, + transform: { + filter: { id: /vite\/dist\/client\/client\.mjs(?:\?|$)/ }, + handler(code) { + if (disabled) { + return; + } + return { code: `${code}\nimport('virtual:svelte-inspector-path:load-inspector.js')` }; + } + } + }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/options.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/options.js new file mode 100644 index 0000000000000000000000000000000000000000..15a24564e7b584d15ac5fe995188cbbad7333a90 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/options.js @@ -0,0 +1,63 @@ +import process from 'node:process'; +import { loadEnv } from 'vite'; +import { debug } from './debug.js'; + +/** @type {import('./public.d.ts').Options} */ +export const defaultInspectorOptions = { + toggleKeyCombo: 'alt-x', + navKeys: { parent: 'ArrowUp', child: 'ArrowDown', next: 'ArrowRight', prev: 'ArrowLeft' }, + escapeKeys: ['Backspace', 'Escape'], + openKey: 'Enter', + holdMode: true, + showToggleButton: 'active', + toggleButtonPos: 'top-right', + customStyles: true +}; + +/** + * @param {import('vite').ResolvedConfig} config + * @returns {Partial | boolean | void} + */ +export function parseEnvironmentOptions(config) { + const env = loadEnv(config.mode, config.envDir ?? process.cwd(), 'SVELTE_INSPECTOR'); + const options = env?.SVELTE_INSPECTOR_OPTIONS; + const toggle = env?.SVELTE_INSPECTOR_TOGGLE; + if (options) { + try { + const parsed = JSON.parse(options); + const parsedType = typeof parsed; + if (parsedType === 'boolean') { + return parsed; + } else if (parsedType === 'object') { + if (Array.isArray(parsed)) { + throw new Error('invalid type, expected object map but got array'); + } + const parsedKeys = Object.keys(parsed); + const defaultKeys = Object.keys(defaultInspectorOptions); + const unknownKeys = parsedKeys.filter((k) => !defaultKeys.includes(k)); + if (unknownKeys.length) { + config.logger.warn( + `[vite-plugin-svelte-inspector] ignoring unknown options in environment SVELTE_INSPECTOR_OPTIONS: ${unknownKeys.join( + ', ' + )}` + ); + for (const key of unknownKeys) { + delete parsed[key]; + } + } + debug('loaded environment config', parsed); + return parsed; + } + } catch (e) { + config.logger.error( + `[vite-plugin-svelte-inspector] failed to parse inspector options from environment SVELTE_INSPECTOR_OPTIONS="${options}"\n${e}` + ); + } + } else if (toggle) { + const keyConfig = { + toggleKeyCombo: toggle + }; + debug('loaded environment config', keyConfig); + return keyConfig; + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/public.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/public.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..94e844b58297ab524f70b5ebbecfa3792a3ae16f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/public.d.ts @@ -0,0 +1,78 @@ +export interface Options { + /** + * define a key combo to toggle inspector, + * @default 'alt-x' + * + * any number of modifiers `control` `shift` `alt` `meta` followed by zero or one regular key, separated by - + * examples: control-shift, control-o, control-alt-s meta-x control-meta + * Some keys have native behavior (e.g. alt-s opens history menu on firefox). + * To avoid conflicts or accidentally typing into inputs, modifier only combinations are recommended. + */ + toggleKeyCombo?: string; + + /** + * define keys to select elements with via keyboard + * @default {parent: 'ArrowUp', child: 'ArrowDown', next: 'ArrowRight', prev: 'ArrowLeft' } + * + * improves accessibility and also helps when you want to select elements that do not have a hoverable surface area + * due to tight wrapping + * + * A note for users of screen-readers: + * If you are using arrow keys to navigate the page itself, change the navKeys to avoid conflicts. + * e.g. navKeys: {parent: 'w', prev: 'a', child: 's', next: 'd'} + * + * + * parent: select closest parent + * child: select first child (or grandchild) + * next: next sibling (or parent if no next sibling exists) + * prev: previous sibling (or parent if no prev sibling exists) + */ + navKeys?: { parent: string; child: string; next: string; prev: string }; + + /** + * define key to open the editor for the currently selected dom node + * + * @default 'Enter' + */ + openKey?: string; + + /** + * define keys to close the inspector + * @default ['Backspace', 'Escape'] + */ + escapeKeys?: string[]; + + /** + * inspector is automatically disabled when releasing toggleKeyCombo after holding it for a longpress + * @default true + */ + holdMode?: boolean; + + /** + * when to show the toggle button + * @default 'active' + */ + showToggleButton?: 'always' | 'active' | 'never'; + + /** + * where to display the toggle button + * @default 'top-right' + */ + toggleButtonPos?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; + + /** + * inject custom styles when inspector is active + */ + customStyles?: boolean; + + /** + * internal options that are automatically set, not to be set or used by users + * @internal + */ + __internal?: { + // vite base url + base: string; + }; +} +// eslint-disable-next-line n/no-missing-import +export * from './index.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/Inspector.svelte b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/Inspector.svelte new file mode 100644 index 0000000000000000000000000000000000000000..9a03c49c7944cbe1720a7a48e28b4bff45d1d45f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/Inspector.svelte @@ -0,0 +1,411 @@ + + + + +{#if show_toggle} + +{/if} +{#if enabled && active_el && file_loc} + {@const loc = active_el.__svelte_meta.loc} +
+ <{active_el.tagName.toLowerCase()}> {file_loc} +
+
+ {active_el.tagName.toLowerCase()} in file {loc.file} on line {loc.line} column {loc.column} +
+{/if} + + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/load-inspector.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/load-inspector.js new file mode 100644 index 0000000000000000000000000000000000000000..5662f9fa04d56259c8967023f1c2a8f628ac4fb6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/runtime/load-inspector.js @@ -0,0 +1,14 @@ +// eslint-disable-next-line n/no-missing-import +import Inspector from 'virtual:svelte-inspector-path:Inspector.svelte'; +import { mount } from 'svelte'; +function create_inspector_host() { + const id = 'svelte-inspector-host'; + if (document.getElementById(id) != null) { + throw new Error('svelte-inspector-host element already exists'); + } + const el = document.createElement('div'); + el.setAttribute('id', id); + document.documentElement.appendChild(el); + return el; +} +mount(Inspector, { target: create_inspector_host() }); diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/utils.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..bcb43f9fcd29109677f5447b8a03d3183040bcb7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/src/utils.js @@ -0,0 +1,8 @@ +const postfixRE = /[?#].*$/s; + +/** + * @param {string} url + */ +export function cleanUrl(url) { + return url.replace(postfixRE, ''); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..581654bc946415600619d1888950c2a7238febdf --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts @@ -0,0 +1,82 @@ +declare module '@sveltejs/vite-plugin-svelte-inspector' { + export interface Options { + /** + * define a key combo to toggle inspector, + * @default 'alt-x' + * + * any number of modifiers `control` `shift` `alt` `meta` followed by zero or one regular key, separated by - + * examples: control-shift, control-o, control-alt-s meta-x control-meta + * Some keys have native behavior (e.g. alt-s opens history menu on firefox). + * To avoid conflicts or accidentally typing into inputs, modifier only combinations are recommended. + */ + toggleKeyCombo?: string; + + /** + * define keys to select elements with via keyboard + * @default {parent: 'ArrowUp', child: 'ArrowDown', next: 'ArrowRight', prev: 'ArrowLeft' } + * + * improves accessibility and also helps when you want to select elements that do not have a hoverable surface area + * due to tight wrapping + * + * A note for users of screen-readers: + * If you are using arrow keys to navigate the page itself, change the navKeys to avoid conflicts. + * e.g. navKeys: {parent: 'w', prev: 'a', child: 's', next: 'd'} + * + * + * parent: select closest parent + * child: select first child (or grandchild) + * next: next sibling (or parent if no next sibling exists) + * prev: previous sibling (or parent if no prev sibling exists) + */ + navKeys?: { parent: string; child: string; next: string; prev: string }; + + /** + * define key to open the editor for the currently selected dom node + * + * @default 'Enter' + */ + openKey?: string; + + /** + * define keys to close the inspector + * @default ['Backspace', 'Escape'] + */ + escapeKeys?: string[]; + + /** + * inspector is automatically disabled when releasing toggleKeyCombo after holding it for a longpress + * @default true + */ + holdMode?: boolean; + + /** + * when to show the toggle button + * @default 'active' + */ + showToggleButton?: 'always' | 'active' | 'never'; + + /** + * where to display the toggle button + * @default 'top-right' + */ + toggleButtonPos?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; + + /** + * inject custom styles when inspector is active + */ + customStyles?: boolean; + + /** + * internal options that are automatically set, not to be set or used by users + * */ + __internal?: { + // vite base url + base: string; + }; + } + export function svelteInspector(options?: Partial): import("vite").Plugin; + + export {}; +} + +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts.map b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts.map new file mode 100644 index 0000000000000000000000000000000000000000..e01cdd7fb29878dbd7bdfef3524989e1b1d8e4ef --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte-inspector/types/index.d.ts.map @@ -0,0 +1,18 @@ +{ + "version": 3, + "file": "index.d.ts", + "names": [ + "Options", + "svelteInspector" + ], + "sources": [ + "../src/public.d.ts", + "../src/index.js" + ], + "sourcesContent": [ + null, + null + ], + "mappings": ";kBAAiBA,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCoBRC,eAAeA", + "ignoreList": [] +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..c1a5d8f07a261030581a794a667eb58701637e92 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 [these people](https://github.com/sveltejs/vite-plugin-svelte/graphs/contributors) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/README.md new file mode 100644 index 0000000000000000000000000000000000000000..48798bcc5ae122d3dccd0feb7ac739f02398a953 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/README.md @@ -0,0 +1,28 @@ +# @sveltejs/vite-plugin-svelte + +The official [Svelte](https://svelte.dev) plugin for [Vite](https://vitejs.dev). + +## Usage + +```js +// vite.config.js +import { defineConfig } from 'vite'; +import { svelte } from '@sveltejs/vite-plugin-svelte'; + +export default defineConfig({ + plugins: [ + svelte({ + /* plugin options */ + }) + ] +}); +``` + +## Documentation + +- [Plugin options](../../docs/config.md) +- [FAQ](../../docs/faq.md) + +## License + +[MIT](./LICENSE) diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e0a36f12ec96fc84aa50e745821207c524f62ddf --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/package.json @@ -0,0 +1,58 @@ +{ + "name": "@sveltejs/vite-plugin-svelte", + "version": "6.2.1", + "license": "MIT", + "author": "dominikg", + "files": [ + "src", + "types" + ], + "type": "module", + "types": "types/index.d.ts", + "exports": { + ".": { + "types": "./types/index.d.ts", + "default": "./src/index.js" + } + }, + "engines": { + "node": "^20.19 || ^22.12 || >=24" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sveltejs/vite-plugin-svelte.git", + "directory": "packages/vite-plugin-svelte" + }, + "keywords": [ + "vite-plugin", + "vite plugin", + "vite", + "svelte" + ], + "bugs": { + "url": "https://github.com/sveltejs/vite-plugin-svelte/issues" + }, + "homepage": "https://github.com/sveltejs/vite-plugin-svelte#readme", + "dependencies": { + "@sveltejs/vite-plugin-svelte-inspector": "^5.0.0", + "debug": "^4.4.1", + "deepmerge": "^4.3.1", + "magic-string": "^0.30.17", + "vitefu": "^1.1.1" + }, + "peerDependencies": { + "svelte": "^5.0.0", + "vite": "^6.3.0 || ^7.0.0" + }, + "devDependencies": { + "@types/debug": "^4.1.12", + "sass": "^1.91.0", + "svelte": "^5.38.6", + "vite": "^7.1.4" + }, + "scripts": { + "check:publint": "publint --strict", + "check:types": "tsc --noEmit", + "generate:types": "dts-buddy -m \"@sveltejs/vite-plugin-svelte:src/public.d.ts\"" + } +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..83e0cc72038b61d22f671841316b1e3da4b7b793 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/index.js @@ -0,0 +1,42 @@ +import process from 'node:process'; +import { log } from './utils/log.js'; +import { configure } from './plugins/configure.js'; +import { preprocess } from './plugins/preprocess.js'; +import { compile } from './plugins/compile.js'; +import { loadCompiledCss } from './plugins/load-compiled-css.js'; +import { setupOptimizer } from './plugins/setup-optimizer.js'; +import { compileModule } from './plugins/compile-module.js'; +import { svelteInspector } from '@sveltejs/vite-plugin-svelte-inspector'; +import { loadCustom } from './plugins/load-custom.js'; +import { hotUpdate } from './plugins/hot-update.js'; + +/** + * returns a list of plugins to handle svelte files + * plugins are named `vite-plugin-svelte:` + * + * @param {Partial} [inlineOptions] + * @returns {import('vite').Plugin[]} + */ +export function svelte(inlineOptions) { + if (process.env.DEBUG != null) { + log.setLevel('debug'); + } + /** @type {import('./types/plugin-api.js').PluginAPI} */ + // @ts-expect-error initialize empty to guard against early use + const api = {}; // initialized by configure plugin, used in others + return [ + { name: 'vite-plugin-svelte' }, // marker for detection logic in other plugins that expect this name + configure(api, inlineOptions), + setupOptimizer(api), + loadCompiledCss(api), + loadCustom(api), + preprocess(api), + compile(api), + compileModule(api), + hotUpdate(api), + svelteInspector() + ]; +} + +export { vitePreprocess } from './preprocess.js'; +export { loadSvelteConfig } from './utils/load-svelte-config.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/compile-module.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/compile-module.js new file mode 100644 index 0000000000000000000000000000000000000000..4ae62f9859a2390d51aa5420703b8e4a5d083e0c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/compile-module.js @@ -0,0 +1,130 @@ +import { buildModuleIdFilter, buildModuleIdParser } from '../utils/id.js'; +import * as svelteCompiler from 'svelte/compiler'; +import { log, logCompilerWarnings } from '../utils/log.js'; +import { toRollupError } from '../utils/error.js'; +import { isSvelteWithAsync } from '../utils/svelte-version.js'; + +/** + * @param {import('../types/plugin-api.d.ts').PluginAPI} api + * @returns {import('vite').Plugin} + */ +export function compileModule(api) { + /** + * @type {import("../types/options.js").ResolvedOptions} + */ + let options; + /** + * @type {import("../types/id.js").ModuleIdParser} + */ + let idParser; + + /** + * @type {import('svelte/compiler').ModuleCompileOptions} + */ + let staticModuleCompileOptions; + + /** @type {import('vite').Plugin} */ + const plugin = { + name: 'vite-plugin-svelte:compile-module', + enforce: 'post', + async configResolved() { + options = api.options; + //@ts-expect-error transform defined below but filter not in type + plugin.transform.filter = buildModuleIdFilter(options); + idParser = buildModuleIdParser(options); + staticModuleCompileOptions = filterNonModuleCompilerOptions(options.compilerOptions); + }, + transform: { + async handler(code, id) { + const ssr = this.environment.config.consumer === 'server'; + const moduleRequest = idParser(id, ssr); + if (!moduleRequest) { + return; + } + const filename = moduleRequest.filename; + /** @type {import('svelte/compiler').CompileOptions} */ + const compileOptions = { + ...staticModuleCompileOptions, + dev: !this.environment.config.isProduction, + generate: ssr ? 'server' : 'client', + filename + }; + const dynamicCompileOptions = await options?.dynamicCompileOptions?.({ + filename, + code, + compileOptions + }); + if (dynamicCompileOptions && log.debug.enabled) { + log.debug( + `dynamic compile options for ${filename}: ${JSON.stringify(dynamicCompileOptions)}`, + undefined, + 'compileModule' + ); + } + const finalCompileOptions = dynamicCompileOptions + ? { + ...compileOptions, + ...dynamicCompileOptions + } + : compileOptions; + if (dynamicCompileOptions?.experimental) { + finalCompileOptions.experimental = { + ...compileOptions.experimental, + ...dynamicCompileOptions.experimental + }; + } + const finalModuleCompileOptions = filterNonModuleCompilerOptions(finalCompileOptions); + if (log.debug.enabled) { + log.debug( + `final ModuleCompileOptions for ${filename}: ${JSON.stringify(finalModuleCompileOptions)}`, + undefined, + 'compileModule' + ); + } + try { + const compileResult = svelteCompiler.compileModule(code, finalModuleCompileOptions); + logCompilerWarnings(moduleRequest, compileResult.warnings, options); + return compileResult.js; + } catch (e) { + throw toRollupError(e, options); + } + } + } + }; + return plugin; +} + +/** + * + * @param {import('svelte/compiler').CompileOptions} compilerOptions + * @return {import('svelte/compiler').ModuleCompileOptions} + */ +function filterNonModuleCompilerOptions(compilerOptions) { + /** @type {Array} */ + const knownModuleCompileOptionNames = ['dev', 'generate', 'filename', 'rootDir', 'warningFilter']; + if (isSvelteWithAsync) { + knownModuleCompileOptionNames.push('experimental'); + } + // not typed but this is temporary until svelte itself ignores CompileOptions passed to compileModule + const experimentalModuleCompilerOptionNames = ['async']; + + /** @type {import('svelte/compiler').ModuleCompileOptions} */ + const filtered = filterByPropNames(compilerOptions, knownModuleCompileOptionNames); + if (filtered.experimental) { + filtered.experimental = filterByPropNames( + filtered.experimental, + experimentalModuleCompilerOptionNames + ); + } + return filtered; +} + +/** + * + * @param {object} o + * @param {string[]} names + * @returns {object} + */ +function filterByPropNames(o, names) { + return Object.fromEntries(Object.entries(o).filter(([name]) => names.includes(name))); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/compile.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/compile.js new file mode 100644 index 0000000000000000000000000000000000000000..e696d8c40ff6c29b32f028d31a64e17e7f405dca --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/compile.js @@ -0,0 +1,65 @@ +import { toRollupError } from '../utils/error.js'; +import { logCompilerWarnings } from '../utils/log.js'; + +/** + * @param {import('../types/plugin-api.d.ts').PluginAPI} api + * @returns {import('vite').Plugin} + */ +export function compile(api) { + /** + * @type {import("../types/options.js").ResolvedOptions} + */ + let options; + + /** + * @type {import("../types/compile.d.ts").CompileSvelte} + */ + let compileSvelte; + /** @type {import('vite').Plugin} */ + const plugin = { + name: 'vite-plugin-svelte:compile', + configResolved() { + //@ts-expect-error defined below but filter not in type + plugin.transform.filter = api.filter; + options = api.options; + compileSvelte = api.compileSvelte; + }, + transform: { + async handler(code, id) { + const ssr = this.environment.config.consumer === 'server'; + const svelteRequest = api.idParser(id, ssr); + if (!svelteRequest || svelteRequest.raw) { + return; + } + let compileData; + try { + compileData = await compileSvelte( + svelteRequest, + code, + options, + this.getCombinedSourcemap() + ); + } catch (e) { + throw toRollupError(e, options); + } + if (compileData.compiled?.warnings) { + logCompilerWarnings(svelteRequest, compileData.compiled.warnings, options); + } + + return { + ...compileData.compiled.js, + moduleType: 'js', + meta: { + vite: { + lang: compileData.lang + }, + svelte: { + css: compileData.compiled.css + } + } + }; + } + } + }; + return plugin; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/configure.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/configure.js new file mode 100644 index 0000000000000000000000000000000000000000..b5538b06a86c5be03135d73e7f5ad845f8ce9fa1 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/configure.js @@ -0,0 +1,97 @@ +import process from 'node:process'; +import { isDebugNamespaceEnabled, log } from '../utils/log.js'; +import * as vite from 'vite'; +import { VitePluginSvelteStats } from '../utils/vite-plugin-svelte-stats.js'; +import { + buildExtraViteConfig, + validateInlineOptions, + resolveOptions, + preResolveOptions, + ensureConfigEnvironmentMainFields, + ensureConfigEnvironmentConditions +} from '../utils/options.js'; +import { buildIdFilter, buildIdParser } from '../utils/id.js'; +import { createCompileSvelte } from '../utils/compile.js'; + +// @ts-ignore rolldownVersion +const { version: viteVersion, rolldownVersion } = vite; + +/** + * @param {Partial} [inlineOptions] + * @param {import('../types/plugin-api.d.ts').PluginAPI} api + * @returns {import('vite').Plugin} + */ +export function configure(api, inlineOptions) { + if (rolldownVersion) { + log.warn.once( + `!!! Support for rolldown-vite in vite-plugin-svelte is experimental (rolldown: ${rolldownVersion}, vite: ${viteVersion}) !!! + See https://github.com/sveltejs/vite-plugin-svelte/issues/1143 for a list of known issues and to report feedback.`.replace( + /\t+/g, + '\t' + ) + ); + } + + validateInlineOptions(inlineOptions); + + /** + * @type {import("../types/options.d.ts").PreResolvedOptions} + */ + let preOptions; + + /** @type {import('vite').Plugin} */ + return { + name: 'vite-plugin-svelte:config', + api, + // make sure it runs first + enforce: 'pre', + config: { + order: 'pre', + async handler(config, configEnv) { + // setup logger + if (process.env.DEBUG) { + log.setLevel('debug'); + } else if (config.logLevel) { + log.setLevel(config.logLevel); + } + + preOptions = await preResolveOptions(inlineOptions, config, configEnv); + // extra vite config + const extraViteConfig = await buildExtraViteConfig(preOptions, config); + log.debug('additional vite config', extraViteConfig, 'config'); + return extraViteConfig; + } + }, + configResolved: { + order: 'pre', + handler(config) { + const options = resolveOptions(preOptions, config); + api.options = options; + if (isDebugNamespaceEnabled('stats')) { + api.options.stats = new VitePluginSvelteStats(); + } + + api.filter = buildIdFilter(options); + api.idFilter = api.filter; + api.idParser = buildIdParser(options); + api.compileSvelte = createCompileSvelte(); + log.debug('resolved options', api.options, 'config'); + } + }, + + configEnvironment(name, config, opts) { + ensureConfigEnvironmentMainFields(name, config, opts); + // @ts-expect-error the function above should make `resolve.mainFields` non-nullable + config.resolve.mainFields.unshift('svelte'); + + ensureConfigEnvironmentConditions(name, config, opts); + // @ts-expect-error the function above should make `resolve.conditions` non-nullable + config.resolve.conditions.push('svelte'); + }, + + configureServer(server) { + const { options } = api; + options.server = server; + } + }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/hot-update.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/hot-update.js new file mode 100644 index 0000000000000000000000000000000000000000..b264009a361258db88fa09e19f0d9c745cca92a8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/hot-update.js @@ -0,0 +1,181 @@ +import { log } from '../utils/log.js'; +import { setupWatchers } from '../utils/watch.js'; +import { SVELTE_VIRTUAL_STYLE_ID_REGEX } from '../utils/constants.js'; + +/** + * @param {import('../types/plugin-api.d.ts').PluginAPI} api + * @returns {import('vite').Plugin} + */ +export function hotUpdate(api) { + /** + * @type {import("../types/options.js").ResolvedOptions} + */ + let options; + /** + * @type {import('../types/id.d.ts').IdParser} + */ + let idParser; + + /** + * + * @type {Map} + */ + const transformResultCache = new Map(); + + /** @type {import('vite').Plugin} */ + const plugin = { + name: 'vite-plugin-svelte:hot-update', + enforce: 'post', + configResolved() { + options = api.options; + idParser = api.idParser; + + // @ts-expect-error + plugin.transform.filter = { + id: { + // reinclude virtual styles to get their output + include: [...api.filter.id.include, SVELTE_VIRTUAL_STYLE_ID_REGEX], + exclude: [ + // ignore files in node_modules, we don't hot update them + /\/node_modules\//, + // remove style exclusion + ...api.filter.id.exclude.filter((filter) => filter !== SVELTE_VIRTUAL_STYLE_ID_REGEX) + ] + } + }; + }, + + applyToEnvironment(env) { + // we only handle updates for client components + // ssr frameworks have to handle updating/reloading themselves as v-p-s can't know what they prefer + const hmrEnabled = options.compilerOptions.hmr && options.emitCss; + return hmrEnabled && env.config.consumer === 'client'; + }, + + configureServer(server) { + const clientEnvironment = Object.values(server.environments).find( + (e) => e.config.consumer === 'client' + ); + if (clientEnvironment) { + setupWatchers(options); + } else { + log.warn( + 'No client environment found, not adding watchers for svelte config and preprocessor dependencies' + ); + } + }, + + buildStart() { + transformResultCache.clear(); + }, + + transform: { + order: 'post', + handler(code, id) { + transformResultCache.set(id, code); + } + }, + hotUpdate: { + order: 'post', + async handler(ctx) { + const svelteRequest = idParser(ctx.file, false, ctx.timestamp); + if (svelteRequest) { + const { modules } = ctx; + const svelteModules = []; + const nonSvelteModules = []; + for (const mod of modules) { + if (transformResultCache.has(mod.id)) { + svelteModules.push(mod); + } else { + nonSvelteModules.push(mod); + } + } + + if (svelteModules.length === 0) { + return; // nothing to do for us + } + const affectedModules = []; + const prevResults = svelteModules.map((m) => transformResultCache.get(m.id)); + for (let i = 0; i < svelteModules.length; i++) { + const mod = svelteModules[i]; + const prev = prevResults[i]; + await this.environment.transformRequest(mod.url); + const next = transformResultCache.get(mod.id); + if (hasCodeChanged(prev, next, mod.id)) { + affectedModules.push(mod); + } else { + log.debug( + `skipping hot update for ${mod.id} because result is unchanged`, + undefined, + 'hmr' + ); + } + } + log.debug( + `hotUpdate for ${svelteRequest.id} result: [${affectedModules.map((m) => m.id).join(', ')}]`, + undefined, + 'hmr' + ); + return [...affectedModules, ...nonSvelteModules]; + } + } + } + }; + + return plugin; +} + +/** + * @param {string | undefined | null} prev + * @param {string | undefined | null} next + * @param {string | null} id + * @returns {boolean} + */ +function hasCodeChanged(prev, next, id) { + const isStrictEqual = nullSafeEqual(prev, next); + if (isStrictEqual) { + return false; + } + const isLooseEqual = nullSafeEqual(normalize(prev), normalize(next)); + if (!isStrictEqual && isLooseEqual) { + log.debug( + `ignoring compiler output change for ${id} as it is equal to previous output after normalization`, + undefined, + 'hmr' + ); + } + return !isLooseEqual; +} + +/** + * @param {string | null | undefined} prev + * @param {string | null | undefined} next + * @returns {boolean} + */ +function nullSafeEqual(prev, next) { + return (prev == null && next == null) || (prev != null && next != null && prev === next); +} + +/** + * remove code that only changes metadata and does not require a js update for the component to keep working + * + * 1) location numbers argument from $.add_locations calls in svelte output eg [[1,2],[3,4]] + * 2) timestamp queries added to imports by vite eg ?t=0123456789123 + * + * @param {string | null | undefined } code + * @returns {string | null | undefined} + */ +function normalize(code) { + if (code == null) { + return code; + } + + return ( + code + // svelte5 $.add_locations line numbers argument [[1,2],[3,4]] + // uses matching group replace to keep the template argument intact + .replace(/(\$\.add_locations\(.*), (\[\[[\d, [\]]+]])\)/g, '$1, []') + // vite import analysis timestamp queries, ?t=0123456789123& + .replace(/[?&]t=\d{13}\b/g, '') + ); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/load-compiled-css.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/load-compiled-css.js new file mode 100644 index 0000000000000000000000000000000000000000..0a9e9c233066bf47bfcd237d701d67d1c3b1d805 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/load-compiled-css.js @@ -0,0 +1,66 @@ +import { log } from '../utils/log.js'; +import { SVELTE_VIRTUAL_STYLE_ID_REGEX } from '../utils/constants.js'; + +const filter = { id: SVELTE_VIRTUAL_STYLE_ID_REGEX }; + +/** + * @param {import('../types/plugin-api.d.ts').PluginAPI} api + * @returns {import('vite').Plugin} + */ +export function loadCompiledCss(api) { + let useLocalCache = false; + + /** @type{Map} */ + const buildWatchCssCache = new Map(); + return { + name: 'vite-plugin-svelte:load-compiled-css', + + configResolved(c) { + const isDev = c.command === 'serve'; + const isBuildWatch = !!c.build?.watch; + useLocalCache = isDev || isBuildWatch; + }, + + resolveId: { + filter, // same filter in load to ensure minimal work + handler(id) { + log.debug(`resolveId resolved virtual css module ${id}`, undefined, 'resolve'); + return id; + } + }, + load: { + filter, + async handler(id) { + const ssr = this.environment.config.consumer === 'server'; + const svelteRequest = api.idParser(id, ssr); + if (!svelteRequest) { + return; + } + let cachedCss = this.getModuleInfo(svelteRequest.filename)?.meta.svelte?.css; + // in `build --watch` or dev ssr reloads getModuleInfo only returns changed module data. + // To ensure virtual css is loaded unchanged, we cache it here separately + if (useLocalCache) { + if (cachedCss) { + buildWatchCssCache.set(svelteRequest.filename, cachedCss); + } else { + cachedCss = buildWatchCssCache.get(svelteRequest.filename); + } + } + + if (cachedCss) { + const { hasGlobal, ...css } = cachedCss; + if (hasGlobal === false) { + // hasGlobal was added in svelte 5.26.0, so make sure it is boolean false + css.meta ??= {}; + css.meta.vite ??= {}; + css.meta.vite.cssScopeTo = [svelteRequest.filename, 'default']; + } + css.moduleType = 'css'; + return css; + } else { + log.warn(`failed to load virtual css module ${id}`, undefined, 'load'); + } + } + } + }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/load-custom.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/load-custom.js new file mode 100644 index 0000000000000000000000000000000000000000..2c762c0d2af5198a120b08e0433773ac7d888197 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/load-custom.js @@ -0,0 +1,42 @@ +import fs from 'node:fs'; +import { log } from '../utils/log.js'; + +/** + * if svelte config includes files that vite treats as assets (e.g. .svg) + * we have to manually load them to avoid getting urls + * + * @param {import('../types/plugin-api.d.ts').PluginAPI} api + * @returns {import('vite').Plugin} + */ +export function loadCustom(api) { + /** @type {import('vite').Plugin} */ + const plugin = { + name: 'vite-plugin-svelte:load-custom', + enforce: 'pre', // must come before vites own asset handling or custom extensions like .svg won't work + configResolved() { + //@ts-expect-error load defined below but filter not in type + plugin.load.filter = api.filter; + }, + + load: { + //filter: is set in configResolved + async handler(id) { + const config = this.environment.config; + const ssr = config.consumer === 'server'; + const svelteRequest = api.idParser(id, ssr); + if (svelteRequest) { + const { filename, query } = svelteRequest; + if (!query.url && config.assetsInclude(filename)) { + log.debug( + `loading ${filename} to prevent vite asset handling to turn it into a url by default`, + undefined, + 'load' + ); + return fs.readFileSync(filename, 'utf-8'); + } + } + } + } + }; + return plugin; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/preprocess.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/preprocess.js new file mode 100644 index 0000000000000000000000000000000000000000..827885ea663eda4626483b723707f7ea11252f31 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/preprocess.js @@ -0,0 +1,208 @@ +import { toRollupError } from '../utils/error.js'; +import { mapToRelative } from '../utils/sourcemaps.js'; +import * as svelte from 'svelte/compiler'; +import { log } from '../utils/log.js'; +import { arraify } from '../utils/options.js'; +import fs from 'node:fs'; +import path from 'node:path'; + +/** + * @param {import('../types/plugin-api.d.ts').PluginAPI} api + * @returns {import('vite').Plugin} + */ +export function preprocess(api) { + /** + * @type {import("../types/options.js").ResolvedOptions} + */ + let options; + + /** + * @type {DependenciesCache} + */ + let dependenciesCache; + + /** + * @type {import("../types/compile.d.ts").PreprocessSvelte} + */ + let preprocessSvelte; + + /** @type {import('vite').Plugin} */ + const plugin = { + name: 'vite-plugin-svelte:preprocess', + enforce: 'pre', + configResolved(c) { + options = api.options; + if (arraify(options.preprocess).length > 0) { + preprocessSvelte = createPreprocessSvelte(options, c); + // @ts-expect-error defined below but filter not in type + plugin.transform.filter = api.filter; + } else { + log.debug( + `disabling ${plugin.name} because no preprocessor is configured`, + undefined, + 'preprocess' + ); + // @ts-expect-error force set undefined to clear memory + preprocessSvelte = undefined; + // @ts-expect-error defined below but filter not in type + plugin.transform.filter = { id: /$./ }; // never match + } + }, + configureServer(server) { + dependenciesCache = new DependenciesCache(server); + }, + buildStart() { + dependenciesCache?.clear(); + }, + transform: { + async handler(code, id) { + const ssr = this.environment.config.consumer === 'server'; + const svelteRequest = api.idParser(id, ssr); + if (!svelteRequest) { + return; + } + try { + const preprocessed = await preprocessSvelte(svelteRequest, code, options); + dependenciesCache?.update(svelteRequest, preprocessed?.dependencies ?? []); + if (!preprocessed) { + return; + } + if (options.isBuild && this.environment.config.build.watch && preprocessed.dependencies) { + for (const dep of preprocessed.dependencies) { + this.addWatchFile(dep); + } + } + + /** @type {import('vite').Rollup.SourceDescription}*/ + const result = { code: preprocessed.code }; + if (preprocessed.map) { + // @ts-expect-error type differs but should work + result.map = preprocessed.map; + } + return result; + } catch (e) { + throw toRollupError(e, options); + } + } + } + }; + return plugin; +} +/** + * @param {import("../types/options.js").ResolvedOptions} options + * @param {import("vite").ResolvedConfig} resolvedConfig + * @returns {import('../types/compile.d.ts').PreprocessSvelte} + */ +function createPreprocessSvelte(options, resolvedConfig) { + /** @type {Array} */ + const preprocessors = arraify(options.preprocess); + + for (const preprocessor of preprocessors) { + if (preprocessor.style && '__resolvedConfig' in preprocessor.style) { + preprocessor.style.__resolvedConfig = resolvedConfig; + } + } + + /** @type {import('../types/compile.d.ts').PreprocessSvelte} */ + return async function preprocessSvelte(svelteRequest, code) { + const { filename } = svelteRequest; + let preprocessed; + if (preprocessors && preprocessors.length > 0) { + try { + preprocessed = await svelte.preprocess(code, preprocessors, { filename }); // full filename here so postcss works + } catch (e) { + e.message = `Error while preprocessing ${filename}${e.message ? ` - ${e.message}` : ''}`; + throw e; + } + if (typeof preprocessed?.map === 'object') { + mapToRelative(preprocessed?.map, filename); + } + return preprocessed; + } + }; +} + +/** + * @class + * + * caches dependencies of preprocessed files and emit change events on dependants + */ +class DependenciesCache { + /** @type {Map} */ + #dependencies = new Map(); + /** @type {Map>} */ + #dependants = new Map(); + + /** @type {import('vite').ViteDevServer} */ + #server; + /** + * + * @param {import('vite').ViteDevServer} server + */ + constructor(server) { + this.#server = server; + /** @type {(filename: string) => void} */ + const emitChangeEventOnDependants = (filename) => { + const dependants = this.#dependants.get(filename); + dependants?.forEach((dependant) => { + if (fs.existsSync(dependant)) { + log.debug( + `emitting virtual change event for "${dependant}" because dependency "${filename}" changed`, + undefined, + 'hmr' + ); + server.watcher.emit('change', dependant); + } + }); + }; + server.watcher.on('change', emitChangeEventOnDependants); + server.watcher.on('unlink', emitChangeEventOnDependants); + } + + /** + * @param {string} file + */ + #ensureWatchedFile(file) { + const root = this.#server.config.root; + if ( + file && + // only need to watch if out of root + !file.startsWith(root + '/') && + // some rollup plugins use null bytes for private resolved Ids + !file.includes('\0') && + fs.existsSync(file) + ) { + // resolve file to normalized system path + this.#server.watcher.add(path.resolve(file)); + } + } + + clear() { + this.#dependencies.clear(); + this.#dependants.clear(); + } + + /** + * + * @param {import('../types/id.d.ts').SvelteRequest} svelteRequest + * @param {string[]} dependencies + */ + update(svelteRequest, dependencies) { + const id = svelteRequest.normalizedFilename; + const prevDependencies = this.#dependencies.get(id) || []; + + this.#dependencies.set(id, dependencies); + const removed = prevDependencies.filter((d) => !dependencies.includes(d)); + const added = dependencies.filter((d) => !prevDependencies.includes(d)); + added.forEach((d) => { + this.#ensureWatchedFile(d); + if (!this.#dependants.has(d)) { + this.#dependants.set(d, new Set()); + } + /** @type {Set} */ (this.#dependants.get(d)).add(svelteRequest.filename); + }); + removed.forEach((d) => { + /** @type {Set} */ (this.#dependants.get(d)).delete(svelteRequest.filename); + }); + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/setup-optimizer.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/setup-optimizer.js new file mode 100644 index 0000000000000000000000000000000000000000..56468a5ac9942721537d1e934dacbbb95af623ef --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/plugins/setup-optimizer.js @@ -0,0 +1,340 @@ +import fs from 'node:fs/promises'; +import path from 'node:path'; +import { readFileSync } from 'node:fs'; +import * as svelte from 'svelte/compiler'; +import { log } from '../utils/log.js'; +import { toESBuildError, toRollupError } from '../utils/error.js'; +import { safeBase64Hash } from '../utils/hash.js'; +import { normalize } from '../utils/id.js'; +import * as vite from 'vite'; +// @ts-ignore not typed on vite +const { rolldownVersion } = vite; + +/** + * @typedef {NonNullable} EsbuildOptions + * @typedef {NonNullable[number]} EsbuildPlugin + */ +/** + * @typedef {NonNullable} RollupPlugin + */ + +const optimizeSveltePluginName = 'vite-plugin-svelte:optimize'; +const optimizeSvelteModulePluginName = 'vite-plugin-svelte:optimize-module'; + +/** + * @param {import('../types/plugin-api.d.ts').PluginAPI} api + * @returns {import('vite').Plugin} + */ +export function setupOptimizer(api) { + /** @type {import('vite').ResolvedConfig} */ + let viteConfig; + + return { + name: 'vite-plugin-svelte:setup-optimizer', + apply: 'serve', + config() { + /** @type {import('vite').UserConfig['optimizeDeps']} */ + const optimizeDeps = { + // Experimental Vite API to allow these extensions to be scanned and prebundled + extensions: ['.svelte'] + }; + // Add optimizer plugins to prebundle Svelte files. + // Currently, a placeholder as more information is needed after Vite config is resolved, + // the added plugins are patched in configResolved below + if (rolldownVersion) { + //@ts-ignore rolldown types not finished + optimizeDeps.rollupOptions = { + plugins: [ + placeholderRolldownOptimizerPlugin(optimizeSveltePluginName), + placeholderRolldownOptimizerPlugin(optimizeSvelteModulePluginName) + ] + }; + } else { + optimizeDeps.esbuildOptions = { + plugins: [ + { name: optimizeSveltePluginName, setup: () => {} }, + { name: optimizeSvelteModulePluginName, setup: () => {} } + ] + }; + } + return { optimizeDeps }; + }, + configResolved(c) { + viteConfig = c; + const optimizeDeps = c.optimizeDeps; + if (rolldownVersion) { + const plugins = + // @ts-expect-error not typed + optimizeDeps.rollupOptions?.plugins?.filter((p) => + [optimizeSveltePluginName, optimizeSvelteModulePluginName].includes(p.name) + ) ?? []; + for (const plugin of plugins) { + patchRolldownOptimizerPlugin(plugin, api.options); + } + } else { + const plugins = + optimizeDeps.esbuildOptions?.plugins?.filter((p) => + [optimizeSveltePluginName, optimizeSvelteModulePluginName].includes(p.name) + ) ?? []; + for (const plugin of plugins) { + patchESBuildOptimizerPlugin(plugin, api.options); + } + } + }, + async buildStart() { + if (!api.options.prebundleSvelteLibraries) return; + const changed = await svelteMetadataChanged(viteConfig.cacheDir, api.options); + if (changed) { + // Force Vite to optimize again. Although we mutate the config here, it works because + // Vite's optimizer runs after `buildStart()`. + viteConfig.optimizeDeps.force = true; + } + } + }; +} + +/** + * @param {EsbuildPlugin} plugin + * @param {import('../types/options.d.ts').ResolvedOptions} options + */ +function patchESBuildOptimizerPlugin(plugin, options) { + const components = plugin.name === optimizeSveltePluginName; + const compileFn = components ? compileSvelte : compileSvelteModule; + const statsName = components ? 'prebundle library components' : 'prebundle library modules'; + const filter = components ? /\.svelte(?:\?.*)?$/ : /\.svelte\.[jt]s(?:\?.*)?$/; + plugin.setup = (build) => { + if (build.initialOptions.plugins?.some((v) => v.name === 'vite:dep-scan')) return; + + /** @type {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection | undefined} */ + let statsCollection; + build.onStart(() => { + statsCollection = options.stats?.startCollection(statsName, { + logResult: (c) => c.stats.length > 1 + }); + }); + build.onLoad({ filter }, async ({ path: filename }) => { + const code = readFileSync(filename, 'utf8'); + try { + const result = await compileFn(options, { filename, code }, statsCollection); + const contents = result.map + ? result.code + '//# sourceMappingURL=' + result.map.toUrl() + : result.code; + return { contents }; + } catch (e) { + return { errors: [toESBuildError(e, options)] }; + } + }); + build.onEnd(() => { + statsCollection?.finish(); + }); + }; +} + +/** + * @param {RollupPlugin} plugin + * @param {import('../types/options.d.ts').ResolvedOptions} options + */ +function patchRolldownOptimizerPlugin(plugin, options) { + const components = plugin.name === optimizeSveltePluginName; + const compileFn = components ? compileSvelte : compileSvelteModule; + const statsName = components ? 'prebundle library components' : 'prebundle library modules'; + const includeRe = components ? /^[^?#]+\.svelte(?:[?#]|$)/ : /^[^?#]+\.svelte\.[jt]s(?:[?#]|$)/; + /** @type {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection | undefined} */ + let statsCollection; + + plugin.options = (opts) => { + // @ts-expect-error plugins is an array here + const isScanner = opts.plugins.some( + (/** @type {{ name: string; }} */ p) => p.name === 'vite:dep-scan:resolve' + ); + if (isScanner) { + delete plugin.buildStart; + delete plugin.transform; + delete plugin.buildEnd; + } else { + plugin.transform = { + filter: { id: includeRe }, + /** + * @param {string} code + * @param {string} filename + */ + async handler(code, filename) { + try { + return await compileFn(options, { filename, code }, statsCollection); + } catch (e) { + throw toRollupError(e, options); + } + } + }; + plugin.buildStart = () => { + statsCollection = options.stats?.startCollection(statsName, { + logResult: (c) => c.stats.length > 1 + }); + }; + plugin.buildEnd = () => { + statsCollection?.finish(); + }; + } + }; +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @param {{ filename: string, code: string }} input + * @param {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection} [statsCollection] + * @returns {Promise} + */ +async function compileSvelte(options, { filename, code }, statsCollection) { + let css = options.compilerOptions.css; + if (css !== 'injected') { + // TODO ideally we'd be able to externalize prebundled styles too, but for now always put them in the js + css = 'injected'; + } + /** @type {import('svelte/compiler').CompileOptions} */ + const compileOptions = { + dev: true, // default to dev: true because prebundling is only used in dev + ...options.compilerOptions, + css, + filename, + generate: 'client' + }; + + if (compileOptions.hmr && options.emitCss) { + const hash = `s-${safeBase64Hash(normalize(filename, options.root))}`; + compileOptions.cssHash = () => hash; + } + + let preprocessed; + + if (options.preprocess) { + try { + preprocessed = await svelte.preprocess(code, options.preprocess, { filename }); + } catch (e) { + e.message = `Error while preprocessing ${filename}${e.message ? ` - ${e.message}` : ''}`; + throw e; + } + if (preprocessed.map) compileOptions.sourcemap = preprocessed.map; + } + + const finalCode = preprocessed ? preprocessed.code : code; + + const dynamicCompileOptions = await options?.dynamicCompileOptions?.({ + filename, + code: finalCode, + compileOptions + }); + + if (dynamicCompileOptions && log.debug.enabled) { + log.debug( + `dynamic compile options for ${filename}: ${JSON.stringify(dynamicCompileOptions)}`, + undefined, + 'compile' + ); + } + + const finalCompileOptions = dynamicCompileOptions + ? { + ...compileOptions, + ...dynamicCompileOptions + } + : compileOptions; + const endStat = statsCollection?.start(filename); + const compiled = svelte.compile(finalCode, finalCompileOptions); + if (endStat) { + endStat(); + } + return { + ...compiled.js, + moduleType: 'js' + }; +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @param {{ filename: string; code: string }} input + * @param {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection} [statsCollection] + * @returns {Promise} + */ +async function compileSvelteModule(options, { filename, code }, statsCollection) { + const endStat = statsCollection?.start(filename); + const compiled = svelte.compileModule(code, { + dev: options.compilerOptions?.dev ?? true, // default to dev: true because prebundling is only used in dev + filename, + generate: 'client' + }); + if (endStat) { + endStat(); + } + return { + ...compiled.js, + moduleType: 'js' + }; +} + +// List of options that changes the prebundling result +/** @type {(keyof import('../types/options.d.ts').ResolvedOptions)[]} */ +const PREBUNDLE_SENSITIVE_OPTIONS = [ + 'compilerOptions', + 'configFile', + 'experimental', + 'extensions', + 'ignorePluginPreprocessors', + 'preprocess' +]; + +/** + * stores svelte metadata in cache dir and compares if it has changed + * + * @param {string} cacheDir + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {Promise} Whether the Svelte metadata has changed + */ +async function svelteMetadataChanged(cacheDir, options) { + const svelteMetadata = generateSvelteMetadata(options); + const svelteMetadataPath = path.resolve(cacheDir, '_svelte_metadata.json'); + + const currentSvelteMetadata = JSON.stringify(svelteMetadata, (_, value) => { + // Handle preprocessors + return typeof value === 'function' ? value.toString() : value; + }); + + /** @type {string | undefined} */ + let existingSvelteMetadata; + try { + existingSvelteMetadata = await fs.readFile(svelteMetadataPath, 'utf8'); + } catch { + // ignore + } + + await fs.mkdir(cacheDir, { recursive: true }); + await fs.writeFile(svelteMetadataPath, currentSvelteMetadata); + return currentSvelteMetadata !== existingSvelteMetadata; +} + +/** + * + * @param {string} name + * @returns {import('vite').Rollup.Plugin} + */ +function placeholderRolldownOptimizerPlugin(name) { + return { + name, + options() {}, + buildStart() {}, + buildEnd() {}, + transform: { filter: { id: /^$/ }, handler() {} } + }; +} + +/** + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {Partial} + */ +function generateSvelteMetadata(options) { + /** @type {Record} */ + const metadata = {}; + for (const key of PREBUNDLE_SENSITIVE_OPTIONS) { + metadata[key] = options[key]; + } + return metadata; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.js new file mode 100644 index 0000000000000000000000000000000000000000..d1b695cf46f62f9ea6bb671b2053a6c9880838ae --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.js @@ -0,0 +1,166 @@ +import process from 'node:process'; +import * as vite from 'vite'; +import { mapToRelative, removeLangSuffix } from './utils/sourcemaps.js'; +const { + isCSSRequest, + preprocessCSS, + resolveConfig, + transformWithEsbuild, + //@ts-ignore rolldown types don't exist + rolldownVersion, + //@ts-ignore rolldown types don't exist + transformWithOxc +} = vite; +/** + * @typedef {(code: string, filename: string) => Promise<{ code: string; map?: any; deps?: Set }>} CssTransform + */ + +const supportedScriptLangs = ['ts']; + +export const lang_sep = '.vite-preprocess'; + +/** + * @param {import('./public.d.ts').VitePreprocessOptions} [opts] + * @returns {import('svelte/compiler').PreprocessorGroup} + */ +export function vitePreprocess(opts) { + /** @type {import('svelte/compiler').PreprocessorGroup} */ + const preprocessor = { name: 'vite-preprocess' }; + if (opts?.script === true) { + preprocessor.script = rolldownVersion ? viteScriptOxc().script : viteScript().script; + } + if (opts?.style !== false) { + const styleOpts = typeof opts?.style == 'object' ? opts?.style : undefined; + preprocessor.style = viteStyle(styleOpts).style; + } + return preprocessor; +} + +/** + * @returns {{ script: import('svelte/compiler').Preprocessor }} + */ +function viteScript() { + return { + async script({ attributes, content, filename = '' }) { + const lang = /** @type {string} */ (attributes.lang); + if (!supportedScriptLangs.includes(lang)) return; + const { code, map } = await transformWithEsbuild(content, filename, { + loader: /** @type {import('vite').ESBuildOptions['loader']} */ (lang), + target: 'esnext', + tsconfigRaw: { + compilerOptions: { + // svelte typescript needs this flag to work with type imports + importsNotUsedAsValues: 'preserve', + preserveValueImports: true + } + } + }); + + mapToRelative(map, filename); + + return { + code, + map + }; + } + }; +} + +/** + * @returns {{ script: import('svelte/compiler').Preprocessor }} + */ +function viteScriptOxc() { + return { + async script({ attributes, content, filename = '' }) { + if (typeof attributes.lang !== 'string' || !supportedScriptLangs.includes(attributes.lang)) { + return; + } + const lang = /** @type {'ts'} */ (attributes.lang); + const { code, map } = await transformWithOxc(content, filename, { + lang, + target: 'esnext' + // TODO, how to pass tsconfig compilerOptions (or not needed as config is loaded for file + /*tsconfigRaw: { + compilerOptions: { + // svelte typescript needs this flag to work with type imports + importsNotUsedAsValues: 'preserve', + preserveValueImports: true + } + }*/ + }); + + mapToRelative(map, filename); + + return { + code, + map + }; + } + }; +} + +/** + * @param {import('vite').ResolvedConfig | import('vite').InlineConfig} config + * @returns {{ style: import('svelte/compiler').Preprocessor }} + */ +function viteStyle(config = {}) { + /** @type {Promise | CssTransform} */ + let cssTransform; + /** @type {import('svelte/compiler').Preprocessor} */ + const style = async ({ attributes, content, filename = '' }) => { + const ext = attributes.lang ? `.${attributes.lang}` : '.css'; + if (attributes.lang && !isCSSRequest(ext)) return; + if (!cssTransform) { + cssTransform = createCssTransform(style, config).then((t) => (cssTransform = t)); + } + const transform = await cssTransform; + const suffix = `${lang_sep}${ext}`; + const moduleId = `${filename}${suffix}`; + const { code, map, deps } = await transform(content, moduleId); + removeLangSuffix(map, suffix); + mapToRelative(map, filename); + const dependencies = deps ? Array.from(deps).filter((d) => !d.endsWith(suffix)) : undefined; + return { + code, + map: map ?? undefined, + dependencies + }; + }; + // @ts-expect-error tag so can be found by v-p-s + style.__resolvedConfig = null; + return { style }; +} + +/** + * @param {import('svelte/compiler').Preprocessor} style + * @param {import('vite').ResolvedConfig | import('vite').InlineConfig} config + * @returns {Promise} + */ +async function createCssTransform(style, config) { + /** @type {import('vite').ResolvedConfig} */ + let resolvedConfig; + // @ts-expect-error special prop added if running in v-p-s + if (style.__resolvedConfig) { + // @ts-expect-error not typed + resolvedConfig = style.__resolvedConfig; + } else if (isResolvedConfig(config)) { + resolvedConfig = config; + } else { + // default to "build" if no NODE_ENV is set to avoid running in dev mode for svelte-check etc. + const useBuild = !process.env.NODE_ENV || process.env.NODE_ENV === 'production'; + const command = useBuild ? 'build' : 'serve'; + const defaultMode = useBuild ? 'production' : 'development'; + resolvedConfig = await resolveConfig(config, command, defaultMode, defaultMode, false); + } + return async (code, filename) => { + return preprocessCSS(code, filename, resolvedConfig); + }; +} + +/** + * @param {any} config + * @returns {config is import('vite').ResolvedConfig} + */ +function isResolvedConfig(config) { + return !!config.inlineConfig; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/public.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/public.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a21280b72f912f7a9bdbfbe75b9dfceec125493a --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/public.d.ts @@ -0,0 +1,217 @@ +import type { InlineConfig, ResolvedConfig } from 'vite'; +import type { CompileOptions, Warning, PreprocessorGroup } from 'svelte/compiler'; +import type { Options as InspectorOptions } from '@sveltejs/vite-plugin-svelte-inspector'; + +export type Options = Omit & PluginOptionsInline; + +interface PluginOptionsInline extends PluginOptions { + /** + * Path to a svelte config file, either absolute or relative to Vite root + * + * set to `false` to ignore the svelte config file + * + * @see https://vitejs.dev/config/#root + */ + configFile?: string | false; +} + +export interface PluginOptions { + /** + * A `picomatch` pattern, or array of patterns, which specifies the files the plugin should + * operate on. By default, all svelte files are included. + * + * @see https://github.com/micromatch/picomatch + */ + include?: Arrayable; + /** + * A `picomatch` pattern, or array of patterns, which specifies the files to be ignored by the + * plugin. By default, no files are ignored. + * + * @see https://github.com/micromatch/picomatch + */ + exclude?: Arrayable; + /** + * Emit Svelte styles as virtual CSS files for Vite and other plugins to process + * + * @default true + */ + emitCss?: boolean; + /** + * Enable or disable Hot Module Replacement. + * Deprecated, use compilerOptions.hmr instead! + * + * @deprecated + * @default true for development, always false for production + */ + hot?: boolean; + + /** + * Some Vite plugins can contribute additional preprocessors by defining `api.sveltePreprocess`. + * If you don't want to use them, set this to true to ignore them all or use an array of strings + * with plugin names to specify which. + * + * @default false + */ + ignorePluginPreprocessors?: boolean | string[]; + /** + * vite-plugin-svelte automatically handles excluding svelte libraries and reinclusion of their dependencies + * in vite.optimizeDeps. + * + * `disableDependencyReinclusion: true` disables all reinclusions + * `disableDependencyReinclusion: ['foo','bar']` disables reinclusions for dependencies of foo and bar + * + * This should be used for hybrid packages that contain both node and browser dependencies, eg Routify + * + * @default false + */ + disableDependencyReinclusion?: boolean | string[]; + /** + * Enable support for Vite's dependency optimization to prebundle Svelte libraries. + * + * To disable prebundling for a specific library, add it to `optimizeDeps.exclude`. + * + * @default true for dev, false for build + */ + prebundleSvelteLibraries?: boolean; + /** + * toggle/configure Svelte Inspector + * + * @default unset for dev, always false for build + */ + inspector?: InspectorOptions | boolean; + + /** + * A function to update `compilerOptions` before compilation + * + * `data.filename` - The file to be compiled + * `data.code` - The preprocessed Svelte code + * `data.compileOptions` - The current compiler options + * + * To change part of the compiler options, return an object with the changes you need. + * + * @example + * ``` + * ({ filename, compileOptions }) => { + * // Dynamically set runes mode per Svelte file + * if (forceRunesMode(filename) && !compileOptions.runes) { + * return { runes: true }; + * } + * } + * ``` + */ + dynamicCompileOptions?: (data: { + filename: string; + code: string; + compileOptions: Partial; + }) => Promise | void> | Partial | void; + + /** + * These options are considered experimental and breaking changes to them can occur in any release + */ + experimental?: ExperimentalOptions; +} + +export interface SvelteConfig { + /** + * A list of file extensions to be compiled by Svelte + * + * @default ['.svelte'] + */ + extensions?: string[]; + /** + * An array of preprocessors to transform the Svelte source code before compilation + * + * @see https://svelte.dev/docs/svelte/svelte-compiler#PreprocessorGroup + */ + preprocess?: Arrayable; + /** + * The options to be passed to the Svelte compiler. A few options are set by default, + * including `dev` and `css`. However, some options are non-configurable, like + * `filename`, `format`, `generate`, and `cssHash` (in dev). + * + * @see https://svelte.dev/docs/svelte/svelte-compiler#CompileOptions + */ + compilerOptions?: Omit; + + /** + * Handles warning emitted from the Svelte compiler + * + * warnings emitted for files in node_modules are logged at the debug level, to see them run + * `DEBUG=vite-plugin-svelte:node-modules-onwarn pnpm build` + * + * @example + * ``` + * (warning, defaultHandler) => { + * // ignore some warnings + * if (!['foo','bar'].includes(warning.code)) { + * defaultHandler(warning); + * } + * } + * ``` + * + */ + onwarn?: (warning: Warning, defaultHandler: (warning: Warning) => void) => void; + /** + * Options for vite-plugin-svelte + */ + vitePlugin?: PluginOptions; +} + +/** + * These options are considered experimental and breaking changes to them can occur in any release + */ +interface ExperimentalOptions { + /** + * send a websocket message with svelte compiler warnings during dev + * + */ + sendWarningsToBrowser?: boolean; + /** + * disable svelte field resolve warnings + * + * @default false + */ + disableSvelteResolveWarnings?: boolean; + + /** + * disable api.sveltePreprocess deprecation warnings + * + * @default false + */ + disableApiSveltePreprocessWarnings?: boolean; + + compileModule?: CompileModuleOptions; +} + +interface CompileModuleOptions { + /** + * infix that must be present in filename + * @default ['.svelte.'] + */ + infixes?: string[]; + /** + * module extensions + * @default ['.ts','.js'] + */ + extensions?: string[]; + include?: Arrayable; + exclude?: Arrayable; +} + +type Arrayable = T | T[]; + +export interface VitePreprocessOptions { + /** + * preprocess script block with vite pipeline. + * Since svelte5 this is not needed for typescript anymore + * + * @default false + */ + script?: boolean; + /** + * preprocess style blocks with vite pipeline + */ + style?: boolean | InlineConfig | ResolvedConfig; +} +// eslint-disable-next-line n/no-missing-import +export * from './index.js'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/compile.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/compile.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..422a979b69e16911502dcb79990c46ef7b6744a2 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/compile.d.ts @@ -0,0 +1,37 @@ +import type { Processed, CompileResult } from 'svelte/compiler'; +import type { SvelteRequest } from './id.d.ts'; +import type { ResolvedOptions } from './options.d.ts'; +import type { CustomPluginOptionsVite, Rollup } from 'vite'; + +export type CompileSvelte = ( + svelteRequest: SvelteRequest, + code: string, + options: Partial, + sourcemap?: Rollup.SourceMap +) => Promise; + +export type PreprocessSvelte = ( + svelteRequest: SvelteRequest, + code: string, + options: Partial +) => Promise; + +export interface Code { + code: string; + map?: any; + dependencies?: any[]; + hasGlobal?: boolean; + moduleType?: string; //rolldown-vite + meta?: { + vite?: CustomPluginOptionsVite; + }; +} + +export interface CompileData { + filename: string; + normalizedFilename: string; + cssId: string; + lang: string; + compiled: CompileResult; + ssr: boolean | undefined; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/id.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/id.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f8434c7e9ed3ca9cddbe1fcb54f4fe766517935d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/id.d.ts @@ -0,0 +1,46 @@ +export type SvelteQueryTypes = 'style'; + +export interface RequestQuery { + // our own + svelte?: boolean; + type?: SvelteQueryTypes; + // vite specific + url?: boolean; + raw?: boolean; + direct?: boolean; + inline?: boolean; +} + +export interface SvelteRequest { + id: string; + cssId: string; + filename: string; + normalizedFilename: string; + query: RequestQuery; + timestamp: number; + ssr: boolean; + raw: boolean; +} + +export interface SvelteModuleRequest { + id: string; + filename: string; + normalizedFilename: string; + query: RequestQuery; + timestamp: number; + ssr: boolean; +} + +export type IdParser = (id: string, ssr: boolean, timestamp?: number) => SvelteRequest | undefined; + +export type IdFilter = { + id: { + include: Array; + exclude: Array; + }; +}; +export type ModuleIdParser = ( + id: string, + ssr: boolean, + timestamp?: number +) => SvelteModuleRequest | undefined; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/log.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/log.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..fd4f13e69bd3a28126229e922a39e11a57837b56 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/log.d.ts @@ -0,0 +1,24 @@ +import type { Warning } from 'svelte/compiler'; + +export interface LogFn extends SimpleLogFn { + (message: string, payload?: unknown, namespace?: string): void; + + enabled: boolean; + once: SimpleLogFn; +} + +export interface SimpleLogFn { + (message: string, payload?: unknown, namespace?: string): void; +} + +export type SvelteWarningsMessage = { + id: string; + filename: string; + normalizedFilename: string; + timestamp: number; + warnings: Warning[]; // allWarnings filtered by warnings where onwarn did not call the default handler + allWarnings: Warning[]; // includes warnings filtered by onwarn and our extra vite plugin svelte warnings + rawWarnings: Warning[]; // raw compiler output +}; + +export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'silent'; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/options.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/options.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5b4ca4274b866b69f5f48773fdb4bc737f10c4cc --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/options.d.ts @@ -0,0 +1,21 @@ +import type { CompileOptions } from 'svelte/compiler'; +import type { ViteDevServer } from 'vite'; +// eslint-disable-next-line n/no-missing-import +import { VitePluginSvelteStats } from '../utils/vite-plugin-svelte-stats.js'; +import type { Options } from '../public.d.ts'; + +export interface PreResolvedOptions extends Options { + // these options are non-nullable after resolve + compilerOptions: CompileOptions; + // extra options + root: string; + isBuild: boolean; + isServe: boolean; + isDebug: boolean; +} + +export interface ResolvedOptions extends PreResolvedOptions { + isProduction: boolean; + server?: ViteDevServer; + stats?: VitePluginSvelteStats; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/plugin-api.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/plugin-api.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..61869436e52045584e01c62eec68c0124474eb08 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/plugin-api.d.ts @@ -0,0 +1,15 @@ +import type { ResolvedOptions } from './options.d.ts'; +import type { IdFilter, IdParser } from './id.d.ts'; +import type { CompileSvelte } from './compile.d.ts'; + +export interface PluginAPI { + options: ResolvedOptions; + filter: IdFilter; + idParser: IdParser; + compileSvelte: CompileSvelte; + /** + * @deprecated use 'filter' instead + * // TODO remove in next major + */ + idFilter: IdFilter; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/vite-plugin-svelte-stats.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/vite-plugin-svelte-stats.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1b69ebd457947014af8ecd50ca16c0372abcf9fc --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/types/vite-plugin-svelte-stats.d.ts @@ -0,0 +1,30 @@ +export interface Stat { + file: string; + pkg?: string; + start: number; + end: number; +} + +export interface StatCollection { + name: string; + options: CollectionOptions; + + start: (file: string) => () => void; + stats: Stat[]; + packageStats?: PackageStats[]; + collectionStart: number; + duration?: number; + finish: () => Promise | void; + finished: boolean; +} + +export interface PackageStats { + pkg: string; + files: number; + duration: number; +} + +export interface CollectionOptions { + logInProgress: (collection: StatCollection, now: number) => boolean; + logResult: (collection: StatCollection) => boolean; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/compile.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/compile.js new file mode 100644 index 0000000000000000000000000000000000000000..29c11d052387ee8ba00df5438f2de64eea0aa6ce --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/compile.js @@ -0,0 +1,152 @@ +import * as svelte from 'svelte/compiler'; +import { safeBase64Hash } from './hash.js'; +import { log } from './log.js'; + +import { mapToRelative } from './sourcemaps.js'; +import { enhanceCompileError } from './error.js'; + +// TODO this is a patched version of https://github.com/sveltejs/vite-plugin-svelte/pull/796/files#diff-3bce0b33034aad4b35ca094893671f7e7ddf4d27254ae7b9b0f912027a001b15R10 +// which is closer to the other regexes in at least not falling into commented script +// but ideally would be shared exactly with svelte and other tools that use it +const scriptLangRE = + /|]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/g; + +/** + * @returns {import('../types/compile.d.ts').CompileSvelte} + */ +export function createCompileSvelte() { + /** @type {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection | undefined} */ + let stats; + /** @type {import('../types/compile.d.ts').CompileSvelte} */ + return async function compileSvelte(svelteRequest, code, options, sourcemap) { + const { filename, normalizedFilename, cssId, ssr, raw } = svelteRequest; + const { emitCss = true } = options; + /** @type {import('svelte/compiler').Warning[]} */ + const warnings = []; + + if (options.stats) { + if (options.isBuild) { + if (!stats) { + // build is either completely ssr or csr, create stats collector on first compile + // it is then finished in the buildEnd hook. + stats = options.stats.startCollection(`${ssr ? 'ssr' : 'dom'} compile`, { + logInProgress: () => false + }); + } + } else { + // dev time ssr, it's a ssr request and there are no stats, assume new page load and start collecting + if (ssr && !stats) { + stats = options.stats.startCollection('ssr compile'); + } + // stats are being collected but this isn't an ssr request, assume page loaded and stop collecting + if (!ssr && stats) { + stats.finish(); + stats = undefined; + } + // TODO find a way to trace dom compile during dev + // problem: we need to call finish at some point but have no way to tell if page load finished + // also they for hmr updates too + } + } + + /** @type {import('svelte/compiler').CompileOptions} */ + const compileOptions = { + ...options.compilerOptions, + filename, + generate: ssr ? 'server' : 'client' + }; + + let finalCode = code; + if (compileOptions.hmr && options.emitCss) { + const hash = `s-${safeBase64Hash(normalizedFilename)}`; + compileOptions.cssHash = () => hash; + const closeStylePos = code.lastIndexOf(''); + if (closeStylePos > -1) { + // inject rule that forces compile to attach scope class to every node in the template + // this reduces the amount of js hot updates when editing css in .svelte files + finalCode = finalCode.slice(0, closeStylePos) + ' *{}' + finalCode.slice(closeStylePos); + } + } + + const dynamicCompileOptions = await options?.dynamicCompileOptions?.({ + filename, + code: finalCode, + compileOptions + }); + if (dynamicCompileOptions && log.debug.enabled) { + log.debug( + `dynamic compile options for ${filename}: ${JSON.stringify(dynamicCompileOptions)}`, + undefined, + 'compile' + ); + } + const finalCompileOptions = dynamicCompileOptions + ? { + ...compileOptions, + ...dynamicCompileOptions + } + : compileOptions; + if (sourcemap) { + finalCompileOptions.sourcemap = sourcemap; + } + const endStat = stats?.start(filename); + /** @type {import('svelte/compiler').CompileResult} */ + let compiled; + try { + compiled = svelte.compile(finalCode, { ...finalCompileOptions, filename }); + + // patch output with partial accept until svelte does it + // TODO remove later + if ( + options.server?.config.experimental.hmrPartialAccept && + compiled.js.code.includes('import.meta.hot.accept(') + ) { + compiled.js.code = compiled.js.code.replaceAll( + 'import.meta.hot.accept(', + 'import.meta.hot.acceptExports(["default"],' + ); + } + } catch (e) { + enhanceCompileError(e, code, options.preprocess); + throw e; + } + + if (endStat) { + endStat(); + } + mapToRelative(compiled.js?.map, filename); + mapToRelative(compiled.css?.map, filename); + if (warnings.length) { + if (!compiled.warnings) { + compiled.warnings = []; + } + compiled.warnings.push(...warnings); + } + if (!raw) { + // wire css import and code for hmr + const hasCss = compiled.css?.code?.trim()?.length ?? 0 > 0; + // compiler might not emit css with mode none or it may be empty + if (emitCss && hasCss) { + // TODO properly update sourcemap? + compiled.js.code += `\nimport ${JSON.stringify(cssId)};\n`; + } + } + + let lang = 'js'; + for (const match of code.matchAll(scriptLangRE)) { + if (match[2]) { + lang = match[2]; + break; + } + } + + return { + filename, + normalizedFilename, + cssId, + lang, + compiled, + ssr + }; + }; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/constants.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/constants.js new file mode 100644 index 0000000000000000000000000000000000000000..eb53a7106f4668cd5228edbfc205ad14bd51c6c1 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/constants.js @@ -0,0 +1,36 @@ +import { createRequire } from 'node:module'; + +const sveltePkg = createRequire(import.meta.url)('svelte/package.json'); + +// list of svelte runtime dependencies to optimize together with svelte itself +export const SVELTE_RUNTIME_DEPENDENCIES = [ + 'clsx' // avoids dev server restart after page load with npm + vite6 (see #1067) +].filter((dep) => !!sveltePkg.dependencies?.[dep]); + +export const SVELTE_IMPORTS = Object.entries(sveltePkg.exports) + .map(([name, config]) => { + // ignore type only + if (typeof config === 'object' && Object.keys(config).length === 1 && config.types) { + return ''; + } + // ignore names + if (name === './package.json' || name === './compiler') { + return ''; + } + return name.replace(/^\./, 'svelte'); + }) + .filter((s) => s.length > 0); + +export const SVELTE_EXPORT_CONDITIONS = ['svelte']; + +export const FAQ_LINK_MISSING_EXPORTS_CONDITION = + 'https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition'; + +export const LINK_TRANSFORM_WITH_PLUGIN = + 'https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/advanced-usage.md#transform-svelte-files-with-vite-plugins'; + +export const DEFAULT_SVELTE_EXT = ['.svelte']; +export const DEFAULT_SVELTE_MODULE_INFIX = ['.svelte.']; +export const DEFAULT_SVELTE_MODULE_EXT = ['.js', '.ts']; + +export const SVELTE_VIRTUAL_STYLE_ID_REGEX = /[?&]svelte&type=style&lang.css$/; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/dependencies.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/dependencies.js new file mode 100644 index 0000000000000000000000000000000000000000..341bf3cd044e7926dbf04c8743d4a9fc7a100fa8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/dependencies.js @@ -0,0 +1,60 @@ +const COMMON_DEPENDENCIES_WITHOUT_SVELTE_FIELD = [ + '@lukeed/uuid', + '@playwright/test', + '@sveltejs/kit', + '@sveltejs/package', + '@sveltejs/vite-plugin-svelte', + 'autoprefixer', + 'cookie', + 'dotenv', + 'esbuild', + 'eslint', + 'jest', + 'mdsvex', + 'playwright', + 'postcss', + 'prettier', + 'svelte', + 'svelte2tsx', + 'svelte-check', + 'svelte-preprocess', + 'tslib', + 'typescript', + 'vite', + 'vitest', + '__vite-browser-external' // see https://github.com/sveltejs/vite-plugin-svelte/issues/362 +]; +const COMMON_PREFIXES_WITHOUT_SVELTE_FIELD = [ + '@fontsource/', + '@postcss-plugins/', + '@rollup/', + '@sveltejs/adapter-', + '@types/', + '@typescript-eslint/', + 'eslint-', + 'jest-', + 'postcss-plugin-', + 'prettier-plugin-', + 'rollup-plugin-', + 'vite-plugin-' +]; + +/** + * Test for common dependency names that tell us it is not a package including a svelte field, eg. eslint + plugins. + * + * This speeds up the find process as we don't have to try and require the package.json for all of them + * + * @param {string} dependency + * @returns {boolean} true if it is a dependency without a svelte field + */ +export function isCommonDepWithoutSvelteField(dependency) { + return ( + COMMON_DEPENDENCIES_WITHOUT_SVELTE_FIELD.includes(dependency) || + COMMON_PREFIXES_WITHOUT_SVELTE_FIELD.some( + (prefix) => + prefix.startsWith('@') + ? dependency.startsWith(prefix) + : dependency.substring(dependency.lastIndexOf('/') + 1).startsWith(prefix) // check prefix omitting @scope/ + ) + ); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/error.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/error.js new file mode 100644 index 0000000000000000000000000000000000000000..6f943ae061f2b7863e7352b8ad6a4d542d5a8996 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@sveltejs/vite-plugin-svelte/src/utils/error.js @@ -0,0 +1,167 @@ +import { buildExtendedLogMessage } from './log.js'; + +/** + * convert an error thrown by svelte.compile to a RollupError so that vite displays it in a user friendly way + * @param {import('svelte/compiler').Warning & Error & {frame?: string}} error a svelte compiler error, which is a mix of Warning and an error + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {import('vite').Rollup.RollupError} the converted error + */ +export function toRollupError(error, options) { + const { filename, frame, start, code, name, stack } = error; + /** @type {import('vite').Rollup.RollupError} */ + const rollupError = { + name, // needed otherwise sveltekit coalesce_to_error turns it into a string + id: filename, + message: buildExtendedLogMessage(error), // include filename:line:column so that it's clickable + frame: formatFrameForVite(frame), + code, + stack: options.isBuild || options.isDebug || !frame ? stack : '' + }; + if (start) { + rollupError.loc = { + line: start.line, + column: start.column, + file: filename + }; + } + return rollupError; +} + +/** + * convert an error thrown by svelte.compile to an esbuild PartialMessage + * @param {import('svelte/compiler').Warning & Error & {frame?: string}} error a svelte compiler error, which is a mix of Warning and an error + * @param {import('../types/options.d.ts').ResolvedOptions} options + * @returns {any} the converted error as esbuild PartialMessage + * + * note: typed any to avoid esbuild devDependency for a single internal type import + */ +export function toESBuildError(error, options) { + const { filename, frame, start, stack } = error; + /** @type any */ + const partialMessage = { + text: buildExtendedLogMessage(error) + }; + if (start) { + partialMessage.location = { + line: start.line, + column: start.column, + file: filename, + lineText: lineFromFrame(start.line, frame) // needed to get a meaningful error message on cli + }; + } + if (options.isBuild || options.isDebug || !frame) { + partialMessage.detail = stack; + } + return partialMessage; +} + +/** + * extract line with number from codeframe + * + * @param {number} lineNo + * @param {string} [frame] + * @returns {string} + */ +function lineFromFrame(lineNo, frame) { + if (!frame) { + return ''; + } + const lines = frame.split('\n'); + const errorLine = lines.find((line) => line.trimStart().startsWith(`${lineNo}: `)); + return errorLine ? errorLine.substring(errorLine.indexOf(': ') + 3) : ''; +} + +/** + * vite error overlay expects a specific format to show frames + * this reformats svelte frame (colon separated, less whitespace) + * to one that vite displays on overlay ( pipe separated, more whitespace) + * e.g. + * ``` + * 1: foo + * 2: bar; + * ^ + * 3: baz + * ``` + * to + * ``` + * 1 | foo + * 2 | bar; + * ^ + * 3 | baz + * ``` + * @see https://github.com/vitejs/vite/blob/96591bf9989529de839ba89958755eafe4c445ae/packages/vite/src/client/overlay.ts#L116 + * @param {string} [frame] + * @returns {string} + */ +function formatFrameForVite(frame) { + if (!frame) { + return ''; + } + return frame + .split('\n') + .map((line) => (line.match(/^\s+\^/) ? ' ' + line : ' ' + line.replace(':', ' | '))) + .join('\n'); +} + +/** + * + * @param {string} code the svelte error code + * @see https://github.com/sveltejs/svelte/blob/main/packages/svelte/src/compiler/errors.js + * @returns {boolean} + */ +function couldBeFixedByCssPreprocessor(code) { + return code === 'expected_token' || code === 'unexpected_eof' || code?.startsWith('css_'); +} + +/** + * @param {import('svelte/compiler').Warning & Error} err a svelte compiler error, which is a mix of Warning and an error + * @param {string} originalCode + * @param {import('../public.d.ts').Options['preprocess']} [preprocessors] + */ +export function enhanceCompileError(err, originalCode, preprocessors) { + preprocessors = arraify(preprocessors ?? []); + + /** @type {string[]} */ + const additionalMessages = []; + + // Handle incorrect CSS preprocessor usage + if (couldBeFixedByCssPreprocessor(err.code)) { + // Reference from Svelte: https://github.com/sveltejs/svelte/blob/9926347ad9dbdd0f3324d5538e25dcb7f5e442f8/packages/svelte/src/compiler/preprocess/index.js#L257 + const styleRe = + /|'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)|\s+[^=>'"/]+)*\s*)(?:\/>|>([\S\s]*?)<\/style>)/g; + + let m; + while ((m = styleRe.exec(originalCode))) { + if (m[0]?.startsWith('")} ${filename}:${func_range.start.line + 1}:${func_range.start.column + 1}`, + "", + ...text, + "", + `${chalk.bold("note:")} The exported name should be the same as the filename.`, + "", + ] + .join("\n"), + ); +} + +/** + * @param {string} filename + * @param {SgNode} match + */ +function report_import_mismatch(filename, match) { + const binding_range = match.getMatch("BINDING").range(); + const source_range = match.getMatch("SOURCE").range(); + + errors.push( + [ + `${chalk.bold.red("error")}: mismatch imported binding name.`, + "", + `${chalk.blue("-->")} ${filename}:${match.range().start.line + 1}`, + "", + match.text(), + [ + " ".repeat(binding_range.start.column), + chalk.red("^".repeat(binding_range.end.column - binding_range.start.column)), + " ".repeat(source_range.start.column - binding_range.end.column), + chalk.blue("-".repeat(source_range.end.column - source_range.start.column)), + ] + .join(""), + `${chalk.bold("note:")} The imported binding name should be the same as the import source basename.`, + "", + ] + .join("\n"), + ); +} + +/** + * @param {string} filename + */ +function report_noexport(filename) { + errors.push( + [`${chalk.bold.red("error")}: exported name not found`, `${chalk.blue("-->")} ${filename}`].join("\n"), + ); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/scripts/build.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/scripts/build.js new file mode 100644 index 0000000000000000000000000000000000000000..32005a8331e8477509bc150e1b7ef136b8bd1e01 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/scripts/build.js @@ -0,0 +1,133 @@ +#!/usr/bin/env zx + +import { $, fs, glob } from "zx"; +import { ast_grep } from "./ast_grep.js"; +import { errors } from "./errors.js"; +import { root } from "./utils.js"; + +// clear generated content +await Promise.all([ + fs.remove(root("cjs")), + fs.remove(root("_")), + fs.remove(root("src")), +]); + +let modules = await glob("*.js", { cwd: root("esm") }); + +const task_queue = []; + +const NO_MODIFY = [ + "/* This file is automatically generated and should not be manually edited. */", + "/* To modify this file, please run the `npm run build` command instead. */", +]; + +// generate index.js +const indexESM = [...NO_MODIFY, ""]; + +const indexCJS = [`"use strict";`, "", ...NO_MODIFY, ""]; + +const cjs_export_list = []; +const cjs_module_lexer = []; + +const main_package_json = fs.readJSONSync(root("package.json")); + +main_package_json.exports = { + "./package.json": "./package.json", + "./esm/*": "./esm/*", + "./cjs/*": "./cjs/*", + "./src/*": "./src/*", + ".": { + "module-sync": "./esm/index.js", + webpack: "./esm/index.js", + import: "./esm/index.js", + default: "./cjs/index.cjs", + }, + "./_": { + "module-sync": "./esm/index.js", + webpack: "./esm/index.js", + import: "./esm/index.js", + default: "./cjs/index.cjs", + }, +}; + +modules.forEach((p) => { + const importBinding = p.slice(0, -3); + + main_package_json.exports[`./_/${importBinding}`] = { + "module-sync": `./esm/${importBinding}.js`, + webpack: `./esm/${importBinding}.js`, + import: `./esm/${importBinding}.js`, + default: `./cjs/${importBinding}.cjs`, + }; + + const alias_package = { + main: `../../cjs/${importBinding}.cjs`, + module: `../../esm/${importBinding}.js`, + }; + task_queue.push( + fs.outputJSON(root("_", importBinding, "package.json"), alias_package, { + encoding: "utf-8", + spaces: 4, + }), + ); + + if (importBinding === "index") { + return; + } + + task_queue.push( + fs.outputFile(root("src", `${importBinding}.mjs`), re_export_esm(importBinding), { + encoding: "utf-8", + }), + ); + + indexESM.push(`export { _ as ${importBinding} } from "./${importBinding}.js";`); + + cjs_module_lexer.push(`${importBinding}: null,`); + cjs_export_list.push(`get ${importBinding}() { + return require("./${importBinding}.cjs")._; + },`); +}); + +indexCJS.push( + `0 && (module.exports = {`, + "/* @Annotate_start: the CommonJS named exports for ESM import in node */", + ...cjs_module_lexer, + "/* @Annotate_end */", + `});`, + `module.exports = {`, + ...cjs_export_list, + `};`, +); + +task_queue.push( + fs.outputJSON(root("package.json"), main_package_json, { spaces: 4 }), + fs.outputFile(root("esm", "index.js"), indexESM.join("\n") + "\n", { + encoding: "utf-8", + }), + fs.outputFile(root("cjs", "index.cjs"), indexCJS.join("\n") + "\n", { + encoding: "utf-8", + }), + fs.outputFile(root("src", "index.mjs"), `export * from "../esm/index.js"`, { + encoding: "utf-8", + }), +); + +task_queue.push(...ast_grep()); + +await Promise.all(task_queue); + +if (errors.length > 0) { + errors.forEach((e) => { + console.error(e); + }); + process.exitCode = 1; +} else { + $.cwd = root("."); + await $`dprint fmt`; + await $`dprint fmt "scripts/*.js" -c scripts/.dprint.json`; +} + +function re_export_esm(importBinding) { + return `export { _ as default } from "../esm/${importBinding}.js"`; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/scripts/errors.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/scripts/errors.js new file mode 100644 index 0000000000000000000000000000000000000000..b5b3c15937ed8898692244cccea7240dcaae1ebb --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/scripts/errors.js @@ -0,0 +1 @@ +export const errors = []; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/scripts/utils.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/scripts/utils.js new file mode 100644 index 0000000000000000000000000000000000000000..479b100ce30bd88647aed1475be95fef2129e45f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/scripts/utils.js @@ -0,0 +1,3 @@ +export function root(...p) { + return path.resolve(__dirname, "..", ...p); +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_apply_decorated_descriptor.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_apply_decorated_descriptor.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e4839a154f839c83f9ad9e3caa3eb98acad12bc7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_apply_decorated_descriptor.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_apply_decorated_descriptor.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_apply_decs_2203_r.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_apply_decs_2203_r.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c10cb5619351b9460f740db5a4811f09b15cbdf2 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_apply_decs_2203_r.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_apply_decs_2203_r.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_apply_decs_2311.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_apply_decs_2311.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b9aec565d3410891aa9af033c85a2907f4497c5f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_apply_decs_2311.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_apply_decs_2311.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_array_like_to_array.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_array_like_to_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7691b3201856cb14d8064c34ff6d4a356d79d972 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_array_like_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_array_like_to_array.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_array_with_holes.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_array_with_holes.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1a622996dd2107d07ccf6a97a3b46b21242c977d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_array_with_holes.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_array_with_holes.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_array_without_holes.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_array_without_holes.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ee2f265ee78d338cc2e4a42c5f766c3c6394323f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_array_without_holes.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_array_without_holes.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_assert_this_initialized.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_assert_this_initialized.mjs new file mode 100644 index 0000000000000000000000000000000000000000..36772535e42670f86bbb351b24ef5b402ef237de --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_assert_this_initialized.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_assert_this_initialized.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_generator.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_generator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b3ced536baf839a663df32be644a3206c18c3bb8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_generator.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_generator_delegate.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_generator_delegate.mjs new file mode 100644 index 0000000000000000000000000000000000000000..29dd8b2230e90da9b8560d9ba238b3b1d9a3a221 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_generator_delegate.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_generator_delegate.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_iterator.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_iterator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d1300321c17bb8934c7e6cc42a559721ecb1c01b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_iterator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_iterator.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_to_generator.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_to_generator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..18adef559169baa84723edc8f954b70489badd1d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_async_to_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_async_to_generator.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_await_async_generator.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_await_async_generator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..da13a9fbdaca80544dae905cc12b77935706768f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_await_async_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_await_async_generator.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_await_value.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_await_value.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3c2416176d572acbb144c717c5a4b0ed05c43b13 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_await_value.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_await_value.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_call_super.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_call_super.mjs new file mode 100644 index 0000000000000000000000000000000000000000..da6071660c392fe04dda61a1aead8f8763db20c3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_call_super.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_call_super.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_check_private_redeclaration.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_check_private_redeclaration.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7d78cfe173fc3eccb36c19126752a142c3ab046a --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_check_private_redeclaration.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_check_private_redeclaration.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_destructure.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_destructure.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b606b53792b91b99a02af6d63c7c42dc0d0dbe0b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_destructure.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_destructure.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_get.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f888b6bef005107aef6ece6b311b532cadb0e908 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_get.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_set.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_set.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fb0067998aa7817f7e3701802a61e5e9f274d3dd --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_set.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_update.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_update.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e7a9915b2f9d7b0671716834e1d76141580fa2fa --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_apply_descriptor_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_apply_descriptor_update.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_call_check.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_call_check.mjs new file mode 100644 index 0000000000000000000000000000000000000000..220c3c81f0ff4d3e955d0d2fa929f75dde407543 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_call_check.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_call_check.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_check_private_static_access.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_check_private_static_access.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a52a4d8d6d109fba265e9e36a520532de81b1b67 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_check_private_static_access.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_check_private_static_access.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_check_private_static_field_descriptor.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_check_private_static_field_descriptor.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cb8a623dc776747525ad601bd98ff874653eec18 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_check_private_static_field_descriptor.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_check_private_static_field_descriptor.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_extract_field_descriptor.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_extract_field_descriptor.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7586ce8211cd95b0da1acf472fcacb0409574472 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_extract_field_descriptor.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_extract_field_descriptor.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_name_tdz_error.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_name_tdz_error.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c211d7fb5d51e41913d960f7bc689a032a3c595a --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_name_tdz_error.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_name_tdz_error.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_destructure.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_destructure.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b06b763f8bdc824e2ea0c24de0760201eb3dbb9e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_destructure.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_destructure.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_get.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1f8854a81cd2c9ecc4aac02e58498eb1a78e59cb --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_get.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_init.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_init.mjs new file mode 100644 index 0000000000000000000000000000000000000000..48d4d17b93a515e39518a58f00adeca0c724fd58 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_init.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_init.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_loose_base.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_loose_base.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a10b033f37bb151dbaa031a375c1e9b72b816337 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_loose_base.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_loose_base.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_loose_key.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_loose_key.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6e80fd9835d817043f1e7c7a8c44ba8ccdb7018b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_loose_key.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_loose_key.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_set.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_set.mjs new file mode 100644 index 0000000000000000000000000000000000000000..cb54a1be34aebb9df26979d96db4980bb81f1ace --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_set.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_update.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_update.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c5f0c633e0ee9d8b3cbe49fc51ed1be62b3551ad --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_field_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_field_update.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_method_get.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_method_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9f5248a53d824b6f0fbf0b1c57b6cd46c89b05d6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_method_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_method_get.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_method_init.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_method_init.mjs new file mode 100644 index 0000000000000000000000000000000000000000..afce453b890ae1fd887e3920a5203507c6c28677 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_method_init.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_method_init.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_method_set.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_method_set.mjs new file mode 100644 index 0000000000000000000000000000000000000000..327252dae17c7e4e2348081595b5af7ad9b41fca --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_private_method_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_private_method_set.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_destructure.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_destructure.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c35376d2dc8eee18ddcb3b322d423734172a70dc --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_destructure.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_destructure.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_spec_get.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_spec_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0cc7854d6e0a5e2d8d46b06a9213eec6652ecec2 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_spec_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_spec_get.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_spec_set.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_spec_set.mjs new file mode 100644 index 0000000000000000000000000000000000000000..208cf9730a3c2265dccf8e9c42a6feace7fa1fb6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_spec_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_spec_set.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_update.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_update.mjs new file mode 100644 index 0000000000000000000000000000000000000000..87e043817674aa712f46736b85e2c27fd8835908 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_field_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_field_update.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_method_get.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_method_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2241a1a84a2863cbd974e94efd5647703bfa0bf9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_class_static_private_method_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_class_static_private_method_get.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_construct.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_construct.mjs new file mode 100644 index 0000000000000000000000000000000000000000..54acb64d632828fb35c0273bdb7427262a79a9f5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_construct.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_construct.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_create_class.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_create_class.mjs new file mode 100644 index 0000000000000000000000000000000000000000..78c2af2273b8198e611978bec75b3e27b9912f89 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_create_class.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_create_class.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_create_for_of_iterator_helper_loose.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_create_for_of_iterator_helper_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..303e056c5a26660873b4566d546bb02785207213 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_create_for_of_iterator_helper_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_create_for_of_iterator_helper_loose.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_create_super.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_create_super.mjs new file mode 100644 index 0000000000000000000000000000000000000000..44a06bfe18eaa069c86c7b2c85d482a155f06a12 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_create_super.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_create_super.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_decorate.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_decorate.mjs new file mode 100644 index 0000000000000000000000000000000000000000..087899164b69fef93291302e293475dde067c99e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_decorate.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_decorate.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_defaults.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_defaults.mjs new file mode 100644 index 0000000000000000000000000000000000000000..624e68460fb3ea1e0fafae83db5dfc40a448ecf6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_defaults.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_defaults.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_define_enumerable_properties.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_define_enumerable_properties.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b6a87fc8db4d396bbf555c31fd319693b0e2f1ce --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_define_enumerable_properties.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_define_enumerable_properties.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_define_property.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_define_property.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b60b2c824d6438cddd671ac08e21777adf1917ef --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_define_property.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_define_property.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_dispose.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_dispose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2f217e87221b1bed86ef2014d60ca9cdd5f8f023 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_dispose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_dispose.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_export_star.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_export_star.mjs new file mode 100644 index 0000000000000000000000000000000000000000..c7011c2f61a7f4173912a29a62bd7109cf089ca8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_export_star.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_export_star.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_extends.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_extends.mjs new file mode 100644 index 0000000000000000000000000000000000000000..804a28bab3d1cd3e01dfc065af3afd40214ed08d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_extends.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_extends.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_get.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_get.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fae4b22b5279e24a7c15ae631a7f4b56fa759784 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_get.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_get.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_get_prototype_of.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_get_prototype_of.mjs new file mode 100644 index 0000000000000000000000000000000000000000..57e820cebb170ec6831f6c73dd137a7a10e4a783 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_get_prototype_of.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_get_prototype_of.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_identity.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_identity.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5ab4a08a7e7207e27cfcc921940a069757d73e8e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_identity.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_identity.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_inherits.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_inherits.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d5e3767700736ad2a5305d6138ca93d9bb704d2c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_inherits.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_inherits.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_inherits_loose.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_inherits_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4f5187d98db0c35363d36e5ffaaaf049ea04f673 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_inherits_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_inherits_loose.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_initializer_define_property.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_initializer_define_property.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fa0a3b8e2e1de0caef9b8d9f42e711a1b743ca89 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_initializer_define_property.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_initializer_define_property.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_initializer_warning_helper.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_initializer_warning_helper.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f9251ab5bb30a1d403daf2c1297a065b22dd2bcb --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_initializer_warning_helper.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_initializer_warning_helper.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_instanceof.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_instanceof.mjs new file mode 100644 index 0000000000000000000000000000000000000000..609f78692e0778dacf43f68178b5680800535ce5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_instanceof.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_instanceof.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_interop_require_default.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_interop_require_default.mjs new file mode 100644 index 0000000000000000000000000000000000000000..454ce7154f35618f3d90529075a33705c1ec252c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_interop_require_default.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_interop_require_default.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_interop_require_wildcard.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_interop_require_wildcard.mjs new file mode 100644 index 0000000000000000000000000000000000000000..07f7a7ed50d966a913b170c51e2788fcd2303a3b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_interop_require_wildcard.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_interop_require_wildcard.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_is_native_function.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_is_native_function.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8bacb3ab51baf5b97c00041a13b8941f36398175 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_is_native_function.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_is_native_function.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_is_native_reflect_construct.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_is_native_reflect_construct.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7c0394d9c46319c4cc90b44ac782f0eb40ce3a0c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_is_native_reflect_construct.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_is_native_reflect_construct.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_iterable_to_array.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_iterable_to_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4baf94afb72d4e69c75859c799c435fa319380f4 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_iterable_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_iterable_to_array.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_iterable_to_array_limit.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_iterable_to_array_limit.mjs new file mode 100644 index 0000000000000000000000000000000000000000..45f70f503fdfc7a1b748ff477df426e697553a9c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_iterable_to_array_limit.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_iterable_to_array_limit.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_iterable_to_array_limit_loose.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_iterable_to_array_limit_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..400a9e019fa62d55e697898982b8416fc4b8db80 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_iterable_to_array_limit_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_iterable_to_array_limit_loose.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_jsx.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_jsx.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8b0646a0f85ffce214b69ddc1eabb738650aa99c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_jsx.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_jsx.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_new_arrow_check.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_new_arrow_check.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e694d150cf518a9a826c74be35233e907346d2e5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_new_arrow_check.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_new_arrow_check.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_non_iterable_rest.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_non_iterable_rest.mjs new file mode 100644 index 0000000000000000000000000000000000000000..83218078cb83ac7ad740d4991143db7a5237074b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_non_iterable_rest.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_non_iterable_rest.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_non_iterable_spread.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_non_iterable_spread.mjs new file mode 100644 index 0000000000000000000000000000000000000000..12993f133d0d19cafe2279dc1dc30b43ecfcde7b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_non_iterable_spread.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_non_iterable_spread.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_destructuring_empty.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_destructuring_empty.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b8aed9ce98d6933a22b9951013eab1315dd558d3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_destructuring_empty.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_destructuring_empty.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_spread.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_spread.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9b536f58d64da93abc86b8d1050baabe8f79133d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_spread.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_spread.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_spread_props.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_spread_props.mjs new file mode 100644 index 0000000000000000000000000000000000000000..799de3f688769af054dabb5f16accc42e1713c45 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_spread_props.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_spread_props.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_without_properties.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_without_properties.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f0ce12c6c1d4060268f13d452cb98efccff35df7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_without_properties.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_without_properties.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_without_properties_loose.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_without_properties_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f6f26696e521cd5959979a55b2be6c97c804e1f3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_object_without_properties_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_object_without_properties_loose.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_overload_yield.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_overload_yield.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d854c354454ebc5620c1cc556a092b867f5f11c3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_overload_yield.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_overload_yield.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_possible_constructor_return.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_possible_constructor_return.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ee9657d256cfa0ce49ba8fa14b3d718fd6ae17e9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_possible_constructor_return.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_possible_constructor_return.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_read_only_error.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_read_only_error.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3e95329b1430b6d42833466404eac08f997bd3b5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_read_only_error.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_read_only_error.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_set.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_set.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5cc033773f86b25240a88b6eaf3e68c7611b90d6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_set.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_set.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_set_prototype_of.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_set_prototype_of.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f244856c06d0e81b10b9e2af893ec186d13bbc7c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_set_prototype_of.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_set_prototype_of.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_skip_first_generator_next.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_skip_first_generator_next.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f437b3ce8d22a24157f65ae86f68fdcc6b0d46e6 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_skip_first_generator_next.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_skip_first_generator_next.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_sliced_to_array.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_sliced_to_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..34f97233d08a7aca1b05c49c633d8082288f0e16 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_sliced_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_sliced_to_array.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_sliced_to_array_loose.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_sliced_to_array_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..116211bc5e8d53fb6df1b836ac6bb968c2a11992 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_sliced_to_array_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_sliced_to_array_loose.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_super_prop_base.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_super_prop_base.mjs new file mode 100644 index 0000000000000000000000000000000000000000..25a1b4b471aa70874f7903b58213fa215f2b4007 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_super_prop_base.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_super_prop_base.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_tagged_template_literal.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_tagged_template_literal.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ea788727152e810036920619a7d3206d53acf5b9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_tagged_template_literal.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_tagged_template_literal.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_tagged_template_literal_loose.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_tagged_template_literal_loose.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f65c3bb96cb74697023650709cb99c917af31626 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_tagged_template_literal_loose.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_tagged_template_literal_loose.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_throw.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_throw.mjs new file mode 100644 index 0000000000000000000000000000000000000000..a0b50e049821d3616ee6cb659d28eaa153ceddfd --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_throw.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_throw.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_array.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d42cba535fc0174c5574b916c711790400350f86 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_array.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_consumable_array.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_consumable_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..e23f2ebc610b6fcca2eb82191ebe59e080c8ca78 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_consumable_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_consumable_array.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_primitive.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_primitive.mjs new file mode 100644 index 0000000000000000000000000000000000000000..0d4a248636fc7338159a5b0368c35fec30bbed51 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_primitive.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_primitive.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_property_key.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_property_key.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7b767073fe22d03acba912f6ea0fd6676dd7d4e0 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_to_property_key.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_to_property_key.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_add_disposable_resource.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_add_disposable_resource.mjs new file mode 100644 index 0000000000000000000000000000000000000000..b059656ed4f603ce9f2e0e6604b5d461edbd0922 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_add_disposable_resource.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_add_disposable_resource.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_decorate.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_decorate.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2d7763f3516b49384460263ea06c64f127a04c9c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_decorate.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_decorate.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_dispose_resources.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_dispose_resources.mjs new file mode 100644 index 0000000000000000000000000000000000000000..ba5ec13678ca62b0644c48cbdf0a98644714bae0 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_dispose_resources.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_dispose_resources.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_generator.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_generator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f595f6d8753215b2a79f2da4cf49f184d2daf5ba --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_generator.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_metadata.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_metadata.mjs new file mode 100644 index 0000000000000000000000000000000000000000..424457eba9d0fa2c29b2ed25b383808841f2187f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_metadata.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_metadata.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_param.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_param.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1806317955415fb518eca6bb4cae127028347142 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_param.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_param.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_rewrite_relative_import_extension.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_rewrite_relative_import_extension.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d135817f9749b8009239f72d26adf478ed815d59 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_rewrite_relative_import_extension.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_rewrite_relative_import_extension.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_values.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_values.mjs new file mode 100644 index 0000000000000000000000000000000000000000..126c78379e63dd43b24acbcc25f6e0599b2eec44 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_ts_values.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_ts_values.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_type_of.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_type_of.mjs new file mode 100644 index 0000000000000000000000000000000000000000..4f8a93659e2c913833a8bdcc9018f4e878c6b2f1 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_type_of.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_type_of.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_unsupported_iterable_to_array.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_unsupported_iterable_to_array.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9e4222212cd297cb99ae171756f0aae9f3e723d8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_unsupported_iterable_to_array.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_unsupported_iterable_to_array.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_update.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_update.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6adb4a428daadcf4d8a340f101cd0da3afa19b92 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_update.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_update.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_using.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_using.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f71681556fd04759dc6b2d0e0279318f172d4c9a --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_using.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_using.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_using_ctx.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_using_ctx.mjs new file mode 100644 index 0000000000000000000000000000000000000000..87e80979e1a8fed77a193cc930bbbccd014ed668 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_using_ctx.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_using_ctx.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_wrap_async_generator.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_wrap_async_generator.mjs new file mode 100644 index 0000000000000000000000000000000000000000..44acb1ab4aac6c7aa242be492b621cdbb4418ded --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_wrap_async_generator.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_wrap_async_generator.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_wrap_native_super.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_wrap_native_super.mjs new file mode 100644 index 0000000000000000000000000000000000000000..266f5d3b74eda2dd9c46f3ff904a6ccc63ec3993 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_wrap_native_super.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_wrap_native_super.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_wrap_reg_exp.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_wrap_reg_exp.mjs new file mode 100644 index 0000000000000000000000000000000000000000..772afe9d1ae525a5d4c0427223484c9c643ca926 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_wrap_reg_exp.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_wrap_reg_exp.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_write_only_error.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_write_only_error.mjs new file mode 100644 index 0000000000000000000000000000000000000000..68c8af268662b7f0a016ce35f5c3ea6e388cf352 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/_write_only_error.mjs @@ -0,0 +1 @@ +export { _ as default } from "../esm/_write_only_error.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/index.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d0d0812948c6fe0d4ce5f0fde507a21166548781 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@swc/helpers/src/index.mjs @@ -0,0 +1 @@ +export * from "../esm/index.js"; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/1.bug_report.yml b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/1.bug_report.yml new file mode 100644 index 0000000000000000000000000000000000000000..72207f75b1f297e658e8aa9326eb4b677ef268fb --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/1.bug_report.yml @@ -0,0 +1,38 @@ +name: Bug Report +description: Create a bug report for @tailwindcss/forms. +labels: [] +body: + - type: input + attributes: + label: What version of @tailwindcss/forms are you using? + description: 'For example: v0.1.4' + validations: + required: true + - type: input + attributes: + label: What version of Node.js are you using? + description: 'For example: v12.0.0' + validations: + required: true + - type: input + attributes: + label: What browser are you using? + description: 'For example: Chrome, Safari, or N/A' + validations: + required: true + - type: input + attributes: + label: What operating system are you using? + description: 'For example: macOS, Windows' + validations: + required: true + - type: input + attributes: + label: Reproduction repository + description: A public GitHub repo that includes a minimal reproduction of the bug. Unfortunately we can't provide support without a reproduction, and your issue will be closed and locked with no comment if this is not provided. + validations: + required: true + - type: textarea + attributes: + label: Describe your issue + description: Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/config.yml b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..23765818bbae1772f8d07b6944cbc298062f9480 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Feature Request + url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=ideas + about: 'Suggest any ideas you have using our discussion forums.' + - name: Help + url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=help + about: 'If you have a question or need help, ask a question on the discussion forums.' + - name: Kind Words + url: https://github.com/tailwindlabs/tailwindcss/discussions/new?category=kind-words + about: "Have something nice to say about @tailwindcss/forms or Tailwind CSS in general? We'd love to hear it!" diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/workflows/prepare-release.yml b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/workflows/prepare-release.yml new file mode 100644 index 0000000000000000000000000000000000000000..ae24c124c94adb2b891a232d481c58637bf31184 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/workflows/prepare-release.yml @@ -0,0 +1,56 @@ +name: Prepare Release + +on: + workflow_dispatch: + push: + tags: + - 'v*' + +permissions: + contents: read + +jobs: + prepare: + permissions: + contents: write # for softprops/action-gh-release to create GitHub release + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [22] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Test + run: npm test + + - name: Resolve version + id: vars + run: | + echo "TAG_NAME=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + + - name: Get release notes + run: | + RELEASE_NOTES=$(npm run release-notes --silent) + echo "RELEASE_NOTES<> $GITHUB_ENV + echo "$RELEASE_NOTES" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + + - name: Release + uses: softprops/action-gh-release@v1 + with: + draft: true + tag_name: ${{ env.TAG_NAME }} + body: ${{ env.RELEASE_NOTES }} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/workflows/release-insiders.yml b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/workflows/release-insiders.yml new file mode 100644 index 0000000000000000000000000000000000000000..1a9a2b1efcd8759e2ad4a213084de267fa7960a4 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/workflows/release-insiders.yml @@ -0,0 +1,42 @@ +name: Release Insiders + +on: + push: + branches: [main] + +permissions: + contents: read + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [22] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Resolve version + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: 'Version based on commit: 0.0.0-insiders.${{ steps.vars.outputs.sha_short }}' + run: npm version 0.0.0-insiders.${{ steps.vars.outputs.sha_short }} --force --no-git-tag-version + + - name: Publish + run: npm publish --provenance --tag insiders + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/workflows/release.yml b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/workflows/release.yml new file mode 100644 index 0000000000000000000000000000000000000000..a4482d0caa371fb141218fa6c797e83a39fd99bc --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Release + +on: + release: + types: [published] + +permissions: + contents: read + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [22] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Test + run: npm test + + - name: Calculate environment variables + run: | + echo "RELEASE_CHANNEL=$(npm run release-channel --silent)" >> $GITHUB_ENV + + - name: Publish + run: npm publish --provenance --tag ${{ env.RELEASE_CHANNEL }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/CHANGELOG.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..01cafed7ae8a587c6327c14b4ecf89a98e0c8116 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/CHANGELOG.md @@ -0,0 +1,194 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +- Nothing yet! + +## [0.5.10] - 2025-01-07 + +### Fixed + +- Support installing with beta versions of Tailwind CSS v4 ([#163](https://github.com/tailwindlabs/tailwindcss-forms/pull/163)) + +## [0.5.9] - 2024-09-05 + +### Fixed + +- Fallback to static chevron color if theme is using variables ([#167](https://github.com/tailwindlabs/tailwindcss-forms/pull/167)) + +## [0.5.8] - 2024-08-28 + +### Fixed + +- Support installing with alpha versions of Tailwind CSS v4 ([#163](https://github.com/tailwindlabs/tailwindcss-forms/pull/163)) + +## [0.5.7] - 2023-11-10 + +### Fixed + +- Use normal `checkbox` and `radio` appearance in `forced-colors` mode ([#152](https://github.com/tailwindlabs/tailwindcss-forms/pull/152)) + +## [0.5.6] - 2023-08-28 + +### Fixed + +- Fix date time bottom spacing on MacOS Safari ([#146](https://github.com/tailwindlabs/tailwindcss-forms/pull/146)) + +## [0.5.5] - 2023-08-22 + +### Fixed + +- Fix text alignment on date and time inputs on iOS ([#144](https://github.com/tailwindlabs/tailwindcss-forms/pull/144)) + +## [0.5.4] - 2023-07-13 + +### Fixed + +- Remove chevron for selects with a non-default size ([#137](https://github.com/tailwindlabs/tailwindcss-forms/pull/137)) +- Allow for without `type` ([#141](https://github.com/tailwindlabs/tailwindcss-forms/pull/141)) + +## [0.5.3] - 2022-09-02 + +### Fixed + +- Update TypeScript types ([#126](https://github.com/tailwindlabs/tailwindcss-forms/pull/126)) + +## [0.5.2] - 2022-05-18 + +### Added + +- Add TypeScript type declarations ([#118](https://github.com/tailwindlabs/tailwindcss-forms/pull/118)) + +## [0.5.1] - 2022-05-03 + +### Fixed + +- Remove duplicate `outline` property ([#116](https://github.com/tailwindlabs/tailwindcss-forms/pull/116)) +- Fix autoprefixer warning about `color-adjust` ([#115](https://github.com/tailwindlabs/tailwindcss-forms/pull/115)) + +## [0.5.0] - 2022-03-02 + +### Changed + +- Generate both global styles and classes by default ([#71](https://github.com/tailwindlabs/tailwindcss-forms/pull/71)) + +## [0.4.1] - 2022-03-02 + +### Added + +- Remove `dist` folder and related dependencies ([#96](https://github.com/tailwindlabs/tailwindcss-forms/pull/96)) + +### Fixed + +- Use `addComponents` for class strategy ([#91](https://github.com/tailwindlabs/tailwindcss-forms/pull/91)) +- Fix extra height on Safari date/time inputs ([#109](https://github.com/tailwindlabs/tailwindcss-forms/pull/109)) + +## [0.4.0] - 2021-12-09 + +### Changed + +- Update color palette references for v3 ([#83](https://github.com/tailwindlabs/tailwindcss-forms/pull/83)) +- Don't read outline.none value from config ([#89](https://github.com/tailwindlabs/tailwindcss-forms/pull/89)) + +## [0.3.4] - 2021-09-28 + +### Fixed + +- Fix compatibility with `optimizeUniversalDefaults` experimental feature in Tailwind CSS v2.2 ([#81](https://github.com/tailwindlabs/tailwindcss-forms/pull/81)) + +## [0.3.3] - 2021-06-03 + +### Fixed + +- Fix typo in selector when using `class` strategy that breaks background colors on checkboxes and radio buttons ([#72](https://github.com/tailwindlabs/tailwindcss-forms/pull/72)) + +## [0.3.2] - 2021-03-26 + +### Fixed + +- Filter `null` rules for JIT compatibility ([b4c4e03](https://github.com/tailwindlabs/tailwindcss-forms/commit/b4c4e039337c3a5599f5b6d9eabbcc8ab9e8c8d9)) + +## [0.3.1] - 2021-03-26 + +### Fixed + +- Use `base` as default strategy, not `class` ([#61](https://github.com/tailwindlabs/tailwindcss-forms/pull/61)) + +## [0.3.0] - 2021-03-25 + +### Added + +- Add `class` strategy for you babies and your custom select and date picker libraries ;) ([#39](https://github.com/tailwindlabs/tailwindcss-forms/pull/39)) + +## [0.2.1] - 2020-11-17 + +### Fixed + +- Fix issue where default checkbox/radio border color took precedence over user border color on focus ([d0b9fd9](https://github.com/tailwindlabs/tailwindcss-forms/commit/d0b9fd9)) + +## [0.2.0] - 2020-11-16 + +### Changed + +- Update form styles to be less opinionated and encourage custom styling ([3288709](https://github.com/tailwindlabs/tailwindcss-forms/commit/3288709b59f4101511ec19f30cb2dafe7738251e)) +- Update custom property names to match namespaced variables in Tailwind CSS v2.0 ([adb9807](https://github.com/tailwindlabs/tailwindcss-forms/commit/adb98078fc830d0416cb5ea2c895e997d5f0a5ec), [bbd8510](https://github.com/tailwindlabs/tailwindcss-forms/commit/bbd85102ef4a402b3c39d997c025208a33694cc4)) + +## [0.1.4] - 2020-11-12 + +### Fixed + +- Fix SVG background images not rendering properly in all browsers ([#5](https://github.com/tailwindlabs/tailwindcss-forms/pull/5)) + +## [0.1.3] - 2020-11-12 + +### Changed + +- Update focus styles to account for changes to `ring` API in latest Tailwind CSS 2.0 alpha ([5c16689](https://github.com/tailwindlabs/tailwindcss-forms/commit/5c166896b06475832bd8364f9f3ef5c4baec585f)) + +## [0.1.2] - 2020-11-11 + +### Fixed + +- Work around iOS Safari bug that causes date inputs to render with no height when empty ([b98365b](https://github.com/tailwindlabs/tailwindcss-forms/commit/b98365b903b586bfbe7a6ae745ba64b5d87e23e3)) + +## [0.1.1] - 2020-11-11 + +### Changed + +- Move `tailwindcss` to dependencies, hoping to get it working with Tailwind Play ([d625ea1](https://github.com/tailwindlabs/tailwindcss-forms/commit/d625ea11bd111a4d8cde937e36f3d229ecdf7c6a)) + +## [0.1.0] - 2020-11-11 + +Initial release! + +[unreleased]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.10...HEAD +[0.5.10]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.9...v0.5.10 +[0.5.9]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.8...v0.5.9 +[0.5.8]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.7...v0.5.8 +[0.5.7]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.6...v0.5.7 +[0.5.6]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.5...v0.5.6 +[0.5.5]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.4...v0.5.5 +[0.5.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.3...v0.5.4 +[0.5.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.2...v0.5.3 +[0.5.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.1...v0.5.2 +[0.5.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.5.0...v0.5.1 +[0.5.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.4.1...v0.5.0 +[0.4.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.4.0...v0.4.1 +[0.4.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.3...v0.4.0 +[0.3.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.3...v0.3.4 +[0.3.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.2...v0.3.3 +[0.3.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.1...v0.3.2 +[0.3.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.3.0...v0.3.1 +[0.3.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.2.1...v0.3.0 +[0.2.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.2.0...v0.2.1 +[0.2.0]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.4...v0.2.0 +[0.1.4]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.3...v0.1.4 +[0.1.3]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.2...v0.1.3 +[0.1.2]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.1...v0.1.2 +[0.1.1]: https://github.com/tailwindlabs/tailwindcss-forms/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/tailwindlabs/tailwindcss-forms/releases/tag/v0.1.0 diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d6a82290738a9f78946cbcb4594535d6984086dd --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d20b50d4522e4daff336d767d6a71acacd16fb0f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/README.md @@ -0,0 +1,122 @@ +# @tailwindcss/forms + +A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities. + +## Installation + +Install the plugin from npm: + +```sh +npm install -D @tailwindcss/forms +``` + +Then add the plugin to your `tailwind.config.js` file: + +```js +// tailwind.config.js +module.exports = { + theme: { + // ... + }, + plugins: [ + require('@tailwindcss/forms'), + // ... + ], +} +``` + +## Basic usage + +[**View the live demo**](https://tailwindcss-forms.vercel.app/) + +All of the basic form elements you use will now have some simple default styles that are easy to override with utilities. + +Currently we add basic utility-friendly form styles for the following form element types: + +- `input[type='text']` +- `input[type='password']` +- `input[type='email']` +- `input[type='number']` +- `input[type='url']` +- `input[type='date']` +- `input[type='datetime-local']` +- `input[type='month']` +- `input[type='week']` +- `input[type='time']` +- `input[type='search']` +- `input[type='tel']` +- `input[type='checkbox']` +- `input[type='radio']` +- `select` +- `select[multiple]` +- `textarea` + +Every element has been normalized/reset to a simple visually consistent style that is easy to customize with utilities, even elements like `` that normally need to be reset with `appearance: none` and customized using custom CSS: + +```html + + + + + +``` + +More customization examples and best practices coming soon. + +### Using classes to style + +In addition to the global styles, we also generate a set of corresponding classes which can be used to explicitly apply the form styles to an element. This can be useful in situations where you need to make a non-form element, such as a `
`, look like a form element. + +```html + + + + + +``` + +Here is a complete table of the provided `form-*` classes for reference: + +| Base | Class | +| ------------------------- | ------------------ | +| `[type='text']` | `form-input` | +| `[type='email']` | `form-input` | +| `[type='url']` | `form-input` | +| `[type='password']` | `form-input` | +| `[type='number']` | `form-input` | +| `[type='date']` | `form-input` | +| `[type='datetime-local']` | `form-input` | +| `[type='month']` | `form-input` | +| `[type='search']` | `form-input` | +| `[type='tel']` | `form-input` | +| `[type='time']` | `form-input` | +| `[type='week']` | `form-input` | +| `textarea` | `form-textarea` | +| `select` | `form-select` | +| `select[multiple]` | `form-multiselect` | +| `[type='checkbox']` | `form-checkbox` | +| `[type='radio']` | `form-radio` | + +### Using only global styles or only classes + +Although we recommend thinking of this plugin as a "form reset" rather than a collection of form component styles, in some cases our default approach may be too heavy-handed, especially when integrating this plugin into existing projects. + +If generating both the global (base) styles and classes doesn't work well with your project, you can use the `strategy` option to limit the plugin to just one of these approaches. + +```js +// tailwind.config.js +plugins: [ + require("@tailwindcss/forms")({ + strategy: 'base', // only generate global styles + strategy: 'class', // only generate classes + }), +], +``` + +When using the `base` strategy, form elements are styled globally, and no `form-{name}` classes are generated. + +When using the `class` strategy, form elements are not styled globally, and instead must be styled using the generated `form-{name}` classes. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/index.html b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/index.html new file mode 100644 index 0000000000000000000000000000000000000000..c51b94dba4ff859c9e5b3fd633b0eb4691b95caa --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/index.html @@ -0,0 +1,255 @@ + + + + + + @tailwindcss/forms examples + + + +
+
+
+

@tailwindcss/forms examples

+

+ An opinionated form reset designed to make form elements easy to style with utility + classes. +

+ +
+
+

Unstyled

+

This is how form elements look out of the box.

+
+
+ + + + + +
+
+
+ +
+
+
+
+
+
+
+

Simple

+
+
+ + + + + +
+
+
+ +
+
+
+
+
+
+
+

Underline

+
+
+ + + + + +
+
+
+ +
+
+
+
+
+
+
+

Solid

+
+
+ + + + + +
+
+
+ +
+
+
+
+
+
+
+
+ + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/kitchen-sink.html b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/kitchen-sink.html new file mode 100644 index 0000000000000000000000000000000000000000..2b98657c1cc9f49ba39b90c5de96ae65f118dcc8 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/kitchen-sink.html @@ -0,0 +1,222 @@ + + + + + + @tailwindcss/forms Kitchen Sink + + + +
+
+

Reset styles

+

+ These are form elements this plugin styles by default. +

+
+
+ + + + + + + + + + + +
+
+ + + + + + + +
+ Checkboxes +
+
+ +
+
+ +
+
+ +
+
+
+
+ Radio Buttons +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+

Untouched

+

+ These are form elements we don't handle (yet?), but we use this to make sure we haven't + accidentally styled them by mistake. +

+
+
+ + + + +
+
+
+
+ + diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/package.json new file mode 100644 index 0000000000000000000000000000000000000000..6dec43c2882e9a00743ffa4a353fcf47430fb5c9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/package.json @@ -0,0 +1,45 @@ +{ + "name": "@tailwindcss/forms", + "version": "0.5.10", + "main": "src/index.js", + "types": "src/index.d.ts", + "license": "MIT", + "repository": "https://github.com/tailwindlabs/tailwindcss-forms", + "publishConfig": { + "access": "public" + }, + "prettier": { + "printWidth": 100, + "semi": false, + "singleQuote": true, + "trailingComma": "es5", + "plugins": [ + "prettier-plugin-tailwindcss" + ] + }, + "scripts": { + "dev": "concurrently \"npm run serve\" \"npm run watch\"", + "serve": "live-server .", + "watch": "npm run build -- -w", + "build": "tailwindcss -o dist/tailwind.css", + "test": "exit 0", + "release-channel": "node ./scripts/release-channel.js", + "release-notes": "node ./scripts/release-notes.js", + "format": "prettier . --write" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1" + }, + "devDependencies": { + "autoprefixer": "^10.4.6", + "concurrently": "^5.3.0", + "live-server": "^1.2.2", + "postcss": "^8.4.13", + "prettier": "^3.3.3", + "prettier-plugin-tailwindcss": "^0.6.8", + "tailwindcss": "^3.0.24" + }, + "dependencies": { + "mini-svg-data-uri": "^1.2.3" + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/scripts/release-channel.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/scripts/release-channel.js new file mode 100644 index 0000000000000000000000000000000000000000..0c827f3fda8c55e90ed6267c633c8c6bd8ab1a21 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/scripts/release-channel.js @@ -0,0 +1,18 @@ +// Given a version, figure out what the release channel is so that we can publish to the correct +// channel on npm. +// +// E.g.: +// +// 1.2.3 -> latest (default) +// 0.0.0-insiders.ffaa88 -> insiders +// 4.1.0-alpha.4 -> alpha + +let version = + process.argv[2] || process.env.npm_package_version || require('../package.json').version + +let match = /\d+\.\d+\.\d+-(.*)\.\d+/g.exec(version) +if (match) { + console.log(match[1]) +} else { + console.log('latest') +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/scripts/release-notes.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/scripts/release-notes.js new file mode 100644 index 0000000000000000000000000000000000000000..23d869bcb5b9271faf9c8b79b8fd5b50de05259e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/scripts/release-notes.js @@ -0,0 +1,21 @@ +// Given a version, figure out what the release notes are so that we can use this to pre-fill the +// relase notes on a GitHub release for the current version. + +let path = require('path') +let fs = require('fs') + +let version = + process.argv[2] || process.env.npm_package_version || require('../package.json').version + +let changelog = fs.readFileSync(path.resolve(__dirname, '..', 'CHANGELOG.md'), 'utf8') +let match = new RegExp( + `## \\[${version}\\] - (.*)\\n\\n([\\s\\S]*?)\\n(?:(?:##\\s)|(?:\\[))`, + 'g' +).exec(changelog) + +if (match) { + let [, date, notes] = match + console.log(notes.trim()) +} else { + console.log(`Placeholder release notes for version: v${version}`) +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/src/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/src/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..496b81fb8fa807b9d34291144b8c1281baaaef0e --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/src/index.d.ts @@ -0,0 +1,9 @@ +declare function plugin(options?: Partial<{ strategy: 'base' | 'class' }>): { + handler: () => void +} + +declare namespace plugin { + const __isOptionsFunction: true +} + +export = plugin diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/src/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b86a224da5e9a6841e060b73f48931eb8b123d14 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/src/index.js @@ -0,0 +1,368 @@ +const svgToDataUri = require('mini-svg-data-uri') +const plugin = require('tailwindcss/plugin') +const defaultTheme = require('tailwindcss/defaultTheme') +const colors = require('tailwindcss/colors') +const [baseFontSize, { lineHeight: baseLineHeight }] = defaultTheme.fontSize.base +const { spacing, borderWidth, borderRadius } = defaultTheme + +function resolveColor(color, opacityVariableName) { + return color.replace('', `var(${opacityVariableName}, 1)`) +} + +const forms = plugin.withOptions(function (options = { strategy: undefined }) { + return function ({ addBase, addComponents, theme }) { + function resolveChevronColor(color, fallback) { + let resolved = theme(color) + + if (!resolved || resolved.includes('var(')) { + return fallback + } + + return resolved.replace('', '1') + } + + const strategy = options.strategy === undefined ? ['base', 'class'] : [options.strategy] + + const rules = [ + { + base: [ + "[type='text']", + 'input:where(:not([type]))', + "[type='email']", + "[type='url']", + "[type='password']", + "[type='number']", + "[type='date']", + "[type='datetime-local']", + "[type='month']", + "[type='search']", + "[type='tel']", + "[type='time']", + "[type='week']", + '[multiple]', + 'textarea', + 'select', + ], + class: ['.form-input', '.form-textarea', '.form-select', '.form-multiselect'], + styles: { + appearance: 'none', + 'background-color': '#fff', + 'border-color': resolveColor( + theme('colors.gray.500', colors.gray[500]), + '--tw-border-opacity' + ), + 'border-width': borderWidth['DEFAULT'], + 'border-radius': borderRadius.none, + 'padding-top': spacing[2], + 'padding-right': spacing[3], + 'padding-bottom': spacing[2], + 'padding-left': spacing[3], + 'font-size': baseFontSize, + 'line-height': baseLineHeight, + '--tw-shadow': '0 0 #0000', + '&:focus': { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '0px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': resolveColor( + theme('colors.blue.600', colors.blue[600]), + '--tw-ring-opacity' + ), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + 'border-color': resolveColor( + theme('colors.blue.600', colors.blue[600]), + '--tw-border-opacity' + ), + }, + }, + }, + { + base: ['input::placeholder', 'textarea::placeholder'], + class: ['.form-input::placeholder', '.form-textarea::placeholder'], + styles: { + color: resolveColor(theme('colors.gray.500', colors.gray[500]), '--tw-text-opacity'), + opacity: '1', + }, + }, + { + base: ['::-webkit-datetime-edit-fields-wrapper'], + class: ['.form-input::-webkit-datetime-edit-fields-wrapper'], + styles: { + padding: '0', + }, + }, + { + // Unfortunate hack until https://bugs.webkit.org/show_bug.cgi?id=198959 is fixed. + // This sucks because users can't change line-height with a utility on date inputs now. + // Reference: https://github.com/twbs/bootstrap/pull/31993 + base: ['::-webkit-date-and-time-value'], + class: ['.form-input::-webkit-date-and-time-value'], + styles: { + 'min-height': '1.5em', + }, + }, + { + // In Safari on iOS date and time inputs are centered instead of left-aligned and can't be + // changed with `text-align` utilities on the input by default. Resetting this to `inherit` + // makes them left-aligned by default and makes it possible to override the alignment with + // utility classes without using an arbitrary variant to target the pseudo-elements. + base: ['::-webkit-date-and-time-value'], + class: ['.form-input::-webkit-date-and-time-value'], + styles: { + 'text-align': 'inherit', + }, + }, + { + // In Safari on macOS date time inputs that are set to `display: block` have unexpected + // extra bottom spacing. This can be corrected by setting the `::-webkit-datetime-edit` + // pseudo-element to `display: inline-flex`, instead of the browser default of + // `display: inline-block`. + base: ['::-webkit-datetime-edit'], + class: ['.form-input::-webkit-datetime-edit'], + styles: { + display: 'inline-flex', + }, + }, + { + // In Safari on macOS date time inputs are 4px taller than normal inputs + // This is because there is extra padding on the datetime-edit and datetime-edit-{part}-field pseudo elements + // See https://github.com/tailwindlabs/tailwindcss-forms/issues/95 + base: [ + '::-webkit-datetime-edit', + '::-webkit-datetime-edit-year-field', + '::-webkit-datetime-edit-month-field', + '::-webkit-datetime-edit-day-field', + '::-webkit-datetime-edit-hour-field', + '::-webkit-datetime-edit-minute-field', + '::-webkit-datetime-edit-second-field', + '::-webkit-datetime-edit-millisecond-field', + '::-webkit-datetime-edit-meridiem-field', + ], + class: [ + '.form-input::-webkit-datetime-edit', + '.form-input::-webkit-datetime-edit-year-field', + '.form-input::-webkit-datetime-edit-month-field', + '.form-input::-webkit-datetime-edit-day-field', + '.form-input::-webkit-datetime-edit-hour-field', + '.form-input::-webkit-datetime-edit-minute-field', + '.form-input::-webkit-datetime-edit-second-field', + '.form-input::-webkit-datetime-edit-millisecond-field', + '.form-input::-webkit-datetime-edit-meridiem-field', + ], + styles: { + 'padding-top': 0, + 'padding-bottom': 0, + }, + }, + { + base: ['select'], + class: ['.form-select'], + styles: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'background-position': `right ${spacing[2]} center`, + 'background-repeat': `no-repeat`, + 'background-size': `1.5em 1.5em`, + 'padding-right': spacing[10], + 'print-color-adjust': `exact`, + }, + }, + { + base: ['[multiple]', '[size]:where(select:not([size="1"]))'], + class: ['.form-select:where([size]:not([size="1"]))'], + styles: { + 'background-image': 'initial', + 'background-position': 'initial', + 'background-repeat': 'unset', + 'background-size': 'initial', + 'padding-right': spacing[3], + 'print-color-adjust': 'unset', + }, + }, + { + base: [`[type='checkbox']`, `[type='radio']`], + class: ['.form-checkbox', '.form-radio'], + styles: { + appearance: 'none', + padding: '0', + 'print-color-adjust': 'exact', + display: 'inline-block', + 'vertical-align': 'middle', + 'background-origin': 'border-box', + 'user-select': 'none', + 'flex-shrink': '0', + height: spacing[4], + width: spacing[4], + color: resolveColor(theme('colors.blue.600', colors.blue[600]), '--tw-text-opacity'), + 'background-color': '#fff', + 'border-color': resolveColor( + theme('colors.gray.500', colors.gray[500]), + '--tw-border-opacity' + ), + 'border-width': borderWidth['DEFAULT'], + '--tw-shadow': '0 0 #0000', + }, + }, + { + base: [`[type='checkbox']`], + class: ['.form-checkbox'], + styles: { + 'border-radius': borderRadius['none'], + }, + }, + { + base: [`[type='radio']`], + class: ['.form-radio'], + styles: { + 'border-radius': '100%', + }, + }, + { + base: [`[type='checkbox']:focus`, `[type='radio']:focus`], + class: ['.form-checkbox:focus', '.form-radio:focus'], + styles: { + outline: '2px solid transparent', + 'outline-offset': '2px', + '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)', + '--tw-ring-offset-width': '2px', + '--tw-ring-offset-color': '#fff', + '--tw-ring-color': resolveColor( + theme('colors.blue.600', colors.blue[600]), + '--tw-ring-opacity' + ), + '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`, + '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)`, + 'box-shadow': `var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)`, + }, + }, + { + base: [`[type='checkbox']:checked`, `[type='radio']:checked`], + class: ['.form-checkbox:checked', '.form-radio:checked'], + styles: { + 'border-color': `transparent`, + 'background-color': `currentColor`, + 'background-size': `100% 100%`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + }, + }, + { + base: [`[type='checkbox']:checked`], + class: ['.form-checkbox:checked'], + styles: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + + '@media (forced-colors: active) ': { + appearance: 'auto', + }, + }, + }, + { + base: [`[type='radio']:checked`], + class: ['.form-radio:checked'], + styles: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + + '@media (forced-colors: active) ': { + appearance: 'auto', + }, + }, + }, + { + base: [ + `[type='checkbox']:checked:hover`, + `[type='checkbox']:checked:focus`, + `[type='radio']:checked:hover`, + `[type='radio']:checked:focus`, + ], + class: [ + '.form-checkbox:checked:hover', + '.form-checkbox:checked:focus', + '.form-radio:checked:hover', + '.form-radio:checked:focus', + ], + styles: { + 'border-color': 'transparent', + 'background-color': 'currentColor', + }, + }, + { + base: [`[type='checkbox']:indeterminate`], + class: ['.form-checkbox:indeterminate'], + styles: { + 'background-image': `url("${svgToDataUri( + `` + )}")`, + 'border-color': `transparent`, + 'background-color': `currentColor`, + 'background-size': `100% 100%`, + 'background-position': `center`, + 'background-repeat': `no-repeat`, + + '@media (forced-colors: active) ': { + appearance: 'auto', + }, + }, + }, + { + base: [`[type='checkbox']:indeterminate:hover`, `[type='checkbox']:indeterminate:focus`], + class: ['.form-checkbox:indeterminate:hover', '.form-checkbox:indeterminate:focus'], + styles: { + 'border-color': 'transparent', + 'background-color': 'currentColor', + }, + }, + { + base: [`[type='file']`], + class: null, + styles: { + background: 'unset', + 'border-color': 'inherit', + 'border-width': '0', + 'border-radius': '0', + padding: '0', + 'font-size': 'unset', + 'line-height': 'inherit', + }, + }, + { + base: [`[type='file']:focus`], + class: null, + styles: { + outline: [`1px solid ButtonText`, `1px auto -webkit-focus-ring-color`], + }, + }, + ] + + const getStrategyRules = (strategy) => + rules + .map((rule) => { + if (rule[strategy] === null) return null + + return { [rule[strategy]]: rule.styles } + }) + .filter(Boolean) + + if (strategy.includes('base')) { + addBase(getStrategyRules('base')) + } + + if (strategy.includes('class')) { + addComponents(getStrategyRules('class')) + } + } +}) + +module.exports = forms diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/tailwind.config.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/tailwind.config.js new file mode 100644 index 0000000000000000000000000000000000000000..5ef17d5d03dab82764b772fd69192a9d2be97e9d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/forms/tailwind.config.js @@ -0,0 +1,9 @@ +module.exports = { + content: ['./index.html', './kitchen-sink.html'], + theme: { + extend: { + // + }, + }, + plugins: [require('./src')], +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d6a82290738a9f78946cbcb4594535d6984086dd --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/README.md new file mode 100644 index 0000000000000000000000000000000000000000..95ec9d87ddcc59defeaed61b39cbb49869220c9f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/README.md @@ -0,0 +1,40 @@ +

+ + + + + Tailwind CSS + + +

+ +

+ A utility-first CSS framework for rapidly building custom user interfaces. +

+ +

+ Build Status + Total Downloads + Latest Release + License +

+ +--- + +## Documentation + +For full documentation, visit [tailwindcss.com](https://tailwindcss.com). + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions) + +For chatting with others using the framework: + +[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe) + +## Contributing + +If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/next/.github/CONTRIBUTING.md) **before submitting a pull request**. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/esm-cache.loader.d.mts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/esm-cache.loader.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..55f2bad3998c5f2eba64c46feb6a964140553f7b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/esm-cache.loader.d.mts @@ -0,0 +1,5 @@ +import { ResolveHook } from 'node:module'; + +declare let resolve: ResolveHook; + +export { resolve }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f9ae1082c016a72068fa3c800b8a4b075b11e36b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs @@ -0,0 +1 @@ +import{isBuiltin as i}from"module";var o=async(a,e,u)=>{let r=await u(a,e);if(r.url===import.meta.url||i(r.url)||!e.parentURL)return r;let t=new URL(e.parentURL).searchParams.get("id");if(t===null)return r;let l=new URL(r.url);return l.searchParams.set("id",t),{...r,url:`${l}`}};export{o as resolve}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.d.mts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..a41e0a91d97ed91e553b30d9df5abd5fbe2e63e4 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.d.mts @@ -0,0 +1,247 @@ +import { Candidate, Variant } from './candidate'; +import { compileAstNodes } from './compile'; +import { ClassEntry, VariantEntry } from './intellisense'; +import { Theme } from './theme'; +import { Utilities } from './utilities'; +import { Variants } from './variants'; +import * as tailwindcss from 'tailwindcss'; +import { Polyfills, Features } from 'tailwindcss'; +export { Features, Polyfills } from 'tailwindcss'; + +declare const DEBUG: boolean; + +declare const env_DEBUG: typeof DEBUG; +declare namespace env { + export { env_DEBUG as DEBUG }; +} + +type DesignSystem = { + theme: Theme; + utilities: Utilities; + variants: Variants; + invalidCandidates: Set; + important: boolean; + getClassOrder(classes: string[]): [string, bigint | null][]; + getClassList(): ClassEntry[]; + getVariants(): VariantEntry[]; + parseCandidate(candidate: string): Readonly[]; + parseVariant(variant: string): Readonly | null; + compileAstNodes(candidate: Candidate): ReturnType; + printCandidate(candidate: Candidate): string; + printVariant(variant: Variant): string; + getVariantOrder(): Map; + resolveThemeValue(path: string, forceInline?: boolean): string | undefined; + trackUsedVariables(raw: string): void; + candidatesToCss(classes: string[]): (string | null)[]; +}; + +/** + * Line offset tables are the key to generating our source maps. They allow us + * to store indexes with our AST nodes and later convert them into positions as + * when given the source that the indexes refer to. + */ +/** + * A position in source code + * + * https://tc39.es/ecma426/#sec-position-record-type + */ +interface Position { + /** The line number, one-based */ + line: number; + /** The column/character number, one-based */ + column: number; +} + +interface OriginalPosition extends Position { + source: DecodedSource; +} +/** + * A "decoded" sourcemap + * + * @see https://tc39.es/ecma426/#decoded-source-map-record + */ +interface DecodedSourceMap { + file: string | null; + sources: DecodedSource[]; + mappings: DecodedMapping[]; +} +/** + * A "decoded" source + * + * @see https://tc39.es/ecma426/#decoded-source-record + */ +interface DecodedSource { + url: string | null; + content: string | null; + ignore: boolean; +} +/** + * A "decoded" mapping + * + * @see https://tc39.es/ecma426/#decoded-mapping-record + */ +interface DecodedMapping { + originalPosition: OriginalPosition | null; + generatedPosition: Position; + name: string | null; +} + +/** + * The source code for one or more nodes in the AST + * + * This generally corresponds to a stylesheet + */ +interface Source { + /** + * The path to the file that contains the referenced source code + * + * If this references the *output* source code, this is `null`. + */ + file: string | null; + /** + * The referenced source code + */ + code: string; +} +/** + * The file and offsets within it that this node covers + * + * This can represent either: + * - A location in the original CSS which caused this node to be created + * - A location in the output CSS where this node resides + */ +type SourceLocation = [source: Source, start: number, end: number]; + +type StyleRule = { + kind: 'rule'; + selector: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type AtRule = { + kind: 'at-rule'; + name: string; + params: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Declaration = { + kind: 'declaration'; + property: string; + value: string | undefined; + important: boolean; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Comment = { + kind: 'comment'; + value: string; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Context = { + kind: 'context'; + context: Record; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type AtRoot = { + kind: 'at-root'; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot; + +type Resolver = (id: string, base: string) => Promise; +interface CompileOptions { + base: string; + from?: string; + onDependency: (path: string) => void; + shouldRewriteUrls?: boolean; + polyfills?: Polyfills; + customCssResolver?: Resolver; + customJsResolver?: Resolver; +} +declare function compileAst(ast: AstNode[], options: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: "none" | { + base: string; + pattern: string; + } | null; + features: Features; + build(candidates: string[]): AstNode[]; +}>; +declare function compile(css: string, options: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: "none" | { + base: string; + pattern: string; + } | null; + features: Features; + build(candidates: string[]): string; + buildSourceMap(): tailwindcss.DecodedSourceMap; +}>; +declare function __unstable__loadDesignSystem(css: string, { base }: { + base: string; +}): Promise; +declare function loadModule(id: string, base: string, onDependency: (path: string) => void, customJsResolver?: Resolver): Promise<{ + path: string; + base: string; + module: any; +}>; + +declare class Instrumentation implements Disposable { + #private; + private defaultFlush; + constructor(defaultFlush?: (message: string) => undefined); + hit(label: string): void; + start(label: string): void; + end(label: string): void; + reset(): void; + report(flush?: (message: string) => undefined): void; + [Symbol.dispose](): void; +} + +declare function normalizePath(originalPath: string): string; + +interface OptimizeOptions { + /** + * The file being transformed + */ + file?: string; + /** + * Enabled minified output + */ + minify?: boolean; + /** + * The output source map before optimization + * + * If omitted a resulting source map will not be available + */ + map?: string; +} +interface TransformResult { + code: string; + map: string | undefined; +} +declare function optimize(input: string, { file, minify, map }?: OptimizeOptions): TransformResult; + +interface SourceMap { + readonly raw: string; + readonly inline: string; +} +declare function toSourceMap(map: DecodedSourceMap | string): SourceMap; + +export { type CompileOptions, type DecodedSource, type DecodedSourceMap, Instrumentation, type OptimizeOptions, type Resolver, type SourceMap, type TransformResult, __unstable__loadDesignSystem, compile, compileAst, env, loadModule, normalizePath, optimize, toSourceMap }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a41e0a91d97ed91e553b30d9df5abd5fbe2e63e4 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.d.ts @@ -0,0 +1,247 @@ +import { Candidate, Variant } from './candidate'; +import { compileAstNodes } from './compile'; +import { ClassEntry, VariantEntry } from './intellisense'; +import { Theme } from './theme'; +import { Utilities } from './utilities'; +import { Variants } from './variants'; +import * as tailwindcss from 'tailwindcss'; +import { Polyfills, Features } from 'tailwindcss'; +export { Features, Polyfills } from 'tailwindcss'; + +declare const DEBUG: boolean; + +declare const env_DEBUG: typeof DEBUG; +declare namespace env { + export { env_DEBUG as DEBUG }; +} + +type DesignSystem = { + theme: Theme; + utilities: Utilities; + variants: Variants; + invalidCandidates: Set; + important: boolean; + getClassOrder(classes: string[]): [string, bigint | null][]; + getClassList(): ClassEntry[]; + getVariants(): VariantEntry[]; + parseCandidate(candidate: string): Readonly[]; + parseVariant(variant: string): Readonly | null; + compileAstNodes(candidate: Candidate): ReturnType; + printCandidate(candidate: Candidate): string; + printVariant(variant: Variant): string; + getVariantOrder(): Map; + resolveThemeValue(path: string, forceInline?: boolean): string | undefined; + trackUsedVariables(raw: string): void; + candidatesToCss(classes: string[]): (string | null)[]; +}; + +/** + * Line offset tables are the key to generating our source maps. They allow us + * to store indexes with our AST nodes and later convert them into positions as + * when given the source that the indexes refer to. + */ +/** + * A position in source code + * + * https://tc39.es/ecma426/#sec-position-record-type + */ +interface Position { + /** The line number, one-based */ + line: number; + /** The column/character number, one-based */ + column: number; +} + +interface OriginalPosition extends Position { + source: DecodedSource; +} +/** + * A "decoded" sourcemap + * + * @see https://tc39.es/ecma426/#decoded-source-map-record + */ +interface DecodedSourceMap { + file: string | null; + sources: DecodedSource[]; + mappings: DecodedMapping[]; +} +/** + * A "decoded" source + * + * @see https://tc39.es/ecma426/#decoded-source-record + */ +interface DecodedSource { + url: string | null; + content: string | null; + ignore: boolean; +} +/** + * A "decoded" mapping + * + * @see https://tc39.es/ecma426/#decoded-mapping-record + */ +interface DecodedMapping { + originalPosition: OriginalPosition | null; + generatedPosition: Position; + name: string | null; +} + +/** + * The source code for one or more nodes in the AST + * + * This generally corresponds to a stylesheet + */ +interface Source { + /** + * The path to the file that contains the referenced source code + * + * If this references the *output* source code, this is `null`. + */ + file: string | null; + /** + * The referenced source code + */ + code: string; +} +/** + * The file and offsets within it that this node covers + * + * This can represent either: + * - A location in the original CSS which caused this node to be created + * - A location in the output CSS where this node resides + */ +type SourceLocation = [source: Source, start: number, end: number]; + +type StyleRule = { + kind: 'rule'; + selector: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type AtRule = { + kind: 'at-rule'; + name: string; + params: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Declaration = { + kind: 'declaration'; + property: string; + value: string | undefined; + important: boolean; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Comment = { + kind: 'comment'; + value: string; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Context = { + kind: 'context'; + context: Record; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type AtRoot = { + kind: 'at-root'; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot; + +type Resolver = (id: string, base: string) => Promise; +interface CompileOptions { + base: string; + from?: string; + onDependency: (path: string) => void; + shouldRewriteUrls?: boolean; + polyfills?: Polyfills; + customCssResolver?: Resolver; + customJsResolver?: Resolver; +} +declare function compileAst(ast: AstNode[], options: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: "none" | { + base: string; + pattern: string; + } | null; + features: Features; + build(candidates: string[]): AstNode[]; +}>; +declare function compile(css: string, options: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: "none" | { + base: string; + pattern: string; + } | null; + features: Features; + build(candidates: string[]): string; + buildSourceMap(): tailwindcss.DecodedSourceMap; +}>; +declare function __unstable__loadDesignSystem(css: string, { base }: { + base: string; +}): Promise; +declare function loadModule(id: string, base: string, onDependency: (path: string) => void, customJsResolver?: Resolver): Promise<{ + path: string; + base: string; + module: any; +}>; + +declare class Instrumentation implements Disposable { + #private; + private defaultFlush; + constructor(defaultFlush?: (message: string) => undefined); + hit(label: string): void; + start(label: string): void; + end(label: string): void; + reset(): void; + report(flush?: (message: string) => undefined): void; + [Symbol.dispose](): void; +} + +declare function normalizePath(originalPath: string): string; + +interface OptimizeOptions { + /** + * The file being transformed + */ + file?: string; + /** + * Enabled minified output + */ + minify?: boolean; + /** + * The output source map before optimization + * + * If omitted a resulting source map will not be available + */ + map?: string; +} +interface TransformResult { + code: string; + map: string | undefined; +} +declare function optimize(input: string, { file, minify, map }?: OptimizeOptions): TransformResult; + +interface SourceMap { + readonly raw: string; + readonly inline: string; +} +declare function toSourceMap(map: DecodedSourceMap | string): SourceMap; + +export { type CompileOptions, type DecodedSource, type DecodedSourceMap, Instrumentation, type OptimizeOptions, type Resolver, type SourceMap, type TransformResult, __unstable__loadDesignSystem, compile, compileAst, env, loadModule, normalizePath, optimize, toSourceMap }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.js new file mode 100644 index 0000000000000000000000000000000000000000..8e40cfd7450be19b675362d7ad9131645972a88f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.js @@ -0,0 +1,16 @@ +"use strict";var Ct=Object.create;var Q=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var St=Object.getOwnPropertyNames;var Nt=Object.getPrototypeOf,Et=Object.prototype.hasOwnProperty;var Oe=(e,r)=>{for(var t in r)Q(e,t,{get:r[t],enumerable:!0})},_e=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of St(r))!Et.call(e,n)&&n!==t&&Q(e,n,{get:()=>r[n],enumerable:!(i=$t(r,n))||i.enumerable});return e};var x=(e,r,t)=>(t=e!=null?Ct(Nt(e)):{},_e(r||!e||!e.__esModule?Q(t,"default",{value:e,enumerable:!0}):t,e)),Vt=e=>_e(Q({},"__esModule",{value:!0}),e);var Br={};Oe(Br,{Features:()=>V.Features,Instrumentation:()=>Pe,Polyfills:()=>V.Polyfills,__unstable__loadDesignSystem:()=>Ur,compile:()=>Dr,compileAst:()=>_r,env:()=>X,loadModule:()=>Te,normalizePath:()=>ue,optimize:()=>jr,toSourceMap:()=>Wr});module.exports=Vt(Br);var xt=x(require("module")),At=require("url");var X={};Oe(X,{DEBUG:()=>pe});var pe=Tt(process.env.DEBUG);function Tt(e){if(e===void 0)return!1;if(e==="true"||e==="1")return!0;if(e==="false"||e==="0")return!1;if(e==="*")return!0;let r=e.split(",").map(t=>t.split(":")[0]);return r.includes("-tailwindcss")?!1:!!r.includes("tailwindcss")}var L=x(require("enhanced-resolve")),mt=require("jiti"),ce=x(require("fs")),Ve=x(require("fs/promises")),M=x(require("path")),Ne=require("url"),V=require("tailwindcss");var ee=x(require("fs/promises")),F=x(require("path")),Rt=[/import[\s\S]*?['"](.{3,}?)['"]/gi,/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/require\(['"`](.+)['"`]\)/gi],Pt=[".js",".cjs",".mjs"],Ot=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],_t=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];async function Dt(e,r){for(let t of r){let i=`${e}${t}`;if((await ee.default.stat(i).catch(()=>null))?.isFile())return i}for(let t of r){let i=`${e}/index${t}`;if(await ee.default.access(i).then(()=>!0,()=>!1))return i}return null}async function De(e,r,t,i){let n=Pt.includes(i)?Ot:_t,l=await Dt(F.default.resolve(t,r),n);if(l===null||e.has(l))return;e.add(l),t=F.default.dirname(l),i=F.default.extname(l);let o=await ee.default.readFile(l,"utf-8"),s=[];for(let a of Rt)for(let u of o.matchAll(a))u[1].startsWith(".")&&s.push(De(e,u[1],t,i));await Promise.all(s)}async function Ue(e){let r=new Set;return await De(r,e,F.default.dirname(e),F.default.extname(e)),Array.from(r)}var $e=x(require("path"));function de(e){return{kind:"word",value:e}}function Ut(e,r){return{kind:"function",value:e,nodes:r}}function Kt(e){return{kind:"separator",value:e}}function T(e,r,t=null){for(let i=0;i0){let c=de(n);i?i.nodes.push(c):r.push(c),n=""}let a=o,u=o+1;for(;u0){let u=de(n);a?.nodes.push(u),n=""}t.length>0?i=t[t.length-1]:i=null;break}default:n+=String.fromCharCode(s)}}return n.length>0&&r.push(de(n)),r}var g=class extends Map{constructor(t){super();this.factory=t}get(t){let i=super.get(t);return i===void 0&&(i=this.factory(t,this),this.set(t,i)),i}};var Xr=new Uint8Array(256);var te=new Uint8Array(256);function k(e,r){let t=0,i=[],n=0,l=e.length,o=r.charCodeAt(0);for(let s=0;s0&&a===te[t-1]&&t--;break}}return i.push(e.slice(n)),i}var si=new g(e=>{let r=A(e),t=new Set;return T(r,(i,{parent:n})=>{let l=n===null?r:n.nodes??[];if(i.kind==="word"&&(i.value==="+"||i.value==="-"||i.value==="*"||i.value==="/")){let o=l.indexOf(i)??-1;if(o===-1)return;let s=l[o-1];if(s?.kind!=="separator"||s.value!==" ")return;let a=l[o+1];if(a?.kind!=="separator"||a.value!==" ")return;t.add(s),t.add(a)}else i.kind==="separator"&&i.value.trim()==="/"?i.value="/":i.kind==="separator"&&i.value.length>0&&i.value.trim()===""?(l[0]===i||l[l.length-1]===i)&&t.add(i):i.kind==="separator"&&i.value.trim()===","&&(i.value=",")}),t.size>0&&T(r,(i,{replaceWith:n})=>{t.has(i)&&(t.delete(i),n([]))}),me(r),E(r)});var ui=new g(e=>{let r=A(e);return r.length===3&&r[0].kind==="word"&&r[0].value==="&"&&r[1].kind==="separator"&&r[1].value===":"&&r[2].kind==="function"&&r[2].value==="is"?E(r[2].nodes):e});function me(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=B(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=B(r.value);for(let t=0;t{let r=A(e);return r.length===1&&r[0].kind==="function"&&r[0].value==="var"});function jt(e){throw new Error(`Unexpected value: ${e}`)}function B(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var R=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,ki=new RegExp(`^${R.source}$`);var yi=new RegExp(`^${R.source}%$`);var bi=new RegExp(`^${R.source}s*/s*${R.source}$`);var Mt=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],xi=new RegExp(`^${R.source}(${Mt.join("|")})$`);var Wt=["deg","rad","grad","turn"],Ai=new RegExp(`^${R.source}(${Wt.join("|")})$`);var Ci=new RegExp(`^${R.source} +${R.source} +${R.source}$`);function b(e){let r=Number(e);return Number.isInteger(r)&&r>=0&&String(r)===String(e)}function H(e,r){if(r===null)return e;let t=Number(r);return Number.isNaN(t)||(r=`${t*100}%`),r==="100%"?e:`color-mix(in oklab, ${e} ${r}, transparent)`}var Gt={"--alpha":qt,"--spacing":Jt,"--theme":Yt,theme:Zt};function qt(e,r,t,...i){let[n,l]=k(t,"/").map(o=>o.trim());if(!n||!l)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${l||"50%"})\``);if(i.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${l||"50%"})\``);return H(n,l)}function Jt(e,r,t,...i){if(!t)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(i.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${i.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${t})`}function Yt(e,r,t,...i){if(!t.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;t.endsWith(" inline")&&(n=!0,t=t.slice(0,-7)),r.kind==="at-rule"&&(n=!0);let l=e.resolveThemeValue(t,n);if(!l){if(i.length>0)return i.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${t})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(i.length===0)return l;let o=i.join(", ");if(o==="initial")return l;if(l==="initial")return o;if(l.startsWith("var(")||l.startsWith("theme(")||l.startsWith("--theme(")){let s=A(l);return Xt(s,o),E(s)}return l}function Zt(e,r,t,...i){t=Qt(t);let n=e.resolveThemeValue(t);if(!n&&i.length>0)return i.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${t})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var Mi=new RegExp(Object.keys(Gt).map(e=>`${e}\\(`).join("|"));function Qt(e){if(e[0]!=="'"&&e[0]!=='"')return e;let r="",t=e[0];for(let i=1;i{if(t.kind==="function"&&!(t.value!=="var"&&t.value!=="theme"&&t.value!=="--theme"))if(t.nodes.length===1)t.nodes.push({kind:"word",value:`, ${r}`});else{let i=t.nodes[t.nodes.length-1];i.kind==="word"&&i.value==="initial"&&(i.value=r)}})}var q=92,ie=47,ne=42,Ze=34,Qe=39,or=58,le=59,$=10,ae=13,J=32,oe=9,Xe=123,we=125,be=40,et=41,lr=91,ar=93,tt=45,ke=64,sr=33;function Z(e,r){let t=r?.from?{file:r.from,code:e}:null;e[0]==="\uFEFF"&&(e=" "+e.slice(1));let i=[],n=[],l=[],o=null,s=null,a="",u="",p=0,c;for(let f=0;f0&&e[v]===d[d.length-1]&&(d=d.slice(0,-1));let W=ye(a,h);if(!W)throw new Error("Invalid custom property, expected a value");t&&(W.src=[t,N,f],W.dst=[t,N,f]),o?o.nodes.push(W):i.push(W),a=""}else if(m===le&&a.charCodeAt(0)===ke)s=Y(a),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o?o.nodes.push(s):i.push(s),a="",s=null;else if(m===le&&u[u.length-1]!==")"){let d=ye(a);if(!d)throw a.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${a.trim()}\``);t&&(d.src=[t,p,f],d.dst=[t,p,f]),o?o.nodes.push(d):i.push(d),a=""}else if(m===Xe&&u[u.length-1]!==")")u+="}",s=O(a.trim()),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o&&o.nodes.push(s),l.push(o),o=s,a="",s=null;else if(m===we&&u[u.length-1]!==")"){if(u==="")throw new Error("Missing opening {");if(u=u.slice(0,-1),a.length>0)if(a.charCodeAt(0)===ke)s=Y(a),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o?o.nodes.push(s):i.push(s),a="",s=null;else{let N=a.indexOf(":");if(o){let h=ye(a,N);if(!h)throw new Error(`Invalid declaration: \`${a.trim()}\``);t&&(h.src=[t,p,f],h.dst=[t,p,f]),o.nodes.push(h)}}let d=l.pop()??null;d===null&&o&&i.push(o),o=d,a="",s=null}else if(m===be)u+=")",a+="(";else if(m===et){if(u[u.length-1]!==")")throw new Error("Missing opening (");u=u.slice(0,-1),a+=")"}else{if(a.length===0&&(m===J||m===$||m===oe))continue;a===""&&(p=f),a+=String.fromCharCode(m)}}}if(a.charCodeAt(0)===ke){let f=Y(a);t&&(f.src=[t,p,e.length],f.dst=[t,p,e.length]),i.push(f)}if(u.length>0&&o){if(o.kind==="rule")throw new Error(`Missing closing } at ${o.selector}`);if(o.kind==="at-rule")throw new Error(`Missing closing } at ${o.name} ${o.params}`)}return n.length>0?n.concat(i):i}function Y(e,r=[]){let t=e,i="";for(let n=5;n{if(b(e.value))return e.value}),w=K(e=>{if(b(e.value))return`${e.value}%`}),_=K(e=>{if(b(e.value))return`${e.value}px`}),nt=K(e=>{if(b(e.value))return`${e.value}ms`}),se=K(e=>{if(b(e.value))return`${e.value}deg`}),hr=K(e=>{if(e.fraction===null)return;let[r,t]=k(e.fraction,"/");if(!(!b(r)||!b(t)))return e.fraction}),ot=K(e=>{if(b(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),vr={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...hr},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...w}),backdropContrast:({theme:e})=>({...e("contrast"),...w}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...w}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...se}),backdropInvert:({theme:e})=>({...e("invert"),...w}),backdropOpacity:({theme:e})=>({...e("opacity"),...w}),backdropSaturate:({theme:e})=>({...e("saturate"),...w}),backdropSepia:({theme:e})=>({...e("sepia"),...w}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",..._},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...w},caretColor:({theme:e})=>e("colors"),colors:()=>({...Ce}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...S},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...w},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),..._}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...S},flexShrink:{0:"0",DEFAULT:"1",...S},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...w},grayscale:{0:"0",DEFAULT:"100%",...w},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...S},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...S},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...S},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...S},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ot},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ot},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...se},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...w},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...S},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...w},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...S},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...se},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...w},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...w},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...w},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...se},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...S},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...nt},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...nt},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...S}};var wr=64;function z(e,r=[]){return{kind:"rule",selector:e,nodes:r}}function C(e,r="",t=[]){return{kind:"at-rule",name:e,params:r,nodes:t}}function O(e,r=[]){return e.charCodeAt(0)===wr?Y(e,r):z(e,r)}function P(e,r,t=!1){return{kind:"declaration",property:e,value:r,important:t}}function Ae(e){return{kind:"comment",value:e}}function y(e,r,t=[],i={}){for(let n=0;n4&&e[3]==="\\"){var n=e[2];(n==="?"||n===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),i="//")}var l=e.split(/[/\\]+/);return r!==!1&&l[l.length-1]===""&&l.pop(),i+l.join("/")}function ue(e){let r=kr(e);return e.startsWith("\\\\")&&r.startsWith("/")&&!r.startsWith("//")?`/${r}`:r}var Se=/(?[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?\w[^,]+))?(?:,|$)/g,$r=/(?br.test(e),Er=e=>xr.test(e);async function at({css:e,base:r,root:t}){if(!e.includes("url(")&&!e.includes("image-set("))return e;let i=Z(e),n=[];function l(o){if(o[0]==="/")return o;let s=$e.posix.join(ue(r),o),a=$e.posix.relative(ue(t),s);return a.startsWith(".")||(a="./"+a),a}return y(i,o=>{if(o.kind!=="declaration"||!o.value)return;let s=Se.test(o.value),a=lt.test(o.value);if(s||a){let u=a?Vr:st;n.push(u(o.value,l).then(p=>{o.value=p}))}}),n.length&&await Promise.all(n),j(i)}function st(e,r){return ct(e,Se,async t=>{let[i,n]=t;return await ut(n.trim(),i,r)})}async function Vr(e,r){return await ct(e,lt,async t=>{let[,i]=t;return await Rr(i,async({url:l})=>Se.test(l)?await st(l,r):yr.test(l)?l:await ut(l,l,r))})}async function ut(e,r,t,i="url"){let n="",l=e[0];if((l==='"'||l==="'")&&(n=l,e=e.slice(1,-1)),Tr(e))return r;let o=await t(e);return n===""&&o!==encodeURI(o)&&(n='"'),n==="'"&&o.includes("'")&&(n='"'),n==='"'&&o.includes('"')&&(o=o.replace($r,'\\"')),`${i}(${n}${o}${n})`}function Tr(e,r){return Er(e)||Nr(e)||!e[0].match(/[\.a-zA-Z0-9_]/)||Ar.test(e)}function Rr(e,r){return Promise.all(Pr(e).map(async({url:t,descriptor:i})=>({url:await r({url:t,descriptor:i}),descriptor:i}))).then(Or)}function Pr(e){let r=e.trim().replace(Sr," ").replace(/\r?\n/,"").replace(/,\s+/,", ").replaceAll(/\s+/g," ").matchAll(Cr);return Array.from(r,({groups:t})=>({url:t?.url?.trim()??"",descriptor:t?.descriptor?.trim()??""})).filter(({url:t})=>!!t)}function Or(e){return e.map(({url:r,descriptor:t})=>r+(t?` ${t}`:"")).join(", ")}async function ct(e,r,t){let i,n=e,l="";for(;i=r.exec(n);)l+=n.slice(0,i.index),l+=await t(i),n=n.slice(i.index+i[0].length);return l+=n,l}var zr={};function gt({base:e,from:r,polyfills:t,onDependency:i,shouldRewriteUrls:n,customCssResolver:l,customJsResolver:o}){return{base:e,polyfills:t,from:r,async loadModule(s,a){return Te(s,a,i,o)},async loadStylesheet(s,a){let u=await vt(s,a,i,l);return n&&(u.content=await at({css:u.content,root:e,base:u.base})),u}}}async function ht(e,r){if(e.root&&e.root!=="none"){let t=/[*{]/,i=[];for(let l of e.root.pattern.split("/")){if(t.test(l))break;i.push(l)}if(!await Ve.default.stat(M.default.resolve(r,i.join("/"))).then(l=>l.isDirectory()).catch(()=>!1))throw new Error(`The \`source(${e.root.pattern})\` does not exist`)}}async function _r(e,r){let t=await(0,V.compileAst)(e,gt(r));return await ht(t,r.base),t}async function Dr(e,r){let t=await(0,V.compile)(e,gt(r));return await ht(t,r.base),t}async function Ur(e,{base:r}){return(0,V.__unstable__loadDesignSystem)(e,{base:r,async loadModule(t,i){return Te(t,i,()=>{})},async loadStylesheet(t,i){return vt(t,i,()=>{})}})}async function Te(e,r,t,i){if(e[0]!=="."){let s=await dt(e,r,i);if(!s)throw new Error(`Could not resolve '${e}' from '${r}'`);let a=await pt((0,Ne.pathToFileURL)(s).href);return{path:s,base:M.default.dirname(s),module:a.default??a}}let n=await dt(e,r,i);if(!n)throw new Error(`Could not resolve '${e}' from '${r}'`);let[l,o]=await Promise.all([pt((0,Ne.pathToFileURL)(n).href+"?id="+Date.now()),Ue(n)]);for(let s of o)t(s);return{path:n,base:M.default.dirname(n),module:l.default??l}}async function vt(e,r,t,i){let n=await Lr(e,r,i);if(!n)throw new Error(`Could not resolve '${e}' from '${r}'`);if(t(n),typeof globalThis.__tw_readFile=="function"){let o=await globalThis.__tw_readFile(n,"utf-8");if(o)return{path:n,base:M.default.dirname(n),content:o}}let l=await Ve.default.readFile(n,"utf-8");return{path:n,base:M.default.dirname(n),content:l}}var ft=null;async function pt(e){if(typeof globalThis.__tw_load=="function"){let r=await globalThis.__tw_load(e);if(r)return r}try{return await import(e)}catch{return ft??=(0,mt.createJiti)(zr.url,{moduleCache:!1,fsCache:!1}),await ft.import(e)}}var Re=["node_modules",...process.env.NODE_PATH?[process.env.NODE_PATH]:[]],Kr=L.default.ResolverFactory.createResolver({fileSystem:new L.default.CachedInputFileSystem(ce.default,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"],modules:Re});async function Lr(e,r,t){if(typeof globalThis.__tw_resolve=="function"){let i=globalThis.__tw_resolve(e,r);if(i)return Promise.resolve(i)}if(t){let i=await t(e,r);if(i)return i}return Ee(Kr,e,r)}var Ir=L.default.ResolverFactory.createResolver({fileSystem:new L.default.CachedInputFileSystem(ce.default,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","import"],modules:Re}),Fr=L.default.ResolverFactory.createResolver({fileSystem:new L.default.CachedInputFileSystem(ce.default,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","require"],modules:Re});async function dt(e,r,t){if(typeof globalThis.__tw_resolve=="function"){let i=globalThis.__tw_resolve(e,r);if(i)return Promise.resolve(i)}if(t){let i=await t(e,r);if(i)return i}return Ee(Ir,e,r).catch(()=>Ee(Fr,e,r))}function Ee(e,r,t){return new Promise((i,n)=>e.resolve({},t,r,{},(l,o)=>{if(l)return n(l);i(o)}))}Symbol.dispose??=Symbol("Symbol.dispose");Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");var Pe=class{constructor(r=t=>void process.stderr.write(`${t} +`)){this.defaultFlush=r}#r=new g(()=>({value:0}));#t=new g(()=>({value:0n}));#e=[];hit(r){this.#r.get(r).value++}start(r){let t=this.#e.map(n=>n.label).join("//"),i=`${t}${t.length===0?"":"//"}${r}`;this.#r.get(i).value++,this.#t.get(i),this.#e.push({id:i,label:r,namespace:t,value:process.hrtime.bigint()})}end(r){let t=process.hrtime.bigint();if(this.#e[this.#e.length-1].label!==r)throw new Error(`Mismatched timer label: \`${r}\`, expected \`${this.#e[this.#e.length-1].label}\``);let i=this.#e.pop(),n=t-i.value;this.#t.get(i.id).value+=n}reset(){this.#r.clear(),this.#t.clear(),this.#e.splice(0)}report(r=this.defaultFlush){let t=[],i=!1;for(let o=this.#e.length-1;o>=0;o--)this.end(this.#e[o].label);for(let[o,{value:s}]of this.#r.entries()){if(this.#t.has(o))continue;t.length===0&&(i=!0,t.push("Hits:"));let a=o.split("//").length;t.push(`${" ".repeat(a)}${o} ${fe(wt(`\xD7 ${s}`))}`)}this.#t.size>0&&i&&t.push(` +Timers:`);let n=-1/0,l=new Map;for(let[o,{value:s}]of this.#t){let a=`${(Number(s)/1e6).toFixed(2)}ms`;l.set(o,a),n=Math.max(n,a.length)}for(let o of this.#t.keys()){let s=o.split("//").length;t.push(`${fe(`[${l.get(o).padStart(n," ")}]`)}${" ".repeat(s-1)}${s===1?" ":fe(" \u21B3 ")}${o.split("//").pop()} ${this.#r.get(o).value===1?"":fe(wt(`\xD7 ${this.#r.get(o).value}`))}`.trimEnd())}r(` +${t.join(` +`)} +`),this.reset()}[Symbol.dispose](){pe&&this.report()}};function fe(e){return`\x1B[2m${e}\x1B[22m`}function wt(e){return`\x1B[34m${e}\x1B[39m`}var kt=x(require("@ampproject/remapping")),D=require("lightningcss"),yt=x(require("magic-string"));function jr(e,{file:r="input.css",minify:t=!1,map:i}={}){function n(a,u){return(0,D.transform)({filename:r,code:a,minify:t,sourceMap:typeof u<"u",inputSourceMap:u,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:D.Features.Nesting|D.Features.MediaQueries,exclude:D.Features.LogicalProperties|D.Features.DirSelector|D.Features.LightDark,targets:{safari:16<<16|1024,ios_saf:16<<16|1024,firefox:8388608,chrome:7274496},errorRecovery:!0})}let l=n(Buffer.from(e),i);i=l.map?.toString(),l=n(l.code,i),i=l.map?.toString();let o=l.code.toString(),s=new yt.default(o);if(s.replaceAll("@media not (","@media not all and ("),i!==void 0&&s.hasChanged()){let a=s.generateMap({source:"original",hires:"boundary"}).toString();i=(0,kt.default)([a,i],()=>null).toString()}return o=s.toString(),{code:o,map:i}}var bt=require("source-map-js");function Mr(e){let r=new bt.SourceMapGenerator,t=1,i=new g(n=>({url:n?.url??``,content:n?.content??""}));for(let n of e.mappings){let l=i.get(n.originalPosition?.source??null);r.addMapping({generated:n.generatedPosition,original:n.originalPosition,source:l.url,name:n.name}),r.setSourceContent(l.url,l.content)}return r.toString()}function Wr(e){let r=typeof e=="string"?e:Mr(e);return{raw:r,get inline(){let t="";return t+="/*# sourceMappingURL=data:application/json;base64,",t+=Buffer.from(r,"utf-8").toString("base64"),t+=` */ +`,t}}}process.versions.bun||xt.register?.((0,At.pathToFileURL)(require.resolve("@tailwindcss/node/esm-cache-loader")));0&&(module.exports={Features,Instrumentation,Polyfills,__unstable__loadDesignSystem,compile,compileAst,env,loadModule,normalizePath,optimize,toSourceMap}); diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.mjs new file mode 100644 index 0000000000000000000000000000000000000000..5af6f351a9f4c421afbb80a23826bf70467b3139 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/index.mjs @@ -0,0 +1,16 @@ +var mt=Object.defineProperty;var gt=(e,r)=>{for(var t in r)mt(e,t,{get:r[t],enumerable:!0})};import*as oe from"module";import{pathToFileURL as Or}from"url";var ae={};gt(ae,{DEBUG:()=>le});var le=ht(process.env.DEBUG);function ht(e){if(e===void 0)return!1;if(e==="true"||e==="1")return!0;if(e==="false"||e==="0")return!1;if(e==="*")return!0;let r=e.split(",").map(t=>t.split(":")[0]);return r.includes("-tailwindcss")?!1:!!r.includes("tailwindcss")}import L from"enhanced-resolve";import{createJiti as yr}from"jiti";import $e from"fs";import at from"fs/promises";import G from"path";import{pathToFileURL as it}from"url";import{__unstable__loadDesignSystem as br,compile as xr,compileAst as Ar,Features as ya,Polyfills as ba}from"tailwindcss";import se from"fs/promises";import F from"path";var vt=[/import[\s\S]*?['"](.{3,}?)['"]/gi,/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/require\(['"`](.+)['"`]\)/gi],wt=[".js",".cjs",".mjs"],kt=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],yt=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];async function bt(e,r){for(let t of r){let i=`${e}${t}`;if((await se.stat(i).catch(()=>null))?.isFile())return i}for(let t of r){let i=`${e}/index${t}`;if(await se.access(i).then(()=>!0,()=>!1))return i}return null}async function Ne(e,r,t,i){let n=wt.includes(i)?kt:yt,l=await bt(F.resolve(t,r),n);if(l===null||e.has(l))return;e.add(l),t=F.dirname(l),i=F.extname(l);let o=await se.readFile(l,"utf-8"),s=[];for(let a of vt)for(let u of o.matchAll(a))u[1].startsWith(".")&&s.push(Ne(e,u[1],t,i));await Promise.all(s)}async function Ee(e){let r=new Set;return await Ne(r,e,F.dirname(e),F.extname(e)),Array.from(r)}import*as xe from"path";function ue(e){return{kind:"word",value:e}}function xt(e,r){return{kind:"function",value:e,nodes:r}}function At(e){return{kind:"separator",value:e}}function E(e,r,t=null){for(let i=0;i0){let c=ue(n);i?i.nodes.push(c):r.push(c),n=""}let a=o,u=o+1;for(;u0){let u=ue(n);a?.nodes.push(u),n=""}t.length>0?i=t[t.length-1]:i=null;break}default:n+=String.fromCharCode(s)}}return n.length>0&&r.push(ue(n)),r}var g=class extends Map{constructor(t){super();this.factory=t}get(t){let i=super.get(t);return i===void 0&&(i=this.factory(t,this),this.set(t,i)),i}};var Mr=new Uint8Array(256);var Y=new Uint8Array(256);function k(e,r){let t=0,i=[],n=0,l=e.length,o=r.charCodeAt(0);for(let s=0;s0&&a===Y[t-1]&&t--;break}}return i.push(e.slice(n)),i}var Qr=new g(e=>{let r=x(e),t=new Set;return E(r,(i,{parent:n})=>{let l=n===null?r:n.nodes??[];if(i.kind==="word"&&(i.value==="+"||i.value==="-"||i.value==="*"||i.value==="/")){let o=l.indexOf(i)??-1;if(o===-1)return;let s=l[o-1];if(s?.kind!=="separator"||s.value!==" ")return;let a=l[o+1];if(a?.kind!=="separator"||a.value!==" ")return;t.add(s),t.add(a)}else i.kind==="separator"&&i.value.trim()==="/"?i.value="/":i.kind==="separator"&&i.value.length>0&&i.value.trim()===""?(l[0]===i||l[l.length-1]===i)&&t.add(i):i.kind==="separator"&&i.value.trim()===","&&(i.value=",")}),t.size>0&&E(r,(i,{replaceWith:n})=>{t.has(i)&&(t.delete(i),n([]))}),ce(r),N(r)});var Xr=new g(e=>{let r=x(e);return r.length===3&&r[0].kind==="word"&&r[0].value==="&"&&r[1].kind==="separator"&&r[1].value===":"&&r[2].kind==="function"&&r[2].value==="is"?N(r[2].nodes):e});function ce(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=z(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=z(r.value);for(let t=0;t{let r=x(e);return r.length===1&&r[0].kind==="function"&&r[0].value==="var"});function Et(e){throw new Error(`Unexpected value: ${e}`)}function z(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var V=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,ui=new RegExp(`^${V.source}$`);var ci=new RegExp(`^${V.source}%$`);var fi=new RegExp(`^${V.source}s*/s*${V.source}$`);var Vt=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],pi=new RegExp(`^${V.source}(${Vt.join("|")})$`);var Tt=["deg","rad","grad","turn"],di=new RegExp(`^${V.source}(${Tt.join("|")})$`);var mi=new RegExp(`^${V.source} +${V.source} +${V.source}$`);function b(e){let r=Number(e);return Number.isInteger(r)&&r>=0&&String(r)===String(e)}function j(e,r){if(r===null)return e;let t=Number(r);return Number.isNaN(t)||(r=`${t*100}%`),r==="100%"?e:`color-mix(in oklab, ${e} ${r}, transparent)`}var Ot={"--alpha":_t,"--spacing":Dt,"--theme":Ut,theme:Kt};function _t(e,r,t,...i){let[n,l]=k(t,"/").map(o=>o.trim());if(!n||!l)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${l||"50%"})\``);if(i.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${l||"50%"})\``);return j(n,l)}function Dt(e,r,t,...i){if(!t)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(i.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${i.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${t})`}function Ut(e,r,t,...i){if(!t.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;t.endsWith(" inline")&&(n=!0,t=t.slice(0,-7)),r.kind==="at-rule"&&(n=!0);let l=e.resolveThemeValue(t,n);if(!l){if(i.length>0)return i.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${t})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(i.length===0)return l;let o=i.join(", ");if(o==="initial")return l;if(l==="initial")return o;if(l.startsWith("var(")||l.startsWith("theme(")||l.startsWith("--theme(")){let s=x(l);return It(s,o),N(s)}return l}function Kt(e,r,t,...i){t=Lt(t);let n=e.resolveThemeValue(t);if(!n&&i.length>0)return i.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${t})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var Oi=new RegExp(Object.keys(Ot).map(e=>`${e}\\(`).join("|"));function Lt(e){if(e[0]!=="'"&&e[0]!=='"')return e;let r="",t=e[0];for(let i=1;i{if(t.kind==="function"&&!(t.value!=="var"&&t.value!=="theme"&&t.value!=="--theme"))if(t.nodes.length===1)t.nodes.push({kind:"word",value:`, ${r}`});else{let i=t.nodes[t.nodes.length-1];i.kind==="word"&&i.value==="initial"&&(i.value=r)}})}var W=92,Q=47,X=42,Me=34,We=39,Bt=58,te=59,C=10,re=13,B=32,ee=9,Be=123,me=125,ve=40,He=41,Ht=91,qt=93,qe=45,ge=64,Gt=33;function q(e,r){let t=r?.from?{file:r.from,code:e}:null;e[0]==="\uFEFF"&&(e=" "+e.slice(1));let i=[],n=[],l=[],o=null,s=null,a="",u="",p=0,c;for(let f=0;f0&&e[v]===d[d.length-1]&&(d=d.slice(0,-1));let I=he(a,h);if(!I)throw new Error("Invalid custom property, expected a value");t&&(I.src=[t,S,f],I.dst=[t,S,f]),o?o.nodes.push(I):i.push(I),a=""}else if(m===te&&a.charCodeAt(0)===ge)s=H(a),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o?o.nodes.push(s):i.push(s),a="",s=null;else if(m===te&&u[u.length-1]!==")"){let d=he(a);if(!d)throw a.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${a.trim()}\``);t&&(d.src=[t,p,f],d.dst=[t,p,f]),o?o.nodes.push(d):i.push(d),a=""}else if(m===Be&&u[u.length-1]!==")")u+="}",s=R(a.trim()),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o&&o.nodes.push(s),l.push(o),o=s,a="",s=null;else if(m===me&&u[u.length-1]!==")"){if(u==="")throw new Error("Missing opening {");if(u=u.slice(0,-1),a.length>0)if(a.charCodeAt(0)===ge)s=H(a),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o?o.nodes.push(s):i.push(s),a="",s=null;else{let S=a.indexOf(":");if(o){let h=he(a,S);if(!h)throw new Error(`Invalid declaration: \`${a.trim()}\``);t&&(h.src=[t,p,f],h.dst=[t,p,f]),o.nodes.push(h)}}let d=l.pop()??null;d===null&&o&&i.push(o),o=d,a="",s=null}else if(m===ve)u+=")",a+="(";else if(m===He){if(u[u.length-1]!==")")throw new Error("Missing opening (");u=u.slice(0,-1),a+=")"}else{if(a.length===0&&(m===B||m===C||m===ee))continue;a===""&&(p=f),a+=String.fromCharCode(m)}}}if(a.charCodeAt(0)===ge){let f=H(a);t&&(f.src=[t,p,e.length],f.dst=[t,p,e.length]),i.push(f)}if(u.length>0&&o){if(o.kind==="rule")throw new Error(`Missing closing } at ${o.selector}`);if(o.kind==="at-rule")throw new Error(`Missing closing } at ${o.name} ${o.params}`)}return n.length>0?n.concat(i):i}function H(e,r=[]){let t=e,i="";for(let n=5;n{if(b(e.value))return e.value}),w=_(e=>{if(b(e.value))return`${e.value}%`}),P=_(e=>{if(b(e.value))return`${e.value}px`}),Ye=_(e=>{if(b(e.value))return`${e.value}ms`}),ie=_(e=>{if(b(e.value))return`${e.value}deg`}),rr=_(e=>{if(e.fraction===null)return;let[r,t]=k(e.fraction,"/");if(!(!b(r)||!b(t)))return e.fraction}),Ze=_(e=>{if(b(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),ir={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...rr},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...w}),backdropContrast:({theme:e})=>({...e("contrast"),...w}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...w}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...ie}),backdropInvert:({theme:e})=>({...e("invert"),...w}),backdropOpacity:({theme:e})=>({...e("opacity"),...w}),backdropSaturate:({theme:e})=>({...e("saturate"),...w}),backdropSepia:({theme:e})=>({...e("sepia"),...w}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...P},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...w},caretColor:({theme:e})=>e("colors"),colors:()=>({...ye}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...$},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...w},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...P}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...$},flexShrink:{0:"0",DEFAULT:"1",...$},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...w},grayscale:{0:"0",DEFAULT:"100%",...w},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...$},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...$},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...$},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...$},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...Ze},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...Ze},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...ie},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...w},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...$},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...w},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...$},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...ie},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...w},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...w},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...w},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...ie},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...$},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...Ye},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...Ye},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...$}};var nr=64;function U(e,r=[]){return{kind:"rule",selector:e,nodes:r}}function A(e,r="",t=[]){return{kind:"at-rule",name:e,params:r,nodes:t}}function R(e,r=[]){return e.charCodeAt(0)===nr?H(e,r):U(e,r)}function T(e,r,t=!1){return{kind:"declaration",property:e,value:r,important:t}}function ke(e){return{kind:"comment",value:e}}function y(e,r,t=[],i={}){for(let n=0;n4&&e[3]==="\\"){var n=e[2];(n==="?"||n===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),i="//")}var l=e.split(/[/\\]+/);return r!==!1&&l[l.length-1]===""&&l.pop(),i+l.join("/")}function be(e){let r=or(e);return e.startsWith("\\\\")&&r.startsWith("/")&&!r.startsWith("//")?`/${r}`:r}var Ae=/(?[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?\w[^,]+))?(?:,|$)/g,fr=/(?ar.test(e),mr=e=>sr.test(e);async function Xe({css:e,base:r,root:t}){if(!e.includes("url(")&&!e.includes("image-set("))return e;let i=q(e),n=[];function l(o){if(o[0]==="/")return o;let s=xe.posix.join(be(r),o),a=xe.posix.relative(be(t),s);return a.startsWith(".")||(a="./"+a),a}return y(i,o=>{if(o.kind!=="declaration"||!o.value)return;let s=Ae.test(o.value),a=Qe.test(o.value);if(s||a){let u=a?gr:et;n.push(u(o.value,l).then(p=>{o.value=p}))}}),n.length&&await Promise.all(n),K(i)}function et(e,r){return rt(e,Ae,async t=>{let[i,n]=t;return await tt(n.trim(),i,r)})}async function gr(e,r){return await rt(e,Qe,async t=>{let[,i]=t;return await vr(i,async({url:l})=>Ae.test(l)?await et(l,r):lr.test(l)?l:await tt(l,l,r))})}async function tt(e,r,t,i="url"){let n="",l=e[0];if((l==='"'||l==="'")&&(n=l,e=e.slice(1,-1)),hr(e))return r;let o=await t(e);return n===""&&o!==encodeURI(o)&&(n='"'),n==="'"&&o.includes("'")&&(n='"'),n==='"'&&o.includes('"')&&(o=o.replace(fr,'\\"')),`${i}(${n}${o}${n})`}function hr(e,r){return mr(e)||dr(e)||!e[0].match(/[\.a-zA-Z0-9_]/)||ur.test(e)}function vr(e,r){return Promise.all(wr(e).map(async({url:t,descriptor:i})=>({url:await r({url:t,descriptor:i}),descriptor:i}))).then(kr)}function wr(e){let r=e.trim().replace(pr," ").replace(/\r?\n/,"").replace(/,\s+/,", ").replaceAll(/\s+/g," ").matchAll(cr);return Array.from(r,({groups:t})=>({url:t?.url?.trim()??"",descriptor:t?.descriptor?.trim()??""})).filter(({url:t})=>!!t)}function kr(e){return e.map(({url:r,descriptor:t})=>r+(t?` ${t}`:"")).join(", ")}async function rt(e,r,t){let i,n=e,l="";for(;i=r.exec(n);)l+=n.slice(0,i.index),l+=await t(i),n=n.slice(i.index+i[0].length);return l+=n,l}function st({base:e,from:r,polyfills:t,onDependency:i,shouldRewriteUrls:n,customCssResolver:l,customJsResolver:o}){return{base:e,polyfills:t,from:r,async loadModule(s,a){return ct(s,a,i,o)},async loadStylesheet(s,a){let u=await ft(s,a,i,l);return n&&(u.content=await Xe({css:u.content,root:e,base:u.base})),u}}}async function ut(e,r){if(e.root&&e.root!=="none"){let t=/[*{]/,i=[];for(let l of e.root.pattern.split("/")){if(t.test(l))break;i.push(l)}if(!await at.stat(G.resolve(r,i.join("/"))).then(l=>l.isDirectory()).catch(()=>!1))throw new Error(`The \`source(${e.root.pattern})\` does not exist`)}}async function Ca(e,r){let t=await Ar(e,st(r));return await ut(t,r.base),t}async function $a(e,r){let t=await xr(e,st(r));return await ut(t,r.base),t}async function Sa(e,{base:r}){return br(e,{base:r,async loadModule(t,i){return ct(t,i,()=>{})},async loadStylesheet(t,i){return ft(t,i,()=>{})}})}async function ct(e,r,t,i){if(e[0]!=="."){let s=await lt(e,r,i);if(!s)throw new Error(`Could not resolve '${e}' from '${r}'`);let a=await ot(it(s).href);return{path:s,base:G.dirname(s),module:a.default??a}}let n=await lt(e,r,i);if(!n)throw new Error(`Could not resolve '${e}' from '${r}'`);let[l,o]=await Promise.all([ot(it(n).href+"?id="+Date.now()),Ee(n)]);for(let s of o)t(s);return{path:n,base:G.dirname(n),module:l.default??l}}async function ft(e,r,t,i){let n=await $r(e,r,i);if(!n)throw new Error(`Could not resolve '${e}' from '${r}'`);if(t(n),typeof globalThis.__tw_readFile=="function"){let o=await globalThis.__tw_readFile(n,"utf-8");if(o)return{path:n,base:G.dirname(n),content:o}}let l=await at.readFile(n,"utf-8");return{path:n,base:G.dirname(n),content:l}}var nt=null;async function ot(e){if(typeof globalThis.__tw_load=="function"){let r=await globalThis.__tw_load(e);if(r)return r}try{return await import(e)}catch{return nt??=yr(import.meta.url,{moduleCache:!1,fsCache:!1}),await nt.import(e)}}var Se=["node_modules",...process.env.NODE_PATH?[process.env.NODE_PATH]:[]],Cr=L.ResolverFactory.createResolver({fileSystem:new L.CachedInputFileSystem($e,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"],modules:Se});async function $r(e,r,t){if(typeof globalThis.__tw_resolve=="function"){let i=globalThis.__tw_resolve(e,r);if(i)return Promise.resolve(i)}if(t){let i=await t(e,r);if(i)return i}return Ce(Cr,e,r)}var Sr=L.ResolverFactory.createResolver({fileSystem:new L.CachedInputFileSystem($e,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","import"],modules:Se}),Nr=L.ResolverFactory.createResolver({fileSystem:new L.CachedInputFileSystem($e,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","require"],modules:Se});async function lt(e,r,t){if(typeof globalThis.__tw_resolve=="function"){let i=globalThis.__tw_resolve(e,r);if(i)return Promise.resolve(i)}if(t){let i=await t(e,r);if(i)return i}return Ce(Sr,e,r).catch(()=>Ce(Nr,e,r))}function Ce(e,r,t){return new Promise((i,n)=>e.resolve({},t,r,{},(l,o)=>{if(l)return n(l);i(o)}))}Symbol.dispose??=Symbol("Symbol.dispose");Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");var pt=class{constructor(r=t=>void process.stderr.write(`${t} +`)){this.defaultFlush=r}#r=new g(()=>({value:0}));#t=new g(()=>({value:0n}));#e=[];hit(r){this.#r.get(r).value++}start(r){let t=this.#e.map(n=>n.label).join("//"),i=`${t}${t.length===0?"":"//"}${r}`;this.#r.get(i).value++,this.#t.get(i),this.#e.push({id:i,label:r,namespace:t,value:process.hrtime.bigint()})}end(r){let t=process.hrtime.bigint();if(this.#e[this.#e.length-1].label!==r)throw new Error(`Mismatched timer label: \`${r}\`, expected \`${this.#e[this.#e.length-1].label}\``);let i=this.#e.pop(),n=t-i.value;this.#t.get(i.id).value+=n}reset(){this.#r.clear(),this.#t.clear(),this.#e.splice(0)}report(r=this.defaultFlush){let t=[],i=!1;for(let o=this.#e.length-1;o>=0;o--)this.end(this.#e[o].label);for(let[o,{value:s}]of this.#r.entries()){if(this.#t.has(o))continue;t.length===0&&(i=!0,t.push("Hits:"));let a=o.split("//").length;t.push(`${" ".repeat(a)}${o} ${ne(dt(`\xD7 ${s}`))}`)}this.#t.size>0&&i&&t.push(` +Timers:`);let n=-1/0,l=new Map;for(let[o,{value:s}]of this.#t){let a=`${(Number(s)/1e6).toFixed(2)}ms`;l.set(o,a),n=Math.max(n,a.length)}for(let o of this.#t.keys()){let s=o.split("//").length;t.push(`${ne(`[${l.get(o).padStart(n," ")}]`)}${" ".repeat(s-1)}${s===1?" ":ne(" \u21B3 ")}${o.split("//").pop()} ${this.#r.get(o).value===1?"":ne(dt(`\xD7 ${this.#r.get(o).value}`))}`.trimEnd())}r(` +${t.join(` +`)} +`),this.reset()}[Symbol.dispose](){le&&this.report()}};function ne(e){return`\x1B[2m${e}\x1B[22m`}function dt(e){return`\x1B[34m${e}\x1B[39m`}import Er from"@ampproject/remapping";import{Features as J,transform as Vr}from"lightningcss";import Tr from"magic-string";function Oa(e,{file:r="input.css",minify:t=!1,map:i}={}){function n(a,u){return Vr({filename:r,code:a,minify:t,sourceMap:typeof u<"u",inputSourceMap:u,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:J.Nesting|J.MediaQueries,exclude:J.LogicalProperties|J.DirSelector|J.LightDark,targets:{safari:16<<16|1024,ios_saf:16<<16|1024,firefox:8388608,chrome:7274496},errorRecovery:!0})}let l=n(Buffer.from(e),i);i=l.map?.toString(),l=n(l.code,i),i=l.map?.toString();let o=l.code.toString(),s=new Tr(o);if(s.replaceAll("@media not (","@media not all and ("),i!==void 0&&s.hasChanged()){let a=s.generateMap({source:"original",hires:"boundary"}).toString();i=Er([a,i],()=>null).toString()}return o=s.toString(),{code:o,map:i}}import{SourceMapGenerator as Rr}from"source-map-js";function Pr(e){let r=new Rr,t=1,i=new g(n=>({url:n?.url??``,content:n?.content??""}));for(let n of e.mappings){let l=i.get(n.originalPosition?.source??null);r.addMapping({generated:n.generatedPosition,original:n.originalPosition,source:l.url,name:n.name}),r.setSourceContent(l.url,l.content)}return r.toString()}function Ka(e){let r=typeof e=="string"?e:Pr(e);return{raw:r,get inline(){let t="";return t+="/*# sourceMappingURL=data:application/json;base64,",t+=Buffer.from(r,"utf-8").toString("base64"),t+=` */ +`,t}}}if(!process.versions.bun){let e=oe.createRequire(import.meta.url);oe.register?.(Or(e.resolve("@tailwindcss/node/esm-cache-loader")))}export{ya as Features,pt as Instrumentation,ba as Polyfills,Sa as __unstable__loadDesignSystem,$a as compile,Ca as compileAst,ae as env,ct as loadModule,be as normalizePath,Oa as optimize,Ka as toSourceMap}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/require-cache.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/require-cache.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..de970b93e0e3de5fee1c7bbd0e90557a749626d9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/require-cache.d.ts @@ -0,0 +1,3 @@ +declare function clearRequireCache(files: string[]): void; + +export { clearRequireCache }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/require-cache.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/require-cache.js new file mode 100644 index 0000000000000000000000000000000000000000..398995fad99874c69392bbc01629281fb348c796 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/dist/require-cache.js @@ -0,0 +1 @@ +"use strict";var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var n=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},u=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of f(e))!l.call(r,c)&&c!==t&&i(r,c,{get:()=>e[c],enumerable:!(o=a(e,c))||o.enumerable});return r};var h=r=>u(i({},"__esModule",{value:!0}),r);var d={};n(d,{clearRequireCache:()=>q});module.exports=h(d);function q(r){for(let e of r)delete require.cache[e]}0&&(module.exports={clearRequireCache}); diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d6a82290738a9f78946cbcb4594535d6984086dd --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/README.md new file mode 100644 index 0000000000000000000000000000000000000000..95ec9d87ddcc59defeaed61b39cbb49869220c9f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/README.md @@ -0,0 +1,40 @@ +

+ + + + + Tailwind CSS + + +

+ +

+ A utility-first CSS framework for rapidly building custom user interfaces. +

+ +

+ Build Status + Total Downloads + Latest Release + License +

+ +--- + +## Documentation + +For full documentation, visit [tailwindcss.com](https://tailwindcss.com). + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions) + +For chatting with others using the framework: + +[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe) + +## Contributing + +If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/next/.github/CONTRIBUTING.md) **before submitting a pull request**. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/chunk-4WXWQT6Y.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/chunk-4WXWQT6Y.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bf291d6dcbcba58fb36a7f6c3339af4f67c97705 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/chunk-4WXWQT6Y.mjs @@ -0,0 +1,35 @@ +import{a as Tt,b as D,c as J,d as E,e as lt,f as de,g as Ue,h as Pt}from"./chunk-G32FJCSR.mjs";import{a as Et}from"./chunk-HTB5LLOP.mjs";var Rt="4.1.11";var Ve=92,Ie=47,Fe=42,Ot=34,Kt=39,ii=58,ze=59,ie=10,Me=13,Ne=32,Le=9,_t=123,at=125,ft=40,jt=41,ni=91,oi=93,Dt=45,st=64,li=33;function me(r,t){let i=t?.from?{file:t.from,code:r}:null;r[0]==="\uFEFF"&&(r=" "+r.slice(1));let e=[],n=[],s=[],a=null,c=null,u="",f="",g=0,d;for(let m=0;m0&&r[b]===v[v.length-1]&&(v=v.slice(0,-1));let N=ut(u,k);if(!N)throw new Error("Invalid custom property, expected a value");i&&(N.src=[i,x,m],N.dst=[i,x,m]),a?a.nodes.push(N):e.push(N),u=""}else if(w===ze&&u.charCodeAt(0)===st)c=Se(u),i&&(c.src=[i,g,m],c.dst=[i,g,m]),a?a.nodes.push(c):e.push(c),u="",c=null;else if(w===ze&&f[f.length-1]!==")"){let v=ut(u);if(!v)throw u.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${u.trim()}\``);i&&(v.src=[i,g,m],v.dst=[i,g,m]),a?a.nodes.push(v):e.push(v),u=""}else if(w===_t&&f[f.length-1]!==")")f+="}",c=H(u.trim()),i&&(c.src=[i,g,m],c.dst=[i,g,m]),a&&a.nodes.push(c),s.push(a),a=c,u="",c=null;else if(w===at&&f[f.length-1]!==")"){if(f==="")throw new Error("Missing opening {");if(f=f.slice(0,-1),u.length>0)if(u.charCodeAt(0)===st)c=Se(u),i&&(c.src=[i,g,m],c.dst=[i,g,m]),a?a.nodes.push(c):e.push(c),u="",c=null;else{let x=u.indexOf(":");if(a){let k=ut(u,x);if(!k)throw new Error(`Invalid declaration: \`${u.trim()}\``);i&&(k.src=[i,g,m],k.dst=[i,g,m]),a.nodes.push(k)}}let v=s.pop()??null;v===null&&a&&e.push(a),a=v,u="",c=null}else if(w===ft)f+=")",u+="(";else if(w===jt){if(f[f.length-1]!==")")throw new Error("Missing opening (");f=f.slice(0,-1),u+=")"}else{if(u.length===0&&(w===Ne||w===ie||w===Le))continue;u===""&&(g=m),u+=String.fromCharCode(w)}}}if(u.charCodeAt(0)===st){let m=Se(u);i&&(m.src=[i,g,r.length],m.dst=[i,g,r.length]),e.push(m)}if(f.length>0&&a){if(a.kind==="rule")throw new Error(`Missing closing } at ${a.selector}`);if(a.kind==="at-rule")throw new Error(`Missing closing } at ${a.name} ${a.params}`)}return n.length>0?n.concat(e):e}function Se(r,t=[]){let i=r,e="";for(let n=5;n=1&&n<=31||n===127||e===0&&n>=48&&n<=57||e===1&&n>=48&&n<=57&&a===45){s+="\\"+n.toString(16)+" ";continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=t.charAt(e);continue}s+="\\"+t.charAt(e)}return s}function ge(r){return r.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,t=>t.length>2?String.fromCodePoint(Number.parseInt(t.slice(1).trim(),16)):t[1])}var Ft=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-decoration-color","--text-decoration-thickness","--text-indent","--text-shadow","--text-underline-offset"]]]);function It(r,t){return(Ft.get(t)??[]).some(i=>r===i||r.startsWith(`${i}-`))}var Be=class{constructor(t=new Map,i=new Set([])){this.values=t;this.keyframes=i}prefix=null;get size(){return this.values.size}add(t,i,e=0,n){if(t.endsWith("-*")){if(i!=="initial")throw new Error(`Invalid theme value \`${i}\` for namespace \`${t}\``);t==="--*"?this.values.clear():this.clearNamespace(t.slice(0,-2),0)}if(e&4){let s=this.values.get(t);if(s&&!(s.options&4))return}i==="initial"?this.values.delete(t):this.values.set(t,{value:i,options:e,src:n})}keysInNamespaces(t){let i=[];for(let e of t){let n=`${e}-`;for(let s of this.values.keys())s.startsWith(n)&&s.indexOf("--",2)===-1&&(It(s,e)||i.push(s.slice(n.length)))}return i}get(t){for(let i of t){let e=this.values.get(i);if(e)return e.value}return null}hasDefault(t){return(this.getOptions(t)&4)===4}getOptions(t){return t=ge(this.#r(t)),this.values.get(t)?.options??0}entries(){return this.prefix?Array.from(this.values,t=>(t[0]=this.prefixKey(t[0]),t)):this.values.entries()}prefixKey(t){return this.prefix?`--${this.prefix}-${t.slice(2)}`:t}#r(t){return this.prefix?`--${t.slice(3+this.prefix.length)}`:t}clearNamespace(t,i){let e=Ft.get(t)??[];e:for(let n of this.values.keys())if(n.startsWith(t)){if(i!==0&&(this.getOptions(n)&i)!==i)continue;for(let s of e)if(n.startsWith(s))continue e;this.values.delete(n)}}#e(t,i){for(let e of i){let n=t!==null?`${e}-${t}`:e;if(!this.values.has(n))if(t!==null&&t.includes(".")){if(n=`${e}-${t.replaceAll(".","_")}`,!this.values.has(n))continue}else continue;if(!It(n,e))return n}return null}#t(t){let i=this.values.get(t);if(!i)return null;let e=null;return i.options&2&&(e=i.value),`var(${fe(this.prefixKey(t))}${e?`, ${e}`:""})`}markUsedVariable(t){let i=ge(this.#r(t)),e=this.values.get(i);if(!e)return!1;let n=e.options&16;return e.options|=16,!n}resolve(t,i,e=0){let n=this.#e(t,i);if(!n)return null;let s=this.values.get(n);return(e|s.options)&1?s.value:this.#t(n)}resolveValue(t,i){let e=this.#e(t,i);return e?this.values.get(e).value:null}resolveWith(t,i,e=[]){let n=this.#e(t,i);if(!n)return null;let s={};for(let c of e){let u=`${n}${c}`,f=this.values.get(u);f&&(f.options&1?s[c]=f.value:s[c]=this.#t(u))}let a=this.values.get(n);return a.options&1?[a.value,s]:[this.#t(n),s]}namespace(t){let i=new Map,e=`${t}-`;for(let[n,s]of this.values)n===t?i.set(null,s.value):n.startsWith(`${e}-`)?i.set(n.slice(t.length),s.value):n.startsWith(e)&&i.set(n.slice(e.length),s.value);return i}addKeyframes(t){this.keyframes.add(t)}getKeyframes(){return Array.from(this.keyframes)}};var B=class extends Map{constructor(i){super();this.factory=i}get(i){let e=super.get(i);return e===void 0&&(e=this.factory(i,this),this.set(i,e)),e}};function pt(r){return{kind:"word",value:r}}function ai(r,t){return{kind:"function",value:r,nodes:t}}function si(r){return{kind:"separator",value:r}}function ee(r,t,i=null){for(let e=0;e0){let d=pt(n);e?e.nodes.push(d):t.push(d),n=""}let u=a,f=a+1;for(;f0){let f=pt(n);u?.nodes.push(f),n=""}i.length>0?e=i[i.length-1]:e=null;break}default:n+=String.fromCharCode(c)}}return n.length>0&&t.push(pt(n)),t}function qe(r){let t=[];return ee(q(r),i=>{if(!(i.kind!=="function"||i.value!=="var"))return ee(i.nodes,e=>{e.kind!=="word"||e.value[0]!=="-"||e.value[1]!=="-"||t.push(e.value)}),1}),t}var mi=64;function M(r,t=[]){return{kind:"rule",selector:r,nodes:t}}function z(r,t="",i=[]){return{kind:"at-rule",name:r,params:t,nodes:i}}function H(r,t=[]){return r.charCodeAt(0)===mi?Se(r,t):M(r,t)}function l(r,t,i=!1){return{kind:"declaration",property:r,value:t,important:i}}function We(r){return{kind:"comment",value:r}}function le(r,t){return{kind:"context",context:r,nodes:t}}function L(r){return{kind:"at-root",nodes:r}}function F(r,t,i=[],e={}){for(let n=0;nnew Set),a=new B(()=>new Set),c=new Set,u=new Set,f=[],g=[],d=new B(()=>new Set);function m(v,x,k={},N=0){if(v.kind==="declaration"){if(v.property==="--tw-sort"||v.value===void 0||v.value===null)return;if(k.theme&&v.property[0]==="-"&&v.property[1]==="-"){if(v.value==="initial"){v.value=void 0;return}k.keyframes||s.get(x).add(v)}if(v.value.includes("var("))if(k.theme&&v.property[0]==="-"&&v.property[1]==="-")for(let b of qe(v.value))d.get(b).add(v.property);else t.trackUsedVariables(v.value);if(v.property==="animation")for(let b of Zt(v.value))u.add(b);i&2&&v.value.includes("color-mix(")&&a.get(x).add(v),x.push(v)}else if(v.kind==="rule")if(v.selector==="&")for(let b of v.nodes){let S=[];m(b,S,k,N+1),S.length>0&&x.push(...S)}else{let b={...v,nodes:[]};for(let S of v.nodes)m(S,b.nodes,k,N+1);b.nodes.length>0&&x.push(b)}else if(v.kind==="at-rule"&&v.name==="@property"&&N===0){if(n.has(v.params))return;if(i&1){let S=v.params,P=null,U=!1;for(let _ of v.nodes)_.kind==="declaration"&&(_.property==="initial-value"?P=_.value:_.property==="inherits"&&(U=_.value==="true"));let R=l(S,P??"initial");R.src=v.src,U?f.push(R):g.push(R)}n.add(v.params);let b={...v,nodes:[]};for(let S of v.nodes)m(S,b.nodes,k,N+1);x.push(b)}else if(v.kind==="at-rule"){v.name==="@keyframes"&&(k={...k,keyframes:!0});let b={...v,nodes:[]};for(let S of v.nodes)m(S,b.nodes,k,N+1);v.name==="@keyframes"&&k.theme&&c.add(b),(b.nodes.length>0||b.name==="@layer"||b.name==="@charset"||b.name==="@custom-media"||b.name==="@namespace"||b.name==="@import")&&x.push(b)}else if(v.kind==="at-root")for(let b of v.nodes){let S=[];m(b,S,k,0);for(let P of S)e.push(P)}else if(v.kind==="context"){if(v.context.reference)return;for(let b of v.nodes)m(b,x,{...k,...v.context},N)}else v.kind==="comment"&&x.push(v)}let w=[];for(let v of r)m(v,w,{},0);e:for(let[v,x]of s)for(let k of x){if(Qt(k.property,t.theme,d)){if(k.property.startsWith(t.theme.prefixKey("--animate-")))for(let S of Zt(k.value))u.add(S);continue}let b=v.indexOf(k);if(v.splice(b,1),v.length===0){let S=gi(w,P=>P.kind==="rule"&&P.nodes===v);if(!S||S.length===0)continue e;S.unshift({kind:"at-root",nodes:w});do{let P=S.pop();if(!P)break;let U=S[S.length-1];if(!U||U.kind!=="at-root"&&U.kind!=="at-rule")break;let R=U.nodes.indexOf(P);if(R===-1)break;U.nodes.splice(R,1)}while(!0);continue e}}for(let v of c)if(!u.has(v.params)){let x=e.indexOf(v);e.splice(x,1)}if(w=w.concat(e),i&2)for(let[v,x]of a)for(let k of x){let N=v.indexOf(k);if(N===-1||k.value==null)continue;let b=q(k.value),S=!1;if(ee(b,(R,{replaceWith:_})=>{if(R.kind!=="function"||R.value!=="color-mix")return;let K=!1,G=!1;if(ee(R.nodes,(I,{replaceWith:W})=>{if(I.kind=="word"&&I.value.toLowerCase()==="currentcolor"){G=!0,S=!0;return}let Z=I,re=null,o=new Set;do{if(Z.kind!=="function"||Z.value!=="var")return;let p=Z.nodes[0];if(!p||p.kind!=="word")return;let h=p.value;if(o.has(h)){K=!0;return}if(o.add(h),S=!0,re=t.theme.resolveValue(null,[p.value]),!re){K=!0;return}if(re.toLowerCase()==="currentcolor"){G=!0;return}re.startsWith("var(")?Z=q(re)[0]:Z=null}while(Z);W({kind:"word",value:re})}),K||G){let I=R.nodes.findIndex(Z=>Z.kind==="separator"&&Z.value.trim().includes(","));if(I===-1)return;let W=R.nodes.length>I?R.nodes[I+1]:null;if(!W)return;_(W)}else if(S){let I=R.nodes[2];I.kind==="word"&&(I.value==="oklab"||I.value==="oklch"||I.value==="lab"||I.value==="lch")&&(I.value="srgb")}}),!S)continue;let P={...k,value:Y(b)},U=H("@supports (color: color-mix(in lab, red, red))",[k]);U.src=k.src,v.splice(N,1,P,U)}if(i&1){let v=[];if(f.length>0){let x=H(":root, :host",f);x.src=f[0].src,v.push(x)}if(g.length>0){let x=H("*, ::before, ::after, ::backdrop",g);x.src=g[0].src,v.push(x)}if(v.length>0){let x=w.findIndex(b=>!(b.kind==="comment"||b.kind==="at-rule"&&(b.name==="@charset"||b.name==="@import"))),k=z("@layer","properties",[]);k.src=v[0].src,w.splice(x<0?w.length:x,0,k);let N=H("@layer properties",[z("@supports","((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))",v)]);N.src=v[0].src,N.nodes[0].src=v[0].src,w.push(N)}}return w}function ne(r,t){let i=0,e={file:null,code:""};function n(a,c=0){let u="",f=" ".repeat(c);if(a.kind==="declaration"){if(u+=`${f}${a.property}: ${a.value}${a.important?" !important":""}; +`,t){i+=f.length;let g=i;i+=a.property.length,i+=2,i+=a.value?.length??0,a.important&&(i+=11);let d=i;i+=2,a.dst=[e,g,d]}}else if(a.kind==="rule"){if(u+=`${f}${a.selector} { +`,t){i+=f.length;let g=i;i+=a.selector.length,i+=1;let d=i;a.dst=[e,g,d],i+=2}for(let g of a.nodes)u+=n(g,c+1);u+=`${f}} +`,t&&(i+=f.length,i+=2)}else if(a.kind==="at-rule"){if(a.nodes.length===0){let g=`${f}${a.name} ${a.params}; +`;if(t){i+=f.length;let d=i;i+=a.name.length,i+=1,i+=a.params.length;let m=i;i+=2,a.dst=[e,d,m]}return g}if(u+=`${f}${a.name}${a.params?` ${a.params} `:" "}{ +`,t){i+=f.length;let g=i;i+=a.name.length,a.params&&(i+=1,i+=a.params.length),i+=1;let d=i;a.dst=[e,g,d],i+=2}for(let g of a.nodes)u+=n(g,c+1);u+=`${f}} +`,t&&(i+=f.length,i+=2)}else if(a.kind==="comment"){if(u+=`${f}/*${a.value}*/ +`,t){i+=f.length;let g=i;i+=2+a.value.length+2;let d=i;a.dst=[e,g,d],i+=1}}else if(a.kind==="context"||a.kind==="at-root")return"";return u}let s="";for(let a of r)s+=n(a,0);return e.code=s,s}function gi(r,t){let i=[];return F(r,(e,{path:n})=>{if(t(e))return i=[...n],2}),i}function Qt(r,t,i,e=new Set){if(e.has(r)||(e.add(r),t.getOptions(r)&24))return!0;{let s=i.get(r)??[];for(let a of s)if(Qt(a,t,i,e))return!0}return!1}function Zt(r){return r.split(/[\s,]+/)}function ce(r){if(r.indexOf("(")===-1)return be(r);let t=q(r);return mt(t),r=Y(t),r=Tt(r),r}function be(r,t=!1){let i="";for(let e=0;e0&&n===gt[t-1]&&t--;break;case 59:if(t===0)return!1;break}}return!0}var vi=58,Xt=45,er=97,tr=122;function*rr(r,t){let i=D(r,":");if(t.theme.prefix){if(i.length===1||i[0]!==t.theme.prefix)return null;i.shift()}let e=i.pop(),n=[];for(let d=i.length-1;d>=0;--d){let m=t.parseVariant(i[d]);if(m===null)return;n.push(m)}let s=!1;e[e.length-1]==="!"?(s=!0,e=e.slice(0,-1)):e[0]==="!"&&(s=!0,e=e.slice(1)),t.utilities.has(e,"static")&&!e.includes("[")&&(yield{kind:"static",root:e,variants:n,important:s,raw:r});let[a,c=null,u]=D(e,"/");if(u)return;let f=c===null?null:ht(c);if(c!==null&&f===null)return;if(a[0]==="["){if(a[a.length-1]!=="]")return;let d=a.charCodeAt(1);if(d!==Xt&&!(d>=er&&d<=tr))return;a=a.slice(1,-1);let m=a.indexOf(":");if(m===-1||m===0||m===a.length-1)return;let w=a.slice(0,m),v=ce(a.slice(m+1));if(!se(v))return;yield{kind:"arbitrary",property:w,value:v,modifier:f,variants:n,important:s,raw:r};return}let g;if(a[a.length-1]==="]"){let d=a.indexOf("-[");if(d===-1)return;let m=a.slice(0,d);if(!t.utilities.has(m,"functional"))return;let w=a.slice(d+1);g=[[m,w]]}else if(a[a.length-1]===")"){let d=a.indexOf("-(");if(d===-1)return;let m=a.slice(0,d);if(!t.utilities.has(m,"functional"))return;let w=a.slice(d+2,-1),v=D(w,":"),x=null;if(v.length===2&&(x=v[0],w=v[1]),w[0]!=="-"||w[1]!=="-"||!se(w))return;g=[[m,x===null?`[var(${w})]`:`[${x}:var(${w})]`]]}else g=nr(a,d=>t.utilities.has(d,"functional"));for(let[d,m]of g){let w={kind:"functional",root:d,modifier:f,value:null,variants:n,important:s,raw:r};if(m===null){yield w;continue}{let v=m.indexOf("[");if(v!==-1){if(m[m.length-1]!=="]")return;let k=ce(m.slice(v+1,-1));if(!se(k))continue;let N="";for(let b=0;b=er&&S<=tr))break}if(k.length===0||k.trim().length===0)continue;w.value={kind:"arbitrary",dataType:N||null,value:k}}else{let k=c===null||w.modifier?.kind==="arbitrary"?null:`${m}/${c}`;w.value={kind:"named",value:m,fraction:k}}}yield w}}function ht(r){if(r[0]==="["&&r[r.length-1]==="]"){let t=ce(r.slice(1,-1));return!se(t)||t.length===0||t.trim().length===0?null:{kind:"arbitrary",value:t}}return r[0]==="("&&r[r.length-1]===")"?(r=r.slice(1,-1),r[0]!=="-"||r[1]!=="-"||!se(r)?null:(r=`var(${r})`,{kind:"arbitrary",value:ce(r)})):{kind:"named",value:r}}function ir(r,t){if(r[0]==="["&&r[r.length-1]==="]"){if(r[1]==="@"&&r.includes("&"))return null;let i=ce(r.slice(1,-1));if(!se(i)||i.length===0||i.trim().length===0)return null;let e=i[0]===">"||i[0]==="+"||i[0]==="~";return!e&&i[0]!=="@"&&!i.includes("&")&&(i=`&:is(${i})`),{kind:"arbitrary",selector:i,relative:e}}{let[i,e=null,n]=D(r,"/");if(n)return null;let s=nr(i,a=>t.variants.has(a));for(let[a,c]of s)switch(t.variants.kind(a)){case"static":return c!==null||e!==null?null:{kind:"static",root:a};case"functional":{let u=e===null?null:ht(e);if(e!==null&&u===null)return null;if(c===null)return{kind:"functional",root:a,modifier:u,value:null};if(c[c.length-1]==="]"){if(c[0]!=="[")continue;let f=ce(c.slice(1,-1));return!se(f)||f.length===0||f.trim().length===0?null:{kind:"functional",root:a,modifier:u,value:{kind:"arbitrary",value:f}}}if(c[c.length-1]===")"){if(c[0]!=="(")continue;let f=ce(c.slice(1,-1));return!se(f)||f.length===0||f.trim().length===0||f[0]!=="-"||f[1]!=="-"?null:{kind:"functional",root:a,modifier:u,value:{kind:"arbitrary",value:`var(${f})`}}}return{kind:"functional",root:a,modifier:u,value:{kind:"named",value:c}}}case"compound":{if(c===null)return null;let u=t.parseVariant(c);if(u===null||!t.variants.compoundsWith(a,u))return null;let f=e===null?null:ht(e);return e!==null&&f===null?null:{kind:"compound",root:a,modifier:f,variant:u}}}}return null}function*nr(r,t){t(r)&&(yield[r,null]);let i=r.lastIndexOf("-");for(;i>0;){let e=r.slice(0,i);if(t(e)){let n=[e,r.slice(i+1)];if(n[1]==="")break;yield n}i=r.lastIndexOf("-",i-1)}r[0]==="@"&&t("@")&&(yield["@",r.slice(1)])}function or(r,t){let i=[];for(let n of t.variants)i.unshift(He(n));r.theme.prefix&&i.unshift(r.theme.prefix);let e="";if(t.kind==="static"&&(e+=t.root),t.kind==="functional"&&(e+=t.root,t.value))if(t.value.kind==="arbitrary"){if(t.value!==null){let n=wt(t.value.value),s=n?t.value.value.slice(4,-1):t.value.value,[a,c]=n?["(",")"]:["[","]"];t.value.dataType?e+=`-${a}${t.value.dataType}:${ke(s)}${c}`:e+=`-${a}${ke(s)}${c}`}}else t.value.kind==="named"&&(e+=`-${t.value.value}`);return t.kind==="arbitrary"&&(e+=`[${t.property}:${ke(t.value)}]`),(t.kind==="arbitrary"||t.kind==="functional")&&(e+=lr(t.modifier)),t.important&&(e+="!"),i.push(e),i.join(":")}function lr(r){if(r===null)return"";let t=wt(r.value),i=t?r.value.slice(4,-1):r.value,[e,n]=t?["(",")"]:["[","]"];return r.kind==="arbitrary"?`/${e}${ke(i)}${n}`:r.kind==="named"?`/${r.value}`:""}function He(r){if(r.kind==="static")return r.root;if(r.kind==="arbitrary")return`[${ke(bi(r.selector))}]`;let t="";if(r.kind==="functional"){t+=r.root;let i=r.root!=="@";if(r.value)if(r.value.kind==="arbitrary"){let e=wt(r.value.value),n=e?r.value.value.slice(4,-1):r.value.value,[s,a]=e?["(",")"]:["[","]"];t+=`${i?"-":""}${s}${ke(n)}${a}`}else r.value.kind==="named"&&(t+=`${i?"-":""}${r.value.value}`)}return r.kind==="compound"&&(t+=r.root,t+="-",t+=He(r.variant)),(r.kind==="functional"||r.kind==="compound")&&(t+=lr(r.modifier)),t}var wi=new B(r=>{let t=q(r),i=new Set;return ee(t,(e,{parent:n})=>{let s=n===null?t:n.nodes??[];if(e.kind==="word"&&(e.value==="+"||e.value==="-"||e.value==="*"||e.value==="/")){let a=s.indexOf(e)??-1;if(a===-1)return;let c=s[a-1];if(c?.kind!=="separator"||c.value!==" ")return;let u=s[a+1];if(u?.kind!=="separator"||u.value!==" ")return;i.add(c),i.add(u)}else e.kind==="separator"&&e.value.trim()==="/"?e.value="/":e.kind==="separator"&&e.value.length>0&&e.value.trim()===""?(s[0]===e||s[s.length-1]===e)&&i.add(e):e.kind==="separator"&&e.value.trim()===","&&(e.value=",")}),i.size>0&&ee(t,(e,{replaceWith:n})=>{i.has(e)&&(i.delete(e),n([]))}),vt(t),Y(t)});function ke(r){return wi.get(r)}var yi=new B(r=>{let t=q(r);return t.length===3&&t[0].kind==="word"&&t[0].value==="&"&&t[1].kind==="separator"&&t[1].value===":"&&t[2].kind==="function"&&t[2].value==="is"?Y(t[2].nodes):r});function bi(r){return yi.get(r)}function vt(r){for(let t of r)switch(t.kind){case"function":{if(t.value==="url"||t.value.endsWith("_url")){t.value=Te(t.value);break}if(t.value==="var"||t.value.endsWith("_var")||t.value==="theme"||t.value.endsWith("_theme")){t.value=Te(t.value);for(let i=0;i{let t=q(r);return t.length===1&&t[0].kind==="function"&&t[0].value==="var"});function wt(r){return ki.get(r)}function xi(r){throw new Error(`Unexpected value: ${r}`)}function Te(r){return r.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}function we(r,t,i){if(r===t)return 0;let e=r.indexOf("("),n=t.indexOf("("),s=e===-1?r.replace(/[\d.]+/g,""):r.slice(0,e),a=n===-1?t.replace(/[\d.]+/g,""):t.slice(0,n),c=(s===a?0:s{e=e.trim();let n=D(e," ").filter(f=>f.trim()!==""),s=null,a=null,c=null;for(let f of n)Ai.has(f)||(ar.test(f)?(a===null?a=f:c===null&&(c=f),ar.lastIndex=0):s===null&&(s=f));if(a===null||c===null)return e;let u=t(s??"currentcolor");return s!==null?e.replace(s,u):`${e} ${u}`}).join(", ")}var Ci=/^-?[a-z][a-zA-Z0-9/%._-]*$/,$i=/^-?[a-z][a-zA-Z0-9/%._-]*-\*$/,Ze=["0","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],yt=class{utilities=new B(()=>[]);completions=new Map;static(t,i){this.utilities.get(t).push({kind:"static",compileFn:i})}functional(t,i,e){this.utilities.get(t).push({kind:"functional",compileFn:i,options:e})}has(t,i){return this.utilities.has(t)&&this.utilities.get(t).some(e=>e.kind===i)}get(t){return this.utilities.has(t)?this.utilities.get(t):[]}getCompletions(t){return this.completions.get(t)?.()??[]}suggest(t,i){this.completions.set(t,i)}keys(t){let i=[];for(let[e,n]of this.utilities.entries())for(let s of n)if(s.kind===t){i.push(e);break}return i}};function $(r,t,i){return z("@property",r,[l("syntax",i?`"${i}"`:'"*"'),l("inherits","false"),...t?[l("initial-value",t)]:[]])}function Q(r,t){if(t===null)return r;let i=Number(t);return Number.isNaN(i)||(t=`${i*100}%`),t==="100%"?r:`color-mix(in oklab, ${r} ${t}, transparent)`}function ur(r,t){let i=Number(t);return Number.isNaN(i)||(t=`${i*100}%`),`oklab(from ${r} l a b / ${t})`}function X(r,t,i){if(!t)return r;if(t.kind==="arbitrary")return Q(r,t.value);let e=i.resolve(t.value,["--opacity"]);return e?Q(r,e):Ue(t.value)?Q(r,`${t.value}%`):null}function te(r,t,i){let e=null;switch(r.value.value){case"inherit":{e="inherit";break}case"transparent":{e="transparent";break}case"current":{e="currentcolor";break}default:{e=t.resolve(r.value.value,i);break}}return e?X(e,r.modifier,t):null}var fr=/(\d+)_(\d+)/g;function cr(r){let t=new yt;function i(o,p){function*h(y){for(let C of r.keysInNamespaces(y))yield C.replace(fr,(O,V,T)=>`${V}.${T}`)}let A=["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"];t.suggest(o,()=>{let y=[];for(let C of p()){if(typeof C=="string"){y.push({values:[C],modifiers:[]});continue}let O=[...C.values??[],...h(C.valueThemeKeys??[])],V=[...C.modifiers??[],...h(C.modifierThemeKeys??[])];C.supportsFractions&&O.push(...A),C.hasDefaultValue&&O.unshift(null),y.push({supportsNegative:C.supportsNegative,values:O,modifiers:V})}return y})}function e(o,p){t.static(o,()=>p.map(h=>typeof h=="function"?h():l(h[0],h[1])))}function n(o,p){function h({negative:A}){return y=>{let C=null,O=null;if(y.value)if(y.value.kind==="arbitrary"){if(y.modifier)return;C=y.value.value,O=y.value.dataType}else{if(C=r.resolve(y.value.fraction??y.value.value,p.themeKeys??[]),C===null&&p.supportsFractions&&y.value.fraction){let[V,T]=D(y.value.fraction,"/");if(!E(V)||!E(T))return;C=`calc(${y.value.fraction} * 100%)`}if(C===null&&A&&p.handleNegativeBareValue){if(C=p.handleNegativeBareValue(y.value),!C?.includes("/")&&y.modifier)return;if(C!==null)return p.handle(C,null)}if(C===null&&p.handleBareValue&&(C=p.handleBareValue(y.value),!C?.includes("/")&&y.modifier))return}else{if(y.modifier)return;C=p.defaultValue!==void 0?p.defaultValue:r.resolve(null,p.themeKeys??[])}if(C!==null)return p.handle(A?`calc(${C} * -1)`:C,O)}}p.supportsNegative&&t.functional(`-${o}`,h({negative:!0})),t.functional(o,h({negative:!1})),i(o,()=>[{supportsNegative:p.supportsNegative,valueThemeKeys:p.themeKeys??[],hasDefaultValue:p.defaultValue!==void 0&&p.defaultValue!==null,supportsFractions:p.supportsFractions}])}function s(o,p){t.functional(o,h=>{if(!h.value)return;let A=null;if(h.value.kind==="arbitrary"?(A=h.value.value,A=X(A,h.modifier,r)):A=te(h,r,p.themeKeys),A!==null)return p.handle(A)}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:p.themeKeys,modifiers:Array.from({length:21},(h,A)=>`${A*5}`)}])}function a(o,p,h,{supportsNegative:A=!1,supportsFractions:y=!1}={}){A&&t.static(`-${o}-px`,()=>h("-1px")),t.static(`${o}-px`,()=>h("1px")),n(o,{themeKeys:p,supportsFractions:y,supportsNegative:A,defaultValue:null,handleBareValue:({value:C})=>{let O=r.resolve(null,["--spacing"]);return!O||!de(C)?null:`calc(${O} * ${C})`},handleNegativeBareValue:({value:C})=>{let O=r.resolve(null,["--spacing"]);return!O||!de(C)?null:`calc(${O} * -${C})`},handle:h}),i(o,()=>[{values:r.get(["--spacing"])?Ze:[],supportsNegative:A,supportsFractions:y,valueThemeKeys:p}])}e("sr-only",[["position","absolute"],["width","1px"],["height","1px"],["padding","0"],["margin","-1px"],["overflow","hidden"],["clip","rect(0, 0, 0, 0)"],["white-space","nowrap"],["border-width","0"]]),e("not-sr-only",[["position","static"],["width","auto"],["height","auto"],["padding","0"],["margin","0"],["overflow","visible"],["clip","auto"],["white-space","normal"]]),e("pointer-events-none",[["pointer-events","none"]]),e("pointer-events-auto",[["pointer-events","auto"]]),e("visible",[["visibility","visible"]]),e("invisible",[["visibility","hidden"]]),e("collapse",[["visibility","collapse"]]),e("static",[["position","static"]]),e("fixed",[["position","fixed"]]),e("absolute",[["position","absolute"]]),e("relative",[["position","relative"]]),e("sticky",[["position","sticky"]]);for(let[o,p]of[["inset","inset"],["inset-x","inset-inline"],["inset-y","inset-block"],["start","inset-inline-start"],["end","inset-inline-end"],["top","top"],["right","right"],["bottom","bottom"],["left","left"]])e(`${o}-auto`,[[p,"auto"]]),e(`${o}-full`,[[p,"100%"]]),e(`-${o}-full`,[[p,"-100%"]]),a(o,["--inset","--spacing"],h=>[l(p,h)],{supportsNegative:!0,supportsFractions:!0});e("isolate",[["isolation","isolate"]]),e("isolation-auto",[["isolation","auto"]]),e("z-auto",[["z-index","auto"]]),n("z",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--z-index"],handle:o=>[l("z-index",o)]}),i("z",()=>[{supportsNegative:!0,values:["0","10","20","30","40","50"],valueThemeKeys:["--z-index"]}]),e("order-first",[["order","-9999"]]),e("order-last",[["order","9999"]]),n("order",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--order"],handle:o=>[l("order",o)]}),i("order",()=>[{supportsNegative:!0,values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--order"]}]),e("col-auto",[["grid-column","auto"]]),n("col",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-column"],handle:o=>[l("grid-column",o)]}),e("col-span-full",[["grid-column","1 / -1"]]),n("col-span",{handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("grid-column",`span ${o} / span ${o}`)]}),e("col-start-auto",[["grid-column-start","auto"]]),n("col-start",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-column-start"],handle:o=>[l("grid-column-start",o)]}),e("col-end-auto",[["grid-column-end","auto"]]),n("col-end",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-column-end"],handle:o=>[l("grid-column-end",o)]}),i("col-span",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:[]}]),i("col-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-column-start"]}]),i("col-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-column-end"]}]),e("row-auto",[["grid-row","auto"]]),n("row",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-row"],handle:o=>[l("grid-row",o)]}),e("row-span-full",[["grid-row","1 / -1"]]),n("row-span",{themeKeys:[],handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("grid-row",`span ${o} / span ${o}`)]}),e("row-start-auto",[["grid-row-start","auto"]]),n("row-start",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-row-start"],handle:o=>[l("grid-row-start",o)]}),e("row-end-auto",[["grid-row-end","auto"]]),n("row-end",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-row-end"],handle:o=>[l("grid-row-end",o)]}),i("row-span",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:[]}]),i("row-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-row-start"]}]),i("row-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-row-end"]}]),e("float-start",[["float","inline-start"]]),e("float-end",[["float","inline-end"]]),e("float-right",[["float","right"]]),e("float-left",[["float","left"]]),e("float-none",[["float","none"]]),e("clear-start",[["clear","inline-start"]]),e("clear-end",[["clear","inline-end"]]),e("clear-right",[["clear","right"]]),e("clear-left",[["clear","left"]]),e("clear-both",[["clear","both"]]),e("clear-none",[["clear","none"]]);for(let[o,p]of[["m","margin"],["mx","margin-inline"],["my","margin-block"],["ms","margin-inline-start"],["me","margin-inline-end"],["mt","margin-top"],["mr","margin-right"],["mb","margin-bottom"],["ml","margin-left"]])e(`${o}-auto`,[[p,"auto"]]),a(o,["--margin","--spacing"],h=>[l(p,h)],{supportsNegative:!0});e("box-border",[["box-sizing","border-box"]]),e("box-content",[["box-sizing","content-box"]]),e("line-clamp-none",[["overflow","visible"],["display","block"],["-webkit-box-orient","horizontal"],["-webkit-line-clamp","unset"]]),n("line-clamp",{themeKeys:["--line-clamp"],handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("overflow","hidden"),l("display","-webkit-box"),l("-webkit-box-orient","vertical"),l("-webkit-line-clamp",o)]}),i("line-clamp",()=>[{values:["1","2","3","4","5","6"],valueThemeKeys:["--line-clamp"]}]),e("block",[["display","block"]]),e("inline-block",[["display","inline-block"]]),e("inline",[["display","inline"]]),e("hidden",[["display","none"]]),e("inline-flex",[["display","inline-flex"]]),e("table",[["display","table"]]),e("inline-table",[["display","inline-table"]]),e("table-caption",[["display","table-caption"]]),e("table-cell",[["display","table-cell"]]),e("table-column",[["display","table-column"]]),e("table-column-group",[["display","table-column-group"]]),e("table-footer-group",[["display","table-footer-group"]]),e("table-header-group",[["display","table-header-group"]]),e("table-row-group",[["display","table-row-group"]]),e("table-row",[["display","table-row"]]),e("flow-root",[["display","flow-root"]]),e("flex",[["display","flex"]]),e("grid",[["display","grid"]]),e("inline-grid",[["display","inline-grid"]]),e("contents",[["display","contents"]]),e("list-item",[["display","list-item"]]),e("field-sizing-content",[["field-sizing","content"]]),e("field-sizing-fixed",[["field-sizing","fixed"]]),e("aspect-auto",[["aspect-ratio","auto"]]),e("aspect-square",[["aspect-ratio","1 / 1"]]),n("aspect",{themeKeys:["--aspect"],handleBareValue:({fraction:o})=>{if(o===null)return null;let[p,h]=D(o,"/");return!E(p)||!E(h)?null:o},handle:o=>[l("aspect-ratio",o)]});for(let[o,p]of[["full","100%"],["svw","100svw"],["lvw","100lvw"],["dvw","100dvw"],["svh","100svh"],["lvh","100lvh"],["dvh","100dvh"],["min","min-content"],["max","max-content"],["fit","fit-content"]])e(`size-${o}`,[["--tw-sort","size"],["width",p],["height",p]]),e(`w-${o}`,[["width",p]]),e(`h-${o}`,[["height",p]]),e(`min-w-${o}`,[["min-width",p]]),e(`min-h-${o}`,[["min-height",p]]),e(`max-w-${o}`,[["max-width",p]]),e(`max-h-${o}`,[["max-height",p]]);e("size-auto",[["--tw-sort","size"],["width","auto"],["height","auto"]]),e("w-auto",[["width","auto"]]),e("h-auto",[["height","auto"]]),e("min-w-auto",[["min-width","auto"]]),e("min-h-auto",[["min-height","auto"]]),e("h-lh",[["height","1lh"]]),e("min-h-lh",[["min-height","1lh"]]),e("max-h-lh",[["max-height","1lh"]]),e("w-screen",[["width","100vw"]]),e("min-w-screen",[["min-width","100vw"]]),e("max-w-screen",[["max-width","100vw"]]),e("h-screen",[["height","100vh"]]),e("min-h-screen",[["min-height","100vh"]]),e("max-h-screen",[["max-height","100vh"]]),e("max-w-none",[["max-width","none"]]),e("max-h-none",[["max-height","none"]]),a("size",["--size","--spacing"],o=>[l("--tw-sort","size"),l("width",o),l("height",o)],{supportsFractions:!0});for(let[o,p,h]of[["w",["--width","--spacing","--container"],"width"],["min-w",["--min-width","--spacing","--container"],"min-width"],["max-w",["--max-width","--spacing","--container"],"max-width"],["h",["--height","--spacing"],"height"],["min-h",["--min-height","--height","--spacing"],"min-height"],["max-h",["--max-height","--height","--spacing"],"max-height"]])a(o,p,A=>[l(h,A)],{supportsFractions:!0});t.static("container",()=>{let o=[...r.namespace("--breakpoint").values()];o.sort((h,A)=>we(h,A,"asc"));let p=[l("--tw-sort","--tw-container-component"),l("width","100%")];for(let h of o)p.push(z("@media",`(width >= ${h})`,[l("max-width",h)]));return p}),e("flex-auto",[["flex","auto"]]),e("flex-initial",[["flex","0 auto"]]),e("flex-none",[["flex","none"]]),t.functional("flex",o=>{if(o.value){if(o.value.kind==="arbitrary")return o.modifier?void 0:[l("flex",o.value.value)];if(o.value.fraction){let[p,h]=D(o.value.fraction,"/");return!E(p)||!E(h)?void 0:[l("flex",`calc(${o.value.fraction} * 100%)`)]}if(E(o.value.value))return o.modifier?void 0:[l("flex",o.value.value)]}}),i("flex",()=>[{supportsFractions:!0}]),n("shrink",{defaultValue:"1",handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("flex-shrink",o)]}),n("grow",{defaultValue:"1",handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("flex-grow",o)]}),i("shrink",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),i("grow",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),e("basis-auto",[["flex-basis","auto"]]),e("basis-full",[["flex-basis","100%"]]),a("basis",["--flex-basis","--spacing","--container"],o=>[l("flex-basis",o)],{supportsFractions:!0}),e("table-auto",[["table-layout","auto"]]),e("table-fixed",[["table-layout","fixed"]]),e("caption-top",[["caption-side","top"]]),e("caption-bottom",[["caption-side","bottom"]]),e("border-collapse",[["border-collapse","collapse"]]),e("border-separate",[["border-collapse","separate"]]);let c=()=>L([$("--tw-border-spacing-x","0",""),$("--tw-border-spacing-y","0","")]);a("border-spacing",["--border-spacing","--spacing"],o=>[c(),l("--tw-border-spacing-x",o),l("--tw-border-spacing-y",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),a("border-spacing-x",["--border-spacing","--spacing"],o=>[c(),l("--tw-border-spacing-x",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),a("border-spacing-y",["--border-spacing","--spacing"],o=>[c(),l("--tw-border-spacing-y",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),e("origin-center",[["transform-origin","center"]]),e("origin-top",[["transform-origin","top"]]),e("origin-top-right",[["transform-origin","top right"]]),e("origin-right",[["transform-origin","right"]]),e("origin-bottom-right",[["transform-origin","bottom right"]]),e("origin-bottom",[["transform-origin","bottom"]]),e("origin-bottom-left",[["transform-origin","bottom left"]]),e("origin-left",[["transform-origin","left"]]),e("origin-top-left",[["transform-origin","top left"]]),n("origin",{themeKeys:["--transform-origin"],handle:o=>[l("transform-origin",o)]}),e("perspective-origin-center",[["perspective-origin","center"]]),e("perspective-origin-top",[["perspective-origin","top"]]),e("perspective-origin-top-right",[["perspective-origin","top right"]]),e("perspective-origin-right",[["perspective-origin","right"]]),e("perspective-origin-bottom-right",[["perspective-origin","bottom right"]]),e("perspective-origin-bottom",[["perspective-origin","bottom"]]),e("perspective-origin-bottom-left",[["perspective-origin","bottom left"]]),e("perspective-origin-left",[["perspective-origin","left"]]),e("perspective-origin-top-left",[["perspective-origin","top left"]]),n("perspective-origin",{themeKeys:["--perspective-origin"],handle:o=>[l("perspective-origin",o)]}),e("perspective-none",[["perspective","none"]]),n("perspective",{themeKeys:["--perspective"],handle:o=>[l("perspective",o)]});let u=()=>L([$("--tw-translate-x","0"),$("--tw-translate-y","0"),$("--tw-translate-z","0")]);e("translate-none",[["translate","none"]]),e("-translate-full",[u,["--tw-translate-x","-100%"],["--tw-translate-y","-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e("translate-full",[u,["--tw-translate-x","100%"],["--tw-translate-y","100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),a("translate",["--translate","--spacing"],o=>[u(),l("--tw-translate-x",o),l("--tw-translate-y",o),l("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});for(let o of["x","y"])e(`-translate-${o}-full`,[u,[`--tw-translate-${o}`,"-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e(`translate-${o}-full`,[u,[`--tw-translate-${o}`,"100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),a(`translate-${o}`,["--translate","--spacing"],p=>[u(),l(`--tw-translate-${o}`,p),l("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});a("translate-z",["--translate","--spacing"],o=>[u(),l("--tw-translate-z",o),l("translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)")],{supportsNegative:!0}),e("translate-3d",[u,["translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)"]]);let f=()=>L([$("--tw-scale-x","1"),$("--tw-scale-y","1"),$("--tw-scale-z","1")]);e("scale-none",[["scale","none"]]);function g({negative:o}){return p=>{if(!p.value||p.modifier)return;let h;return p.value.kind==="arbitrary"?(h=p.value.value,h=o?`calc(${h} * -1)`:h,[l("scale",h)]):(h=r.resolve(p.value.value,["--scale"]),!h&&E(p.value.value)&&(h=`${p.value.value}%`),h?(h=o?`calc(${h} * -1)`:h,[f(),l("--tw-scale-x",h),l("--tw-scale-y",h),l("--tw-scale-z",h),l("scale","var(--tw-scale-x) var(--tw-scale-y)")]):void 0)}}t.functional("-scale",g({negative:!0})),t.functional("scale",g({negative:!1})),i("scale",()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);for(let o of["x","y","z"])n(`scale-${o}`,{supportsNegative:!0,themeKeys:["--scale"],handleBareValue:({value:p})=>E(p)?`${p}%`:null,handle:p=>[f(),l(`--tw-scale-${o}`,p),l("scale",`var(--tw-scale-x) var(--tw-scale-y)${o==="z"?" var(--tw-scale-z)":""}`)]}),i(`scale-${o}`,()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);e("scale-3d",[f,["scale","var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)"]]),e("rotate-none",[["rotate","none"]]);function d({negative:o}){return p=>{if(!p.value||p.modifier)return;let h;if(p.value.kind==="arbitrary"){h=p.value.value;let A=p.value.dataType??J(h,["angle","vector"]);if(A==="vector")return[l("rotate",`${h} var(--tw-rotate)`)];if(A!=="angle")return[l("rotate",o?`calc(${h} * -1)`:h)]}else if(h=r.resolve(p.value.value,["--rotate"]),!h&&E(p.value.value)&&(h=`${p.value.value}deg`),!h)return;return[l("rotate",o?`calc(${h} * -1)`:h)]}}t.functional("-rotate",d({negative:!0})),t.functional("rotate",d({negative:!1})),i("rotate",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);{let o=["var(--tw-rotate-x,)","var(--tw-rotate-y,)","var(--tw-rotate-z,)","var(--tw-skew-x,)","var(--tw-skew-y,)"].join(" "),p=()=>L([$("--tw-rotate-x"),$("--tw-rotate-y"),$("--tw-rotate-z"),$("--tw-skew-x"),$("--tw-skew-y")]);for(let h of["x","y","z"])n(`rotate-${h}`,{supportsNegative:!0,themeKeys:["--rotate"],handleBareValue:({value:A})=>E(A)?`${A}deg`:null,handle:A=>[p(),l(`--tw-rotate-${h}`,`rotate${h.toUpperCase()}(${A})`),l("transform",o)]}),i(`rotate-${h}`,()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);n("skew",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>E(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-x",`skewX(${h})`),l("--tw-skew-y",`skewY(${h})`),l("transform",o)]}),n("skew-x",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>E(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-x",`skewX(${h})`),l("transform",o)]}),n("skew-y",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>E(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-y",`skewY(${h})`),l("transform",o)]}),i("skew",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-x",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-y",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),t.functional("transform",h=>{if(h.modifier)return;let A=null;if(h.value?h.value.kind==="arbitrary"&&(A=h.value.value):A=o,A!==null)return[p(),l("transform",A)]}),i("transform",()=>[{hasDefaultValue:!0}]),e("transform-cpu",[["transform",o]]),e("transform-gpu",[["transform",`translateZ(0) ${o}`]]),e("transform-none",[["transform","none"]])}e("transform-flat",[["transform-style","flat"]]),e("transform-3d",[["transform-style","preserve-3d"]]),e("transform-content",[["transform-box","content-box"]]),e("transform-border",[["transform-box","border-box"]]),e("transform-fill",[["transform-box","fill-box"]]),e("transform-stroke",[["transform-box","stroke-box"]]),e("transform-view",[["transform-box","view-box"]]),e("backface-visible",[["backface-visibility","visible"]]),e("backface-hidden",[["backface-visibility","hidden"]]);for(let o of["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out"])e(`cursor-${o}`,[["cursor",o]]);n("cursor",{themeKeys:["--cursor"],handle:o=>[l("cursor",o)]});for(let o of["auto","none","manipulation"])e(`touch-${o}`,[["touch-action",o]]);let m=()=>L([$("--tw-pan-x"),$("--tw-pan-y"),$("--tw-pinch-zoom")]);for(let o of["x","left","right"])e(`touch-pan-${o}`,[m,["--tw-pan-x",`pan-${o}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let o of["y","up","down"])e(`touch-pan-${o}`,[m,["--tw-pan-y",`pan-${o}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);e("touch-pinch-zoom",[m,["--tw-pinch-zoom","pinch-zoom"],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let o of["none","text","all","auto"])e(`select-${o}`,[["-webkit-user-select",o],["user-select",o]]);e("resize-none",[["resize","none"]]),e("resize-x",[["resize","horizontal"]]),e("resize-y",[["resize","vertical"]]),e("resize",[["resize","both"]]),e("snap-none",[["scroll-snap-type","none"]]);let w=()=>L([$("--tw-scroll-snap-strictness","proximity","*")]);for(let o of["x","y","both"])e(`snap-${o}`,[w,["scroll-snap-type",`${o} var(--tw-scroll-snap-strictness)`]]);e("snap-mandatory",[w,["--tw-scroll-snap-strictness","mandatory"]]),e("snap-proximity",[w,["--tw-scroll-snap-strictness","proximity"]]),e("snap-align-none",[["scroll-snap-align","none"]]),e("snap-start",[["scroll-snap-align","start"]]),e("snap-end",[["scroll-snap-align","end"]]),e("snap-center",[["scroll-snap-align","center"]]),e("snap-normal",[["scroll-snap-stop","normal"]]),e("snap-always",[["scroll-snap-stop","always"]]);for(let[o,p]of[["scroll-m","scroll-margin"],["scroll-mx","scroll-margin-inline"],["scroll-my","scroll-margin-block"],["scroll-ms","scroll-margin-inline-start"],["scroll-me","scroll-margin-inline-end"],["scroll-mt","scroll-margin-top"],["scroll-mr","scroll-margin-right"],["scroll-mb","scroll-margin-bottom"],["scroll-ml","scroll-margin-left"]])a(o,["--scroll-margin","--spacing"],h=>[l(p,h)],{supportsNegative:!0});for(let[o,p]of[["scroll-p","scroll-padding"],["scroll-px","scroll-padding-inline"],["scroll-py","scroll-padding-block"],["scroll-ps","scroll-padding-inline-start"],["scroll-pe","scroll-padding-inline-end"],["scroll-pt","scroll-padding-top"],["scroll-pr","scroll-padding-right"],["scroll-pb","scroll-padding-bottom"],["scroll-pl","scroll-padding-left"]])a(o,["--scroll-padding","--spacing"],h=>[l(p,h)]);e("list-inside",[["list-style-position","inside"]]),e("list-outside",[["list-style-position","outside"]]),e("list-none",[["list-style-type","none"]]),e("list-disc",[["list-style-type","disc"]]),e("list-decimal",[["list-style-type","decimal"]]),n("list",{themeKeys:["--list-style-type"],handle:o=>[l("list-style-type",o)]}),e("list-image-none",[["list-style-image","none"]]),n("list-image",{themeKeys:["--list-style-image"],handle:o=>[l("list-style-image",o)]}),e("appearance-none",[["appearance","none"]]),e("appearance-auto",[["appearance","auto"]]),e("scheme-normal",[["color-scheme","normal"]]),e("scheme-dark",[["color-scheme","dark"]]),e("scheme-light",[["color-scheme","light"]]),e("scheme-light-dark",[["color-scheme","light dark"]]),e("scheme-only-dark",[["color-scheme","only dark"]]),e("scheme-only-light",[["color-scheme","only light"]]),e("columns-auto",[["columns","auto"]]),n("columns",{themeKeys:["--columns","--container"],handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("columns",o)]}),i("columns",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--columns","--container"]}]);for(let o of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-before-${o}`,[["break-before",o]]);for(let o of["auto","avoid","avoid-page","avoid-column"])e(`break-inside-${o}`,[["break-inside",o]]);for(let o of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-after-${o}`,[["break-after",o]]);e("grid-flow-row",[["grid-auto-flow","row"]]),e("grid-flow-col",[["grid-auto-flow","column"]]),e("grid-flow-dense",[["grid-auto-flow","dense"]]),e("grid-flow-row-dense",[["grid-auto-flow","row dense"]]),e("grid-flow-col-dense",[["grid-auto-flow","column dense"]]),e("auto-cols-auto",[["grid-auto-columns","auto"]]),e("auto-cols-min",[["grid-auto-columns","min-content"]]),e("auto-cols-max",[["grid-auto-columns","max-content"]]),e("auto-cols-fr",[["grid-auto-columns","minmax(0, 1fr)"]]),n("auto-cols",{themeKeys:["--grid-auto-columns"],handle:o=>[l("grid-auto-columns",o)]}),e("auto-rows-auto",[["grid-auto-rows","auto"]]),e("auto-rows-min",[["grid-auto-rows","min-content"]]),e("auto-rows-max",[["grid-auto-rows","max-content"]]),e("auto-rows-fr",[["grid-auto-rows","minmax(0, 1fr)"]]),n("auto-rows",{themeKeys:["--grid-auto-rows"],handle:o=>[l("grid-auto-rows",o)]}),e("grid-cols-none",[["grid-template-columns","none"]]),e("grid-cols-subgrid",[["grid-template-columns","subgrid"]]),n("grid-cols",{themeKeys:["--grid-template-columns"],handleBareValue:({value:o})=>lt(o)?`repeat(${o}, minmax(0, 1fr))`:null,handle:o=>[l("grid-template-columns",o)]}),e("grid-rows-none",[["grid-template-rows","none"]]),e("grid-rows-subgrid",[["grid-template-rows","subgrid"]]),n("grid-rows",{themeKeys:["--grid-template-rows"],handleBareValue:({value:o})=>lt(o)?`repeat(${o}, minmax(0, 1fr))`:null,handle:o=>[l("grid-template-rows",o)]}),i("grid-cols",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-template-columns"]}]),i("grid-rows",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-template-rows"]}]),e("flex-row",[["flex-direction","row"]]),e("flex-row-reverse",[["flex-direction","row-reverse"]]),e("flex-col",[["flex-direction","column"]]),e("flex-col-reverse",[["flex-direction","column-reverse"]]),e("flex-wrap",[["flex-wrap","wrap"]]),e("flex-nowrap",[["flex-wrap","nowrap"]]),e("flex-wrap-reverse",[["flex-wrap","wrap-reverse"]]),e("place-content-center",[["place-content","center"]]),e("place-content-start",[["place-content","start"]]),e("place-content-end",[["place-content","end"]]),e("place-content-center-safe",[["place-content","safe center"]]),e("place-content-end-safe",[["place-content","safe end"]]),e("place-content-between",[["place-content","space-between"]]),e("place-content-around",[["place-content","space-around"]]),e("place-content-evenly",[["place-content","space-evenly"]]),e("place-content-baseline",[["place-content","baseline"]]),e("place-content-stretch",[["place-content","stretch"]]),e("place-items-center",[["place-items","center"]]),e("place-items-start",[["place-items","start"]]),e("place-items-end",[["place-items","end"]]),e("place-items-center-safe",[["place-items","safe center"]]),e("place-items-end-safe",[["place-items","safe end"]]),e("place-items-baseline",[["place-items","baseline"]]),e("place-items-stretch",[["place-items","stretch"]]),e("content-normal",[["align-content","normal"]]),e("content-center",[["align-content","center"]]),e("content-start",[["align-content","flex-start"]]),e("content-end",[["align-content","flex-end"]]),e("content-center-safe",[["align-content","safe center"]]),e("content-end-safe",[["align-content","safe flex-end"]]),e("content-between",[["align-content","space-between"]]),e("content-around",[["align-content","space-around"]]),e("content-evenly",[["align-content","space-evenly"]]),e("content-baseline",[["align-content","baseline"]]),e("content-stretch",[["align-content","stretch"]]),e("items-center",[["align-items","center"]]),e("items-start",[["align-items","flex-start"]]),e("items-end",[["align-items","flex-end"]]),e("items-center-safe",[["align-items","safe center"]]),e("items-end-safe",[["align-items","safe flex-end"]]),e("items-baseline",[["align-items","baseline"]]),e("items-baseline-last",[["align-items","last baseline"]]),e("items-stretch",[["align-items","stretch"]]),e("justify-normal",[["justify-content","normal"]]),e("justify-center",[["justify-content","center"]]),e("justify-start",[["justify-content","flex-start"]]),e("justify-end",[["justify-content","flex-end"]]),e("justify-center-safe",[["justify-content","safe center"]]),e("justify-end-safe",[["justify-content","safe flex-end"]]),e("justify-between",[["justify-content","space-between"]]),e("justify-around",[["justify-content","space-around"]]),e("justify-evenly",[["justify-content","space-evenly"]]),e("justify-baseline",[["justify-content","baseline"]]),e("justify-stretch",[["justify-content","stretch"]]),e("justify-items-normal",[["justify-items","normal"]]),e("justify-items-center",[["justify-items","center"]]),e("justify-items-start",[["justify-items","start"]]),e("justify-items-end",[["justify-items","end"]]),e("justify-items-center-safe",[["justify-items","safe center"]]),e("justify-items-end-safe",[["justify-items","safe end"]]),e("justify-items-stretch",[["justify-items","stretch"]]),a("gap",["--gap","--spacing"],o=>[l("gap",o)]),a("gap-x",["--gap","--spacing"],o=>[l("column-gap",o)]),a("gap-y",["--gap","--spacing"],o=>[l("row-gap",o)]),a("space-x",["--space","--spacing"],o=>[L([$("--tw-space-x-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","row-gap"),l("--tw-space-x-reverse","0"),l("margin-inline-start",`calc(${o} * var(--tw-space-x-reverse))`),l("margin-inline-end",`calc(${o} * calc(1 - var(--tw-space-x-reverse)))`)])],{supportsNegative:!0}),a("space-y",["--space","--spacing"],o=>[L([$("--tw-space-y-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","column-gap"),l("--tw-space-y-reverse","0"),l("margin-block-start",`calc(${o} * var(--tw-space-y-reverse))`),l("margin-block-end",`calc(${o} * calc(1 - var(--tw-space-y-reverse)))`)])],{supportsNegative:!0}),e("space-x-reverse",[()=>L([$("--tw-space-x-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-sort","row-gap"),l("--tw-space-x-reverse","1")])]),e("space-y-reverse",[()=>L([$("--tw-space-y-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-sort","column-gap"),l("--tw-space-y-reverse","1")])]),e("accent-auto",[["accent-color","auto"]]),s("accent",{themeKeys:["--accent-color","--color"],handle:o=>[l("accent-color",o)]}),s("caret",{themeKeys:["--caret-color","--color"],handle:o=>[l("caret-color",o)]}),s("divide",{themeKeys:["--divide-color","--color"],handle:o=>[M(":where(& > :not(:last-child))",[l("--tw-sort","divide-color"),l("border-color",o)])]}),e("place-self-auto",[["place-self","auto"]]),e("place-self-start",[["place-self","start"]]),e("place-self-end",[["place-self","end"]]),e("place-self-center",[["place-self","center"]]),e("place-self-end-safe",[["place-self","safe end"]]),e("place-self-center-safe",[["place-self","safe center"]]),e("place-self-stretch",[["place-self","stretch"]]),e("self-auto",[["align-self","auto"]]),e("self-start",[["align-self","flex-start"]]),e("self-end",[["align-self","flex-end"]]),e("self-center",[["align-self","center"]]),e("self-end-safe",[["align-self","safe flex-end"]]),e("self-center-safe",[["align-self","safe center"]]),e("self-stretch",[["align-self","stretch"]]),e("self-baseline",[["align-self","baseline"]]),e("self-baseline-last",[["align-self","last baseline"]]),e("justify-self-auto",[["justify-self","auto"]]),e("justify-self-start",[["justify-self","flex-start"]]),e("justify-self-end",[["justify-self","flex-end"]]),e("justify-self-center",[["justify-self","center"]]),e("justify-self-end-safe",[["justify-self","safe flex-end"]]),e("justify-self-center-safe",[["justify-self","safe center"]]),e("justify-self-stretch",[["justify-self","stretch"]]);for(let o of["auto","hidden","clip","visible","scroll"])e(`overflow-${o}`,[["overflow",o]]),e(`overflow-x-${o}`,[["overflow-x",o]]),e(`overflow-y-${o}`,[["overflow-y",o]]);for(let o of["auto","contain","none"])e(`overscroll-${o}`,[["overscroll-behavior",o]]),e(`overscroll-x-${o}`,[["overscroll-behavior-x",o]]),e(`overscroll-y-${o}`,[["overscroll-behavior-y",o]]);e("scroll-auto",[["scroll-behavior","auto"]]),e("scroll-smooth",[["scroll-behavior","smooth"]]),e("truncate",[["overflow","hidden"],["text-overflow","ellipsis"],["white-space","nowrap"]]),e("text-ellipsis",[["text-overflow","ellipsis"]]),e("text-clip",[["text-overflow","clip"]]),e("hyphens-none",[["-webkit-hyphens","none"],["hyphens","none"]]),e("hyphens-manual",[["-webkit-hyphens","manual"],["hyphens","manual"]]),e("hyphens-auto",[["-webkit-hyphens","auto"],["hyphens","auto"]]),e("whitespace-normal",[["white-space","normal"]]),e("whitespace-nowrap",[["white-space","nowrap"]]),e("whitespace-pre",[["white-space","pre"]]),e("whitespace-pre-line",[["white-space","pre-line"]]),e("whitespace-pre-wrap",[["white-space","pre-wrap"]]),e("whitespace-break-spaces",[["white-space","break-spaces"]]),e("text-wrap",[["text-wrap","wrap"]]),e("text-nowrap",[["text-wrap","nowrap"]]),e("text-balance",[["text-wrap","balance"]]),e("text-pretty",[["text-wrap","pretty"]]),e("break-normal",[["overflow-wrap","normal"],["word-break","normal"]]),e("break-words",[["overflow-wrap","break-word"]]),e("break-all",[["word-break","break-all"]]),e("break-keep",[["word-break","keep-all"]]),e("wrap-anywhere",[["overflow-wrap","anywhere"]]),e("wrap-break-word",[["overflow-wrap","break-word"]]),e("wrap-normal",[["overflow-wrap","normal"]]);for(let[o,p]of[["rounded",["border-radius"]],["rounded-s",["border-start-start-radius","border-end-start-radius"]],["rounded-e",["border-start-end-radius","border-end-end-radius"]],["rounded-t",["border-top-left-radius","border-top-right-radius"]],["rounded-r",["border-top-right-radius","border-bottom-right-radius"]],["rounded-b",["border-bottom-right-radius","border-bottom-left-radius"]],["rounded-l",["border-top-left-radius","border-bottom-left-radius"]],["rounded-ss",["border-start-start-radius"]],["rounded-se",["border-start-end-radius"]],["rounded-ee",["border-end-end-radius"]],["rounded-es",["border-end-start-radius"]],["rounded-tl",["border-top-left-radius"]],["rounded-tr",["border-top-right-radius"]],["rounded-br",["border-bottom-right-radius"]],["rounded-bl",["border-bottom-left-radius"]]])e(`${o}-none`,p.map(h=>[h,"0"])),e(`${o}-full`,p.map(h=>[h,"calc(infinity * 1px)"])),n(o,{themeKeys:["--radius"],handle:h=>p.map(A=>l(A,h))});e("border-solid",[["--tw-border-style","solid"],["border-style","solid"]]),e("border-dashed",[["--tw-border-style","dashed"],["border-style","dashed"]]),e("border-dotted",[["--tw-border-style","dotted"],["border-style","dotted"]]),e("border-double",[["--tw-border-style","double"],["border-style","double"]]),e("border-hidden",[["--tw-border-style","hidden"],["border-style","hidden"]]),e("border-none",[["--tw-border-style","none"],["border-style","none"]]);{let p=function(h,A){t.functional(h,y=>{if(!y.value){if(y.modifier)return;let C=r.get(["--default-border-width"])??"1px",O=A.width(C);return O?[o(),...O]:void 0}if(y.value.kind==="arbitrary"){let C=y.value.value;switch(y.value.dataType??J(C,["color","line-width","length"])){case"line-width":case"length":{if(y.modifier)return;let V=A.width(C);return V?[o(),...V]:void 0}default:return C=X(C,y.modifier,r),C===null?void 0:A.color(C)}}{let C=te(y,r,["--border-color","--color"]);if(C)return A.color(C)}{if(y.modifier)return;let C=r.resolve(y.value.value,["--border-width"]);if(C){let O=A.width(C);return O?[o(),...O]:void 0}if(E(y.value.value)){let O=A.width(`${y.value.value}px`);return O?[o(),...O]:void 0}}}),i(h,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--border-color","--color"],modifiers:Array.from({length:21},(y,C)=>`${C*5}`),hasDefaultValue:!0},{values:["0","2","4","8"],valueThemeKeys:["--border-width"]}])};var K=p;let o=()=>L([$("--tw-border-style","solid")]);p("border",{width:h=>[l("border-style","var(--tw-border-style)"),l("border-width",h)],color:h=>[l("border-color",h)]}),p("border-x",{width:h=>[l("border-inline-style","var(--tw-border-style)"),l("border-inline-width",h)],color:h=>[l("border-inline-color",h)]}),p("border-y",{width:h=>[l("border-block-style","var(--tw-border-style)"),l("border-block-width",h)],color:h=>[l("border-block-color",h)]}),p("border-s",{width:h=>[l("border-inline-start-style","var(--tw-border-style)"),l("border-inline-start-width",h)],color:h=>[l("border-inline-start-color",h)]}),p("border-e",{width:h=>[l("border-inline-end-style","var(--tw-border-style)"),l("border-inline-end-width",h)],color:h=>[l("border-inline-end-color",h)]}),p("border-t",{width:h=>[l("border-top-style","var(--tw-border-style)"),l("border-top-width",h)],color:h=>[l("border-top-color",h)]}),p("border-r",{width:h=>[l("border-right-style","var(--tw-border-style)"),l("border-right-width",h)],color:h=>[l("border-right-color",h)]}),p("border-b",{width:h=>[l("border-bottom-style","var(--tw-border-style)"),l("border-bottom-width",h)],color:h=>[l("border-bottom-color",h)]}),p("border-l",{width:h=>[l("border-left-style","var(--tw-border-style)"),l("border-left-width",h)],color:h=>[l("border-left-color",h)]}),n("divide-x",{defaultValue:r.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:h})=>E(h)?`${h}px`:null,handle:h=>[L([$("--tw-divide-x-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","divide-x-width"),o(),l("--tw-divide-x-reverse","0"),l("border-inline-style","var(--tw-border-style)"),l("border-inline-start-width",`calc(${h} * var(--tw-divide-x-reverse))`),l("border-inline-end-width",`calc(${h} * calc(1 - var(--tw-divide-x-reverse)))`)])]}),n("divide-y",{defaultValue:r.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:h})=>E(h)?`${h}px`:null,handle:h=>[L([$("--tw-divide-y-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","divide-y-width"),o(),l("--tw-divide-y-reverse","0"),l("border-bottom-style","var(--tw-border-style)"),l("border-top-style","var(--tw-border-style)"),l("border-top-width",`calc(${h} * var(--tw-divide-y-reverse))`),l("border-bottom-width",`calc(${h} * calc(1 - var(--tw-divide-y-reverse)))`)])]}),i("divide-x",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),i("divide-y",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),e("divide-x-reverse",[()=>L([$("--tw-divide-x-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-divide-x-reverse","1")])]),e("divide-y-reverse",[()=>L([$("--tw-divide-y-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-divide-y-reverse","1")])]);for(let h of["solid","dashed","dotted","double","none"])e(`divide-${h}`,[()=>M(":where(& > :not(:last-child))",[l("--tw-sort","divide-style"),l("--tw-border-style",h),l("border-style",h)])])}e("bg-auto",[["background-size","auto"]]),e("bg-cover",[["background-size","cover"]]),e("bg-contain",[["background-size","contain"]]),n("bg-size",{handle(o){if(o)return[l("background-size",o)]}}),e("bg-fixed",[["background-attachment","fixed"]]),e("bg-local",[["background-attachment","local"]]),e("bg-scroll",[["background-attachment","scroll"]]),e("bg-top",[["background-position","top"]]),e("bg-top-left",[["background-position","left top"]]),e("bg-top-right",[["background-position","right top"]]),e("bg-bottom",[["background-position","bottom"]]),e("bg-bottom-left",[["background-position","left bottom"]]),e("bg-bottom-right",[["background-position","right bottom"]]),e("bg-left",[["background-position","left"]]),e("bg-right",[["background-position","right"]]),e("bg-center",[["background-position","center"]]),n("bg-position",{handle(o){if(o)return[l("background-position",o)]}}),e("bg-repeat",[["background-repeat","repeat"]]),e("bg-no-repeat",[["background-repeat","no-repeat"]]),e("bg-repeat-x",[["background-repeat","repeat-x"]]),e("bg-repeat-y",[["background-repeat","repeat-y"]]),e("bg-repeat-round",[["background-repeat","round"]]),e("bg-repeat-space",[["background-repeat","space"]]),e("bg-none",[["background-image","none"]]);{let h=function(C){let O="in oklab";if(C?.kind==="named")switch(C.value){case"longer":case"shorter":case"increasing":case"decreasing":O=`in oklch ${C.value} hue`;break;default:O=`in ${C.value}`}else C?.kind==="arbitrary"&&(O=C.value);return O},A=function({negative:C}){return O=>{if(!O.value)return;if(O.value.kind==="arbitrary"){if(O.modifier)return;let j=O.value.value;switch(O.value.dataType??J(j,["angle"])){case"angle":return j=C?`calc(${j} * -1)`:`${j}`,[l("--tw-gradient-position",j),l("background-image",`linear-gradient(var(--tw-gradient-stops,${j}))`)];default:return C?void 0:[l("--tw-gradient-position",j),l("background-image",`linear-gradient(var(--tw-gradient-stops,${j}))`)]}}let V=O.value.value;if(!C&&p.has(V))V=p.get(V);else if(E(V))V=C?`calc(${V}deg * -1)`:`${V}deg`;else return;let T=h(O.modifier);return[l("--tw-gradient-position",`${V}`),H("@supports (background-image: linear-gradient(in lab, red, red))",[l("--tw-gradient-position",`${V} ${T}`)]),l("background-image","linear-gradient(var(--tw-gradient-stops))")]}},y=function({negative:C}){return O=>{if(O.value?.kind==="arbitrary"){if(O.modifier)return;let j=O.value.value;return[l("--tw-gradient-position",j),l("background-image",`conic-gradient(var(--tw-gradient-stops,${j}))`)]}let V=h(O.modifier);if(!O.value)return[l("--tw-gradient-position",V),l("background-image","conic-gradient(var(--tw-gradient-stops))")];let T=O.value.value;if(E(T))return T=C?`calc(${T}deg * -1)`:`${T}deg`,[l("--tw-gradient-position",`from ${T} ${V}`),l("background-image","conic-gradient(var(--tw-gradient-stops))")]}};var G=h,I=A,W=y;let o=["oklab","oklch","srgb","hsl","longer","shorter","increasing","decreasing"],p=new Map([["to-t","to top"],["to-tr","to top right"],["to-r","to right"],["to-br","to bottom right"],["to-b","to bottom"],["to-bl","to bottom left"],["to-l","to left"],["to-tl","to top left"]]);t.functional("-bg-linear",A({negative:!0})),t.functional("bg-linear",A({negative:!1})),i("bg-linear",()=>[{values:[...p.keys()],modifiers:o},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:o}]),t.functional("-bg-conic",y({negative:!0})),t.functional("bg-conic",y({negative:!1})),i("bg-conic",()=>[{hasDefaultValue:!0,modifiers:o},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:o}]),t.functional("bg-radial",C=>{if(!C.value){let O=h(C.modifier);return[l("--tw-gradient-position",O),l("background-image","radial-gradient(var(--tw-gradient-stops))")]}if(C.value.kind==="arbitrary"){if(C.modifier)return;let O=C.value.value;return[l("--tw-gradient-position",O),l("background-image",`radial-gradient(var(--tw-gradient-stops,${O}))`)]}}),i("bg-radial",()=>[{hasDefaultValue:!0,modifiers:o}])}t.functional("bg",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??J(p,["image","color","percentage","position","bg-size","length","url"])){case"percentage":case"position":return o.modifier?void 0:[l("background-position",p)];case"bg-size":case"length":case"size":return o.modifier?void 0:[l("background-size",p)];case"image":case"url":return o.modifier?void 0:[l("background-image",p)];default:return p=X(p,o.modifier,r),p===null?void 0:[l("background-color",p)]}}{let p=te(o,r,["--background-color","--color"]);if(p)return[l("background-color",p)]}{if(o.modifier)return;let p=r.resolve(o.value.value,["--background-image"]);if(p)return[l("background-image",p)]}}}),i("bg",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:[],valueThemeKeys:["--background-image"]}]);let v=()=>L([$("--tw-gradient-position"),$("--tw-gradient-from","#0000",""),$("--tw-gradient-via","#0000",""),$("--tw-gradient-to","#0000",""),$("--tw-gradient-stops"),$("--tw-gradient-via-stops"),$("--tw-gradient-from-position","0%",""),$("--tw-gradient-via-position","50%",""),$("--tw-gradient-to-position","100%","")]);function x(o,p){t.functional(o,h=>{if(h.value){if(h.value.kind==="arbitrary"){let A=h.value.value;switch(h.value.dataType??J(A,["color","length","percentage"])){case"length":case"percentage":return h.modifier?void 0:p.position(A);default:return A=X(A,h.modifier,r),A===null?void 0:p.color(A)}}{let A=te(h,r,["--background-color","--color"]);if(A)return p.color(A)}{if(h.modifier)return;let A=r.resolve(h.value.value,["--gradient-color-stop-positions"]);if(A)return p.position(A);if(h.value.value[h.value.value.length-1]==="%"&&E(h.value.value.slice(0,-1)))return p.position(h.value.value)}}}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)},{values:Array.from({length:21},(h,A)=>`${A*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}])}x("from",{color:o=>[v(),l("--tw-sort","--tw-gradient-from"),l("--tw-gradient-from",o),l("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:o=>[v(),l("--tw-gradient-from-position",o)]}),e("via-none",[["--tw-gradient-via-stops","initial"]]),x("via",{color:o=>[v(),l("--tw-sort","--tw-gradient-via"),l("--tw-gradient-via",o),l("--tw-gradient-via-stops","var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position)"),l("--tw-gradient-stops","var(--tw-gradient-via-stops)")],position:o=>[v(),l("--tw-gradient-via-position",o)]}),x("to",{color:o=>[v(),l("--tw-sort","--tw-gradient-to"),l("--tw-gradient-to",o),l("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:o=>[v(),l("--tw-gradient-to-position",o)]}),e("mask-none",[["mask-image","none"]]),t.functional("mask",o=>{if(!o.value||o.modifier||o.value.kind!=="arbitrary")return;let p=o.value.value;switch(o.value.dataType??J(p,["image","percentage","position","bg-size","length","url"])){case"percentage":case"position":return o.modifier?void 0:[l("mask-position",p)];case"bg-size":case"length":case"size":return[l("mask-size",p)];case"image":case"url":default:return[l("mask-image",p)]}}),e("mask-add",[["mask-composite","add"]]),e("mask-subtract",[["mask-composite","subtract"]]),e("mask-intersect",[["mask-composite","intersect"]]),e("mask-exclude",[["mask-composite","exclude"]]),e("mask-alpha",[["mask-mode","alpha"]]),e("mask-luminance",[["mask-mode","luminance"]]),e("mask-match",[["mask-mode","match-source"]]),e("mask-type-alpha",[["mask-type","alpha"]]),e("mask-type-luminance",[["mask-type","luminance"]]),e("mask-auto",[["mask-size","auto"]]),e("mask-cover",[["mask-size","cover"]]),e("mask-contain",[["mask-size","contain"]]),n("mask-size",{handle(o){if(o)return[l("mask-size",o)]}}),e("mask-top",[["mask-position","top"]]),e("mask-top-left",[["mask-position","left top"]]),e("mask-top-right",[["mask-position","right top"]]),e("mask-bottom",[["mask-position","bottom"]]),e("mask-bottom-left",[["mask-position","left bottom"]]),e("mask-bottom-right",[["mask-position","right bottom"]]),e("mask-left",[["mask-position","left"]]),e("mask-right",[["mask-position","right"]]),e("mask-center",[["mask-position","center"]]),n("mask-position",{handle(o){if(o)return[l("mask-position",o)]}}),e("mask-repeat",[["mask-repeat","repeat"]]),e("mask-no-repeat",[["mask-repeat","no-repeat"]]),e("mask-repeat-x",[["mask-repeat","repeat-x"]]),e("mask-repeat-y",[["mask-repeat","repeat-y"]]),e("mask-repeat-round",[["mask-repeat","round"]]),e("mask-repeat-space",[["mask-repeat","space"]]),e("mask-clip-border",[["mask-clip","border-box"]]),e("mask-clip-padding",[["mask-clip","padding-box"]]),e("mask-clip-content",[["mask-clip","content-box"]]),e("mask-clip-fill",[["mask-clip","fill-box"]]),e("mask-clip-stroke",[["mask-clip","stroke-box"]]),e("mask-clip-view",[["mask-clip","view-box"]]),e("mask-no-clip",[["mask-clip","no-clip"]]),e("mask-origin-border",[["mask-origin","border-box"]]),e("mask-origin-padding",[["mask-origin","padding-box"]]),e("mask-origin-content",[["mask-origin","content-box"]]),e("mask-origin-fill",[["mask-origin","fill-box"]]),e("mask-origin-stroke",[["mask-origin","stroke-box"]]),e("mask-origin-view",[["mask-origin","view-box"]]);let k=()=>L([$("--tw-mask-linear","linear-gradient(#fff, #fff)"),$("--tw-mask-radial","linear-gradient(#fff, #fff)"),$("--tw-mask-conic","linear-gradient(#fff, #fff)")]);function N(o,p){t.functional(o,h=>{if(h.value){if(h.value.kind==="arbitrary"){let A=h.value.value;switch(h.value.dataType??J(A,["length","percentage","color"])){case"color":return A=X(A,h.modifier,r),A===null?void 0:p.color(A);case"percentage":return h.modifier||!E(A.slice(0,-1))?void 0:p.position(A);default:return h.modifier?void 0:p.position(A)}}{let A=te(h,r,["--background-color","--color"]);if(A)return p.color(A)}{if(h.modifier)return;let A=J(h.value.value,["number","percentage"]);if(!A)return;switch(A){case"number":{let y=r.resolve(null,["--spacing"]);return!y||!de(h.value.value)?void 0:p.position(`calc(${y} * ${h.value.value})`)}case"percentage":return E(h.value.value.slice(0,-1))?p.position(h.value.value):void 0;default:return}}}}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)},{values:Array.from({length:21},(h,A)=>`${A*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}]),i(o,()=>[{values:Array.from({length:21},(h,A)=>`${A*5}%`)},{values:r.get(["--spacing"])?Ze:[]},{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)}])}let b=()=>L([$("--tw-mask-left","linear-gradient(#fff, #fff)"),$("--tw-mask-right","linear-gradient(#fff, #fff)"),$("--tw-mask-bottom","linear-gradient(#fff, #fff)"),$("--tw-mask-top","linear-gradient(#fff, #fff)")]);function S(o,p,h){N(o,{color(A){let y=[k(),b(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])h[C]&&(y.push(l(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),y.push(L([$(`--tw-mask-${C}-from-position`,"0%"),$(`--tw-mask-${C}-to-position`,"100%"),$(`--tw-mask-${C}-from-color`,"black"),$(`--tw-mask-${C}-to-color`,"transparent")])),y.push(l(`--tw-mask-${C}-${p}-color`,A)));return y},position(A){let y=[k(),b(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])h[C]&&(y.push(l(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),y.push(L([$(`--tw-mask-${C}-from-position`,"0%"),$(`--tw-mask-${C}-to-position`,"100%"),$(`--tw-mask-${C}-from-color`,"black"),$(`--tw-mask-${C}-to-color`,"transparent")])),y.push(l(`--tw-mask-${C}-${p}-position`,A)));return y}})}S("mask-x-from","from",{top:!1,right:!0,bottom:!1,left:!0}),S("mask-x-to","to",{top:!1,right:!0,bottom:!1,left:!0}),S("mask-y-from","from",{top:!0,right:!1,bottom:!0,left:!1}),S("mask-y-to","to",{top:!0,right:!1,bottom:!0,left:!1}),S("mask-t-from","from",{top:!0,right:!1,bottom:!1,left:!1}),S("mask-t-to","to",{top:!0,right:!1,bottom:!1,left:!1}),S("mask-r-from","from",{top:!1,right:!0,bottom:!1,left:!1}),S("mask-r-to","to",{top:!1,right:!0,bottom:!1,left:!1}),S("mask-b-from","from",{top:!1,right:!1,bottom:!0,left:!1}),S("mask-b-to","to",{top:!1,right:!1,bottom:!0,left:!1}),S("mask-l-from","from",{top:!1,right:!1,bottom:!1,left:!0}),S("mask-l-to","to",{top:!1,right:!1,bottom:!1,left:!0});let P=()=>L([$("--tw-mask-linear-position","0deg"),$("--tw-mask-linear-from-position","0%"),$("--tw-mask-linear-to-position","100%"),$("--tw-mask-linear-from-color","black"),$("--tw-mask-linear-to-color","transparent")]);n("mask-linear",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(o){return E(o.value)?`calc(1deg * ${o.value})`:null},handleNegativeBareValue(o){return E(o.value)?`calc(1deg * -${o.value})`:null},handle:o=>[k(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops, var(--tw-mask-linear-position)))"),l("--tw-mask-linear-position",o)]}),i("mask-linear",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),N("mask-linear-from",{color:o=>[k(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-from-color",o)],position:o=>[k(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-from-position",o)]}),N("mask-linear-to",{color:o=>[k(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-to-color",o)],position:o=>[k(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-to-position",o)]});let U=()=>L([$("--tw-mask-radial-from-position","0%"),$("--tw-mask-radial-to-position","100%"),$("--tw-mask-radial-from-color","black"),$("--tw-mask-radial-to-color","transparent"),$("--tw-mask-radial-shape","ellipse"),$("--tw-mask-radial-size","farthest-corner"),$("--tw-mask-radial-position","center")]);e("mask-circle",[["--tw-mask-radial-shape","circle"]]),e("mask-ellipse",[["--tw-mask-radial-shape","ellipse"]]),e("mask-radial-closest-side",[["--tw-mask-radial-size","closest-side"]]),e("mask-radial-farthest-side",[["--tw-mask-radial-size","farthest-side"]]),e("mask-radial-closest-corner",[["--tw-mask-radial-size","closest-corner"]]),e("mask-radial-farthest-corner",[["--tw-mask-radial-size","farthest-corner"]]),e("mask-radial-at-top",[["--tw-mask-radial-position","top"]]),e("mask-radial-at-top-left",[["--tw-mask-radial-position","top left"]]),e("mask-radial-at-top-right",[["--tw-mask-radial-position","top right"]]),e("mask-radial-at-bottom",[["--tw-mask-radial-position","bottom"]]),e("mask-radial-at-bottom-left",[["--tw-mask-radial-position","bottom left"]]),e("mask-radial-at-bottom-right",[["--tw-mask-radial-position","bottom right"]]),e("mask-radial-at-left",[["--tw-mask-radial-position","left"]]),e("mask-radial-at-right",[["--tw-mask-radial-position","right"]]),e("mask-radial-at-center",[["--tw-mask-radial-position","center"]]),n("mask-radial-at",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:o=>[l("--tw-mask-radial-position",o)]}),n("mask-radial",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:o=>[k(),U(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops, var(--tw-mask-radial-size)))"),l("--tw-mask-radial-size",o)]}),N("mask-radial-from",{color:o=>[k(),U(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-from-color",o)],position:o=>[k(),U(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-from-position",o)]}),N("mask-radial-to",{color:o=>[k(),U(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-to-color",o)],position:o=>[k(),U(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-to-position",o)]});let R=()=>L([$("--tw-mask-conic-position","0deg"),$("--tw-mask-conic-from-position","0%"),$("--tw-mask-conic-to-position","100%"),$("--tw-mask-conic-from-color","black"),$("--tw-mask-conic-to-color","transparent")]);n("mask-conic",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(o){return E(o.value)?`calc(1deg * ${o.value})`:null},handleNegativeBareValue(o){return E(o.value)?`calc(1deg * -${o.value})`:null},handle:o=>[k(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops, var(--tw-mask-conic-position)))"),l("--tw-mask-conic-position",o)]}),i("mask-conic",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),N("mask-conic-from",{color:o=>[k(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-from-color",o)],position:o=>[k(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-from-position",o)]}),N("mask-conic-to",{color:o=>[k(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-to-color",o)],position:o=>[k(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-to-position",o)]}),e("box-decoration-slice",[["-webkit-box-decoration-break","slice"],["box-decoration-break","slice"]]),e("box-decoration-clone",[["-webkit-box-decoration-break","clone"],["box-decoration-break","clone"]]),e("bg-clip-text",[["background-clip","text"]]),e("bg-clip-border",[["background-clip","border-box"]]),e("bg-clip-padding",[["background-clip","padding-box"]]),e("bg-clip-content",[["background-clip","content-box"]]),e("bg-origin-border",[["background-origin","border-box"]]),e("bg-origin-padding",[["background-origin","padding-box"]]),e("bg-origin-content",[["background-origin","content-box"]]);for(let o of["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"])e(`bg-blend-${o}`,[["background-blend-mode",o]]),e(`mix-blend-${o}`,[["mix-blend-mode",o]]);e("mix-blend-plus-darker",[["mix-blend-mode","plus-darker"]]),e("mix-blend-plus-lighter",[["mix-blend-mode","plus-lighter"]]),e("fill-none",[["fill","none"]]),t.functional("fill",o=>{if(!o.value)return;if(o.value.kind==="arbitrary"){let h=X(o.value.value,o.modifier,r);return h===null?void 0:[l("fill",h)]}let p=te(o,r,["--fill","--color"]);if(p)return[l("fill",p)]}),i("fill",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--fill","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)}]),e("stroke-none",[["stroke","none"]]),t.functional("stroke",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??J(p,["color","number","length","percentage"])){case"number":case"length":case"percentage":return o.modifier?void 0:[l("stroke-width",p)];default:return p=X(o.value.value,o.modifier,r),p===null?void 0:[l("stroke",p)]}}{let p=te(o,r,["--stroke","--color"]);if(p)return[l("stroke",p)]}{let p=r.resolve(o.value.value,["--stroke-width"]);if(p)return[l("stroke-width",p)];if(E(o.value.value))return[l("stroke-width",o.value.value)]}}}),i("stroke",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--stroke","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2","3"],valueThemeKeys:["--stroke-width"]}]),e("object-contain",[["object-fit","contain"]]),e("object-cover",[["object-fit","cover"]]),e("object-fill",[["object-fit","fill"]]),e("object-none",[["object-fit","none"]]),e("object-scale-down",[["object-fit","scale-down"]]),e("object-top",[["object-position","top"]]),e("object-top-left",[["object-position","left top"]]),e("object-top-right",[["object-position","right top"]]),e("object-bottom",[["object-position","bottom"]]),e("object-bottom-left",[["object-position","left bottom"]]),e("object-bottom-right",[["object-position","right bottom"]]),e("object-left",[["object-position","left"]]),e("object-right",[["object-position","right"]]),e("object-center",[["object-position","center"]]),n("object",{themeKeys:["--object-position"],handle:o=>[l("object-position",o)]});for(let[o,p]of[["p","padding"],["px","padding-inline"],["py","padding-block"],["ps","padding-inline-start"],["pe","padding-inline-end"],["pt","padding-top"],["pr","padding-right"],["pb","padding-bottom"],["pl","padding-left"]])a(o,["--padding","--spacing"],h=>[l(p,h)]);e("text-left",[["text-align","left"]]),e("text-center",[["text-align","center"]]),e("text-right",[["text-align","right"]]),e("text-justify",[["text-align","justify"]]),e("text-start",[["text-align","start"]]),e("text-end",[["text-align","end"]]),a("indent",["--text-indent","--spacing"],o=>[l("text-indent",o)],{supportsNegative:!0}),e("align-baseline",[["vertical-align","baseline"]]),e("align-top",[["vertical-align","top"]]),e("align-middle",[["vertical-align","middle"]]),e("align-bottom",[["vertical-align","bottom"]]),e("align-text-top",[["vertical-align","text-top"]]),e("align-text-bottom",[["vertical-align","text-bottom"]]),e("align-sub",[["vertical-align","sub"]]),e("align-super",[["vertical-align","super"]]),n("align",{themeKeys:[],handle:o=>[l("vertical-align",o)]}),t.functional("font",o=>{if(!(!o.value||o.modifier)){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??J(p,["number","generic-name","family-name"])){case"generic-name":case"family-name":return[l("font-family",p)];default:return[L([$("--tw-font-weight")]),l("--tw-font-weight",p),l("font-weight",p)]}}{let p=r.resolveWith(o.value.value,["--font"],["--font-feature-settings","--font-variation-settings"]);if(p){let[h,A={}]=p;return[l("font-family",h),l("font-feature-settings",A["--font-feature-settings"]),l("font-variation-settings",A["--font-variation-settings"])]}}{let p=r.resolve(o.value.value,["--font-weight"]);if(p)return[L([$("--tw-font-weight")]),l("--tw-font-weight",p),l("font-weight",p)]}}}),i("font",()=>[{values:[],valueThemeKeys:["--font"]},{values:[],valueThemeKeys:["--font-weight"]}]),e("uppercase",[["text-transform","uppercase"]]),e("lowercase",[["text-transform","lowercase"]]),e("capitalize",[["text-transform","capitalize"]]),e("normal-case",[["text-transform","none"]]),e("italic",[["font-style","italic"]]),e("not-italic",[["font-style","normal"]]),e("underline",[["text-decoration-line","underline"]]),e("overline",[["text-decoration-line","overline"]]),e("line-through",[["text-decoration-line","line-through"]]),e("no-underline",[["text-decoration-line","none"]]),e("font-stretch-normal",[["font-stretch","normal"]]),e("font-stretch-ultra-condensed",[["font-stretch","ultra-condensed"]]),e("font-stretch-extra-condensed",[["font-stretch","extra-condensed"]]),e("font-stretch-condensed",[["font-stretch","condensed"]]),e("font-stretch-semi-condensed",[["font-stretch","semi-condensed"]]),e("font-stretch-semi-expanded",[["font-stretch","semi-expanded"]]),e("font-stretch-expanded",[["font-stretch","expanded"]]),e("font-stretch-extra-expanded",[["font-stretch","extra-expanded"]]),e("font-stretch-ultra-expanded",[["font-stretch","ultra-expanded"]]),n("font-stretch",{handleBareValue:({value:o})=>{if(!o.endsWith("%"))return null;let p=Number(o.slice(0,-1));return!E(p)||Number.isNaN(p)||p<50||p>200?null:o},handle:o=>[l("font-stretch",o)]}),i("font-stretch",()=>[{values:["50%","75%","90%","95%","100%","105%","110%","125%","150%","200%"]}]),s("placeholder",{themeKeys:["--background-color","--color"],handle:o=>[M("&::placeholder",[l("--tw-sort","placeholder-color"),l("color",o)])]}),e("decoration-solid",[["text-decoration-style","solid"]]),e("decoration-double",[["text-decoration-style","double"]]),e("decoration-dotted",[["text-decoration-style","dotted"]]),e("decoration-dashed",[["text-decoration-style","dashed"]]),e("decoration-wavy",[["text-decoration-style","wavy"]]),e("decoration-auto",[["text-decoration-thickness","auto"]]),e("decoration-from-font",[["text-decoration-thickness","from-font"]]),t.functional("decoration",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??J(p,["color","length","percentage"])){case"length":case"percentage":return o.modifier?void 0:[l("text-decoration-thickness",p)];default:return p=X(p,o.modifier,r),p===null?void 0:[l("text-decoration-color",p)]}}{let p=r.resolve(o.value.value,["--text-decoration-thickness"]);if(p)return o.modifier?void 0:[l("text-decoration-thickness",p)];if(E(o.value.value))return o.modifier?void 0:[l("text-decoration-thickness",`${o.value.value}px`)]}{let p=te(o,r,["--text-decoration-color","--color"]);if(p)return[l("text-decoration-color",p)]}}}),i("decoration",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-decoration-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2"],valueThemeKeys:["--text-decoration-thickness"]}]),e("animate-none",[["animation","none"]]),n("animate",{themeKeys:["--animate"],handle:o=>[l("animation",o)]});{let o=["var(--tw-blur,)","var(--tw-brightness,)","var(--tw-contrast,)","var(--tw-grayscale,)","var(--tw-hue-rotate,)","var(--tw-invert,)","var(--tw-saturate,)","var(--tw-sepia,)","var(--tw-drop-shadow,)"].join(" "),p=["var(--tw-backdrop-blur,)","var(--tw-backdrop-brightness,)","var(--tw-backdrop-contrast,)","var(--tw-backdrop-grayscale,)","var(--tw-backdrop-hue-rotate,)","var(--tw-backdrop-invert,)","var(--tw-backdrop-opacity,)","var(--tw-backdrop-saturate,)","var(--tw-backdrop-sepia,)"].join(" "),h=()=>L([$("--tw-blur"),$("--tw-brightness"),$("--tw-contrast"),$("--tw-grayscale"),$("--tw-hue-rotate"),$("--tw-invert"),$("--tw-opacity"),$("--tw-saturate"),$("--tw-sepia"),$("--tw-drop-shadow"),$("--tw-drop-shadow-color"),$("--tw-drop-shadow-alpha","100%",""),$("--tw-drop-shadow-size")]),A=()=>L([$("--tw-backdrop-blur"),$("--tw-backdrop-brightness"),$("--tw-backdrop-contrast"),$("--tw-backdrop-grayscale"),$("--tw-backdrop-hue-rotate"),$("--tw-backdrop-invert"),$("--tw-backdrop-opacity"),$("--tw-backdrop-saturate"),$("--tw-backdrop-sepia")]);t.functional("filter",y=>{if(!y.modifier){if(y.value===null)return[h(),l("filter",o)];if(y.value.kind==="arbitrary")return[l("filter",y.value.value)];switch(y.value.value){case"none":return[l("filter","none")]}}}),t.functional("backdrop-filter",y=>{if(!y.modifier){if(y.value===null)return[A(),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)];if(y.value.kind==="arbitrary")return[l("-webkit-backdrop-filter",y.value.value),l("backdrop-filter",y.value.value)];switch(y.value.value){case"none":return[l("-webkit-backdrop-filter","none"),l("backdrop-filter","none")]}}}),n("blur",{themeKeys:["--blur"],handle:y=>[h(),l("--tw-blur",`blur(${y})`),l("filter",o)]}),e("blur-none",[h,["--tw-blur"," "],["filter",o]]),n("backdrop-blur",{themeKeys:["--backdrop-blur","--blur"],handle:y=>[A(),l("--tw-backdrop-blur",`blur(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),e("backdrop-blur-none",[A,["--tw-backdrop-blur"," "],["-webkit-backdrop-filter",p],["backdrop-filter",p]]),n("brightness",{themeKeys:["--brightness"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[h(),l("--tw-brightness",`brightness(${y})`),l("filter",o)]}),n("backdrop-brightness",{themeKeys:["--backdrop-brightness","--brightness"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[A(),l("--tw-backdrop-brightness",`brightness(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--brightness"]}]),i("backdrop-brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--backdrop-brightness","--brightness"]}]),n("contrast",{themeKeys:["--contrast"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[h(),l("--tw-contrast",`contrast(${y})`),l("filter",o)]}),n("backdrop-contrast",{themeKeys:["--backdrop-contrast","--contrast"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[A(),l("--tw-backdrop-contrast",`contrast(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--contrast"]}]),i("backdrop-contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--backdrop-contrast","--contrast"]}]),n("grayscale",{themeKeys:["--grayscale"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[h(),l("--tw-grayscale",`grayscale(${y})`),l("filter",o)]}),n("backdrop-grayscale",{themeKeys:["--backdrop-grayscale","--grayscale"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[A(),l("--tw-backdrop-grayscale",`grayscale(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--grayscale"],hasDefaultValue:!0}]),i("backdrop-grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-grayscale","--grayscale"],hasDefaultValue:!0}]),n("hue-rotate",{supportsNegative:!0,themeKeys:["--hue-rotate"],handleBareValue:({value:y})=>E(y)?`${y}deg`:null,handle:y=>[h(),l("--tw-hue-rotate",`hue-rotate(${y})`),l("filter",o)]}),n("backdrop-hue-rotate",{supportsNegative:!0,themeKeys:["--backdrop-hue-rotate","--hue-rotate"],handleBareValue:({value:y})=>E(y)?`${y}deg`:null,handle:y=>[A(),l("--tw-backdrop-hue-rotate",`hue-rotate(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--hue-rotate"]}]),i("backdrop-hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--backdrop-hue-rotate","--hue-rotate"]}]),n("invert",{themeKeys:["--invert"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[h(),l("--tw-invert",`invert(${y})`),l("filter",o)]}),n("backdrop-invert",{themeKeys:["--backdrop-invert","--invert"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[A(),l("--tw-backdrop-invert",`invert(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--invert"],hasDefaultValue:!0}]),i("backdrop-invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-invert","--invert"],hasDefaultValue:!0}]),n("saturate",{themeKeys:["--saturate"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[h(),l("--tw-saturate",`saturate(${y})`),l("filter",o)]}),n("backdrop-saturate",{themeKeys:["--backdrop-saturate","--saturate"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[A(),l("--tw-backdrop-saturate",`saturate(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--saturate"]}]),i("backdrop-saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--backdrop-saturate","--saturate"]}]),n("sepia",{themeKeys:["--sepia"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[h(),l("--tw-sepia",`sepia(${y})`),l("filter",o)]}),n("backdrop-sepia",{themeKeys:["--backdrop-sepia","--sepia"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[A(),l("--tw-backdrop-sepia",`sepia(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--sepia"],hasDefaultValue:!0}]),i("backdrop-sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--backdrop-sepia","--sepia"],hasDefaultValue:!0}]),e("drop-shadow-none",[h,["--tw-drop-shadow"," "],["filter",o]]),t.functional("drop-shadow",y=>{let C;if(y.modifier&&(y.modifier.kind==="arbitrary"?C=y.modifier.value:E(y.modifier.value)&&(C=`${y.modifier.value}%`)),!y.value){let O=r.get(["--drop-shadow"]),V=r.resolve(null,["--drop-shadow"]);return O===null||V===null?void 0:[h(),l("--tw-drop-shadow-alpha",C),...Ye("--tw-drop-shadow-size",O,C,T=>`var(--tw-drop-shadow-color, ${T})`),l("--tw-drop-shadow",D(V,",").map(T=>`drop-shadow(${T})`).join(" ")),l("filter",o)]}if(y.value.kind==="arbitrary"){let O=y.value.value;switch(y.value.dataType??J(O,["color"])){case"color":return O=X(O,y.modifier,r),O===null?void 0:[h(),l("--tw-drop-shadow-color",Q(O,"var(--tw-drop-shadow-alpha)")),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")];default:return y.modifier&&!C?void 0:[h(),l("--tw-drop-shadow-alpha",C),...Ye("--tw-drop-shadow-size",O,C,T=>`var(--tw-drop-shadow-color, ${T})`),l("--tw-drop-shadow","var(--tw-drop-shadow-size)"),l("filter",o)]}}{let O=r.get([`--drop-shadow-${y.value.value}`]),V=r.resolve(y.value.value,["--drop-shadow"]);if(O&&V)return y.modifier&&!C?void 0:C?[h(),l("--tw-drop-shadow-alpha",C),...Ye("--tw-drop-shadow-size",O,C,T=>`var(--tw-drop-shadow-color, ${T})`),l("--tw-drop-shadow","var(--tw-drop-shadow-size)"),l("filter",o)]:[h(),l("--tw-drop-shadow-alpha",C),...Ye("--tw-drop-shadow-size",O,C,T=>`var(--tw-drop-shadow-color, ${T})`),l("--tw-drop-shadow",D(V,",").map(T=>`drop-shadow(${T})`).join(" ")),l("filter",o)]}{let O=te(y,r,["--drop-shadow-color","--color"]);if(O)return O==="inherit"?[h(),l("--tw-drop-shadow-color","inherit"),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")]:[h(),l("--tw-drop-shadow-color",Q(O,"var(--tw-drop-shadow-alpha)")),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")]}}),i("drop-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--drop-shadow-color","--color"],modifiers:Array.from({length:21},(y,C)=>`${C*5}`)},{valueThemeKeys:["--drop-shadow"]}]),n("backdrop-opacity",{themeKeys:["--backdrop-opacity","--opacity"],handleBareValue:({value:y})=>Ue(y)?`${y}%`:null,handle:y=>[A(),l("--tw-backdrop-opacity",`opacity(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("backdrop-opacity",()=>[{values:Array.from({length:21},(y,C)=>`${C*5}`),valueThemeKeys:["--backdrop-opacity","--opacity"]}])}{let o=`var(--tw-ease, ${r.resolve(null,["--default-transition-timing-function"])??"ease"})`,p=`var(--tw-duration, ${r.resolve(null,["--default-transition-duration"])??"0s"})`;e("transition-none",[["transition-property","none"]]),e("transition-all",[["transition-property","all"],["transition-timing-function",o],["transition-duration",p]]),e("transition-colors",[["transition-property","color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to"],["transition-timing-function",o],["transition-duration",p]]),e("transition-opacity",[["transition-property","opacity"],["transition-timing-function",o],["transition-duration",p]]),e("transition-shadow",[["transition-property","box-shadow"],["transition-timing-function",o],["transition-duration",p]]),e("transition-transform",[["transition-property","transform, translate, scale, rotate"],["transition-timing-function",o],["transition-duration",p]]),n("transition",{defaultValue:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events",themeKeys:["--transition-property"],handle:h=>[l("transition-property",h),l("transition-timing-function",o),l("transition-duration",p)]}),e("transition-discrete",[["transition-behavior","allow-discrete"]]),e("transition-normal",[["transition-behavior","normal"]]),n("delay",{handleBareValue:({value:h})=>E(h)?`${h}ms`:null,themeKeys:["--transition-delay"],handle:h=>[l("transition-delay",h)]});{let h=()=>L([$("--tw-duration")]);e("duration-initial",[h,["--tw-duration","initial"]]),t.functional("duration",A=>{if(A.modifier||!A.value)return;let y=null;if(A.value.kind==="arbitrary"?y=A.value.value:(y=r.resolve(A.value.fraction??A.value.value,["--transition-duration"]),y===null&&E(A.value.value)&&(y=`${A.value.value}ms`)),y!==null)return[h(),l("--tw-duration",y),l("transition-duration",y)]})}i("delay",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-delay"]}]),i("duration",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-duration"]}])}{let o=()=>L([$("--tw-ease")]);e("ease-initial",[o,["--tw-ease","initial"]]),e("ease-linear",[o,["--tw-ease","linear"],["transition-timing-function","linear"]]),n("ease",{themeKeys:["--ease"],handle:p=>[o(),l("--tw-ease",p),l("transition-timing-function",p)]})}e("will-change-auto",[["will-change","auto"]]),e("will-change-scroll",[["will-change","scroll-position"]]),e("will-change-contents",[["will-change","contents"]]),e("will-change-transform",[["will-change","transform"]]),n("will-change",{themeKeys:[],handle:o=>[l("will-change",o)]}),e("content-none",[["--tw-content","none"],["content","none"]]),n("content",{themeKeys:[],handle:o=>[L([$("--tw-content",'""')]),l("--tw-content",o),l("content","var(--tw-content)")]});{let o="var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)",p=()=>L([$("--tw-contain-size"),$("--tw-contain-layout"),$("--tw-contain-paint"),$("--tw-contain-style")]);e("contain-none",[["contain","none"]]),e("contain-content",[["contain","content"]]),e("contain-strict",[["contain","strict"]]),e("contain-size",[p,["--tw-contain-size","size"],["contain",o]]),e("contain-inline-size",[p,["--tw-contain-size","inline-size"],["contain",o]]),e("contain-layout",[p,["--tw-contain-layout","layout"],["contain",o]]),e("contain-paint",[p,["--tw-contain-paint","paint"],["contain",o]]),e("contain-style",[p,["--tw-contain-style","style"],["contain",o]]),n("contain",{themeKeys:[],handle:h=>[l("contain",h)]})}e("forced-color-adjust-none",[["forced-color-adjust","none"]]),e("forced-color-adjust-auto",[["forced-color-adjust","auto"]]),e("leading-none",[()=>L([$("--tw-leading")]),["--tw-leading","1"],["line-height","1"]]),a("leading",["--leading","--spacing"],o=>[L([$("--tw-leading")]),l("--tw-leading",o),l("line-height",o)]),n("tracking",{supportsNegative:!0,themeKeys:["--tracking"],handle:o=>[L([$("--tw-tracking")]),l("--tw-tracking",o),l("letter-spacing",o)]}),e("antialiased",[["-webkit-font-smoothing","antialiased"],["-moz-osx-font-smoothing","grayscale"]]),e("subpixel-antialiased",[["-webkit-font-smoothing","auto"],["-moz-osx-font-smoothing","auto"]]);{let o="var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)",p=()=>L([$("--tw-ordinal"),$("--tw-slashed-zero"),$("--tw-numeric-figure"),$("--tw-numeric-spacing"),$("--tw-numeric-fraction")]);e("normal-nums",[["font-variant-numeric","normal"]]),e("ordinal",[p,["--tw-ordinal","ordinal"],["font-variant-numeric",o]]),e("slashed-zero",[p,["--tw-slashed-zero","slashed-zero"],["font-variant-numeric",o]]),e("lining-nums",[p,["--tw-numeric-figure","lining-nums"],["font-variant-numeric",o]]),e("oldstyle-nums",[p,["--tw-numeric-figure","oldstyle-nums"],["font-variant-numeric",o]]),e("proportional-nums",[p,["--tw-numeric-spacing","proportional-nums"],["font-variant-numeric",o]]),e("tabular-nums",[p,["--tw-numeric-spacing","tabular-nums"],["font-variant-numeric",o]]),e("diagonal-fractions",[p,["--tw-numeric-fraction","diagonal-fractions"],["font-variant-numeric",o]]),e("stacked-fractions",[p,["--tw-numeric-fraction","stacked-fractions"],["font-variant-numeric",o]])}{let o=()=>L([$("--tw-outline-style","solid")]);t.static("outline-hidden",()=>[l("--tw-outline-style","none"),l("outline-style","none"),z("@media","(forced-colors: active)",[l("outline","2px solid transparent"),l("outline-offset","2px")])]),e("outline-none",[["--tw-outline-style","none"],["outline-style","none"]]),e("outline-solid",[["--tw-outline-style","solid"],["outline-style","solid"]]),e("outline-dashed",[["--tw-outline-style","dashed"],["outline-style","dashed"]]),e("outline-dotted",[["--tw-outline-style","dotted"],["outline-style","dotted"]]),e("outline-double",[["--tw-outline-style","double"],["outline-style","double"]]),t.functional("outline",p=>{if(p.value===null){if(p.modifier)return;let h=r.get(["--default-outline-width"])??"1px";return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)]}if(p.value.kind==="arbitrary"){let h=p.value.value;switch(p.value.dataType??J(h,["color","length","number","percentage"])){case"length":case"number":case"percentage":return p.modifier?void 0:[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)];default:return h=X(h,p.modifier,r),h===null?void 0:[l("outline-color",h)]}}{let h=te(p,r,["--outline-color","--color"]);if(h)return[l("outline-color",h)]}{if(p.modifier)return;let h=r.resolve(p.value.value,["--outline-width"]);if(h)return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)];if(E(p.value.value))return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",`${p.value.value}px`)]}}),i("outline",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--outline-color","--color"],modifiers:Array.from({length:21},(p,h)=>`${h*5}`),hasDefaultValue:!0},{values:["0","1","2","4","8"],valueThemeKeys:["--outline-width"]}]),n("outline-offset",{supportsNegative:!0,themeKeys:["--outline-offset"],handleBareValue:({value:p})=>E(p)?`${p}px`:null,handle:p=>[l("outline-offset",p)]}),i("outline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--outline-offset"]}])}n("opacity",{themeKeys:["--opacity"],handleBareValue:({value:o})=>Ue(o)?`${o}%`:null,handle:o=>[l("opacity",o)]}),i("opacity",()=>[{values:Array.from({length:21},(o,p)=>`${p*5}`),valueThemeKeys:["--opacity"]}]),e("underline-offset-auto",[["text-underline-offset","auto"]]),n("underline-offset",{supportsNegative:!0,themeKeys:["--text-underline-offset"],handleBareValue:({value:o})=>E(o)?`${o}px`:null,handle:o=>[l("text-underline-offset",o)]}),i("underline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--text-underline-offset"]}]),t.functional("text",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??J(p,["color","length","percentage","absolute-size","relative-size"])){case"size":case"length":case"percentage":case"absolute-size":case"relative-size":{if(o.modifier){let A=o.modifier.kind==="arbitrary"?o.modifier.value:r.resolve(o.modifier.value,["--leading"]);if(!A&&de(o.modifier.value)){let y=r.resolve(null,["--spacing"]);if(!y)return null;A=`calc(${y} * ${o.modifier.value})`}return!A&&o.modifier.value==="none"&&(A="1"),A?[l("font-size",p),l("line-height",A)]:null}return[l("font-size",p)]}default:return p=X(p,o.modifier,r),p===null?void 0:[l("color",p)]}}{let p=te(o,r,["--text-color","--color"]);if(p)return[l("color",p)]}{let p=r.resolveWith(o.value.value,["--text"],["--line-height","--letter-spacing","--font-weight"]);if(p){let[h,A={}]=Array.isArray(p)?p:[p];if(o.modifier){let y=o.modifier.kind==="arbitrary"?o.modifier.value:r.resolve(o.modifier.value,["--leading"]);if(!y&&de(o.modifier.value)){let O=r.resolve(null,["--spacing"]);if(!O)return null;y=`calc(${O} * ${o.modifier.value})`}if(!y&&o.modifier.value==="none"&&(y="1"),!y)return null;let C=[l("font-size",h)];return y&&C.push(l("line-height",y)),C}return typeof A=="string"?[l("font-size",h),l("line-height",A)]:[l("font-size",h),l("line-height",A["--line-height"]?`var(--tw-leading, ${A["--line-height"]})`:void 0),l("letter-spacing",A["--letter-spacing"]?`var(--tw-tracking, ${A["--letter-spacing"]})`:void 0),l("font-weight",A["--font-weight"]?`var(--tw-font-weight, ${A["--font-weight"]})`:void 0)]}}}}),i("text",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:[],valueThemeKeys:["--text"],modifiers:[],modifierThemeKeys:["--leading"]}]);let _=()=>L([$("--tw-text-shadow-color"),$("--tw-text-shadow-alpha","100%","")]);e("text-shadow-initial",[_,["--tw-text-shadow-color","initial"]]),t.functional("text-shadow",o=>{let p;if(o.modifier&&(o.modifier.kind==="arbitrary"?p=o.modifier.value:E(o.modifier.value)&&(p=`${o.modifier.value}%`)),!o.value){let h=r.get(["--text-shadow"]);return h===null?void 0:[_(),l("--tw-text-shadow-alpha",p),...ue("text-shadow",h,p,A=>`var(--tw-text-shadow-color, ${A})`)]}if(o.value.kind==="arbitrary"){let h=o.value.value;switch(o.value.dataType??J(h,["color"])){case"color":return h=X(h,o.modifier,r),h===null?void 0:[_(),l("--tw-text-shadow-color",Q(h,"var(--tw-text-shadow-alpha)"))];default:return[_(),l("--tw-text-shadow-alpha",p),...ue("text-shadow",h,p,y=>`var(--tw-text-shadow-color, ${y})`)]}}switch(o.value.value){case"none":return o.modifier?void 0:[_(),l("text-shadow","none")];case"inherit":return o.modifier?void 0:[_(),l("--tw-text-shadow-color","inherit")]}{let h=r.get([`--text-shadow-${o.value.value}`]);if(h)return[_(),l("--tw-text-shadow-alpha",p),...ue("text-shadow",h,p,A=>`var(--tw-text-shadow-color, ${A})`)]}{let h=te(o,r,["--text-shadow-color","--color"]);if(h)return[_(),l("--tw-text-shadow-color",Q(h,"var(--tw-text-shadow-alpha)"))]}}),i("text-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-shadow-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["none"]},{valueThemeKeys:["--text-shadow"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`),hasDefaultValue:r.get(["--text-shadow"])!==null}]);{let y=function(V){return`var(--tw-ring-inset,) 0 0 0 calc(${V} + var(--tw-ring-offset-width)) var(--tw-ring-color, ${A})`},C=function(V){return`inset 0 0 0 ${V} var(--tw-inset-ring-color, currentcolor)`};var Z=y,re=C;let o=["var(--tw-inset-shadow)","var(--tw-inset-ring-shadow)","var(--tw-ring-offset-shadow)","var(--tw-ring-shadow)","var(--tw-shadow)"].join(", "),p="0 0 #0000",h=()=>L([$("--tw-shadow",p),$("--tw-shadow-color"),$("--tw-shadow-alpha","100%",""),$("--tw-inset-shadow",p),$("--tw-inset-shadow-color"),$("--tw-inset-shadow-alpha","100%",""),$("--tw-ring-color"),$("--tw-ring-shadow",p),$("--tw-inset-ring-color"),$("--tw-inset-ring-shadow",p),$("--tw-ring-inset"),$("--tw-ring-offset-width","0px",""),$("--tw-ring-offset-color","#fff"),$("--tw-ring-offset-shadow",p)]);e("shadow-initial",[h,["--tw-shadow-color","initial"]]),t.functional("shadow",V=>{let T;if(V.modifier&&(V.modifier.kind==="arbitrary"?T=V.modifier.value:E(V.modifier.value)&&(T=`${V.modifier.value}%`)),!V.value){let j=r.get(["--shadow"]);return j===null?void 0:[h(),l("--tw-shadow-alpha",T),...ue("--tw-shadow",j,T,oe=>`var(--tw-shadow-color, ${oe})`),l("box-shadow",o)]}if(V.value.kind==="arbitrary"){let j=V.value.value;switch(V.value.dataType??J(j,["color"])){case"color":return j=X(j,V.modifier,r),j===null?void 0:[h(),l("--tw-shadow-color",Q(j,"var(--tw-shadow-alpha)"))];default:return[h(),l("--tw-shadow-alpha",T),...ue("--tw-shadow",j,T,ot=>`var(--tw-shadow-color, ${ot})`),l("box-shadow",o)]}}switch(V.value.value){case"none":return V.modifier?void 0:[h(),l("--tw-shadow",p),l("box-shadow",o)];case"inherit":return V.modifier?void 0:[h(),l("--tw-shadow-color","inherit")]}{let j=r.get([`--shadow-${V.value.value}`]);if(j)return[h(),l("--tw-shadow-alpha",T),...ue("--tw-shadow",j,T,oe=>`var(--tw-shadow-color, ${oe})`),l("box-shadow",o)]}{let j=te(V,r,["--box-shadow-color","--color"]);if(j)return[h(),l("--tw-shadow-color",Q(j,"var(--tw-shadow-alpha)"))]}}),i("shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`)},{values:["none"]},{valueThemeKeys:["--shadow"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`),hasDefaultValue:r.get(["--shadow"])!==null}]),e("inset-shadow-initial",[h,["--tw-inset-shadow-color","initial"]]),t.functional("inset-shadow",V=>{let T;if(V.modifier&&(V.modifier.kind==="arbitrary"?T=V.modifier.value:E(V.modifier.value)&&(T=`${V.modifier.value}%`)),!V.value){let j=r.get(["--inset-shadow"]);return j===null?void 0:[h(),l("--tw-inset-shadow-alpha",T),...ue("--tw-inset-shadow",j,T,oe=>`var(--tw-inset-shadow-color, ${oe})`),l("box-shadow",o)]}if(V.value.kind==="arbitrary"){let j=V.value.value;switch(V.value.dataType??J(j,["color"])){case"color":return j=X(j,V.modifier,r),j===null?void 0:[h(),l("--tw-inset-shadow-color",Q(j,"var(--tw-inset-shadow-alpha)"))];default:return[h(),l("--tw-inset-shadow-alpha",T),...ue("--tw-inset-shadow",j,T,ot=>`var(--tw-inset-shadow-color, ${ot})`,"inset "),l("box-shadow",o)]}}switch(V.value.value){case"none":return V.modifier?void 0:[h(),l("--tw-inset-shadow",p),l("box-shadow",o)];case"inherit":return V.modifier?void 0:[h(),l("--tw-inset-shadow-color","inherit")]}{let j=r.get([`--inset-shadow-${V.value.value}`]);if(j)return[h(),l("--tw-inset-shadow-alpha",T),...ue("--tw-inset-shadow",j,T,oe=>`var(--tw-inset-shadow-color, ${oe})`),l("box-shadow",o)]}{let j=te(V,r,["--box-shadow-color","--color"]);if(j)return[h(),l("--tw-inset-shadow-color",Q(j,"var(--tw-inset-shadow-alpha)"))]}}),i("inset-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`)},{values:["none"]},{valueThemeKeys:["--inset-shadow"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`),hasDefaultValue:r.get(["--inset-shadow"])!==null}]),e("ring-inset",[h,["--tw-ring-inset","inset"]]);let A=r.get(["--default-ring-color"])??"currentcolor";t.functional("ring",V=>{if(!V.value){if(V.modifier)return;let T=r.get(["--default-ring-width"])??"1px";return[h(),l("--tw-ring-shadow",y(T)),l("box-shadow",o)]}if(V.value.kind==="arbitrary"){let T=V.value.value;switch(V.value.dataType??J(T,["color","length"])){case"length":return V.modifier?void 0:[h(),l("--tw-ring-shadow",y(T)),l("box-shadow",o)];default:return T=X(T,V.modifier,r),T===null?void 0:[l("--tw-ring-color",T)]}}{let T=te(V,r,["--ring-color","--color"]);if(T)return[l("--tw-ring-color",T)]}{if(V.modifier)return;let T=r.resolve(V.value.value,["--ring-width"]);if(T===null&&E(V.value.value)&&(T=`${V.value.value}px`),T)return[h(),l("--tw-ring-shadow",y(T)),l("box-shadow",o)]}}),i("ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]),t.functional("inset-ring",V=>{if(!V.value)return V.modifier?void 0:[h(),l("--tw-inset-ring-shadow",C("1px")),l("box-shadow",o)];if(V.value.kind==="arbitrary"){let T=V.value.value;switch(V.value.dataType??J(T,["color","length"])){case"length":return V.modifier?void 0:[h(),l("--tw-inset-ring-shadow",C(T)),l("box-shadow",o)];default:return T=X(T,V.modifier,r),T===null?void 0:[l("--tw-inset-ring-color",T)]}}{let T=te(V,r,["--ring-color","--color"]);if(T)return[l("--tw-inset-ring-color",T)]}{if(V.modifier)return;let T=r.resolve(V.value.value,["--ring-width"]);if(T===null&&E(V.value.value)&&(T=`${V.value.value}px`),T)return[h(),l("--tw-inset-ring-shadow",C(T)),l("box-shadow",o)]}}),i("inset-ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]);let O="var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)";t.functional("ring-offset",V=>{if(V.value){if(V.value.kind==="arbitrary"){let T=V.value.value;switch(V.value.dataType??J(T,["color","length"])){case"length":return V.modifier?void 0:[l("--tw-ring-offset-width",T),l("--tw-ring-offset-shadow",O)];default:return T=X(T,V.modifier,r),T===null?void 0:[l("--tw-ring-offset-color",T)]}}{let T=r.resolve(V.value.value,["--ring-offset-width"]);if(T)return V.modifier?void 0:[l("--tw-ring-offset-width",T),l("--tw-ring-offset-shadow",O)];if(E(V.value.value))return V.modifier?void 0:[l("--tw-ring-offset-width",`${V.value.value}px`),l("--tw-ring-offset-shadow",O)]}{let T=te(V,r,["--ring-offset-color","--color"]);if(T)return[l("--tw-ring-offset-color",T)]}}})}return i("ring-offset",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-offset-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-offset-width"]}]),t.functional("@container",o=>{let p=null;if(o.value===null?p="inline-size":o.value.kind==="arbitrary"?p=o.value.value:o.value.kind==="named"&&o.value.value==="normal"&&(p="normal"),p!==null)return o.modifier?[l("container-type",p),l("container-name",o.modifier.value)]:[l("container-type",p)]}),i("@container",()=>[{values:["normal"],valueThemeKeys:[],hasDefaultValue:!0}]),t}var bt=["number","integer","ratio","percentage"];function pr(r){let t=r.params;return $i.test(t)?i=>{let e={"--value":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set},"--modifier":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set}};F(r.nodes,n=>{if(n.kind!=="declaration"||!n.value||!n.value.includes("--value(")&&!n.value.includes("--modifier("))return;let s=q(n.value);ee(s,a=>{if(a.kind!=="function")return;if(a.value==="--spacing"&&!(e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return ee(a.nodes,u=>{if(u.kind!=="function"||u.value!=="--value"&&u.value!=="--modifier")return;let f=u.value;for(let g of u.nodes)if(g.kind==="word"){if(g.value==="integer")e[f].usedSpacingInteger||=!0;else if(g.value==="number"&&(e[f].usedSpacingNumber||=!0,e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return 2}}),0;if(a.value!=="--value"&&a.value!=="--modifier")return;let c=D(Y(a.nodes),",");for(let[u,f]of c.entries())f=f.replace(/\\\*/g,"*"),f=f.replace(/--(.*?)\s--(.*?)/g,"--$1-*--$2"),f=f.replace(/\s+/g,""),f=f.replace(/(-\*){2,}/g,"-*"),f[0]==="-"&&f[1]==="-"&&!f.includes("-*")&&(f+="-*"),c[u]=f;a.nodes=q(c.join(","));for(let u of a.nodes)if(u.kind==="word"&&(u.value[0]==='"'||u.value[0]==="'")&&u.value[0]===u.value[u.value.length-1]){let f=u.value.slice(1,-1);e[a.value].literals.add(f)}else if(u.kind==="word"&&u.value[0]==="-"&&u.value[1]==="-"){let f=u.value.replace(/-\*.*$/g,"");e[a.value].themeKeys.add(f)}else if(u.kind==="word"&&!(u.value[0]==="["&&u.value[u.value.length-1]==="]")&&!bt.includes(u.value)){console.warn(`Unsupported bare value data type: "${u.value}". +Only valid data types are: ${bt.map(x=>`"${x}"`).join(", ")}. +`);let f=u.value,g=structuredClone(a),d="\xB6";ee(g.nodes,(x,{replaceWith:k})=>{x.kind==="word"&&x.value===f&&k({kind:"word",value:d})});let m="^".repeat(Y([u]).length),w=Y([g]).indexOf(d),v=["```css",Y([a])," ".repeat(w)+m,"```"].join(` +`);console.warn(v)}}),n.value=Y(s)}),i.utilities.functional(t.slice(0,-2),n=>{let s=structuredClone(r),a=n.value,c=n.modifier;if(a===null)return;let u=!1,f=!1,g=!1,d=!1,m=new Map,w=!1;if(F([s],(v,{parent:x,replaceWith:k})=>{if(x?.kind!=="rule"&&x?.kind!=="at-rule"||v.kind!=="declaration"||!v.value)return;let N=q(v.value);(ee(N,(S,{replaceWith:P})=>{if(S.kind==="function"){if(S.value==="--value"){u=!0;let U=sr(a,S,i);return U?(f=!0,U.ratio?w=!0:m.set(v,x),P(U.nodes),1):(u||=!1,k([]),2)}else if(S.value==="--modifier"){if(c===null)return k([]),2;g=!0;let U=sr(c,S,i);return U?(d=!0,P(U.nodes),1):(g||=!1,k([]),2)}}})??0)===0&&(v.value=Y(N))}),u&&!f||g&&!d||w&&d||c&&!w&&!d)return null;if(w)for(let[v,x]of m){let k=x.nodes.indexOf(v);k!==-1&&x.nodes.splice(k,1)}return s.nodes}),i.utilities.suggest(t.slice(0,-2),()=>{let n=[],s=[];for(let[a,{literals:c,usedSpacingNumber:u,usedSpacingInteger:f,themeKeys:g}]of[[n,e["--value"]],[s,e["--modifier"]]]){for(let d of c)a.push(d);if(u)a.push(...Ze);else if(f)for(let d of Ze)E(d)&&a.push(d);for(let d of i.theme.keysInNamespaces(g))a.push(d.replace(fr,(m,w,v)=>`${w}.${v}`))}return[{values:n,modifiers:s}]})}:Ci.test(t)?i=>{i.utilities.static(t,()=>structuredClone(r.nodes))}:null}function sr(r,t,i){for(let e of t.nodes){if(r.kind==="named"&&e.kind==="word"&&(e.value[0]==="'"||e.value[0]==='"')&&e.value[e.value.length-1]===e.value[0]&&e.value.slice(1,-1)===r.value)return{nodes:q(r.value)};if(r.kind==="named"&&e.kind==="word"&&e.value[0]==="-"&&e.value[1]==="-"){let n=e.value;if(n.endsWith("-*")){n=n.slice(0,-2);let s=i.theme.resolve(r.value,[n]);if(s)return{nodes:q(s)}}else{let s=n.split("-*");if(s.length<=1)continue;let a=[s.shift()],c=i.theme.resolveWith(r.value,a,s);if(c){let[,u={}]=c;{let f=u[s.pop()];if(f)return{nodes:q(f)}}}}}else if(r.kind==="named"&&e.kind==="word"){if(!bt.includes(e.value))continue;let n=e.value==="ratio"&&"fraction"in r?r.fraction:r.value;if(!n)continue;let s=J(n,[e.value]);if(s===null)continue;if(s==="ratio"){let[a,c]=D(n,"/");if(!E(a)||!E(c))continue}else{if(s==="number"&&!de(n))continue;if(s==="percentage"&&!E(n.slice(0,-1)))continue}return{nodes:q(n),ratio:s==="ratio"}}else if(r.kind==="arbitrary"&&e.kind==="word"&&e.value[0]==="["&&e.value[e.value.length-1]==="]"){let n=e.value.slice(1,-1);if(n==="*")return{nodes:q(r.value)};if("dataType"in r&&r.dataType&&r.dataType!==n)continue;if("dataType"in r&&r.dataType)return{nodes:q(r.value)};if(J(r.value,[n])!==null)return{nodes:q(r.value)}}}}function ue(r,t,i,e,n=""){let s=!1,a=Ee(t,u=>i==null?e(u):u.startsWith("current")?e(Q(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(ur(u,i))));function c(u){return n?D(u,",").map(f=>n+f).join(","):u}return s?[l(r,c(Ee(t,e))),H("@supports (color: lab(from red l a b))",[l(r,c(a))])]:[l(r,c(a))]}function Ye(r,t,i,e,n=""){let s=!1,a=D(t,",").map(c=>Ee(c,u=>i==null?e(u):u.startsWith("current")?e(Q(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(ur(u,i))))).map(c=>`drop-shadow(${c})`).join(" ");return s?[l(r,n+D(t,",").map(c=>`drop-shadow(${Ee(c,e)})`).join(" ")),H("@supports (color: lab(from red l a b))",[l(r,n+a)])]:[l(r,n+a)]}var kt={"--alpha":Vi,"--spacing":Ni,"--theme":Si,theme:Ti};function Vi(r,t,i,...e){let[n,s]=D(i,"/").map(a=>a.trim());if(!n||!s)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);if(e.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);return Q(n,s)}function Ni(r,t,i,...e){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(e.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${e.length+1}.`);let n=r.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${i})`}function Si(r,t,i,...e){if(!i.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;i.endsWith(" inline")&&(n=!0,i=i.slice(0,-7)),t.kind==="at-rule"&&(n=!0);let s=r.resolveThemeValue(i,n);if(!s){if(e.length>0)return e.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(e.length===0)return s;let a=e.join(", ");if(a==="initial")return s;if(s==="initial")return a;if(s.startsWith("var(")||s.startsWith("theme(")||s.startsWith("--theme(")){let c=q(s);return Pi(c,a),Y(c)}return s}function Ti(r,t,i,...e){i=Ei(i);let n=r.resolveThemeValue(i);if(!n&&e.length>0)return e.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var dr=new RegExp(Object.keys(kt).map(r=>`${r}\\(`).join("|"));function xe(r,t){let i=0;return F(r,e=>{if(e.kind==="declaration"&&e.value&&dr.test(e.value)){i|=8,e.value=mr(e.value,e,t);return}e.kind==="at-rule"&&(e.name==="@media"||e.name==="@custom-media"||e.name==="@container"||e.name==="@supports")&&dr.test(e.params)&&(i|=8,e.params=mr(e.params,e,t))}),i}function mr(r,t,i){let e=q(r);return ee(e,(n,{replaceWith:s})=>{if(n.kind==="function"&&n.value in kt){let a=D(Y(n.nodes).trim(),",").map(u=>u.trim()),c=kt[n.value](i,t,...a);return s(q(c))}}),Y(e)}function Ei(r){if(r[0]!=="'"&&r[0]!=='"')return r;let t="",i=r[0];for(let e=1;e{if(i.kind==="function"&&!(i.value!=="var"&&i.value!=="theme"&&i.value!=="--theme"))if(i.nodes.length===1)i.nodes.push({kind:"word",value:`, ${t}`});else{let e=i.nodes[i.nodes.length-1];e.kind==="word"&&e.value==="initial"&&(e.value=t)}})}function Qe(r,t){let i=r.length,e=t.length,n=i=48&&a<=57&&c>=48&&c<=57){let u=s,f=s+1,g=s,d=s+1;for(a=r.charCodeAt(f);a>=48&&a<=57;)a=r.charCodeAt(++f);for(c=t.charCodeAt(d);c>=48&&c<=57;)c=t.charCodeAt(++d);let m=r.slice(u,f),w=t.slice(g,d),v=Number(m)-Number(w);if(v)return v;if(mw)return 1;continue}if(a!==c)return a-c}return r.length-t.length}var Ri=/^\d+\/\d+$/;function gr(r){let t=new B(n=>({name:n,utility:n,fraction:!1,modifiers:[]}));for(let n of r.utilities.keys("static")){let s=t.get(n);s.fraction=!1,s.modifiers=[]}for(let n of r.utilities.keys("functional")){let s=r.utilities.getCompletions(n);for(let a of s)for(let c of a.values){let u=c!==null&&Ri.test(c),f=c===null?n:`${n}-${c}`,g=t.get(f);if(g.utility=n,g.fraction||=u,g.modifiers.push(...a.modifiers),a.supportsNegative){let d=t.get(`-${f}`);d.utility=`-${n}`,d.fraction||=u,d.modifiers.push(...a.modifiers)}}}if(t.size===0)return[];let i=Array.from(t.values());return i.sort((n,s)=>Qe(n.name,s.name)),Oi(i)}function Oi(r){let t=[],i=null,e=new Map,n=new B(()=>[]);for(let a of r){let{utility:c,fraction:u}=a;i||(i={utility:c,items:[]},e.set(c,i)),c!==i.utility&&(t.push(i),i={utility:c,items:[]},e.set(c,i)),u?n.get(c).push(a):i.items.push(a)}i&&t[t.length-1]!==i&&t.push(i);for(let[a,c]of n){let u=e.get(a);u&&u.items.push(...c)}let s=[];for(let a of t)for(let c of a.items)s.push([c.name,{modifiers:c.modifiers}]);return s}function hr(r){let t=[];for(let[e,n]of r.variants.entries()){let c=function({value:u,modifier:f}={}){let g=e;u&&(g+=s?`-${u}`:u),f&&(g+=`/${f}`);let d=r.parseVariant(g);if(!d)return[];let m=M(".__placeholder__",[]);if(Ae(m,d,r.variants)===null)return[];let w=[];return Ge(m.nodes,(v,{path:x})=>{if(v.kind!=="rule"&&v.kind!=="at-rule"||v.nodes.length>0)return;x.sort((b,S)=>{let P=b.kind==="at-rule",U=S.kind==="at-rule";return P&&!U?-1:!P&&U?1:0});let k=x.flatMap(b=>b.kind==="rule"?b.selector==="&"?[]:[b.selector]:b.kind==="at-rule"?[`${b.name} ${b.params}`]:[]),N="";for(let b=k.length-1;b>=0;b--)N=N===""?k[b]:`${k[b]} { ${N} }`;w.push(N)}),w};var i=c;if(n.kind==="arbitrary")continue;let s=e!=="@",a=r.variants.getCompletions(e);switch(n.kind){case"static":{t.push({name:e,values:a,isArbitrary:!1,hasDash:s,selectors:c});break}case"functional":{t.push({name:e,values:a,isArbitrary:!0,hasDash:s,selectors:c});break}case"compound":{t.push({name:e,values:a,isArbitrary:!0,hasDash:s,selectors:c});break}}}return t}function vr(r,t){let{astNodes:i,nodeSorting:e}=pe(Array.from(t),r),n=new Map(t.map(a=>[a,null])),s=0n;for(let a of i){let c=e.get(a)?.candidate;c&&n.set(c,n.get(c)??s++)}return t.map(a=>[a,n.get(a)??null])}var Xe=/^@?[a-zA-Z0-9_-]*$/;var xt=class{compareFns=new Map;variants=new Map;completions=new Map;groupOrder=null;lastOrder=0;static(t,i,{compounds:e,order:n}={}){this.set(t,{kind:"static",applyFn:i,compoundsWith:0,compounds:e??2,order:n})}fromAst(t,i){let e=[];F(i,n=>{n.kind==="rule"?e.push(n.selector):n.kind==="at-rule"&&n.name!=="@slot"&&e.push(`${n.name} ${n.params}`)}),this.static(t,n=>{let s=structuredClone(i);At(s,n.nodes),n.nodes=s},{compounds:ye(e)})}functional(t,i,{compounds:e,order:n}={}){this.set(t,{kind:"functional",applyFn:i,compoundsWith:0,compounds:e??2,order:n})}compound(t,i,e,{compounds:n,order:s}={}){this.set(t,{kind:"compound",applyFn:e,compoundsWith:i,compounds:n??2,order:s})}group(t,i){this.groupOrder=this.nextOrder(),i&&this.compareFns.set(this.groupOrder,i),t(),this.groupOrder=null}has(t){return this.variants.has(t)}get(t){return this.variants.get(t)}kind(t){return this.variants.get(t)?.kind}compoundsWith(t,i){let e=this.variants.get(t),n=typeof i=="string"?this.variants.get(i):i.kind==="arbitrary"?{compounds:ye([i.selector])}:this.variants.get(i.root);return!(!e||!n||e.kind!=="compound"||n.compounds===0||e.compoundsWith===0||(e.compoundsWith&n.compounds)===0)}suggest(t,i){this.completions.set(t,i)}getCompletions(t){return this.completions.get(t)?.()??[]}compare(t,i){if(t===i)return 0;if(t===null)return-1;if(i===null)return 1;if(t.kind==="arbitrary"&&i.kind==="arbitrary")return t.selector{m.nodes=g.map(w=>H(w,m.nodes))},{compounds:d})}i("*",[":is(& > *)"],{compounds:0}),i("**",[":is(& *)"],{compounds:0});function e(f,g){return g.map(d=>{d=d.trim();let m=D(d," ");return m[0]==="not"?m.slice(1).join(" "):f==="@container"?m[0][0]==="("?`not ${d}`:m[1]==="not"?`${m[0]} ${m.slice(2).join(" ")}`:`${m[0]} not ${m.slice(1).join(" ")}`:`not ${d}`})}let n=["@media","@supports","@container"];function s(f){for(let g of n){if(g!==f.name)continue;let d=D(f.params,",");return d.length>1?null:(d=e(f.name,d),z(f.name,d.join(", ")))}return null}function a(f){return f.includes("::")?null:`&:not(${D(f,",").map(d=>(d=d.replaceAll("&","*"),d)).join(", ")})`}t.compound("not",3,(f,g)=>{if(g.variant.kind==="arbitrary"&&g.variant.relative||g.modifier)return null;let d=!1;if(F([f],(m,{path:w})=>{if(m.kind!=="rule"&&m.kind!=="at-rule")return 0;if(m.nodes.length>0)return 0;let v=[],x=[];for(let N of w)N.kind==="at-rule"?v.push(N):N.kind==="rule"&&x.push(N);if(v.length>1)return 2;if(x.length>1)return 2;let k=[];for(let N of x){let b=a(N.selector);if(!b)return d=!1,2;k.push(M(b,[]))}for(let N of v){let b=s(N);if(!b)return d=!1,2;k.push(b)}return Object.assign(f,M("&",k)),d=!0,1}),f.kind==="rule"&&f.selector==="&"&&f.nodes.length===1&&Object.assign(f,f.nodes[0]),!d)return null}),t.suggest("not",()=>Array.from(t.keys()).filter(f=>t.compoundsWith("not",f))),t.compound("group",2,(f,g)=>{if(g.variant.kind==="arbitrary"&&g.variant.relative)return null;let d=g.modifier?`:where(.${r.prefix?`${r.prefix}\\:`:""}group\\/${g.modifier.value})`:`:where(.${r.prefix?`${r.prefix}\\:`:""}group)`,m=!1;if(F([f],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let k of v.slice(0,-1))if(k.kind==="rule")return m=!1,2;let x=w.selector.replaceAll("&",d);D(x,",").length>1&&(x=`:is(${x})`),w.selector=`&:is(${x} *)`,m=!0}),!m)return null}),t.suggest("group",()=>Array.from(t.keys()).filter(f=>t.compoundsWith("group",f))),t.compound("peer",2,(f,g)=>{if(g.variant.kind==="arbitrary"&&g.variant.relative)return null;let d=g.modifier?`:where(.${r.prefix?`${r.prefix}\\:`:""}peer\\/${g.modifier.value})`:`:where(.${r.prefix?`${r.prefix}\\:`:""}peer)`,m=!1;if(F([f],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let k of v.slice(0,-1))if(k.kind==="rule")return m=!1,2;let x=w.selector.replaceAll("&",d);D(x,",").length>1&&(x=`:is(${x})`),w.selector=`&:is(${x} ~ *)`,m=!0}),!m)return null}),t.suggest("peer",()=>Array.from(t.keys()).filter(f=>t.compoundsWith("peer",f))),i("first-letter",["&::first-letter"]),i("first-line",["&::first-line"]),i("marker",["& *::marker","&::marker","& *::-webkit-details-marker","&::-webkit-details-marker"]),i("selection",["& *::selection","&::selection"]),i("file",["&::file-selector-button"]),i("placeholder",["&::placeholder"]),i("backdrop",["&::backdrop"]),i("details-content",["&::details-content"]);{let f=function(){return L([z("@property","--tw-content",[l("syntax",'"*"'),l("initial-value",'""'),l("inherits","false")])])};var c=f;t.static("before",g=>{g.nodes=[M("&::before",[f(),l("content","var(--tw-content)"),...g.nodes])]},{compounds:0}),t.static("after",g=>{g.nodes=[M("&::after",[f(),l("content","var(--tw-content)"),...g.nodes])]},{compounds:0})}i("first",["&:first-child"]),i("last",["&:last-child"]),i("only",["&:only-child"]),i("odd",["&:nth-child(odd)"]),i("even",["&:nth-child(even)"]),i("first-of-type",["&:first-of-type"]),i("last-of-type",["&:last-of-type"]),i("only-of-type",["&:only-of-type"]),i("visited",["&:visited"]),i("target",["&:target"]),i("open",["&:is([open], :popover-open, :open)"]),i("default",["&:default"]),i("checked",["&:checked"]),i("indeterminate",["&:indeterminate"]),i("placeholder-shown",["&:placeholder-shown"]),i("autofill",["&:autofill"]),i("optional",["&:optional"]),i("required",["&:required"]),i("valid",["&:valid"]),i("invalid",["&:invalid"]),i("user-valid",["&:user-valid"]),i("user-invalid",["&:user-invalid"]),i("in-range",["&:in-range"]),i("out-of-range",["&:out-of-range"]),i("read-only",["&:read-only"]),i("empty",["&:empty"]),i("focus-within",["&:focus-within"]),t.static("hover",f=>{f.nodes=[M("&:hover",[z("@media","(hover: hover)",f.nodes)])]}),i("focus",["&:focus"]),i("focus-visible",["&:focus-visible"]),i("active",["&:active"]),i("enabled",["&:enabled"]),i("disabled",["&:disabled"]),i("inert",["&:is([inert], [inert] *)"]),t.compound("in",2,(f,g)=>{if(g.modifier)return null;let d=!1;if(F([f],(m,{path:w})=>{if(m.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return d=!1,2;m.selector=`:where(${m.selector.replaceAll("&","*")}) &`,d=!0}),!d)return null}),t.suggest("in",()=>Array.from(t.keys()).filter(f=>t.compoundsWith("in",f))),t.compound("has",2,(f,g)=>{if(g.modifier)return null;let d=!1;if(F([f],(m,{path:w})=>{if(m.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return d=!1,2;m.selector=`&:has(${m.selector.replaceAll("&","*")})`,d=!0}),!d)return null}),t.suggest("has",()=>Array.from(t.keys()).filter(f=>t.compoundsWith("has",f))),t.functional("aria",(f,g)=>{if(!g.value||g.modifier)return null;g.value.kind==="arbitrary"?f.nodes=[M(`&[aria-${wr(g.value.value)}]`,f.nodes)]:f.nodes=[M(`&[aria-${g.value.value}="true"]`,f.nodes)]}),t.suggest("aria",()=>["busy","checked","disabled","expanded","hidden","pressed","readonly","required","selected"]),t.functional("data",(f,g)=>{if(!g.value||g.modifier)return null;f.nodes=[M(`&[data-${wr(g.value.value)}]`,f.nodes)]}),t.functional("nth",(f,g)=>{if(!g.value||g.modifier||g.value.kind==="named"&&!E(g.value.value))return null;f.nodes=[M(`&:nth-child(${g.value.value})`,f.nodes)]}),t.functional("nth-last",(f,g)=>{if(!g.value||g.modifier||g.value.kind==="named"&&!E(g.value.value))return null;f.nodes=[M(`&:nth-last-child(${g.value.value})`,f.nodes)]}),t.functional("nth-of-type",(f,g)=>{if(!g.value||g.modifier||g.value.kind==="named"&&!E(g.value.value))return null;f.nodes=[M(`&:nth-of-type(${g.value.value})`,f.nodes)]}),t.functional("nth-last-of-type",(f,g)=>{if(!g.value||g.modifier||g.value.kind==="named"&&!E(g.value.value))return null;f.nodes=[M(`&:nth-last-of-type(${g.value.value})`,f.nodes)]}),t.functional("supports",(f,g)=>{if(!g.value||g.modifier)return null;let d=g.value.value;if(d===null)return null;if(/^[\w-]*\s*\(/.test(d)){let m=d.replace(/\b(and|or|not)\b/g," $1 ");f.nodes=[z("@supports",m,f.nodes)];return}d.includes(":")||(d=`${d}: var(--tw)`),(d[0]!=="("||d[d.length-1]!==")")&&(d=`(${d})`),f.nodes=[z("@supports",d,f.nodes)]},{compounds:1}),i("motion-safe",["@media (prefers-reduced-motion: no-preference)"]),i("motion-reduce",["@media (prefers-reduced-motion: reduce)"]),i("contrast-more",["@media (prefers-contrast: more)"]),i("contrast-less",["@media (prefers-contrast: less)"]);{let f=function(g,d,m,w){if(g===d)return 0;let v=w.get(g);if(v===null)return m==="asc"?-1:1;let x=w.get(d);return x===null?m==="asc"?1:-1:we(v,x,m)};var u=f;{let g=r.namespace("--breakpoint"),d=new B(m=>{switch(m.kind){case"static":return r.resolveValue(m.root,["--breakpoint"])??null;case"functional":{if(!m.value||m.modifier)return null;let w=null;return m.value.kind==="arbitrary"?w=m.value.value:m.value.kind==="named"&&(w=r.resolveValue(m.value.value,["--breakpoint"])),!w||w.includes("var(")?null:w}case"arbitrary":case"compound":return null}});t.group(()=>{t.functional("max",(m,w)=>{if(w.modifier)return null;let v=d.get(w);if(v===null)return null;m.nodes=[z("@media",`(width < ${v})`,m.nodes)]},{compounds:1})},(m,w)=>f(m,w,"desc",d)),t.suggest("max",()=>Array.from(g.keys()).filter(m=>m!==null)),t.group(()=>{for(let[m,w]of r.namespace("--breakpoint"))m!==null&&t.static(m,v=>{v.nodes=[z("@media",`(width >= ${w})`,v.nodes)]},{compounds:1});t.functional("min",(m,w)=>{if(w.modifier)return null;let v=d.get(w);if(v===null)return null;m.nodes=[z("@media",`(width >= ${v})`,m.nodes)]},{compounds:1})},(m,w)=>f(m,w,"asc",d)),t.suggest("min",()=>Array.from(g.keys()).filter(m=>m!==null))}{let g=r.namespace("--container"),d=new B(m=>{switch(m.kind){case"functional":{if(m.value===null)return null;let w=null;return m.value.kind==="arbitrary"?w=m.value.value:m.value.kind==="named"&&(w=r.resolveValue(m.value.value,["--container"])),!w||w.includes("var(")?null:w}case"static":case"arbitrary":case"compound":return null}});t.group(()=>{t.functional("@max",(m,w)=>{let v=d.get(w);if(v===null)return null;m.nodes=[z("@container",w.modifier?`${w.modifier.value} (width < ${v})`:`(width < ${v})`,m.nodes)]},{compounds:1})},(m,w)=>f(m,w,"desc",d)),t.suggest("@max",()=>Array.from(g.keys()).filter(m=>m!==null)),t.group(()=>{t.functional("@",(m,w)=>{let v=d.get(w);if(v===null)return null;m.nodes=[z("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,m.nodes)]},{compounds:1}),t.functional("@min",(m,w)=>{let v=d.get(w);if(v===null)return null;m.nodes=[z("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,m.nodes)]},{compounds:1})},(m,w)=>f(m,w,"asc",d)),t.suggest("@min",()=>Array.from(g.keys()).filter(m=>m!==null)),t.suggest("@",()=>Array.from(g.keys()).filter(m=>m!==null))}}return i("portrait",["@media (orientation: portrait)"]),i("landscape",["@media (orientation: landscape)"]),i("ltr",['&:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *)']),i("rtl",['&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *)']),i("dark",["@media (prefers-color-scheme: dark)"]),i("starting",["@starting-style"]),i("print",["@media print"]),i("forced-colors",["@media (forced-colors: active)"]),i("inverted-colors",["@media (inverted-colors: inverted)"]),i("pointer-none",["@media (pointer: none)"]),i("pointer-coarse",["@media (pointer: coarse)"]),i("pointer-fine",["@media (pointer: fine)"]),i("any-pointer-none",["@media (any-pointer: none)"]),i("any-pointer-coarse",["@media (any-pointer: coarse)"]),i("any-pointer-fine",["@media (any-pointer: fine)"]),i("noscript",["@media (scripting: none)"]),t}function wr(r){if(r.includes("=")){let[t,...i]=D(r,"="),e=i.join("=").trim();if(e[0]==="'"||e[0]==='"')return r;if(e.length>1){let n=e[e.length-1];if(e[e.length-2]===" "&&(n==="i"||n==="I"||n==="s"||n==="S"))return`${t}="${e.slice(0,-2)}" ${n}`}return`${t}="${e}"`}return r}function At(r,t){F(r,(i,{replaceWith:e})=>{if(i.kind==="at-rule"&&i.name==="@slot")e(t);else if(i.kind==="at-rule"&&(i.name==="@keyframes"||i.name==="@property"))return Object.assign(i,L([z(i.name,i.params,i.nodes)])),1})}function br(r){let t=cr(r),i=yr(r),e=new B(u=>ir(u,c)),n=new B(u=>Array.from(rr(u,c))),s=new B(u=>{let f=kr(u,c);try{xe(f.map(({node:g})=>g),c)}catch{return[]}return f}),a=new B(u=>{for(let f of qe(u))r.markUsedVariable(f)}),c={theme:r,utilities:t,variants:i,invalidCandidates:new Set,important:!1,candidatesToCss(u){let f=[];for(let g of u){let d=!1,{astNodes:m}=pe([g],this,{onInvalidCandidate(){d=!0}});m=ve(m,c,0),m.length===0||d?f.push(null):f.push(ne(m))}return f},getClassOrder(u){return vr(this,u)},getClassList(){return gr(this)},getVariants(){return hr(this)},parseCandidate(u){return n.get(u)},parseVariant(u){return e.get(u)},compileAstNodes(u){return s.get(u)},printCandidate(u){return or(c,u)},printVariant(u){return He(u)},getVariantOrder(){let u=Array.from(e.values());u.sort((m,w)=>this.variants.compare(m,w));let f=new Map,g,d=0;for(let m of u)m!==null&&(g!==void 0&&this.variants.compare(g,m)!==0&&d++,f.set(m,d),g=m);return f},resolveThemeValue(u,f=!0){let g=u.lastIndexOf("/"),d=null;g!==-1&&(d=u.slice(g+1).trim(),u=u.slice(0,g).trim());let m=r.resolve(null,[u],f?1:0)??void 0;return d&&m?Q(m,d):m},trackUsedVariables(u){a.get(u)}};return c}var Ct=["container-type","pointer-events","visibility","position","inset","inset-inline","inset-block","inset-inline-start","inset-inline-end","top","right","bottom","left","isolation","z-index","order","grid-column","grid-column-start","grid-column-end","grid-row","grid-row-start","grid-row-end","float","clear","--tw-container-component","margin","margin-inline","margin-block","margin-inline-start","margin-inline-end","margin-top","margin-right","margin-bottom","margin-left","box-sizing","display","field-sizing","aspect-ratio","height","max-height","min-height","width","max-width","min-width","flex","flex-shrink","flex-grow","flex-basis","table-layout","caption-side","border-collapse","border-spacing","transform-origin","translate","--tw-translate-x","--tw-translate-y","--tw-translate-z","scale","--tw-scale-x","--tw-scale-y","--tw-scale-z","rotate","--tw-rotate-x","--tw-rotate-y","--tw-rotate-z","--tw-skew-x","--tw-skew-y","transform","animation","cursor","touch-action","--tw-pan-x","--tw-pan-y","--tw-pinch-zoom","resize","scroll-snap-type","--tw-scroll-snap-strictness","scroll-snap-align","scroll-snap-stop","scroll-margin","scroll-margin-inline","scroll-margin-block","scroll-margin-inline-start","scroll-margin-inline-end","scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left","scroll-padding","scroll-padding-inline","scroll-padding-block","scroll-padding-inline-start","scroll-padding-inline-end","scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left","list-style-position","list-style-type","list-style-image","appearance","columns","break-before","break-inside","break-after","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-template-columns","grid-template-rows","flex-direction","flex-wrap","place-content","place-items","align-content","align-items","justify-content","justify-items","gap","column-gap","row-gap","--tw-space-x-reverse","--tw-space-y-reverse","divide-x-width","divide-y-width","--tw-divide-y-reverse","divide-style","divide-color","place-self","align-self","justify-self","overflow","overflow-x","overflow-y","overscroll-behavior","overscroll-behavior-x","overscroll-behavior-y","scroll-behavior","border-radius","border-start-radius","border-end-radius","border-top-radius","border-right-radius","border-bottom-radius","border-left-radius","border-start-start-radius","border-start-end-radius","border-end-end-radius","border-end-start-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-width","border-inline-width","border-block-width","border-inline-start-width","border-inline-end-width","border-top-width","border-right-width","border-bottom-width","border-left-width","border-style","border-inline-style","border-block-style","border-inline-start-style","border-inline-end-style","border-top-style","border-right-style","border-bottom-style","border-left-style","border-color","border-inline-color","border-block-color","border-inline-start-color","border-inline-end-color","border-top-color","border-right-color","border-bottom-color","border-left-color","background-color","background-image","--tw-gradient-position","--tw-gradient-stops","--tw-gradient-via-stops","--tw-gradient-from","--tw-gradient-from-position","--tw-gradient-via","--tw-gradient-via-position","--tw-gradient-to","--tw-gradient-to-position","mask-image","--tw-mask-top","--tw-mask-top-from-color","--tw-mask-top-from-position","--tw-mask-top-to-color","--tw-mask-top-to-position","--tw-mask-right","--tw-mask-right-from-color","--tw-mask-right-from-position","--tw-mask-right-to-color","--tw-mask-right-to-position","--tw-mask-bottom","--tw-mask-bottom-from-color","--tw-mask-bottom-from-position","--tw-mask-bottom-to-color","--tw-mask-bottom-to-position","--tw-mask-left","--tw-mask-left-from-color","--tw-mask-left-from-position","--tw-mask-left-to-color","--tw-mask-left-to-position","--tw-mask-linear","--tw-mask-linear-position","--tw-mask-linear-from-color","--tw-mask-linear-from-position","--tw-mask-linear-to-color","--tw-mask-linear-to-position","--tw-mask-radial","--tw-mask-radial-shape","--tw-mask-radial-size","--tw-mask-radial-position","--tw-mask-radial-from-color","--tw-mask-radial-from-position","--tw-mask-radial-to-color","--tw-mask-radial-to-position","--tw-mask-conic","--tw-mask-conic-position","--tw-mask-conic-from-color","--tw-mask-conic-from-position","--tw-mask-conic-to-color","--tw-mask-conic-to-position","box-decoration-break","background-size","background-attachment","background-clip","background-position","background-repeat","background-origin","mask-composite","mask-mode","mask-type","mask-size","mask-clip","mask-position","mask-repeat","mask-origin","fill","stroke","stroke-width","object-fit","object-position","padding","padding-inline","padding-block","padding-inline-start","padding-inline-end","padding-top","padding-right","padding-bottom","padding-left","text-align","text-indent","vertical-align","font-family","font-size","line-height","font-weight","letter-spacing","text-wrap","overflow-wrap","word-break","text-overflow","hyphens","white-space","color","text-transform","font-style","font-stretch","font-variant-numeric","text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","-webkit-font-smoothing","placeholder-color","caret-color","accent-color","color-scheme","opacity","background-blend-mode","mix-blend-mode","box-shadow","--tw-shadow","--tw-shadow-color","--tw-ring-shadow","--tw-ring-color","--tw-inset-shadow","--tw-inset-shadow-color","--tw-inset-ring-shadow","--tw-inset-ring-color","--tw-ring-offset-width","--tw-ring-offset-color","outline","outline-width","outline-offset","outline-color","--tw-blur","--tw-brightness","--tw-contrast","--tw-drop-shadow","--tw-grayscale","--tw-hue-rotate","--tw-invert","--tw-saturate","--tw-sepia","filter","--tw-backdrop-blur","--tw-backdrop-brightness","--tw-backdrop-contrast","--tw-backdrop-grayscale","--tw-backdrop-hue-rotate","--tw-backdrop-invert","--tw-backdrop-opacity","--tw-backdrop-saturate","--tw-backdrop-sepia","backdrop-filter","transition-property","transition-behavior","transition-delay","transition-duration","transition-timing-function","will-change","contain","content","forced-color-adjust"];function pe(r,t,{onInvalidCandidate:i}={}){let e=new Map,n=[],s=new Map;for(let c of r){if(t.invalidCandidates.has(c)){i?.(c);continue}let u=t.parseCandidate(c);if(u.length===0){i?.(c);continue}s.set(c,u)}let a=t.getVariantOrder();for(let[c,u]of s){let f=!1;for(let g of u){let d=t.compileAstNodes(g);if(d.length!==0){f=!0;for(let{node:m,propertySort:w}of d){let v=0n;for(let x of g.variants)v|=1n<{let f=e.get(c),g=e.get(u);if(f.variants-g.variants!==0n)return Number(f.variants-g.variants);let d=0;for(;d1)return null;for(let u of a.nodes)if(u.kind!=="rule"&&u.kind!=="at-rule"||n(u,t)===null)return null;F(a.nodes,u=>{if((u.kind==="rule"||u.kind==="at-rule")&&u.nodes.length<=0)return u.nodes=r.nodes,1}),r.nodes=a.nodes;return}if(n(r,t)===null)return null}function xr(r){let t=r.options?.types??[];return t.length>1&&t.includes("any")}function Ki(r,t){if(r.kind==="arbitrary"){let a=r.value;return r.modifier&&(a=X(a,r.modifier,t.theme)),a===null?[]:[[l(r.property,a)]]}let i=t.utilities.get(r.root)??[],e=[],n=i.filter(a=>!xr(a));for(let a of n){if(a.kind!==r.kind)continue;let c=a.compileFn(r);if(c!==void 0){if(c===null)return e;e.push(c)}}if(e.length>0)return e;let s=i.filter(a=>xr(a));for(let a of s){if(a.kind!==r.kind)continue;let c=a.compileFn(r);if(c!==void 0){if(c===null)return e;e.push(c)}}return e}function Ar(r){for(let t of r)t.kind!=="at-root"&&(t.kind==="declaration"?t.important=!0:(t.kind==="rule"||t.kind==="at-rule")&&Ar(t.nodes))}function _i(r){let t=new Set,i=0,e=r.slice(),n=!1;for(;e.length>0;){let s=e.shift();if(s.kind==="declaration"){if(s.value===void 0||(i++,n))continue;if(s.property==="--tw-sort"){let c=Ct.indexOf(s.value??"");if(c!==-1){t.add(c),n=!0;continue}}let a=Ct.indexOf(s.property);a!==-1&&t.add(a)}else if(s.kind==="rule"||s.kind==="at-rule")for(let a of s.nodes)e.push(a)}return{order:Array.from(t).sort((s,a)=>s-a),count:i}}function Oe(r,t){let i=0,e=H("&",r),n=new Set,s=new B(()=>new Set),a=new B(()=>new Set);F([e],(d,{parent:m,path:w})=>{if(d.kind==="at-rule"){if(d.name==="@keyframes")return F(d.nodes,v=>{if(v.kind==="at-rule"&&v.name==="@apply")throw new Error("You cannot use `@apply` inside `@keyframes`.")}),1;if(d.name==="@utility"){let v=d.params.replace(/-\*$/,"");a.get(v).add(d),F(d.nodes,x=>{if(!(x.kind!=="at-rule"||x.name!=="@apply")){n.add(d);for(let k of Cr(x,t))s.get(d).add(k)}});return}if(d.name==="@apply"){if(m===null)return;i|=1,n.add(m);for(let v of Cr(d,t))for(let x of w)x!==d&&n.has(x)&&s.get(x).add(v)}}});let c=new Set,u=[],f=new Set;function g(d,m=[]){if(!c.has(d)){if(f.has(d)){let w=m[(m.indexOf(d)+1)%m.length];throw d.kind==="at-rule"&&d.name==="@utility"&&w.kind==="at-rule"&&w.name==="@utility"&&F(d.nodes,v=>{if(v.kind!=="at-rule"||v.name!=="@apply")return;let x=v.params.split(/\s+/g);for(let k of x)for(let N of t.parseCandidate(k))switch(N.kind){case"arbitrary":break;case"static":case"functional":if(w.params.replace(/-\*$/,"")===N.root)throw new Error(`You cannot \`@apply\` the \`${k}\` utility here because it creates a circular dependency.`);break;default:}}),new Error(`Circular dependency detected: + +${ne([d])} +Relies on: + +${ne([w])}`)}f.add(d);for(let w of s.get(d))for(let v of a.get(w))m.push(d),g(v,m),m.pop();c.add(d),f.delete(d),u.push(d)}}for(let d of n)g(d);for(let d of u)"nodes"in d&&F(d.nodes,(m,{replaceWith:w})=>{if(m.kind!=="at-rule"||m.name!=="@apply")return;let v=m.params.split(/(\s+)/g),x={},k=0;for(let[N,b]of v.entries())N%2===0&&(x[b]=k),k+=b.length;{let N=Object.keys(x),b=pe(N,t,{onInvalidCandidate:R=>{if(t.theme.prefix&&!R.startsWith(t.theme.prefix))throw new Error(`Cannot apply unprefixed utility class \`${R}\`. Did you mean \`${t.theme.prefix}:${R}\`?`);if(t.invalidCandidates.has(R))throw new Error(`Cannot apply utility class \`${R}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);let _=D(R,":");if(_.length>1){let K=_.pop();if(t.candidatesToCss([K])[0]){let G=t.candidatesToCss(_.map(W=>`${W}:[--tw-variant-check:1]`)),I=_.filter((W,Z)=>G[Z]===null);if(I.length>0){if(I.length===1)throw new Error(`Cannot apply utility class \`${R}\` because the ${I.map(W=>`\`${W}\``)} variant does not exist.`);{let W=new Intl.ListFormat("en",{style:"long",type:"conjunction"});throw new Error(`Cannot apply utility class \`${R}\` because the ${W.format(I.map(Z=>`\`${Z}\``))} variants do not exist.`)}}}}throw t.theme.size===0?new Error(`Cannot apply unknown utility class \`${R}\`. Are you using CSS modules or similar and missing \`@reference\`? https://tailwindcss.com/docs/functions-and-directives#reference-directive`):new Error(`Cannot apply unknown utility class \`${R}\``)}}),S=m.src,P=b.astNodes.map(R=>{let _=b.nodeSorting.get(R)?.candidate,K=_?x[_]:void 0;if(R=structuredClone(R),!S||!_||K===void 0)return F([R],I=>{I.src=S}),R;let G=[S[0],S[1],S[2]];return G[1]+=7+K,G[2]=G[1]+_.length,F([R],I=>{I.src=G}),R}),U=[];for(let R of P)if(R.kind==="rule")for(let _ of R.nodes)U.push(_);else U.push(R);w(U)}});return i}function*Cr(r,t){for(let i of r.params.split(/\s+/g))for(let e of t.parseCandidate(i))switch(e.kind){case"arbitrary":break;case"static":case"functional":yield e.root;break;default:}}async function $t(r,t,i,e=0,n=!1){let s=0,a=[];return F(r,(c,{replaceWith:u})=>{if(c.kind==="at-rule"&&(c.name==="@import"||c.name==="@reference")){let f=ji(q(c.params));if(f===null)return;c.name==="@reference"&&(f.media="reference"),s|=2;let{uri:g,layer:d,media:m,supports:w}=f;if(g.startsWith("data:")||g.startsWith("http://")||g.startsWith("https://"))return;let v=le({},[]);return a.push((async()=>{if(e>100)throw new Error(`Exceeded maximum recursion depth while resolving \`${g}\` in \`${t}\`)`);let x=await i(g,t),k=me(x.content,{from:n?x.path:void 0});await $t(k,x.base,i,e+1,n),v.nodes=Di(c,[le({base:x.base},k)],d,m,w)})()),u(v),1}}),a.length>0&&await Promise.all(a),s}function ji(r){let t,i=null,e=null,n=null;for(let s=0;s/g,"1")),e[0]==="opacity"&&(typeof n=="number"||typeof n=="string")){let a=typeof n=="string"?parseFloat(n):n;a>=0&&a<=1&&(n=a*100+"%")}let s=et(e);s&&r.theme.add(`--${s}`,""+n,7)}if(Object.hasOwn(t,"fontFamily")){let e=5;{let n=Ce(t.fontFamily.sans);n&&r.theme.hasDefault("--font-sans")&&(r.theme.add("--default-font-family",n,e),r.theme.add("--default-font-feature-settings",Ce(t.fontFamily.sans,"fontFeatureSettings")??"normal",e),r.theme.add("--default-font-variation-settings",Ce(t.fontFamily.sans,"fontVariationSettings")??"normal",e))}{let n=Ce(t.fontFamily.mono);n&&r.theme.hasDefault("--font-mono")&&(r.theme.add("--default-mono-font-family",n,e),r.theme.add("--default-mono-font-feature-settings",Ce(t.fontFamily.mono,"fontFeatureSettings")??"normal",e),r.theme.add("--default-mono-font-variation-settings",Ce(t.fontFamily.mono,"fontVariationSettings")??"normal",e))}}return t}function Ui(r){let t=[];return Vr(r,[],(i,e)=>{if(Fi(i))return t.push([e,i]),1;if(Li(i)){t.push([e,i[0]]);for(let n of Reflect.ownKeys(i[1]))t.push([[...e,`-${n}`],i[1][n]]);return 1}if(Array.isArray(i)&&i.every(n=>typeof n=="string"))return e[0]==="fontSize"?(t.push([e,i[0]]),i.length>=2&&t.push([[...e,"-line-height"],i[1]])):t.push([e,i.join(", ")]),1}),t}var Ii=/^[a-zA-Z0-9-_%/\.]+$/;function et(r){if(r[0]==="container")return null;r=structuredClone(r),r[0]==="animation"&&(r[0]="animate"),r[0]==="aspectRatio"&&(r[0]="aspect"),r[0]==="borderRadius"&&(r[0]="radius"),r[0]==="boxShadow"&&(r[0]="shadow"),r[0]==="colors"&&(r[0]="color"),r[0]==="containers"&&(r[0]="container"),r[0]==="fontFamily"&&(r[0]="font"),r[0]==="fontSize"&&(r[0]="text"),r[0]==="letterSpacing"&&(r[0]="tracking"),r[0]==="lineHeight"&&(r[0]="leading"),r[0]==="maxWidth"&&(r[0]="container"),r[0]==="screens"&&(r[0]="breakpoint"),r[0]==="transitionTimingFunction"&&(r[0]="ease");for(let t of r)if(!Ii.test(t))return null;return r.map((t,i,e)=>t==="1"&&i!==e.length-1?"":t).map(t=>t.replaceAll(".","_").replace(/([a-z])([A-Z])/g,(i,e,n)=>`${e}-${n.toLowerCase()}`)).filter((t,i)=>t!=="DEFAULT"||i!==r.length-1).join("-")}function Fi(r){return typeof r=="number"||typeof r=="string"}function Li(r){if(!Array.isArray(r)||r.length!==2||typeof r[0]!="string"&&typeof r[0]!="number"||r[1]===void 0||r[1]===null||typeof r[1]!="object")return!1;for(let t of Reflect.ownKeys(r[1]))if(typeof t!="string"||typeof r[1][t]!="string"&&typeof r[1][t]!="number")return!1;return!0}function Vr(r,t=[],i){for(let e of Reflect.ownKeys(r)){let n=r[e];if(n==null)continue;let s=[...t,e],a=i(n,s)??0;if(a!==1){if(a===2)return 2;if(!(!Array.isArray(n)&&typeof n!="object")&&Vr(n,s,i)===2)return 2}}}function tt(r){let t=[];for(let i of D(r,".")){if(!i.includes("[")){t.push(i);continue}let e=0;for(;;){let n=i.indexOf("[",e),s=i.indexOf("]",n);if(n===-1||s===-1)break;n>e&&t.push(i.slice(e,n)),t.push(i.slice(n+1,s)),e=s+1}e<=i.length-1&&t.push(i.slice(e))}return t}function $e(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;let t=Object.getPrototypeOf(r);return t===null||Object.getPrototypeOf(t)===null}function Ke(r,t,i,e=[]){for(let n of t)if(n!=null)for(let s of Reflect.ownKeys(n)){e.push(s);let a=i(r[s],n[s],e);a!==void 0?r[s]=a:!$e(r[s])||!$e(n[s])?r[s]=n[s]:r[s]=Ke({},[r[s],n[s]],i,e),e.pop()}return r}function rt(r,t,i){return function(n,s){let a=n.lastIndexOf("/"),c=null;a!==-1&&(c=n.slice(a+1).trim(),n=n.slice(0,a).trim());let u=(()=>{let f=tt(n),[g,d]=zi(r.theme,f),m=i(Nr(t()??{},f)??null);if(typeof m=="string"&&(m=m.replace("","1")),typeof g!="object")return typeof d!="object"&&d&4?m??g:g;if(m!==null&&typeof m=="object"&&!Array.isArray(m)){let w=Ke({},[m],(v,x)=>x);if(g===null&&Object.hasOwn(m,"__CSS_VALUES__")){let v={};for(let x in m.__CSS_VALUES__)v[x]=m[x],delete w[x];g=v}for(let v in g)v!=="__CSS_VALUES__"&&(m?.__CSS_VALUES__?.[v]&4&&Nr(w,v.split("-"))!==void 0||(w[ge(v)]=g[v]));return w}if(Array.isArray(g)&&Array.isArray(d)&&Array.isArray(m)){let w=g[0],v=g[1];d[0]&4&&(w=m[0]??w);for(let x of Object.keys(v))d[1][x]&4&&(v[x]=m[1][x]??v[x]);return[w,v]}return g??m})();return c&&typeof u=="string"&&(u=Q(u,c)),u??s}}function zi(r,t){if(t.length===1&&t[0].startsWith("--"))return[r.get([t[0]]),r.getOptions(t[0])];let i=et(t),e=new Map,n=new B(()=>new Map),s=r.namespace(`--${i}`);if(s.size===0)return[null,0];let a=new Map;for(let[g,d]of s){if(!g||!g.includes("--")){e.set(g,d),a.set(g,r.getOptions(g?`--${i}-${g}`:`--${i}`));continue}let m=g.indexOf("--"),w=g.slice(0,m),v=g.slice(m+2);v=v.replace(/-([a-z])/g,(x,k)=>k.toUpperCase()),n.get(w===""?null:w).set(v,[d,r.getOptions(`--${i}${g}`)])}let c=r.getOptions(`--${i}`);for(let[g,d]of n){let m=e.get(g);if(typeof m!="string")continue;let w={},v={};for(let[x,[k,N]]of d)w[x]=k,v[x]=N;e.set(g,[m,w]),a.set(g,[c,v])}let u={},f={};for(let[g,d]of e)Sr(u,[g??"DEFAULT"],d);for(let[g,d]of a)Sr(f,[g??"DEFAULT"],d);return t[t.length-1]==="DEFAULT"?[u?.DEFAULT??null,f.DEFAULT??0]:"DEFAULT"in u&&Object.keys(u).length===1?[u.DEFAULT,f.DEFAULT??0]:(u.__CSS_VALUES__=f,[u,f])}function Nr(r,t){for(let i=0;i0){let m=_e(n);e?e.nodes.push(m):t.push(m),n=""}let u=a,f=a+1;for(;f0){let f=_e(n);u.nodes.push(f),n=""}i.length>0?e=i[i.length-1]:e=null;break}case Yi:case Ji:case Zi:{if(n.length>0){let u=_e(n);e?e.nodes.push(u):t.push(u)}n=String.fromCharCode(c);break}case Kr:{if(n.length>0){let g=_e(n);e?e.nodes.push(g):t.push(g)}n="";let u=a,f=0;for(let g=a+1;g0&&t.push(_e(n)),t}var Fr=/^[a-z@][a-zA-Z0-9/%._-]*$/;function Vt({designSystem:r,ast:t,resolvedConfig:i,featuresRef:e,referenceMode:n}){let s={addBase(a){if(n)return;let c=ae(a);e.current|=xe(c,r),t.push(z("@layer","base",c))},addVariant(a,c){if(!Xe.test(a))throw new Error(`\`addVariant('${a}')\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);if(typeof c=="string"){if(c.includes(":merge("))return}else if(Array.isArray(c)){if(c.some(f=>f.includes(":merge(")))return}else if(typeof c=="object"){let f=function(g,d){return Object.entries(g).some(([m,w])=>m.includes(d)||typeof w=="object"&&f(w,d))};var u=f;if(f(c,":merge("))return}typeof c=="string"||Array.isArray(c)?r.variants.static(a,f=>{f.nodes=Lr(c,f.nodes)},{compounds:ye(typeof c=="string"?[c]:c)}):typeof c=="object"&&r.variants.fromAst(a,ae(c))},matchVariant(a,c,u){function f(d,m,w){let v=c(d,{modifier:m?.value??null});return Lr(v,w)}try{let d=c("a",{modifier:null});if(typeof d=="string"&&d.includes(":merge("))return;if(Array.isArray(d)&&d.some(m=>m.includes(":merge(")))return}catch{}let g=Object.keys(u?.values??{});r.variants.group(()=>{r.variants.functional(a,(d,m)=>{if(!m.value){if(u?.values&&"DEFAULT"in u.values){d.nodes=f(u.values.DEFAULT,m.modifier,d.nodes);return}return null}if(m.value.kind==="arbitrary")d.nodes=f(m.value.value,m.modifier,d.nodes);else if(m.value.kind==="named"&&u?.values){let w=u.values[m.value.value];if(typeof w!="string")return;d.nodes=f(w,m.modifier,d.nodes)}})},(d,m)=>{if(d.kind!=="functional"||m.kind!=="functional")return 0;let w=d.value?d.value.value:"DEFAULT",v=m.value?m.value.value:"DEFAULT",x=u?.values?.[w]??w,k=u?.values?.[v]??v;if(u&&typeof u.sort=="function")return u.sort({value:x,modifier:d.modifier?.value??null},{value:k,modifier:m.modifier?.value??null});let N=g.indexOf(w),b=g.indexOf(v);return N=N===-1?g.length:N,b=b===-1?g.length:b,N!==b?N-b:xObject.entries(f));c=c.flatMap(([f,g])=>D(f,",").map(d=>[d.trim(),g]));let u=new B(()=>[]);for(let[f,g]of c){if(f.startsWith("@keyframes ")){n||t.push(H(f,ae(g)));continue}let d=it(f),m=!1;if(je(d,w=>{if(w.kind==="selector"&&w.value[0]==="."&&Fr.test(w.value.slice(1))){let v=w.value;w.value="&";let x=De(d),k=v.slice(1),N=x==="&"?ae(g):[H(x,ae(g))];u.get(k).push(...N),m=!0,w.value=v;return}if(w.kind==="function"&&w.value===":not")return 1}),!m)throw new Error(`\`addUtilities({ '${f}' : \u2026 })\` defines an invalid utility selector. Utilities must be a single class name and start with a lowercase letter, eg. \`.scrollbar-none\`.`)}for(let[f,g]of u)r.theme.prefix&&F(g,d=>{if(d.kind==="rule"){let m=it(d.selector);je(m,w=>{w.kind==="selector"&&w.value[0]==="."&&(w.value=`.${r.theme.prefix}\\:${w.value.slice(1)}`)}),d.selector=De(m)}}),r.utilities.static(f,d=>{let m=structuredClone(g);return zr(m,f,d.raw),e.current|=Oe(m,r),m})},matchUtilities(a,c){let u=c?.type?Array.isArray(c?.type)?c.type:[c.type]:["any"];for(let[g,d]of Object.entries(a)){let m=function({negative:w}){return v=>{if(v.value?.kind==="arbitrary"&&u.length>0&&!u.includes("any")&&(v.value.dataType&&!u.includes(v.value.dataType)||!v.value.dataType&&!J(v.value.value,u)))return;let x=u.includes("color"),k=null,N=!1;{let P=c?.values??{};x&&(P=Object.assign({inherit:"inherit",transparent:"transparent",current:"currentcolor"},P)),v.value?v.value.kind==="arbitrary"?k=v.value.value:v.value.fraction&&P[v.value.fraction]?(k=P[v.value.fraction],N=!0):P[v.value.value]?k=P[v.value.value]:P.__BARE_VALUE__&&(k=P.__BARE_VALUE__(v.value)??null,N=(v.value.fraction!==null&&k?.includes("/"))??!1):k=P.DEFAULT??null}if(k===null)return;let b;{let P=c?.modifiers??null;v.modifier?P==="any"||v.modifier.kind==="arbitrary"?b=v.modifier.value:P?.[v.modifier.value]?b=P[v.modifier.value]:x&&!Number.isNaN(Number(v.modifier.value))?b=`${v.modifier.value}%`:b=null:b=null}if(v.modifier&&b===null&&!N)return v.value?.kind==="arbitrary"?null:void 0;x&&b!==null&&(k=Q(k,b)),w&&(k=`calc(${k} * -1)`);let S=ae(d(k,{modifier:b}));return zr(S,g,v.raw),e.current|=Oe(S,r),S}};var f=m;if(!Fr.test(g))throw new Error(`\`matchUtilities({ '${g}' : \u2026 })\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter, eg. \`scrollbar\`.`);c?.supportsNegativeValues&&r.utilities.functional(`-${g}`,m({negative:!0}),{types:u}),r.utilities.functional(g,m({negative:!1}),{types:u}),r.utilities.suggest(g,()=>{let w=c?.values??{},v=new Set(Object.keys(w));v.delete("__BARE_VALUE__"),v.has("DEFAULT")&&(v.delete("DEFAULT"),v.add(null));let x=c?.modifiers??{},k=x==="any"?[]:Object.keys(x);return[{supportsNegative:c?.supportsNegativeValues??!1,values:Array.from(v),modifiers:k}]})}},addComponents(a,c){this.addUtilities(a,c)},matchComponents(a,c){this.matchUtilities(a,c)},theme:rt(r,()=>i.theme??{},a=>a),prefix(a){return a},config(a,c){let u=i;if(!a)return u;let f=tt(a);for(let g=0;gObject.entries(e));for(let[e,n]of i)if(typeof n!="object"){if(!e.startsWith("--")){if(n==="@slot"){t.push(H(e,[z("@slot")]));continue}e=e.replace(/([A-Z])/g,"-$1").toLowerCase()}t.push(l(e,String(n)))}else if(Array.isArray(n))for(let s of n)typeof s=="string"?t.push(l(e,s)):t.push(H(e,ae(s)));else n!==null&&t.push(H(e,ae(n)));return t}function Lr(r,t){return(typeof r=="string"?[r]:r).flatMap(e=>{if(e.trim().endsWith("}")){let n=e.replace("}","{@slot}}"),s=me(n);return At(s,t),s}else return H(e,t)})}function zr(r,t,i){F(r,e=>{if(e.kind==="rule"){let n=it(e.selector);je(n,s=>{s.kind==="selector"&&s.value===`.${t}`&&(s.value=`.${fe(i)}`)}),e.selector=De(n)}})}function Mr(r,t,i){for(let e of en(t))r.theme.addKeyframes(e)}function en(r){let t=[];if("keyframes"in r.theme)for(let[i,e]of Object.entries(r.theme.keyframes))t.push(z("@keyframes",i,ae(e)));return t}function Wr(r){return{theme:{...Pt,colors:({theme:t})=>t("color",{}),extend:{fontSize:({theme:t})=>({...t("text",{})}),boxShadow:({theme:t})=>({...t("shadow",{})}),animation:({theme:t})=>({...t("animate",{})}),aspectRatio:({theme:t})=>({...t("aspect",{})}),borderRadius:({theme:t})=>({...t("radius",{})}),screens:({theme:t})=>({...t("breakpoint",{})}),letterSpacing:({theme:t})=>({...t("tracking",{})}),lineHeight:({theme:t})=>({...t("leading",{})}),transitionDuration:{DEFAULT:r.get(["--default-transition-duration"])??null},transitionTimingFunction:{DEFAULT:r.get(["--default-transition-timing-function"])??null},maxWidth:({theme:t})=>({...t("container",{})})}}}}var tn={blocklist:[],future:{},prefix:"",important:!1,darkMode:null,theme:{},plugins:[],content:{files:[]}};function St(r,t){let i={design:r,configs:[],plugins:[],content:{files:[]},theme:{},extend:{},result:structuredClone(tn)};for(let n of t)Nt(i,n);for(let n of i.configs)"darkMode"in n&&n.darkMode!==void 0&&(i.result.darkMode=n.darkMode??null),"prefix"in n&&n.prefix!==void 0&&(i.result.prefix=n.prefix??""),"blocklist"in n&&n.blocklist!==void 0&&(i.result.blocklist=n.blocklist??[]),"important"in n&&n.important!==void 0&&(i.result.important=n.important??!1);let e=nn(i);return{resolvedConfig:{...i.result,content:i.content,theme:i.theme,plugins:i.plugins},replacedThemeKeys:e}}function rn(r,t){if(Array.isArray(r)&&$e(r[0]))return r.concat(t);if(Array.isArray(t)&&$e(t[0])&&$e(r))return[r,...t];if(Array.isArray(t))return t}function Nt(r,{config:t,base:i,path:e,reference:n}){let s=[];for(let u of t.plugins??[])"__isOptionsFunction"in u?s.push({...u(),reference:n}):"handler"in u?s.push({...u,reference:n}):s.push({handler:u,reference:n});if(Array.isArray(t.presets)&&t.presets.length===0)throw new Error("Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.");for(let u of t.presets??[])Nt(r,{path:e,base:i,config:u,reference:n});for(let u of s)r.plugins.push(u),u.config&&Nt(r,{path:e,base:i,config:u.config,reference:!!u.reference});let a=t.content??[],c=Array.isArray(a)?a:a.files;for(let u of c)r.content.files.push(typeof u=="object"?u:{base:i,pattern:u});r.configs.push(t)}function nn(r){let t=new Set,i=rt(r.design,()=>r.theme,n),e=Object.assign(i,{theme:i,colors:Et});function n(s){return typeof s=="function"?s(e)??null:s??null}for(let s of r.configs){let a=s.theme??{},c=a.extend??{};for(let u in a)u!=="extend"&&t.add(u);Object.assign(r.theme,a);for(let u in c)r.extend[u]??=[],r.extend[u].push(c[u])}delete r.theme.extend;for(let s in r.extend){let a=[r.theme[s],...r.extend[s]];r.theme[s]=()=>{let c=a.map(n);return Ke({},c,rn)}}for(let s in r.theme)r.theme[s]=n(r.theme[s]);if(r.theme.screens&&typeof r.theme.screens=="object")for(let s of Object.keys(r.theme.screens)){let a=r.theme.screens[s];a&&typeof a=="object"&&("raw"in a||"max"in a||"min"in a&&(r.theme.screens[s]=a.min))}return t}function Br(r,t){let i=r.theme.container||{};if(typeof i!="object"||i===null)return;let e=on(i,t);e.length!==0&&t.utilities.static("container",()=>structuredClone(e))}function on({center:r,padding:t,screens:i},e){let n=[],s=null;if(r&&n.push(l("margin-inline","auto")),(typeof t=="string"||typeof t=="object"&&t!==null&&"DEFAULT"in t)&&n.push(l("padding-inline",typeof t=="string"?t:t.DEFAULT)),typeof i=="object"&&i!==null){s=new Map;let a=Array.from(e.theme.namespace("--breakpoint").entries());if(a.sort((c,u)=>we(c[1],u[1],"asc")),a.length>0){let[c]=a[0];n.push(z("@media",`(width >= --theme(--breakpoint-${c}))`,[l("max-width","none")]))}for(let[c,u]of Object.entries(i)){if(typeof u=="object")if("min"in u)u=u.min;else continue;s.set(c,z("@media",`(width >= ${u})`,[l("max-width",u)]))}}if(typeof t=="object"&&t!==null){let a=Object.entries(t).filter(([c])=>c!=="DEFAULT").map(([c,u])=>[c,e.theme.resolveValue(c,["--breakpoint"]),u]).filter(Boolean);a.sort((c,u)=>we(c[1],u[1],"asc"));for(let[c,,u]of a)if(s&&s.has(c))s.get(c).nodes.push(l("padding-inline",u));else{if(s)continue;n.push(z("@media",`(width >= theme(--breakpoint-${c}))`,[l("padding-inline",u)]))}}if(s)for(let[,a]of s)n.push(a);return n}function qr({addVariant:r,config:t}){let i=t("darkMode",null),[e,n=".dark"]=Array.isArray(i)?i:[i];if(e==="variant"){let s;if(Array.isArray(n)||typeof n=="function"?s=n:typeof n=="string"&&(s=[n]),Array.isArray(s))for(let a of s)a===".dark"?(e=!1,console.warn('When using `variant` for `darkMode`, you must provide a selector.\nExample: `darkMode: ["variant", ".your-selector &"]`')):a.includes("&")||(e=!1,console.warn('When using `variant` for `darkMode`, your selector must contain `&`.\nExample `darkMode: ["variant", ".your-selector &"]`'));n=s}e===null||(e==="selector"?r("dark",`&:where(${n}, ${n} *)`):e==="media"?r("dark","@media (prefers-color-scheme: dark)"):e==="variant"?r("dark",n):e==="class"&&r("dark",`&:is(${n} *)`))}function Gr(r){for(let[t,i]of[["t","top"],["tr","top right"],["r","right"],["br","bottom right"],["b","bottom"],["bl","bottom left"],["l","left"],["tl","top left"]])r.utilities.static(`bg-gradient-to-${t}`,()=>[l("--tw-gradient-position",`to ${i} in oklab`),l("background-image","linear-gradient(var(--tw-gradient-stops))")]);r.utilities.static("bg-left-top",()=>[l("background-position","left top")]),r.utilities.static("bg-right-top",()=>[l("background-position","right top")]),r.utilities.static("bg-left-bottom",()=>[l("background-position","left bottom")]),r.utilities.static("bg-right-bottom",()=>[l("background-position","right bottom")]),r.utilities.static("object-left-top",()=>[l("object-position","left top")]),r.utilities.static("object-right-top",()=>[l("object-position","right top")]),r.utilities.static("object-left-bottom",()=>[l("object-position","left bottom")]),r.utilities.static("object-right-bottom",()=>[l("object-position","right bottom")]),r.utilities.functional("max-w-screen",t=>{if(!t.value||t.value.kind==="arbitrary")return;let i=r.theme.resolve(t.value.value,["--breakpoint"]);if(i)return[l("max-width",i)]}),r.utilities.static("overflow-ellipsis",()=>[l("text-overflow","ellipsis")]),r.utilities.static("decoration-slice",()=>[l("-webkit-box-decoration-break","slice"),l("box-decoration-break","slice")]),r.utilities.static("decoration-clone",()=>[l("-webkit-box-decoration-break","clone"),l("box-decoration-break","clone")]),r.utilities.functional("flex-shrink",t=>{if(!t.modifier){if(!t.value)return[l("flex-shrink","1")];if(t.value.kind==="arbitrary")return[l("flex-shrink",t.value.value)];if(E(t.value.value))return[l("flex-shrink",t.value.value)]}}),r.utilities.functional("flex-grow",t=>{if(!t.modifier){if(!t.value)return[l("flex-grow","1")];if(t.value.kind==="arbitrary")return[l("flex-grow",t.value.value)];if(E(t.value.value))return[l("flex-grow",t.value.value)]}}),r.utilities.static("order-none",()=>[l("order","0")])}function Jr(r,t){let i=r.theme.screens||{},e=t.variants.get("min")?.order??0,n=[];for(let[a,c]of Object.entries(i)){let m=function(w){t.variants.static(a,v=>{v.nodes=[z("@media",d,v.nodes)]},{order:w})};var s=m;let u=t.variants.get(a),f=t.theme.resolveValue(a,["--breakpoint"]);if(u&&f&&!t.theme.hasDefault(`--breakpoint-${a}`))continue;let g=!0;typeof c=="string"&&(g=!1);let d=ln(c);g?n.push(m):m(e)}if(n.length!==0){for(let[,a]of t.variants.variants)a.order>e&&(a.order+=n.length);t.variants.compareFns=new Map(Array.from(t.variants.compareFns).map(([a,c])=>(a>e&&(a+=n.length),[a,c])));for(let[a,c]of n.entries())c(e+a+1)}}function ln(r){return(Array.isArray(r)?r:[r]).map(i=>typeof i=="string"?{min:i}:i&&typeof i=="object"?i:null).map(i=>{if(i===null)return null;if("raw"in i)return i.raw;let e="";return i.max!==void 0&&(e+=`${i.max} >= `),e+="width",i.min!==void 0&&(e+=` >= ${i.min}`),`(${e})`}).filter(Boolean).join(", ")}function Hr(r,t){let i=r.theme.aria||{},e=r.theme.supports||{},n=r.theme.data||{};if(Object.keys(i).length>0){let s=t.variants.get("aria"),a=s?.applyFn,c=s?.compounds;t.variants.functional("aria",(u,f)=>{let g=f.value;return g&&g.kind==="named"&&g.value in i?a?.(u,{...f,value:{kind:"arbitrary",value:i[g.value]}}):a?.(u,f)},{compounds:c})}if(Object.keys(e).length>0){let s=t.variants.get("supports"),a=s?.applyFn,c=s?.compounds;t.variants.functional("supports",(u,f)=>{let g=f.value;return g&&g.kind==="named"&&g.value in e?a?.(u,{...f,value:{kind:"arbitrary",value:e[g.value]}}):a?.(u,f)},{compounds:c})}if(Object.keys(n).length>0){let s=t.variants.get("data"),a=s?.applyFn,c=s?.compounds;t.variants.functional("data",(u,f)=>{let g=f.value;return g&&g.kind==="named"&&g.value in n?a?.(u,{...f,value:{kind:"arbitrary",value:n[g.value]}}):a?.(u,f)},{compounds:c})}}var an=/^[a-z]+$/;async function Zr({designSystem:r,base:t,ast:i,loadModule:e,sources:n}){let s=0,a=[],c=[];F(i,(d,{parent:m,replaceWith:w,context:v})=>{if(d.kind==="at-rule"){if(d.name==="@plugin"){if(m!==null)throw new Error("`@plugin` cannot be nested.");let x=d.params.slice(1,-1);if(x.length===0)throw new Error("`@plugin` must have a path.");let k={};for(let N of d.nodes??[]){if(N.kind!=="declaration")throw new Error(`Unexpected \`@plugin\` option: + +${ne([N])} + +\`@plugin\` options must be a flat list of declarations.`);if(N.value===void 0)continue;let b=N.value,S=D(b,",").map(P=>{if(P=P.trim(),P==="null")return null;if(P==="true")return!0;if(P==="false")return!1;if(Number.isNaN(Number(P))){if(P[0]==='"'&&P[P.length-1]==='"'||P[0]==="'"&&P[P.length-1]==="'")return P.slice(1,-1);if(P[0]==="{"&&P[P.length-1]==="}")throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${ne([N]).trim()}\` is not supported. + +Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(P);return P});k[N.property]=S.length===1?S[0]:S}a.push([{id:x,base:v.base,reference:!!v.reference},Object.keys(k).length>0?k:null]),w([]),s|=4;return}if(d.name==="@config"){if(d.nodes.length>0)throw new Error("`@config` cannot have a body.");if(m!==null)throw new Error("`@config` cannot be nested.");c.push({id:d.params.slice(1,-1),base:v.base,reference:!!v.reference}),w([]),s|=4;return}}}),Gr(r);let u=r.resolveThemeValue;if(r.resolveThemeValue=function(m,w){return m.startsWith("--")?u(m,w):(s|=Yr({designSystem:r,base:t,ast:i,sources:n,configs:[],pluginDetails:[]}),r.resolveThemeValue(m,w))},!a.length&&!c.length)return 0;let[f,g]=await Promise.all([Promise.all(c.map(async({id:d,base:m,reference:w})=>{let v=await e(d,m,"config");return{path:d,base:v.base,config:v.module,reference:w}})),Promise.all(a.map(async([{id:d,base:m,reference:w},v])=>{let x=await e(d,m,"plugin");return{path:d,base:x.base,plugin:x.module,options:v,reference:w}}))]);return s|=Yr({designSystem:r,base:t,ast:i,sources:n,configs:f,pluginDetails:g}),s}function Yr({designSystem:r,base:t,ast:i,sources:e,configs:n,pluginDetails:s}){let a=0,u=[...s.map(k=>{if(!k.options)return{config:{plugins:[k.plugin]},base:k.base,reference:k.reference};if("__isOptionsFunction"in k.plugin)return{config:{plugins:[k.plugin(k.options)]},base:k.base,reference:k.reference};throw new Error(`The plugin "${k.path}" does not accept options`)}),...n],{resolvedConfig:f}=St(r,[{config:Wr(r.theme),base:t,reference:!0},...u,{config:{plugins:[qr]},base:t,reference:!0}]),{resolvedConfig:g,replacedThemeKeys:d}=St(r,u),m=r.resolveThemeValue;r.resolveThemeValue=function(N,b){if(N[0]==="-"&&N[1]==="-")return m(N,b);let S=v.theme(N,void 0);if(Array.isArray(S)&&S.length===2)return S[0];if(Array.isArray(S))return S.join(", ");if(typeof S=="string")return S};let w={designSystem:r,ast:i,resolvedConfig:f,featuresRef:{set current(k){a|=k}}},v=Vt({...w,referenceMode:!1}),x;for(let{handler:k,reference:N}of f.plugins)N?(x||=Vt({...w,referenceMode:!0}),k(x)):k(v);if($r(r,g,d),Mr(r,g,d),Hr(g,r),Jr(g,r),Br(g,r),!r.theme.prefix&&f.prefix){if(f.prefix.endsWith("-")&&(f.prefix=f.prefix.slice(0,-1),console.warn(`The prefix "${f.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)),!an.test(f.prefix))throw new Error(`The prefix "${f.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);r.theme.prefix=f.prefix}if(!r.important&&f.important===!0&&(r.important=!0),typeof f.important=="string"){let k=f.important;F(i,(N,{replaceWith:b,parent:S})=>{if(N.kind==="at-rule"&&!(N.name!=="@tailwind"||N.params!=="utilities"))return S?.kind==="rule"&&S.selector===k?2:(b(M(k,[N])),2)})}for(let k of f.blocklist)r.invalidCandidates.add(k);for(let k of f.content.files){if("raw"in k)throw new Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry: + +${JSON.stringify(k,null,2)} + +This feature is not currently supported.`);let N=!1;k.pattern[0]=="!"&&(N=!0,k.pattern=k.pattern.slice(1)),e.push({...k,negated:N})}return a}function Qr(r){let t=[0];for(let n=0;n0;){let u=(a|0)>>1,f=s+u;t[f]<=n?(s=f+1,a=a-u-1):a=u}s-=1;let c=n-t[s];return{line:s+1,column:c}}function e({line:n,column:s}){n-=1,n=Math.min(Math.max(n,0),t.length-1);let a=t[n],c=t[n+1]??a;return Math.min(Math.max(a+s,0),c)}return{find:i,findOffset:e}}function Xr({ast:r}){let t=new B(n=>Qr(n.code)),i=new B(n=>({url:n.file,content:n.code,ignore:!1})),e={file:null,sources:[],mappings:[]};F(r,n=>{if(!n.src||!n.dst)return;let s=i.get(n.src[0]);if(!s.content)return;let a=t.get(n.src[0]),c=t.get(n.dst[0]),u=s.content.slice(n.src[1],n.src[2]),f=0;for(let m of u.split(` +`)){if(m.trim()!==""){let w=a.find(n.src[1]+f),v=c.find(n.dst[1]);e.mappings.push({name:null,originalPosition:{source:s,...w},generatedPosition:v})}f+=m.length,f+=1}let g=a.find(n.src[2]),d=c.find(n.dst[2]);e.mappings.push({name:null,originalPosition:{source:s,...g},generatedPosition:d})});for(let n of t.keys())e.sources.push(i.get(n));return e.mappings.sort((n,s)=>n.generatedPosition.line-s.generatedPosition.line||n.generatedPosition.column-s.generatedPosition.column||(n.originalPosition?.line??0)-(s.originalPosition?.line??0)||(n.originalPosition?.column??0)-(s.originalPosition?.column??0)),e}var ei=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function nt(r){let t=r.indexOf("{");if(t===-1)return[r];let i=[],e=r.slice(0,t),n=r.slice(t),s=0,a=n.lastIndexOf("}");for(let d=0;dnt(d));let g=nt(u);for(let d of g)for(let m of f)i.push(e+m+d);return i}function sn(r){return ei.test(r)}function un(r){let t=r.match(ei);if(!t)return[r];let[,i,e,n]=t,s=n?parseInt(n,10):void 0,a=[];if(/^-?\d+$/.test(i)&&/^-?\d+$/.test(e)){let c=parseInt(i,10),u=parseInt(e,10);if(s===void 0&&(s=c<=u?1:-1),s===0)throw new Error("Step cannot be zero in sequence expansion.");let f=c0&&(s=-s);for(let g=c;f?g<=u:g>=u;g+=s)a.push(g.toString())}return a}var fn=/^[a-z]+$/,dt=(n=>(n[n.None=0]="None",n[n.AtProperty=1]="AtProperty",n[n.ColorMix=2]="ColorMix",n[n.All=3]="All",n))(dt||{});function cn(){throw new Error("No `loadModule` function provided to `compile`")}function pn(){throw new Error("No `loadStylesheet` function provided to `compile`")}function dn(r){let t=0,i=null;for(let e of D(r," "))e==="reference"?t|=2:e==="inline"?t|=1:e==="default"?t|=4:e==="static"?t|=8:e.startsWith("prefix(")&&e.endsWith(")")&&(i=e.slice(7,-1));return[t,i]}var Pe=(c=>(c[c.None=0]="None",c[c.AtApply=1]="AtApply",c[c.AtImport=2]="AtImport",c[c.JsPluginCompat=4]="JsPluginCompat",c[c.ThemeFunction=8]="ThemeFunction",c[c.Utilities=16]="Utilities",c[c.Variants=32]="Variants",c))(Pe||{});async function ti(r,{base:t="",from:i,loadModule:e=cn,loadStylesheet:n=pn}={}){let s=0;r=[le({base:t},r)],s|=await $t(r,t,n,0,i!==void 0);let a=null,c=new Be,u=[],f=[],g=null,d=null,m=[],w=[],v=[],x=[],k=null;F(r,(b,{parent:S,replaceWith:P,context:U})=>{if(b.kind==="at-rule"){if(b.name==="@tailwind"&&(b.params==="utilities"||b.params.startsWith("utilities"))){if(d!==null){P([]);return}if(U.reference){P([]);return}let R=D(b.params," ");for(let _ of R)if(_.startsWith("source(")){let K=_.slice(7,-1);if(K==="none"){k=K;continue}if(K[0]==='"'&&K[K.length-1]!=='"'||K[0]==="'"&&K[K.length-1]!=="'"||K[0]!=="'"&&K[0]!=='"')throw new Error("`source(\u2026)` paths must be quoted.");k={base:U.sourceBase??U.base,pattern:K.slice(1,-1)}}d=b,s|=16}if(b.name==="@utility"){if(S!==null)throw new Error("`@utility` cannot be nested.");if(b.nodes.length===0)throw new Error(`\`@utility ${b.params}\` is empty. Utilities should include at least one property.`);let R=pr(b);if(R===null)throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`);f.push(R)}if(b.name==="@source"){if(b.nodes.length>0)throw new Error("`@source` cannot have a body.");if(S!==null)throw new Error("`@source` cannot be nested.");let R=!1,_=!1,K=b.params;if(K[0]==="n"&&K.startsWith("not ")&&(R=!0,K=K.slice(4)),K[0]==="i"&&K.startsWith("inline(")&&(_=!0,K=K.slice(7,-1)),K[0]==='"'&&K[K.length-1]!=='"'||K[0]==="'"&&K[K.length-1]!=="'"||K[0]!=="'"&&K[0]!=='"')throw new Error("`@source` paths must be quoted.");let G=K.slice(1,-1);if(_){let I=R?x:v,W=D(G," ");for(let Z of W)for(let re of nt(Z))I.push(re)}else w.push({base:U.base,pattern:G,negated:R});P([]);return}if(b.name==="@variant"&&(S===null?b.nodes.length===0?b.name="@custom-variant":(F(b.nodes,R=>{if(R.kind==="at-rule"&&R.name==="@slot")return b.name="@custom-variant",2}),b.name==="@variant"&&m.push(b)):m.push(b)),b.name==="@custom-variant"){if(S!==null)throw new Error("`@custom-variant` cannot be nested.");P([]);let[R,_]=D(b.params," ");if(!Xe.test(R))throw new Error(`\`@custom-variant ${R}\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);if(b.nodes.length>0&&_)throw new Error(`\`@custom-variant ${R}\` cannot have both a selector and a body.`);if(b.nodes.length===0){if(!_)throw new Error(`\`@custom-variant ${R}\` has no selector or body.`);let K=D(_.slice(1,-1),",");if(K.length===0||K.some(W=>W.trim()===""))throw new Error(`\`@custom-variant ${R} (${K.join(",")})\` selector is invalid.`);let G=[],I=[];for(let W of K)W=W.trim(),W[0]==="@"?G.push(W):I.push(W);u.push(W=>{W.variants.static(R,Z=>{let re=[];I.length>0&&re.push(M(I.join(", "),Z.nodes));for(let o of G)re.push(H(o,Z.nodes));Z.nodes=re},{compounds:ye([...I,...G])})});return}else{u.push(K=>{K.variants.fromAst(R,b.nodes)});return}}if(b.name==="@media"){let R=D(b.params," "),_=[];for(let K of R)if(K.startsWith("source(")){let G=K.slice(7,-1);F(b.nodes,(I,{replaceWith:W})=>{if(I.kind==="at-rule"&&I.name==="@tailwind"&&I.params==="utilities")return I.params+=` source(${G})`,W([le({sourceBase:U.base},[I])]),2})}else if(K.startsWith("theme(")){let G=K.slice(6,-1),I=G.includes("reference");F(b.nodes,W=>{if(W.kind!=="at-rule"){if(I)throw new Error('Files imported with `@import "\u2026" theme(reference)` must only contain `@theme` blocks.\nUse `@reference "\u2026";` instead.');return 0}if(W.name==="@theme")return W.params+=" "+G,1})}else if(K.startsWith("prefix(")){let G=K.slice(7,-1);F(b.nodes,I=>{if(I.kind==="at-rule"&&I.name==="@theme")return I.params+=` prefix(${G})`,1})}else K==="important"?a=!0:K==="reference"?b.nodes=[le({reference:!0},b.nodes)]:_.push(K);_.length>0?b.params=_.join(" "):R.length>0&&P(b.nodes)}if(b.name==="@theme"){let[R,_]=dn(b.params);if(U.reference&&(R|=2),_){if(!fn.test(_))throw new Error(`The prefix "${_}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);c.prefix=_}return F(b.nodes,K=>{if(K.kind==="at-rule"&&K.name==="@keyframes")return c.addKeyframes(K),1;if(K.kind==="comment")return;if(K.kind==="declaration"&&K.property.startsWith("--")){c.add(ge(K.property),K.value??"",R,K.src);return}let G=ne([z(b.name,b.params,[K])]).split(` +`).map((I,W,Z)=>`${W===0||W>=Z.length-2?" ":">"} ${I}`).join(` +`);throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`. + +${G}`)}),g?P([]):(g=M(":root, :host",[]),g.src=b.src,P([g])),1}}});let N=br(c);if(a&&(N.important=a),x.length>0)for(let b of x)N.invalidCandidates.add(b);s|=await Zr({designSystem:N,base:t,ast:r,loadModule:e,sources:w});for(let b of u)b(N);for(let b of f)b(N);if(g){let b=[];for(let[P,U]of N.theme.entries()){if(U.options&2)continue;let R=l(fe(P),U.value);R.src=U.src,b.push(R)}let S=N.theme.getKeyframes();for(let P of S)r.push(le({theme:!0},[L([P])]));g.nodes=[le({theme:!0},b)]}if(m.length>0){for(let b of m){let S=M("&",b.nodes),P=b.params,U=N.parseVariant(P);if(U===null)throw new Error(`Cannot use \`@variant\` with unknown variant: ${P}`);if(Ae(S,U,N.variants)===null)throw new Error(`Cannot use \`@variant\` with variant: ${P}`);Object.assign(b,S)}s|=32}if(s|=xe(r,N),s|=Oe(r,N),d){let b=d;b.kind="context",b.context={}}return F(r,(b,{replaceWith:S})=>{if(b.kind==="at-rule")return b.name==="@utility"&&S([]),1}),{designSystem:N,ast:r,sources:w,root:k,utilitiesNode:d,features:s,inlineCandidates:v}}async function mn(r,t={}){let{designSystem:i,ast:e,sources:n,root:s,utilitiesNode:a,features:c,inlineCandidates:u}=await ti(r,t);e.unshift(We(`! tailwindcss v${Rt} | MIT License | https://tailwindcss.com `));function f(v){i.invalidCandidates.add(v)}let g=new Set,d=null,m=0,w=!1;for(let v of u)i.invalidCandidates.has(v)||(g.add(v),w=!0);return{sources:n,root:s,features:c,build(v){if(c===0)return r;if(!a)return d??=ve(e,i,t.polyfills),d;let x=w,k=!1;w=!1;let N=g.size;for(let S of v)if(!i.invalidCandidates.has(S))if(S[0]==="-"&&S[1]==="-"){let P=i.theme.markUsedVariable(S);x||=P,k||=P}else g.add(S),x||=g.size!==N;if(!x)return d??=ve(e,i,t.polyfills),d;let b=pe(g,i,{onInvalidCandidate:f}).astNodes;return t.from&&F(b,S=>{S.src??=a.src}),!k&&m===b.length?(d??=ve(e,i,t.polyfills),d):(m=b.length,a.nodes=b,d=ve(e,i,t.polyfills),d)}}}async function Ca(r,t={}){let i=me(r,{from:t.from}),e=await mn(i,t),n=i,s=r;return{...e,build(a){let c=e.build(a);return c===n||(s=ne(c,!!t.from),n=c),s},buildSourceMap(){return Xr({ast:n})}}}async function $a(r,t={}){return(await ti(me(r),t)).designSystem}function gn(){throw new Error("It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install `@tailwindcss/postcss` and update your PostCSS configuration.")}export{dt as a,Pe as b,mn as c,Ca as d,$a as e,gn as f}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/chunk-G32FJCSR.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/chunk-G32FJCSR.mjs new file mode 100644 index 0000000000000000000000000000000000000000..86a6941776b8da27765976361615eb80a5e11c9b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/chunk-G32FJCSR.mjs @@ -0,0 +1 @@ +import{a as k}from"./chunk-HTB5LLOP.mjs";var _=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","transparent","currentcolor","canvas","canvastext","linktext","visitedtext","activetext","buttonface","buttontext","buttonborder","field","fieldtext","highlight","highlighttext","selecteditem","selecteditemtext","mark","marktext","graytext","accentcolor","accentcolortext"]),U=/^(rgba?|hsla?|hwb|color|(ok)?(lab|lch)|light-dark|color-mix)\(/i;function S(e){return e.charCodeAt(0)===35||U.test(e)||_.has(e.toLowerCase())}var A=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"];function b(e){return e.indexOf("(")!==-1&&A.some(t=>e.includes(`${t}(`))}function oe(e){if(!A.some(n=>e.includes(n)))return e;let t="",r=[],s=null,m=null;for(let n=0;n=48&&a<=57||s!==null&&(a===37||a>=97&&a<=122||a>=65&&a<=90)?s=n:(m=s,s=null),a===40){t+=e[n];let i=n;for(let p=n-1;p>=0;p--){let c=e.charCodeAt(p);if(c>=48&&c<=57)i=p;else if(c>=97&&c<=122)i=p;else break}let o=e.slice(i,n);if(A.includes(o)){r.unshift(!0);continue}else if(r[0]&&o===""){r.unshift(!0);continue}r.unshift(!1);continue}else if(a===41)t+=e[n],r.shift();else if(a===44&&r[0]){t+=", ";continue}else{if(a===32&&r[0]&&t.charCodeAt(t.length-1)===32)continue;if((a===43||a===42||a===47||a===45)&&r[0]){let i=t.trimEnd(),o=i.charCodeAt(i.length-1),p=i.charCodeAt(i.length-2),c=e.charCodeAt(n+1);if((o===101||o===69)&&p>=48&&p<=57){t+=e[n];continue}else if(o===43||o===42||o===47||o===45){t+=e[n];continue}else if(o===40||o===44){t+=e[n];continue}else e.charCodeAt(n-1)===32?t+=`${e[n]} `:o>=48&&o<=57||c>=48&&c<=57||o===41||c===40||c===43||c===42||c===47||c===45||m!==null&&m===n-1?t+=` ${e[n]} `:t+=e[n]}else t+=e[n]}}return t}var E=new Uint8Array(256);function d(e,t){let r=0,s=[],m=0,n=e.length,a=t.charCodeAt(0);for(let i=0;i0&&o===E[r-1]&&r--;break}}return s.push(e.slice(m)),s}var P={color:S,length:y,percentage:C,ratio:G,number:v,integer:u,url:R,position:K,"bg-size":Y,"line-width":T,image:F,"family-name":M,"generic-name":H,"absolute-size":$,"relative-size":W,angle:X,vector:te};function me(e,t){if(e.startsWith("var("))return null;for(let r of t)if(P[r]?.(e))return r;return null}var z=/^url\(.*\)$/;function R(e){return z.test(e)}function T(e){return d(e," ").every(t=>y(t)||v(t)||t==="thin"||t==="medium"||t==="thick")}var D=/^(?:element|image|cross-fade|image-set)\(/,I=/^(repeating-)?(conic|linear|radial)-gradient\(/;function F(e){let t=0;for(let r of d(e,","))if(!r.startsWith("var(")){if(R(r)){t+=1;continue}if(I.test(r)){t+=1;continue}if(D.test(r)){t+=1;continue}return!1}return t>0}function H(e){return e==="serif"||e==="sans-serif"||e==="monospace"||e==="cursive"||e==="fantasy"||e==="system-ui"||e==="ui-serif"||e==="ui-sans-serif"||e==="ui-monospace"||e==="ui-rounded"||e==="math"||e==="emoji"||e==="fangsong"}function M(e){let t=0;for(let r of d(e,",")){let s=r.charCodeAt(0);if(s>=48&&s<=57)return!1;r.startsWith("var(")||(t+=1)}return t>0}function $(e){return e==="xx-small"||e==="x-small"||e==="small"||e==="medium"||e==="large"||e==="x-large"||e==="xx-large"||e==="xxx-large"}function W(e){return e==="larger"||e==="smaller"}var x=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,B=new RegExp(`^${x.source}$`);function v(e){return B.test(e)||b(e)}var q=new RegExp(`^${x.source}%$`);function C(e){return q.test(e)||b(e)}var V=new RegExp(`^${x.source}s*/s*${x.source}$`);function G(e){return V.test(e)||b(e)}var Z=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],j=new RegExp(`^${x.source}(${Z.join("|")})$`);function y(e){return j.test(e)||b(e)}function K(e){let t=0;for(let r of d(e," ")){if(r==="center"||r==="top"||r==="right"||r==="bottom"||r==="left"){t+=1;continue}if(!r.startsWith("var(")){if(y(r)||C(r)){t+=1;continue}return!1}}return t>0}function Y(e){let t=0;for(let r of d(e,",")){if(r==="cover"||r==="contain"){t+=1;continue}let s=d(r," ");if(s.length!==1&&s.length!==2)return!1;if(s.every(m=>m==="auto"||y(m)||C(m))){t+=1;continue}}return t>0}var Q=["deg","rad","grad","turn"],J=new RegExp(`^${x.source}(${Q.join("|")})$`);function X(e){return J.test(e)}var ee=new RegExp(`^${x.source} +${x.source} +${x.source}$`);function te(e){return ee.test(e)}function u(e){let t=Number(e);return Number.isInteger(t)&&t>=0&&String(t)===String(e)}function pe(e){let t=Number(e);return Number.isInteger(t)&&t>0&&String(t)===String(e)}function ge(e){return N(e,.25)}function ue(e){return N(e,.25)}function N(e,t){let r=Number(e);return r>=0&&r%t===0&&String(r)===String(e)}function h(e){return{__BARE_VALUE__:e}}var g=h(e=>{if(u(e.value))return e.value}),l=h(e=>{if(u(e.value))return`${e.value}%`}),f=h(e=>{if(u(e.value))return`${e.value}px`}),O=h(e=>{if(u(e.value))return`${e.value}ms`}),w=h(e=>{if(u(e.value))return`${e.value}deg`}),re=h(e=>{if(e.fraction===null)return;let[t,r]=d(e.fraction,"/");if(!(!u(t)||!u(r)))return e.fraction}),L=h(e=>{if(u(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),be={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...re},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...l}),backdropContrast:({theme:e})=>({...e("contrast"),...l}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...l}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...w}),backdropInvert:({theme:e})=>({...e("invert"),...l}),backdropOpacity:({theme:e})=>({...e("opacity"),...l}),backdropSaturate:({theme:e})=>({...e("saturate"),...l}),backdropSepia:({theme:e})=>({...e("sepia"),...l}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...f},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...l},caretColor:({theme:e})=>e("colors"),colors:()=>({...k}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...g},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...l},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...f}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...g},flexShrink:{0:"0",DEFAULT:"1",...g},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...l},grayscale:{0:"0",DEFAULT:"100%",...l},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...L},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...L},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...w},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...l},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...g},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...l},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...g},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...w},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...l},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...l},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...l},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...w},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...g},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...O},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...O},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...g}};export{oe as a,d as b,me as c,u as d,pe as e,ge as f,ue as g,be as h}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/chunk-HTB5LLOP.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/chunk-HTB5LLOP.mjs new file mode 100644 index 0000000000000000000000000000000000000000..8a95483a290362f50a01eec98ac3ab7aa77b5f1b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/chunk-HTB5LLOP.mjs @@ -0,0 +1 @@ +var l={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};export{l as a}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors-b_6i0Oi7.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors-b_6i0Oi7.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8f187dc6ae350a405031960170ca84d4ae9bc982 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors-b_6i0Oi7.d.ts @@ -0,0 +1,295 @@ +declare const _default: { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; +}; + +export { _default as _ }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.d.mts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..5ea47011a52263416f81387cdddea6f829234b55 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.d.mts @@ -0,0 +1,295 @@ +declare const _default: { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; +}; + +export { _default as default }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e9d15d3de324a3fe932fc98067270ebe8fa27b21 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.d.ts @@ -0,0 +1,5 @@ +import { _ as _default } from './colors-b_6i0Oi7.js'; + + + +export { _default as default }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.js new file mode 100644 index 0000000000000000000000000000000000000000..409c0d5185a807d593a91f58521a55d10491d086 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.js @@ -0,0 +1 @@ +"use strict";var l={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};module.exports=l; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.mjs new file mode 100644 index 0000000000000000000000000000000000000000..9d20fbc2ba033db5c180b5eaaef1f95190be63af --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/colors.mjs @@ -0,0 +1 @@ +import{a}from"./chunk-HTB5LLOP.mjs";export{a as default}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.d.mts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1b80d8aefd36f985bb401ff78163dd6136010b49 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.d.mts @@ -0,0 +1,1147 @@ +import { P as PluginUtils, N as NamedUtilityValue } from './resolve-config-QUZ9b-Gn.mjs'; +import './colors.mjs'; + +declare const _default: { + accentColor: ({ theme }: PluginUtils) => any; + animation: { + none: string; + spin: string; + ping: string; + pulse: string; + bounce: string; + }; + aria: { + busy: string; + checked: string; + disabled: string; + expanded: string; + hidden: string; + pressed: string; + readonly: string; + required: string; + selected: string; + }; + aspectRatio: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + square: string; + video: string; + }; + backdropBlur: ({ theme }: PluginUtils) => any; + backdropBrightness: ({ theme }: PluginUtils) => any; + backdropContrast: ({ theme }: PluginUtils) => any; + backdropGrayscale: ({ theme }: PluginUtils) => any; + backdropHueRotate: ({ theme }: PluginUtils) => any; + backdropInvert: ({ theme }: PluginUtils) => any; + backdropOpacity: ({ theme }: PluginUtils) => any; + backdropSaturate: ({ theme }: PluginUtils) => any; + backdropSepia: ({ theme }: PluginUtils) => any; + backgroundColor: ({ theme }: PluginUtils) => any; + backgroundImage: { + none: string; + 'gradient-to-t': string; + 'gradient-to-tr': string; + 'gradient-to-r': string; + 'gradient-to-br': string; + 'gradient-to-b': string; + 'gradient-to-bl': string; + 'gradient-to-l': string; + 'gradient-to-tl': string; + }; + backgroundOpacity: ({ theme }: PluginUtils) => any; + backgroundPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + backgroundSize: { + auto: string; + cover: string; + contain: string; + }; + blur: { + 0: string; + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + }; + borderColor: ({ theme }: PluginUtils) => any; + borderOpacity: ({ theme }: PluginUtils) => any; + borderRadius: { + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + full: string; + }; + borderSpacing: ({ theme }: PluginUtils) => any; + borderWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 2: string; + 4: string; + 8: string; + }; + boxShadow: { + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + inner: string; + none: string; + }; + boxShadowColor: ({ theme }: PluginUtils) => any; + brightness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + 200: string; + }; + caretColor: ({ theme }: PluginUtils) => any; + colors: () => { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + }; + columns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + '3xs': string; + '2xs': string; + xs: string; + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + '4xl': string; + '5xl': string; + '6xl': string; + '7xl': string; + }; + container: {}; + content: { + none: string; + }; + contrast: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 100: string; + 125: string; + 150: string; + 200: string; + }; + cursor: { + auto: string; + default: string; + pointer: string; + wait: string; + text: string; + move: string; + help: string; + 'not-allowed': string; + none: string; + 'context-menu': string; + progress: string; + cell: string; + crosshair: string; + 'vertical-text': string; + alias: string; + copy: string; + 'no-drop': string; + grab: string; + grabbing: string; + 'all-scroll': string; + 'col-resize': string; + 'row-resize': string; + 'n-resize': string; + 'e-resize': string; + 's-resize': string; + 'w-resize': string; + 'ne-resize': string; + 'nw-resize': string; + 'se-resize': string; + 'sw-resize': string; + 'ew-resize': string; + 'ns-resize': string; + 'nesw-resize': string; + 'nwse-resize': string; + 'zoom-in': string; + 'zoom-out': string; + }; + divideColor: ({ theme }: PluginUtils) => any; + divideOpacity: ({ theme }: PluginUtils) => any; + divideWidth: ({ theme }: PluginUtils) => any; + dropShadow: { + sm: string; + DEFAULT: string[]; + md: string[]; + lg: string[]; + xl: string[]; + '2xl': string; + none: string; + }; + fill: ({ theme }: PluginUtils) => any; + flex: { + 1: string; + auto: string; + initial: string; + none: string; + }; + flexBasis: ({ theme }: PluginUtils) => any; + flexGrow: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + flexShrink: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + fontFamily: { + sans: string[]; + serif: string[]; + mono: string[]; + }; + fontSize: { + xs: (string | { + lineHeight: string; + })[]; + sm: (string | { + lineHeight: string; + })[]; + base: (string | { + lineHeight: string; + })[]; + lg: (string | { + lineHeight: string; + })[]; + xl: (string | { + lineHeight: string; + })[]; + '2xl': (string | { + lineHeight: string; + })[]; + '3xl': (string | { + lineHeight: string; + })[]; + '4xl': (string | { + lineHeight: string; + })[]; + '5xl': (string | { + lineHeight: string; + })[]; + '6xl': (string | { + lineHeight: string; + })[]; + '7xl': (string | { + lineHeight: string; + })[]; + '8xl': (string | { + lineHeight: string; + })[]; + '9xl': (string | { + lineHeight: string; + })[]; + }; + fontWeight: { + thin: string; + extralight: string; + light: string; + normal: string; + medium: string; + semibold: string; + bold: string; + extrabold: string; + black: string; + }; + gap: ({ theme }: PluginUtils) => any; + gradientColorStops: ({ theme }: PluginUtils) => any; + gradientColorStopPositions: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + '0%': string; + '5%': string; + '10%': string; + '15%': string; + '20%': string; + '25%': string; + '30%': string; + '35%': string; + '40%': string; + '45%': string; + '50%': string; + '55%': string; + '60%': string; + '65%': string; + '70%': string; + '75%': string; + '80%': string; + '85%': string; + '90%': string; + '95%': string; + '100%': string; + }; + grayscale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + gridAutoColumns: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridAutoRows: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridColumn: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridColumnEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridColumnStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRow: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridRowEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRowStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridTemplateColumns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + gridTemplateRows: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + height: ({ theme }: PluginUtils) => any; + hueRotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 15: string; + 30: string; + 60: string; + 90: string; + 180: string; + }; + inset: ({ theme }: PluginUtils) => any; + invert: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + keyframes: { + spin: { + to: { + transform: string; + }; + }; + ping: { + '75%, 100%': { + transform: string; + opacity: string; + }; + }; + pulse: { + '50%': { + opacity: string; + }; + }; + bounce: { + '0%, 100%': { + transform: string; + animationTimingFunction: string; + }; + '50%': { + transform: string; + animationTimingFunction: string; + }; + }; + }; + letterSpacing: { + tighter: string; + tight: string; + normal: string; + wide: string; + wider: string; + widest: string; + }; + lineHeight: { + none: string; + tight: string; + snug: string; + normal: string; + relaxed: string; + loose: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + }; + listStyleType: { + none: string; + disc: string; + decimal: string; + }; + listStyleImage: { + none: string; + }; + margin: ({ theme }: PluginUtils) => any; + lineClamp: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + }; + maxHeight: ({ theme }: PluginUtils) => any; + maxWidth: ({ theme }: PluginUtils) => any; + minHeight: ({ theme }: PluginUtils) => any; + minWidth: ({ theme }: PluginUtils) => any; + objectPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + opacity: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 5: string; + 10: string; + 15: string; + 20: string; + 25: string; + 30: string; + 35: string; + 40: string; + 45: string; + 50: string; + 55: string; + 60: string; + 65: string; + 70: string; + 75: string; + 80: string; + 85: string; + 90: string; + 95: string; + 100: string; + }; + order: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + first: string; + last: string; + none: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + outlineColor: ({ theme }: PluginUtils) => any; + outlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + outlineWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + padding: ({ theme }: PluginUtils) => any; + placeholderColor: ({ theme }: PluginUtils) => any; + placeholderOpacity: ({ theme }: PluginUtils) => any; + ringColor: ({ theme }: PluginUtils) => any; + ringOffsetColor: ({ theme }: PluginUtils) => any; + ringOffsetWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + ringOpacity: ({ theme }: PluginUtils) => any; + ringWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + rotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + 45: string; + 90: string; + 180: string; + }; + saturate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 100: string; + 150: string; + 200: string; + }; + scale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + }; + screens: { + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + }; + scrollMargin: ({ theme }: PluginUtils) => any; + scrollPadding: ({ theme }: PluginUtils) => any; + sepia: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + skew: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + }; + space: ({ theme }: PluginUtils) => any; + spacing: { + px: string; + 0: string; + 0.5: string; + 1: string; + 1.5: string; + 2: string; + 2.5: string; + 3: string; + 3.5: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 14: string; + 16: string; + 20: string; + 24: string; + 28: string; + 32: string; + 36: string; + 40: string; + 44: string; + 48: string; + 52: string; + 56: string; + 60: string; + 64: string; + 72: string; + 80: string; + 96: string; + }; + stroke: ({ theme }: PluginUtils) => any; + strokeWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + }; + supports: {}; + data: {}; + textColor: ({ theme }: PluginUtils) => any; + textDecorationColor: ({ theme }: PluginUtils) => any; + textDecorationThickness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 'from-font': string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + textIndent: ({ theme }: PluginUtils) => any; + textOpacity: ({ theme }: PluginUtils) => any; + textUnderlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + transformOrigin: { + center: string; + top: string; + 'top-right': string; + right: string; + 'bottom-right': string; + bottom: string; + 'bottom-left': string; + left: string; + 'top-left': string; + }; + transitionDelay: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionDuration: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionProperty: { + none: string; + all: string; + DEFAULT: string; + colors: string; + opacity: string; + shadow: string; + transform: string; + }; + transitionTimingFunction: { + DEFAULT: string; + linear: string; + in: string; + out: string; + 'in-out': string; + }; + translate: ({ theme }: PluginUtils) => any; + size: ({ theme }: PluginUtils) => any; + width: ({ theme }: PluginUtils) => any; + willChange: { + auto: string; + scroll: string; + contents: string; + transform: string; + }; + zIndex: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 10: string; + 20: string; + 30: string; + 40: string; + 50: string; + }; +}; + +export { _default as default }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6d36e26e34069bb65bf83118153bdbcc6839d74f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.d.ts @@ -0,0 +1,1147 @@ +import { P as PluginUtils, N as NamedUtilityValue } from './resolve-config-BIFUA2FY.js'; +import './colors-b_6i0Oi7.js'; + +declare const _default: { + accentColor: ({ theme }: PluginUtils) => any; + animation: { + none: string; + spin: string; + ping: string; + pulse: string; + bounce: string; + }; + aria: { + busy: string; + checked: string; + disabled: string; + expanded: string; + hidden: string; + pressed: string; + readonly: string; + required: string; + selected: string; + }; + aspectRatio: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + square: string; + video: string; + }; + backdropBlur: ({ theme }: PluginUtils) => any; + backdropBrightness: ({ theme }: PluginUtils) => any; + backdropContrast: ({ theme }: PluginUtils) => any; + backdropGrayscale: ({ theme }: PluginUtils) => any; + backdropHueRotate: ({ theme }: PluginUtils) => any; + backdropInvert: ({ theme }: PluginUtils) => any; + backdropOpacity: ({ theme }: PluginUtils) => any; + backdropSaturate: ({ theme }: PluginUtils) => any; + backdropSepia: ({ theme }: PluginUtils) => any; + backgroundColor: ({ theme }: PluginUtils) => any; + backgroundImage: { + none: string; + 'gradient-to-t': string; + 'gradient-to-tr': string; + 'gradient-to-r': string; + 'gradient-to-br': string; + 'gradient-to-b': string; + 'gradient-to-bl': string; + 'gradient-to-l': string; + 'gradient-to-tl': string; + }; + backgroundOpacity: ({ theme }: PluginUtils) => any; + backgroundPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + backgroundSize: { + auto: string; + cover: string; + contain: string; + }; + blur: { + 0: string; + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + }; + borderColor: ({ theme }: PluginUtils) => any; + borderOpacity: ({ theme }: PluginUtils) => any; + borderRadius: { + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + full: string; + }; + borderSpacing: ({ theme }: PluginUtils) => any; + borderWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 2: string; + 4: string; + 8: string; + }; + boxShadow: { + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + inner: string; + none: string; + }; + boxShadowColor: ({ theme }: PluginUtils) => any; + brightness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + 200: string; + }; + caretColor: ({ theme }: PluginUtils) => any; + colors: () => { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + }; + columns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + '3xs': string; + '2xs': string; + xs: string; + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + '4xl': string; + '5xl': string; + '6xl': string; + '7xl': string; + }; + container: {}; + content: { + none: string; + }; + contrast: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 100: string; + 125: string; + 150: string; + 200: string; + }; + cursor: { + auto: string; + default: string; + pointer: string; + wait: string; + text: string; + move: string; + help: string; + 'not-allowed': string; + none: string; + 'context-menu': string; + progress: string; + cell: string; + crosshair: string; + 'vertical-text': string; + alias: string; + copy: string; + 'no-drop': string; + grab: string; + grabbing: string; + 'all-scroll': string; + 'col-resize': string; + 'row-resize': string; + 'n-resize': string; + 'e-resize': string; + 's-resize': string; + 'w-resize': string; + 'ne-resize': string; + 'nw-resize': string; + 'se-resize': string; + 'sw-resize': string; + 'ew-resize': string; + 'ns-resize': string; + 'nesw-resize': string; + 'nwse-resize': string; + 'zoom-in': string; + 'zoom-out': string; + }; + divideColor: ({ theme }: PluginUtils) => any; + divideOpacity: ({ theme }: PluginUtils) => any; + divideWidth: ({ theme }: PluginUtils) => any; + dropShadow: { + sm: string; + DEFAULT: string[]; + md: string[]; + lg: string[]; + xl: string[]; + '2xl': string; + none: string; + }; + fill: ({ theme }: PluginUtils) => any; + flex: { + 1: string; + auto: string; + initial: string; + none: string; + }; + flexBasis: ({ theme }: PluginUtils) => any; + flexGrow: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + flexShrink: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + fontFamily: { + sans: string[]; + serif: string[]; + mono: string[]; + }; + fontSize: { + xs: (string | { + lineHeight: string; + })[]; + sm: (string | { + lineHeight: string; + })[]; + base: (string | { + lineHeight: string; + })[]; + lg: (string | { + lineHeight: string; + })[]; + xl: (string | { + lineHeight: string; + })[]; + '2xl': (string | { + lineHeight: string; + })[]; + '3xl': (string | { + lineHeight: string; + })[]; + '4xl': (string | { + lineHeight: string; + })[]; + '5xl': (string | { + lineHeight: string; + })[]; + '6xl': (string | { + lineHeight: string; + })[]; + '7xl': (string | { + lineHeight: string; + })[]; + '8xl': (string | { + lineHeight: string; + })[]; + '9xl': (string | { + lineHeight: string; + })[]; + }; + fontWeight: { + thin: string; + extralight: string; + light: string; + normal: string; + medium: string; + semibold: string; + bold: string; + extrabold: string; + black: string; + }; + gap: ({ theme }: PluginUtils) => any; + gradientColorStops: ({ theme }: PluginUtils) => any; + gradientColorStopPositions: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + '0%': string; + '5%': string; + '10%': string; + '15%': string; + '20%': string; + '25%': string; + '30%': string; + '35%': string; + '40%': string; + '45%': string; + '50%': string; + '55%': string; + '60%': string; + '65%': string; + '70%': string; + '75%': string; + '80%': string; + '85%': string; + '90%': string; + '95%': string; + '100%': string; + }; + grayscale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + gridAutoColumns: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridAutoRows: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridColumn: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridColumnEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridColumnStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRow: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridRowEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRowStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridTemplateColumns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + gridTemplateRows: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + height: ({ theme }: PluginUtils) => any; + hueRotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 15: string; + 30: string; + 60: string; + 90: string; + 180: string; + }; + inset: ({ theme }: PluginUtils) => any; + invert: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + keyframes: { + spin: { + to: { + transform: string; + }; + }; + ping: { + '75%, 100%': { + transform: string; + opacity: string; + }; + }; + pulse: { + '50%': { + opacity: string; + }; + }; + bounce: { + '0%, 100%': { + transform: string; + animationTimingFunction: string; + }; + '50%': { + transform: string; + animationTimingFunction: string; + }; + }; + }; + letterSpacing: { + tighter: string; + tight: string; + normal: string; + wide: string; + wider: string; + widest: string; + }; + lineHeight: { + none: string; + tight: string; + snug: string; + normal: string; + relaxed: string; + loose: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + }; + listStyleType: { + none: string; + disc: string; + decimal: string; + }; + listStyleImage: { + none: string; + }; + margin: ({ theme }: PluginUtils) => any; + lineClamp: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + }; + maxHeight: ({ theme }: PluginUtils) => any; + maxWidth: ({ theme }: PluginUtils) => any; + minHeight: ({ theme }: PluginUtils) => any; + minWidth: ({ theme }: PluginUtils) => any; + objectPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + opacity: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 5: string; + 10: string; + 15: string; + 20: string; + 25: string; + 30: string; + 35: string; + 40: string; + 45: string; + 50: string; + 55: string; + 60: string; + 65: string; + 70: string; + 75: string; + 80: string; + 85: string; + 90: string; + 95: string; + 100: string; + }; + order: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + first: string; + last: string; + none: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + outlineColor: ({ theme }: PluginUtils) => any; + outlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + outlineWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + padding: ({ theme }: PluginUtils) => any; + placeholderColor: ({ theme }: PluginUtils) => any; + placeholderOpacity: ({ theme }: PluginUtils) => any; + ringColor: ({ theme }: PluginUtils) => any; + ringOffsetColor: ({ theme }: PluginUtils) => any; + ringOffsetWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + ringOpacity: ({ theme }: PluginUtils) => any; + ringWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + rotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + 45: string; + 90: string; + 180: string; + }; + saturate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 100: string; + 150: string; + 200: string; + }; + scale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + }; + screens: { + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + }; + scrollMargin: ({ theme }: PluginUtils) => any; + scrollPadding: ({ theme }: PluginUtils) => any; + sepia: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + skew: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + }; + space: ({ theme }: PluginUtils) => any; + spacing: { + px: string; + 0: string; + 0.5: string; + 1: string; + 1.5: string; + 2: string; + 2.5: string; + 3: string; + 3.5: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 14: string; + 16: string; + 20: string; + 24: string; + 28: string; + 32: string; + 36: string; + 40: string; + 44: string; + 48: string; + 52: string; + 56: string; + 60: string; + 64: string; + 72: string; + 80: string; + 96: string; + }; + stroke: ({ theme }: PluginUtils) => any; + strokeWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + }; + supports: {}; + data: {}; + textColor: ({ theme }: PluginUtils) => any; + textDecorationColor: ({ theme }: PluginUtils) => any; + textDecorationThickness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 'from-font': string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + textIndent: ({ theme }: PluginUtils) => any; + textOpacity: ({ theme }: PluginUtils) => any; + textUnderlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + transformOrigin: { + center: string; + top: string; + 'top-right': string; + right: string; + 'bottom-right': string; + bottom: string; + 'bottom-left': string; + left: string; + 'top-left': string; + }; + transitionDelay: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionDuration: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionProperty: { + none: string; + all: string; + DEFAULT: string; + colors: string; + opacity: string; + shadow: string; + transform: string; + }; + transitionTimingFunction: { + DEFAULT: string; + linear: string; + in: string; + out: string; + 'in-out': string; + }; + translate: ({ theme }: PluginUtils) => any; + size: ({ theme }: PluginUtils) => any; + width: ({ theme }: PluginUtils) => any; + willChange: { + auto: string; + scroll: string; + contents: string; + transform: string; + }; + zIndex: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 10: string; + 20: string; + 30: string; + 40: string; + 50: string; + }; +}; + +export { _default as default }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.js new file mode 100644 index 0000000000000000000000000000000000000000..48982db90f68fe43d7ee1bebb002aa39e7261d8f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.js @@ -0,0 +1 @@ +"use strict";var m=new Uint8Array(256);function d(e,c){let t=0,g=[],u=0,k=e.length,w=c.charCodeAt(0);for(let n=0;n0&&h===m[t-1]&&t--;break}}return g.push(e.slice(u)),g}var l=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,z=new RegExp(`^${l.source}$`);var T=new RegExp(`^${l.source}%$`);var D=new RegExp(`^${l.source}s*/s*${l.source}$`);var A=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],I=new RegExp(`^${l.source}(${A.join("|")})$`);var C=["deg","rad","grad","turn"],F=new RegExp(`^${l.source}(${C.join("|")})$`);var H=new RegExp(`^${l.source} +${l.source} +${l.source}$`);function i(e){let c=Number(e);return Number.isInteger(c)&&c>=0&&String(c)===String(e)}var f={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};function s(e){return{__BARE_VALUE__:e}}var r=s(e=>{if(i(e.value))return e.value}),o=s(e=>{if(i(e.value))return`${e.value}%`}),a=s(e=>{if(i(e.value))return`${e.value}px`}),b=s(e=>{if(i(e.value))return`${e.value}ms`}),p=s(e=>{if(i(e.value))return`${e.value}deg`}),S=s(e=>{if(e.fraction===null)return;let[c,t]=d(e.fraction,"/");if(!(!i(c)||!i(t)))return e.fraction}),E=s(e=>{if(i(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),y={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...S},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...o}),backdropContrast:({theme:e})=>({...e("contrast"),...o}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...o}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...p}),backdropInvert:({theme:e})=>({...e("invert"),...o}),backdropOpacity:({theme:e})=>({...e("opacity"),...o}),backdropSaturate:({theme:e})=>({...e("saturate"),...o}),backdropSepia:({theme:e})=>({...e("sepia"),...o}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...a},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...o},caretColor:({theme:e})=>e("colors"),colors:()=>({...f}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...r},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...o},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...a}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...r},flexShrink:{0:"0",DEFAULT:"1",...r},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...o},grayscale:{0:"0",DEFAULT:"100%",...o},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...E},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...E},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...p},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...o},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...r},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...o},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...r},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...p},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...o},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...o},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...o},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...p},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...r},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...b},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...b},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...r}};module.exports=y; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.mjs new file mode 100644 index 0000000000000000000000000000000000000000..2fca4a65a7996f5acbd5d661371437d977d8974a --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/default-theme.mjs @@ -0,0 +1 @@ +import{h as a}from"./chunk-G32FJCSR.mjs";import"./chunk-HTB5LLOP.mjs";export{a as default}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.d.mts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..1151604860f5cedb146a45057c69f388a43b4553 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.d.mts @@ -0,0 +1,6 @@ +type Colors = { + [key: string | number]: string | Colors; +}; +declare function flattenColorPalette(colors: Colors): Record; + +export { flattenColorPalette as default }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1151604860f5cedb146a45057c69f388a43b4553 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.d.ts @@ -0,0 +1,6 @@ +type Colors = { + [key: string | number]: string | Colors; +}; +declare function flattenColorPalette(colors: Colors): Record; + +export { flattenColorPalette as default }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.js new file mode 100644 index 0000000000000000000000000000000000000000..b9e6c33c1669735d03d9cb90e02d54a08c6915c4 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.js @@ -0,0 +1,3 @@ +"use strict";function _(e){return{kind:"word",value:e}}function se(e,t){return{kind:"function",value:e,nodes:t}}function ue(e){return{kind:"separator",value:e}}function v(e,t,i=null){for(let r=0;r0){let M=_(n);r?r.nodes.push(M):t.push(M),n=""}let a=l,u=l+1;for(;u0){let u=_(n);a?.nodes.push(u),n=""}i.length>0?r=i[i.length-1]:r=null;break}default:n+=String.fromCharCode(s)}}return n.length>0&&t.push(_(n)),t}var c=class extends Map{constructor(i){super();this.factory=i}get(i){let r=super.get(i);return r===void 0&&(r=this.factory(i,this),this.set(i,r)),r}};var He=new Uint8Array(256);var T=new Uint8Array(256);function p(e,t){let i=0,r=[],n=0,o=e.length,l=t.charCodeAt(0);for(let s=0;s0&&a===T[i-1]&&i--;break}}return r.push(e.slice(n)),r}var tt=new c(e=>{let t=m(e),i=new Set;return v(t,(r,{parent:n})=>{let o=n===null?t:n.nodes??[];if(r.kind==="word"&&(r.value==="+"||r.value==="-"||r.value==="*"||r.value==="/")){let l=o.indexOf(r)??-1;if(l===-1)return;let s=o[l-1];if(s?.kind!=="separator"||s.value!==" ")return;let a=o[l+1];if(a?.kind!=="separator"||a.value!==" ")return;i.add(s),i.add(a)}else r.kind==="separator"&&r.value.trim()==="/"?r.value="/":r.kind==="separator"&&r.value.length>0&&r.value.trim()===""?(o[0]===r||o[o.length-1]===r)&&i.add(r):r.kind==="separator"&&r.value.trim()===","&&(r.value=",")}),i.size>0&&v(t,(r,{replaceWith:n})=>{i.has(r)&&(i.delete(r),n([]))}),D(t),h(t)});var rt=new c(e=>{let t=m(e);return t.length===3&&t[0].kind==="word"&&t[0].value==="&"&&t[1].kind==="separator"&&t[1].value===":"&&t[2].kind==="function"&&t[2].value==="is"?h(t[2].nodes):e});function D(e){for(let t of e)switch(t.kind){case"function":{if(t.value==="url"||t.value.endsWith("_url")){t.value=N(t.value);break}if(t.value==="var"||t.value.endsWith("_var")||t.value==="theme"||t.value.endsWith("_theme")){t.value=N(t.value);for(let i=0;i{let t=m(e);return t.length===1&&t[0].kind==="function"&&t[0].value==="var"});function me(e){throw new Error(`Unexpected value: ${e}`)}function N(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var w=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,pt=new RegExp(`^${w.source}$`);var dt=new RegExp(`^${w.source}%$`);var mt=new RegExp(`^${w.source}s*/s*${w.source}$`);var ge=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],gt=new RegExp(`^${w.source}(${ge.join("|")})$`);var he=["deg","rad","grad","turn"],ht=new RegExp(`^${w.source}(${he.join("|")})$`);var vt=new RegExp(`^${w.source} +${w.source} +${w.source}$`);function d(e){let t=Number(e);return Number.isInteger(t)&&t>=0&&String(t)===String(e)}function S(e,t){if(t===null)return e;let i=Number(t);return Number.isNaN(i)||(t=`${i*100}%`),t==="100%"?e:`color-mix(in oklab, ${e} ${t}, transparent)`}var ke={"--alpha":be,"--spacing":ye,"--theme":xe,theme:Ae};function be(e,t,i,...r){let[n,o]=p(i,"/").map(l=>l.trim());if(!n||!o)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${o||"50%"})\``);if(r.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${o||"50%"})\``);return S(n,o)}function ye(e,t,i,...r){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(r.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${r.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${i})`}function xe(e,t,i,...r){if(!i.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;i.endsWith(" inline")&&(n=!0,i=i.slice(0,-7)),t.kind==="at-rule"&&(n=!0);let o=e.resolveThemeValue(i,n);if(!o){if(r.length>0)return r.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(r.length===0)return o;let l=r.join(", ");if(l==="initial")return o;if(o==="initial")return l;if(o.startsWith("var(")||o.startsWith("theme(")||o.startsWith("--theme(")){let s=m(o);return $e(s,l),h(s)}return o}function Ae(e,t,i,...r){i=Ce(i);let n=e.resolveThemeValue(i);if(!n&&r.length>0)return r.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var Ut=new RegExp(Object.keys(ke).map(e=>`${e}\\(`).join("|"));function Ce(e){if(e[0]!=="'"&&e[0]!=='"')return e;let t="",i=e[0];for(let r=1;r{if(i.kind==="function"&&!(i.value!=="var"&&i.value!=="theme"&&i.value!=="--theme"))if(i.nodes.length===1)i.nodes.push({kind:"word",value:`, ${t}`});else{let r=i.nodes[i.nodes.length-1];r.kind==="word"&&r.value==="initial"&&(r.value=t)}})}var F={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};function C(e){return{__BARE_VALUE__:e}}var g=C(e=>{if(d(e.value))return e.value}),f=C(e=>{if(d(e.value))return`${e.value}%`}),y=C(e=>{if(d(e.value))return`${e.value}px`}),le=C(e=>{if(d(e.value))return`${e.value}ms`}),P=C(e=>{if(d(e.value))return`${e.value}deg`}),Ie=C(e=>{if(e.fraction===null)return;let[t,i]=p(e.fraction,"/");if(!(!d(t)||!d(i)))return e.fraction}),ae=C(e=>{if(d(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),ze={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...Ie},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...f}),backdropContrast:({theme:e})=>({...e("contrast"),...f}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...f}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...P}),backdropInvert:({theme:e})=>({...e("invert"),...f}),backdropOpacity:({theme:e})=>({...e("opacity"),...f}),backdropSaturate:({theme:e})=>({...e("saturate"),...f}),backdropSepia:({theme:e})=>({...e("sepia"),...f}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...y},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...f},caretColor:({theme:e})=>e("colors"),colors:()=>({...F}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...g},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...f},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...y}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...g},flexShrink:{0:"0",DEFAULT:"1",...g},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...f},grayscale:{0:"0",DEFAULT:"100%",...f},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ae},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ae},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...P},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...f},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...g},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...f},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...g},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...P},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...f},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...f},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...f},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...P},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...g},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...le},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...le},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...g}};function O(e){let t={};for(let[i,r]of Object.entries(e??{}))if(i!=="__CSS_VALUES__")if(typeof r=="object"&&r!==null)for(let[n,o]of Object.entries(O(r)))t[`${i}${n==="DEFAULT"?"":`-${n}`}`]=o;else t[i]=r;if("__CSS_VALUES__"in e)for(let[i,r]of Object.entries(e.__CSS_VALUES__))(Number(r)&4)===0&&(t[i]=e[i]);return t}module.exports=O; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d047645d27aaecbeb2b9f4f11177786610ce7ae3 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/flatten-color-palette.mjs @@ -0,0 +1 @@ +import"./chunk-4WXWQT6Y.mjs";import"./chunk-G32FJCSR.mjs";import"./chunk-HTB5LLOP.mjs";function i(r){let n={};for(let[e,t]of Object.entries(r??{}))if(e!=="__CSS_VALUES__")if(typeof t=="object"&&t!==null)for(let[o,f]of Object.entries(i(t)))n[`${e}${o==="DEFAULT"?"":`-${o}`}`]=f;else n[e]=t;if("__CSS_VALUES__"in r)for(let[e,t]of Object.entries(r.__CSS_VALUES__))(Number(t)&4)===0&&(n[e]=r[e]);return n}export{i as default}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.d.mts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..df2c5634e2410af8def3583a699feeb160a97323 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.d.mts @@ -0,0 +1,373 @@ +import { U as UserConfig, P as Plugin } from './types-B254mqw1.mjs'; +import { V as Variant, C as Candidate } from './resolve-config-QUZ9b-Gn.mjs'; +import './colors.mjs'; + +declare const enum ThemeOptions { + NONE = 0, + INLINE = 1, + REFERENCE = 2, + DEFAULT = 4, + STATIC = 8, + USED = 16 +} +declare class Theme { + #private; + private values; + private keyframes; + prefix: string | null; + constructor(values?: Map, keyframes?: Set); + get size(): number; + add(key: string, value: string, options?: ThemeOptions, src?: Declaration['src']): void; + keysInNamespaces(themeKeys: Iterable): string[]; + get(themeKeys: ThemeKey[]): string | null; + hasDefault(key: string): boolean; + getOptions(key: string): ThemeOptions; + entries(): IterableIterator<[string, { + value: string; + options: ThemeOptions; + src: Declaration["src"]; + }]> | [string, { + value: string; + options: ThemeOptions; + src: Declaration["src"]; + }][]; + prefixKey(key: string): string; + clearNamespace(namespace: string, clearOptions: ThemeOptions): void; + markUsedVariable(themeKey: string): boolean; + resolve(candidateValue: string | null, themeKeys: ThemeKey[], options?: ThemeOptions): string | null; + resolveValue(candidateValue: string | null, themeKeys: ThemeKey[]): string | null; + resolveWith(candidateValue: string, themeKeys: ThemeKey[], nestedKeys?: `--${string}`[]): [string, Record] | null; + namespace(namespace: string): Map; + addKeyframes(value: AtRule): void; + getKeyframes(): AtRule[]; +} +type ThemeKey = `--${string}`; + +type VariantFn = (rule: Rule, variant: Extract) => null | void; +type CompareFn = (a: Variant, z: Variant) => number; +declare const enum Compounds { + Never = 0, + AtRules = 1, + StyleRules = 2 +} +declare class Variants { + compareFns: Map; + variants: Map; + compoundsWith: Compounds; + compounds: Compounds; + }>; + private completions; + /** + * Registering a group of variants should result in the same sort number for + * all the variants. This is to ensure that the variants are applied in the + * correct order. + */ + private groupOrder; + /** + * Keep track of the last sort order instead of using the size of the map to + * avoid unnecessarily skipping order numbers. + */ + private lastOrder; + static(name: string, applyFn: VariantFn<'static'>, { compounds, order }?: { + compounds?: Compounds; + order?: number; + }): void; + fromAst(name: string, ast: AstNode[]): void; + functional(name: string, applyFn: VariantFn<'functional'>, { compounds, order }?: { + compounds?: Compounds; + order?: number; + }): void; + compound(name: string, compoundsWith: Compounds, applyFn: VariantFn<'compound'>, { compounds, order }?: { + compounds?: Compounds; + order?: number; + }): void; + group(fn: () => void, compareFn?: CompareFn): void; + has(name: string): boolean; + get(name: string): { + kind: Variant["kind"]; + order: number; + applyFn: VariantFn; + compoundsWith: Compounds; + compounds: Compounds; + } | undefined; + kind(name: string): "static" | "arbitrary" | "functional" | "compound"; + compoundsWith(parent: string, child: string | Variant): boolean; + suggest(name: string, suggestions: () => string[]): void; + getCompletions(name: string): string[]; + compare(a: Variant | null, z: Variant | null): number; + keys(): IterableIterator; + entries(): IterableIterator<[string, { + kind: Variant["kind"]; + order: number; + applyFn: VariantFn; + compoundsWith: Compounds; + compounds: Compounds; + }]>; + private set; + private nextOrder; +} + +declare function compileAstNodes(candidate: Candidate, designSystem: DesignSystem): { + node: AstNode; + propertySort: { + order: number[]; + count: number; + }; +}[]; + +interface ClassMetadata { + modifiers: string[]; +} +type ClassEntry = [string, ClassMetadata]; +interface SelectorOptions { + modifier?: string; + value?: string; +} +interface VariantEntry { + name: string; + isArbitrary: boolean; + values: string[]; + hasDash: boolean; + selectors: (options: SelectorOptions) => string[]; +} + +type CompileFn = (value: Extract) => AstNode[] | undefined | null; +interface SuggestionGroup { + supportsNegative?: boolean; + values: (string | null)[]; + modifiers: string[]; +} +type UtilityOptions = { + types: string[]; +}; +type Utility = { + kind: 'static' | 'functional'; + compileFn: CompileFn; + options?: UtilityOptions; +}; +declare class Utilities { + private utilities; + private completions; + static(name: string, compileFn: CompileFn<'static'>): void; + functional(name: string, compileFn: CompileFn<'functional'>, options?: UtilityOptions): void; + has(name: string, kind: 'static' | 'functional'): boolean; + get(name: string): Utility[]; + getCompletions(name: string): SuggestionGroup[]; + suggest(name: string, groups: () => SuggestionGroup[]): void; + keys(kind: 'static' | 'functional'): string[]; +} + +type DesignSystem = { + theme: Theme; + utilities: Utilities; + variants: Variants; + invalidCandidates: Set; + important: boolean; + getClassOrder(classes: string[]): [string, bigint | null][]; + getClassList(): ClassEntry[]; + getVariants(): VariantEntry[]; + parseCandidate(candidate: string): Readonly[]; + parseVariant(variant: string): Readonly | null; + compileAstNodes(candidate: Candidate): ReturnType; + printCandidate(candidate: Candidate): string; + printVariant(variant: Variant): string; + getVariantOrder(): Map; + resolveThemeValue(path: string, forceInline?: boolean): string | undefined; + trackUsedVariables(raw: string): void; + candidatesToCss(classes: string[]): (string | null)[]; +}; + +/** + * The source code for one or more nodes in the AST + * + * This generally corresponds to a stylesheet + */ +interface Source { + /** + * The path to the file that contains the referenced source code + * + * If this references the *output* source code, this is `null`. + */ + file: string | null; + /** + * The referenced source code + */ + code: string; +} +/** + * The file and offsets within it that this node covers + * + * This can represent either: + * - A location in the original CSS which caused this node to be created + * - A location in the output CSS where this node resides + */ +type SourceLocation = [source: Source, start: number, end: number]; + +type StyleRule = { + kind: 'rule'; + selector: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type AtRule = { + kind: 'at-rule'; + name: string; + params: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Declaration = { + kind: 'declaration'; + property: string; + value: string | undefined; + important: boolean; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Comment = { + kind: 'comment'; + value: string; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Context = { + kind: 'context'; + context: Record; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type AtRoot = { + kind: 'at-root'; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type Rule = StyleRule | AtRule; +type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot; + +/** + * Line offset tables are the key to generating our source maps. They allow us + * to store indexes with our AST nodes and later convert them into positions as + * when given the source that the indexes refer to. + */ +/** + * A position in source code + * + * https://tc39.es/ecma426/#sec-position-record-type + */ +interface Position { + /** The line number, one-based */ + line: number; + /** The column/character number, one-based */ + column: number; +} + +interface OriginalPosition extends Position { + source: DecodedSource; +} +/** + * A "decoded" sourcemap + * + * @see https://tc39.es/ecma426/#decoded-source-map-record + */ +interface DecodedSourceMap { + file: string | null; + sources: DecodedSource[]; + mappings: DecodedMapping[]; +} +/** + * A "decoded" source + * + * @see https://tc39.es/ecma426/#decoded-source-record + */ +interface DecodedSource { + url: string | null; + content: string | null; + ignore: boolean; +} +/** + * A "decoded" mapping + * + * @see https://tc39.es/ecma426/#decoded-mapping-record + */ +interface DecodedMapping { + originalPosition: OriginalPosition | null; + generatedPosition: Position; + name: string | null; +} + +type Config = UserConfig; +declare const enum Polyfills { + None = 0, + AtProperty = 1, + ColorMix = 2, + All = 3 +} +type CompileOptions = { + base?: string; + from?: string; + polyfills?: Polyfills; + loadModule?: (id: string, base: string, resourceHint: 'plugin' | 'config') => Promise<{ + path: string; + base: string; + module: Plugin | Config; + }>; + loadStylesheet?: (id: string, base: string) => Promise<{ + path: string; + base: string; + content: string; + }>; +}; +type Root = null | 'none' | { + base: string; + pattern: string; +}; +declare const enum Features { + None = 0, + AtApply = 1, + AtImport = 2, + JsPluginCompat = 4, + ThemeFunction = 8, + Utilities = 16, + Variants = 32 +} +declare function compileAst(input: AstNode[], opts?: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: Root; + features: Features; + build(candidates: string[]): AstNode[]; +}>; + +declare function compile(css: string, opts?: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: Root; + features: Features; + build(candidates: string[]): string; + buildSourceMap(): DecodedSourceMap; +}>; +declare function __unstable__loadDesignSystem(css: string, opts?: CompileOptions): Promise; +declare function postcssPluginWarning(): void; + +export { type Config, type DecodedSourceMap, Features, Polyfills, __unstable__loadDesignSystem, compile, compileAst, postcssPluginWarning as default }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..411ce0604b0e875ee7073327db0d8d9ad895896f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.d.ts @@ -0,0 +1,3 @@ +declare function postcssPluginWarning(): void; + +export { postcssPluginWarning as default }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.js new file mode 100644 index 0000000000000000000000000000000000000000..c62b83b6a177876fadcc58e6f53b06210f462409 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.js @@ -0,0 +1,35 @@ +"use strict";var xi=Object.defineProperty;var Ai=(t,r)=>{for(var i in r)xi(t,i,{get:r[i],enumerable:!0})};var vt={};Ai(vt,{Features:()=>Se,Polyfills:()=>tt,__unstable__loadDesignSystem:()=>uo,compile:()=>so,compileAst:()=>yi,default:()=>We});var Mt="4.1.11";var Pe=92,Be=47,qe=42,Wt=34,Bt=39,Ni=58,Ge=59,ne=10,Ye=13,Oe=32,He=9,qt=123,kt=125,xt=40,Ht=41,$i=91,Vi=93,Gt=45,bt=64,Si=33;function ve(t,r){let i=r?.from?{file:r.from,code:t}:null;t[0]==="\uFEFF"&&(t=" "+t.slice(1));let e=[],n=[],s=[],a=null,f=null,u="",c="",d=0,m;for(let g=0;g0&&t[b]===v[v.length-1]&&(v=v.slice(0,-1));let V=yt(u,y);if(!V)throw new Error("Invalid custom property, expected a value");i&&(V.src=[i,x,g],V.dst=[i,x,g]),a?a.nodes.push(V):e.push(V),u=""}else if(w===Ge&&u.charCodeAt(0)===bt)f=_e(u),i&&(f.src=[i,d,g],f.dst=[i,d,g]),a?a.nodes.push(f):e.push(f),u="",f=null;else if(w===Ge&&c[c.length-1]!==")"){let v=yt(u);if(!v)throw u.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${u.trim()}\``);i&&(v.src=[i,d,g],v.dst=[i,d,g]),a?a.nodes.push(v):e.push(v),u=""}else if(w===qt&&c[c.length-1]!==")")c+="}",f=G(u.trim()),i&&(f.src=[i,d,g],f.dst=[i,d,g]),a&&a.nodes.push(f),s.push(a),a=f,u="",f=null;else if(w===kt&&c[c.length-1]!==")"){if(c==="")throw new Error("Missing opening {");if(c=c.slice(0,-1),u.length>0)if(u.charCodeAt(0)===bt)f=_e(u),i&&(f.src=[i,d,g],f.dst=[i,d,g]),a?a.nodes.push(f):e.push(f),u="",f=null;else{let x=u.indexOf(":");if(a){let y=yt(u,x);if(!y)throw new Error(`Invalid declaration: \`${u.trim()}\``);i&&(y.src=[i,d,g],y.dst=[i,d,g]),a.nodes.push(y)}}let v=s.pop()??null;v===null&&a&&e.push(a),a=v,u="",f=null}else if(w===xt)c+=")",u+="(";else if(w===Ht){if(c[c.length-1]!==")")throw new Error("Missing opening (");c=c.slice(0,-1),u+=")"}else{if(u.length===0&&(w===Oe||w===ne||w===He))continue;u===""&&(d=g),u+=String.fromCharCode(w)}}}if(u.charCodeAt(0)===bt){let g=_e(u);i&&(g.src=[i,d,t.length],g.dst=[i,d,t.length]),e.push(g)}if(c.length>0&&a){if(a.kind==="rule")throw new Error(`Missing closing } at ${a.selector}`);if(a.kind==="at-rule")throw new Error(`Missing closing } at ${a.name} ${a.params}`)}return n.length>0?n.concat(e):e}function _e(t,r=[]){let i=t,e="";for(let n=5;n=1&&n<=31||n===127||e===0&&n>=48&&n<=57||e===1&&n>=48&&n<=57&&a===45){s+="\\"+n.toString(16)+" ";continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=r.charAt(e);continue}s+="\\"+r.charAt(e)}return s}function we(t){return t.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,r=>r.length>2?String.fromCodePoint(Number.parseInt(r.slice(1).trim(),16)):r[1])}var Jt=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-decoration-color","--text-decoration-thickness","--text-indent","--text-shadow","--text-underline-offset"]]]);function Zt(t,r){return(Jt.get(r)??[]).some(i=>t===i||t.startsWith(`${i}-`))}var Je=class{constructor(r=new Map,i=new Set([])){this.values=r;this.keyframes=i}prefix=null;get size(){return this.values.size}add(r,i,e=0,n){if(r.endsWith("-*")){if(i!=="initial")throw new Error(`Invalid theme value \`${i}\` for namespace \`${r}\``);r==="--*"?this.values.clear():this.clearNamespace(r.slice(0,-2),0)}if(e&4){let s=this.values.get(r);if(s&&!(s.options&4))return}i==="initial"?this.values.delete(r):this.values.set(r,{value:i,options:e,src:n})}keysInNamespaces(r){let i=[];for(let e of r){let n=`${e}-`;for(let s of this.values.keys())s.startsWith(n)&&s.indexOf("--",2)===-1&&(Zt(s,e)||i.push(s.slice(n.length)))}return i}get(r){for(let i of r){let e=this.values.get(i);if(e)return e.value}return null}hasDefault(r){return(this.getOptions(r)&4)===4}getOptions(r){return r=we(this.#r(r)),this.values.get(r)?.options??0}entries(){return this.prefix?Array.from(this.values,r=>(r[0]=this.prefixKey(r[0]),r)):this.values.entries()}prefixKey(r){return this.prefix?`--${this.prefix}-${r.slice(2)}`:r}#r(r){return this.prefix?`--${r.slice(3+this.prefix.length)}`:r}clearNamespace(r,i){let e=Jt.get(r)??[];e:for(let n of this.values.keys())if(n.startsWith(r)){if(i!==0&&(this.getOptions(n)&i)!==i)continue;for(let s of e)if(n.startsWith(s))continue e;this.values.delete(n)}}#e(r,i){for(let e of i){let n=r!==null?`${e}-${r}`:e;if(!this.values.has(n))if(r!==null&&r.includes(".")){if(n=`${e}-${r.replaceAll(".","_")}`,!this.values.has(n))continue}else continue;if(!Zt(n,e))return n}return null}#t(r){let i=this.values.get(r);if(!i)return null;let e=null;return i.options&2&&(e=i.value),`var(${de(this.prefixKey(r))}${e?`, ${e}`:""})`}markUsedVariable(r){let i=we(this.#r(r)),e=this.values.get(i);if(!e)return!1;let n=e.options&16;return e.options|=16,!n}resolve(r,i,e=0){let n=this.#e(r,i);if(!n)return null;let s=this.values.get(n);return(e|s.options)&1?s.value:this.#t(n)}resolveValue(r,i){let e=this.#e(r,i);return e?this.values.get(e).value:null}resolveWith(r,i,e=[]){let n=this.#e(r,i);if(!n)return null;let s={};for(let f of e){let u=`${n}${f}`,c=this.values.get(u);c&&(c.options&1?s[f]=c.value:s[f]=this.#t(u))}let a=this.values.get(n);return a.options&1?[a.value,s]:[this.#t(n),s]}namespace(r){let i=new Map,e=`${r}-`;for(let[n,s]of this.values)n===r?i.set(null,s.value):n.startsWith(`${e}-`)?i.set(n.slice(r.length),s.value):n.startsWith(e)&&i.set(n.slice(e.length),s.value);return i}addKeyframes(r){this.keyframes.add(r)}getKeyframes(){return Array.from(this.keyframes)}};var B=class extends Map{constructor(i){super();this.factory=i}get(i){let e=super.get(i);return e===void 0&&(e=this.factory(i,this),this.set(i,e)),e}};function Ct(t){return{kind:"word",value:t}}function Ei(t,r){return{kind:"function",value:t,nodes:r}}function Ti(t){return{kind:"separator",value:t}}function ee(t,r,i=null){for(let e=0;e0){let m=Ct(n);e?e.nodes.push(m):r.push(m),n=""}let u=a,c=a+1;for(;c0){let c=Ct(n);u?.nodes.push(c),n=""}i.length>0?e=i[i.length-1]:e=null;break}default:n+=String.fromCharCode(f)}}return n.length>0&&r.push(Ct(n)),r}function Qe(t){let r=[];return ee(q(t),i=>{if(!(i.kind!=="function"||i.value!=="var"))return ee(i.nodes,e=>{e.kind!=="word"||e.value[0]!=="-"||e.value[1]!=="-"||r.push(e.value)}),1}),r}var Ki=64;function M(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function F(t,r="",i=[]){return{kind:"at-rule",name:t,params:r,nodes:i}}function G(t,r=[]){return t.charCodeAt(0)===Ki?_e(t,r):M(t,r)}function l(t,r,i=!1){return{kind:"declaration",property:t,value:r,important:i}}function Ze(t){return{kind:"comment",value:t}}function se(t,r){return{kind:"context",context:t,nodes:r}}function z(t){return{kind:"at-root",nodes:t}}function I(t,r,i=[],e={}){for(let n=0;nnew Set),a=new B(()=>new Set),f=new Set,u=new Set,c=[],d=[],m=new B(()=>new Set);function g(v,x,y={},V=0){if(v.kind==="declaration"){if(v.property==="--tw-sort"||v.value===void 0||v.value===null)return;if(y.theme&&v.property[0]==="-"&&v.property[1]==="-"){if(v.value==="initial"){v.value=void 0;return}y.keyframes||s.get(x).add(v)}if(v.value.includes("var("))if(y.theme&&v.property[0]==="-"&&v.property[1]==="-")for(let b of Qe(v.value))m.get(b).add(v.property);else r.trackUsedVariables(v.value);if(v.property==="animation")for(let b of sr(v.value))u.add(b);i&2&&v.value.includes("color-mix(")&&a.get(x).add(v),x.push(v)}else if(v.kind==="rule")if(v.selector==="&")for(let b of v.nodes){let S=[];g(b,S,y,V+1),S.length>0&&x.push(...S)}else{let b={...v,nodes:[]};for(let S of v.nodes)g(S,b.nodes,y,V+1);b.nodes.length>0&&x.push(b)}else if(v.kind==="at-rule"&&v.name==="@property"&&V===0){if(n.has(v.params))return;if(i&1){let S=v.params,R=null,L=!1;for(let K of v.nodes)K.kind==="declaration"&&(K.property==="initial-value"?R=K.value:K.property==="inherits"&&(L=K.value==="true"));let P=l(S,R??"initial");P.src=v.src,L?c.push(P):d.push(P)}n.add(v.params);let b={...v,nodes:[]};for(let S of v.nodes)g(S,b.nodes,y,V+1);x.push(b)}else if(v.kind==="at-rule"){v.name==="@keyframes"&&(y={...y,keyframes:!0});let b={...v,nodes:[]};for(let S of v.nodes)g(S,b.nodes,y,V+1);v.name==="@keyframes"&&y.theme&&f.add(b),(b.nodes.length>0||b.name==="@layer"||b.name==="@charset"||b.name==="@custom-media"||b.name==="@namespace"||b.name==="@import")&&x.push(b)}else if(v.kind==="at-root")for(let b of v.nodes){let S=[];g(b,S,y,0);for(let R of S)e.push(R)}else if(v.kind==="context"){if(v.context.reference)return;for(let b of v.nodes)g(b,x,{...y,...v.context},V)}else v.kind==="comment"&&x.push(v)}let w=[];for(let v of t)g(v,w,{},0);e:for(let[v,x]of s)for(let y of x){if(ur(y.property,r.theme,m)){if(y.property.startsWith(r.theme.prefixKey("--animate-")))for(let S of sr(y.value))u.add(S);continue}let b=v.indexOf(y);if(v.splice(b,1),v.length===0){let S=Ui(w,R=>R.kind==="rule"&&R.nodes===v);if(!S||S.length===0)continue e;S.unshift({kind:"at-root",nodes:w});do{let R=S.pop();if(!R)break;let L=S[S.length-1];if(!L||L.kind!=="at-root"&&L.kind!=="at-rule")break;let P=L.nodes.indexOf(R);if(P===-1)break;L.nodes.splice(P,1)}while(!0);continue e}}for(let v of f)if(!u.has(v.params)){let x=e.indexOf(v);e.splice(x,1)}if(w=w.concat(e),i&2)for(let[v,x]of a)for(let y of x){let V=v.indexOf(y);if(V===-1||y.value==null)continue;let b=q(y.value),S=!1;if(ee(b,(P,{replaceWith:K})=>{if(P.kind!=="function"||P.value!=="color-mix")return;let _=!1,H=!1;if(ee(P.nodes,(j,{replaceWith:W})=>{if(j.kind=="word"&&j.value.toLowerCase()==="currentcolor"){H=!0,S=!0;return}let J=j,ie=null,o=new Set;do{if(J.kind!=="function"||J.value!=="var")return;let p=J.nodes[0];if(!p||p.kind!=="word")return;let h=p.value;if(o.has(h)){_=!0;return}if(o.add(h),S=!0,ie=r.theme.resolveValue(null,[p.value]),!ie){_=!0;return}if(ie.toLowerCase()==="currentcolor"){H=!0;return}ie.startsWith("var(")?J=q(ie)[0]:J=null}while(J);W({kind:"word",value:ie})}),_||H){let j=P.nodes.findIndex(J=>J.kind==="separator"&&J.value.trim().includes(","));if(j===-1)return;let W=P.nodes.length>j?P.nodes[j+1]:null;if(!W)return;K(W)}else if(S){let j=P.nodes[2];j.kind==="word"&&(j.value==="oklab"||j.value==="oklch"||j.value==="lab"||j.value==="lch")&&(j.value="srgb")}}),!S)continue;let R={...y,value:Z(b)},L=G("@supports (color: color-mix(in lab, red, red))",[y]);L.src=y.src,v.splice(V,1,R,L)}if(i&1){let v=[];if(c.length>0){let x=G(":root, :host",c);x.src=c[0].src,v.push(x)}if(d.length>0){let x=G("*, ::before, ::after, ::backdrop",d);x.src=d[0].src,v.push(x)}if(v.length>0){let x=w.findIndex(b=>!(b.kind==="comment"||b.kind==="at-rule"&&(b.name==="@charset"||b.name==="@import"))),y=F("@layer","properties",[]);y.src=v[0].src,w.splice(x<0?w.length:x,0,y);let V=G("@layer properties",[F("@supports","((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))",v)]);V.src=v[0].src,V.nodes[0].src=v[0].src,w.push(V)}}return w}function oe(t,r){let i=0,e={file:null,code:""};function n(a,f=0){let u="",c=" ".repeat(f);if(a.kind==="declaration"){if(u+=`${c}${a.property}: ${a.value}${a.important?" !important":""}; +`,r){i+=c.length;let d=i;i+=a.property.length,i+=2,i+=a.value?.length??0,a.important&&(i+=11);let m=i;i+=2,a.dst=[e,d,m]}}else if(a.kind==="rule"){if(u+=`${c}${a.selector} { +`,r){i+=c.length;let d=i;i+=a.selector.length,i+=1;let m=i;a.dst=[e,d,m],i+=2}for(let d of a.nodes)u+=n(d,f+1);u+=`${c}} +`,r&&(i+=c.length,i+=2)}else if(a.kind==="at-rule"){if(a.nodes.length===0){let d=`${c}${a.name} ${a.params}; +`;if(r){i+=c.length;let m=i;i+=a.name.length,i+=1,i+=a.params.length;let g=i;i+=2,a.dst=[e,m,g]}return d}if(u+=`${c}${a.name}${a.params?` ${a.params} `:" "}{ +`,r){i+=c.length;let d=i;i+=a.name.length,a.params&&(i+=1,i+=a.params.length),i+=1;let m=i;a.dst=[e,d,m],i+=2}for(let d of a.nodes)u+=n(d,f+1);u+=`${c}} +`,r&&(i+=c.length,i+=2)}else if(a.kind==="comment"){if(u+=`${c}/*${a.value}*/ +`,r){i+=c.length;let d=i;i+=2+a.value.length+2;let m=i;a.dst=[e,d,m],i+=1}}else if(a.kind==="context"||a.kind==="at-root")return"";return u}let s="";for(let a of t)s+=n(a,0);return e.code=s,s}function Ui(t,r){let i=[];return I(t,(e,{path:n})=>{if(r(e))return i=[...n],2}),i}function ur(t,r,i,e=new Set){if(e.has(t)||(e.add(t),r.getOptions(t)&24))return!0;{let s=i.get(t)??[];for(let a of s)if(ur(a,r,i,e))return!0}return!1}function sr(t){return t.split(/[\s,]+/)}var Nt=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"];function De(t){return t.indexOf("(")!==-1&&Nt.some(r=>t.includes(`${r}(`))}function cr(t){if(!Nt.some(s=>t.includes(s)))return t;let r="",i=[],e=null,n=null;for(let s=0;s=48&&a<=57||e!==null&&(a===37||a>=97&&a<=122||a>=65&&a<=90)?e=s:(n=e,e=null),a===40){r+=t[s];let f=s;for(let c=s-1;c>=0;c--){let d=t.charCodeAt(c);if(d>=48&&d<=57)f=c;else if(d>=97&&d<=122)f=c;else break}let u=t.slice(f,s);if(Nt.includes(u)){i.unshift(!0);continue}else if(i[0]&&u===""){i.unshift(!0);continue}i.unshift(!1);continue}else if(a===41)r+=t[s],i.shift();else if(a===44&&i[0]){r+=", ";continue}else{if(a===32&&i[0]&&r.charCodeAt(r.length-1)===32)continue;if((a===43||a===42||a===47||a===45)&&i[0]){let f=r.trimEnd(),u=f.charCodeAt(f.length-1),c=f.charCodeAt(f.length-2),d=t.charCodeAt(s+1);if((u===101||u===69)&&c>=48&&c<=57){r+=t[s];continue}else if(u===43||u===42||u===47||u===45){r+=t[s];continue}else if(u===40||u===44){r+=t[s];continue}else t.charCodeAt(s-1)===32?r+=`${t[s]} `:u>=48&&u<=57||d>=48&&d<=57||u===41||d===40||d===43||d===42||d===47||d===45||n!==null&&n===s-1?r+=` ${t[s]} `:r+=t[s]}else r+=t[s]}}return r}function me(t){if(t.indexOf("(")===-1)return Ne(t);let r=q(t);return $t(r),t=Z(r),t=cr(t),t}function Ne(t,r=!1){let i="";for(let e=0;e0&&n===Vt[r-1]&&r--;break;case 59:if(r===0)return!1;break}}return!0}var rt=new Uint8Array(256);function D(t,r){let i=0,e=[],n=0,s=t.length,a=r.charCodeAt(0);for(let f=0;f0&&u===rt[i-1]&&i--;break}}return e.push(t.slice(n)),e}var ji=58,fr=45,pr=97,dr=122;function*mr(t,r){let i=D(t,":");if(r.theme.prefix){if(i.length===1||i[0]!==r.theme.prefix)return null;i.shift()}let e=i.pop(),n=[];for(let m=i.length-1;m>=0;--m){let g=r.parseVariant(i[m]);if(g===null)return;n.push(g)}let s=!1;e[e.length-1]==="!"?(s=!0,e=e.slice(0,-1)):e[0]==="!"&&(s=!0,e=e.slice(1)),r.utilities.has(e,"static")&&!e.includes("[")&&(yield{kind:"static",root:e,variants:n,important:s,raw:t});let[a,f=null,u]=D(e,"/");if(u)return;let c=f===null?null:St(f);if(f!==null&&c===null)return;if(a[0]==="["){if(a[a.length-1]!=="]")return;let m=a.charCodeAt(1);if(m!==fr&&!(m>=pr&&m<=dr))return;a=a.slice(1,-1);let g=a.indexOf(":");if(g===-1||g===0||g===a.length-1)return;let w=a.slice(0,g),v=me(a.slice(g+1));if(!ce(v))return;yield{kind:"arbitrary",property:w,value:v,modifier:c,variants:n,important:s,raw:t};return}let d;if(a[a.length-1]==="]"){let m=a.indexOf("-[");if(m===-1)return;let g=a.slice(0,m);if(!r.utilities.has(g,"functional"))return;let w=a.slice(m+1);d=[[g,w]]}else if(a[a.length-1]===")"){let m=a.indexOf("-(");if(m===-1)return;let g=a.slice(0,m);if(!r.utilities.has(g,"functional"))return;let w=a.slice(m+2,-1),v=D(w,":"),x=null;if(v.length===2&&(x=v[0],w=v[1]),w[0]!=="-"||w[1]!=="-"||!ce(w))return;d=[[g,x===null?`[var(${w})]`:`[${x}:var(${w})]`]]}else d=hr(a,m=>r.utilities.has(m,"functional"));for(let[m,g]of d){let w={kind:"functional",root:m,modifier:c,value:null,variants:n,important:s,raw:t};if(g===null){yield w;continue}{let v=g.indexOf("[");if(v!==-1){if(g[g.length-1]!=="]")return;let y=me(g.slice(v+1,-1));if(!ce(y))continue;let V="";for(let b=0;b=pr&&S<=dr))break}if(y.length===0||y.trim().length===0)continue;w.value={kind:"arbitrary",dataType:V||null,value:y}}else{let y=f===null||w.modifier?.kind==="arbitrary"?null:`${g}/${f}`;w.value={kind:"named",value:g,fraction:y}}}yield w}}function St(t){if(t[0]==="["&&t[t.length-1]==="]"){let r=me(t.slice(1,-1));return!ce(r)||r.length===0||r.trim().length===0?null:{kind:"arbitrary",value:r}}return t[0]==="("&&t[t.length-1]===")"?(t=t.slice(1,-1),t[0]!=="-"||t[1]!=="-"||!ce(t)?null:(t=`var(${t})`,{kind:"arbitrary",value:me(t)})):{kind:"named",value:t}}function gr(t,r){if(t[0]==="["&&t[t.length-1]==="]"){if(t[1]==="@"&&t.includes("&"))return null;let i=me(t.slice(1,-1));if(!ce(i)||i.length===0||i.trim().length===0)return null;let e=i[0]===">"||i[0]==="+"||i[0]==="~";return!e&&i[0]!=="@"&&!i.includes("&")&&(i=`&:is(${i})`),{kind:"arbitrary",selector:i,relative:e}}{let[i,e=null,n]=D(t,"/");if(n)return null;let s=hr(i,a=>r.variants.has(a));for(let[a,f]of s)switch(r.variants.kind(a)){case"static":return f!==null||e!==null?null:{kind:"static",root:a};case"functional":{let u=e===null?null:St(e);if(e!==null&&u===null)return null;if(f===null)return{kind:"functional",root:a,modifier:u,value:null};if(f[f.length-1]==="]"){if(f[0]!=="[")continue;let c=me(f.slice(1,-1));return!ce(c)||c.length===0||c.trim().length===0?null:{kind:"functional",root:a,modifier:u,value:{kind:"arbitrary",value:c}}}if(f[f.length-1]===")"){if(f[0]!=="(")continue;let c=me(f.slice(1,-1));return!ce(c)||c.length===0||c.trim().length===0||c[0]!=="-"||c[1]!=="-"?null:{kind:"functional",root:a,modifier:u,value:{kind:"arbitrary",value:`var(${c})`}}}return{kind:"functional",root:a,modifier:u,value:{kind:"named",value:f}}}case"compound":{if(f===null)return null;let u=r.parseVariant(f);if(u===null||!r.variants.compoundsWith(a,u))return null;let c=e===null?null:St(e);return e!==null&&c===null?null:{kind:"compound",root:a,modifier:c,variant:u}}}}return null}function*hr(t,r){r(t)&&(yield[t,null]);let i=t.lastIndexOf("-");for(;i>0;){let e=t.slice(0,i);if(r(e)){let n=[e,t.slice(i+1)];if(n[1]==="")break;yield n}i=t.lastIndexOf("-",i-1)}t[0]==="@"&&r("@")&&(yield["@",t.slice(1)])}function vr(t,r){let i=[];for(let n of r.variants)i.unshift(it(n));t.theme.prefix&&i.unshift(t.theme.prefix);let e="";if(r.kind==="static"&&(e+=r.root),r.kind==="functional"&&(e+=r.root,r.value))if(r.value.kind==="arbitrary"){if(r.value!==null){let n=Tt(r.value.value),s=n?r.value.value.slice(4,-1):r.value.value,[a,f]=n?["(",")"]:["[","]"];r.value.dataType?e+=`-${a}${r.value.dataType}:${$e(s)}${f}`:e+=`-${a}${$e(s)}${f}`}}else r.value.kind==="named"&&(e+=`-${r.value.value}`);return r.kind==="arbitrary"&&(e+=`[${r.property}:${$e(r.value)}]`),(r.kind==="arbitrary"||r.kind==="functional")&&(e+=wr(r.modifier)),r.important&&(e+="!"),i.push(e),i.join(":")}function wr(t){if(t===null)return"";let r=Tt(t.value),i=r?t.value.slice(4,-1):t.value,[e,n]=r?["(",")"]:["[","]"];return t.kind==="arbitrary"?`/${e}${$e(i)}${n}`:t.kind==="named"?`/${t.value}`:""}function it(t){if(t.kind==="static")return t.root;if(t.kind==="arbitrary")return`[${$e(Fi(t.selector))}]`;let r="";if(t.kind==="functional"){r+=t.root;let i=t.root!=="@";if(t.value)if(t.value.kind==="arbitrary"){let e=Tt(t.value.value),n=e?t.value.value.slice(4,-1):t.value.value,[s,a]=e?["(",")"]:["[","]"];r+=`${i?"-":""}${s}${$e(n)}${a}`}else t.value.kind==="named"&&(r+=`${i?"-":""}${t.value.value}`)}return t.kind==="compound"&&(r+=t.root,r+="-",r+=it(t.variant)),(t.kind==="functional"||t.kind==="compound")&&(r+=wr(t.modifier)),r}var Ii=new B(t=>{let r=q(t),i=new Set;return ee(r,(e,{parent:n})=>{let s=n===null?r:n.nodes??[];if(e.kind==="word"&&(e.value==="+"||e.value==="-"||e.value==="*"||e.value==="/")){let a=s.indexOf(e)??-1;if(a===-1)return;let f=s[a-1];if(f?.kind!=="separator"||f.value!==" ")return;let u=s[a+1];if(u?.kind!=="separator"||u.value!==" ")return;i.add(f),i.add(u)}else e.kind==="separator"&&e.value.trim()==="/"?e.value="/":e.kind==="separator"&&e.value.length>0&&e.value.trim()===""?(s[0]===e||s[s.length-1]===e)&&i.add(e):e.kind==="separator"&&e.value.trim()===","&&(e.value=",")}),i.size>0&&ee(r,(e,{replaceWith:n})=>{i.has(e)&&(i.delete(e),n([]))}),Et(r),Z(r)});function $e(t){return Ii.get(t)}var zi=new B(t=>{let r=q(t);return r.length===3&&r[0].kind==="word"&&r[0].value==="&"&&r[1].kind==="separator"&&r[1].value===":"&&r[2].kind==="function"&&r[2].value==="is"?Z(r[2].nodes):t});function Fi(t){return zi.get(t)}function Et(t){for(let r of t)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=Ke(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=Ke(r.value);for(let i=0;i{let r=q(t);return r.length===1&&r[0].kind==="function"&&r[0].value==="var"});function Tt(t){return Mi.get(t)}function Wi(t){throw new Error(`Unexpected value: ${t}`)}function Ke(t){return t.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}function ye(t,r,i){if(t===r)return 0;let e=t.indexOf("("),n=r.indexOf("("),s=e===-1?t.replace(/[\d.]+/g,""):t.slice(0,e),a=n===-1?r.replace(/[\d.]+/g,""):r.slice(0,n),f=(s===a?0:snt(r)||yr(r)||r==="thin"||r==="medium"||r==="thick")}var Zi=/^(?:element|image|cross-fade|image-set)\(/,Ji=/^(repeating-)?(conic|linear|radial)-gradient\(/;function Qi(t){let r=0;for(let i of D(t,","))if(!i.startsWith("var(")){if(br(i)){r+=1;continue}if(Ji.test(i)){r+=1;continue}if(Zi.test(i)){r+=1;continue}return!1}return r>0}function Xi(t){return t==="serif"||t==="sans-serif"||t==="monospace"||t==="cursive"||t==="fantasy"||t==="system-ui"||t==="ui-serif"||t==="ui-sans-serif"||t==="ui-monospace"||t==="ui-rounded"||t==="math"||t==="emoji"||t==="fangsong"}function en(t){let r=0;for(let i of D(t,",")){let e=i.charCodeAt(0);if(e>=48&&e<=57)return!1;i.startsWith("var(")||(r+=1)}return r>0}function tn(t){return t==="xx-small"||t==="x-small"||t==="small"||t==="medium"||t==="large"||t==="x-large"||t==="xx-large"||t==="xxx-large"}function rn(t){return t==="larger"||t==="smaller"}var fe=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,nn=new RegExp(`^${fe.source}$`);function yr(t){return nn.test(t)||De(t)}var on=new RegExp(`^${fe.source}%$`);function Rt(t){return on.test(t)||De(t)}var ln=new RegExp(`^${fe.source}s*/s*${fe.source}$`);function an(t){return ln.test(t)||De(t)}var sn=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],un=new RegExp(`^${fe.source}(${sn.join("|")})$`);function nt(t){return un.test(t)||De(t)}function cn(t){let r=0;for(let i of D(t," ")){if(i==="center"||i==="top"||i==="right"||i==="bottom"||i==="left"){r+=1;continue}if(!i.startsWith("var(")){if(nt(i)||Rt(i)){r+=1;continue}return!1}}return r>0}function fn(t){let r=0;for(let i of D(t,",")){if(i==="cover"||i==="contain"){r+=1;continue}let e=D(i," ");if(e.length!==1&&e.length!==2)return!1;if(e.every(n=>n==="auto"||nt(n)||Rt(n))){r+=1;continue}}return r>0}var pn=["deg","rad","grad","turn"],dn=new RegExp(`^${fe.source}(${pn.join("|")})$`);function mn(t){return dn.test(t)}var gn=new RegExp(`^${fe.source} +${fe.source} +${fe.source}$`);function hn(t){return gn.test(t)}function T(t){let r=Number(t);return Number.isInteger(r)&&r>=0&&String(r)===String(t)}function Pt(t){let r=Number(t);return Number.isInteger(r)&&r>0&&String(r)===String(t)}function xe(t){return xr(t,.25)}function ot(t){return xr(t,.25)}function xr(t,r){let i=Number(t);return i>=0&&i%r===0&&String(i)===String(t)}var vn=new Set(["inset","inherit","initial","revert","unset"]),Ar=/^-?(\d+|\.\d+)(.*?)$/g;function Ue(t,r){return D(t,",").map(e=>{e=e.trim();let n=D(e," ").filter(c=>c.trim()!==""),s=null,a=null,f=null;for(let c of n)vn.has(c)||(Ar.test(c)?(a===null?a=c:f===null&&(f=c),Ar.lastIndex=0):s===null&&(s=c));if(a===null||f===null)return e;let u=r(s??"currentcolor");return s!==null?e.replace(s,u):`${e} ${u}`}).join(", ")}var wn=/^-?[a-z][a-zA-Z0-9/%._-]*$/,kn=/^-?[a-z][a-zA-Z0-9/%._-]*-\*$/,at=["0","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],Ot=class{utilities=new B(()=>[]);completions=new Map;static(r,i){this.utilities.get(r).push({kind:"static",compileFn:i})}functional(r,i,e){this.utilities.get(r).push({kind:"functional",compileFn:i,options:e})}has(r,i){return this.utilities.has(r)&&this.utilities.get(r).some(e=>e.kind===i)}get(r){return this.utilities.has(r)?this.utilities.get(r):[]}getCompletions(r){return this.completions.get(r)?.()??[]}suggest(r,i){this.completions.set(r,i)}keys(r){let i=[];for(let[e,n]of this.utilities.entries())for(let s of n)if(s.kind===r){i.push(e);break}return i}};function N(t,r,i){return F("@property",t,[l("syntax",i?`"${i}"`:'"*"'),l("inherits","false"),...r?[l("initial-value",r)]:[]])}function Q(t,r){if(r===null)return t;let i=Number(r);return Number.isNaN(i)||(r=`${i*100}%`),r==="100%"?t:`color-mix(in oklab, ${t} ${r}, transparent)`}function Nr(t,r){let i=Number(r);return Number.isNaN(i)||(r=`${i*100}%`),`oklab(from ${t} l a b / ${r})`}function X(t,r,i){if(!r)return t;if(r.kind==="arbitrary")return Q(t,r.value);let e=i.resolve(r.value,["--opacity"]);return e?Q(t,e):ot(r.value)?Q(t,`${r.value}%`):null}function te(t,r,i){let e=null;switch(t.value.value){case"inherit":{e="inherit";break}case"transparent":{e="transparent";break}case"current":{e="currentcolor";break}default:{e=r.resolve(t.value.value,i);break}}return e?X(e,t.modifier,r):null}var $r=/(\d+)_(\d+)/g;function Vr(t){let r=new Ot;function i(o,p){function*h(k){for(let C of t.keysInNamespaces(k))yield C.replace($r,(O,$,E)=>`${$}.${E}`)}let A=["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"];r.suggest(o,()=>{let k=[];for(let C of p()){if(typeof C=="string"){k.push({values:[C],modifiers:[]});continue}let O=[...C.values??[],...h(C.valueThemeKeys??[])],$=[...C.modifiers??[],...h(C.modifierThemeKeys??[])];C.supportsFractions&&O.push(...A),C.hasDefaultValue&&O.unshift(null),k.push({supportsNegative:C.supportsNegative,values:O,modifiers:$})}return k})}function e(o,p){r.static(o,()=>p.map(h=>typeof h=="function"?h():l(h[0],h[1])))}function n(o,p){function h({negative:A}){return k=>{let C=null,O=null;if(k.value)if(k.value.kind==="arbitrary"){if(k.modifier)return;C=k.value.value,O=k.value.dataType}else{if(C=t.resolve(k.value.fraction??k.value.value,p.themeKeys??[]),C===null&&p.supportsFractions&&k.value.fraction){let[$,E]=D(k.value.fraction,"/");if(!T($)||!T(E))return;C=`calc(${k.value.fraction} * 100%)`}if(C===null&&A&&p.handleNegativeBareValue){if(C=p.handleNegativeBareValue(k.value),!C?.includes("/")&&k.modifier)return;if(C!==null)return p.handle(C,null)}if(C===null&&p.handleBareValue&&(C=p.handleBareValue(k.value),!C?.includes("/")&&k.modifier))return}else{if(k.modifier)return;C=p.defaultValue!==void 0?p.defaultValue:t.resolve(null,p.themeKeys??[])}if(C!==null)return p.handle(A?`calc(${C} * -1)`:C,O)}}p.supportsNegative&&r.functional(`-${o}`,h({negative:!0})),r.functional(o,h({negative:!1})),i(o,()=>[{supportsNegative:p.supportsNegative,valueThemeKeys:p.themeKeys??[],hasDefaultValue:p.defaultValue!==void 0&&p.defaultValue!==null,supportsFractions:p.supportsFractions}])}function s(o,p){r.functional(o,h=>{if(!h.value)return;let A=null;if(h.value.kind==="arbitrary"?(A=h.value.value,A=X(A,h.modifier,t)):A=te(h,t,p.themeKeys),A!==null)return p.handle(A)}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:p.themeKeys,modifiers:Array.from({length:21},(h,A)=>`${A*5}`)}])}function a(o,p,h,{supportsNegative:A=!1,supportsFractions:k=!1}={}){A&&r.static(`-${o}-px`,()=>h("-1px")),r.static(`${o}-px`,()=>h("1px")),n(o,{themeKeys:p,supportsFractions:k,supportsNegative:A,defaultValue:null,handleBareValue:({value:C})=>{let O=t.resolve(null,["--spacing"]);return!O||!xe(C)?null:`calc(${O} * ${C})`},handleNegativeBareValue:({value:C})=>{let O=t.resolve(null,["--spacing"]);return!O||!xe(C)?null:`calc(${O} * -${C})`},handle:h}),i(o,()=>[{values:t.get(["--spacing"])?at:[],supportsNegative:A,supportsFractions:k,valueThemeKeys:p}])}e("sr-only",[["position","absolute"],["width","1px"],["height","1px"],["padding","0"],["margin","-1px"],["overflow","hidden"],["clip","rect(0, 0, 0, 0)"],["white-space","nowrap"],["border-width","0"]]),e("not-sr-only",[["position","static"],["width","auto"],["height","auto"],["padding","0"],["margin","0"],["overflow","visible"],["clip","auto"],["white-space","normal"]]),e("pointer-events-none",[["pointer-events","none"]]),e("pointer-events-auto",[["pointer-events","auto"]]),e("visible",[["visibility","visible"]]),e("invisible",[["visibility","hidden"]]),e("collapse",[["visibility","collapse"]]),e("static",[["position","static"]]),e("fixed",[["position","fixed"]]),e("absolute",[["position","absolute"]]),e("relative",[["position","relative"]]),e("sticky",[["position","sticky"]]);for(let[o,p]of[["inset","inset"],["inset-x","inset-inline"],["inset-y","inset-block"],["start","inset-inline-start"],["end","inset-inline-end"],["top","top"],["right","right"],["bottom","bottom"],["left","left"]])e(`${o}-auto`,[[p,"auto"]]),e(`${o}-full`,[[p,"100%"]]),e(`-${o}-full`,[[p,"-100%"]]),a(o,["--inset","--spacing"],h=>[l(p,h)],{supportsNegative:!0,supportsFractions:!0});e("isolate",[["isolation","isolate"]]),e("isolation-auto",[["isolation","auto"]]),e("z-auto",[["z-index","auto"]]),n("z",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--z-index"],handle:o=>[l("z-index",o)]}),i("z",()=>[{supportsNegative:!0,values:["0","10","20","30","40","50"],valueThemeKeys:["--z-index"]}]),e("order-first",[["order","-9999"]]),e("order-last",[["order","9999"]]),n("order",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--order"],handle:o=>[l("order",o)]}),i("order",()=>[{supportsNegative:!0,values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--order"]}]),e("col-auto",[["grid-column","auto"]]),n("col",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-column"],handle:o=>[l("grid-column",o)]}),e("col-span-full",[["grid-column","1 / -1"]]),n("col-span",{handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("grid-column",`span ${o} / span ${o}`)]}),e("col-start-auto",[["grid-column-start","auto"]]),n("col-start",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-column-start"],handle:o=>[l("grid-column-start",o)]}),e("col-end-auto",[["grid-column-end","auto"]]),n("col-end",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-column-end"],handle:o=>[l("grid-column-end",o)]}),i("col-span",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:[]}]),i("col-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-column-start"]}]),i("col-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-column-end"]}]),e("row-auto",[["grid-row","auto"]]),n("row",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-row"],handle:o=>[l("grid-row",o)]}),e("row-span-full",[["grid-row","1 / -1"]]),n("row-span",{themeKeys:[],handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("grid-row",`span ${o} / span ${o}`)]}),e("row-start-auto",[["grid-row-start","auto"]]),n("row-start",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-row-start"],handle:o=>[l("grid-row-start",o)]}),e("row-end-auto",[["grid-row-end","auto"]]),n("row-end",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-row-end"],handle:o=>[l("grid-row-end",o)]}),i("row-span",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:[]}]),i("row-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-row-start"]}]),i("row-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-row-end"]}]),e("float-start",[["float","inline-start"]]),e("float-end",[["float","inline-end"]]),e("float-right",[["float","right"]]),e("float-left",[["float","left"]]),e("float-none",[["float","none"]]),e("clear-start",[["clear","inline-start"]]),e("clear-end",[["clear","inline-end"]]),e("clear-right",[["clear","right"]]),e("clear-left",[["clear","left"]]),e("clear-both",[["clear","both"]]),e("clear-none",[["clear","none"]]);for(let[o,p]of[["m","margin"],["mx","margin-inline"],["my","margin-block"],["ms","margin-inline-start"],["me","margin-inline-end"],["mt","margin-top"],["mr","margin-right"],["mb","margin-bottom"],["ml","margin-left"]])e(`${o}-auto`,[[p,"auto"]]),a(o,["--margin","--spacing"],h=>[l(p,h)],{supportsNegative:!0});e("box-border",[["box-sizing","border-box"]]),e("box-content",[["box-sizing","content-box"]]),e("line-clamp-none",[["overflow","visible"],["display","block"],["-webkit-box-orient","horizontal"],["-webkit-line-clamp","unset"]]),n("line-clamp",{themeKeys:["--line-clamp"],handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("overflow","hidden"),l("display","-webkit-box"),l("-webkit-box-orient","vertical"),l("-webkit-line-clamp",o)]}),i("line-clamp",()=>[{values:["1","2","3","4","5","6"],valueThemeKeys:["--line-clamp"]}]),e("block",[["display","block"]]),e("inline-block",[["display","inline-block"]]),e("inline",[["display","inline"]]),e("hidden",[["display","none"]]),e("inline-flex",[["display","inline-flex"]]),e("table",[["display","table"]]),e("inline-table",[["display","inline-table"]]),e("table-caption",[["display","table-caption"]]),e("table-cell",[["display","table-cell"]]),e("table-column",[["display","table-column"]]),e("table-column-group",[["display","table-column-group"]]),e("table-footer-group",[["display","table-footer-group"]]),e("table-header-group",[["display","table-header-group"]]),e("table-row-group",[["display","table-row-group"]]),e("table-row",[["display","table-row"]]),e("flow-root",[["display","flow-root"]]),e("flex",[["display","flex"]]),e("grid",[["display","grid"]]),e("inline-grid",[["display","inline-grid"]]),e("contents",[["display","contents"]]),e("list-item",[["display","list-item"]]),e("field-sizing-content",[["field-sizing","content"]]),e("field-sizing-fixed",[["field-sizing","fixed"]]),e("aspect-auto",[["aspect-ratio","auto"]]),e("aspect-square",[["aspect-ratio","1 / 1"]]),n("aspect",{themeKeys:["--aspect"],handleBareValue:({fraction:o})=>{if(o===null)return null;let[p,h]=D(o,"/");return!T(p)||!T(h)?null:o},handle:o=>[l("aspect-ratio",o)]});for(let[o,p]of[["full","100%"],["svw","100svw"],["lvw","100lvw"],["dvw","100dvw"],["svh","100svh"],["lvh","100lvh"],["dvh","100dvh"],["min","min-content"],["max","max-content"],["fit","fit-content"]])e(`size-${o}`,[["--tw-sort","size"],["width",p],["height",p]]),e(`w-${o}`,[["width",p]]),e(`h-${o}`,[["height",p]]),e(`min-w-${o}`,[["min-width",p]]),e(`min-h-${o}`,[["min-height",p]]),e(`max-w-${o}`,[["max-width",p]]),e(`max-h-${o}`,[["max-height",p]]);e("size-auto",[["--tw-sort","size"],["width","auto"],["height","auto"]]),e("w-auto",[["width","auto"]]),e("h-auto",[["height","auto"]]),e("min-w-auto",[["min-width","auto"]]),e("min-h-auto",[["min-height","auto"]]),e("h-lh",[["height","1lh"]]),e("min-h-lh",[["min-height","1lh"]]),e("max-h-lh",[["max-height","1lh"]]),e("w-screen",[["width","100vw"]]),e("min-w-screen",[["min-width","100vw"]]),e("max-w-screen",[["max-width","100vw"]]),e("h-screen",[["height","100vh"]]),e("min-h-screen",[["min-height","100vh"]]),e("max-h-screen",[["max-height","100vh"]]),e("max-w-none",[["max-width","none"]]),e("max-h-none",[["max-height","none"]]),a("size",["--size","--spacing"],o=>[l("--tw-sort","size"),l("width",o),l("height",o)],{supportsFractions:!0});for(let[o,p,h]of[["w",["--width","--spacing","--container"],"width"],["min-w",["--min-width","--spacing","--container"],"min-width"],["max-w",["--max-width","--spacing","--container"],"max-width"],["h",["--height","--spacing"],"height"],["min-h",["--min-height","--height","--spacing"],"min-height"],["max-h",["--max-height","--height","--spacing"],"max-height"]])a(o,p,A=>[l(h,A)],{supportsFractions:!0});r.static("container",()=>{let o=[...t.namespace("--breakpoint").values()];o.sort((h,A)=>ye(h,A,"asc"));let p=[l("--tw-sort","--tw-container-component"),l("width","100%")];for(let h of o)p.push(F("@media",`(width >= ${h})`,[l("max-width",h)]));return p}),e("flex-auto",[["flex","auto"]]),e("flex-initial",[["flex","0 auto"]]),e("flex-none",[["flex","none"]]),r.functional("flex",o=>{if(o.value){if(o.value.kind==="arbitrary")return o.modifier?void 0:[l("flex",o.value.value)];if(o.value.fraction){let[p,h]=D(o.value.fraction,"/");return!T(p)||!T(h)?void 0:[l("flex",`calc(${o.value.fraction} * 100%)`)]}if(T(o.value.value))return o.modifier?void 0:[l("flex",o.value.value)]}}),i("flex",()=>[{supportsFractions:!0}]),n("shrink",{defaultValue:"1",handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("flex-shrink",o)]}),n("grow",{defaultValue:"1",handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("flex-grow",o)]}),i("shrink",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),i("grow",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),e("basis-auto",[["flex-basis","auto"]]),e("basis-full",[["flex-basis","100%"]]),a("basis",["--flex-basis","--spacing","--container"],o=>[l("flex-basis",o)],{supportsFractions:!0}),e("table-auto",[["table-layout","auto"]]),e("table-fixed",[["table-layout","fixed"]]),e("caption-top",[["caption-side","top"]]),e("caption-bottom",[["caption-side","bottom"]]),e("border-collapse",[["border-collapse","collapse"]]),e("border-separate",[["border-collapse","separate"]]);let f=()=>z([N("--tw-border-spacing-x","0",""),N("--tw-border-spacing-y","0","")]);a("border-spacing",["--border-spacing","--spacing"],o=>[f(),l("--tw-border-spacing-x",o),l("--tw-border-spacing-y",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),a("border-spacing-x",["--border-spacing","--spacing"],o=>[f(),l("--tw-border-spacing-x",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),a("border-spacing-y",["--border-spacing","--spacing"],o=>[f(),l("--tw-border-spacing-y",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),e("origin-center",[["transform-origin","center"]]),e("origin-top",[["transform-origin","top"]]),e("origin-top-right",[["transform-origin","top right"]]),e("origin-right",[["transform-origin","right"]]),e("origin-bottom-right",[["transform-origin","bottom right"]]),e("origin-bottom",[["transform-origin","bottom"]]),e("origin-bottom-left",[["transform-origin","bottom left"]]),e("origin-left",[["transform-origin","left"]]),e("origin-top-left",[["transform-origin","top left"]]),n("origin",{themeKeys:["--transform-origin"],handle:o=>[l("transform-origin",o)]}),e("perspective-origin-center",[["perspective-origin","center"]]),e("perspective-origin-top",[["perspective-origin","top"]]),e("perspective-origin-top-right",[["perspective-origin","top right"]]),e("perspective-origin-right",[["perspective-origin","right"]]),e("perspective-origin-bottom-right",[["perspective-origin","bottom right"]]),e("perspective-origin-bottom",[["perspective-origin","bottom"]]),e("perspective-origin-bottom-left",[["perspective-origin","bottom left"]]),e("perspective-origin-left",[["perspective-origin","left"]]),e("perspective-origin-top-left",[["perspective-origin","top left"]]),n("perspective-origin",{themeKeys:["--perspective-origin"],handle:o=>[l("perspective-origin",o)]}),e("perspective-none",[["perspective","none"]]),n("perspective",{themeKeys:["--perspective"],handle:o=>[l("perspective",o)]});let u=()=>z([N("--tw-translate-x","0"),N("--tw-translate-y","0"),N("--tw-translate-z","0")]);e("translate-none",[["translate","none"]]),e("-translate-full",[u,["--tw-translate-x","-100%"],["--tw-translate-y","-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e("translate-full",[u,["--tw-translate-x","100%"],["--tw-translate-y","100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),a("translate",["--translate","--spacing"],o=>[u(),l("--tw-translate-x",o),l("--tw-translate-y",o),l("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});for(let o of["x","y"])e(`-translate-${o}-full`,[u,[`--tw-translate-${o}`,"-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e(`translate-${o}-full`,[u,[`--tw-translate-${o}`,"100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),a(`translate-${o}`,["--translate","--spacing"],p=>[u(),l(`--tw-translate-${o}`,p),l("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});a("translate-z",["--translate","--spacing"],o=>[u(),l("--tw-translate-z",o),l("translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)")],{supportsNegative:!0}),e("translate-3d",[u,["translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)"]]);let c=()=>z([N("--tw-scale-x","1"),N("--tw-scale-y","1"),N("--tw-scale-z","1")]);e("scale-none",[["scale","none"]]);function d({negative:o}){return p=>{if(!p.value||p.modifier)return;let h;return p.value.kind==="arbitrary"?(h=p.value.value,h=o?`calc(${h} * -1)`:h,[l("scale",h)]):(h=t.resolve(p.value.value,["--scale"]),!h&&T(p.value.value)&&(h=`${p.value.value}%`),h?(h=o?`calc(${h} * -1)`:h,[c(),l("--tw-scale-x",h),l("--tw-scale-y",h),l("--tw-scale-z",h),l("scale","var(--tw-scale-x) var(--tw-scale-y)")]):void 0)}}r.functional("-scale",d({negative:!0})),r.functional("scale",d({negative:!1})),i("scale",()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);for(let o of["x","y","z"])n(`scale-${o}`,{supportsNegative:!0,themeKeys:["--scale"],handleBareValue:({value:p})=>T(p)?`${p}%`:null,handle:p=>[c(),l(`--tw-scale-${o}`,p),l("scale",`var(--tw-scale-x) var(--tw-scale-y)${o==="z"?" var(--tw-scale-z)":""}`)]}),i(`scale-${o}`,()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);e("scale-3d",[c,["scale","var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)"]]),e("rotate-none",[["rotate","none"]]);function m({negative:o}){return p=>{if(!p.value||p.modifier)return;let h;if(p.value.kind==="arbitrary"){h=p.value.value;let A=p.value.dataType??Y(h,["angle","vector"]);if(A==="vector")return[l("rotate",`${h} var(--tw-rotate)`)];if(A!=="angle")return[l("rotate",o?`calc(${h} * -1)`:h)]}else if(h=t.resolve(p.value.value,["--rotate"]),!h&&T(p.value.value)&&(h=`${p.value.value}deg`),!h)return;return[l("rotate",o?`calc(${h} * -1)`:h)]}}r.functional("-rotate",m({negative:!0})),r.functional("rotate",m({negative:!1})),i("rotate",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);{let o=["var(--tw-rotate-x,)","var(--tw-rotate-y,)","var(--tw-rotate-z,)","var(--tw-skew-x,)","var(--tw-skew-y,)"].join(" "),p=()=>z([N("--tw-rotate-x"),N("--tw-rotate-y"),N("--tw-rotate-z"),N("--tw-skew-x"),N("--tw-skew-y")]);for(let h of["x","y","z"])n(`rotate-${h}`,{supportsNegative:!0,themeKeys:["--rotate"],handleBareValue:({value:A})=>T(A)?`${A}deg`:null,handle:A=>[p(),l(`--tw-rotate-${h}`,`rotate${h.toUpperCase()}(${A})`),l("transform",o)]}),i(`rotate-${h}`,()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);n("skew",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>T(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-x",`skewX(${h})`),l("--tw-skew-y",`skewY(${h})`),l("transform",o)]}),n("skew-x",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>T(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-x",`skewX(${h})`),l("transform",o)]}),n("skew-y",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>T(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-y",`skewY(${h})`),l("transform",o)]}),i("skew",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-x",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-y",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),r.functional("transform",h=>{if(h.modifier)return;let A=null;if(h.value?h.value.kind==="arbitrary"&&(A=h.value.value):A=o,A!==null)return[p(),l("transform",A)]}),i("transform",()=>[{hasDefaultValue:!0}]),e("transform-cpu",[["transform",o]]),e("transform-gpu",[["transform",`translateZ(0) ${o}`]]),e("transform-none",[["transform","none"]])}e("transform-flat",[["transform-style","flat"]]),e("transform-3d",[["transform-style","preserve-3d"]]),e("transform-content",[["transform-box","content-box"]]),e("transform-border",[["transform-box","border-box"]]),e("transform-fill",[["transform-box","fill-box"]]),e("transform-stroke",[["transform-box","stroke-box"]]),e("transform-view",[["transform-box","view-box"]]),e("backface-visible",[["backface-visibility","visible"]]),e("backface-hidden",[["backface-visibility","hidden"]]);for(let o of["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out"])e(`cursor-${o}`,[["cursor",o]]);n("cursor",{themeKeys:["--cursor"],handle:o=>[l("cursor",o)]});for(let o of["auto","none","manipulation"])e(`touch-${o}`,[["touch-action",o]]);let g=()=>z([N("--tw-pan-x"),N("--tw-pan-y"),N("--tw-pinch-zoom")]);for(let o of["x","left","right"])e(`touch-pan-${o}`,[g,["--tw-pan-x",`pan-${o}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let o of["y","up","down"])e(`touch-pan-${o}`,[g,["--tw-pan-y",`pan-${o}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);e("touch-pinch-zoom",[g,["--tw-pinch-zoom","pinch-zoom"],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let o of["none","text","all","auto"])e(`select-${o}`,[["-webkit-user-select",o],["user-select",o]]);e("resize-none",[["resize","none"]]),e("resize-x",[["resize","horizontal"]]),e("resize-y",[["resize","vertical"]]),e("resize",[["resize","both"]]),e("snap-none",[["scroll-snap-type","none"]]);let w=()=>z([N("--tw-scroll-snap-strictness","proximity","*")]);for(let o of["x","y","both"])e(`snap-${o}`,[w,["scroll-snap-type",`${o} var(--tw-scroll-snap-strictness)`]]);e("snap-mandatory",[w,["--tw-scroll-snap-strictness","mandatory"]]),e("snap-proximity",[w,["--tw-scroll-snap-strictness","proximity"]]),e("snap-align-none",[["scroll-snap-align","none"]]),e("snap-start",[["scroll-snap-align","start"]]),e("snap-end",[["scroll-snap-align","end"]]),e("snap-center",[["scroll-snap-align","center"]]),e("snap-normal",[["scroll-snap-stop","normal"]]),e("snap-always",[["scroll-snap-stop","always"]]);for(let[o,p]of[["scroll-m","scroll-margin"],["scroll-mx","scroll-margin-inline"],["scroll-my","scroll-margin-block"],["scroll-ms","scroll-margin-inline-start"],["scroll-me","scroll-margin-inline-end"],["scroll-mt","scroll-margin-top"],["scroll-mr","scroll-margin-right"],["scroll-mb","scroll-margin-bottom"],["scroll-ml","scroll-margin-left"]])a(o,["--scroll-margin","--spacing"],h=>[l(p,h)],{supportsNegative:!0});for(let[o,p]of[["scroll-p","scroll-padding"],["scroll-px","scroll-padding-inline"],["scroll-py","scroll-padding-block"],["scroll-ps","scroll-padding-inline-start"],["scroll-pe","scroll-padding-inline-end"],["scroll-pt","scroll-padding-top"],["scroll-pr","scroll-padding-right"],["scroll-pb","scroll-padding-bottom"],["scroll-pl","scroll-padding-left"]])a(o,["--scroll-padding","--spacing"],h=>[l(p,h)]);e("list-inside",[["list-style-position","inside"]]),e("list-outside",[["list-style-position","outside"]]),e("list-none",[["list-style-type","none"]]),e("list-disc",[["list-style-type","disc"]]),e("list-decimal",[["list-style-type","decimal"]]),n("list",{themeKeys:["--list-style-type"],handle:o=>[l("list-style-type",o)]}),e("list-image-none",[["list-style-image","none"]]),n("list-image",{themeKeys:["--list-style-image"],handle:o=>[l("list-style-image",o)]}),e("appearance-none",[["appearance","none"]]),e("appearance-auto",[["appearance","auto"]]),e("scheme-normal",[["color-scheme","normal"]]),e("scheme-dark",[["color-scheme","dark"]]),e("scheme-light",[["color-scheme","light"]]),e("scheme-light-dark",[["color-scheme","light dark"]]),e("scheme-only-dark",[["color-scheme","only dark"]]),e("scheme-only-light",[["color-scheme","only light"]]),e("columns-auto",[["columns","auto"]]),n("columns",{themeKeys:["--columns","--container"],handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("columns",o)]}),i("columns",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--columns","--container"]}]);for(let o of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-before-${o}`,[["break-before",o]]);for(let o of["auto","avoid","avoid-page","avoid-column"])e(`break-inside-${o}`,[["break-inside",o]]);for(let o of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-after-${o}`,[["break-after",o]]);e("grid-flow-row",[["grid-auto-flow","row"]]),e("grid-flow-col",[["grid-auto-flow","column"]]),e("grid-flow-dense",[["grid-auto-flow","dense"]]),e("grid-flow-row-dense",[["grid-auto-flow","row dense"]]),e("grid-flow-col-dense",[["grid-auto-flow","column dense"]]),e("auto-cols-auto",[["grid-auto-columns","auto"]]),e("auto-cols-min",[["grid-auto-columns","min-content"]]),e("auto-cols-max",[["grid-auto-columns","max-content"]]),e("auto-cols-fr",[["grid-auto-columns","minmax(0, 1fr)"]]),n("auto-cols",{themeKeys:["--grid-auto-columns"],handle:o=>[l("grid-auto-columns",o)]}),e("auto-rows-auto",[["grid-auto-rows","auto"]]),e("auto-rows-min",[["grid-auto-rows","min-content"]]),e("auto-rows-max",[["grid-auto-rows","max-content"]]),e("auto-rows-fr",[["grid-auto-rows","minmax(0, 1fr)"]]),n("auto-rows",{themeKeys:["--grid-auto-rows"],handle:o=>[l("grid-auto-rows",o)]}),e("grid-cols-none",[["grid-template-columns","none"]]),e("grid-cols-subgrid",[["grid-template-columns","subgrid"]]),n("grid-cols",{themeKeys:["--grid-template-columns"],handleBareValue:({value:o})=>Pt(o)?`repeat(${o}, minmax(0, 1fr))`:null,handle:o=>[l("grid-template-columns",o)]}),e("grid-rows-none",[["grid-template-rows","none"]]),e("grid-rows-subgrid",[["grid-template-rows","subgrid"]]),n("grid-rows",{themeKeys:["--grid-template-rows"],handleBareValue:({value:o})=>Pt(o)?`repeat(${o}, minmax(0, 1fr))`:null,handle:o=>[l("grid-template-rows",o)]}),i("grid-cols",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-template-columns"]}]),i("grid-rows",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-template-rows"]}]),e("flex-row",[["flex-direction","row"]]),e("flex-row-reverse",[["flex-direction","row-reverse"]]),e("flex-col",[["flex-direction","column"]]),e("flex-col-reverse",[["flex-direction","column-reverse"]]),e("flex-wrap",[["flex-wrap","wrap"]]),e("flex-nowrap",[["flex-wrap","nowrap"]]),e("flex-wrap-reverse",[["flex-wrap","wrap-reverse"]]),e("place-content-center",[["place-content","center"]]),e("place-content-start",[["place-content","start"]]),e("place-content-end",[["place-content","end"]]),e("place-content-center-safe",[["place-content","safe center"]]),e("place-content-end-safe",[["place-content","safe end"]]),e("place-content-between",[["place-content","space-between"]]),e("place-content-around",[["place-content","space-around"]]),e("place-content-evenly",[["place-content","space-evenly"]]),e("place-content-baseline",[["place-content","baseline"]]),e("place-content-stretch",[["place-content","stretch"]]),e("place-items-center",[["place-items","center"]]),e("place-items-start",[["place-items","start"]]),e("place-items-end",[["place-items","end"]]),e("place-items-center-safe",[["place-items","safe center"]]),e("place-items-end-safe",[["place-items","safe end"]]),e("place-items-baseline",[["place-items","baseline"]]),e("place-items-stretch",[["place-items","stretch"]]),e("content-normal",[["align-content","normal"]]),e("content-center",[["align-content","center"]]),e("content-start",[["align-content","flex-start"]]),e("content-end",[["align-content","flex-end"]]),e("content-center-safe",[["align-content","safe center"]]),e("content-end-safe",[["align-content","safe flex-end"]]),e("content-between",[["align-content","space-between"]]),e("content-around",[["align-content","space-around"]]),e("content-evenly",[["align-content","space-evenly"]]),e("content-baseline",[["align-content","baseline"]]),e("content-stretch",[["align-content","stretch"]]),e("items-center",[["align-items","center"]]),e("items-start",[["align-items","flex-start"]]),e("items-end",[["align-items","flex-end"]]),e("items-center-safe",[["align-items","safe center"]]),e("items-end-safe",[["align-items","safe flex-end"]]),e("items-baseline",[["align-items","baseline"]]),e("items-baseline-last",[["align-items","last baseline"]]),e("items-stretch",[["align-items","stretch"]]),e("justify-normal",[["justify-content","normal"]]),e("justify-center",[["justify-content","center"]]),e("justify-start",[["justify-content","flex-start"]]),e("justify-end",[["justify-content","flex-end"]]),e("justify-center-safe",[["justify-content","safe center"]]),e("justify-end-safe",[["justify-content","safe flex-end"]]),e("justify-between",[["justify-content","space-between"]]),e("justify-around",[["justify-content","space-around"]]),e("justify-evenly",[["justify-content","space-evenly"]]),e("justify-baseline",[["justify-content","baseline"]]),e("justify-stretch",[["justify-content","stretch"]]),e("justify-items-normal",[["justify-items","normal"]]),e("justify-items-center",[["justify-items","center"]]),e("justify-items-start",[["justify-items","start"]]),e("justify-items-end",[["justify-items","end"]]),e("justify-items-center-safe",[["justify-items","safe center"]]),e("justify-items-end-safe",[["justify-items","safe end"]]),e("justify-items-stretch",[["justify-items","stretch"]]),a("gap",["--gap","--spacing"],o=>[l("gap",o)]),a("gap-x",["--gap","--spacing"],o=>[l("column-gap",o)]),a("gap-y",["--gap","--spacing"],o=>[l("row-gap",o)]),a("space-x",["--space","--spacing"],o=>[z([N("--tw-space-x-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","row-gap"),l("--tw-space-x-reverse","0"),l("margin-inline-start",`calc(${o} * var(--tw-space-x-reverse))`),l("margin-inline-end",`calc(${o} * calc(1 - var(--tw-space-x-reverse)))`)])],{supportsNegative:!0}),a("space-y",["--space","--spacing"],o=>[z([N("--tw-space-y-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","column-gap"),l("--tw-space-y-reverse","0"),l("margin-block-start",`calc(${o} * var(--tw-space-y-reverse))`),l("margin-block-end",`calc(${o} * calc(1 - var(--tw-space-y-reverse)))`)])],{supportsNegative:!0}),e("space-x-reverse",[()=>z([N("--tw-space-x-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-sort","row-gap"),l("--tw-space-x-reverse","1")])]),e("space-y-reverse",[()=>z([N("--tw-space-y-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-sort","column-gap"),l("--tw-space-y-reverse","1")])]),e("accent-auto",[["accent-color","auto"]]),s("accent",{themeKeys:["--accent-color","--color"],handle:o=>[l("accent-color",o)]}),s("caret",{themeKeys:["--caret-color","--color"],handle:o=>[l("caret-color",o)]}),s("divide",{themeKeys:["--divide-color","--color"],handle:o=>[M(":where(& > :not(:last-child))",[l("--tw-sort","divide-color"),l("border-color",o)])]}),e("place-self-auto",[["place-self","auto"]]),e("place-self-start",[["place-self","start"]]),e("place-self-end",[["place-self","end"]]),e("place-self-center",[["place-self","center"]]),e("place-self-end-safe",[["place-self","safe end"]]),e("place-self-center-safe",[["place-self","safe center"]]),e("place-self-stretch",[["place-self","stretch"]]),e("self-auto",[["align-self","auto"]]),e("self-start",[["align-self","flex-start"]]),e("self-end",[["align-self","flex-end"]]),e("self-center",[["align-self","center"]]),e("self-end-safe",[["align-self","safe flex-end"]]),e("self-center-safe",[["align-self","safe center"]]),e("self-stretch",[["align-self","stretch"]]),e("self-baseline",[["align-self","baseline"]]),e("self-baseline-last",[["align-self","last baseline"]]),e("justify-self-auto",[["justify-self","auto"]]),e("justify-self-start",[["justify-self","flex-start"]]),e("justify-self-end",[["justify-self","flex-end"]]),e("justify-self-center",[["justify-self","center"]]),e("justify-self-end-safe",[["justify-self","safe flex-end"]]),e("justify-self-center-safe",[["justify-self","safe center"]]),e("justify-self-stretch",[["justify-self","stretch"]]);for(let o of["auto","hidden","clip","visible","scroll"])e(`overflow-${o}`,[["overflow",o]]),e(`overflow-x-${o}`,[["overflow-x",o]]),e(`overflow-y-${o}`,[["overflow-y",o]]);for(let o of["auto","contain","none"])e(`overscroll-${o}`,[["overscroll-behavior",o]]),e(`overscroll-x-${o}`,[["overscroll-behavior-x",o]]),e(`overscroll-y-${o}`,[["overscroll-behavior-y",o]]);e("scroll-auto",[["scroll-behavior","auto"]]),e("scroll-smooth",[["scroll-behavior","smooth"]]),e("truncate",[["overflow","hidden"],["text-overflow","ellipsis"],["white-space","nowrap"]]),e("text-ellipsis",[["text-overflow","ellipsis"]]),e("text-clip",[["text-overflow","clip"]]),e("hyphens-none",[["-webkit-hyphens","none"],["hyphens","none"]]),e("hyphens-manual",[["-webkit-hyphens","manual"],["hyphens","manual"]]),e("hyphens-auto",[["-webkit-hyphens","auto"],["hyphens","auto"]]),e("whitespace-normal",[["white-space","normal"]]),e("whitespace-nowrap",[["white-space","nowrap"]]),e("whitespace-pre",[["white-space","pre"]]),e("whitespace-pre-line",[["white-space","pre-line"]]),e("whitespace-pre-wrap",[["white-space","pre-wrap"]]),e("whitespace-break-spaces",[["white-space","break-spaces"]]),e("text-wrap",[["text-wrap","wrap"]]),e("text-nowrap",[["text-wrap","nowrap"]]),e("text-balance",[["text-wrap","balance"]]),e("text-pretty",[["text-wrap","pretty"]]),e("break-normal",[["overflow-wrap","normal"],["word-break","normal"]]),e("break-words",[["overflow-wrap","break-word"]]),e("break-all",[["word-break","break-all"]]),e("break-keep",[["word-break","keep-all"]]),e("wrap-anywhere",[["overflow-wrap","anywhere"]]),e("wrap-break-word",[["overflow-wrap","break-word"]]),e("wrap-normal",[["overflow-wrap","normal"]]);for(let[o,p]of[["rounded",["border-radius"]],["rounded-s",["border-start-start-radius","border-end-start-radius"]],["rounded-e",["border-start-end-radius","border-end-end-radius"]],["rounded-t",["border-top-left-radius","border-top-right-radius"]],["rounded-r",["border-top-right-radius","border-bottom-right-radius"]],["rounded-b",["border-bottom-right-radius","border-bottom-left-radius"]],["rounded-l",["border-top-left-radius","border-bottom-left-radius"]],["rounded-ss",["border-start-start-radius"]],["rounded-se",["border-start-end-radius"]],["rounded-ee",["border-end-end-radius"]],["rounded-es",["border-end-start-radius"]],["rounded-tl",["border-top-left-radius"]],["rounded-tr",["border-top-right-radius"]],["rounded-br",["border-bottom-right-radius"]],["rounded-bl",["border-bottom-left-radius"]]])e(`${o}-none`,p.map(h=>[h,"0"])),e(`${o}-full`,p.map(h=>[h,"calc(infinity * 1px)"])),n(o,{themeKeys:["--radius"],handle:h=>p.map(A=>l(A,h))});e("border-solid",[["--tw-border-style","solid"],["border-style","solid"]]),e("border-dashed",[["--tw-border-style","dashed"],["border-style","dashed"]]),e("border-dotted",[["--tw-border-style","dotted"],["border-style","dotted"]]),e("border-double",[["--tw-border-style","double"],["border-style","double"]]),e("border-hidden",[["--tw-border-style","hidden"],["border-style","hidden"]]),e("border-none",[["--tw-border-style","none"],["border-style","none"]]);{let p=function(h,A){r.functional(h,k=>{if(!k.value){if(k.modifier)return;let C=t.get(["--default-border-width"])??"1px",O=A.width(C);return O?[o(),...O]:void 0}if(k.value.kind==="arbitrary"){let C=k.value.value;switch(k.value.dataType??Y(C,["color","line-width","length"])){case"line-width":case"length":{if(k.modifier)return;let $=A.width(C);return $?[o(),...$]:void 0}default:return C=X(C,k.modifier,t),C===null?void 0:A.color(C)}}{let C=te(k,t,["--border-color","--color"]);if(C)return A.color(C)}{if(k.modifier)return;let C=t.resolve(k.value.value,["--border-width"]);if(C){let O=A.width(C);return O?[o(),...O]:void 0}if(T(k.value.value)){let O=A.width(`${k.value.value}px`);return O?[o(),...O]:void 0}}}),i(h,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--border-color","--color"],modifiers:Array.from({length:21},(k,C)=>`${C*5}`),hasDefaultValue:!0},{values:["0","2","4","8"],valueThemeKeys:["--border-width"]}])};var _=p;let o=()=>z([N("--tw-border-style","solid")]);p("border",{width:h=>[l("border-style","var(--tw-border-style)"),l("border-width",h)],color:h=>[l("border-color",h)]}),p("border-x",{width:h=>[l("border-inline-style","var(--tw-border-style)"),l("border-inline-width",h)],color:h=>[l("border-inline-color",h)]}),p("border-y",{width:h=>[l("border-block-style","var(--tw-border-style)"),l("border-block-width",h)],color:h=>[l("border-block-color",h)]}),p("border-s",{width:h=>[l("border-inline-start-style","var(--tw-border-style)"),l("border-inline-start-width",h)],color:h=>[l("border-inline-start-color",h)]}),p("border-e",{width:h=>[l("border-inline-end-style","var(--tw-border-style)"),l("border-inline-end-width",h)],color:h=>[l("border-inline-end-color",h)]}),p("border-t",{width:h=>[l("border-top-style","var(--tw-border-style)"),l("border-top-width",h)],color:h=>[l("border-top-color",h)]}),p("border-r",{width:h=>[l("border-right-style","var(--tw-border-style)"),l("border-right-width",h)],color:h=>[l("border-right-color",h)]}),p("border-b",{width:h=>[l("border-bottom-style","var(--tw-border-style)"),l("border-bottom-width",h)],color:h=>[l("border-bottom-color",h)]}),p("border-l",{width:h=>[l("border-left-style","var(--tw-border-style)"),l("border-left-width",h)],color:h=>[l("border-left-color",h)]}),n("divide-x",{defaultValue:t.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:h})=>T(h)?`${h}px`:null,handle:h=>[z([N("--tw-divide-x-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","divide-x-width"),o(),l("--tw-divide-x-reverse","0"),l("border-inline-style","var(--tw-border-style)"),l("border-inline-start-width",`calc(${h} * var(--tw-divide-x-reverse))`),l("border-inline-end-width",`calc(${h} * calc(1 - var(--tw-divide-x-reverse)))`)])]}),n("divide-y",{defaultValue:t.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:h})=>T(h)?`${h}px`:null,handle:h=>[z([N("--tw-divide-y-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","divide-y-width"),o(),l("--tw-divide-y-reverse","0"),l("border-bottom-style","var(--tw-border-style)"),l("border-top-style","var(--tw-border-style)"),l("border-top-width",`calc(${h} * var(--tw-divide-y-reverse))`),l("border-bottom-width",`calc(${h} * calc(1 - var(--tw-divide-y-reverse)))`)])]}),i("divide-x",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),i("divide-y",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),e("divide-x-reverse",[()=>z([N("--tw-divide-x-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-divide-x-reverse","1")])]),e("divide-y-reverse",[()=>z([N("--tw-divide-y-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-divide-y-reverse","1")])]);for(let h of["solid","dashed","dotted","double","none"])e(`divide-${h}`,[()=>M(":where(& > :not(:last-child))",[l("--tw-sort","divide-style"),l("--tw-border-style",h),l("border-style",h)])])}e("bg-auto",[["background-size","auto"]]),e("bg-cover",[["background-size","cover"]]),e("bg-contain",[["background-size","contain"]]),n("bg-size",{handle(o){if(o)return[l("background-size",o)]}}),e("bg-fixed",[["background-attachment","fixed"]]),e("bg-local",[["background-attachment","local"]]),e("bg-scroll",[["background-attachment","scroll"]]),e("bg-top",[["background-position","top"]]),e("bg-top-left",[["background-position","left top"]]),e("bg-top-right",[["background-position","right top"]]),e("bg-bottom",[["background-position","bottom"]]),e("bg-bottom-left",[["background-position","left bottom"]]),e("bg-bottom-right",[["background-position","right bottom"]]),e("bg-left",[["background-position","left"]]),e("bg-right",[["background-position","right"]]),e("bg-center",[["background-position","center"]]),n("bg-position",{handle(o){if(o)return[l("background-position",o)]}}),e("bg-repeat",[["background-repeat","repeat"]]),e("bg-no-repeat",[["background-repeat","no-repeat"]]),e("bg-repeat-x",[["background-repeat","repeat-x"]]),e("bg-repeat-y",[["background-repeat","repeat-y"]]),e("bg-repeat-round",[["background-repeat","round"]]),e("bg-repeat-space",[["background-repeat","space"]]),e("bg-none",[["background-image","none"]]);{let h=function(C){let O="in oklab";if(C?.kind==="named")switch(C.value){case"longer":case"shorter":case"increasing":case"decreasing":O=`in oklch ${C.value} hue`;break;default:O=`in ${C.value}`}else C?.kind==="arbitrary"&&(O=C.value);return O},A=function({negative:C}){return O=>{if(!O.value)return;if(O.value.kind==="arbitrary"){if(O.modifier)return;let U=O.value.value;switch(O.value.dataType??Y(U,["angle"])){case"angle":return U=C?`calc(${U} * -1)`:`${U}`,[l("--tw-gradient-position",U),l("background-image",`linear-gradient(var(--tw-gradient-stops,${U}))`)];default:return C?void 0:[l("--tw-gradient-position",U),l("background-image",`linear-gradient(var(--tw-gradient-stops,${U}))`)]}}let $=O.value.value;if(!C&&p.has($))$=p.get($);else if(T($))$=C?`calc(${$}deg * -1)`:`${$}deg`;else return;let E=h(O.modifier);return[l("--tw-gradient-position",`${$}`),G("@supports (background-image: linear-gradient(in lab, red, red))",[l("--tw-gradient-position",`${$} ${E}`)]),l("background-image","linear-gradient(var(--tw-gradient-stops))")]}},k=function({negative:C}){return O=>{if(O.value?.kind==="arbitrary"){if(O.modifier)return;let U=O.value.value;return[l("--tw-gradient-position",U),l("background-image",`conic-gradient(var(--tw-gradient-stops,${U}))`)]}let $=h(O.modifier);if(!O.value)return[l("--tw-gradient-position",$),l("background-image","conic-gradient(var(--tw-gradient-stops))")];let E=O.value.value;if(T(E))return E=C?`calc(${E}deg * -1)`:`${E}deg`,[l("--tw-gradient-position",`from ${E} ${$}`),l("background-image","conic-gradient(var(--tw-gradient-stops))")]}};var H=h,j=A,W=k;let o=["oklab","oklch","srgb","hsl","longer","shorter","increasing","decreasing"],p=new Map([["to-t","to top"],["to-tr","to top right"],["to-r","to right"],["to-br","to bottom right"],["to-b","to bottom"],["to-bl","to bottom left"],["to-l","to left"],["to-tl","to top left"]]);r.functional("-bg-linear",A({negative:!0})),r.functional("bg-linear",A({negative:!1})),i("bg-linear",()=>[{values:[...p.keys()],modifiers:o},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:o}]),r.functional("-bg-conic",k({negative:!0})),r.functional("bg-conic",k({negative:!1})),i("bg-conic",()=>[{hasDefaultValue:!0,modifiers:o},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:o}]),r.functional("bg-radial",C=>{if(!C.value){let O=h(C.modifier);return[l("--tw-gradient-position",O),l("background-image","radial-gradient(var(--tw-gradient-stops))")]}if(C.value.kind==="arbitrary"){if(C.modifier)return;let O=C.value.value;return[l("--tw-gradient-position",O),l("background-image",`radial-gradient(var(--tw-gradient-stops,${O}))`)]}}),i("bg-radial",()=>[{hasDefaultValue:!0,modifiers:o}])}r.functional("bg",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??Y(p,["image","color","percentage","position","bg-size","length","url"])){case"percentage":case"position":return o.modifier?void 0:[l("background-position",p)];case"bg-size":case"length":case"size":return o.modifier?void 0:[l("background-size",p)];case"image":case"url":return o.modifier?void 0:[l("background-image",p)];default:return p=X(p,o.modifier,t),p===null?void 0:[l("background-color",p)]}}{let p=te(o,t,["--background-color","--color"]);if(p)return[l("background-color",p)]}{if(o.modifier)return;let p=t.resolve(o.value.value,["--background-image"]);if(p)return[l("background-image",p)]}}}),i("bg",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:[],valueThemeKeys:["--background-image"]}]);let v=()=>z([N("--tw-gradient-position"),N("--tw-gradient-from","#0000",""),N("--tw-gradient-via","#0000",""),N("--tw-gradient-to","#0000",""),N("--tw-gradient-stops"),N("--tw-gradient-via-stops"),N("--tw-gradient-from-position","0%",""),N("--tw-gradient-via-position","50%",""),N("--tw-gradient-to-position","100%","")]);function x(o,p){r.functional(o,h=>{if(h.value){if(h.value.kind==="arbitrary"){let A=h.value.value;switch(h.value.dataType??Y(A,["color","length","percentage"])){case"length":case"percentage":return h.modifier?void 0:p.position(A);default:return A=X(A,h.modifier,t),A===null?void 0:p.color(A)}}{let A=te(h,t,["--background-color","--color"]);if(A)return p.color(A)}{if(h.modifier)return;let A=t.resolve(h.value.value,["--gradient-color-stop-positions"]);if(A)return p.position(A);if(h.value.value[h.value.value.length-1]==="%"&&T(h.value.value.slice(0,-1)))return p.position(h.value.value)}}}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)},{values:Array.from({length:21},(h,A)=>`${A*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}])}x("from",{color:o=>[v(),l("--tw-sort","--tw-gradient-from"),l("--tw-gradient-from",o),l("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:o=>[v(),l("--tw-gradient-from-position",o)]}),e("via-none",[["--tw-gradient-via-stops","initial"]]),x("via",{color:o=>[v(),l("--tw-sort","--tw-gradient-via"),l("--tw-gradient-via",o),l("--tw-gradient-via-stops","var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position)"),l("--tw-gradient-stops","var(--tw-gradient-via-stops)")],position:o=>[v(),l("--tw-gradient-via-position",o)]}),x("to",{color:o=>[v(),l("--tw-sort","--tw-gradient-to"),l("--tw-gradient-to",o),l("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:o=>[v(),l("--tw-gradient-to-position",o)]}),e("mask-none",[["mask-image","none"]]),r.functional("mask",o=>{if(!o.value||o.modifier||o.value.kind!=="arbitrary")return;let p=o.value.value;switch(o.value.dataType??Y(p,["image","percentage","position","bg-size","length","url"])){case"percentage":case"position":return o.modifier?void 0:[l("mask-position",p)];case"bg-size":case"length":case"size":return[l("mask-size",p)];case"image":case"url":default:return[l("mask-image",p)]}}),e("mask-add",[["mask-composite","add"]]),e("mask-subtract",[["mask-composite","subtract"]]),e("mask-intersect",[["mask-composite","intersect"]]),e("mask-exclude",[["mask-composite","exclude"]]),e("mask-alpha",[["mask-mode","alpha"]]),e("mask-luminance",[["mask-mode","luminance"]]),e("mask-match",[["mask-mode","match-source"]]),e("mask-type-alpha",[["mask-type","alpha"]]),e("mask-type-luminance",[["mask-type","luminance"]]),e("mask-auto",[["mask-size","auto"]]),e("mask-cover",[["mask-size","cover"]]),e("mask-contain",[["mask-size","contain"]]),n("mask-size",{handle(o){if(o)return[l("mask-size",o)]}}),e("mask-top",[["mask-position","top"]]),e("mask-top-left",[["mask-position","left top"]]),e("mask-top-right",[["mask-position","right top"]]),e("mask-bottom",[["mask-position","bottom"]]),e("mask-bottom-left",[["mask-position","left bottom"]]),e("mask-bottom-right",[["mask-position","right bottom"]]),e("mask-left",[["mask-position","left"]]),e("mask-right",[["mask-position","right"]]),e("mask-center",[["mask-position","center"]]),n("mask-position",{handle(o){if(o)return[l("mask-position",o)]}}),e("mask-repeat",[["mask-repeat","repeat"]]),e("mask-no-repeat",[["mask-repeat","no-repeat"]]),e("mask-repeat-x",[["mask-repeat","repeat-x"]]),e("mask-repeat-y",[["mask-repeat","repeat-y"]]),e("mask-repeat-round",[["mask-repeat","round"]]),e("mask-repeat-space",[["mask-repeat","space"]]),e("mask-clip-border",[["mask-clip","border-box"]]),e("mask-clip-padding",[["mask-clip","padding-box"]]),e("mask-clip-content",[["mask-clip","content-box"]]),e("mask-clip-fill",[["mask-clip","fill-box"]]),e("mask-clip-stroke",[["mask-clip","stroke-box"]]),e("mask-clip-view",[["mask-clip","view-box"]]),e("mask-no-clip",[["mask-clip","no-clip"]]),e("mask-origin-border",[["mask-origin","border-box"]]),e("mask-origin-padding",[["mask-origin","padding-box"]]),e("mask-origin-content",[["mask-origin","content-box"]]),e("mask-origin-fill",[["mask-origin","fill-box"]]),e("mask-origin-stroke",[["mask-origin","stroke-box"]]),e("mask-origin-view",[["mask-origin","view-box"]]);let y=()=>z([N("--tw-mask-linear","linear-gradient(#fff, #fff)"),N("--tw-mask-radial","linear-gradient(#fff, #fff)"),N("--tw-mask-conic","linear-gradient(#fff, #fff)")]);function V(o,p){r.functional(o,h=>{if(h.value){if(h.value.kind==="arbitrary"){let A=h.value.value;switch(h.value.dataType??Y(A,["length","percentage","color"])){case"color":return A=X(A,h.modifier,t),A===null?void 0:p.color(A);case"percentage":return h.modifier||!T(A.slice(0,-1))?void 0:p.position(A);default:return h.modifier?void 0:p.position(A)}}{let A=te(h,t,["--background-color","--color"]);if(A)return p.color(A)}{if(h.modifier)return;let A=Y(h.value.value,["number","percentage"]);if(!A)return;switch(A){case"number":{let k=t.resolve(null,["--spacing"]);return!k||!xe(h.value.value)?void 0:p.position(`calc(${k} * ${h.value.value})`)}case"percentage":return T(h.value.value.slice(0,-1))?p.position(h.value.value):void 0;default:return}}}}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)},{values:Array.from({length:21},(h,A)=>`${A*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}]),i(o,()=>[{values:Array.from({length:21},(h,A)=>`${A*5}%`)},{values:t.get(["--spacing"])?at:[]},{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)}])}let b=()=>z([N("--tw-mask-left","linear-gradient(#fff, #fff)"),N("--tw-mask-right","linear-gradient(#fff, #fff)"),N("--tw-mask-bottom","linear-gradient(#fff, #fff)"),N("--tw-mask-top","linear-gradient(#fff, #fff)")]);function S(o,p,h){V(o,{color(A){let k=[y(),b(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])h[C]&&(k.push(l(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),k.push(z([N(`--tw-mask-${C}-from-position`,"0%"),N(`--tw-mask-${C}-to-position`,"100%"),N(`--tw-mask-${C}-from-color`,"black"),N(`--tw-mask-${C}-to-color`,"transparent")])),k.push(l(`--tw-mask-${C}-${p}-color`,A)));return k},position(A){let k=[y(),b(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])h[C]&&(k.push(l(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),k.push(z([N(`--tw-mask-${C}-from-position`,"0%"),N(`--tw-mask-${C}-to-position`,"100%"),N(`--tw-mask-${C}-from-color`,"black"),N(`--tw-mask-${C}-to-color`,"transparent")])),k.push(l(`--tw-mask-${C}-${p}-position`,A)));return k}})}S("mask-x-from","from",{top:!1,right:!0,bottom:!1,left:!0}),S("mask-x-to","to",{top:!1,right:!0,bottom:!1,left:!0}),S("mask-y-from","from",{top:!0,right:!1,bottom:!0,left:!1}),S("mask-y-to","to",{top:!0,right:!1,bottom:!0,left:!1}),S("mask-t-from","from",{top:!0,right:!1,bottom:!1,left:!1}),S("mask-t-to","to",{top:!0,right:!1,bottom:!1,left:!1}),S("mask-r-from","from",{top:!1,right:!0,bottom:!1,left:!1}),S("mask-r-to","to",{top:!1,right:!0,bottom:!1,left:!1}),S("mask-b-from","from",{top:!1,right:!1,bottom:!0,left:!1}),S("mask-b-to","to",{top:!1,right:!1,bottom:!0,left:!1}),S("mask-l-from","from",{top:!1,right:!1,bottom:!1,left:!0}),S("mask-l-to","to",{top:!1,right:!1,bottom:!1,left:!0});let R=()=>z([N("--tw-mask-linear-position","0deg"),N("--tw-mask-linear-from-position","0%"),N("--tw-mask-linear-to-position","100%"),N("--tw-mask-linear-from-color","black"),N("--tw-mask-linear-to-color","transparent")]);n("mask-linear",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(o){return T(o.value)?`calc(1deg * ${o.value})`:null},handleNegativeBareValue(o){return T(o.value)?`calc(1deg * -${o.value})`:null},handle:o=>[y(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops, var(--tw-mask-linear-position)))"),l("--tw-mask-linear-position",o)]}),i("mask-linear",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),V("mask-linear-from",{color:o=>[y(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-from-color",o)],position:o=>[y(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-from-position",o)]}),V("mask-linear-to",{color:o=>[y(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-to-color",o)],position:o=>[y(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-to-position",o)]});let L=()=>z([N("--tw-mask-radial-from-position","0%"),N("--tw-mask-radial-to-position","100%"),N("--tw-mask-radial-from-color","black"),N("--tw-mask-radial-to-color","transparent"),N("--tw-mask-radial-shape","ellipse"),N("--tw-mask-radial-size","farthest-corner"),N("--tw-mask-radial-position","center")]);e("mask-circle",[["--tw-mask-radial-shape","circle"]]),e("mask-ellipse",[["--tw-mask-radial-shape","ellipse"]]),e("mask-radial-closest-side",[["--tw-mask-radial-size","closest-side"]]),e("mask-radial-farthest-side",[["--tw-mask-radial-size","farthest-side"]]),e("mask-radial-closest-corner",[["--tw-mask-radial-size","closest-corner"]]),e("mask-radial-farthest-corner",[["--tw-mask-radial-size","farthest-corner"]]),e("mask-radial-at-top",[["--tw-mask-radial-position","top"]]),e("mask-radial-at-top-left",[["--tw-mask-radial-position","top left"]]),e("mask-radial-at-top-right",[["--tw-mask-radial-position","top right"]]),e("mask-radial-at-bottom",[["--tw-mask-radial-position","bottom"]]),e("mask-radial-at-bottom-left",[["--tw-mask-radial-position","bottom left"]]),e("mask-radial-at-bottom-right",[["--tw-mask-radial-position","bottom right"]]),e("mask-radial-at-left",[["--tw-mask-radial-position","left"]]),e("mask-radial-at-right",[["--tw-mask-radial-position","right"]]),e("mask-radial-at-center",[["--tw-mask-radial-position","center"]]),n("mask-radial-at",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:o=>[l("--tw-mask-radial-position",o)]}),n("mask-radial",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:o=>[y(),L(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops, var(--tw-mask-radial-size)))"),l("--tw-mask-radial-size",o)]}),V("mask-radial-from",{color:o=>[y(),L(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-from-color",o)],position:o=>[y(),L(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-from-position",o)]}),V("mask-radial-to",{color:o=>[y(),L(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-to-color",o)],position:o=>[y(),L(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-to-position",o)]});let P=()=>z([N("--tw-mask-conic-position","0deg"),N("--tw-mask-conic-from-position","0%"),N("--tw-mask-conic-to-position","100%"),N("--tw-mask-conic-from-color","black"),N("--tw-mask-conic-to-color","transparent")]);n("mask-conic",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(o){return T(o.value)?`calc(1deg * ${o.value})`:null},handleNegativeBareValue(o){return T(o.value)?`calc(1deg * -${o.value})`:null},handle:o=>[y(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops, var(--tw-mask-conic-position)))"),l("--tw-mask-conic-position",o)]}),i("mask-conic",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),V("mask-conic-from",{color:o=>[y(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-from-color",o)],position:o=>[y(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-from-position",o)]}),V("mask-conic-to",{color:o=>[y(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-to-color",o)],position:o=>[y(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-to-position",o)]}),e("box-decoration-slice",[["-webkit-box-decoration-break","slice"],["box-decoration-break","slice"]]),e("box-decoration-clone",[["-webkit-box-decoration-break","clone"],["box-decoration-break","clone"]]),e("bg-clip-text",[["background-clip","text"]]),e("bg-clip-border",[["background-clip","border-box"]]),e("bg-clip-padding",[["background-clip","padding-box"]]),e("bg-clip-content",[["background-clip","content-box"]]),e("bg-origin-border",[["background-origin","border-box"]]),e("bg-origin-padding",[["background-origin","padding-box"]]),e("bg-origin-content",[["background-origin","content-box"]]);for(let o of["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"])e(`bg-blend-${o}`,[["background-blend-mode",o]]),e(`mix-blend-${o}`,[["mix-blend-mode",o]]);e("mix-blend-plus-darker",[["mix-blend-mode","plus-darker"]]),e("mix-blend-plus-lighter",[["mix-blend-mode","plus-lighter"]]),e("fill-none",[["fill","none"]]),r.functional("fill",o=>{if(!o.value)return;if(o.value.kind==="arbitrary"){let h=X(o.value.value,o.modifier,t);return h===null?void 0:[l("fill",h)]}let p=te(o,t,["--fill","--color"]);if(p)return[l("fill",p)]}),i("fill",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--fill","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)}]),e("stroke-none",[["stroke","none"]]),r.functional("stroke",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??Y(p,["color","number","length","percentage"])){case"number":case"length":case"percentage":return o.modifier?void 0:[l("stroke-width",p)];default:return p=X(o.value.value,o.modifier,t),p===null?void 0:[l("stroke",p)]}}{let p=te(o,t,["--stroke","--color"]);if(p)return[l("stroke",p)]}{let p=t.resolve(o.value.value,["--stroke-width"]);if(p)return[l("stroke-width",p)];if(T(o.value.value))return[l("stroke-width",o.value.value)]}}}),i("stroke",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--stroke","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2","3"],valueThemeKeys:["--stroke-width"]}]),e("object-contain",[["object-fit","contain"]]),e("object-cover",[["object-fit","cover"]]),e("object-fill",[["object-fit","fill"]]),e("object-none",[["object-fit","none"]]),e("object-scale-down",[["object-fit","scale-down"]]),e("object-top",[["object-position","top"]]),e("object-top-left",[["object-position","left top"]]),e("object-top-right",[["object-position","right top"]]),e("object-bottom",[["object-position","bottom"]]),e("object-bottom-left",[["object-position","left bottom"]]),e("object-bottom-right",[["object-position","right bottom"]]),e("object-left",[["object-position","left"]]),e("object-right",[["object-position","right"]]),e("object-center",[["object-position","center"]]),n("object",{themeKeys:["--object-position"],handle:o=>[l("object-position",o)]});for(let[o,p]of[["p","padding"],["px","padding-inline"],["py","padding-block"],["ps","padding-inline-start"],["pe","padding-inline-end"],["pt","padding-top"],["pr","padding-right"],["pb","padding-bottom"],["pl","padding-left"]])a(o,["--padding","--spacing"],h=>[l(p,h)]);e("text-left",[["text-align","left"]]),e("text-center",[["text-align","center"]]),e("text-right",[["text-align","right"]]),e("text-justify",[["text-align","justify"]]),e("text-start",[["text-align","start"]]),e("text-end",[["text-align","end"]]),a("indent",["--text-indent","--spacing"],o=>[l("text-indent",o)],{supportsNegative:!0}),e("align-baseline",[["vertical-align","baseline"]]),e("align-top",[["vertical-align","top"]]),e("align-middle",[["vertical-align","middle"]]),e("align-bottom",[["vertical-align","bottom"]]),e("align-text-top",[["vertical-align","text-top"]]),e("align-text-bottom",[["vertical-align","text-bottom"]]),e("align-sub",[["vertical-align","sub"]]),e("align-super",[["vertical-align","super"]]),n("align",{themeKeys:[],handle:o=>[l("vertical-align",o)]}),r.functional("font",o=>{if(!(!o.value||o.modifier)){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??Y(p,["number","generic-name","family-name"])){case"generic-name":case"family-name":return[l("font-family",p)];default:return[z([N("--tw-font-weight")]),l("--tw-font-weight",p),l("font-weight",p)]}}{let p=t.resolveWith(o.value.value,["--font"],["--font-feature-settings","--font-variation-settings"]);if(p){let[h,A={}]=p;return[l("font-family",h),l("font-feature-settings",A["--font-feature-settings"]),l("font-variation-settings",A["--font-variation-settings"])]}}{let p=t.resolve(o.value.value,["--font-weight"]);if(p)return[z([N("--tw-font-weight")]),l("--tw-font-weight",p),l("font-weight",p)]}}}),i("font",()=>[{values:[],valueThemeKeys:["--font"]},{values:[],valueThemeKeys:["--font-weight"]}]),e("uppercase",[["text-transform","uppercase"]]),e("lowercase",[["text-transform","lowercase"]]),e("capitalize",[["text-transform","capitalize"]]),e("normal-case",[["text-transform","none"]]),e("italic",[["font-style","italic"]]),e("not-italic",[["font-style","normal"]]),e("underline",[["text-decoration-line","underline"]]),e("overline",[["text-decoration-line","overline"]]),e("line-through",[["text-decoration-line","line-through"]]),e("no-underline",[["text-decoration-line","none"]]),e("font-stretch-normal",[["font-stretch","normal"]]),e("font-stretch-ultra-condensed",[["font-stretch","ultra-condensed"]]),e("font-stretch-extra-condensed",[["font-stretch","extra-condensed"]]),e("font-stretch-condensed",[["font-stretch","condensed"]]),e("font-stretch-semi-condensed",[["font-stretch","semi-condensed"]]),e("font-stretch-semi-expanded",[["font-stretch","semi-expanded"]]),e("font-stretch-expanded",[["font-stretch","expanded"]]),e("font-stretch-extra-expanded",[["font-stretch","extra-expanded"]]),e("font-stretch-ultra-expanded",[["font-stretch","ultra-expanded"]]),n("font-stretch",{handleBareValue:({value:o})=>{if(!o.endsWith("%"))return null;let p=Number(o.slice(0,-1));return!T(p)||Number.isNaN(p)||p<50||p>200?null:o},handle:o=>[l("font-stretch",o)]}),i("font-stretch",()=>[{values:["50%","75%","90%","95%","100%","105%","110%","125%","150%","200%"]}]),s("placeholder",{themeKeys:["--background-color","--color"],handle:o=>[M("&::placeholder",[l("--tw-sort","placeholder-color"),l("color",o)])]}),e("decoration-solid",[["text-decoration-style","solid"]]),e("decoration-double",[["text-decoration-style","double"]]),e("decoration-dotted",[["text-decoration-style","dotted"]]),e("decoration-dashed",[["text-decoration-style","dashed"]]),e("decoration-wavy",[["text-decoration-style","wavy"]]),e("decoration-auto",[["text-decoration-thickness","auto"]]),e("decoration-from-font",[["text-decoration-thickness","from-font"]]),r.functional("decoration",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??Y(p,["color","length","percentage"])){case"length":case"percentage":return o.modifier?void 0:[l("text-decoration-thickness",p)];default:return p=X(p,o.modifier,t),p===null?void 0:[l("text-decoration-color",p)]}}{let p=t.resolve(o.value.value,["--text-decoration-thickness"]);if(p)return o.modifier?void 0:[l("text-decoration-thickness",p)];if(T(o.value.value))return o.modifier?void 0:[l("text-decoration-thickness",`${o.value.value}px`)]}{let p=te(o,t,["--text-decoration-color","--color"]);if(p)return[l("text-decoration-color",p)]}}}),i("decoration",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-decoration-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2"],valueThemeKeys:["--text-decoration-thickness"]}]),e("animate-none",[["animation","none"]]),n("animate",{themeKeys:["--animate"],handle:o=>[l("animation",o)]});{let o=["var(--tw-blur,)","var(--tw-brightness,)","var(--tw-contrast,)","var(--tw-grayscale,)","var(--tw-hue-rotate,)","var(--tw-invert,)","var(--tw-saturate,)","var(--tw-sepia,)","var(--tw-drop-shadow,)"].join(" "),p=["var(--tw-backdrop-blur,)","var(--tw-backdrop-brightness,)","var(--tw-backdrop-contrast,)","var(--tw-backdrop-grayscale,)","var(--tw-backdrop-hue-rotate,)","var(--tw-backdrop-invert,)","var(--tw-backdrop-opacity,)","var(--tw-backdrop-saturate,)","var(--tw-backdrop-sepia,)"].join(" "),h=()=>z([N("--tw-blur"),N("--tw-brightness"),N("--tw-contrast"),N("--tw-grayscale"),N("--tw-hue-rotate"),N("--tw-invert"),N("--tw-opacity"),N("--tw-saturate"),N("--tw-sepia"),N("--tw-drop-shadow"),N("--tw-drop-shadow-color"),N("--tw-drop-shadow-alpha","100%",""),N("--tw-drop-shadow-size")]),A=()=>z([N("--tw-backdrop-blur"),N("--tw-backdrop-brightness"),N("--tw-backdrop-contrast"),N("--tw-backdrop-grayscale"),N("--tw-backdrop-hue-rotate"),N("--tw-backdrop-invert"),N("--tw-backdrop-opacity"),N("--tw-backdrop-saturate"),N("--tw-backdrop-sepia")]);r.functional("filter",k=>{if(!k.modifier){if(k.value===null)return[h(),l("filter",o)];if(k.value.kind==="arbitrary")return[l("filter",k.value.value)];switch(k.value.value){case"none":return[l("filter","none")]}}}),r.functional("backdrop-filter",k=>{if(!k.modifier){if(k.value===null)return[A(),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)];if(k.value.kind==="arbitrary")return[l("-webkit-backdrop-filter",k.value.value),l("backdrop-filter",k.value.value)];switch(k.value.value){case"none":return[l("-webkit-backdrop-filter","none"),l("backdrop-filter","none")]}}}),n("blur",{themeKeys:["--blur"],handle:k=>[h(),l("--tw-blur",`blur(${k})`),l("filter",o)]}),e("blur-none",[h,["--tw-blur"," "],["filter",o]]),n("backdrop-blur",{themeKeys:["--backdrop-blur","--blur"],handle:k=>[A(),l("--tw-backdrop-blur",`blur(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),e("backdrop-blur-none",[A,["--tw-backdrop-blur"," "],["-webkit-backdrop-filter",p],["backdrop-filter",p]]),n("brightness",{themeKeys:["--brightness"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[h(),l("--tw-brightness",`brightness(${k})`),l("filter",o)]}),n("backdrop-brightness",{themeKeys:["--backdrop-brightness","--brightness"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[A(),l("--tw-backdrop-brightness",`brightness(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--brightness"]}]),i("backdrop-brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--backdrop-brightness","--brightness"]}]),n("contrast",{themeKeys:["--contrast"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[h(),l("--tw-contrast",`contrast(${k})`),l("filter",o)]}),n("backdrop-contrast",{themeKeys:["--backdrop-contrast","--contrast"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[A(),l("--tw-backdrop-contrast",`contrast(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--contrast"]}]),i("backdrop-contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--backdrop-contrast","--contrast"]}]),n("grayscale",{themeKeys:["--grayscale"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[h(),l("--tw-grayscale",`grayscale(${k})`),l("filter",o)]}),n("backdrop-grayscale",{themeKeys:["--backdrop-grayscale","--grayscale"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[A(),l("--tw-backdrop-grayscale",`grayscale(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--grayscale"],hasDefaultValue:!0}]),i("backdrop-grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-grayscale","--grayscale"],hasDefaultValue:!0}]),n("hue-rotate",{supportsNegative:!0,themeKeys:["--hue-rotate"],handleBareValue:({value:k})=>T(k)?`${k}deg`:null,handle:k=>[h(),l("--tw-hue-rotate",`hue-rotate(${k})`),l("filter",o)]}),n("backdrop-hue-rotate",{supportsNegative:!0,themeKeys:["--backdrop-hue-rotate","--hue-rotate"],handleBareValue:({value:k})=>T(k)?`${k}deg`:null,handle:k=>[A(),l("--tw-backdrop-hue-rotate",`hue-rotate(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--hue-rotate"]}]),i("backdrop-hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--backdrop-hue-rotate","--hue-rotate"]}]),n("invert",{themeKeys:["--invert"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[h(),l("--tw-invert",`invert(${k})`),l("filter",o)]}),n("backdrop-invert",{themeKeys:["--backdrop-invert","--invert"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[A(),l("--tw-backdrop-invert",`invert(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--invert"],hasDefaultValue:!0}]),i("backdrop-invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-invert","--invert"],hasDefaultValue:!0}]),n("saturate",{themeKeys:["--saturate"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[h(),l("--tw-saturate",`saturate(${k})`),l("filter",o)]}),n("backdrop-saturate",{themeKeys:["--backdrop-saturate","--saturate"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[A(),l("--tw-backdrop-saturate",`saturate(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--saturate"]}]),i("backdrop-saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--backdrop-saturate","--saturate"]}]),n("sepia",{themeKeys:["--sepia"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[h(),l("--tw-sepia",`sepia(${k})`),l("filter",o)]}),n("backdrop-sepia",{themeKeys:["--backdrop-sepia","--sepia"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[A(),l("--tw-backdrop-sepia",`sepia(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--sepia"],hasDefaultValue:!0}]),i("backdrop-sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--backdrop-sepia","--sepia"],hasDefaultValue:!0}]),e("drop-shadow-none",[h,["--tw-drop-shadow"," "],["filter",o]]),r.functional("drop-shadow",k=>{let C;if(k.modifier&&(k.modifier.kind==="arbitrary"?C=k.modifier.value:T(k.modifier.value)&&(C=`${k.modifier.value}%`)),!k.value){let O=t.get(["--drop-shadow"]),$=t.resolve(null,["--drop-shadow"]);return O===null||$===null?void 0:[h(),l("--tw-drop-shadow-alpha",C),...lt("--tw-drop-shadow-size",O,C,E=>`var(--tw-drop-shadow-color, ${E})`),l("--tw-drop-shadow",D($,",").map(E=>`drop-shadow(${E})`).join(" ")),l("filter",o)]}if(k.value.kind==="arbitrary"){let O=k.value.value;switch(k.value.dataType??Y(O,["color"])){case"color":return O=X(O,k.modifier,t),O===null?void 0:[h(),l("--tw-drop-shadow-color",Q(O,"var(--tw-drop-shadow-alpha)")),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")];default:return k.modifier&&!C?void 0:[h(),l("--tw-drop-shadow-alpha",C),...lt("--tw-drop-shadow-size",O,C,E=>`var(--tw-drop-shadow-color, ${E})`),l("--tw-drop-shadow","var(--tw-drop-shadow-size)"),l("filter",o)]}}{let O=t.get([`--drop-shadow-${k.value.value}`]),$=t.resolve(k.value.value,["--drop-shadow"]);if(O&&$)return k.modifier&&!C?void 0:C?[h(),l("--tw-drop-shadow-alpha",C),...lt("--tw-drop-shadow-size",O,C,E=>`var(--tw-drop-shadow-color, ${E})`),l("--tw-drop-shadow","var(--tw-drop-shadow-size)"),l("filter",o)]:[h(),l("--tw-drop-shadow-alpha",C),...lt("--tw-drop-shadow-size",O,C,E=>`var(--tw-drop-shadow-color, ${E})`),l("--tw-drop-shadow",D($,",").map(E=>`drop-shadow(${E})`).join(" ")),l("filter",o)]}{let O=te(k,t,["--drop-shadow-color","--color"]);if(O)return O==="inherit"?[h(),l("--tw-drop-shadow-color","inherit"),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")]:[h(),l("--tw-drop-shadow-color",Q(O,"var(--tw-drop-shadow-alpha)")),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")]}}),i("drop-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--drop-shadow-color","--color"],modifiers:Array.from({length:21},(k,C)=>`${C*5}`)},{valueThemeKeys:["--drop-shadow"]}]),n("backdrop-opacity",{themeKeys:["--backdrop-opacity","--opacity"],handleBareValue:({value:k})=>ot(k)?`${k}%`:null,handle:k=>[A(),l("--tw-backdrop-opacity",`opacity(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("backdrop-opacity",()=>[{values:Array.from({length:21},(k,C)=>`${C*5}`),valueThemeKeys:["--backdrop-opacity","--opacity"]}])}{let o=`var(--tw-ease, ${t.resolve(null,["--default-transition-timing-function"])??"ease"})`,p=`var(--tw-duration, ${t.resolve(null,["--default-transition-duration"])??"0s"})`;e("transition-none",[["transition-property","none"]]),e("transition-all",[["transition-property","all"],["transition-timing-function",o],["transition-duration",p]]),e("transition-colors",[["transition-property","color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to"],["transition-timing-function",o],["transition-duration",p]]),e("transition-opacity",[["transition-property","opacity"],["transition-timing-function",o],["transition-duration",p]]),e("transition-shadow",[["transition-property","box-shadow"],["transition-timing-function",o],["transition-duration",p]]),e("transition-transform",[["transition-property","transform, translate, scale, rotate"],["transition-timing-function",o],["transition-duration",p]]),n("transition",{defaultValue:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events",themeKeys:["--transition-property"],handle:h=>[l("transition-property",h),l("transition-timing-function",o),l("transition-duration",p)]}),e("transition-discrete",[["transition-behavior","allow-discrete"]]),e("transition-normal",[["transition-behavior","normal"]]),n("delay",{handleBareValue:({value:h})=>T(h)?`${h}ms`:null,themeKeys:["--transition-delay"],handle:h=>[l("transition-delay",h)]});{let h=()=>z([N("--tw-duration")]);e("duration-initial",[h,["--tw-duration","initial"]]),r.functional("duration",A=>{if(A.modifier||!A.value)return;let k=null;if(A.value.kind==="arbitrary"?k=A.value.value:(k=t.resolve(A.value.fraction??A.value.value,["--transition-duration"]),k===null&&T(A.value.value)&&(k=`${A.value.value}ms`)),k!==null)return[h(),l("--tw-duration",k),l("transition-duration",k)]})}i("delay",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-delay"]}]),i("duration",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-duration"]}])}{let o=()=>z([N("--tw-ease")]);e("ease-initial",[o,["--tw-ease","initial"]]),e("ease-linear",[o,["--tw-ease","linear"],["transition-timing-function","linear"]]),n("ease",{themeKeys:["--ease"],handle:p=>[o(),l("--tw-ease",p),l("transition-timing-function",p)]})}e("will-change-auto",[["will-change","auto"]]),e("will-change-scroll",[["will-change","scroll-position"]]),e("will-change-contents",[["will-change","contents"]]),e("will-change-transform",[["will-change","transform"]]),n("will-change",{themeKeys:[],handle:o=>[l("will-change",o)]}),e("content-none",[["--tw-content","none"],["content","none"]]),n("content",{themeKeys:[],handle:o=>[z([N("--tw-content",'""')]),l("--tw-content",o),l("content","var(--tw-content)")]});{let o="var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)",p=()=>z([N("--tw-contain-size"),N("--tw-contain-layout"),N("--tw-contain-paint"),N("--tw-contain-style")]);e("contain-none",[["contain","none"]]),e("contain-content",[["contain","content"]]),e("contain-strict",[["contain","strict"]]),e("contain-size",[p,["--tw-contain-size","size"],["contain",o]]),e("contain-inline-size",[p,["--tw-contain-size","inline-size"],["contain",o]]),e("contain-layout",[p,["--tw-contain-layout","layout"],["contain",o]]),e("contain-paint",[p,["--tw-contain-paint","paint"],["contain",o]]),e("contain-style",[p,["--tw-contain-style","style"],["contain",o]]),n("contain",{themeKeys:[],handle:h=>[l("contain",h)]})}e("forced-color-adjust-none",[["forced-color-adjust","none"]]),e("forced-color-adjust-auto",[["forced-color-adjust","auto"]]),e("leading-none",[()=>z([N("--tw-leading")]),["--tw-leading","1"],["line-height","1"]]),a("leading",["--leading","--spacing"],o=>[z([N("--tw-leading")]),l("--tw-leading",o),l("line-height",o)]),n("tracking",{supportsNegative:!0,themeKeys:["--tracking"],handle:o=>[z([N("--tw-tracking")]),l("--tw-tracking",o),l("letter-spacing",o)]}),e("antialiased",[["-webkit-font-smoothing","antialiased"],["-moz-osx-font-smoothing","grayscale"]]),e("subpixel-antialiased",[["-webkit-font-smoothing","auto"],["-moz-osx-font-smoothing","auto"]]);{let o="var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)",p=()=>z([N("--tw-ordinal"),N("--tw-slashed-zero"),N("--tw-numeric-figure"),N("--tw-numeric-spacing"),N("--tw-numeric-fraction")]);e("normal-nums",[["font-variant-numeric","normal"]]),e("ordinal",[p,["--tw-ordinal","ordinal"],["font-variant-numeric",o]]),e("slashed-zero",[p,["--tw-slashed-zero","slashed-zero"],["font-variant-numeric",o]]),e("lining-nums",[p,["--tw-numeric-figure","lining-nums"],["font-variant-numeric",o]]),e("oldstyle-nums",[p,["--tw-numeric-figure","oldstyle-nums"],["font-variant-numeric",o]]),e("proportional-nums",[p,["--tw-numeric-spacing","proportional-nums"],["font-variant-numeric",o]]),e("tabular-nums",[p,["--tw-numeric-spacing","tabular-nums"],["font-variant-numeric",o]]),e("diagonal-fractions",[p,["--tw-numeric-fraction","diagonal-fractions"],["font-variant-numeric",o]]),e("stacked-fractions",[p,["--tw-numeric-fraction","stacked-fractions"],["font-variant-numeric",o]])}{let o=()=>z([N("--tw-outline-style","solid")]);r.static("outline-hidden",()=>[l("--tw-outline-style","none"),l("outline-style","none"),F("@media","(forced-colors: active)",[l("outline","2px solid transparent"),l("outline-offset","2px")])]),e("outline-none",[["--tw-outline-style","none"],["outline-style","none"]]),e("outline-solid",[["--tw-outline-style","solid"],["outline-style","solid"]]),e("outline-dashed",[["--tw-outline-style","dashed"],["outline-style","dashed"]]),e("outline-dotted",[["--tw-outline-style","dotted"],["outline-style","dotted"]]),e("outline-double",[["--tw-outline-style","double"],["outline-style","double"]]),r.functional("outline",p=>{if(p.value===null){if(p.modifier)return;let h=t.get(["--default-outline-width"])??"1px";return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)]}if(p.value.kind==="arbitrary"){let h=p.value.value;switch(p.value.dataType??Y(h,["color","length","number","percentage"])){case"length":case"number":case"percentage":return p.modifier?void 0:[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)];default:return h=X(h,p.modifier,t),h===null?void 0:[l("outline-color",h)]}}{let h=te(p,t,["--outline-color","--color"]);if(h)return[l("outline-color",h)]}{if(p.modifier)return;let h=t.resolve(p.value.value,["--outline-width"]);if(h)return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)];if(T(p.value.value))return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",`${p.value.value}px`)]}}),i("outline",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--outline-color","--color"],modifiers:Array.from({length:21},(p,h)=>`${h*5}`),hasDefaultValue:!0},{values:["0","1","2","4","8"],valueThemeKeys:["--outline-width"]}]),n("outline-offset",{supportsNegative:!0,themeKeys:["--outline-offset"],handleBareValue:({value:p})=>T(p)?`${p}px`:null,handle:p=>[l("outline-offset",p)]}),i("outline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--outline-offset"]}])}n("opacity",{themeKeys:["--opacity"],handleBareValue:({value:o})=>ot(o)?`${o}%`:null,handle:o=>[l("opacity",o)]}),i("opacity",()=>[{values:Array.from({length:21},(o,p)=>`${p*5}`),valueThemeKeys:["--opacity"]}]),e("underline-offset-auto",[["text-underline-offset","auto"]]),n("underline-offset",{supportsNegative:!0,themeKeys:["--text-underline-offset"],handleBareValue:({value:o})=>T(o)?`${o}px`:null,handle:o=>[l("text-underline-offset",o)]}),i("underline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--text-underline-offset"]}]),r.functional("text",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??Y(p,["color","length","percentage","absolute-size","relative-size"])){case"size":case"length":case"percentage":case"absolute-size":case"relative-size":{if(o.modifier){let A=o.modifier.kind==="arbitrary"?o.modifier.value:t.resolve(o.modifier.value,["--leading"]);if(!A&&xe(o.modifier.value)){let k=t.resolve(null,["--spacing"]);if(!k)return null;A=`calc(${k} * ${o.modifier.value})`}return!A&&o.modifier.value==="none"&&(A="1"),A?[l("font-size",p),l("line-height",A)]:null}return[l("font-size",p)]}default:return p=X(p,o.modifier,t),p===null?void 0:[l("color",p)]}}{let p=te(o,t,["--text-color","--color"]);if(p)return[l("color",p)]}{let p=t.resolveWith(o.value.value,["--text"],["--line-height","--letter-spacing","--font-weight"]);if(p){let[h,A={}]=Array.isArray(p)?p:[p];if(o.modifier){let k=o.modifier.kind==="arbitrary"?o.modifier.value:t.resolve(o.modifier.value,["--leading"]);if(!k&&xe(o.modifier.value)){let O=t.resolve(null,["--spacing"]);if(!O)return null;k=`calc(${O} * ${o.modifier.value})`}if(!k&&o.modifier.value==="none"&&(k="1"),!k)return null;let C=[l("font-size",h)];return k&&C.push(l("line-height",k)),C}return typeof A=="string"?[l("font-size",h),l("line-height",A)]:[l("font-size",h),l("line-height",A["--line-height"]?`var(--tw-leading, ${A["--line-height"]})`:void 0),l("letter-spacing",A["--letter-spacing"]?`var(--tw-tracking, ${A["--letter-spacing"]})`:void 0),l("font-weight",A["--font-weight"]?`var(--tw-font-weight, ${A["--font-weight"]})`:void 0)]}}}}),i("text",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:[],valueThemeKeys:["--text"],modifiers:[],modifierThemeKeys:["--leading"]}]);let K=()=>z([N("--tw-text-shadow-color"),N("--tw-text-shadow-alpha","100%","")]);e("text-shadow-initial",[K,["--tw-text-shadow-color","initial"]]),r.functional("text-shadow",o=>{let p;if(o.modifier&&(o.modifier.kind==="arbitrary"?p=o.modifier.value:T(o.modifier.value)&&(p=`${o.modifier.value}%`)),!o.value){let h=t.get(["--text-shadow"]);return h===null?void 0:[K(),l("--tw-text-shadow-alpha",p),...pe("text-shadow",h,p,A=>`var(--tw-text-shadow-color, ${A})`)]}if(o.value.kind==="arbitrary"){let h=o.value.value;switch(o.value.dataType??Y(h,["color"])){case"color":return h=X(h,o.modifier,t),h===null?void 0:[K(),l("--tw-text-shadow-color",Q(h,"var(--tw-text-shadow-alpha)"))];default:return[K(),l("--tw-text-shadow-alpha",p),...pe("text-shadow",h,p,k=>`var(--tw-text-shadow-color, ${k})`)]}}switch(o.value.value){case"none":return o.modifier?void 0:[K(),l("text-shadow","none")];case"inherit":return o.modifier?void 0:[K(),l("--tw-text-shadow-color","inherit")]}{let h=t.get([`--text-shadow-${o.value.value}`]);if(h)return[K(),l("--tw-text-shadow-alpha",p),...pe("text-shadow",h,p,A=>`var(--tw-text-shadow-color, ${A})`)]}{let h=te(o,t,["--text-shadow-color","--color"]);if(h)return[K(),l("--tw-text-shadow-color",Q(h,"var(--tw-text-shadow-alpha)"))]}}),i("text-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-shadow-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["none"]},{valueThemeKeys:["--text-shadow"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`),hasDefaultValue:t.get(["--text-shadow"])!==null}]);{let k=function($){return`var(--tw-ring-inset,) 0 0 0 calc(${$} + var(--tw-ring-offset-width)) var(--tw-ring-color, ${A})`},C=function($){return`inset 0 0 0 ${$} var(--tw-inset-ring-color, currentcolor)`};var J=k,ie=C;let o=["var(--tw-inset-shadow)","var(--tw-inset-ring-shadow)","var(--tw-ring-offset-shadow)","var(--tw-ring-shadow)","var(--tw-shadow)"].join(", "),p="0 0 #0000",h=()=>z([N("--tw-shadow",p),N("--tw-shadow-color"),N("--tw-shadow-alpha","100%",""),N("--tw-inset-shadow",p),N("--tw-inset-shadow-color"),N("--tw-inset-shadow-alpha","100%",""),N("--tw-ring-color"),N("--tw-ring-shadow",p),N("--tw-inset-ring-color"),N("--tw-inset-ring-shadow",p),N("--tw-ring-inset"),N("--tw-ring-offset-width","0px",""),N("--tw-ring-offset-color","#fff"),N("--tw-ring-offset-shadow",p)]);e("shadow-initial",[h,["--tw-shadow-color","initial"]]),r.functional("shadow",$=>{let E;if($.modifier&&($.modifier.kind==="arbitrary"?E=$.modifier.value:T($.modifier.value)&&(E=`${$.modifier.value}%`)),!$.value){let U=t.get(["--shadow"]);return U===null?void 0:[h(),l("--tw-shadow-alpha",E),...pe("--tw-shadow",U,E,ae=>`var(--tw-shadow-color, ${ae})`),l("box-shadow",o)]}if($.value.kind==="arbitrary"){let U=$.value.value;switch($.value.dataType??Y(U,["color"])){case"color":return U=X(U,$.modifier,t),U===null?void 0:[h(),l("--tw-shadow-color",Q(U,"var(--tw-shadow-alpha)"))];default:return[h(),l("--tw-shadow-alpha",E),...pe("--tw-shadow",U,E,wt=>`var(--tw-shadow-color, ${wt})`),l("box-shadow",o)]}}switch($.value.value){case"none":return $.modifier?void 0:[h(),l("--tw-shadow",p),l("box-shadow",o)];case"inherit":return $.modifier?void 0:[h(),l("--tw-shadow-color","inherit")]}{let U=t.get([`--shadow-${$.value.value}`]);if(U)return[h(),l("--tw-shadow-alpha",E),...pe("--tw-shadow",U,E,ae=>`var(--tw-shadow-color, ${ae})`),l("box-shadow",o)]}{let U=te($,t,["--box-shadow-color","--color"]);if(U)return[h(),l("--tw-shadow-color",Q(U,"var(--tw-shadow-alpha)"))]}}),i("shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},($,E)=>`${E*5}`)},{values:["none"]},{valueThemeKeys:["--shadow"],modifiers:Array.from({length:21},($,E)=>`${E*5}`),hasDefaultValue:t.get(["--shadow"])!==null}]),e("inset-shadow-initial",[h,["--tw-inset-shadow-color","initial"]]),r.functional("inset-shadow",$=>{let E;if($.modifier&&($.modifier.kind==="arbitrary"?E=$.modifier.value:T($.modifier.value)&&(E=`${$.modifier.value}%`)),!$.value){let U=t.get(["--inset-shadow"]);return U===null?void 0:[h(),l("--tw-inset-shadow-alpha",E),...pe("--tw-inset-shadow",U,E,ae=>`var(--tw-inset-shadow-color, ${ae})`),l("box-shadow",o)]}if($.value.kind==="arbitrary"){let U=$.value.value;switch($.value.dataType??Y(U,["color"])){case"color":return U=X(U,$.modifier,t),U===null?void 0:[h(),l("--tw-inset-shadow-color",Q(U,"var(--tw-inset-shadow-alpha)"))];default:return[h(),l("--tw-inset-shadow-alpha",E),...pe("--tw-inset-shadow",U,E,wt=>`var(--tw-inset-shadow-color, ${wt})`,"inset "),l("box-shadow",o)]}}switch($.value.value){case"none":return $.modifier?void 0:[h(),l("--tw-inset-shadow",p),l("box-shadow",o)];case"inherit":return $.modifier?void 0:[h(),l("--tw-inset-shadow-color","inherit")]}{let U=t.get([`--inset-shadow-${$.value.value}`]);if(U)return[h(),l("--tw-inset-shadow-alpha",E),...pe("--tw-inset-shadow",U,E,ae=>`var(--tw-inset-shadow-color, ${ae})`),l("box-shadow",o)]}{let U=te($,t,["--box-shadow-color","--color"]);if(U)return[h(),l("--tw-inset-shadow-color",Q(U,"var(--tw-inset-shadow-alpha)"))]}}),i("inset-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},($,E)=>`${E*5}`)},{values:["none"]},{valueThemeKeys:["--inset-shadow"],modifiers:Array.from({length:21},($,E)=>`${E*5}`),hasDefaultValue:t.get(["--inset-shadow"])!==null}]),e("ring-inset",[h,["--tw-ring-inset","inset"]]);let A=t.get(["--default-ring-color"])??"currentcolor";r.functional("ring",$=>{if(!$.value){if($.modifier)return;let E=t.get(["--default-ring-width"])??"1px";return[h(),l("--tw-ring-shadow",k(E)),l("box-shadow",o)]}if($.value.kind==="arbitrary"){let E=$.value.value;switch($.value.dataType??Y(E,["color","length"])){case"length":return $.modifier?void 0:[h(),l("--tw-ring-shadow",k(E)),l("box-shadow",o)];default:return E=X(E,$.modifier,t),E===null?void 0:[l("--tw-ring-color",E)]}}{let E=te($,t,["--ring-color","--color"]);if(E)return[l("--tw-ring-color",E)]}{if($.modifier)return;let E=t.resolve($.value.value,["--ring-width"]);if(E===null&&T($.value.value)&&(E=`${$.value.value}px`),E)return[h(),l("--tw-ring-shadow",k(E)),l("box-shadow",o)]}}),i("ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},($,E)=>`${E*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]),r.functional("inset-ring",$=>{if(!$.value)return $.modifier?void 0:[h(),l("--tw-inset-ring-shadow",C("1px")),l("box-shadow",o)];if($.value.kind==="arbitrary"){let E=$.value.value;switch($.value.dataType??Y(E,["color","length"])){case"length":return $.modifier?void 0:[h(),l("--tw-inset-ring-shadow",C(E)),l("box-shadow",o)];default:return E=X(E,$.modifier,t),E===null?void 0:[l("--tw-inset-ring-color",E)]}}{let E=te($,t,["--ring-color","--color"]);if(E)return[l("--tw-inset-ring-color",E)]}{if($.modifier)return;let E=t.resolve($.value.value,["--ring-width"]);if(E===null&&T($.value.value)&&(E=`${$.value.value}px`),E)return[h(),l("--tw-inset-ring-shadow",C(E)),l("box-shadow",o)]}}),i("inset-ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},($,E)=>`${E*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]);let O="var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)";r.functional("ring-offset",$=>{if($.value){if($.value.kind==="arbitrary"){let E=$.value.value;switch($.value.dataType??Y(E,["color","length"])){case"length":return $.modifier?void 0:[l("--tw-ring-offset-width",E),l("--tw-ring-offset-shadow",O)];default:return E=X(E,$.modifier,t),E===null?void 0:[l("--tw-ring-offset-color",E)]}}{let E=t.resolve($.value.value,["--ring-offset-width"]);if(E)return $.modifier?void 0:[l("--tw-ring-offset-width",E),l("--tw-ring-offset-shadow",O)];if(T($.value.value))return $.modifier?void 0:[l("--tw-ring-offset-width",`${$.value.value}px`),l("--tw-ring-offset-shadow",O)]}{let E=te($,t,["--ring-offset-color","--color"]);if(E)return[l("--tw-ring-offset-color",E)]}}})}return i("ring-offset",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-offset-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-offset-width"]}]),r.functional("@container",o=>{let p=null;if(o.value===null?p="inline-size":o.value.kind==="arbitrary"?p=o.value.value:o.value.kind==="named"&&o.value.value==="normal"&&(p="normal"),p!==null)return o.modifier?[l("container-type",p),l("container-name",o.modifier.value)]:[l("container-type",p)]}),i("@container",()=>[{values:["normal"],valueThemeKeys:[],hasDefaultValue:!0}]),r}var _t=["number","integer","ratio","percentage"];function Sr(t){let r=t.params;return kn.test(r)?i=>{let e={"--value":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set},"--modifier":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set}};I(t.nodes,n=>{if(n.kind!=="declaration"||!n.value||!n.value.includes("--value(")&&!n.value.includes("--modifier("))return;let s=q(n.value);ee(s,a=>{if(a.kind!=="function")return;if(a.value==="--spacing"&&!(e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return ee(a.nodes,u=>{if(u.kind!=="function"||u.value!=="--value"&&u.value!=="--modifier")return;let c=u.value;for(let d of u.nodes)if(d.kind==="word"){if(d.value==="integer")e[c].usedSpacingInteger||=!0;else if(d.value==="number"&&(e[c].usedSpacingNumber||=!0,e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return 2}}),0;if(a.value!=="--value"&&a.value!=="--modifier")return;let f=D(Z(a.nodes),",");for(let[u,c]of f.entries())c=c.replace(/\\\*/g,"*"),c=c.replace(/--(.*?)\s--(.*?)/g,"--$1-*--$2"),c=c.replace(/\s+/g,""),c=c.replace(/(-\*){2,}/g,"-*"),c[0]==="-"&&c[1]==="-"&&!c.includes("-*")&&(c+="-*"),f[u]=c;a.nodes=q(f.join(","));for(let u of a.nodes)if(u.kind==="word"&&(u.value[0]==='"'||u.value[0]==="'")&&u.value[0]===u.value[u.value.length-1]){let c=u.value.slice(1,-1);e[a.value].literals.add(c)}else if(u.kind==="word"&&u.value[0]==="-"&&u.value[1]==="-"){let c=u.value.replace(/-\*.*$/g,"");e[a.value].themeKeys.add(c)}else if(u.kind==="word"&&!(u.value[0]==="["&&u.value[u.value.length-1]==="]")&&!_t.includes(u.value)){console.warn(`Unsupported bare value data type: "${u.value}". +Only valid data types are: ${_t.map(x=>`"${x}"`).join(", ")}. +`);let c=u.value,d=structuredClone(a),m="\xB6";ee(d.nodes,(x,{replaceWith:y})=>{x.kind==="word"&&x.value===c&&y({kind:"word",value:m})});let g="^".repeat(Z([u]).length),w=Z([d]).indexOf(m),v=["```css",Z([a])," ".repeat(w)+g,"```"].join(` +`);console.warn(v)}}),n.value=Z(s)}),i.utilities.functional(r.slice(0,-2),n=>{let s=structuredClone(t),a=n.value,f=n.modifier;if(a===null)return;let u=!1,c=!1,d=!1,m=!1,g=new Map,w=!1;if(I([s],(v,{parent:x,replaceWith:y})=>{if(x?.kind!=="rule"&&x?.kind!=="at-rule"||v.kind!=="declaration"||!v.value)return;let V=q(v.value);(ee(V,(S,{replaceWith:R})=>{if(S.kind==="function"){if(S.value==="--value"){u=!0;let L=Cr(a,S,i);return L?(c=!0,L.ratio?w=!0:g.set(v,x),R(L.nodes),1):(u||=!1,y([]),2)}else if(S.value==="--modifier"){if(f===null)return y([]),2;d=!0;let L=Cr(f,S,i);return L?(m=!0,R(L.nodes),1):(d||=!1,y([]),2)}}})??0)===0&&(v.value=Z(V))}),u&&!c||d&&!m||w&&m||f&&!w&&!m)return null;if(w)for(let[v,x]of g){let y=x.nodes.indexOf(v);y!==-1&&x.nodes.splice(y,1)}return s.nodes}),i.utilities.suggest(r.slice(0,-2),()=>{let n=[],s=[];for(let[a,{literals:f,usedSpacingNumber:u,usedSpacingInteger:c,themeKeys:d}]of[[n,e["--value"]],[s,e["--modifier"]]]){for(let m of f)a.push(m);if(u)a.push(...at);else if(c)for(let m of at)T(m)&&a.push(m);for(let m of i.theme.keysInNamespaces(d))a.push(m.replace($r,(g,w,v)=>`${w}.${v}`))}return[{values:n,modifiers:s}]})}:wn.test(r)?i=>{i.utilities.static(r,()=>structuredClone(t.nodes))}:null}function Cr(t,r,i){for(let e of r.nodes){if(t.kind==="named"&&e.kind==="word"&&(e.value[0]==="'"||e.value[0]==='"')&&e.value[e.value.length-1]===e.value[0]&&e.value.slice(1,-1)===t.value)return{nodes:q(t.value)};if(t.kind==="named"&&e.kind==="word"&&e.value[0]==="-"&&e.value[1]==="-"){let n=e.value;if(n.endsWith("-*")){n=n.slice(0,-2);let s=i.theme.resolve(t.value,[n]);if(s)return{nodes:q(s)}}else{let s=n.split("-*");if(s.length<=1)continue;let a=[s.shift()],f=i.theme.resolveWith(t.value,a,s);if(f){let[,u={}]=f;{let c=u[s.pop()];if(c)return{nodes:q(c)}}}}}else if(t.kind==="named"&&e.kind==="word"){if(!_t.includes(e.value))continue;let n=e.value==="ratio"&&"fraction"in t?t.fraction:t.value;if(!n)continue;let s=Y(n,[e.value]);if(s===null)continue;if(s==="ratio"){let[a,f]=D(n,"/");if(!T(a)||!T(f))continue}else{if(s==="number"&&!xe(n))continue;if(s==="percentage"&&!T(n.slice(0,-1)))continue}return{nodes:q(n),ratio:s==="ratio"}}else if(t.kind==="arbitrary"&&e.kind==="word"&&e.value[0]==="["&&e.value[e.value.length-1]==="]"){let n=e.value.slice(1,-1);if(n==="*")return{nodes:q(t.value)};if("dataType"in t&&t.dataType&&t.dataType!==n)continue;if("dataType"in t&&t.dataType)return{nodes:q(t.value)};if(Y(t.value,[n])!==null)return{nodes:q(t.value)}}}}function pe(t,r,i,e,n=""){let s=!1,a=Ue(r,u=>i==null?e(u):u.startsWith("current")?e(Q(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(Nr(u,i))));function f(u){return n?D(u,",").map(c=>n+c).join(","):u}return s?[l(t,f(Ue(r,e))),G("@supports (color: lab(from red l a b))",[l(t,f(a))])]:[l(t,f(a))]}function lt(t,r,i,e,n=""){let s=!1,a=D(r,",").map(f=>Ue(f,u=>i==null?e(u):u.startsWith("current")?e(Q(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(Nr(u,i))))).map(f=>`drop-shadow(${f})`).join(" ");return s?[l(t,n+D(r,",").map(f=>`drop-shadow(${Ue(f,e)})`).join(" ")),G("@supports (color: lab(from red l a b))",[l(t,n+a)])]:[l(t,n+a)]}var Dt={"--alpha":bn,"--spacing":yn,"--theme":xn,theme:An};function bn(t,r,i,...e){let[n,s]=D(i,"/").map(a=>a.trim());if(!n||!s)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);if(e.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);return Q(n,s)}function yn(t,r,i,...e){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(e.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${e.length+1}.`);let n=t.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${i})`}function xn(t,r,i,...e){if(!i.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;i.endsWith(" inline")&&(n=!0,i=i.slice(0,-7)),r.kind==="at-rule"&&(n=!0);let s=t.resolveThemeValue(i,n);if(!s){if(e.length>0)return e.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(e.length===0)return s;let a=e.join(", ");if(a==="initial")return s;if(s==="initial")return a;if(s.startsWith("var(")||s.startsWith("theme(")||s.startsWith("--theme(")){let f=q(s);return Nn(f,a),Z(f)}return s}function An(t,r,i,...e){i=Cn(i);let n=t.resolveThemeValue(i);if(!n&&e.length>0)return e.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var Er=new RegExp(Object.keys(Dt).map(t=>`${t}\\(`).join("|"));function Ve(t,r){let i=0;return I(t,e=>{if(e.kind==="declaration"&&e.value&&Er.test(e.value)){i|=8,e.value=Tr(e.value,e,r);return}e.kind==="at-rule"&&(e.name==="@media"||e.name==="@custom-media"||e.name==="@container"||e.name==="@supports")&&Er.test(e.params)&&(i|=8,e.params=Tr(e.params,e,r))}),i}function Tr(t,r,i){let e=q(t);return ee(e,(n,{replaceWith:s})=>{if(n.kind==="function"&&n.value in Dt){let a=D(Z(n.nodes).trim(),",").map(u=>u.trim()),f=Dt[n.value](i,r,...a);return s(q(f))}}),Z(e)}function Cn(t){if(t[0]!=="'"&&t[0]!=='"')return t;let r="",i=t[0];for(let e=1;e{if(i.kind==="function"&&!(i.value!=="var"&&i.value!=="theme"&&i.value!=="--theme"))if(i.nodes.length===1)i.nodes.push({kind:"word",value:`, ${r}`});else{let e=i.nodes[i.nodes.length-1];e.kind==="word"&&e.value==="initial"&&(e.value=r)}})}function st(t,r){let i=t.length,e=r.length,n=i=48&&a<=57&&f>=48&&f<=57){let u=s,c=s+1,d=s,m=s+1;for(a=t.charCodeAt(c);a>=48&&a<=57;)a=t.charCodeAt(++c);for(f=r.charCodeAt(m);f>=48&&f<=57;)f=r.charCodeAt(++m);let g=t.slice(u,c),w=r.slice(d,m),v=Number(g)-Number(w);if(v)return v;if(gw)return 1;continue}if(a!==f)return a-f}return t.length-r.length}var $n=/^\d+\/\d+$/;function Rr(t){let r=new B(n=>({name:n,utility:n,fraction:!1,modifiers:[]}));for(let n of t.utilities.keys("static")){let s=r.get(n);s.fraction=!1,s.modifiers=[]}for(let n of t.utilities.keys("functional")){let s=t.utilities.getCompletions(n);for(let a of s)for(let f of a.values){let u=f!==null&&$n.test(f),c=f===null?n:`${n}-${f}`,d=r.get(c);if(d.utility=n,d.fraction||=u,d.modifiers.push(...a.modifiers),a.supportsNegative){let m=r.get(`-${c}`);m.utility=`-${n}`,m.fraction||=u,m.modifiers.push(...a.modifiers)}}}if(r.size===0)return[];let i=Array.from(r.values());return i.sort((n,s)=>st(n.name,s.name)),Vn(i)}function Vn(t){let r=[],i=null,e=new Map,n=new B(()=>[]);for(let a of t){let{utility:f,fraction:u}=a;i||(i={utility:f,items:[]},e.set(f,i)),f!==i.utility&&(r.push(i),i={utility:f,items:[]},e.set(f,i)),u?n.get(f).push(a):i.items.push(a)}i&&r[r.length-1]!==i&&r.push(i);for(let[a,f]of n){let u=e.get(a);u&&u.items.push(...f)}let s=[];for(let a of r)for(let f of a.items)s.push([f.name,{modifiers:f.modifiers}]);return s}function Pr(t){let r=[];for(let[e,n]of t.variants.entries()){let f=function({value:u,modifier:c}={}){let d=e;u&&(d+=s?`-${u}`:u),c&&(d+=`/${c}`);let m=t.parseVariant(d);if(!m)return[];let g=M(".__placeholder__",[]);if(Ee(g,m,t.variants)===null)return[];let w=[];return Xe(g.nodes,(v,{path:x})=>{if(v.kind!=="rule"&&v.kind!=="at-rule"||v.nodes.length>0)return;x.sort((b,S)=>{let R=b.kind==="at-rule",L=S.kind==="at-rule";return R&&!L?-1:!R&&L?1:0});let y=x.flatMap(b=>b.kind==="rule"?b.selector==="&"?[]:[b.selector]:b.kind==="at-rule"?[`${b.name} ${b.params}`]:[]),V="";for(let b=y.length-1;b>=0;b--)V=V===""?y[b]:`${y[b]} { ${V} }`;w.push(V)}),w};var i=f;if(n.kind==="arbitrary")continue;let s=e!=="@",a=t.variants.getCompletions(e);switch(n.kind){case"static":{r.push({name:e,values:a,isArbitrary:!1,hasDash:s,selectors:f});break}case"functional":{r.push({name:e,values:a,isArbitrary:!0,hasDash:s,selectors:f});break}case"compound":{r.push({name:e,values:a,isArbitrary:!0,hasDash:s,selectors:f});break}}}return r}function Or(t,r){let{astNodes:i,nodeSorting:e}=ge(Array.from(r),t),n=new Map(r.map(a=>[a,null])),s=0n;for(let a of i){let f=e.get(a)?.candidate;f&&n.set(f,n.get(f)??s++)}return r.map(a=>[a,n.get(a)??null])}var ut=/^@?[a-zA-Z0-9_-]*$/;var Kt=class{compareFns=new Map;variants=new Map;completions=new Map;groupOrder=null;lastOrder=0;static(r,i,{compounds:e,order:n}={}){this.set(r,{kind:"static",applyFn:i,compoundsWith:0,compounds:e??2,order:n})}fromAst(r,i){let e=[];I(i,n=>{n.kind==="rule"?e.push(n.selector):n.kind==="at-rule"&&n.name!=="@slot"&&e.push(`${n.name} ${n.params}`)}),this.static(r,n=>{let s=structuredClone(i);Ut(s,n.nodes),n.nodes=s},{compounds:Ae(e)})}functional(r,i,{compounds:e,order:n}={}){this.set(r,{kind:"functional",applyFn:i,compoundsWith:0,compounds:e??2,order:n})}compound(r,i,e,{compounds:n,order:s}={}){this.set(r,{kind:"compound",applyFn:e,compoundsWith:i,compounds:n??2,order:s})}group(r,i){this.groupOrder=this.nextOrder(),i&&this.compareFns.set(this.groupOrder,i),r(),this.groupOrder=null}has(r){return this.variants.has(r)}get(r){return this.variants.get(r)}kind(r){return this.variants.get(r)?.kind}compoundsWith(r,i){let e=this.variants.get(r),n=typeof i=="string"?this.variants.get(i):i.kind==="arbitrary"?{compounds:Ae([i.selector])}:this.variants.get(i.root);return!(!e||!n||e.kind!=="compound"||n.compounds===0||e.compoundsWith===0||(e.compoundsWith&n.compounds)===0)}suggest(r,i){this.completions.set(r,i)}getCompletions(r){return this.completions.get(r)?.()??[]}compare(r,i){if(r===i)return 0;if(r===null)return-1;if(i===null)return 1;if(r.kind==="arbitrary"&&i.kind==="arbitrary")return r.selector{g.nodes=d.map(w=>G(w,g.nodes))},{compounds:m})}i("*",[":is(& > *)"],{compounds:0}),i("**",[":is(& *)"],{compounds:0});function e(c,d){return d.map(m=>{m=m.trim();let g=D(m," ");return g[0]==="not"?g.slice(1).join(" "):c==="@container"?g[0][0]==="("?`not ${m}`:g[1]==="not"?`${g[0]} ${g.slice(2).join(" ")}`:`${g[0]} not ${g.slice(1).join(" ")}`:`not ${m}`})}let n=["@media","@supports","@container"];function s(c){for(let d of n){if(d!==c.name)continue;let m=D(c.params,",");return m.length>1?null:(m=e(c.name,m),F(c.name,m.join(", ")))}return null}function a(c){return c.includes("::")?null:`&:not(${D(c,",").map(m=>(m=m.replaceAll("&","*"),m)).join(", ")})`}r.compound("not",3,(c,d)=>{if(d.variant.kind==="arbitrary"&&d.variant.relative||d.modifier)return null;let m=!1;if(I([c],(g,{path:w})=>{if(g.kind!=="rule"&&g.kind!=="at-rule")return 0;if(g.nodes.length>0)return 0;let v=[],x=[];for(let V of w)V.kind==="at-rule"?v.push(V):V.kind==="rule"&&x.push(V);if(v.length>1)return 2;if(x.length>1)return 2;let y=[];for(let V of x){let b=a(V.selector);if(!b)return m=!1,2;y.push(M(b,[]))}for(let V of v){let b=s(V);if(!b)return m=!1,2;y.push(b)}return Object.assign(c,M("&",y)),m=!0,1}),c.kind==="rule"&&c.selector==="&"&&c.nodes.length===1&&Object.assign(c,c.nodes[0]),!m)return null}),r.suggest("not",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("not",c))),r.compound("group",2,(c,d)=>{if(d.variant.kind==="arbitrary"&&d.variant.relative)return null;let m=d.modifier?`:where(.${t.prefix?`${t.prefix}\\:`:""}group\\/${d.modifier.value})`:`:where(.${t.prefix?`${t.prefix}\\:`:""}group)`,g=!1;if(I([c],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let y of v.slice(0,-1))if(y.kind==="rule")return g=!1,2;let x=w.selector.replaceAll("&",m);D(x,",").length>1&&(x=`:is(${x})`),w.selector=`&:is(${x} *)`,g=!0}),!g)return null}),r.suggest("group",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("group",c))),r.compound("peer",2,(c,d)=>{if(d.variant.kind==="arbitrary"&&d.variant.relative)return null;let m=d.modifier?`:where(.${t.prefix?`${t.prefix}\\:`:""}peer\\/${d.modifier.value})`:`:where(.${t.prefix?`${t.prefix}\\:`:""}peer)`,g=!1;if(I([c],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let y of v.slice(0,-1))if(y.kind==="rule")return g=!1,2;let x=w.selector.replaceAll("&",m);D(x,",").length>1&&(x=`:is(${x})`),w.selector=`&:is(${x} ~ *)`,g=!0}),!g)return null}),r.suggest("peer",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("peer",c))),i("first-letter",["&::first-letter"]),i("first-line",["&::first-line"]),i("marker",["& *::marker","&::marker","& *::-webkit-details-marker","&::-webkit-details-marker"]),i("selection",["& *::selection","&::selection"]),i("file",["&::file-selector-button"]),i("placeholder",["&::placeholder"]),i("backdrop",["&::backdrop"]),i("details-content",["&::details-content"]);{let c=function(){return z([F("@property","--tw-content",[l("syntax",'"*"'),l("initial-value",'""'),l("inherits","false")])])};var f=c;r.static("before",d=>{d.nodes=[M("&::before",[c(),l("content","var(--tw-content)"),...d.nodes])]},{compounds:0}),r.static("after",d=>{d.nodes=[M("&::after",[c(),l("content","var(--tw-content)"),...d.nodes])]},{compounds:0})}i("first",["&:first-child"]),i("last",["&:last-child"]),i("only",["&:only-child"]),i("odd",["&:nth-child(odd)"]),i("even",["&:nth-child(even)"]),i("first-of-type",["&:first-of-type"]),i("last-of-type",["&:last-of-type"]),i("only-of-type",["&:only-of-type"]),i("visited",["&:visited"]),i("target",["&:target"]),i("open",["&:is([open], :popover-open, :open)"]),i("default",["&:default"]),i("checked",["&:checked"]),i("indeterminate",["&:indeterminate"]),i("placeholder-shown",["&:placeholder-shown"]),i("autofill",["&:autofill"]),i("optional",["&:optional"]),i("required",["&:required"]),i("valid",["&:valid"]),i("invalid",["&:invalid"]),i("user-valid",["&:user-valid"]),i("user-invalid",["&:user-invalid"]),i("in-range",["&:in-range"]),i("out-of-range",["&:out-of-range"]),i("read-only",["&:read-only"]),i("empty",["&:empty"]),i("focus-within",["&:focus-within"]),r.static("hover",c=>{c.nodes=[M("&:hover",[F("@media","(hover: hover)",c.nodes)])]}),i("focus",["&:focus"]),i("focus-visible",["&:focus-visible"]),i("active",["&:active"]),i("enabled",["&:enabled"]),i("disabled",["&:disabled"]),i("inert",["&:is([inert], [inert] *)"]),r.compound("in",2,(c,d)=>{if(d.modifier)return null;let m=!1;if(I([c],(g,{path:w})=>{if(g.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return m=!1,2;g.selector=`:where(${g.selector.replaceAll("&","*")}) &`,m=!0}),!m)return null}),r.suggest("in",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("in",c))),r.compound("has",2,(c,d)=>{if(d.modifier)return null;let m=!1;if(I([c],(g,{path:w})=>{if(g.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return m=!1,2;g.selector=`&:has(${g.selector.replaceAll("&","*")})`,m=!0}),!m)return null}),r.suggest("has",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("has",c))),r.functional("aria",(c,d)=>{if(!d.value||d.modifier)return null;d.value.kind==="arbitrary"?c.nodes=[M(`&[aria-${_r(d.value.value)}]`,c.nodes)]:c.nodes=[M(`&[aria-${d.value.value}="true"]`,c.nodes)]}),r.suggest("aria",()=>["busy","checked","disabled","expanded","hidden","pressed","readonly","required","selected"]),r.functional("data",(c,d)=>{if(!d.value||d.modifier)return null;c.nodes=[M(`&[data-${_r(d.value.value)}]`,c.nodes)]}),r.functional("nth",(c,d)=>{if(!d.value||d.modifier||d.value.kind==="named"&&!T(d.value.value))return null;c.nodes=[M(`&:nth-child(${d.value.value})`,c.nodes)]}),r.functional("nth-last",(c,d)=>{if(!d.value||d.modifier||d.value.kind==="named"&&!T(d.value.value))return null;c.nodes=[M(`&:nth-last-child(${d.value.value})`,c.nodes)]}),r.functional("nth-of-type",(c,d)=>{if(!d.value||d.modifier||d.value.kind==="named"&&!T(d.value.value))return null;c.nodes=[M(`&:nth-of-type(${d.value.value})`,c.nodes)]}),r.functional("nth-last-of-type",(c,d)=>{if(!d.value||d.modifier||d.value.kind==="named"&&!T(d.value.value))return null;c.nodes=[M(`&:nth-last-of-type(${d.value.value})`,c.nodes)]}),r.functional("supports",(c,d)=>{if(!d.value||d.modifier)return null;let m=d.value.value;if(m===null)return null;if(/^[\w-]*\s*\(/.test(m)){let g=m.replace(/\b(and|or|not)\b/g," $1 ");c.nodes=[F("@supports",g,c.nodes)];return}m.includes(":")||(m=`${m}: var(--tw)`),(m[0]!=="("||m[m.length-1]!==")")&&(m=`(${m})`),c.nodes=[F("@supports",m,c.nodes)]},{compounds:1}),i("motion-safe",["@media (prefers-reduced-motion: no-preference)"]),i("motion-reduce",["@media (prefers-reduced-motion: reduce)"]),i("contrast-more",["@media (prefers-contrast: more)"]),i("contrast-less",["@media (prefers-contrast: less)"]);{let c=function(d,m,g,w){if(d===m)return 0;let v=w.get(d);if(v===null)return g==="asc"?-1:1;let x=w.get(m);return x===null?g==="asc"?1:-1:ye(v,x,g)};var u=c;{let d=t.namespace("--breakpoint"),m=new B(g=>{switch(g.kind){case"static":return t.resolveValue(g.root,["--breakpoint"])??null;case"functional":{if(!g.value||g.modifier)return null;let w=null;return g.value.kind==="arbitrary"?w=g.value.value:g.value.kind==="named"&&(w=t.resolveValue(g.value.value,["--breakpoint"])),!w||w.includes("var(")?null:w}case"arbitrary":case"compound":return null}});r.group(()=>{r.functional("max",(g,w)=>{if(w.modifier)return null;let v=m.get(w);if(v===null)return null;g.nodes=[F("@media",`(width < ${v})`,g.nodes)]},{compounds:1})},(g,w)=>c(g,w,"desc",m)),r.suggest("max",()=>Array.from(d.keys()).filter(g=>g!==null)),r.group(()=>{for(let[g,w]of t.namespace("--breakpoint"))g!==null&&r.static(g,v=>{v.nodes=[F("@media",`(width >= ${w})`,v.nodes)]},{compounds:1});r.functional("min",(g,w)=>{if(w.modifier)return null;let v=m.get(w);if(v===null)return null;g.nodes=[F("@media",`(width >= ${v})`,g.nodes)]},{compounds:1})},(g,w)=>c(g,w,"asc",m)),r.suggest("min",()=>Array.from(d.keys()).filter(g=>g!==null))}{let d=t.namespace("--container"),m=new B(g=>{switch(g.kind){case"functional":{if(g.value===null)return null;let w=null;return g.value.kind==="arbitrary"?w=g.value.value:g.value.kind==="named"&&(w=t.resolveValue(g.value.value,["--container"])),!w||w.includes("var(")?null:w}case"static":case"arbitrary":case"compound":return null}});r.group(()=>{r.functional("@max",(g,w)=>{let v=m.get(w);if(v===null)return null;g.nodes=[F("@container",w.modifier?`${w.modifier.value} (width < ${v})`:`(width < ${v})`,g.nodes)]},{compounds:1})},(g,w)=>c(g,w,"desc",m)),r.suggest("@max",()=>Array.from(d.keys()).filter(g=>g!==null)),r.group(()=>{r.functional("@",(g,w)=>{let v=m.get(w);if(v===null)return null;g.nodes=[F("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,g.nodes)]},{compounds:1}),r.functional("@min",(g,w)=>{let v=m.get(w);if(v===null)return null;g.nodes=[F("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,g.nodes)]},{compounds:1})},(g,w)=>c(g,w,"asc",m)),r.suggest("@min",()=>Array.from(d.keys()).filter(g=>g!==null)),r.suggest("@",()=>Array.from(d.keys()).filter(g=>g!==null))}}return i("portrait",["@media (orientation: portrait)"]),i("landscape",["@media (orientation: landscape)"]),i("ltr",['&:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *)']),i("rtl",['&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *)']),i("dark",["@media (prefers-color-scheme: dark)"]),i("starting",["@starting-style"]),i("print",["@media print"]),i("forced-colors",["@media (forced-colors: active)"]),i("inverted-colors",["@media (inverted-colors: inverted)"]),i("pointer-none",["@media (pointer: none)"]),i("pointer-coarse",["@media (pointer: coarse)"]),i("pointer-fine",["@media (pointer: fine)"]),i("any-pointer-none",["@media (any-pointer: none)"]),i("any-pointer-coarse",["@media (any-pointer: coarse)"]),i("any-pointer-fine",["@media (any-pointer: fine)"]),i("noscript",["@media (scripting: none)"]),r}function _r(t){if(t.includes("=")){let[r,...i]=D(t,"="),e=i.join("=").trim();if(e[0]==="'"||e[0]==='"')return t;if(e.length>1){let n=e[e.length-1];if(e[e.length-2]===" "&&(n==="i"||n==="I"||n==="s"||n==="S"))return`${r}="${e.slice(0,-2)}" ${n}`}return`${r}="${e}"`}return t}function Ut(t,r){I(t,(i,{replaceWith:e})=>{if(i.kind==="at-rule"&&i.name==="@slot")e(r);else if(i.kind==="at-rule"&&(i.name==="@keyframes"||i.name==="@property"))return Object.assign(i,z([F(i.name,i.params,i.nodes)])),1})}function Kr(t){let r=Vr(t),i=Dr(t),e=new B(u=>gr(u,f)),n=new B(u=>Array.from(mr(u,f))),s=new B(u=>{let c=Ur(u,f);try{Ve(c.map(({node:d})=>d),f)}catch{return[]}return c}),a=new B(u=>{for(let c of Qe(u))t.markUsedVariable(c)}),f={theme:t,utilities:r,variants:i,invalidCandidates:new Set,important:!1,candidatesToCss(u){let c=[];for(let d of u){let m=!1,{astNodes:g}=ge([d],this,{onInvalidCandidate(){m=!0}});g=be(g,f,0),g.length===0||m?c.push(null):c.push(oe(g))}return c},getClassOrder(u){return Or(this,u)},getClassList(){return Rr(this)},getVariants(){return Pr(this)},parseCandidate(u){return n.get(u)},parseVariant(u){return e.get(u)},compileAstNodes(u){return s.get(u)},printCandidate(u){return vr(f,u)},printVariant(u){return it(u)},getVariantOrder(){let u=Array.from(e.values());u.sort((g,w)=>this.variants.compare(g,w));let c=new Map,d,m=0;for(let g of u)g!==null&&(d!==void 0&&this.variants.compare(d,g)!==0&&m++,c.set(g,m),d=g);return c},resolveThemeValue(u,c=!0){let d=u.lastIndexOf("/"),m=null;d!==-1&&(m=u.slice(d+1).trim(),u=u.slice(0,d).trim());let g=t.resolve(null,[u],c?1:0)??void 0;return m&&g?Q(g,m):g},trackUsedVariables(u){a.get(u)}};return f}var Lt=["container-type","pointer-events","visibility","position","inset","inset-inline","inset-block","inset-inline-start","inset-inline-end","top","right","bottom","left","isolation","z-index","order","grid-column","grid-column-start","grid-column-end","grid-row","grid-row-start","grid-row-end","float","clear","--tw-container-component","margin","margin-inline","margin-block","margin-inline-start","margin-inline-end","margin-top","margin-right","margin-bottom","margin-left","box-sizing","display","field-sizing","aspect-ratio","height","max-height","min-height","width","max-width","min-width","flex","flex-shrink","flex-grow","flex-basis","table-layout","caption-side","border-collapse","border-spacing","transform-origin","translate","--tw-translate-x","--tw-translate-y","--tw-translate-z","scale","--tw-scale-x","--tw-scale-y","--tw-scale-z","rotate","--tw-rotate-x","--tw-rotate-y","--tw-rotate-z","--tw-skew-x","--tw-skew-y","transform","animation","cursor","touch-action","--tw-pan-x","--tw-pan-y","--tw-pinch-zoom","resize","scroll-snap-type","--tw-scroll-snap-strictness","scroll-snap-align","scroll-snap-stop","scroll-margin","scroll-margin-inline","scroll-margin-block","scroll-margin-inline-start","scroll-margin-inline-end","scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left","scroll-padding","scroll-padding-inline","scroll-padding-block","scroll-padding-inline-start","scroll-padding-inline-end","scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left","list-style-position","list-style-type","list-style-image","appearance","columns","break-before","break-inside","break-after","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-template-columns","grid-template-rows","flex-direction","flex-wrap","place-content","place-items","align-content","align-items","justify-content","justify-items","gap","column-gap","row-gap","--tw-space-x-reverse","--tw-space-y-reverse","divide-x-width","divide-y-width","--tw-divide-y-reverse","divide-style","divide-color","place-self","align-self","justify-self","overflow","overflow-x","overflow-y","overscroll-behavior","overscroll-behavior-x","overscroll-behavior-y","scroll-behavior","border-radius","border-start-radius","border-end-radius","border-top-radius","border-right-radius","border-bottom-radius","border-left-radius","border-start-start-radius","border-start-end-radius","border-end-end-radius","border-end-start-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-width","border-inline-width","border-block-width","border-inline-start-width","border-inline-end-width","border-top-width","border-right-width","border-bottom-width","border-left-width","border-style","border-inline-style","border-block-style","border-inline-start-style","border-inline-end-style","border-top-style","border-right-style","border-bottom-style","border-left-style","border-color","border-inline-color","border-block-color","border-inline-start-color","border-inline-end-color","border-top-color","border-right-color","border-bottom-color","border-left-color","background-color","background-image","--tw-gradient-position","--tw-gradient-stops","--tw-gradient-via-stops","--tw-gradient-from","--tw-gradient-from-position","--tw-gradient-via","--tw-gradient-via-position","--tw-gradient-to","--tw-gradient-to-position","mask-image","--tw-mask-top","--tw-mask-top-from-color","--tw-mask-top-from-position","--tw-mask-top-to-color","--tw-mask-top-to-position","--tw-mask-right","--tw-mask-right-from-color","--tw-mask-right-from-position","--tw-mask-right-to-color","--tw-mask-right-to-position","--tw-mask-bottom","--tw-mask-bottom-from-color","--tw-mask-bottom-from-position","--tw-mask-bottom-to-color","--tw-mask-bottom-to-position","--tw-mask-left","--tw-mask-left-from-color","--tw-mask-left-from-position","--tw-mask-left-to-color","--tw-mask-left-to-position","--tw-mask-linear","--tw-mask-linear-position","--tw-mask-linear-from-color","--tw-mask-linear-from-position","--tw-mask-linear-to-color","--tw-mask-linear-to-position","--tw-mask-radial","--tw-mask-radial-shape","--tw-mask-radial-size","--tw-mask-radial-position","--tw-mask-radial-from-color","--tw-mask-radial-from-position","--tw-mask-radial-to-color","--tw-mask-radial-to-position","--tw-mask-conic","--tw-mask-conic-position","--tw-mask-conic-from-color","--tw-mask-conic-from-position","--tw-mask-conic-to-color","--tw-mask-conic-to-position","box-decoration-break","background-size","background-attachment","background-clip","background-position","background-repeat","background-origin","mask-composite","mask-mode","mask-type","mask-size","mask-clip","mask-position","mask-repeat","mask-origin","fill","stroke","stroke-width","object-fit","object-position","padding","padding-inline","padding-block","padding-inline-start","padding-inline-end","padding-top","padding-right","padding-bottom","padding-left","text-align","text-indent","vertical-align","font-family","font-size","line-height","font-weight","letter-spacing","text-wrap","overflow-wrap","word-break","text-overflow","hyphens","white-space","color","text-transform","font-style","font-stretch","font-variant-numeric","text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","-webkit-font-smoothing","placeholder-color","caret-color","accent-color","color-scheme","opacity","background-blend-mode","mix-blend-mode","box-shadow","--tw-shadow","--tw-shadow-color","--tw-ring-shadow","--tw-ring-color","--tw-inset-shadow","--tw-inset-shadow-color","--tw-inset-ring-shadow","--tw-inset-ring-color","--tw-ring-offset-width","--tw-ring-offset-color","outline","outline-width","outline-offset","outline-color","--tw-blur","--tw-brightness","--tw-contrast","--tw-drop-shadow","--tw-grayscale","--tw-hue-rotate","--tw-invert","--tw-saturate","--tw-sepia","filter","--tw-backdrop-blur","--tw-backdrop-brightness","--tw-backdrop-contrast","--tw-backdrop-grayscale","--tw-backdrop-hue-rotate","--tw-backdrop-invert","--tw-backdrop-opacity","--tw-backdrop-saturate","--tw-backdrop-sepia","backdrop-filter","transition-property","transition-behavior","transition-delay","transition-duration","transition-timing-function","will-change","contain","content","forced-color-adjust"];function ge(t,r,{onInvalidCandidate:i}={}){let e=new Map,n=[],s=new Map;for(let f of t){if(r.invalidCandidates.has(f)){i?.(f);continue}let u=r.parseCandidate(f);if(u.length===0){i?.(f);continue}s.set(f,u)}let a=r.getVariantOrder();for(let[f,u]of s){let c=!1;for(let d of u){let m=r.compileAstNodes(d);if(m.length!==0){c=!0;for(let{node:g,propertySort:w}of m){let v=0n;for(let x of d.variants)v|=1n<{let c=e.get(f),d=e.get(u);if(c.variants-d.variants!==0n)return Number(c.variants-d.variants);let m=0;for(;m1)return null;for(let u of a.nodes)if(u.kind!=="rule"&&u.kind!=="at-rule"||n(u,r)===null)return null;I(a.nodes,u=>{if((u.kind==="rule"||u.kind==="at-rule")&&u.nodes.length<=0)return u.nodes=t.nodes,1}),t.nodes=a.nodes;return}if(n(t,r)===null)return null}function Lr(t){let r=t.options?.types??[];return r.length>1&&r.includes("any")}function Sn(t,r){if(t.kind==="arbitrary"){let a=t.value;return t.modifier&&(a=X(a,t.modifier,r.theme)),a===null?[]:[[l(t.property,a)]]}let i=r.utilities.get(t.root)??[],e=[],n=i.filter(a=>!Lr(a));for(let a of n){if(a.kind!==t.kind)continue;let f=a.compileFn(t);if(f!==void 0){if(f===null)return e;e.push(f)}}if(e.length>0)return e;let s=i.filter(a=>Lr(a));for(let a of s){if(a.kind!==t.kind)continue;let f=a.compileFn(t);if(f!==void 0){if(f===null)return e;e.push(f)}}return e}function jr(t){for(let r of t)r.kind!=="at-root"&&(r.kind==="declaration"?r.important=!0:(r.kind==="rule"||r.kind==="at-rule")&&jr(r.nodes))}function En(t){let r=new Set,i=0,e=t.slice(),n=!1;for(;e.length>0;){let s=e.shift();if(s.kind==="declaration"){if(s.value===void 0||(i++,n))continue;if(s.property==="--tw-sort"){let f=Lt.indexOf(s.value??"");if(f!==-1){r.add(f),n=!0;continue}}let a=Lt.indexOf(s.property);a!==-1&&r.add(a)}else if(s.kind==="rule"||s.kind==="at-rule")for(let a of s.nodes)e.push(a)}return{order:Array.from(r).sort((s,a)=>s-a),count:i}}function je(t,r){let i=0,e=G("&",t),n=new Set,s=new B(()=>new Set),a=new B(()=>new Set);I([e],(m,{parent:g,path:w})=>{if(m.kind==="at-rule"){if(m.name==="@keyframes")return I(m.nodes,v=>{if(v.kind==="at-rule"&&v.name==="@apply")throw new Error("You cannot use `@apply` inside `@keyframes`.")}),1;if(m.name==="@utility"){let v=m.params.replace(/-\*$/,"");a.get(v).add(m),I(m.nodes,x=>{if(!(x.kind!=="at-rule"||x.name!=="@apply")){n.add(m);for(let y of Ir(x,r))s.get(m).add(y)}});return}if(m.name==="@apply"){if(g===null)return;i|=1,n.add(g);for(let v of Ir(m,r))for(let x of w)x!==m&&n.has(x)&&s.get(x).add(v)}}});let f=new Set,u=[],c=new Set;function d(m,g=[]){if(!f.has(m)){if(c.has(m)){let w=g[(g.indexOf(m)+1)%g.length];throw m.kind==="at-rule"&&m.name==="@utility"&&w.kind==="at-rule"&&w.name==="@utility"&&I(m.nodes,v=>{if(v.kind!=="at-rule"||v.name!=="@apply")return;let x=v.params.split(/\s+/g);for(let y of x)for(let V of r.parseCandidate(y))switch(V.kind){case"arbitrary":break;case"static":case"functional":if(w.params.replace(/-\*$/,"")===V.root)throw new Error(`You cannot \`@apply\` the \`${y}\` utility here because it creates a circular dependency.`);break;default:}}),new Error(`Circular dependency detected: + +${oe([m])} +Relies on: + +${oe([w])}`)}c.add(m);for(let w of s.get(m))for(let v of a.get(w))g.push(m),d(v,g),g.pop();f.add(m),c.delete(m),u.push(m)}}for(let m of n)d(m);for(let m of u)"nodes"in m&&I(m.nodes,(g,{replaceWith:w})=>{if(g.kind!=="at-rule"||g.name!=="@apply")return;let v=g.params.split(/(\s+)/g),x={},y=0;for(let[V,b]of v.entries())V%2===0&&(x[b]=y),y+=b.length;{let V=Object.keys(x),b=ge(V,r,{onInvalidCandidate:P=>{if(r.theme.prefix&&!P.startsWith(r.theme.prefix))throw new Error(`Cannot apply unprefixed utility class \`${P}\`. Did you mean \`${r.theme.prefix}:${P}\`?`);if(r.invalidCandidates.has(P))throw new Error(`Cannot apply utility class \`${P}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);let K=D(P,":");if(K.length>1){let _=K.pop();if(r.candidatesToCss([_])[0]){let H=r.candidatesToCss(K.map(W=>`${W}:[--tw-variant-check:1]`)),j=K.filter((W,J)=>H[J]===null);if(j.length>0){if(j.length===1)throw new Error(`Cannot apply utility class \`${P}\` because the ${j.map(W=>`\`${W}\``)} variant does not exist.`);{let W=new Intl.ListFormat("en",{style:"long",type:"conjunction"});throw new Error(`Cannot apply utility class \`${P}\` because the ${W.format(j.map(J=>`\`${J}\``))} variants do not exist.`)}}}}throw r.theme.size===0?new Error(`Cannot apply unknown utility class \`${P}\`. Are you using CSS modules or similar and missing \`@reference\`? https://tailwindcss.com/docs/functions-and-directives#reference-directive`):new Error(`Cannot apply unknown utility class \`${P}\``)}}),S=g.src,R=b.astNodes.map(P=>{let K=b.nodeSorting.get(P)?.candidate,_=K?x[K]:void 0;if(P=structuredClone(P),!S||!K||_===void 0)return I([P],j=>{j.src=S}),P;let H=[S[0],S[1],S[2]];return H[1]+=7+_,H[2]=H[1]+K.length,I([P],j=>{j.src=H}),P}),L=[];for(let P of R)if(P.kind==="rule")for(let K of P.nodes)L.push(K);else L.push(P);w(L)}});return i}function*Ir(t,r){for(let i of t.params.split(/\s+/g))for(let e of r.parseCandidate(i))switch(e.kind){case"arbitrary":break;case"static":case"functional":yield e.root;break;default:}}async function jt(t,r,i,e=0,n=!1){let s=0,a=[];return I(t,(f,{replaceWith:u})=>{if(f.kind==="at-rule"&&(f.name==="@import"||f.name==="@reference")){let c=Tn(q(f.params));if(c===null)return;f.name==="@reference"&&(c.media="reference"),s|=2;let{uri:d,layer:m,media:g,supports:w}=c;if(d.startsWith("data:")||d.startsWith("http://")||d.startsWith("https://"))return;let v=se({},[]);return a.push((async()=>{if(e>100)throw new Error(`Exceeded maximum recursion depth while resolving \`${d}\` in \`${r}\`)`);let x=await i(d,r),y=ve(x.content,{from:n?x.path:void 0});await jt(y,x.base,i,e+1,n),v.nodes=Rn(f,[se({base:x.base},y)],m,g,w)})()),u(v),1}}),a.length>0&&await Promise.all(a),s}function Tn(t){let r,i=null,e=null,n=null;for(let s=0;s/g,"1")),e[0]==="opacity"&&(typeof n=="number"||typeof n=="string")){let a=typeof n=="string"?parseFloat(n):n;a>=0&&a<=1&&(n=a*100+"%")}let s=ct(e);s&&t.theme.add(`--${s}`,""+n,7)}if(Object.hasOwn(r,"fontFamily")){let e=5;{let n=Te(r.fontFamily.sans);n&&t.theme.hasDefault("--font-sans")&&(t.theme.add("--default-font-family",n,e),t.theme.add("--default-font-feature-settings",Te(r.fontFamily.sans,"fontFeatureSettings")??"normal",e),t.theme.add("--default-font-variation-settings",Te(r.fontFamily.sans,"fontVariationSettings")??"normal",e))}{let n=Te(r.fontFamily.mono);n&&t.theme.hasDefault("--font-mono")&&(t.theme.add("--default-mono-font-family",n,e),t.theme.add("--default-mono-font-feature-settings",Te(r.fontFamily.mono,"fontFeatureSettings")??"normal",e),t.theme.add("--default-mono-font-variation-settings",Te(r.fontFamily.mono,"fontVariationSettings")??"normal",e))}}return r}function Pn(t){let r=[];return Fr(t,[],(i,e)=>{if(_n(i))return r.push([e,i]),1;if(Dn(i)){r.push([e,i[0]]);for(let n of Reflect.ownKeys(i[1]))r.push([[...e,`-${n}`],i[1][n]]);return 1}if(Array.isArray(i)&&i.every(n=>typeof n=="string"))return e[0]==="fontSize"?(r.push([e,i[0]]),i.length>=2&&r.push([[...e,"-line-height"],i[1]])):r.push([e,i.join(", ")]),1}),r}var On=/^[a-zA-Z0-9-_%/\.]+$/;function ct(t){if(t[0]==="container")return null;t=structuredClone(t),t[0]==="animation"&&(t[0]="animate"),t[0]==="aspectRatio"&&(t[0]="aspect"),t[0]==="borderRadius"&&(t[0]="radius"),t[0]==="boxShadow"&&(t[0]="shadow"),t[0]==="colors"&&(t[0]="color"),t[0]==="containers"&&(t[0]="container"),t[0]==="fontFamily"&&(t[0]="font"),t[0]==="fontSize"&&(t[0]="text"),t[0]==="letterSpacing"&&(t[0]="tracking"),t[0]==="lineHeight"&&(t[0]="leading"),t[0]==="maxWidth"&&(t[0]="container"),t[0]==="screens"&&(t[0]="breakpoint"),t[0]==="transitionTimingFunction"&&(t[0]="ease");for(let r of t)if(!On.test(r))return null;return t.map((r,i,e)=>r==="1"&&i!==e.length-1?"":r).map(r=>r.replaceAll(".","_").replace(/([a-z])([A-Z])/g,(i,e,n)=>`${e}-${n.toLowerCase()}`)).filter((r,i)=>r!=="DEFAULT"||i!==t.length-1).join("-")}function _n(t){return typeof t=="number"||typeof t=="string"}function Dn(t){if(!Array.isArray(t)||t.length!==2||typeof t[0]!="string"&&typeof t[0]!="number"||t[1]===void 0||t[1]===null||typeof t[1]!="object")return!1;for(let r of Reflect.ownKeys(t[1]))if(typeof r!="string"||typeof t[1][r]!="string"&&typeof t[1][r]!="number")return!1;return!0}function Fr(t,r=[],i){for(let e of Reflect.ownKeys(t)){let n=t[e];if(n==null)continue;let s=[...r,e],a=i(n,s)??0;if(a!==1){if(a===2)return 2;if(!(!Array.isArray(n)&&typeof n!="object")&&Fr(n,s,i)===2)return 2}}}function ft(t){let r=[];for(let i of D(t,".")){if(!i.includes("[")){r.push(i);continue}let e=0;for(;;){let n=i.indexOf("[",e),s=i.indexOf("]",n);if(n===-1||s===-1)break;n>e&&r.push(i.slice(e,n)),r.push(i.slice(n+1,s)),e=s+1}e<=i.length-1&&r.push(i.slice(e))}return r}function Re(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;let r=Object.getPrototypeOf(t);return r===null||Object.getPrototypeOf(r)===null}function Ie(t,r,i,e=[]){for(let n of r)if(n!=null)for(let s of Reflect.ownKeys(n)){e.push(s);let a=i(t[s],n[s],e);a!==void 0?t[s]=a:!Re(t[s])||!Re(n[s])?t[s]=n[s]:t[s]=Ie({},[t[s],n[s]],i,e),e.pop()}return t}function pt(t,r,i){return function(n,s){let a=n.lastIndexOf("/"),f=null;a!==-1&&(f=n.slice(a+1).trim(),n=n.slice(0,a).trim());let u=(()=>{let c=ft(n),[d,m]=Kn(t.theme,c),g=i(Mr(r()??{},c)??null);if(typeof g=="string"&&(g=g.replace("","1")),typeof d!="object")return typeof m!="object"&&m&4?g??d:d;if(g!==null&&typeof g=="object"&&!Array.isArray(g)){let w=Ie({},[g],(v,x)=>x);if(d===null&&Object.hasOwn(g,"__CSS_VALUES__")){let v={};for(let x in g.__CSS_VALUES__)v[x]=g[x],delete w[x];d=v}for(let v in d)v!=="__CSS_VALUES__"&&(g?.__CSS_VALUES__?.[v]&4&&Mr(w,v.split("-"))!==void 0||(w[we(v)]=d[v]));return w}if(Array.isArray(d)&&Array.isArray(m)&&Array.isArray(g)){let w=d[0],v=d[1];m[0]&4&&(w=g[0]??w);for(let x of Object.keys(v))m[1][x]&4&&(v[x]=g[1][x]??v[x]);return[w,v]}return d??g})();return f&&typeof u=="string"&&(u=Q(u,f)),u??s}}function Kn(t,r){if(r.length===1&&r[0].startsWith("--"))return[t.get([r[0]]),t.getOptions(r[0])];let i=ct(r),e=new Map,n=new B(()=>new Map),s=t.namespace(`--${i}`);if(s.size===0)return[null,0];let a=new Map;for(let[d,m]of s){if(!d||!d.includes("--")){e.set(d,m),a.set(d,t.getOptions(d?`--${i}-${d}`:`--${i}`));continue}let g=d.indexOf("--"),w=d.slice(0,g),v=d.slice(g+2);v=v.replace(/-([a-z])/g,(x,y)=>y.toUpperCase()),n.get(w===""?null:w).set(v,[m,t.getOptions(`--${i}${d}`)])}let f=t.getOptions(`--${i}`);for(let[d,m]of n){let g=e.get(d);if(typeof g!="string")continue;let w={},v={};for(let[x,[y,V]]of m)w[x]=y,v[x]=V;e.set(d,[g,w]),a.set(d,[f,v])}let u={},c={};for(let[d,m]of e)Wr(u,[d??"DEFAULT"],m);for(let[d,m]of a)Wr(c,[d??"DEFAULT"],m);return r[r.length-1]==="DEFAULT"?[u?.DEFAULT??null,c.DEFAULT??0]:"DEFAULT"in u&&Object.keys(u).length===1?[u.DEFAULT,c.DEFAULT??0]:(u.__CSS_VALUES__=c,[u,c])}function Mr(t,r){for(let i=0;i0){let g=ze(n);e?e.nodes.push(g):r.push(g),n=""}let u=a,c=a+1;for(;c0){let c=ze(n);u.nodes.push(c),n=""}i.length>0?e=i[i.length-1]:e=null;break}case Wn:case Fn:case Bn:{if(n.length>0){let u=ze(n);e?e.nodes.push(u):r.push(u)}n=String.fromCharCode(f);break}case Zr:{if(n.length>0){let d=ze(n);e?e.nodes.push(d):r.push(d)}n="";let u=a,c=0;for(let d=a+1;d0&&r.push(ze(n)),r}var ri=/^[a-z@][a-zA-Z0-9/%._-]*$/;function It({designSystem:t,ast:r,resolvedConfig:i,featuresRef:e,referenceMode:n}){let s={addBase(a){if(n)return;let f=ue(a);e.current|=Ve(f,t),r.push(F("@layer","base",f))},addVariant(a,f){if(!ut.test(a))throw new Error(`\`addVariant('${a}')\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);if(typeof f=="string"){if(f.includes(":merge("))return}else if(Array.isArray(f)){if(f.some(c=>c.includes(":merge(")))return}else if(typeof f=="object"){let c=function(d,m){return Object.entries(d).some(([g,w])=>g.includes(m)||typeof w=="object"&&c(w,m))};var u=c;if(c(f,":merge("))return}typeof f=="string"||Array.isArray(f)?t.variants.static(a,c=>{c.nodes=ii(f,c.nodes)},{compounds:Ae(typeof f=="string"?[f]:f)}):typeof f=="object"&&t.variants.fromAst(a,ue(f))},matchVariant(a,f,u){function c(m,g,w){let v=f(m,{modifier:g?.value??null});return ii(v,w)}try{let m=f("a",{modifier:null});if(typeof m=="string"&&m.includes(":merge("))return;if(Array.isArray(m)&&m.some(g=>g.includes(":merge(")))return}catch{}let d=Object.keys(u?.values??{});t.variants.group(()=>{t.variants.functional(a,(m,g)=>{if(!g.value){if(u?.values&&"DEFAULT"in u.values){m.nodes=c(u.values.DEFAULT,g.modifier,m.nodes);return}return null}if(g.value.kind==="arbitrary")m.nodes=c(g.value.value,g.modifier,m.nodes);else if(g.value.kind==="named"&&u?.values){let w=u.values[g.value.value];if(typeof w!="string")return;m.nodes=c(w,g.modifier,m.nodes)}})},(m,g)=>{if(m.kind!=="functional"||g.kind!=="functional")return 0;let w=m.value?m.value.value:"DEFAULT",v=g.value?g.value.value:"DEFAULT",x=u?.values?.[w]??w,y=u?.values?.[v]??v;if(u&&typeof u.sort=="function")return u.sort({value:x,modifier:m.modifier?.value??null},{value:y,modifier:g.modifier?.value??null});let V=d.indexOf(w),b=d.indexOf(v);return V=V===-1?d.length:V,b=b===-1?d.length:b,V!==b?V-b:xObject.entries(c));f=f.flatMap(([c,d])=>D(c,",").map(m=>[m.trim(),d]));let u=new B(()=>[]);for(let[c,d]of f){if(c.startsWith("@keyframes ")){n||r.push(G(c,ue(d)));continue}let m=dt(c),g=!1;if(Fe(m,w=>{if(w.kind==="selector"&&w.value[0]==="."&&ri.test(w.value.slice(1))){let v=w.value;w.value="&";let x=Me(m),y=v.slice(1),V=x==="&"?ue(d):[G(x,ue(d))];u.get(y).push(...V),g=!0,w.value=v;return}if(w.kind==="function"&&w.value===":not")return 1}),!g)throw new Error(`\`addUtilities({ '${c}' : \u2026 })\` defines an invalid utility selector. Utilities must be a single class name and start with a lowercase letter, eg. \`.scrollbar-none\`.`)}for(let[c,d]of u)t.theme.prefix&&I(d,m=>{if(m.kind==="rule"){let g=dt(m.selector);Fe(g,w=>{w.kind==="selector"&&w.value[0]==="."&&(w.value=`.${t.theme.prefix}\\:${w.value.slice(1)}`)}),m.selector=Me(g)}}),t.utilities.static(c,m=>{let g=structuredClone(d);return ni(g,c,m.raw),e.current|=je(g,t),g})},matchUtilities(a,f){let u=f?.type?Array.isArray(f?.type)?f.type:[f.type]:["any"];for(let[d,m]of Object.entries(a)){let g=function({negative:w}){return v=>{if(v.value?.kind==="arbitrary"&&u.length>0&&!u.includes("any")&&(v.value.dataType&&!u.includes(v.value.dataType)||!v.value.dataType&&!Y(v.value.value,u)))return;let x=u.includes("color"),y=null,V=!1;{let R=f?.values??{};x&&(R=Object.assign({inherit:"inherit",transparent:"transparent",current:"currentcolor"},R)),v.value?v.value.kind==="arbitrary"?y=v.value.value:v.value.fraction&&R[v.value.fraction]?(y=R[v.value.fraction],V=!0):R[v.value.value]?y=R[v.value.value]:R.__BARE_VALUE__&&(y=R.__BARE_VALUE__(v.value)??null,V=(v.value.fraction!==null&&y?.includes("/"))??!1):y=R.DEFAULT??null}if(y===null)return;let b;{let R=f?.modifiers??null;v.modifier?R==="any"||v.modifier.kind==="arbitrary"?b=v.modifier.value:R?.[v.modifier.value]?b=R[v.modifier.value]:x&&!Number.isNaN(Number(v.modifier.value))?b=`${v.modifier.value}%`:b=null:b=null}if(v.modifier&&b===null&&!V)return v.value?.kind==="arbitrary"?null:void 0;x&&b!==null&&(y=Q(y,b)),w&&(y=`calc(${y} * -1)`);let S=ue(m(y,{modifier:b}));return ni(S,d,v.raw),e.current|=je(S,t),S}};var c=g;if(!ri.test(d))throw new Error(`\`matchUtilities({ '${d}' : \u2026 })\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter, eg. \`scrollbar\`.`);f?.supportsNegativeValues&&t.utilities.functional(`-${d}`,g({negative:!0}),{types:u}),t.utilities.functional(d,g({negative:!1}),{types:u}),t.utilities.suggest(d,()=>{let w=f?.values??{},v=new Set(Object.keys(w));v.delete("__BARE_VALUE__"),v.has("DEFAULT")&&(v.delete("DEFAULT"),v.add(null));let x=f?.modifiers??{},y=x==="any"?[]:Object.keys(x);return[{supportsNegative:f?.supportsNegativeValues??!1,values:Array.from(v),modifiers:y}]})}},addComponents(a,f){this.addUtilities(a,f)},matchComponents(a,f){this.matchUtilities(a,f)},theme:pt(t,()=>i.theme??{},a=>a),prefix(a){return a},config(a,f){let u=i;if(!a)return u;let c=ft(a);for(let d=0;dObject.entries(e));for(let[e,n]of i)if(typeof n!="object"){if(!e.startsWith("--")){if(n==="@slot"){r.push(G(e,[F("@slot")]));continue}e=e.replace(/([A-Z])/g,"-$1").toLowerCase()}r.push(l(e,String(n)))}else if(Array.isArray(n))for(let s of n)typeof s=="string"?r.push(l(e,s)):r.push(G(e,ue(s)));else n!==null&&r.push(G(e,ue(n)));return r}function ii(t,r){return(typeof t=="string"?[t]:t).flatMap(e=>{if(e.trim().endsWith("}")){let n=e.replace("}","{@slot}}"),s=ve(n);return Ut(s,r),s}else return G(e,r)})}function ni(t,r,i){I(t,e=>{if(e.kind==="rule"){let n=dt(e.selector);Fe(n,s=>{s.kind==="selector"&&s.value===`.${r}`&&(s.value=`.${de(i)}`)}),e.selector=Me(n)}})}function oi(t,r,i){for(let e of Gn(r))t.theme.addKeyframes(e)}function Gn(t){let r=[];if("keyframes"in t.theme)for(let[i,e]of Object.entries(t.theme.keyframes))r.push(F("@keyframes",i,ue(e)));return r}var mt={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};function Ce(t){return{__BARE_VALUE__:t}}var le=Ce(t=>{if(T(t.value))return t.value}),re=Ce(t=>{if(T(t.value))return`${t.value}%`}),he=Ce(t=>{if(T(t.value))return`${t.value}px`}),li=Ce(t=>{if(T(t.value))return`${t.value}ms`}),gt=Ce(t=>{if(T(t.value))return`${t.value}deg`}),Yn=Ce(t=>{if(t.fraction===null)return;let[r,i]=D(t.fraction,"/");if(!(!T(r)||!T(i)))return t.fraction}),ai=Ce(t=>{if(T(Number(t.value)))return`repeat(${t.value}, minmax(0, 1fr))`}),si={accentColor:({theme:t})=>t("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...Yn},backdropBlur:({theme:t})=>t("blur"),backdropBrightness:({theme:t})=>({...t("brightness"),...re}),backdropContrast:({theme:t})=>({...t("contrast"),...re}),backdropGrayscale:({theme:t})=>({...t("grayscale"),...re}),backdropHueRotate:({theme:t})=>({...t("hueRotate"),...gt}),backdropInvert:({theme:t})=>({...t("invert"),...re}),backdropOpacity:({theme:t})=>({...t("opacity"),...re}),backdropSaturate:({theme:t})=>({...t("saturate"),...re}),backdropSepia:({theme:t})=>({...t("sepia"),...re}),backgroundColor:({theme:t})=>t("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:t})=>t("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:t})=>({DEFAULT:"currentcolor",...t("colors")}),borderOpacity:({theme:t})=>t("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:t})=>t("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...he},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:t})=>t("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...re},caretColor:({theme:t})=>t("colors"),colors:()=>({...mt}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...le},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...re},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:t})=>t("borderColor"),divideOpacity:({theme:t})=>t("borderOpacity"),divideWidth:({theme:t})=>({...t("borderWidth"),...he}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:t})=>t("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...t("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...le},flexShrink:{0:"0",DEFAULT:"1",...le},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:t})=>t("spacing"),gradientColorStops:({theme:t})=>t("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...re},grayscale:{0:"0",DEFAULT:"100%",...re},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...le},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...le},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...le},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...le},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ai},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ai},height:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...gt},inset:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...t("spacing")}),invert:{0:"0",DEFAULT:"100%",...re},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...le},maxHeight:({theme:t})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),maxWidth:({theme:t})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t("spacing")}),minHeight:({theme:t})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),minWidth:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...re},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...le},outlineColor:({theme:t})=>t("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},padding:({theme:t})=>t("spacing"),placeholderColor:({theme:t})=>t("colors"),placeholderOpacity:({theme:t})=>t("opacity"),ringColor:({theme:t})=>({DEFAULT:"currentcolor",...t("colors")}),ringOffsetColor:({theme:t})=>t("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},ringOpacity:({theme:t})=>({DEFAULT:"0.5",...t("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...gt},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...re},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...re},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:t})=>t("spacing"),scrollPadding:({theme:t})=>t("spacing"),sepia:{0:"0",DEFAULT:"100%",...re},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...gt},space:({theme:t})=>t("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:t})=>({none:"none",...t("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...le},supports:{},data:{},textColor:({theme:t})=>t("colors"),textDecorationColor:({theme:t})=>t("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},textIndent:({theme:t})=>t("spacing"),textOpacity:({theme:t})=>t("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...li},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...li},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:t})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...t("spacing")}),size:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),width:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...le}};function ui(t){return{theme:{...si,colors:({theme:r})=>r("color",{}),extend:{fontSize:({theme:r})=>({...r("text",{})}),boxShadow:({theme:r})=>({...r("shadow",{})}),animation:({theme:r})=>({...r("animate",{})}),aspectRatio:({theme:r})=>({...r("aspect",{})}),borderRadius:({theme:r})=>({...r("radius",{})}),screens:({theme:r})=>({...r("breakpoint",{})}),letterSpacing:({theme:r})=>({...r("tracking",{})}),lineHeight:({theme:r})=>({...r("leading",{})}),transitionDuration:{DEFAULT:t.get(["--default-transition-duration"])??null},transitionTimingFunction:{DEFAULT:t.get(["--default-transition-timing-function"])??null},maxWidth:({theme:r})=>({...r("container",{})})}}}}var Zn={blocklist:[],future:{},prefix:"",important:!1,darkMode:null,theme:{},plugins:[],content:{files:[]}};function Ft(t,r){let i={design:t,configs:[],plugins:[],content:{files:[]},theme:{},extend:{},result:structuredClone(Zn)};for(let n of r)zt(i,n);for(let n of i.configs)"darkMode"in n&&n.darkMode!==void 0&&(i.result.darkMode=n.darkMode??null),"prefix"in n&&n.prefix!==void 0&&(i.result.prefix=n.prefix??""),"blocklist"in n&&n.blocklist!==void 0&&(i.result.blocklist=n.blocklist??[]),"important"in n&&n.important!==void 0&&(i.result.important=n.important??!1);let e=Qn(i);return{resolvedConfig:{...i.result,content:i.content,theme:i.theme,plugins:i.plugins},replacedThemeKeys:e}}function Jn(t,r){if(Array.isArray(t)&&Re(t[0]))return t.concat(r);if(Array.isArray(r)&&Re(r[0])&&Re(t))return[t,...r];if(Array.isArray(r))return r}function zt(t,{config:r,base:i,path:e,reference:n}){let s=[];for(let u of r.plugins??[])"__isOptionsFunction"in u?s.push({...u(),reference:n}):"handler"in u?s.push({...u,reference:n}):s.push({handler:u,reference:n});if(Array.isArray(r.presets)&&r.presets.length===0)throw new Error("Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.");for(let u of r.presets??[])zt(t,{path:e,base:i,config:u,reference:n});for(let u of s)t.plugins.push(u),u.config&&zt(t,{path:e,base:i,config:u.config,reference:!!u.reference});let a=r.content??[],f=Array.isArray(a)?a:a.files;for(let u of f)t.content.files.push(typeof u=="object"?u:{base:i,pattern:u});t.configs.push(r)}function Qn(t){let r=new Set,i=pt(t.design,()=>t.theme,n),e=Object.assign(i,{theme:i,colors:mt});function n(s){return typeof s=="function"?s(e)??null:s??null}for(let s of t.configs){let a=s.theme??{},f=a.extend??{};for(let u in a)u!=="extend"&&r.add(u);Object.assign(t.theme,a);for(let u in f)t.extend[u]??=[],t.extend[u].push(f[u])}delete t.theme.extend;for(let s in t.extend){let a=[t.theme[s],...t.extend[s]];t.theme[s]=()=>{let f=a.map(n);return Ie({},f,Jn)}}for(let s in t.theme)t.theme[s]=n(t.theme[s]);if(t.theme.screens&&typeof t.theme.screens=="object")for(let s of Object.keys(t.theme.screens)){let a=t.theme.screens[s];a&&typeof a=="object"&&("raw"in a||"max"in a||"min"in a&&(t.theme.screens[s]=a.min))}return r}function ci(t,r){let i=t.theme.container||{};if(typeof i!="object"||i===null)return;let e=Xn(i,r);e.length!==0&&r.utilities.static("container",()=>structuredClone(e))}function Xn({center:t,padding:r,screens:i},e){let n=[],s=null;if(t&&n.push(l("margin-inline","auto")),(typeof r=="string"||typeof r=="object"&&r!==null&&"DEFAULT"in r)&&n.push(l("padding-inline",typeof r=="string"?r:r.DEFAULT)),typeof i=="object"&&i!==null){s=new Map;let a=Array.from(e.theme.namespace("--breakpoint").entries());if(a.sort((f,u)=>ye(f[1],u[1],"asc")),a.length>0){let[f]=a[0];n.push(F("@media",`(width >= --theme(--breakpoint-${f}))`,[l("max-width","none")]))}for(let[f,u]of Object.entries(i)){if(typeof u=="object")if("min"in u)u=u.min;else continue;s.set(f,F("@media",`(width >= ${u})`,[l("max-width",u)]))}}if(typeof r=="object"&&r!==null){let a=Object.entries(r).filter(([f])=>f!=="DEFAULT").map(([f,u])=>[f,e.theme.resolveValue(f,["--breakpoint"]),u]).filter(Boolean);a.sort((f,u)=>ye(f[1],u[1],"asc"));for(let[f,,u]of a)if(s&&s.has(f))s.get(f).nodes.push(l("padding-inline",u));else{if(s)continue;n.push(F("@media",`(width >= theme(--breakpoint-${f}))`,[l("padding-inline",u)]))}}if(s)for(let[,a]of s)n.push(a);return n}function fi({addVariant:t,config:r}){let i=r("darkMode",null),[e,n=".dark"]=Array.isArray(i)?i:[i];if(e==="variant"){let s;if(Array.isArray(n)||typeof n=="function"?s=n:typeof n=="string"&&(s=[n]),Array.isArray(s))for(let a of s)a===".dark"?(e=!1,console.warn('When using `variant` for `darkMode`, you must provide a selector.\nExample: `darkMode: ["variant", ".your-selector &"]`')):a.includes("&")||(e=!1,console.warn('When using `variant` for `darkMode`, your selector must contain `&`.\nExample `darkMode: ["variant", ".your-selector &"]`'));n=s}e===null||(e==="selector"?t("dark",`&:where(${n}, ${n} *)`):e==="media"?t("dark","@media (prefers-color-scheme: dark)"):e==="variant"?t("dark",n):e==="class"&&t("dark",`&:is(${n} *)`))}function pi(t){for(let[r,i]of[["t","top"],["tr","top right"],["r","right"],["br","bottom right"],["b","bottom"],["bl","bottom left"],["l","left"],["tl","top left"]])t.utilities.static(`bg-gradient-to-${r}`,()=>[l("--tw-gradient-position",`to ${i} in oklab`),l("background-image","linear-gradient(var(--tw-gradient-stops))")]);t.utilities.static("bg-left-top",()=>[l("background-position","left top")]),t.utilities.static("bg-right-top",()=>[l("background-position","right top")]),t.utilities.static("bg-left-bottom",()=>[l("background-position","left bottom")]),t.utilities.static("bg-right-bottom",()=>[l("background-position","right bottom")]),t.utilities.static("object-left-top",()=>[l("object-position","left top")]),t.utilities.static("object-right-top",()=>[l("object-position","right top")]),t.utilities.static("object-left-bottom",()=>[l("object-position","left bottom")]),t.utilities.static("object-right-bottom",()=>[l("object-position","right bottom")]),t.utilities.functional("max-w-screen",r=>{if(!r.value||r.value.kind==="arbitrary")return;let i=t.theme.resolve(r.value.value,["--breakpoint"]);if(i)return[l("max-width",i)]}),t.utilities.static("overflow-ellipsis",()=>[l("text-overflow","ellipsis")]),t.utilities.static("decoration-slice",()=>[l("-webkit-box-decoration-break","slice"),l("box-decoration-break","slice")]),t.utilities.static("decoration-clone",()=>[l("-webkit-box-decoration-break","clone"),l("box-decoration-break","clone")]),t.utilities.functional("flex-shrink",r=>{if(!r.modifier){if(!r.value)return[l("flex-shrink","1")];if(r.value.kind==="arbitrary")return[l("flex-shrink",r.value.value)];if(T(r.value.value))return[l("flex-shrink",r.value.value)]}}),t.utilities.functional("flex-grow",r=>{if(!r.modifier){if(!r.value)return[l("flex-grow","1")];if(r.value.kind==="arbitrary")return[l("flex-grow",r.value.value)];if(T(r.value.value))return[l("flex-grow",r.value.value)]}}),t.utilities.static("order-none",()=>[l("order","0")])}function di(t,r){let i=t.theme.screens||{},e=r.variants.get("min")?.order??0,n=[];for(let[a,f]of Object.entries(i)){let g=function(w){r.variants.static(a,v=>{v.nodes=[F("@media",m,v.nodes)]},{order:w})};var s=g;let u=r.variants.get(a),c=r.theme.resolveValue(a,["--breakpoint"]);if(u&&c&&!r.theme.hasDefault(`--breakpoint-${a}`))continue;let d=!0;typeof f=="string"&&(d=!1);let m=eo(f);d?n.push(g):g(e)}if(n.length!==0){for(let[,a]of r.variants.variants)a.order>e&&(a.order+=n.length);r.variants.compareFns=new Map(Array.from(r.variants.compareFns).map(([a,f])=>(a>e&&(a+=n.length),[a,f])));for(let[a,f]of n.entries())f(e+a+1)}}function eo(t){return(Array.isArray(t)?t:[t]).map(i=>typeof i=="string"?{min:i}:i&&typeof i=="object"?i:null).map(i=>{if(i===null)return null;if("raw"in i)return i.raw;let e="";return i.max!==void 0&&(e+=`${i.max} >= `),e+="width",i.min!==void 0&&(e+=` >= ${i.min}`),`(${e})`}).filter(Boolean).join(", ")}function mi(t,r){let i=t.theme.aria||{},e=t.theme.supports||{},n=t.theme.data||{};if(Object.keys(i).length>0){let s=r.variants.get("aria"),a=s?.applyFn,f=s?.compounds;r.variants.functional("aria",(u,c)=>{let d=c.value;return d&&d.kind==="named"&&d.value in i?a?.(u,{...c,value:{kind:"arbitrary",value:i[d.value]}}):a?.(u,c)},{compounds:f})}if(Object.keys(e).length>0){let s=r.variants.get("supports"),a=s?.applyFn,f=s?.compounds;r.variants.functional("supports",(u,c)=>{let d=c.value;return d&&d.kind==="named"&&d.value in e?a?.(u,{...c,value:{kind:"arbitrary",value:e[d.value]}}):a?.(u,c)},{compounds:f})}if(Object.keys(n).length>0){let s=r.variants.get("data"),a=s?.applyFn,f=s?.compounds;r.variants.functional("data",(u,c)=>{let d=c.value;return d&&d.kind==="named"&&d.value in n?a?.(u,{...c,value:{kind:"arbitrary",value:n[d.value]}}):a?.(u,c)},{compounds:f})}}var to=/^[a-z]+$/;async function hi({designSystem:t,base:r,ast:i,loadModule:e,sources:n}){let s=0,a=[],f=[];I(i,(m,{parent:g,replaceWith:w,context:v})=>{if(m.kind==="at-rule"){if(m.name==="@plugin"){if(g!==null)throw new Error("`@plugin` cannot be nested.");let x=m.params.slice(1,-1);if(x.length===0)throw new Error("`@plugin` must have a path.");let y={};for(let V of m.nodes??[]){if(V.kind!=="declaration")throw new Error(`Unexpected \`@plugin\` option: + +${oe([V])} + +\`@plugin\` options must be a flat list of declarations.`);if(V.value===void 0)continue;let b=V.value,S=D(b,",").map(R=>{if(R=R.trim(),R==="null")return null;if(R==="true")return!0;if(R==="false")return!1;if(Number.isNaN(Number(R))){if(R[0]==='"'&&R[R.length-1]==='"'||R[0]==="'"&&R[R.length-1]==="'")return R.slice(1,-1);if(R[0]==="{"&&R[R.length-1]==="}")throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${oe([V]).trim()}\` is not supported. + +Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(R);return R});y[V.property]=S.length===1?S[0]:S}a.push([{id:x,base:v.base,reference:!!v.reference},Object.keys(y).length>0?y:null]),w([]),s|=4;return}if(m.name==="@config"){if(m.nodes.length>0)throw new Error("`@config` cannot have a body.");if(g!==null)throw new Error("`@config` cannot be nested.");f.push({id:m.params.slice(1,-1),base:v.base,reference:!!v.reference}),w([]),s|=4;return}}}),pi(t);let u=t.resolveThemeValue;if(t.resolveThemeValue=function(g,w){return g.startsWith("--")?u(g,w):(s|=gi({designSystem:t,base:r,ast:i,sources:n,configs:[],pluginDetails:[]}),t.resolveThemeValue(g,w))},!a.length&&!f.length)return 0;let[c,d]=await Promise.all([Promise.all(f.map(async({id:m,base:g,reference:w})=>{let v=await e(m,g,"config");return{path:m,base:v.base,config:v.module,reference:w}})),Promise.all(a.map(async([{id:m,base:g,reference:w},v])=>{let x=await e(m,g,"plugin");return{path:m,base:x.base,plugin:x.module,options:v,reference:w}}))]);return s|=gi({designSystem:t,base:r,ast:i,sources:n,configs:c,pluginDetails:d}),s}function gi({designSystem:t,base:r,ast:i,sources:e,configs:n,pluginDetails:s}){let a=0,u=[...s.map(y=>{if(!y.options)return{config:{plugins:[y.plugin]},base:y.base,reference:y.reference};if("__isOptionsFunction"in y.plugin)return{config:{plugins:[y.plugin(y.options)]},base:y.base,reference:y.reference};throw new Error(`The plugin "${y.path}" does not accept options`)}),...n],{resolvedConfig:c}=Ft(t,[{config:ui(t.theme),base:r,reference:!0},...u,{config:{plugins:[fi]},base:r,reference:!0}]),{resolvedConfig:d,replacedThemeKeys:m}=Ft(t,u),g=t.resolveThemeValue;t.resolveThemeValue=function(V,b){if(V[0]==="-"&&V[1]==="-")return g(V,b);let S=v.theme(V,void 0);if(Array.isArray(S)&&S.length===2)return S[0];if(Array.isArray(S))return S.join(", ");if(typeof S=="string")return S};let w={designSystem:t,ast:i,resolvedConfig:c,featuresRef:{set current(y){a|=y}}},v=It({...w,referenceMode:!1}),x;for(let{handler:y,reference:V}of c.plugins)V?(x||=It({...w,referenceMode:!0}),y(x)):y(v);if(zr(t,d,m),oi(t,d,m),mi(d,t),di(d,t),ci(d,t),!t.theme.prefix&&c.prefix){if(c.prefix.endsWith("-")&&(c.prefix=c.prefix.slice(0,-1),console.warn(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)),!to.test(c.prefix))throw new Error(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);t.theme.prefix=c.prefix}if(!t.important&&c.important===!0&&(t.important=!0),typeof c.important=="string"){let y=c.important;I(i,(V,{replaceWith:b,parent:S})=>{if(V.kind==="at-rule"&&!(V.name!=="@tailwind"||V.params!=="utilities"))return S?.kind==="rule"&&S.selector===y?2:(b(M(y,[V])),2)})}for(let y of c.blocklist)t.invalidCandidates.add(y);for(let y of c.content.files){if("raw"in y)throw new Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry: + +${JSON.stringify(y,null,2)} + +This feature is not currently supported.`);let V=!1;y.pattern[0]=="!"&&(V=!0,y.pattern=y.pattern.slice(1)),e.push({...y,negated:V})}return a}function vi(t){let r=[0];for(let n=0;n0;){let u=(a|0)>>1,c=s+u;r[c]<=n?(s=c+1,a=a-u-1):a=u}s-=1;let f=n-r[s];return{line:s+1,column:f}}function e({line:n,column:s}){n-=1,n=Math.min(Math.max(n,0),r.length-1);let a=r[n],f=r[n+1]??a;return Math.min(Math.max(a+s,0),f)}return{find:i,findOffset:e}}function wi({ast:t}){let r=new B(n=>vi(n.code)),i=new B(n=>({url:n.file,content:n.code,ignore:!1})),e={file:null,sources:[],mappings:[]};I(t,n=>{if(!n.src||!n.dst)return;let s=i.get(n.src[0]);if(!s.content)return;let a=r.get(n.src[0]),f=r.get(n.dst[0]),u=s.content.slice(n.src[1],n.src[2]),c=0;for(let g of u.split(` +`)){if(g.trim()!==""){let w=a.find(n.src[1]+c),v=f.find(n.dst[1]);e.mappings.push({name:null,originalPosition:{source:s,...w},generatedPosition:v})}c+=g.length,c+=1}let d=a.find(n.src[2]),m=f.find(n.dst[2]);e.mappings.push({name:null,originalPosition:{source:s,...d},generatedPosition:m})});for(let n of r.keys())e.sources.push(i.get(n));return e.mappings.sort((n,s)=>n.generatedPosition.line-s.generatedPosition.line||n.generatedPosition.column-s.generatedPosition.column||(n.originalPosition?.line??0)-(s.originalPosition?.line??0)||(n.originalPosition?.column??0)-(s.originalPosition?.column??0)),e}var ki=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function ht(t){let r=t.indexOf("{");if(r===-1)return[t];let i=[],e=t.slice(0,r),n=t.slice(r),s=0,a=n.lastIndexOf("}");for(let m=0;mht(m));let d=ht(u);for(let m of d)for(let g of c)i.push(e+g+m);return i}function ro(t){return ki.test(t)}function io(t){let r=t.match(ki);if(!r)return[t];let[,i,e,n]=r,s=n?parseInt(n,10):void 0,a=[];if(/^-?\d+$/.test(i)&&/^-?\d+$/.test(e)){let f=parseInt(i,10),u=parseInt(e,10);if(s===void 0&&(s=f<=u?1:-1),s===0)throw new Error("Step cannot be zero in sequence expansion.");let c=f0&&(s=-s);for(let d=f;c?d<=u:d>=u;d+=s)a.push(d.toString())}return a}var no=/^[a-z]+$/,tt=(n=>(n[n.None=0]="None",n[n.AtProperty=1]="AtProperty",n[n.ColorMix=2]="ColorMix",n[n.All=3]="All",n))(tt||{});function oo(){throw new Error("No `loadModule` function provided to `compile`")}function lo(){throw new Error("No `loadStylesheet` function provided to `compile`")}function ao(t){let r=0,i=null;for(let e of D(t," "))e==="reference"?r|=2:e==="inline"?r|=1:e==="default"?r|=4:e==="static"?r|=8:e.startsWith("prefix(")&&e.endsWith(")")&&(i=e.slice(7,-1));return[r,i]}var Se=(f=>(f[f.None=0]="None",f[f.AtApply=1]="AtApply",f[f.AtImport=2]="AtImport",f[f.JsPluginCompat=4]="JsPluginCompat",f[f.ThemeFunction=8]="ThemeFunction",f[f.Utilities=16]="Utilities",f[f.Variants=32]="Variants",f))(Se||{});async function bi(t,{base:r="",from:i,loadModule:e=oo,loadStylesheet:n=lo}={}){let s=0;t=[se({base:r},t)],s|=await jt(t,r,n,0,i!==void 0);let a=null,f=new Je,u=[],c=[],d=null,m=null,g=[],w=[],v=[],x=[],y=null;I(t,(b,{parent:S,replaceWith:R,context:L})=>{if(b.kind==="at-rule"){if(b.name==="@tailwind"&&(b.params==="utilities"||b.params.startsWith("utilities"))){if(m!==null){R([]);return}if(L.reference){R([]);return}let P=D(b.params," ");for(let K of P)if(K.startsWith("source(")){let _=K.slice(7,-1);if(_==="none"){y=_;continue}if(_[0]==='"'&&_[_.length-1]!=='"'||_[0]==="'"&&_[_.length-1]!=="'"||_[0]!=="'"&&_[0]!=='"')throw new Error("`source(\u2026)` paths must be quoted.");y={base:L.sourceBase??L.base,pattern:_.slice(1,-1)}}m=b,s|=16}if(b.name==="@utility"){if(S!==null)throw new Error("`@utility` cannot be nested.");if(b.nodes.length===0)throw new Error(`\`@utility ${b.params}\` is empty. Utilities should include at least one property.`);let P=Sr(b);if(P===null)throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`);c.push(P)}if(b.name==="@source"){if(b.nodes.length>0)throw new Error("`@source` cannot have a body.");if(S!==null)throw new Error("`@source` cannot be nested.");let P=!1,K=!1,_=b.params;if(_[0]==="n"&&_.startsWith("not ")&&(P=!0,_=_.slice(4)),_[0]==="i"&&_.startsWith("inline(")&&(K=!0,_=_.slice(7,-1)),_[0]==='"'&&_[_.length-1]!=='"'||_[0]==="'"&&_[_.length-1]!=="'"||_[0]!=="'"&&_[0]!=='"')throw new Error("`@source` paths must be quoted.");let H=_.slice(1,-1);if(K){let j=P?x:v,W=D(H," ");for(let J of W)for(let ie of ht(J))j.push(ie)}else w.push({base:L.base,pattern:H,negated:P});R([]);return}if(b.name==="@variant"&&(S===null?b.nodes.length===0?b.name="@custom-variant":(I(b.nodes,P=>{if(P.kind==="at-rule"&&P.name==="@slot")return b.name="@custom-variant",2}),b.name==="@variant"&&g.push(b)):g.push(b)),b.name==="@custom-variant"){if(S!==null)throw new Error("`@custom-variant` cannot be nested.");R([]);let[P,K]=D(b.params," ");if(!ut.test(P))throw new Error(`\`@custom-variant ${P}\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);if(b.nodes.length>0&&K)throw new Error(`\`@custom-variant ${P}\` cannot have both a selector and a body.`);if(b.nodes.length===0){if(!K)throw new Error(`\`@custom-variant ${P}\` has no selector or body.`);let _=D(K.slice(1,-1),",");if(_.length===0||_.some(W=>W.trim()===""))throw new Error(`\`@custom-variant ${P} (${_.join(",")})\` selector is invalid.`);let H=[],j=[];for(let W of _)W=W.trim(),W[0]==="@"?H.push(W):j.push(W);u.push(W=>{W.variants.static(P,J=>{let ie=[];j.length>0&&ie.push(M(j.join(", "),J.nodes));for(let o of H)ie.push(G(o,J.nodes));J.nodes=ie},{compounds:Ae([...j,...H])})});return}else{u.push(_=>{_.variants.fromAst(P,b.nodes)});return}}if(b.name==="@media"){let P=D(b.params," "),K=[];for(let _ of P)if(_.startsWith("source(")){let H=_.slice(7,-1);I(b.nodes,(j,{replaceWith:W})=>{if(j.kind==="at-rule"&&j.name==="@tailwind"&&j.params==="utilities")return j.params+=` source(${H})`,W([se({sourceBase:L.base},[j])]),2})}else if(_.startsWith("theme(")){let H=_.slice(6,-1),j=H.includes("reference");I(b.nodes,W=>{if(W.kind!=="at-rule"){if(j)throw new Error('Files imported with `@import "\u2026" theme(reference)` must only contain `@theme` blocks.\nUse `@reference "\u2026";` instead.');return 0}if(W.name==="@theme")return W.params+=" "+H,1})}else if(_.startsWith("prefix(")){let H=_.slice(7,-1);I(b.nodes,j=>{if(j.kind==="at-rule"&&j.name==="@theme")return j.params+=` prefix(${H})`,1})}else _==="important"?a=!0:_==="reference"?b.nodes=[se({reference:!0},b.nodes)]:K.push(_);K.length>0?b.params=K.join(" "):P.length>0&&R(b.nodes)}if(b.name==="@theme"){let[P,K]=ao(b.params);if(L.reference&&(P|=2),K){if(!no.test(K))throw new Error(`The prefix "${K}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);f.prefix=K}return I(b.nodes,_=>{if(_.kind==="at-rule"&&_.name==="@keyframes")return f.addKeyframes(_),1;if(_.kind==="comment")return;if(_.kind==="declaration"&&_.property.startsWith("--")){f.add(we(_.property),_.value??"",P,_.src);return}let H=oe([F(b.name,b.params,[_])]).split(` +`).map((j,W,J)=>`${W===0||W>=J.length-2?" ":">"} ${j}`).join(` +`);throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`. + +${H}`)}),d?R([]):(d=M(":root, :host",[]),d.src=b.src,R([d])),1}}});let V=Kr(f);if(a&&(V.important=a),x.length>0)for(let b of x)V.invalidCandidates.add(b);s|=await hi({designSystem:V,base:r,ast:t,loadModule:e,sources:w});for(let b of u)b(V);for(let b of c)b(V);if(d){let b=[];for(let[R,L]of V.theme.entries()){if(L.options&2)continue;let P=l(de(R),L.value);P.src=L.src,b.push(P)}let S=V.theme.getKeyframes();for(let R of S)t.push(se({theme:!0},[z([R])]));d.nodes=[se({theme:!0},b)]}if(g.length>0){for(let b of g){let S=M("&",b.nodes),R=b.params,L=V.parseVariant(R);if(L===null)throw new Error(`Cannot use \`@variant\` with unknown variant: ${R}`);if(Ee(S,L,V.variants)===null)throw new Error(`Cannot use \`@variant\` with variant: ${R}`);Object.assign(b,S)}s|=32}if(s|=Ve(t,V),s|=je(t,V),m){let b=m;b.kind="context",b.context={}}return I(t,(b,{replaceWith:S})=>{if(b.kind==="at-rule")return b.name==="@utility"&&S([]),1}),{designSystem:V,ast:t,sources:w,root:y,utilitiesNode:m,features:s,inlineCandidates:v}}async function yi(t,r={}){let{designSystem:i,ast:e,sources:n,root:s,utilitiesNode:a,features:f,inlineCandidates:u}=await bi(t,r);e.unshift(Ze(`! tailwindcss v${Mt} | MIT License | https://tailwindcss.com `));function c(v){i.invalidCandidates.add(v)}let d=new Set,m=null,g=0,w=!1;for(let v of u)i.invalidCandidates.has(v)||(d.add(v),w=!0);return{sources:n,root:s,features:f,build(v){if(f===0)return t;if(!a)return m??=be(e,i,r.polyfills),m;let x=w,y=!1;w=!1;let V=d.size;for(let S of v)if(!i.invalidCandidates.has(S))if(S[0]==="-"&&S[1]==="-"){let R=i.theme.markUsedVariable(S);x||=R,y||=R}else d.add(S),x||=d.size!==V;if(!x)return m??=be(e,i,r.polyfills),m;let b=ge(d,i,{onInvalidCandidate:c}).astNodes;return r.from&&I(b,S=>{S.src??=a.src}),!y&&g===b.length?(m??=be(e,i,r.polyfills),m):(g=b.length,a.nodes=b,m=be(e,i,r.polyfills),m)}}}async function so(t,r={}){let i=ve(t,{from:r.from}),e=await yi(i,r),n=i,s=t;return{...e,build(a){let f=e.build(a);return f===n||(s=oe(f,!!r.from),n=f),s},buildSourceMap(){return wi({ast:n})}}}async function uo(t,r={}){return(await bi(ve(t),r)).designSystem}function We(){throw new Error("It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install `@tailwindcss/postcss` and update your PostCSS configuration.")}for(let t in vt)t!=="default"&&(We[t]=vt[t]);module.exports=We; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.mjs new file mode 100644 index 0000000000000000000000000000000000000000..3ab36ba484fe32b200cd53a0768e4d60354e4bd2 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/lib.mjs @@ -0,0 +1 @@ +import{a,b,c,d,e,f}from"./chunk-4WXWQT6Y.mjs";import"./chunk-G32FJCSR.mjs";import"./chunk-HTB5LLOP.mjs";export{b as Features,a as Polyfills,e as __unstable__loadDesignSystem,d as compile,c as compileAst,f as default}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.d.mts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..6c11f7d9c7104c8ea65974778e6a97c1b5379e34 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.d.mts @@ -0,0 +1,11 @@ +export { P as PluginUtils } from './resolve-config-QUZ9b-Gn.mjs'; +import { a as PluginFn, C as Config, b as PluginWithConfig, c as PluginWithOptions } from './types-B254mqw1.mjs'; +export { d as PluginAPI, P as PluginsConfig, T as ThemeConfig } from './types-B254mqw1.mjs'; +import './colors.mjs'; + +declare function createPlugin(handler: PluginFn, config?: Partial): PluginWithConfig; +declare namespace createPlugin { + var withOptions: (pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial) => PluginWithOptions; +} + +export { Config, PluginFn as PluginCreator, createPlugin as default }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..305e84e2ec64ed4a7efada93ce8d0eca800674d7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.d.ts @@ -0,0 +1,104 @@ +import { N as NamedUtilityValue, P as PluginUtils } from './resolve-config-BIFUA2FY.js'; +import './colors-b_6i0Oi7.js'; + +type Config = UserConfig; +type PluginFn = (api: PluginAPI) => void; +type PluginWithConfig = { + handler: PluginFn; + config?: UserConfig; + /** @internal */ + reference?: boolean; +}; +type PluginWithOptions = { + (options?: T): PluginWithConfig; + __isOptionsFunction: true; +}; +type Plugin = PluginFn | PluginWithConfig | PluginWithOptions; +type PluginAPI = { + addBase(base: CssInJs): void; + addVariant(name: string, variant: string | string[] | CssInJs): void; + matchVariant(name: string, cb: (value: T | string, extra: { + modifier: string | null; + }) => string | string[], options?: { + values?: Record; + sort?(a: { + value: T | string; + modifier: string | null; + }, b: { + value: T | string; + modifier: string | null; + }): number; + }): void; + addUtilities(utilities: Record | Record[], options?: {}): void; + matchUtilities(utilities: Record CssInJs | CssInJs[]>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + addComponents(utilities: Record | Record[], options?: {}): void; + matchComponents(utilities: Record CssInJs>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + theme(path: string, defaultValue?: any): any; + config(path?: string, defaultValue?: any): any; + prefix(className: string): string; +}; +type CssInJs = { + [key: string]: string | string[] | CssInJs | CssInJs[]; +}; + +type ResolvableTo = T | ((utils: PluginUtils) => T); +type ThemeValue = ResolvableTo> | null | undefined; +type ThemeConfig = Record & { + extend?: Record; +}; +type ContentFile = string | { + raw: string; + extension?: string; +}; +type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]]; +interface UserConfig { + presets?: UserConfig[]; + theme?: ThemeConfig; + plugins?: Plugin[]; +} +interface UserConfig { + content?: ContentFile[] | { + relative?: boolean; + files: ContentFile[]; + }; +} +interface UserConfig { + darkMode?: DarkModeStrategy; +} +interface UserConfig { + prefix?: string; +} +interface UserConfig { + blocklist?: string[]; +} +interface UserConfig { + important?: boolean | string; +} +interface UserConfig { + future?: 'all' | Record; +} + +declare function createPlugin(handler: PluginFn, config?: Partial): PluginWithConfig; +declare namespace createPlugin { + var withOptions: (pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial) => PluginWithOptions; +} + +export { createPlugin as default }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.js new file mode 100644 index 0000000000000000000000000000000000000000..eca100caf8aa839dbccbcfaf890ab644a3742674 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.js @@ -0,0 +1 @@ +"use strict";function g(i,n){return{handler:i,config:n}}g.withOptions=function(i,n=()=>({})){function t(o){return{handler:i(o),config:n(o)}}return t.__isOptionsFunction=!0,t};var u=g;module.exports=u; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.mjs b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.mjs new file mode 100644 index 0000000000000000000000000000000000000000..430fa2522dee47352031d52a9e969eb131a03be9 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/plugin.mjs @@ -0,0 +1 @@ +function g(i,n){return{handler:i,config:n}}g.withOptions=function(i,n=()=>({})){function t(o){return{handler:i(o),config:n(o)}}return t.__isOptionsFunction=!0,t};var u=g;export{u as default}; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/resolve-config-BIFUA2FY.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/resolve-config-BIFUA2FY.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5d9dbe2f707a40ecff28699792fe21f997927e7b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/resolve-config-BIFUA2FY.d.ts @@ -0,0 +1,29 @@ +import { _ as _default } from './colors-b_6i0Oi7.js'; + +type NamedUtilityValue = { + kind: 'named'; + /** + * ``` + * bg-red-500 + * ^^^^^^^ + * + * w-1/2 + * ^ + * ``` + */ + value: string; + /** + * ``` + * w-1/2 + * ^^^ + * ``` + */ + fraction: string | null; +}; + +type PluginUtils = { + theme: (keypath: string, defaultValue?: any) => any; + colors: typeof _default; +}; + +export type { NamedUtilityValue as N, PluginUtils as P }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/resolve-config-QUZ9b-Gn.d.mts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/resolve-config-QUZ9b-Gn.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..e1cde16e3eced663175d9efb049bf42a799a589c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/resolve-config-QUZ9b-Gn.d.mts @@ -0,0 +1,190 @@ +import _default from './colors.mjs'; + +type ArbitraryUtilityValue = { + kind: 'arbitrary'; + /** + * ``` + * bg-[color:var(--my-color)] + * ^^^^^ + * + * bg-(color:--my-color) + * ^^^^^ + * ``` + */ + dataType: string | null; + /** + * ``` + * bg-[#0088cc] + * ^^^^^^^ + * + * bg-[var(--my_variable)] + * ^^^^^^^^^^^^^^^^^^ + * + * bg-(--my_variable) + * ^^^^^^^^^^^^^^ + * ``` + */ + value: string; +}; +type NamedUtilityValue = { + kind: 'named'; + /** + * ``` + * bg-red-500 + * ^^^^^^^ + * + * w-1/2 + * ^ + * ``` + */ + value: string; + /** + * ``` + * w-1/2 + * ^^^ + * ``` + */ + fraction: string | null; +}; +type ArbitraryModifier = { + kind: 'arbitrary'; + /** + * ``` + * bg-red-500/[50%] + * ^^^ + * ``` + */ + value: string; +}; +type NamedModifier = { + kind: 'named'; + /** + * ``` + * bg-red-500/50 + * ^^ + * ``` + */ + value: string; +}; +type ArbitraryVariantValue = { + kind: 'arbitrary'; + value: string; +}; +type NamedVariantValue = { + kind: 'named'; + value: string; +}; +type Variant = +/** + * Arbitrary variants are variants that take a selector and generate a variant + * on the fly. + * + * E.g.: `[&_p]` + */ +{ + kind: 'arbitrary'; + selector: string; + relative: boolean; +} +/** + * Static variants are variants that don't take any arguments. + * + * E.g.: `hover` + */ + | { + kind: 'static'; + root: string; +} +/** + * Functional variants are variants that can take an argument. The argument is + * either a named variant value or an arbitrary variant value. + * + * E.g.: + * + * - `aria-disabled` + * - `aria-[disabled]` + * - `@container-size` -> @container, with named value `size` + * - `@container-[inline-size]` -> @container, with arbitrary variant value `inline-size` + * - `@container` -> @container, with no value + */ + | { + kind: 'functional'; + root: string; + value: ArbitraryVariantValue | NamedVariantValue | null; + modifier: ArbitraryModifier | NamedModifier | null; +} +/** + * Compound variants are variants that take another variant as an argument. + * + * E.g.: + * + * - `has-[&_p]` + * - `group-*` + * - `peer-*` + */ + | { + kind: 'compound'; + root: string; + modifier: ArbitraryModifier | NamedModifier | null; + variant: Variant; +}; +type Candidate = +/** + * Arbitrary candidates are candidates that register utilities on the fly with + * a property and a value. + * + * E.g.: + * + * - `[color:red]` + * - `[color:red]/50` + * - `[color:red]/50!` + */ +{ + kind: 'arbitrary'; + property: string; + value: string; + modifier: ArbitraryModifier | NamedModifier | null; + variants: Variant[]; + important: boolean; + raw: string; +} +/** + * Static candidates are candidates that don't take any arguments. + * + * E.g.: + * + * - `underline` + * - `box-border` + */ + | { + kind: 'static'; + root: string; + variants: Variant[]; + important: boolean; + raw: string; +} +/** + * Functional candidates are candidates that can take an argument. + * + * E.g.: + * + * - `bg-red-500` + * - `bg-[#0088cc]` + * - `w-1/2` + */ + | { + kind: 'functional'; + root: string; + value: ArbitraryUtilityValue | NamedUtilityValue | null; + modifier: ArbitraryModifier | NamedModifier | null; + variants: Variant[]; + important: boolean; + raw: string; +}; + +type PluginUtils = { + theme: (keypath: string, defaultValue?: any) => any; + colors: typeof _default; +}; + +export type { Candidate as C, NamedUtilityValue as N, PluginUtils as P, Variant as V }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/types-B254mqw1.d.mts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/types-B254mqw1.d.mts new file mode 100644 index 0000000000000000000000000000000000000000..b3ac7a95a6ee083529ee6b9092ac64fe9ea84c32 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/dist/types-B254mqw1.d.mts @@ -0,0 +1,98 @@ +import { N as NamedUtilityValue, P as PluginUtils } from './resolve-config-QUZ9b-Gn.mjs'; + +type Config = UserConfig; +type PluginFn = (api: PluginAPI) => void; +type PluginWithConfig = { + handler: PluginFn; + config?: UserConfig; + /** @internal */ + reference?: boolean; +}; +type PluginWithOptions = { + (options?: T): PluginWithConfig; + __isOptionsFunction: true; +}; +type Plugin = PluginFn | PluginWithConfig | PluginWithOptions; +type PluginAPI = { + addBase(base: CssInJs): void; + addVariant(name: string, variant: string | string[] | CssInJs): void; + matchVariant(name: string, cb: (value: T | string, extra: { + modifier: string | null; + }) => string | string[], options?: { + values?: Record; + sort?(a: { + value: T | string; + modifier: string | null; + }, b: { + value: T | string; + modifier: string | null; + }): number; + }): void; + addUtilities(utilities: Record | Record[], options?: {}): void; + matchUtilities(utilities: Record CssInJs | CssInJs[]>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + addComponents(utilities: Record | Record[], options?: {}): void; + matchComponents(utilities: Record CssInJs>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + theme(path: string, defaultValue?: any): any; + config(path?: string, defaultValue?: any): any; + prefix(className: string): string; +}; +type CssInJs = { + [key: string]: string | string[] | CssInJs | CssInJs[]; +}; + +type ResolvableTo = T | ((utils: PluginUtils) => T); +type ThemeValue = ResolvableTo> | null | undefined; +type ThemeConfig = Record & { + extend?: Record; +}; +type ContentFile = string | { + raw: string; + extension?: string; +}; +type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]]; +interface UserConfig { + presets?: UserConfig[]; + theme?: ThemeConfig; + plugins?: Plugin[]; +} +interface UserConfig { + content?: ContentFile[] | { + relative?: boolean; + files: ContentFile[]; + }; +} +interface UserConfig { + darkMode?: DarkModeStrategy; +} +interface UserConfig { + prefix?: string; +} +interface UserConfig { + blocklist?: string[]; +} +interface UserConfig { + important?: boolean | string; +} +interface UserConfig { + future?: 'all' | Record; +} + +export type { Config as C, Plugin as P, ThemeConfig as T, UserConfig as U, PluginFn as a, PluginWithConfig as b, PluginWithOptions as c, PluginAPI as d }; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/index.css b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/index.css new file mode 100644 index 0000000000000000000000000000000000000000..0792ea331489d66c5a97d176182c310634df1348 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/index.css @@ -0,0 +1,888 @@ +@layer theme, base, components, utilities; + +@layer theme { + @theme default { + --font-sans: + ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; + --font-mono: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", + "Courier New", monospace; + + --color-red-50: oklch(97.1% 0.013 17.38); + --color-red-100: oklch(93.6% 0.032 17.717); + --color-red-200: oklch(88.5% 0.062 18.334); + --color-red-300: oklch(80.8% 0.114 19.571); + --color-red-400: oklch(70.4% 0.191 22.216); + --color-red-500: oklch(63.7% 0.237 25.331); + --color-red-600: oklch(57.7% 0.245 27.325); + --color-red-700: oklch(50.5% 0.213 27.518); + --color-red-800: oklch(44.4% 0.177 26.899); + --color-red-900: oklch(39.6% 0.141 25.723); + --color-red-950: oklch(25.8% 0.092 26.042); + + --color-orange-50: oklch(98% 0.016 73.684); + --color-orange-100: oklch(95.4% 0.038 75.164); + --color-orange-200: oklch(90.1% 0.076 70.697); + --color-orange-300: oklch(83.7% 0.128 66.29); + --color-orange-400: oklch(75% 0.183 55.934); + --color-orange-500: oklch(70.5% 0.213 47.604); + --color-orange-600: oklch(64.6% 0.222 41.116); + --color-orange-700: oklch(55.3% 0.195 38.402); + --color-orange-800: oklch(47% 0.157 37.304); + --color-orange-900: oklch(40.8% 0.123 38.172); + --color-orange-950: oklch(26.6% 0.079 36.259); + + --color-amber-50: oklch(98.7% 0.022 95.277); + --color-amber-100: oklch(96.2% 0.059 95.617); + --color-amber-200: oklch(92.4% 0.12 95.746); + --color-amber-300: oklch(87.9% 0.169 91.605); + --color-amber-400: oklch(82.8% 0.189 84.429); + --color-amber-500: oklch(76.9% 0.188 70.08); + --color-amber-600: oklch(66.6% 0.179 58.318); + --color-amber-700: oklch(55.5% 0.163 48.998); + --color-amber-800: oklch(47.3% 0.137 46.201); + --color-amber-900: oklch(41.4% 0.112 45.904); + --color-amber-950: oklch(27.9% 0.077 45.635); + + --color-yellow-50: oklch(98.7% 0.026 102.212); + --color-yellow-100: oklch(97.3% 0.071 103.193); + --color-yellow-200: oklch(94.5% 0.129 101.54); + --color-yellow-300: oklch(90.5% 0.182 98.111); + --color-yellow-400: oklch(85.2% 0.199 91.936); + --color-yellow-500: oklch(79.5% 0.184 86.047); + --color-yellow-600: oklch(68.1% 0.162 75.834); + --color-yellow-700: oklch(55.4% 0.135 66.442); + --color-yellow-800: oklch(47.6% 0.114 61.907); + --color-yellow-900: oklch(42.1% 0.095 57.708); + --color-yellow-950: oklch(28.6% 0.066 53.813); + + --color-lime-50: oklch(98.6% 0.031 120.757); + --color-lime-100: oklch(96.7% 0.067 122.328); + --color-lime-200: oklch(93.8% 0.127 124.321); + --color-lime-300: oklch(89.7% 0.196 126.665); + --color-lime-400: oklch(84.1% 0.238 128.85); + --color-lime-500: oklch(76.8% 0.233 130.85); + --color-lime-600: oklch(64.8% 0.2 131.684); + --color-lime-700: oklch(53.2% 0.157 131.589); + --color-lime-800: oklch(45.3% 0.124 130.933); + --color-lime-900: oklch(40.5% 0.101 131.063); + --color-lime-950: oklch(27.4% 0.072 132.109); + + --color-green-50: oklch(98.2% 0.018 155.826); + --color-green-100: oklch(96.2% 0.044 156.743); + --color-green-200: oklch(92.5% 0.084 155.995); + --color-green-300: oklch(87.1% 0.15 154.449); + --color-green-400: oklch(79.2% 0.209 151.711); + --color-green-500: oklch(72.3% 0.219 149.579); + --color-green-600: oklch(62.7% 0.194 149.214); + --color-green-700: oklch(52.7% 0.154 150.069); + --color-green-800: oklch(44.8% 0.119 151.328); + --color-green-900: oklch(39.3% 0.095 152.535); + --color-green-950: oklch(26.6% 0.065 152.934); + + --color-emerald-50: oklch(97.9% 0.021 166.113); + --color-emerald-100: oklch(95% 0.052 163.051); + --color-emerald-200: oklch(90.5% 0.093 164.15); + --color-emerald-300: oklch(84.5% 0.143 164.978); + --color-emerald-400: oklch(76.5% 0.177 163.223); + --color-emerald-500: oklch(69.6% 0.17 162.48); + --color-emerald-600: oklch(59.6% 0.145 163.225); + --color-emerald-700: oklch(50.8% 0.118 165.612); + --color-emerald-800: oklch(43.2% 0.095 166.913); + --color-emerald-900: oklch(37.8% 0.077 168.94); + --color-emerald-950: oklch(26.2% 0.051 172.552); + + --color-teal-50: oklch(98.4% 0.014 180.72); + --color-teal-100: oklch(95.3% 0.051 180.801); + --color-teal-200: oklch(91% 0.096 180.426); + --color-teal-300: oklch(85.5% 0.138 181.071); + --color-teal-400: oklch(77.7% 0.152 181.912); + --color-teal-500: oklch(70.4% 0.14 182.503); + --color-teal-600: oklch(60% 0.118 184.704); + --color-teal-700: oklch(51.1% 0.096 186.391); + --color-teal-800: oklch(43.7% 0.078 188.216); + --color-teal-900: oklch(38.6% 0.063 188.416); + --color-teal-950: oklch(27.7% 0.046 192.524); + + --color-cyan-50: oklch(98.4% 0.019 200.873); + --color-cyan-100: oklch(95.6% 0.045 203.388); + --color-cyan-200: oklch(91.7% 0.08 205.041); + --color-cyan-300: oklch(86.5% 0.127 207.078); + --color-cyan-400: oklch(78.9% 0.154 211.53); + --color-cyan-500: oklch(71.5% 0.143 215.221); + --color-cyan-600: oklch(60.9% 0.126 221.723); + --color-cyan-700: oklch(52% 0.105 223.128); + --color-cyan-800: oklch(45% 0.085 224.283); + --color-cyan-900: oklch(39.8% 0.07 227.392); + --color-cyan-950: oklch(30.2% 0.056 229.695); + + --color-sky-50: oklch(97.7% 0.013 236.62); + --color-sky-100: oklch(95.1% 0.026 236.824); + --color-sky-200: oklch(90.1% 0.058 230.902); + --color-sky-300: oklch(82.8% 0.111 230.318); + --color-sky-400: oklch(74.6% 0.16 232.661); + --color-sky-500: oklch(68.5% 0.169 237.323); + --color-sky-600: oklch(58.8% 0.158 241.966); + --color-sky-700: oklch(50% 0.134 242.749); + --color-sky-800: oklch(44.3% 0.11 240.79); + --color-sky-900: oklch(39.1% 0.09 240.876); + --color-sky-950: oklch(29.3% 0.066 243.157); + + --color-blue-50: oklch(97% 0.014 254.604); + --color-blue-100: oklch(93.2% 0.032 255.585); + --color-blue-200: oklch(88.2% 0.059 254.128); + --color-blue-300: oklch(80.9% 0.105 251.813); + --color-blue-400: oklch(70.7% 0.165 254.624); + --color-blue-500: oklch(62.3% 0.214 259.815); + --color-blue-600: oklch(54.6% 0.245 262.881); + --color-blue-700: oklch(48.8% 0.243 264.376); + --color-blue-800: oklch(42.4% 0.199 265.638); + --color-blue-900: oklch(37.9% 0.146 265.522); + --color-blue-950: oklch(28.2% 0.091 267.935); + + --color-indigo-50: oklch(96.2% 0.018 272.314); + --color-indigo-100: oklch(93% 0.034 272.788); + --color-indigo-200: oklch(87% 0.065 274.039); + --color-indigo-300: oklch(78.5% 0.115 274.713); + --color-indigo-400: oklch(67.3% 0.182 276.935); + --color-indigo-500: oklch(58.5% 0.233 277.117); + --color-indigo-600: oklch(51.1% 0.262 276.966); + --color-indigo-700: oklch(45.7% 0.24 277.023); + --color-indigo-800: oklch(39.8% 0.195 277.366); + --color-indigo-900: oklch(35.9% 0.144 278.697); + --color-indigo-950: oklch(25.7% 0.09 281.288); + + --color-violet-50: oklch(96.9% 0.016 293.756); + --color-violet-100: oklch(94.3% 0.029 294.588); + --color-violet-200: oklch(89.4% 0.057 293.283); + --color-violet-300: oklch(81.1% 0.111 293.571); + --color-violet-400: oklch(70.2% 0.183 293.541); + --color-violet-500: oklch(60.6% 0.25 292.717); + --color-violet-600: oklch(54.1% 0.281 293.009); + --color-violet-700: oklch(49.1% 0.27 292.581); + --color-violet-800: oklch(43.2% 0.232 292.759); + --color-violet-900: oklch(38% 0.189 293.745); + --color-violet-950: oklch(28.3% 0.141 291.089); + + --color-purple-50: oklch(97.7% 0.014 308.299); + --color-purple-100: oklch(94.6% 0.033 307.174); + --color-purple-200: oklch(90.2% 0.063 306.703); + --color-purple-300: oklch(82.7% 0.119 306.383); + --color-purple-400: oklch(71.4% 0.203 305.504); + --color-purple-500: oklch(62.7% 0.265 303.9); + --color-purple-600: oklch(55.8% 0.288 302.321); + --color-purple-700: oklch(49.6% 0.265 301.924); + --color-purple-800: oklch(43.8% 0.218 303.724); + --color-purple-900: oklch(38.1% 0.176 304.987); + --color-purple-950: oklch(29.1% 0.149 302.717); + + --color-fuchsia-50: oklch(97.7% 0.017 320.058); + --color-fuchsia-100: oklch(95.2% 0.037 318.852); + --color-fuchsia-200: oklch(90.3% 0.076 319.62); + --color-fuchsia-300: oklch(83.3% 0.145 321.434); + --color-fuchsia-400: oklch(74% 0.238 322.16); + --color-fuchsia-500: oklch(66.7% 0.295 322.15); + --color-fuchsia-600: oklch(59.1% 0.293 322.896); + --color-fuchsia-700: oklch(51.8% 0.253 323.949); + --color-fuchsia-800: oklch(45.2% 0.211 324.591); + --color-fuchsia-900: oklch(40.1% 0.17 325.612); + --color-fuchsia-950: oklch(29.3% 0.136 325.661); + + --color-pink-50: oklch(97.1% 0.014 343.198); + --color-pink-100: oklch(94.8% 0.028 342.258); + --color-pink-200: oklch(89.9% 0.061 343.231); + --color-pink-300: oklch(82.3% 0.12 346.018); + --color-pink-400: oklch(71.8% 0.202 349.761); + --color-pink-500: oklch(65.6% 0.241 354.308); + --color-pink-600: oklch(59.2% 0.249 0.584); + --color-pink-700: oklch(52.5% 0.223 3.958); + --color-pink-800: oklch(45.9% 0.187 3.815); + --color-pink-900: oklch(40.8% 0.153 2.432); + --color-pink-950: oklch(28.4% 0.109 3.907); + + --color-rose-50: oklch(96.9% 0.015 12.422); + --color-rose-100: oklch(94.1% 0.03 12.58); + --color-rose-200: oklch(89.2% 0.058 10.001); + --color-rose-300: oklch(81% 0.117 11.638); + --color-rose-400: oklch(71.2% 0.194 13.428); + --color-rose-500: oklch(64.5% 0.246 16.439); + --color-rose-600: oklch(58.6% 0.253 17.585); + --color-rose-700: oklch(51.4% 0.222 16.935); + --color-rose-800: oklch(45.5% 0.188 13.697); + --color-rose-900: oklch(41% 0.159 10.272); + --color-rose-950: oklch(27.1% 0.105 12.094); + + --color-slate-50: oklch(98.4% 0.003 247.858); + --color-slate-100: oklch(96.8% 0.007 247.896); + --color-slate-200: oklch(92.9% 0.013 255.508); + --color-slate-300: oklch(86.9% 0.022 252.894); + --color-slate-400: oklch(70.4% 0.04 256.788); + --color-slate-500: oklch(55.4% 0.046 257.417); + --color-slate-600: oklch(44.6% 0.043 257.281); + --color-slate-700: oklch(37.2% 0.044 257.287); + --color-slate-800: oklch(27.9% 0.041 260.031); + --color-slate-900: oklch(20.8% 0.042 265.755); + --color-slate-950: oklch(12.9% 0.042 264.695); + + --color-gray-50: oklch(98.5% 0.002 247.839); + --color-gray-100: oklch(96.7% 0.003 264.542); + --color-gray-200: oklch(92.8% 0.006 264.531); + --color-gray-300: oklch(87.2% 0.01 258.338); + --color-gray-400: oklch(70.7% 0.022 261.325); + --color-gray-500: oklch(55.1% 0.027 264.364); + --color-gray-600: oklch(44.6% 0.03 256.802); + --color-gray-700: oklch(37.3% 0.034 259.733); + --color-gray-800: oklch(27.8% 0.033 256.848); + --color-gray-900: oklch(21% 0.034 264.665); + --color-gray-950: oklch(13% 0.028 261.692); + + --color-zinc-50: oklch(98.5% 0 0); + --color-zinc-100: oklch(96.7% 0.001 286.375); + --color-zinc-200: oklch(92% 0.004 286.32); + --color-zinc-300: oklch(87.1% 0.006 286.286); + --color-zinc-400: oklch(70.5% 0.015 286.067); + --color-zinc-500: oklch(55.2% 0.016 285.938); + --color-zinc-600: oklch(44.2% 0.017 285.786); + --color-zinc-700: oklch(37% 0.013 285.805); + --color-zinc-800: oklch(27.4% 0.006 286.033); + --color-zinc-900: oklch(21% 0.006 285.885); + --color-zinc-950: oklch(14.1% 0.005 285.823); + + --color-neutral-50: oklch(98.5% 0 0); + --color-neutral-100: oklch(97% 0 0); + --color-neutral-200: oklch(92.2% 0 0); + --color-neutral-300: oklch(87% 0 0); + --color-neutral-400: oklch(70.8% 0 0); + --color-neutral-500: oklch(55.6% 0 0); + --color-neutral-600: oklch(43.9% 0 0); + --color-neutral-700: oklch(37.1% 0 0); + --color-neutral-800: oklch(26.9% 0 0); + --color-neutral-900: oklch(20.5% 0 0); + --color-neutral-950: oklch(14.5% 0 0); + + --color-stone-50: oklch(98.5% 0.001 106.423); + --color-stone-100: oklch(97% 0.001 106.424); + --color-stone-200: oklch(92.3% 0.003 48.717); + --color-stone-300: oklch(86.9% 0.005 56.366); + --color-stone-400: oklch(70.9% 0.01 56.259); + --color-stone-500: oklch(55.3% 0.013 58.071); + --color-stone-600: oklch(44.4% 0.011 73.639); + --color-stone-700: oklch(37.4% 0.01 67.558); + --color-stone-800: oklch(26.8% 0.007 34.298); + --color-stone-900: oklch(21.6% 0.006 56.043); + --color-stone-950: oklch(14.7% 0.004 49.25); + + --color-black: #000; + --color-white: #fff; + + --spacing: 0.25rem; + + --breakpoint-sm: 40rem; + --breakpoint-md: 48rem; + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-2xl: 96rem; + + --container-3xs: 16rem; + --container-2xs: 18rem; + --container-xs: 20rem; + --container-sm: 24rem; + --container-md: 28rem; + --container-lg: 32rem; + --container-xl: 36rem; + --container-2xl: 42rem; + --container-3xl: 48rem; + --container-4xl: 56rem; + --container-5xl: 64rem; + --container-6xl: 72rem; + --container-7xl: 80rem; + + --text-xs: 0.75rem; + --text-xs--line-height: calc(1 / 0.75); + --text-sm: 0.875rem; + --text-sm--line-height: calc(1.25 / 0.875); + --text-base: 1rem; + --text-base--line-height: calc(1.5 / 1); + --text-lg: 1.125rem; + --text-lg--line-height: calc(1.75 / 1.125); + --text-xl: 1.25rem; + --text-xl--line-height: calc(1.75 / 1.25); + --text-2xl: 1.5rem; + --text-2xl--line-height: calc(2 / 1.5); + --text-3xl: 1.875rem; + --text-3xl--line-height: calc(2.25 / 1.875); + --text-4xl: 2.25rem; + --text-4xl--line-height: calc(2.5 / 2.25); + --text-5xl: 3rem; + --text-5xl--line-height: 1; + --text-6xl: 3.75rem; + --text-6xl--line-height: 1; + --text-7xl: 4.5rem; + --text-7xl--line-height: 1; + --text-8xl: 6rem; + --text-8xl--line-height: 1; + --text-9xl: 8rem; + --text-9xl--line-height: 1; + + --font-weight-thin: 100; + --font-weight-extralight: 200; + --font-weight-light: 300; + --font-weight-normal: 400; + --font-weight-medium: 500; + --font-weight-semibold: 600; + --font-weight-bold: 700; + --font-weight-extrabold: 800; + --font-weight-black: 900; + + --tracking-tighter: -0.05em; + --tracking-tight: -0.025em; + --tracking-normal: 0em; + --tracking-wide: 0.025em; + --tracking-wider: 0.05em; + --tracking-widest: 0.1em; + + --leading-tight: 1.25; + --leading-snug: 1.375; + --leading-normal: 1.5; + --leading-relaxed: 1.625; + --leading-loose: 2; + + --radius-xs: 0.125rem; + --radius-sm: 0.25rem; + --radius-md: 0.375rem; + --radius-lg: 0.5rem; + --radius-xl: 0.75rem; + --radius-2xl: 1rem; + --radius-3xl: 1.5rem; + --radius-4xl: 2rem; + + --shadow-2xs: 0 1px rgb(0 0 0 / 0.05); + --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-md: + 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); + --shadow-lg: + 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --shadow-xl: + 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); + + --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / 0.05); + --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / 0.05); + --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05); + + --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / 0.05); + --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15); + --drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12); + --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15); + --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / 0.1); + --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / 0.15); + + --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / 0.15); + --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / 0.2); + --text-shadow-sm: + 0px 1px 0px rgb(0 0 0 / 0.075), 0px 1px 1px rgb(0 0 0 / 0.075), + 0px 2px 2px rgb(0 0 0 / 0.075); + --text-shadow-md: + 0px 1px 1px rgb(0 0 0 / 0.1), 0px 1px 2px rgb(0 0 0 / 0.1), + 0px 2px 4px rgb(0 0 0 / 0.1); + --text-shadow-lg: + 0px 1px 2px rgb(0 0 0 / 0.1), 0px 3px 2px rgb(0 0 0 / 0.1), + 0px 4px 8px rgb(0 0 0 / 0.1); + + --ease-in: cubic-bezier(0.4, 0, 1, 1); + --ease-out: cubic-bezier(0, 0, 0.2, 1); + --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); + + --animate-spin: spin 1s linear infinite; + --animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; + --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; + --animate-bounce: bounce 1s infinite; + + @keyframes spin { + to { + transform: rotate(360deg); + } + } + + @keyframes ping { + 75%, + 100% { + transform: scale(2); + opacity: 0; + } + } + + @keyframes pulse { + 50% { + opacity: 0.5; + } + } + + @keyframes bounce { + 0%, + 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8, 0, 1, 1); + } + + 50% { + transform: none; + animation-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + } + + --blur-xs: 4px; + --blur-sm: 8px; + --blur-md: 12px; + --blur-lg: 16px; + --blur-xl: 24px; + --blur-2xl: 40px; + --blur-3xl: 64px; + + --perspective-dramatic: 100px; + --perspective-near: 300px; + --perspective-normal: 500px; + --perspective-midrange: 800px; + --perspective-distant: 1200px; + + --aspect-video: 16 / 9; + + --default-transition-duration: 150ms; + --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + --default-font-family: --theme(--font-sans, initial); + --default-font-feature-settings: --theme( + --font-sans--font-feature-settings, + initial + ); + --default-font-variation-settings: --theme( + --font-sans--font-variation-settings, + initial + ); + --default-mono-font-family: --theme(--font-mono, initial); + --default-mono-font-feature-settings: --theme( + --font-mono--font-feature-settings, + initial + ); + --default-mono-font-variation-settings: --theme( + --font-mono--font-variation-settings, + initial + ); + } + + /* Deprecated */ + @theme default inline reference { + --blur: 8px; + --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); + --drop-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 1px 1px rgb(0 0 0 / 0.06); + --radius: 0.25rem; + --max-width-prose: 65ch; + } +} + +@layer base { + /* + 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) + 2. Remove default margins and padding + 3. Reset all borders. +*/ + + *, + ::after, + ::before, + ::backdrop, + ::file-selector-button { + box-sizing: border-box; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 2 */ + border: 0 solid; /* 3 */ + } + + /* + 1. Use a consistent sensible line-height in all browsers. + 2. Prevent adjustments of font size after orientation changes in iOS. + 3. Use a more readable tab size. + 4. Use the user's configured `sans` font-family by default. + 5. Use the user's configured `sans` font-feature-settings by default. + 6. Use the user's configured `sans` font-variation-settings by default. + 7. Disable tap highlights on iOS. +*/ + + html, + :host { + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + tab-size: 4; /* 3 */ + font-family: --theme( + --default-font-family, + ui-sans-serif, + system-ui, + sans-serif, + "Apple Color Emoji", + "Segoe UI Emoji", + "Segoe UI Symbol", + "Noto Color Emoji" + ); /* 4 */ + font-feature-settings: --theme( + --default-font-feature-settings, + normal + ); /* 5 */ + font-variation-settings: --theme( + --default-font-variation-settings, + normal + ); /* 6 */ + -webkit-tap-highlight-color: transparent; /* 7 */ + } + + /* + 1. Add the correct height in Firefox. + 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) + 3. Reset the default border style to a 1px solid border. +*/ + + hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ + } + + /* + Add the correct text decoration in Chrome, Edge, and Safari. +*/ + + abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + /* + Remove the default font size and weight for headings. +*/ + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + /* + Reset links to optimize for opt-in styling instead of opt-out. +*/ + + a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; + } + + /* + Add the correct font weight in Edge and Safari. +*/ + + b, + strong { + font-weight: bolder; + } + + /* + 1. Use the user's configured `mono` font-family by default. + 2. Use the user's configured `mono` font-feature-settings by default. + 3. Use the user's configured `mono` font-variation-settings by default. + 4. Correct the odd `em` font sizing in all browsers. +*/ + + code, + kbd, + samp, + pre { + font-family: --theme( + --default-mono-font-family, + ui-monospace, + SFMono-Regular, + Menlo, + Monaco, + Consolas, + "Liberation Mono", + "Courier New", + monospace + ); /* 1 */ + font-feature-settings: --theme( + --default-mono-font-feature-settings, + normal + ); /* 2 */ + font-variation-settings: --theme( + --default-mono-font-variation-settings, + normal + ); /* 3 */ + font-size: 1em; /* 4 */ + } + + /* + Add the correct font size in all browsers. +*/ + + small { + font-size: 80%; + } + + /* + Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + /* + 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) + 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) + 3. Remove gaps between table borders by default. +*/ + + table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ + } + + /* + Use the modern Firefox focus style for all focusable elements. +*/ + + :-moz-focusring { + outline: auto; + } + + /* + Add the correct vertical alignment in Chrome and Firefox. +*/ + + progress { + vertical-align: baseline; + } + + /* + Add the correct display in Chrome and Safari. +*/ + + summary { + display: list-item; + } + + /* + Make lists unstyled by default. +*/ + + ol, + ul, + menu { + list-style: none; + } + + /* + 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) + 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; /* 1 */ + vertical-align: middle; /* 2 */ + } + + /* + Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + + img, + video { + max-width: 100%; + height: auto; + } + + /* + 1. Inherit font styles in all browsers. + 2. Remove border radius in all browsers. + 3. Remove background color in all browsers. + 4. Ensure consistent opacity for disabled states in all browsers. +*/ + + button, + input, + select, + optgroup, + textarea, + ::file-selector-button { + font: inherit; /* 1 */ + font-feature-settings: inherit; /* 1 */ + font-variation-settings: inherit; /* 1 */ + letter-spacing: inherit; /* 1 */ + color: inherit; /* 1 */ + border-radius: 0; /* 2 */ + background-color: transparent; /* 3 */ + opacity: 1; /* 4 */ + } + + /* + Restore default font weight. +*/ + + :where(select:is([multiple], [size])) optgroup { + font-weight: bolder; + } + + /* + Restore indentation. +*/ + + :where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; + } + + /* + Restore space after button. +*/ + + ::file-selector-button { + margin-inline-end: 4px; + } + + /* + Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +*/ + + ::placeholder { + opacity: 1; + } + + /* + Set the default placeholder color to a semi-transparent version of the current text color in browsers that do not + crash when using `color-mix(…)` with `currentcolor`. (https://github.com/tailwindlabs/tailwindcss/issues/17194) +*/ + + @supports (not (-webkit-appearance: -apple-pay-button)) /* Not Safari */ or + (contain-intrinsic-size: 1px) /* Safari 17+ */ { + ::placeholder { + color: color-mix(in oklab, currentcolor 50%, transparent); + } + } + + /* + Prevent resizing textareas horizontally by default. +*/ + + textarea { + resize: vertical; + } + + /* + Remove the inner padding in Chrome and Safari on macOS. +*/ + + ::-webkit-search-decoration { + -webkit-appearance: none; + } + + /* + 1. Ensure date/time inputs have the same height when empty in iOS Safari. + 2. Ensure text alignment can be changed on date/time inputs in iOS Safari. +*/ + + ::-webkit-date-and-time-value { + min-height: 1lh; /* 1 */ + text-align: inherit; /* 2 */ + } + + /* + Prevent height from changing on date/time inputs in macOS Safari when the input is set to `display: block`. +*/ + + ::-webkit-datetime-edit { + display: inline-flex; + } + + /* + Remove excess padding from pseudo-elements in date/time inputs to ensure consistent height across browsers. +*/ + + ::-webkit-datetime-edit-fields-wrapper { + padding: 0; + } + + ::-webkit-datetime-edit, + ::-webkit-datetime-edit-year-field, + ::-webkit-datetime-edit-month-field, + ::-webkit-datetime-edit-day-field, + ::-webkit-datetime-edit-hour-field, + ::-webkit-datetime-edit-minute-field, + ::-webkit-datetime-edit-second-field, + ::-webkit-datetime-edit-millisecond-field, + ::-webkit-datetime-edit-meridiem-field { + padding-block: 0; + } + + /* + Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + + :-moz-ui-invalid { + box-shadow: none; + } + + /* + Correct the inability to style the border radius in iOS Safari. +*/ + + button, + input:where([type="button"], [type="reset"], [type="submit"]), + ::file-selector-button { + appearance: button; + } + + /* + Correct the cursor style of increment and decrement buttons in Safari. +*/ + + ::-webkit-inner-spin-button, + ::-webkit-outer-spin-button { + height: auto; + } + + /* + Make elements with the HTML hidden attribute stay hidden by default. +*/ + + [hidden]:where(:not([hidden="until-found"])) { + display: none !important; + } +} + +@layer utilities { + @tailwind utilities; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0278a74369a22615de1e68a0be99050deb82d937 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/package.json @@ -0,0 +1,89 @@ +{ + "name": "tailwindcss", + "version": "4.1.11", + "description": "A utility-first CSS framework for rapidly building custom user interfaces.", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/tailwindlabs/tailwindcss.git", + "directory": "packages/tailwindcss" + }, + "bugs": "https://github.com/tailwindlabs/tailwindcss/issues", + "homepage": "https://tailwindcss.com", + "exports": { + ".": { + "types": "./dist/lib.d.mts", + "style": "./index.css", + "require": "./dist/lib.js", + "import": "./dist/lib.mjs" + }, + "./plugin": { + "require": "./dist/plugin.js", + "import": "./dist/plugin.mjs" + }, + "./plugin.js": { + "require": "./dist/plugin.js", + "import": "./dist/plugin.mjs" + }, + "./defaultTheme": { + "require": "./dist/default-theme.js", + "import": "./dist/default-theme.mjs" + }, + "./defaultTheme.js": { + "require": "./dist/default-theme.js", + "import": "./dist/default-theme.mjs" + }, + "./colors": { + "require": "./dist/colors.js", + "import": "./dist/colors.mjs" + }, + "./colors.js": { + "require": "./dist/colors.js", + "import": "./dist/colors.mjs" + }, + "./lib/util/flattenColorPalette": { + "require": "./dist/flatten-color-palette.js", + "import": "./dist/flatten-color-palette.mjs" + }, + "./lib/util/flattenColorPalette.js": { + "require": "./dist/flatten-color-palette.js", + "import": "./dist/flatten-color-palette.mjs" + }, + "./package.json": "./package.json", + "./index.css": "./index.css", + "./index": "./index.css", + "./preflight.css": "./preflight.css", + "./preflight": "./preflight.css", + "./theme.css": "./theme.css", + "./theme": "./theme.css", + "./utilities.css": "./utilities.css", + "./utilities": "./utilities.css" + }, + "publishConfig": { + "provenance": true, + "access": "public" + }, + "style": "index.css", + "files": [ + "dist", + "index.css", + "preflight.css", + "theme.css", + "utilities.css" + ], + "devDependencies": { + "@ampproject/remapping": "^2.3.0", + "@types/node": "^20.19.0", + "dedent": "1.6.0", + "lightningcss": "1.30.1", + "magic-string": "^0.30.17", + "source-map-js": "^1.2.1", + "@tailwindcss/oxide": "^4.1.11" + }, + "scripts": { + "lint": "tsc --noEmit", + "build": "tsup-node --env.NODE_ENV production", + "dev": "tsup-node --env.NODE_ENV development --watch", + "test:ui": "playwright test" + } +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/preflight.css b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/preflight.css new file mode 100644 index 0000000000000000000000000000000000000000..0976a40d4924e0876195f2edef5f7e7b5d911b0d --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/preflight.css @@ -0,0 +1,385 @@ +/* + 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) + 2. Remove default margins and padding + 3. Reset all borders. +*/ + +*, +::after, +::before, +::backdrop, +::file-selector-button { + box-sizing: border-box; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 2 */ + border: 0 solid; /* 3 */ +} + +/* + 1. Use a consistent sensible line-height in all browsers. + 2. Prevent adjustments of font size after orientation changes in iOS. + 3. Use a more readable tab size. + 4. Use the user's configured `sans` font-family by default. + 5. Use the user's configured `sans` font-feature-settings by default. + 6. Use the user's configured `sans` font-variation-settings by default. + 7. Disable tap highlights on iOS. +*/ + +html, +:host { + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + tab-size: 4; /* 3 */ + font-family: --theme( + --default-font-family, + ui-sans-serif, + system-ui, + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji', + 'Segoe UI Symbol', + 'Noto Color Emoji' + ); /* 4 */ + font-feature-settings: --theme(--default-font-feature-settings, normal); /* 5 */ + font-variation-settings: --theme(--default-font-variation-settings, normal); /* 6 */ + -webkit-tap-highlight-color: transparent; /* 7 */ +} + +/* + 1. Add the correct height in Firefox. + 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) + 3. Reset the default border style to a 1px solid border. +*/ + +hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ +} + +/* + Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/* + Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* + Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; +} + +/* + Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* + 1. Use the user's configured `mono` font-family by default. + 2. Use the user's configured `mono` font-feature-settings by default. + 3. Use the user's configured `mono` font-variation-settings by default. + 4. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: --theme( + --default-mono-font-family, + ui-monospace, + SFMono-Regular, + Menlo, + Monaco, + Consolas, + 'Liberation Mono', + 'Courier New', + monospace + ); /* 1 */ + font-feature-settings: --theme(--default-mono-font-feature-settings, normal); /* 2 */ + font-variation-settings: --theme(--default-mono-font-variation-settings, normal); /* 3 */ + font-size: 1em; /* 4 */ +} + +/* + Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* + Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* + 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) + 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) + 3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ +} + +/* + Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* + Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* + Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* + Make lists unstyled by default. +*/ + +ol, +ul, +menu { + list-style: none; +} + +/* + 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) + 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; /* 1 */ + vertical-align: middle; /* 2 */ +} + +/* + Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* + 1. Inherit font styles in all browsers. + 2. Remove border radius in all browsers. + 3. Remove background color in all browsers. + 4. Ensure consistent opacity for disabled states in all browsers. +*/ + +button, +input, +select, +optgroup, +textarea, +::file-selector-button { + font: inherit; /* 1 */ + font-feature-settings: inherit; /* 1 */ + font-variation-settings: inherit; /* 1 */ + letter-spacing: inherit; /* 1 */ + color: inherit; /* 1 */ + border-radius: 0; /* 2 */ + background-color: transparent; /* 3 */ + opacity: 1; /* 4 */ +} + +/* + Restore default font weight. +*/ + +:where(select:is([multiple], [size])) optgroup { + font-weight: bolder; +} + +/* + Restore indentation. +*/ + +:where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; +} + +/* + Restore space after button. +*/ + +::file-selector-button { + margin-inline-end: 4px; +} + +/* + Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +*/ + +::placeholder { + opacity: 1; +} + +/* + Set the default placeholder color to a semi-transparent version of the current text color in browsers that do not + crash when using `color-mix(…)` with `currentcolor`. (https://github.com/tailwindlabs/tailwindcss/issues/17194) +*/ + +@supports (not (-webkit-appearance: -apple-pay-button)) /* Not Safari */ or + (contain-intrinsic-size: 1px) /* Safari 17+ */ { + ::placeholder { + color: color-mix(in oklab, currentcolor 50%, transparent); + } +} + +/* + Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* + Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* + 1. Ensure date/time inputs have the same height when empty in iOS Safari. + 2. Ensure text alignment can be changed on date/time inputs in iOS Safari. +*/ + +::-webkit-date-and-time-value { + min-height: 1lh; /* 1 */ + text-align: inherit; /* 2 */ +} + +/* + Prevent height from changing on date/time inputs in macOS Safari when the input is set to `display: block`. +*/ + +::-webkit-datetime-edit { + display: inline-flex; +} + +/* + Remove excess padding from pseudo-elements in date/time inputs to ensure consistent height across browsers. +*/ + +::-webkit-datetime-edit-fields-wrapper { + padding: 0; +} + +::-webkit-datetime-edit, +::-webkit-datetime-edit-year-field, +::-webkit-datetime-edit-month-field, +::-webkit-datetime-edit-day-field, +::-webkit-datetime-edit-hour-field, +::-webkit-datetime-edit-minute-field, +::-webkit-datetime-edit-second-field, +::-webkit-datetime-edit-millisecond-field, +::-webkit-datetime-edit-meridiem-field { + padding-block: 0; +} + +/* + Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* + Correct the inability to style the border radius in iOS Safari. +*/ + +button, +input:where([type='button'], [type='reset'], [type='submit']), +::file-selector-button { + appearance: button; +} + +/* + Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* + Make elements with the HTML hidden attribute stay hidden by default. +*/ + +[hidden]:where(:not([hidden='until-found'])) { + display: none !important; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/theme.css b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/theme.css new file mode 100644 index 0000000000000000000000000000000000000000..52d447f7ffa0bbd5412bc76689b32ef77970e9e7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/theme.css @@ -0,0 +1,462 @@ +@theme default { + --font-sans: + ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', + 'Noto Color Emoji'; + --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif; + --font-mono: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', + monospace; + + --color-red-50: oklch(97.1% 0.013 17.38); + --color-red-100: oklch(93.6% 0.032 17.717); + --color-red-200: oklch(88.5% 0.062 18.334); + --color-red-300: oklch(80.8% 0.114 19.571); + --color-red-400: oklch(70.4% 0.191 22.216); + --color-red-500: oklch(63.7% 0.237 25.331); + --color-red-600: oklch(57.7% 0.245 27.325); + --color-red-700: oklch(50.5% 0.213 27.518); + --color-red-800: oklch(44.4% 0.177 26.899); + --color-red-900: oklch(39.6% 0.141 25.723); + --color-red-950: oklch(25.8% 0.092 26.042); + + --color-orange-50: oklch(98% 0.016 73.684); + --color-orange-100: oklch(95.4% 0.038 75.164); + --color-orange-200: oklch(90.1% 0.076 70.697); + --color-orange-300: oklch(83.7% 0.128 66.29); + --color-orange-400: oklch(75% 0.183 55.934); + --color-orange-500: oklch(70.5% 0.213 47.604); + --color-orange-600: oklch(64.6% 0.222 41.116); + --color-orange-700: oklch(55.3% 0.195 38.402); + --color-orange-800: oklch(47% 0.157 37.304); + --color-orange-900: oklch(40.8% 0.123 38.172); + --color-orange-950: oklch(26.6% 0.079 36.259); + + --color-amber-50: oklch(98.7% 0.022 95.277); + --color-amber-100: oklch(96.2% 0.059 95.617); + --color-amber-200: oklch(92.4% 0.12 95.746); + --color-amber-300: oklch(87.9% 0.169 91.605); + --color-amber-400: oklch(82.8% 0.189 84.429); + --color-amber-500: oklch(76.9% 0.188 70.08); + --color-amber-600: oklch(66.6% 0.179 58.318); + --color-amber-700: oklch(55.5% 0.163 48.998); + --color-amber-800: oklch(47.3% 0.137 46.201); + --color-amber-900: oklch(41.4% 0.112 45.904); + --color-amber-950: oklch(27.9% 0.077 45.635); + + --color-yellow-50: oklch(98.7% 0.026 102.212); + --color-yellow-100: oklch(97.3% 0.071 103.193); + --color-yellow-200: oklch(94.5% 0.129 101.54); + --color-yellow-300: oklch(90.5% 0.182 98.111); + --color-yellow-400: oklch(85.2% 0.199 91.936); + --color-yellow-500: oklch(79.5% 0.184 86.047); + --color-yellow-600: oklch(68.1% 0.162 75.834); + --color-yellow-700: oklch(55.4% 0.135 66.442); + --color-yellow-800: oklch(47.6% 0.114 61.907); + --color-yellow-900: oklch(42.1% 0.095 57.708); + --color-yellow-950: oklch(28.6% 0.066 53.813); + + --color-lime-50: oklch(98.6% 0.031 120.757); + --color-lime-100: oklch(96.7% 0.067 122.328); + --color-lime-200: oklch(93.8% 0.127 124.321); + --color-lime-300: oklch(89.7% 0.196 126.665); + --color-lime-400: oklch(84.1% 0.238 128.85); + --color-lime-500: oklch(76.8% 0.233 130.85); + --color-lime-600: oklch(64.8% 0.2 131.684); + --color-lime-700: oklch(53.2% 0.157 131.589); + --color-lime-800: oklch(45.3% 0.124 130.933); + --color-lime-900: oklch(40.5% 0.101 131.063); + --color-lime-950: oklch(27.4% 0.072 132.109); + + --color-green-50: oklch(98.2% 0.018 155.826); + --color-green-100: oklch(96.2% 0.044 156.743); + --color-green-200: oklch(92.5% 0.084 155.995); + --color-green-300: oklch(87.1% 0.15 154.449); + --color-green-400: oklch(79.2% 0.209 151.711); + --color-green-500: oklch(72.3% 0.219 149.579); + --color-green-600: oklch(62.7% 0.194 149.214); + --color-green-700: oklch(52.7% 0.154 150.069); + --color-green-800: oklch(44.8% 0.119 151.328); + --color-green-900: oklch(39.3% 0.095 152.535); + --color-green-950: oklch(26.6% 0.065 152.934); + + --color-emerald-50: oklch(97.9% 0.021 166.113); + --color-emerald-100: oklch(95% 0.052 163.051); + --color-emerald-200: oklch(90.5% 0.093 164.15); + --color-emerald-300: oklch(84.5% 0.143 164.978); + --color-emerald-400: oklch(76.5% 0.177 163.223); + --color-emerald-500: oklch(69.6% 0.17 162.48); + --color-emerald-600: oklch(59.6% 0.145 163.225); + --color-emerald-700: oklch(50.8% 0.118 165.612); + --color-emerald-800: oklch(43.2% 0.095 166.913); + --color-emerald-900: oklch(37.8% 0.077 168.94); + --color-emerald-950: oklch(26.2% 0.051 172.552); + + --color-teal-50: oklch(98.4% 0.014 180.72); + --color-teal-100: oklch(95.3% 0.051 180.801); + --color-teal-200: oklch(91% 0.096 180.426); + --color-teal-300: oklch(85.5% 0.138 181.071); + --color-teal-400: oklch(77.7% 0.152 181.912); + --color-teal-500: oklch(70.4% 0.14 182.503); + --color-teal-600: oklch(60% 0.118 184.704); + --color-teal-700: oklch(51.1% 0.096 186.391); + --color-teal-800: oklch(43.7% 0.078 188.216); + --color-teal-900: oklch(38.6% 0.063 188.416); + --color-teal-950: oklch(27.7% 0.046 192.524); + + --color-cyan-50: oklch(98.4% 0.019 200.873); + --color-cyan-100: oklch(95.6% 0.045 203.388); + --color-cyan-200: oklch(91.7% 0.08 205.041); + --color-cyan-300: oklch(86.5% 0.127 207.078); + --color-cyan-400: oklch(78.9% 0.154 211.53); + --color-cyan-500: oklch(71.5% 0.143 215.221); + --color-cyan-600: oklch(60.9% 0.126 221.723); + --color-cyan-700: oklch(52% 0.105 223.128); + --color-cyan-800: oklch(45% 0.085 224.283); + --color-cyan-900: oklch(39.8% 0.07 227.392); + --color-cyan-950: oklch(30.2% 0.056 229.695); + + --color-sky-50: oklch(97.7% 0.013 236.62); + --color-sky-100: oklch(95.1% 0.026 236.824); + --color-sky-200: oklch(90.1% 0.058 230.902); + --color-sky-300: oklch(82.8% 0.111 230.318); + --color-sky-400: oklch(74.6% 0.16 232.661); + --color-sky-500: oklch(68.5% 0.169 237.323); + --color-sky-600: oklch(58.8% 0.158 241.966); + --color-sky-700: oklch(50% 0.134 242.749); + --color-sky-800: oklch(44.3% 0.11 240.79); + --color-sky-900: oklch(39.1% 0.09 240.876); + --color-sky-950: oklch(29.3% 0.066 243.157); + + --color-blue-50: oklch(97% 0.014 254.604); + --color-blue-100: oklch(93.2% 0.032 255.585); + --color-blue-200: oklch(88.2% 0.059 254.128); + --color-blue-300: oklch(80.9% 0.105 251.813); + --color-blue-400: oklch(70.7% 0.165 254.624); + --color-blue-500: oklch(62.3% 0.214 259.815); + --color-blue-600: oklch(54.6% 0.245 262.881); + --color-blue-700: oklch(48.8% 0.243 264.376); + --color-blue-800: oklch(42.4% 0.199 265.638); + --color-blue-900: oklch(37.9% 0.146 265.522); + --color-blue-950: oklch(28.2% 0.091 267.935); + + --color-indigo-50: oklch(96.2% 0.018 272.314); + --color-indigo-100: oklch(93% 0.034 272.788); + --color-indigo-200: oklch(87% 0.065 274.039); + --color-indigo-300: oklch(78.5% 0.115 274.713); + --color-indigo-400: oklch(67.3% 0.182 276.935); + --color-indigo-500: oklch(58.5% 0.233 277.117); + --color-indigo-600: oklch(51.1% 0.262 276.966); + --color-indigo-700: oklch(45.7% 0.24 277.023); + --color-indigo-800: oklch(39.8% 0.195 277.366); + --color-indigo-900: oklch(35.9% 0.144 278.697); + --color-indigo-950: oklch(25.7% 0.09 281.288); + + --color-violet-50: oklch(96.9% 0.016 293.756); + --color-violet-100: oklch(94.3% 0.029 294.588); + --color-violet-200: oklch(89.4% 0.057 293.283); + --color-violet-300: oklch(81.1% 0.111 293.571); + --color-violet-400: oklch(70.2% 0.183 293.541); + --color-violet-500: oklch(60.6% 0.25 292.717); + --color-violet-600: oklch(54.1% 0.281 293.009); + --color-violet-700: oklch(49.1% 0.27 292.581); + --color-violet-800: oklch(43.2% 0.232 292.759); + --color-violet-900: oklch(38% 0.189 293.745); + --color-violet-950: oklch(28.3% 0.141 291.089); + + --color-purple-50: oklch(97.7% 0.014 308.299); + --color-purple-100: oklch(94.6% 0.033 307.174); + --color-purple-200: oklch(90.2% 0.063 306.703); + --color-purple-300: oklch(82.7% 0.119 306.383); + --color-purple-400: oklch(71.4% 0.203 305.504); + --color-purple-500: oklch(62.7% 0.265 303.9); + --color-purple-600: oklch(55.8% 0.288 302.321); + --color-purple-700: oklch(49.6% 0.265 301.924); + --color-purple-800: oklch(43.8% 0.218 303.724); + --color-purple-900: oklch(38.1% 0.176 304.987); + --color-purple-950: oklch(29.1% 0.149 302.717); + + --color-fuchsia-50: oklch(97.7% 0.017 320.058); + --color-fuchsia-100: oklch(95.2% 0.037 318.852); + --color-fuchsia-200: oklch(90.3% 0.076 319.62); + --color-fuchsia-300: oklch(83.3% 0.145 321.434); + --color-fuchsia-400: oklch(74% 0.238 322.16); + --color-fuchsia-500: oklch(66.7% 0.295 322.15); + --color-fuchsia-600: oklch(59.1% 0.293 322.896); + --color-fuchsia-700: oklch(51.8% 0.253 323.949); + --color-fuchsia-800: oklch(45.2% 0.211 324.591); + --color-fuchsia-900: oklch(40.1% 0.17 325.612); + --color-fuchsia-950: oklch(29.3% 0.136 325.661); + + --color-pink-50: oklch(97.1% 0.014 343.198); + --color-pink-100: oklch(94.8% 0.028 342.258); + --color-pink-200: oklch(89.9% 0.061 343.231); + --color-pink-300: oklch(82.3% 0.12 346.018); + --color-pink-400: oklch(71.8% 0.202 349.761); + --color-pink-500: oklch(65.6% 0.241 354.308); + --color-pink-600: oklch(59.2% 0.249 0.584); + --color-pink-700: oklch(52.5% 0.223 3.958); + --color-pink-800: oklch(45.9% 0.187 3.815); + --color-pink-900: oklch(40.8% 0.153 2.432); + --color-pink-950: oklch(28.4% 0.109 3.907); + + --color-rose-50: oklch(96.9% 0.015 12.422); + --color-rose-100: oklch(94.1% 0.03 12.58); + --color-rose-200: oklch(89.2% 0.058 10.001); + --color-rose-300: oklch(81% 0.117 11.638); + --color-rose-400: oklch(71.2% 0.194 13.428); + --color-rose-500: oklch(64.5% 0.246 16.439); + --color-rose-600: oklch(58.6% 0.253 17.585); + --color-rose-700: oklch(51.4% 0.222 16.935); + --color-rose-800: oklch(45.5% 0.188 13.697); + --color-rose-900: oklch(41% 0.159 10.272); + --color-rose-950: oklch(27.1% 0.105 12.094); + + --color-slate-50: oklch(98.4% 0.003 247.858); + --color-slate-100: oklch(96.8% 0.007 247.896); + --color-slate-200: oklch(92.9% 0.013 255.508); + --color-slate-300: oklch(86.9% 0.022 252.894); + --color-slate-400: oklch(70.4% 0.04 256.788); + --color-slate-500: oklch(55.4% 0.046 257.417); + --color-slate-600: oklch(44.6% 0.043 257.281); + --color-slate-700: oklch(37.2% 0.044 257.287); + --color-slate-800: oklch(27.9% 0.041 260.031); + --color-slate-900: oklch(20.8% 0.042 265.755); + --color-slate-950: oklch(12.9% 0.042 264.695); + + --color-gray-50: oklch(98.5% 0.002 247.839); + --color-gray-100: oklch(96.7% 0.003 264.542); + --color-gray-200: oklch(92.8% 0.006 264.531); + --color-gray-300: oklch(87.2% 0.01 258.338); + --color-gray-400: oklch(70.7% 0.022 261.325); + --color-gray-500: oklch(55.1% 0.027 264.364); + --color-gray-600: oklch(44.6% 0.03 256.802); + --color-gray-700: oklch(37.3% 0.034 259.733); + --color-gray-800: oklch(27.8% 0.033 256.848); + --color-gray-900: oklch(21% 0.034 264.665); + --color-gray-950: oklch(13% 0.028 261.692); + + --color-zinc-50: oklch(98.5% 0 0); + --color-zinc-100: oklch(96.7% 0.001 286.375); + --color-zinc-200: oklch(92% 0.004 286.32); + --color-zinc-300: oklch(87.1% 0.006 286.286); + --color-zinc-400: oklch(70.5% 0.015 286.067); + --color-zinc-500: oklch(55.2% 0.016 285.938); + --color-zinc-600: oklch(44.2% 0.017 285.786); + --color-zinc-700: oklch(37% 0.013 285.805); + --color-zinc-800: oklch(27.4% 0.006 286.033); + --color-zinc-900: oklch(21% 0.006 285.885); + --color-zinc-950: oklch(14.1% 0.005 285.823); + + --color-neutral-50: oklch(98.5% 0 0); + --color-neutral-100: oklch(97% 0 0); + --color-neutral-200: oklch(92.2% 0 0); + --color-neutral-300: oklch(87% 0 0); + --color-neutral-400: oklch(70.8% 0 0); + --color-neutral-500: oklch(55.6% 0 0); + --color-neutral-600: oklch(43.9% 0 0); + --color-neutral-700: oklch(37.1% 0 0); + --color-neutral-800: oklch(26.9% 0 0); + --color-neutral-900: oklch(20.5% 0 0); + --color-neutral-950: oklch(14.5% 0 0); + + --color-stone-50: oklch(98.5% 0.001 106.423); + --color-stone-100: oklch(97% 0.001 106.424); + --color-stone-200: oklch(92.3% 0.003 48.717); + --color-stone-300: oklch(86.9% 0.005 56.366); + --color-stone-400: oklch(70.9% 0.01 56.259); + --color-stone-500: oklch(55.3% 0.013 58.071); + --color-stone-600: oklch(44.4% 0.011 73.639); + --color-stone-700: oklch(37.4% 0.01 67.558); + --color-stone-800: oklch(26.8% 0.007 34.298); + --color-stone-900: oklch(21.6% 0.006 56.043); + --color-stone-950: oklch(14.7% 0.004 49.25); + + --color-black: #000; + --color-white: #fff; + + --spacing: 0.25rem; + + --breakpoint-sm: 40rem; + --breakpoint-md: 48rem; + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-2xl: 96rem; + + --container-3xs: 16rem; + --container-2xs: 18rem; + --container-xs: 20rem; + --container-sm: 24rem; + --container-md: 28rem; + --container-lg: 32rem; + --container-xl: 36rem; + --container-2xl: 42rem; + --container-3xl: 48rem; + --container-4xl: 56rem; + --container-5xl: 64rem; + --container-6xl: 72rem; + --container-7xl: 80rem; + + --text-xs: 0.75rem; + --text-xs--line-height: calc(1 / 0.75); + --text-sm: 0.875rem; + --text-sm--line-height: calc(1.25 / 0.875); + --text-base: 1rem; + --text-base--line-height: calc(1.5 / 1); + --text-lg: 1.125rem; + --text-lg--line-height: calc(1.75 / 1.125); + --text-xl: 1.25rem; + --text-xl--line-height: calc(1.75 / 1.25); + --text-2xl: 1.5rem; + --text-2xl--line-height: calc(2 / 1.5); + --text-3xl: 1.875rem; + --text-3xl--line-height: calc(2.25 / 1.875); + --text-4xl: 2.25rem; + --text-4xl--line-height: calc(2.5 / 2.25); + --text-5xl: 3rem; + --text-5xl--line-height: 1; + --text-6xl: 3.75rem; + --text-6xl--line-height: 1; + --text-7xl: 4.5rem; + --text-7xl--line-height: 1; + --text-8xl: 6rem; + --text-8xl--line-height: 1; + --text-9xl: 8rem; + --text-9xl--line-height: 1; + + --font-weight-thin: 100; + --font-weight-extralight: 200; + --font-weight-light: 300; + --font-weight-normal: 400; + --font-weight-medium: 500; + --font-weight-semibold: 600; + --font-weight-bold: 700; + --font-weight-extrabold: 800; + --font-weight-black: 900; + + --tracking-tighter: -0.05em; + --tracking-tight: -0.025em; + --tracking-normal: 0em; + --tracking-wide: 0.025em; + --tracking-wider: 0.05em; + --tracking-widest: 0.1em; + + --leading-tight: 1.25; + --leading-snug: 1.375; + --leading-normal: 1.5; + --leading-relaxed: 1.625; + --leading-loose: 2; + + --radius-xs: 0.125rem; + --radius-sm: 0.25rem; + --radius-md: 0.375rem; + --radius-lg: 0.5rem; + --radius-xl: 0.75rem; + --radius-2xl: 1rem; + --radius-3xl: 1.5rem; + --radius-4xl: 2rem; + + --shadow-2xs: 0 1px rgb(0 0 0 / 0.05); + --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); + --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); + + --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / 0.05); + --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / 0.05); + --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05); + + --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / 0.05); + --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15); + --drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12); + --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15); + --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / 0.1); + --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / 0.15); + + --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / 0.15); + --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / 0.2); + --text-shadow-sm: + 0px 1px 0px rgb(0 0 0 / 0.075), 0px 1px 1px rgb(0 0 0 / 0.075), 0px 2px 2px rgb(0 0 0 / 0.075); + --text-shadow-md: + 0px 1px 1px rgb(0 0 0 / 0.1), 0px 1px 2px rgb(0 0 0 / 0.1), 0px 2px 4px rgb(0 0 0 / 0.1); + --text-shadow-lg: + 0px 1px 2px rgb(0 0 0 / 0.1), 0px 3px 2px rgb(0 0 0 / 0.1), 0px 4px 8px rgb(0 0 0 / 0.1); + + --ease-in: cubic-bezier(0.4, 0, 1, 1); + --ease-out: cubic-bezier(0, 0, 0.2, 1); + --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); + + --animate-spin: spin 1s linear infinite; + --animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; + --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; + --animate-bounce: bounce 1s infinite; + + @keyframes spin { + to { + transform: rotate(360deg); + } + } + + @keyframes ping { + 75%, + 100% { + transform: scale(2); + opacity: 0; + } + } + + @keyframes pulse { + 50% { + opacity: 0.5; + } + } + + @keyframes bounce { + 0%, + 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8, 0, 1, 1); + } + + 50% { + transform: none; + animation-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + } + + --blur-xs: 4px; + --blur-sm: 8px; + --blur-md: 12px; + --blur-lg: 16px; + --blur-xl: 24px; + --blur-2xl: 40px; + --blur-3xl: 64px; + + --perspective-dramatic: 100px; + --perspective-near: 300px; + --perspective-normal: 500px; + --perspective-midrange: 800px; + --perspective-distant: 1200px; + + --aspect-video: 16 / 9; + + --default-transition-duration: 150ms; + --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + --default-font-family: --theme(--font-sans, initial); + --default-font-feature-settings: --theme(--font-sans--font-feature-settings, initial); + --default-font-variation-settings: --theme(--font-sans--font-variation-settings, initial); + --default-mono-font-family: --theme(--font-mono, initial); + --default-mono-font-feature-settings: --theme(--font-mono--font-feature-settings, initial); + --default-mono-font-variation-settings: --theme(--font-mono--font-variation-settings, initial); +} + +/* Deprecated */ +@theme default inline reference { + --blur: 8px; + --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); + --drop-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 1px 1px rgb(0 0 0 / 0.06); + --radius: 0.25rem; + --max-width-prose: 65ch; +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/utilities.css b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/utilities.css new file mode 100644 index 0000000000000000000000000000000000000000..65dd5f63a7dff212950f378bf32188d9d6291439 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/node_modules/tailwindcss/utilities.css @@ -0,0 +1 @@ +@tailwind utilities; diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4b45ce6a21b6d48af6f23086b700976a29bade2f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/node/package.json @@ -0,0 +1,48 @@ +{ + "name": "@tailwindcss/node", + "version": "4.1.11", + "description": "A utility-first CSS framework for rapidly building custom user interfaces.", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/tailwindlabs/tailwindcss.git", + "directory": "packages/@tailwindcss-node" + }, + "bugs": "https://github.com/tailwindlabs/tailwindcss/issues", + "homepage": "https://tailwindcss.com", + "files": [ + "dist/" + ], + "publishConfig": { + "provenance": true, + "access": "public" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./require-cache": { + "types": "./dist/require-cache.d.ts", + "default": "./dist/require-cache.js" + }, + "./esm-cache-loader": { + "types": "./dist/esm-cache.loader.d.mts", + "default": "./dist/esm-cache.loader.mjs" + } + }, + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "enhanced-resolve": "^5.18.1", + "jiti": "^2.4.2", + "lightningcss": "1.30.1", + "magic-string": "^0.30.17", + "source-map-js": "^1.2.1", + "tailwindcss": "4.1.11" + }, + "scripts": { + "build": "tsup-node", + "dev": "pnpm run build -- --watch" + } +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide-win32-x64-msvc/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide-win32-x64-msvc/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d6a82290738a9f78946cbcb4594535d6984086dd --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide-win32-x64-msvc/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide-win32-x64-msvc/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide-win32-x64-msvc/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bb1c4ac9e910cb466024b0b93b7a14111bd49481 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide-win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `@tailwindcss/oxide-win32-x64-msvc` + +This is the **x86_64-pc-windows-msvc** binary for `@tailwindcss/oxide` diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide-win32-x64-msvc/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide-win32-x64-msvc/package.json new file mode 100644 index 0000000000000000000000000000000000000000..695c3eeafd7d7e3908ddd4d43040a581ae166ce7 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide-win32-x64-msvc/package.json @@ -0,0 +1,27 @@ +{ + "name": "@tailwindcss/oxide-win32-x64-msvc", + "version": "4.1.11", + "repository": { + "type": "git", + "url": "git+https://github.com/tailwindlabs/tailwindcss.git", + "directory": "crates/node/npm/win32-x64-msvc" + }, + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "tailwindcss-oxide.win32-x64-msvc.node", + "files": [ + "tailwindcss-oxide.win32-x64-msvc.node" + ], + "publishConfig": { + "provenance": true, + "access": "public" + }, + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d6a82290738a9f78946cbcb4594535d6984086dd --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..184e08958de3c7514159d8a8b1909e90e2de4376 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/index.d.ts @@ -0,0 +1,48 @@ +/* auto-generated by NAPI-RS */ +/* eslint-disable */ +export declare class Scanner { + constructor(opts: ScannerOptions) + scan(): Array + scanFiles(input: Array): Array + getCandidatesWithPositions(input: ChangedContent): Array + get files(): Array + get globs(): Array + get normalizedSources(): Array +} + +export interface CandidateWithPosition { + /** The candidate string */ + candidate: string + /** The position of the candidate inside the content file */ + position: number +} + +export interface ChangedContent { + /** File path to the changed file */ + file?: string + /** Contents of the changed file */ + content?: string + /** File extension */ + extension: string +} + +export interface GlobEntry { + /** Base path of the glob */ + base: string + /** Glob pattern */ + pattern: string +} + +export interface ScannerOptions { + /** Glob sources */ + sources?: Array +} + +export interface SourceEntry { + /** Base path of the glob */ + base: string + /** Glob pattern */ + pattern: string + /** Negated flag */ + negated: boolean +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/index.js new file mode 100644 index 0000000000000000000000000000000000000000..6fcf962a3f8ffec09983638737ce12081d5adb3f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/index.js @@ -0,0 +1,377 @@ +// prettier-ignore +/* eslint-disable */ +// @ts-nocheck +/* auto-generated by NAPI-RS */ + +const { createRequire } = require('node:module') +require = createRequire(__filename) + +const { readFileSync } = require('node:fs') +let nativeBinding = null +const loadErrors = [] + +const isMusl = () => { + let musl = false + if (process.platform === 'linux') { + musl = isMuslFromFilesystem() + if (musl === null) { + musl = isMuslFromReport() + } + if (musl === null) { + musl = isMuslFromChildProcess() + } + } + return musl +} + +const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-') + +const isMuslFromFilesystem = () => { + try { + return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl') + } catch { + return null + } +} + +const isMuslFromReport = () => { + let report = null + if (typeof process.report?.getReport === 'function') { + process.report.excludeNetwork = true + report = process.report.getReport() + } + if (!report) { + return null + } + if (report.header && report.header.glibcVersionRuntime) { + return false + } + if (Array.isArray(report.sharedObjects)) { + if (report.sharedObjects.some(isFileMusl)) { + return true + } + } + return false +} + +const isMuslFromChildProcess = () => { + try { + return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl') + } catch (e) { + // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false + return false + } +} + +function requireNative() { + if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) { + try { + nativeBinding = require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH); + } catch (err) { + loadErrors.push(err); + } + } else if (process.platform === 'android') { + if (process.arch === 'arm64') { + try { + return require('./tailwindcss-oxide.android-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-android-arm64') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm') { + try { + return require('./tailwindcss-oxide.android-arm-eabi.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-android-arm-eabi') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`)) + } + } else if (process.platform === 'win32') { + if (process.arch === 'x64') { + try { + return require('./tailwindcss-oxide.win32-x64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-win32-x64-msvc') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'ia32') { + try { + return require('./tailwindcss-oxide.win32-ia32-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-win32-ia32-msvc') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm64') { + try { + return require('./tailwindcss-oxide.win32-arm64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-win32-arm64-msvc') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`)) + } + } else if (process.platform === 'darwin') { + try { + return require('./tailwindcss-oxide.darwin-universal.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-darwin-universal') + } catch (e) { + loadErrors.push(e) + } + + if (process.arch === 'x64') { + try { + return require('./tailwindcss-oxide.darwin-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-darwin-x64') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm64') { + try { + return require('./tailwindcss-oxide.darwin-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-darwin-arm64') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`)) + } + } else if (process.platform === 'freebsd') { + if (process.arch === 'x64') { + try { + return require('./tailwindcss-oxide.freebsd-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-freebsd-x64') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm64') { + try { + return require('./tailwindcss-oxide.freebsd-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-freebsd-arm64') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`)) + } + } else if (process.platform === 'linux') { + if (process.arch === 'x64') { + if (isMusl()) { + try { + return require('./tailwindcss-oxide.linux-x64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-x64-musl') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./tailwindcss-oxide.linux-x64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-x64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'arm64') { + if (isMusl()) { + try { + return require('./tailwindcss-oxide.linux-arm64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-arm64-musl') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./tailwindcss-oxide.linux-arm64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-arm64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'arm') { + if (isMusl()) { + try { + return require('./tailwindcss-oxide.linux-arm-musleabihf.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-arm-musleabihf') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./tailwindcss-oxide.linux-arm-gnueabihf.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-arm-gnueabihf') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'riscv64') { + if (isMusl()) { + try { + return require('./tailwindcss-oxide.linux-riscv64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-riscv64-musl') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./tailwindcss-oxide.linux-riscv64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-riscv64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'ppc64') { + try { + return require('./tailwindcss-oxide.linux-ppc64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-ppc64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 's390x') { + try { + return require('./tailwindcss-oxide.linux-s390x-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-s390x-gnu') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`)) + } + } else { + loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`)) + } +} + +nativeBinding = requireNative() + +if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { + try { + nativeBinding = require('./tailwindcss-oxide.wasi.cjs') + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + loadErrors.push(err) + } + } + if (!nativeBinding) { + try { + nativeBinding = require('@tailwindcss/oxide-wasm32-wasi') + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + loadErrors.push(err) + } + } + } +} + +if (!nativeBinding) { + if (loadErrors.length > 0) { + // TODO Link to documentation with potential fixes + // - The package owner could build/publish bindings for this arch + // - The user may need to bundle the correct files + // - The user may need to re-install node_modules to get new packages + throw new Error('Failed to load native binding', { cause: loadErrors }) + } + throw new Error(`Failed to load native binding`) +} + +module.exports.Scanner = nativeBinding.Scanner diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/package.json new file mode 100644 index 0000000000000000000000000000000000000000..c9b7bf0b5ef5e81ff076bc623f0581b573ab77fe --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/package.json @@ -0,0 +1,82 @@ +{ + "name": "@tailwindcss/oxide", + "version": "4.1.11", + "repository": { + "type": "git", + "url": "git+https://github.com/tailwindlabs/tailwindcss.git", + "directory": "crates/node" + }, + "main": "index.js", + "types": "index.d.ts", + "napi": { + "binaryName": "tailwindcss-oxide", + "packageName": "@tailwindcss/oxide", + "targets": [ + "armv7-linux-androideabi", + "aarch64-linux-android", + "aarch64-apple-darwin", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "armv7-unknown-linux-gnueabihf", + "x86_64-unknown-linux-musl", + "x86_64-unknown-freebsd", + "i686-pc-windows-msvc", + "aarch64-pc-windows-msvc", + "wasm32-wasip1-threads" + ], + "wasm": { + "initialMemory": 16384, + "browser": { + "fs": true + } + } + }, + "license": "MIT", + "dependencies": { + "tar": "^7.4.3", + "detect-libc": "^2.0.4" + }, + "devDependencies": { + "@napi-rs/cli": "^3.0.0-alpha.78", + "@napi-rs/wasm-runtime": "^0.2.11", + "emnapi": "1.4.3" + }, + "engines": { + "node": ">= 10" + }, + "files": [ + "index.js", + "index.d.ts", + "scripts/install.js" + ], + "publishConfig": { + "provenance": true, + "access": "public" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.1.11", + "@tailwindcss/oxide-freebsd-x64": "4.1.11", + "@tailwindcss/oxide-darwin-x64": "4.1.11", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.11", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.11", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.11", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.11", + "@tailwindcss/oxide-linux-x64-musl": "4.1.11", + "@tailwindcss/oxide-wasm32-wasi": "4.1.11", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.11", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.11", + "@tailwindcss/oxide-darwin-arm64": "4.1.11" + }, + "scripts": { + "artifacts": "napi artifacts", + "build": "pnpm run build:platform && pnpm run build:wasm", + "build:platform": "napi build --platform --release --no-const-enum", + "postbuild:platform": "node ./scripts/move-artifacts.mjs", + "build:wasm": "napi build --release --target wasm32-wasip1-threads --no-const-enum", + "postbuild:wasm": "node ./scripts/move-artifacts.mjs", + "dev": "cargo watch --quiet --shell 'npm run build'", + "build:debug": "napi build --platform --no-const-enum", + "version": "napi version", + "postinstall": "node ./scripts/install.js" + } +} \ No newline at end of file diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/scripts/install.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/scripts/install.js new file mode 100644 index 0000000000000000000000000000000000000000..f9cefe01c7c92996d7e0dc771287b020af8c19fb --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/oxide/scripts/install.js @@ -0,0 +1,143 @@ +#!/usr/bin/env node + +/** + * @tailwindcss/oxide postinstall script + * + * This script ensures that the correct binary for the current platform and + * architecture is downloaded and available. + */ + +const fs = require('fs') +const path = require('path') +const https = require('https') +const { extract } = require('tar') +const packageJson = require('../package.json') +const detectLibc = require('detect-libc') + +const version = packageJson.version + +function getPlatformPackageName() { + let platform = process.platform + let arch = process.arch + + let libc = '' + if (platform === 'linux') { + libc = detectLibc.isNonGlibcLinuxSync() ? 'musl' : 'gnu' + } + + // Map to our package naming conventions + switch (platform) { + case 'darwin': + return arch === 'arm64' ? '@tailwindcss/oxide-darwin-arm64' : '@tailwindcss/oxide-darwin-x64' + case 'win32': + if (arch === 'arm64') return '@tailwindcss/oxide-win32-arm64-msvc' + if (arch === 'ia32') return '@tailwindcss/oxide-win32-ia32-msvc' + return '@tailwindcss/oxide-win32-x64-msvc' + case 'linux': + if (arch === 'x64') { + return libc === 'musl' + ? '@tailwindcss/oxide-linux-x64-musl' + : '@tailwindcss/oxide-linux-x64-gnu' + } else if (arch === 'arm64') { + return libc === 'musl' + ? '@tailwindcss/oxide-linux-arm64-musl' + : '@tailwindcss/oxide-linux-arm64-gnu' + } else if (arch === 'arm') { + return '@tailwindcss/oxide-linux-arm-gnueabihf' + } + break + case 'freebsd': + return '@tailwindcss/oxide-freebsd-x64' + case 'android': + return '@tailwindcss/oxide-android-arm64' + default: + return '@tailwindcss/oxide-wasm32-wasi' + } +} + +function isPackageAvailable(packageName) { + try { + require.resolve(packageName) + return true + } catch (e) { + return false + } +} + +// Extract all files from a tarball to a destination directory +async function extractTarball(tarballStream, destDir) { + if (!fs.existsSync(destDir)) { + fs.mkdirSync(destDir, { recursive: true }) + } + + return new Promise((resolve, reject) => { + tarballStream + .pipe(extract({ cwd: destDir, strip: 1 })) + .on('error', (err) => reject(err)) + .on('end', () => resolve()) + }) +} + +async function downloadAndExtractBinary(packageName) { + let tarballUrl = `https://registry.npmjs.org/${packageName}/-/${packageName.replace('@tailwindcss/', '')}-${version}.tgz` + console.log(`Downloading ${tarballUrl}...`) + + return new Promise((resolve) => { + https + .get(tarballUrl, (response) => { + if (response.statusCode === 302 || response.statusCode === 301) { + // Handle redirects + https.get(response.headers.location, handleResponse).on('error', (err) => { + console.error('Download error:', err) + resolve() + }) + return + } + + handleResponse(response) + + async function handleResponse(response) { + try { + if (response.statusCode !== 200) { + throw new Error(`Download failed with status code: ${response.statusCode}`) + } + + await extractTarball( + response, + path.join(__dirname, '..', 'node_modules', ...packageName.split('/')), + ) + console.log(`Successfully downloaded and installed ${packageName}`) + } catch (error) { + console.error('Error during extraction:', error) + resolve() + } finally { + resolve() + } + } + }) + .on('error', (err) => { + console.error('Download error:', err) + resolve() + }) + }) +} + +async function main() { + // Don't run this script in the package source + try { + if (fs.existsSync(path.join(__dirname, '..', 'build.rs'))) { + return + } + + let packageName = getPlatformPackageName() + if (!packageName) return + if (isPackageAvailable(packageName)) return + + await downloadAndExtractBinary(packageName) + } catch (error) { + console.error(error) + return + } +} + +main() diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d6a82290738a9f78946cbcb4594535d6984086dd --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a4d73c53ffe636ba906d4a79a9ba35cf8e540a48 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/README.md @@ -0,0 +1,398 @@ +

+ + + + + Tailwind CSS Typography + + +

+ +The official Tailwind CSS Typography plugin provides a set of `prose` classes you can use to add beautiful typographic defaults to any vanilla HTML you don’t control, like HTML rendered from Markdown, or pulled from a CMS. + +```html +
{{ markdown }}
+``` + +To see what it looks like in action, check out our [live demo](https://play.tailwindcss.com/uj1vGACRJA?layout=preview) on Tailwind Play. + +--- + +## Installation + +Install the plugin from npm: + +```shell +npm install -D @tailwindcss/typography +``` + +Then add the plugin to your `tailwind.config.js` file: + +```js +/** @type {import('tailwindcss').Config} */ +module.exports = { + theme: { + // ... + }, + plugins: [ + require('@tailwindcss/typography'), + // ... + ], +} +``` + +--- + +## Basic usage + +Now you can use the `prose` classes to add sensible typography styles to any vanilla HTML: + +```html +
+

Garlic bread with cheese: What the science tells us

+

+ For years parents have espoused the health benefits of eating garlic bread with cheese to their + children, with the food earning such an iconic status in our culture that kids will often dress + up as warm, cheesy loaf for Halloween. +

+

+ But a recent study shows that the celebrated appetizer may be linked to a series of rabies cases + springing up around the country. +

+ +
+``` + +### Choosing a gray scale + +This plugin includes a modifier class for each of the five gray scales Tailwind includes by default so you can easily style your content to match the grays you're using in your project. + +```html +
{{ markdown }}
+``` + +Here are the classes that are generated using a totally default Tailwind CSS v2.0 build: + +| Class | Gray scale | +| ------------------------ | ---------- | +| `prose-gray` _(default)_ | Gray | +| `prose-slate` | Slate | +| `prose-zinc` | Zinc | +| `prose-neutral` | Neutral | +| `prose-stone` | Stone | + +Modifier classes are designed to be used with the [multi-class modifier pattern](http://nicolasgallagher.com/about-html-semantics-front-end-architecture/#component-modifiers) and must be used in conjunction with the base `prose` class. + +> [!NOTE] +> Always include the `prose` class when adding a gray scale modifier + +```html +
{{ markdown }}
+``` + +To learn about creating your own color themes, read the [adding custom color themes](#adding-custom-color-themes) documentation. + +### Applying a type scale + +Size modifiers allow you to adjust the overall size of your typography for different contexts. + +```html +
{{ markdown }}
+``` + +Five different typography sizes are included out of the box: + +| Class | Body font size | +| ------------------------ | ----------------- | +| `prose-sm` | 0.875rem _(14px)_ | +| `prose-base` _(default)_ | 1rem _(16px)_ | +| `prose-lg` | 1.125rem _(18px)_ | +| `prose-xl` | 1.25rem _(20px)_ | +| `prose-2xl` | 1.5rem _(24px)_ | + +These can be used in combination with Tailwind's [breakpoint modifiers](https://tailwindcss.com/docs/responsive-design) to change the overall font size of a piece of content at different viewport sizes: + +```html +
{{ markdown }}
+``` + +Everything about the provided size modifiers has been hand-tuned by professional designers to look as beautiful as possible, including the relationships between font sizes, heading spacing, code block padding, and more. + +Size modifiers are designed to be used with the [multi-class modifier pattern](http://nicolasgallagher.com/about-html-semantics-front-end-architecture/#component-modifiers) and must be used in conjunction with the base `prose` class. + +> [!NOTE] +> Always include the `prose` class when adding a size modifier + +```html +
{{ markdown }}
+``` + +To learn about customizing the included type scales, read the documentation on [customizing the CSS](#customizing-the-css). + +### Adapting to dark mode + +Each default color theme includes a hand-designed dark mode version that you can trigger by adding the `prose-invert` class: + +```html +
{{ markdown }}
+``` + +To learn about creating your own color themes, read the [adding custom color themes](#adding-custom-color-themes) documentation. + +### Element modifiers + +Use element modifiers to customize the style of individual elements in your content directly in your HTML: + +```html +
+ {{ markdown }} +
+``` + +This makes it easy to do things like style links to match your brand, add a border radius to images, and tons more. + +Here's a complete list of available element modifiers: + +| Modifier | Target | +| ---------------------------- | ---------------------------- | +| `prose-headings:{utility}` | `h1`, `h2`, `h3`, `h4`, `th` | +| `prose-lead:{utility}` | `[class~="lead"]` | +| `prose-h1:{utility}` | `h1` | +| `prose-h2:{utility}` | `h2` | +| `prose-h3:{utility}` | `h3` | +| `prose-h4:{utility}` | `h4` | +| `prose-p:{utility}` | `p` | +| `prose-a:{utility}` | `a` | +| `prose-blockquote:{utility}` | `blockquote` | +| `prose-figure:{utility}` | `figure` | +| `prose-figcaption:{utility}` | `figcaption` | +| `prose-strong:{utility}` | `strong` | +| `prose-em:{utility}` | `em` | +| `prose-kbd:{utility}` | `kbd` | +| `prose-code:{utility}` | `code` | +| `prose-pre:{utility}` | `pre` | +| `prose-ol:{utility}` | `ol` | +| `prose-ul:{utility}` | `ul` | +| `prose-li:{utility}` | `li` | +| `prose-table:{utility}` | `table` | +| `prose-thead:{utility}` | `thead` | +| `prose-tr:{utility}` | `tr` | +| `prose-th:{utility}` | `th` | +| `prose-td:{utility}` | `td` | +| `prose-img:{utility}` | `img` | +| `prose-video:{utility}` | `video` | +| `prose-hr:{utility}` | `hr` | + +When stacking these modifiers with other modifiers like `hover`, you most likely want the other modifier to come first: + +```html +
{{ markdown }}
+``` + +Read the Tailwind CSS documentation on [ordering stacked modifiers](https://tailwindcss.com/docs/hover-focus-and-other-states#ordering-stacked-modifiers) to learn more. + +### Overriding max-width + +Each size modifier comes with a baked in `max-width` designed to keep the content as readable as possible. This isn't always what you want though, and sometimes you'll want the content to just fill the width of its container. + +In those cases, all you need to do is add `max-w-none` to your content to override the embedded max-width: + +```html +
+
+ +
+
+
{{ markdown }}
+
+
+``` + +--- + +## Advanced topics + +### Undoing typography styles + +If you have a block of markup embedded in some content that shouldn't inherit the `prose` styles, use the `not-prose` class to sandbox it: + +```html +
+

My Heading

+

...

+ +
+ +
+ +

...

+ +
+``` + +Note that you can't nest new `prose` instances within a `not-prose` block at this time. + +### Adding custom color themes + +You can create your own color theme by adding a new key in the `typography` section of your `tailwind.config.js` file and providing your colors under the `css` key: + +```js {{ filename: 'tailwind.config.js' }} +/** @type {import('tailwindcss').Config} */ +module.exports = { + theme: { + extend: { + typography: ({ theme }) => ({ + pink: { + css: { + '--tw-prose-body': theme('colors.pink[800]'), + '--tw-prose-headings': theme('colors.pink[900]'), + '--tw-prose-lead': theme('colors.pink[700]'), + '--tw-prose-links': theme('colors.pink[900]'), + '--tw-prose-bold': theme('colors.pink[900]'), + '--tw-prose-counters': theme('colors.pink[600]'), + '--tw-prose-bullets': theme('colors.pink[400]'), + '--tw-prose-hr': theme('colors.pink[300]'), + '--tw-prose-quotes': theme('colors.pink[900]'), + '--tw-prose-quote-borders': theme('colors.pink[300]'), + '--tw-prose-captions': theme('colors.pink[700]'), + '--tw-prose-code': theme('colors.pink[900]'), + '--tw-prose-pre-code': theme('colors.pink[100]'), + '--tw-prose-pre-bg': theme('colors.pink[900]'), + '--tw-prose-th-borders': theme('colors.pink[300]'), + '--tw-prose-td-borders': theme('colors.pink[200]'), + '--tw-prose-invert-body': theme('colors.pink[200]'), + '--tw-prose-invert-headings': theme('colors.white'), + '--tw-prose-invert-lead': theme('colors.pink[300]'), + '--tw-prose-invert-links': theme('colors.white'), + '--tw-prose-invert-bold': theme('colors.white'), + '--tw-prose-invert-counters': theme('colors.pink[400]'), + '--tw-prose-invert-bullets': theme('colors.pink[600]'), + '--tw-prose-invert-hr': theme('colors.pink[700]'), + '--tw-prose-invert-quotes': theme('colors.pink[100]'), + '--tw-prose-invert-quote-borders': theme('colors.pink[700]'), + '--tw-prose-invert-captions': theme('colors.pink[400]'), + '--tw-prose-invert-code': theme('colors.white'), + '--tw-prose-invert-pre-code': theme('colors.pink[300]'), + '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)', + '--tw-prose-invert-th-borders': theme('colors.pink[600]'), + '--tw-prose-invert-td-borders': theme('colors.pink[700]'), + }, + }, + }), + }, + }, + plugins: [ + require('@tailwindcss/typography'), + // ... + ], +} +``` + +See our internal [style definitions](https://github.com/tailwindlabs/tailwindcss-typography/blob/main/src/styles.js) for some more examples. + +### Changing the default class name + +If you need to use a class name other than `prose` for any reason, you can do so using the `className` option when registering the plugin: + +```js {{ filename: 'tailwind.config.js' }} +/** @type {import('tailwindcss').Config} */ +module.exports = { + theme: { + // ... + }, + plugins: [ + require('@tailwindcss/typography')({ + className: 'wysiwyg', + }), + ] + ... +} +``` + +Now every instance of `prose` in the default class names will be replaced by your custom class name: + +```html +
+

My Heading

+

...

+ +
+ +
+ +

...

+ +
+``` + +### Customizing the CSS + +If you want to customize the raw CSS generated by this plugin, add your overrides under the `typography` key in the `theme` section of your `tailwind.config.js` file: + +```js {{ filename: 'tailwind.config.js' }} +/** @type {import('tailwindcss').Config} */ +module.exports = { + theme: { + extend: { + typography: { + DEFAULT: { + css: { + color: '#333', + a: { + color: '#3182ce', + '&:hover': { + color: '#2c5282', + }, + }, + }, + }, + }, + }, + }, + plugins: [ + require('@tailwindcss/typography'), + // ... + ], +} +``` + +Like with all theme customizations in Tailwind, you can also define the `typography` key as a function if you need access to the `theme` helper: + +```js {{ filename: 'tailwind.config.js' }} +/** @type {import('tailwindcss').Config} */ +module.exports = { + theme: { + extend: { + typography: (theme) => ({ + DEFAULT: { + css: { + color: theme('colors.gray.800'), + + // ... + }, + }, + }), + }, + }, + plugins: [ + require('@tailwindcss/typography'), + // ... + ], +} +``` + +Customizations should be applied to a specific modifier like `DEFAULT` or `xl`, and must be added under the `css` property. Customizations are authored in the same [CSS-in-JS syntax](https://tailwindcss.com/docs/plugins#css-in-js-syntax) used to write Tailwind plugins. + +See [the default styles](https://github.com/tailwindlabs/tailwindcss-typography/blob/main/src/styles.js) for this plugin for more in-depth examples of configuring each modifier. + +--- + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss the Tailwind CSS Typography plugin on GitHub](https://github.com/tailwindlabs/tailwindcss/discussions) + +For casual chit-chat with others using the framework: + +[Join the Tailwind CSS Discord Server](https://tailwindcss.com/discord) diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/package.json new file mode 100644 index 0000000000000000000000000000000000000000..70ff5f3745dce1273cd50ea875fd55887e53f31b --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/package.json @@ -0,0 +1,61 @@ +{ + "name": "@tailwindcss/typography", + "version": "0.5.16", + "description": "A Tailwind CSS plugin for automatically styling plain HTML content with beautiful typographic defaults.", + "main": "src/index.js", + "types": "src/index.d.ts", + "files": [ + "src/*.js", + "src/*.d.ts", + "dist/" + ], + "repository": "https://github.com/tailwindlabs/tailwindcss-typography", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "prettier": { + "printWidth": 100, + "semi": false, + "singleQuote": true, + "trailingComma": "es5" + }, + "scripts": { + "test": "jest", + "dev": "next dev demo", + "build": "next build demo", + "export": "next export demo", + "start": "next start demo", + "release-channel": "node ./scripts/release-channel.js", + "release-notes": "node ./scripts/release-notes.js" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" + }, + "devDependencies": { + "@mdx-js/loader": "^1.0.19", + "@mdx-js/mdx": "^1.6.6", + "@next/mdx": "^8.1.0", + "autoprefixer": "^10.2.1", + "highlight.js": "^10.4.1", + "jest": "^29.7.0", + "jest-diff": "^27.3.1", + "next": "^12.0.1", + "postcss": "^8.2.3", + "prettier": "^2.1.2", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "tailwindcss": "^3.2.2" + }, + "dependencies": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "postcss-selector-parser": "6.0.10" + }, + "jest": { + "setupFilesAfterEnv": [ + "/jest/customMatchers.js" + ] + } +} diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/src/index.d.ts b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/src/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5c38097ca0fedab6c02acd41630ef6f4a077179c --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/src/index.d.ts @@ -0,0 +1,9 @@ +declare function plugin(options?: Partial<{ className: string; target: 'modern' | 'legacy' }>): { + handler: () => void +} + +declare namespace plugin { + const __isOptionsFunction: true +} + +export = plugin diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/src/index.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..04830b9bf1373ded0a6358afc380e4ec208dcedf --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/src/index.js @@ -0,0 +1,140 @@ +const plugin = require('tailwindcss/plugin') +const merge = require('lodash.merge') +const castArray = require('lodash.castarray') +const styles = require('./styles') +const { commonTrailingPseudos } = require('./utils') + +const computed = { + // Reserved for future "magic properties", for example: + // bulletColor: (color) => ({ 'ul > li::before': { backgroundColor: color } }), +} + +function inWhere(selector, { className, modifier, prefix }) { + let prefixedNot = prefix(`.not-${className}`).slice(1) + let selectorPrefix = selector.startsWith('>') + ? `${modifier === 'DEFAULT' ? `.${className}` : `.${className}-${modifier}`} ` + : '' + + // Parse the selector, if every component ends in the same pseudo element(s) then move it to the end + let [trailingPseudo, rebuiltSelector] = commonTrailingPseudos(selector) + + if (trailingPseudo) { + return `:where(${selectorPrefix}${rebuiltSelector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))${trailingPseudo}` + } + + return `:where(${selectorPrefix}${selector}):not(:where([class~="${prefixedNot}"],[class~="${prefixedNot}"] *))` +} + +function isObject(value) { + return typeof value === 'object' && value !== null +} + +function configToCss(config = {}, { target, className, modifier, prefix }) { + function updateSelector(k, v) { + if (target === 'legacy') { + return [k, v] + } + + if (Array.isArray(v)) { + return [k, v] + } + + if (isObject(v)) { + let nested = Object.values(v).some(isObject) + if (nested) { + return [ + inWhere(k, { className, modifier, prefix }), + v, + Object.fromEntries(Object.entries(v).map(([k, v]) => updateSelector(k, v))), + ] + } + + return [inWhere(k, { className, modifier, prefix }), v] + } + + return [k, v] + } + + return Object.fromEntries( + Object.entries( + merge( + {}, + ...Object.keys(config) + .filter((key) => computed[key]) + .map((key) => computed[key](config[key])), + ...castArray(config.css || {}) + ) + ).map(([k, v]) => updateSelector(k, v)) + ) +} + +module.exports = plugin.withOptions( + ({ className = 'prose', target = 'modern' } = {}) => { + return function ({ addVariant, addComponents, theme, prefix }) { + let modifiers = theme('typography') + + let options = { className, prefix } + + for (let [name, ...selectors] of [ + ['headings', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'th'], + ['h1'], + ['h2'], + ['h3'], + ['h4'], + ['h5'], + ['h6'], + ['p'], + ['a'], + ['blockquote'], + ['figure'], + ['figcaption'], + ['strong'], + ['em'], + ['kbd'], + ['code'], + ['pre'], + ['ol'], + ['ul'], + ['li'], + ['table'], + ['thead'], + ['tr'], + ['th'], + ['td'], + ['img'], + ['video'], + ['hr'], + ['lead', '[class~="lead"]'], + ]) { + selectors = selectors.length === 0 ? [name] : selectors + + let selector = + target === 'legacy' ? selectors.map((selector) => `& ${selector}`) : selectors.join(', ') + + addVariant( + `${className}-${name}`, + target === 'legacy' ? selector : `& :is(${inWhere(selector, options)})` + ) + } + + addComponents( + Object.keys(modifiers).map((modifier) => ({ + [modifier === 'DEFAULT' ? `.${className}` : `.${className}-${modifier}`]: configToCss( + modifiers[modifier], + { + target, + className, + modifier, + prefix, + } + ), + })) + ) + } + }, + () => { + return { + theme: { typography: styles }, + } + } +) diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/src/index.test.js b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/src/index.test.js new file mode 100644 index 0000000000000000000000000000000000000000..8db6c6cb9e230ab7b20e295a47e5eaafbfbc5e91 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/typography/src/index.test.js @@ -0,0 +1,1423 @@ +const path = require('path') +const tailwind = require('tailwindcss') +const postcss = require('postcss') +const typographyPlugin = require('.') + +let html = String.raw +let css = String.raw + +let vars = ` + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(59 130 246 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; +` +let defaults = css` + *, + ::before, + ::after { + ${vars} + } + ::backdrop { + ${vars} + } +` + +function run(config, plugin = tailwind) { + let { currentTestName } = expect.getState() + config = { + ...{ plugins: [typographyPlugin], corePlugins: { preflight: false } }, + ...config, + } + + return postcss(plugin(config)).process( + ['@tailwind base;', '@tailwind components;', '@tailwind utilities'].join('\n'), + { + from: `${path.resolve(__filename)}?test=${currentTestName}`, + } + ) +} + +test('specificity is reduced with :where', async () => { + let config = { + content: [{ raw: html`
` }], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + maxWidth: '65ch', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'ol[type="A"]': { + listStyleType: 'upper-alpha', + }, + 'blockquote p:first-of-type::before': { + content: 'open-quote', + }, + 'blockquote p:last-of-type::after': { + content: 'close-quote', + }, + 'h4 strong': { + fontWeight: '700', + }, + 'figure > *': { + margin: 0, + }, + 'ol > li::marker': { + fontWeight: '400', + color: 'var(--tw-prose-counters)', + }, + '> ul > li p': { + marginTop: '16px', + marginBottom: '16px', + }, + 'code::before': { + content: '"`"', + }, + 'code::after': { + content: '"`"', + }, + }, + ], + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .prose { + color: var(--tw-prose-body); + max-width: 65ch; + } + .prose :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-lead); + } + .prose :where(strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-bold); + font-weight: 600; + } + .prose :where(ol[type='A']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + list-style-type: upper-alpha; + } + .prose + :where(blockquote p:first-of-type):not(:where([class~='not-prose'], [class~='not-prose'] + *))::before { + content: open-quote; + } + .prose + :where(blockquote p:last-of-type):not(:where([class~='not-prose'], [class~='not-prose'] + *))::after { + content: close-quote; + } + .prose :where(h4 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-weight: 700; + } + .prose :where(figure > *):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin: 0; + } + .prose :where(ol > li):not(:where([class~='not-prose'], [class~='not-prose'] *))::marker { + font-weight: 400; + color: var(--tw-prose-counters); + } + .prose + :where(.prose > ul > li p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin-top: 16px; + margin-bottom: 16px; + } + .prose :where(code):not(:where([class~='not-prose'], [class~='not-prose'] *))::before { + content: '`'; + } + .prose :where(code):not(:where([class~='not-prose'], [class~='not-prose'] *))::after { + content: '`'; + } + ` + ) + }) +}) + +test('variants', async () => { + let config = { + content: [{ raw: html`
` }], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'red', + p: { + color: 'lime', + }, + '> ul > li': { + color: 'purple', + }, + }, + ], + }, + lg: { + css: { + color: 'green', + p: { + color: 'tomato', + }, + '> ul > li': { + color: 'blue', + }, + }, + }, + xl: { + css: { + color: 'yellow', + '> ul > li': { + color: 'hotpink', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .hover\:prose-lg:hover { + color: green; + } + .hover\:prose-lg:hover :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: tomato; + } + .hover\:prose-lg:hover + :where(.hover\:prose-lg:hover + > ul + > li):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: blue; + } + @media (min-width: 640px) { + .sm\:prose { + color: red; + } + .sm\:prose :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: lime; + } + .sm\:prose + :where(.sm\:prose > ul > li):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: purple; + } + } + @media (min-width: 1024px) { + .lg\:prose-lg { + color: green; + } + .lg\:prose-lg :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: tomato; + } + .lg\:prose-lg + :where(.lg\:prose-lg > ul > li):not(:where([class~='not-prose'], [class~='not-prose'] + *)) { + color: blue; + } + } + ` + ) + }) +}) + +test('modifiers', async () => { + let config = { + content: [{ raw: html`
` }], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + maxWidth: '65ch', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'ol[type="A"]': { + listStyleType: 'upper-alpha', + }, + 'blockquote p:first-of-type::before': { + content: 'open-quote', + }, + 'blockquote p:last-of-type::after': { + content: 'close-quote', + }, + 'h4 strong': { + fontWeight: '700', + }, + 'figure > *': { + margin: 0, + }, + 'ol > li::marker': { + fontWeight: '400', + color: 'var(--tw-prose-counters)', + }, + 'code::before': { + content: '"`"', + }, + 'code::after': { + content: '"`"', + }, + }, + ], + }, + lg: { + css: [ + { + fontSize: '18px', + lineHeight: '1.75', + p: { + marginTop: '24px', + marginBottom: '24px', + }, + '[class~="lead"]': { + fontSize: '22px', + }, + blockquote: { + marginTop: '40px', + marginBottom: '40px', + }, + '> ul > li': { + paddingLeft: '12px', + }, + h1: { + fontSize: '48px', + marginTop: '0', + marginBottom: '40px', + }, + h2: { + fontSize: '30px', + marginTop: '56px', + marginBottom: '32px', + }, + h3: { + fontSize: '24px', + marginTop: '40px', + marginBottom: '16px', + }, + }, + ], + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .prose { + color: var(--tw-prose-body); + max-width: 65ch; + } + .prose :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-lead); + } + .prose :where(strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-bold); + font-weight: 600; + } + .prose :where(ol[type='A']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + list-style-type: upper-alpha; + } + .prose + :where(blockquote p:first-of-type):not(:where([class~='not-prose'], [class~='not-prose'] + *))::before { + content: open-quote; + } + .prose + :where(blockquote p:last-of-type):not(:where([class~='not-prose'], [class~='not-prose'] + *))::after { + content: close-quote; + } + .prose :where(h4 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-weight: 700; + } + .prose :where(figure > *):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin: 0; + } + .prose :where(ol > li):not(:where([class~='not-prose'], [class~='not-prose'] *))::marker { + font-weight: 400; + color: var(--tw-prose-counters); + } + .prose :where(code):not(:where([class~='not-prose'], [class~='not-prose'] *))::before { + content: '`'; + } + .prose :where(code):not(:where([class~='not-prose'], [class~='not-prose'] *))::after { + content: '`'; + } + .prose-lg { + font-size: 18px; + line-height: 1.75; + } + .prose-lg :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin-top: 24px; + margin-bottom: 24px; + } + .prose-lg + :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-size: 22px; + } + .prose-lg :where(blockquote):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin-top: 40px; + margin-bottom: 40px; + } + .prose-lg + :where(.prose-lg > ul > li):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + padding-left: 12px; + } + .prose-lg :where(h1):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-size: 48px; + margin-top: 0; + margin-bottom: 40px; + } + .prose-lg :where(h2):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-size: 30px; + margin-top: 56px; + margin-bottom: 32px; + } + .prose-lg :where(h3):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-size: 24px; + margin-top: 40px; + margin-bottom: 16px; + } + ` + ) + }) +}) + +test('legacy target', async () => { + let config = { + plugins: [typographyPlugin({ target: 'legacy' })], + content: [ + { raw: html`
` }, + ], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + maxWidth: '65ch', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'ol[type="A"]': { + listStyleType: 'upper-alpha', + }, + 'blockquote p:first-of-type::before': { + content: 'open-quote', + }, + 'blockquote p:last-of-type::after': { + content: 'close-quote', + }, + 'h4 strong': { + fontWeight: '700', + }, + 'figure > *': { + margin: 0, + }, + 'ol > li::marker': { + fontWeight: '400', + color: 'var(--tw-prose-counters)', + }, + 'code::before': { + content: '"`"', + }, + 'code::after': { + content: '"`"', + }, + }, + ], + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .prose { + color: var(--tw-prose-body); + max-width: 65ch; + } + .prose [class~='lead'] { + color: var(--tw-prose-lead); + } + .prose strong { + color: var(--tw-prose-bold); + font-weight: 600; + } + .prose ol[type='A'] { + list-style-type: upper-alpha; + } + .prose blockquote p:first-of-type::before { + content: open-quote; + } + .prose blockquote p:last-of-type::after { + content: close-quote; + } + .prose h4 strong { + font-weight: 700; + } + .prose figure > * { + margin: 0; + } + .prose ol > li::marker { + font-weight: 400; + color: var(--tw-prose-counters); + } + .prose code::before { + content: '`'; + } + .prose code::after { + content: '`'; + } + .prose-headings\:text-ellipsis h1 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis h2 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis h3 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis h4 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis h5 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis h6 { + text-overflow: ellipsis; + } + .prose-headings\:text-ellipsis th { + text-overflow: ellipsis; + } + .prose-h1\:text-center h1 { + text-align: center; + } + ` + ) + }) +}) + +test('custom class name', async () => { + let config = { + plugins: [typographyPlugin({ className: 'markdown' })], + content: [{ raw: html`
` }], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + maxWidth: '65ch', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'ol[type="A"]': { + listStyleType: 'upper-alpha', + }, + 'blockquote p:first-of-type::before': { + content: 'open-quote', + }, + 'blockquote p:last-of-type::after': { + content: 'close-quote', + }, + 'h4 strong': { + fontWeight: '700', + }, + 'figure > *': { + margin: 0, + }, + 'ol > li::marker': { + fontWeight: '400', + color: 'var(--tw-prose-counters)', + }, + 'code::before': { + content: '"`"', + }, + 'code::after': { + content: '"`"', + }, + }, + ], + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .markdown { + color: var(--tw-prose-body); + max-width: 65ch; + } + .markdown + :where([class~='lead']):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + color: var(--tw-prose-lead); + } + .markdown :where(strong):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + color: var(--tw-prose-bold); + font-weight: 600; + } + .markdown + :where(ol[type='A']):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + list-style-type: upper-alpha; + } + .markdown + :where(blockquote + p:first-of-type):not(:where([class~='not-markdown'], [class~='not-markdown'] + *))::before { + content: open-quote; + } + .markdown + :where(blockquote + p:last-of-type):not(:where([class~='not-markdown'], [class~='not-markdown'] *))::after { + content: close-quote; + } + .markdown + :where(h4 strong):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + font-weight: 700; + } + .markdown + :where(figure > *):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + margin: 0; + } + .markdown + :where(ol > li):not(:where([class~='not-markdown'], [class~='not-markdown'] *))::marker { + font-weight: 400; + color: var(--tw-prose-counters); + } + .markdown + :where(code):not(:where([class~='not-markdown'], [class~='not-markdown'] *))::before { + content: '`'; + } + .markdown + :where(code):not(:where([class~='not-markdown'], [class~='not-markdown'] *))::after { + content: '`'; + } + ` + ) + }) +}) + +test('element variants', async () => { + let config = { + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'h4 strong': { + fontWeight: '700', + }, + }, + ], + }, + }, + }, + } + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .prose { + color: var(--tw-prose-body); + } + .prose :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-lead); + } + .prose :where(strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-bold); + font-weight: 600; + } + .prose :where(h4 strong):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + font-weight: 700; + } + .prose-headings\:underline + :is(:where(h1, h2, h3, h4, h5, h6, th):not(:where([class~='not-prose'], [class~='not-prose'] + *))) { + text-decoration-line: underline; + } + .prose-h1\:text-3xl + :is(:where(h1):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 1.875rem; + line-height: 2.25rem; + } + .prose-h2\:text-2xl + :is(:where(h2):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 1.5rem; + line-height: 2rem; + } + .prose-h3\:text-xl + :is(:where(h3):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 1.25rem; + line-height: 1.75rem; + } + .prose-h4\:text-lg + :is(:where(h4):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 1.125rem; + line-height: 1.75rem; + } + .prose-p\:text-gray-700 + :is(:where(p):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); + } + .prose-a\:font-bold + :is(:where(a):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-weight: 700; + } + .prose-blockquote\:italic + :is(:where(blockquote):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-style: italic; + } + .prose-figure\:mx-auto + :is(:where(figure):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + margin-left: auto; + margin-right: auto; + } + .prose-figcaption\:opacity-75 + :is(:where(figcaption):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + opacity: 0.75; + } + .prose-strong\:font-medium + :is(:where(strong):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-weight: 500; + } + .prose-em\:italic + :is(:where(em):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-style: italic; + } + .prose-kbd\:border-b-2 + :is(:where(kbd):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + border-bottom-width: 2px; + } + .prose-code\:font-mono + :is(:where(code):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', + 'Courier New', monospace; + } + .prose-pre\:font-mono + :is(:where(pre):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', + 'Courier New', monospace; + } + .prose-ol\:pl-6 :is(:where(ol):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + padding-left: 1.5rem; + } + .prose-ul\:pl-8 :is(:where(ul):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + padding-left: 2rem; + } + .prose-li\:my-4 :is(:where(li):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + margin-top: 1rem; + margin-bottom: 1rem; + } + .prose-table\:my-8 + :is(:where(table):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + margin-top: 2rem; + margin-bottom: 2rem; + } + .prose-thead\:border-red-300 + :is(:where(thead):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + --tw-border-opacity: 1; + border-color: rgb(252 165 165 / var(--tw-border-opacity)); + } + .prose-tr\:border-red-200 + :is(:where(tr):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + --tw-border-opacity: 1; + border-color: rgb(254 202 202 / var(--tw-border-opacity)); + } + .prose-th\:text-left + :is(:where(th):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + text-align: left; + } + .prose-img\:rounded-lg + :is(:where(img):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + border-radius: 0.5rem; + } + .prose-video\:my-12 + :is(:where(video):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + margin-top: 3rem; + margin-bottom: 3rem; + } + .prose-hr\:border-t-2 + :is(:where(hr):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + border-top-width: 2px; + } + .prose-lead\:italic + :is(:where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-style: italic; + } + ` + ) + }) +}) + +test('element variants with custom class name', async () => { + let config = { + plugins: [typographyPlugin({ className: 'markdown' })], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: [ + { + color: 'var(--tw-prose-body)', + '[class~="lead"]': { + color: 'var(--tw-prose-lead)', + }, + strong: { + color: 'var(--tw-prose-bold)', + fontWeight: '600', + }, + 'h4 strong': { + fontWeight: '700', + }, + }, + ], + }, + }, + }, + } + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .markdown { + color: var(--tw-prose-body); + } + .markdown + :where([class~='lead']):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + color: var(--tw-prose-lead); + } + .markdown :where(strong):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + color: var(--tw-prose-bold); + font-weight: 600; + } + .markdown + :where(h4 strong):not(:where([class~='not-markdown'], [class~='not-markdown'] *)) { + font-weight: 700; + } + .markdown-headings\:underline + :is(:where(h1, h2, h3, h4, h5, h6, th):not(:where([class~='not-markdown'], [class~='not-markdown'] + *))) { + text-decoration-line: underline; + } + .markdown-h1\:text-3xl + :is(:where(h1):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-size: 1.875rem; + line-height: 2.25rem; + } + .markdown-h2\:text-2xl + :is(:where(h2):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-size: 1.5rem; + line-height: 2rem; + } + .markdown-h3\:text-xl + :is(:where(h3):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-size: 1.25rem; + line-height: 1.75rem; + } + .markdown-h4\:text-lg + :is(:where(h4):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-size: 1.125rem; + line-height: 1.75rem; + } + .markdown-p\:text-gray-700 + :is(:where(p):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + --tw-text-opacity: 1; + color: rgb(55 65 81 / var(--tw-text-opacity)); + } + .markdown-a\:font-bold + :is(:where(a):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-weight: 700; + } + .markdown-blockquote\:italic + :is(:where(blockquote):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-style: italic; + } + .markdown-figure\:mx-auto + :is(:where(figure):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + margin-left: auto; + margin-right: auto; + } + .markdown-figcaption\:opacity-75 + :is(:where(figcaption):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + opacity: 0.75; + } + .markdown-strong\:font-medium + :is(:where(strong):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-weight: 500; + } + .markdown-em\:italic + :is(:where(em):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-style: italic; + } + .markdown-kbd\:border-b-2 + :is(:where(kbd):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + border-bottom-width: 2px; + } + .markdown-code\:font-mono + :is(:where(code):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', + 'Courier New', monospace; + } + .markdown-pre\:font-mono + :is(:where(pre):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', + 'Courier New', monospace; + } + .markdown-ol\:pl-6 + :is(:where(ol):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + padding-left: 1.5rem; + } + .markdown-ul\:pl-8 + :is(:where(ul):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + padding-left: 2rem; + } + .markdown-li\:my-4 + :is(:where(li):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + margin-top: 1rem; + margin-bottom: 1rem; + } + .markdown-table\:my-8 + :is(:where(table):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + margin-top: 2rem; + margin-bottom: 2rem; + } + .markdown-thead\:border-red-300 + :is(:where(thead):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + --tw-border-opacity: 1; + border-color: rgb(252 165 165 / var(--tw-border-opacity)); + } + .markdown-tr\:border-red-200 + :is(:where(tr):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + --tw-border-opacity: 1; + border-color: rgb(254 202 202 / var(--tw-border-opacity)); + } + .markdown-th\:text-left + :is(:where(th):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + text-align: left; + } + .markdown-img\:rounded-lg + :is(:where(img):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + border-radius: 0.5rem; + } + .markdown-video\:my-12 + :is(:where(video):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + margin-top: 3rem; + margin-bottom: 3rem; + } + .markdown-hr\:border-t-2 + :is(:where(hr):not(:where([class~='not-markdown'], [class~='not-markdown'] *))) { + border-top-width: 2px; + } + .markdown-lead\:italic + :is(:where([class~='lead']):not(:where([class~='not-markdown'], [class~='not-markdown'] + *))) { + font-style: italic; + } + ` + ) + }) +}) + +test('customizing defaults with multiple values does not result in invalid css', async () => { + let config = { + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + textAlign: ['-webkit-match-parent', 'match-parent'], + }, + }, + }, + }, + } + return run(config).then((result) => { + expect(result.css).toMatchFormattedCss( + css` + ${defaults} + + .prose { + text-align: -webkit-match-parent; + text-align: match-parent; + } + ` + ) + }) +}) + +it('should be possible to use nested syntax (&) when extending the config', () => { + let config = { + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + extend: { + typography: { + DEFAULT: { + css: { + color: '#000', + a: { + color: '#888', + '&:hover': { + color: '#ff0000', + }, + }, + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose { + color: #000; + max-width: 65ch; + } + `) + + expect(result.css).toIncludeCss(css` + .prose :where(a):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: #888; + text-decoration: underline; + font-weight: 500; + } + `) + + expect(result.css).toIncludeCss(css` + .prose :where(a):not(:where([class~='not-prose'], [class~='not-prose'] *)):hover { + color: #ff0000; + } + `) + }) +}) + +it('should be possible to specify custom h5 and h6 styles', () => { + let config = { + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose-h5\:text-sm :is(:where(h5):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 0.875rem; + line-height: 1.25rem; + } + .prose-h6\:text-xl :is(:where(h6):not(:where([class~='not-prose'], [class~='not-prose'] *))) { + font-size: 1.25rem; + line-height: 1.75rem; + } + `) + }) +}) + +it('should not break with multiple selectors with pseudo elements using variants', () => { + let config = { + darkMode: 'class', + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + 'ol li::before, ul li::before': { + color: 'red', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .dark + .dark\:prose + :where(ol li, ul li):not(:where([class~='not-prose'], [class~='not-prose'] *))::before { + color: red; + } + `) + }) +}) + +it('lifts all common, trailing pseudo elements when the same across all selectors', () => { + let config = { + darkMode: 'class', + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + 'ol li::marker::before, ul li::marker::before': { + color: 'red', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose + :where(ol li, ul li):not(:where([class~='not-prose'], [class~='not-prose'] + *))::marker::before { + color: red; + } + `) + + // TODO: The output here is a bug in tailwindcss variant selector rewriting + // IT should be ::marker::before + expect(result.css).toIncludeCss(css` + .dark + .dark\:prose + :where(ol li, ul li):not(:where([class~='not-prose'], [class~='not-prose'] + *))::before::marker { + color: red; + } + `) + }) +}) + +it('does not modify selectors with differing pseudo elements', () => { + let config = { + darkMode: 'class', + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + 'ol li::before, ul li::after': { + color: 'red', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose + :where(ol li::before, ul li::after):not(:where([class~='not-prose'], [class~='not-prose'] + *)) { + color: red; + } + `) + + // TODO: The output here is a bug in tailwindcss variant selector rewriting + expect(result.css).toIncludeCss(css` + .dark + .dark\:prose + :where(ol li, ul li):not(:where([class~='not-prose'], [class~='not-prose'] *))::before, + ::after { + color: red; + } + `) + }) +}) + +it('lifts only the common, trailing pseudo elements from selectors', () => { + let config = { + darkMode: 'class', + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + 'ol li::scroll-thumb::before, ul li::scroll-track::before': { + color: 'red', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose + :where(ol li::scroll-thumb, ul + li::scroll-track):not(:where([class~='not-prose'], [class~='not-prose'] *))::before { + color: red; + } + `) + + // TODO: The output here is a bug in tailwindcss variant selector rewriting + expect(result.css).toIncludeCss(css` + .dark + .dark\:prose + :where(ol li, ul li):not(:where([class~='not-prose'], [class~='not-prose'] + *))::scroll-thumb, + ::scroll-track, + ::before { + color: red; + } + `) + }) +}) + +it('ignores common non-trailing pseudo-elements in selectors', () => { + let config = { + darkMode: 'class', + plugins: [typographyPlugin()], + content: [ + { + raw: html`
`, + }, + ], + theme: { + typography: { + DEFAULT: { + css: { + 'ol li::before::scroll-thumb, ul li::before::scroll-track': { + color: 'red', + }, + }, + }, + }, + }, + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss(css` + .prose + :where(ol li::before::scroll-thumb, ul + li::before::scroll-track):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: red; + } + `) + + // TODO: The output here is a bug in tailwindcss variant selector rewriting + expect(result.css).toIncludeCss(css` + .dark + .dark\:prose + :where(ol li::scroll-thumb, ul + li::scroll-track):not(:where([class~='not-prose'], [class~='not-prose'] *))::before, + ::before { + color: red; + } + `) + }) +}) + +test('lead styles are inserted after paragraph styles', async () => { + let config = { + content: [{ raw: html`
` }], + } + + return run(config).then((result) => { + expect(result.css).toIncludeCss( + css` + .prose { + color: var(--tw-prose-body); + max-width: 65ch; + } + .prose :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + .prose :where([class~='lead']):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + color: var(--tw-prose-lead); + font-size: 1.25em; + line-height: 1.6; + margin-top: 1.2em; + margin-bottom: 1.2em; + } + ` + ) + }) +}) diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/vite/LICENSE b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/vite/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d6a82290738a9f78946cbcb4594535d6984086dd --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/vite/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/vite/README.md b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/vite/README.md new file mode 100644 index 0000000000000000000000000000000000000000..95ec9d87ddcc59defeaed61b39cbb49869220c9f --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/vite/README.md @@ -0,0 +1,40 @@ +

+ + + + + Tailwind CSS + + +

+ +

+ A utility-first CSS framework for rapidly building custom user interfaces. +

+ +

+ Build Status + Total Downloads + Latest Release + License +

+ +--- + +## Documentation + +For full documentation, visit [tailwindcss.com](https://tailwindcss.com). + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions) + +For chatting with others using the framework: + +[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe) + +## Contributing + +If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/next/.github/CONTRIBUTING.md) **before submitting a pull request**. diff --git a/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/vite/package.json b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/vite/package.json new file mode 100644 index 0000000000000000000000000000000000000000..c4610f1edae86a2d739ea536a2f13659bbd404d5 --- /dev/null +++ b/llama.cpp/build/tools/ui/ui-src/node_modules/@tailwindcss/vite/package.json @@ -0,0 +1,42 @@ +{ + "name": "@tailwindcss/vite", + "version": "4.1.11", + "description": "A utility-first CSS framework for rapidly building custom user interfaces.", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/tailwindlabs/tailwindcss.git", + "directory": "packages/@tailwindcss-vite" + }, + "bugs": "https://github.com/tailwindlabs/tailwindcss/issues", + "homepage": "https://tailwindcss.com", + "files": [ + "dist/" + ], + "publishConfig": { + "provenance": true, + "access": "public" + }, + "exports": { + ".": { + "types": "./dist/index.d.mts", + "import": "./dist/index.mjs" + } + }, + "dependencies": { + "@tailwindcss/oxide": "4.1.11", + "@tailwindcss/node": "4.1.11", + "tailwindcss": "4.1.11" + }, + "devDependencies": { + "@types/node": "^20.19.0", + "vite": "^7.0.0" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7" + }, + "scripts": { + "build": "tsup-node", + "dev": "pnpm run build -- --watch" + } +} \ No newline at end of file