@unocss/language-server 66.6.6 → 66.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { n as __require$1, r as __toESM, t as __commonJSMin } from "./chunk-C9ebiww4.mjs";
2
- import { a as join, i as isAbsolute, n as searchForIcon, o as resolve$1, t as loadIcon } from "./loader-CxlILAbz.mjs";
1
+ import { n as __require$1, r as __toESM, t as __commonJSMin } from "./chunk-CBBoxR_p.mjs";
2
+ import { a as join, i as isAbsolute, n as searchForIcon, o as resolve$1, t as loadIcon } from "./loader-DsXvVy9i.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { BetterMap, LAYER_IMPORTS, clone, createGenerator, createNanoEvents, cssIdRE, defaultSplitRE, definePreset, escapeRegExp, escapeSelector, isAttributifySelector, isString, isValidSelector, mergeDeep, notNull, splitWithVariantGroupRE, symbols, toArray, uniq, warnOnce } from "@unocss/core";
5
5
  import { existsSync } from "node:fs";
@@ -9,17 +9,11 @@ import process$1 from "node:process";
9
9
  import { createRecoveryConfigLoader } from "@unocss/config";
10
10
  import presetWind3 from "@unocss/preset-wind3";
11
11
  import { sourceObjectFields, sourcePluginFactory } from "unconfig/presets";
12
- import parserCSS from "prettier/parser-postcss";
13
- import prettier from "prettier/standalone";
14
-
15
- //#region ../../virtual-shared/integration/src/constants.ts
16
- const INCLUDE_COMMENT = "@unocss-include";
17
- const IGNORE_COMMENT = "@unocss-ignore";
18
- const CSS_PLACEHOLDER = "@unocss-placeholder";
12
+ import parserCSS from "prettier/parser-postcss.js";
13
+ import prettier from "prettier/standalone.js";
19
14
  const SKIP_START_COMMENT = "@unocss-skip-start";
20
15
  const SKIP_END_COMMENT = "@unocss-skip-end";
21
16
  const SKIP_COMMENT_RE = new RegExp(`(\/\/\\s*?${SKIP_START_COMMENT}\\s*?|\\/\\*\\s*?${SKIP_START_COMMENT}\\s*?\\*\\/|<!--\\s*?${SKIP_START_COMMENT}\\s*?-->)[\\s\\S]*?(\/\/\\s*?${SKIP_END_COMMENT}\\s*?|\\/\\*\\s*?${SKIP_END_COMMENT}\\s*?\\*\\/|<!--\\s*?${SKIP_END_COMMENT}\\s*?-->)`, "g");
22
-
23
17
  //#endregion
24
18
  //#region ../../virtual-shared/integration/src/defaults-ide.ts
25
19
  /**
@@ -34,7 +28,6 @@ const defaultIdeMatchInclude = [
34
28
  * Default match includes in getMatchedPositions for IDE
35
29
  */
36
30
  const defaultIdeMatchExclude = [SKIP_COMMENT_RE];
37
-
38
31
  //#endregion
39
32
  //#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
40
33
  var comma = ",".charCodeAt(0);
@@ -110,18 +103,17 @@ function encode(decoded) {
110
103
  }
111
104
  return writer.flush();
112
105
  }
113
-
114
106
  //#endregion
115
107
  //#region ../../node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs
116
108
  var BitSet = class BitSet {
117
109
  constructor(arg) {
118
110
  this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
119
111
  }
120
- add(n$1) {
121
- this.bits[n$1 >> 5] |= 1 << (n$1 & 31);
112
+ add(n) {
113
+ this.bits[n >> 5] |= 1 << (n & 31);
122
114
  }
123
- has(n$1) {
124
- return !!(this.bits[n$1 >> 5] & 1 << (n$1 & 31));
115
+ has(n) {
116
+ return !!(this.bits[n >> 5] & 1 << (n & 31));
125
117
  }
126
118
  };
127
119
  var Chunk = class Chunk {
@@ -259,15 +251,15 @@ function getBtoa() {
259
251
  }
260
252
  const btoa = /* @__PURE__ */ getBtoa();
261
253
  var SourceMap = class {
262
- constructor(properties$2) {
254
+ constructor(properties) {
263
255
  this.version = 3;
264
- this.file = properties$2.file;
265
- this.sources = properties$2.sources;
266
- this.sourcesContent = properties$2.sourcesContent;
267
- this.names = properties$2.names;
268
- this.mappings = encode(properties$2.mappings);
269
- if (typeof properties$2.x_google_ignoreList !== "undefined") this.x_google_ignoreList = properties$2.x_google_ignoreList;
270
- if (typeof properties$2.debugId !== "undefined") this.debugId = properties$2.debugId;
256
+ this.file = properties.file;
257
+ this.sources = properties.sources;
258
+ this.sourcesContent = properties.sourcesContent;
259
+ this.names = properties.names;
260
+ this.mappings = encode(properties.mappings);
261
+ if (typeof properties.x_google_ignoreList !== "undefined") this.x_google_ignoreList = properties.x_google_ignoreList;
262
+ if (typeof properties.debugId !== "undefined") this.debugId = properties.debugId;
271
263
  }
272
264
  toString() {
273
265
  return JSON.stringify(this);
@@ -344,14 +336,14 @@ var Mappings = class {
344
336
  let contentLineEnd = content.indexOf("\n", 0);
345
337
  let previousContentLineEnd = -1;
346
338
  while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {
347
- const segment$1 = [
339
+ const segment = [
348
340
  this.generatedCodeColumn,
349
341
  sourceIndex,
350
342
  loc.line,
351
343
  loc.column
352
344
  ];
353
- if (nameIndex >= 0) segment$1.push(nameIndex);
354
- this.rawSegments.push(segment$1);
345
+ if (nameIndex >= 0) segment.push(nameIndex);
346
+ this.rawSegments.push(segment);
355
347
  this.generatedCodeLine += 1;
356
348
  this.raw[this.generatedCodeLine] = this.rawSegments = [];
357
349
  this.generatedCodeColumn = 0;
@@ -876,10 +868,10 @@ var MagicString = class MagicString {
876
868
  return result;
877
869
  }
878
870
  snip(start, end) {
879
- const clone$1 = this.clone();
880
- clone$1.remove(0, start);
881
- clone$1.remove(end, clone$1.original.length);
882
- return clone$1;
871
+ const clone = this.clone();
872
+ clone.remove(0, start);
873
+ clone.remove(end, clone.original.length);
874
+ return clone;
883
875
  }
884
876
  _split(index) {
885
877
  if (this.byStart[index] || this.byEnd[index]) return;
@@ -937,7 +929,7 @@ var MagicString = class MagicString {
937
929
  return this.trimStart(charType).trimEnd(charType);
938
930
  }
939
931
  trimEndAborted(charType) {
940
- const rx = /* @__PURE__ */ new RegExp((charType || "\\s") + "+$");
932
+ const rx = new RegExp((charType || "\\s") + "+$");
941
933
  this.outro = this.outro.replace(rx, "");
942
934
  if (this.outro.length) return true;
943
935
  let chunk = this.lastChunk;
@@ -960,7 +952,7 @@ var MagicString = class MagicString {
960
952
  return this;
961
953
  }
962
954
  trimStartAborted(charType) {
963
- const rx = /* @__PURE__ */ new RegExp("^" + (charType || "\\s") + "+");
955
+ const rx = new RegExp("^" + (charType || "\\s") + "+");
964
956
  this.intro = this.intro.replace(rx, "");
965
957
  if (this.intro.length) return true;
966
958
  let chunk = this.firstChunk;
@@ -1003,15 +995,15 @@ var MagicString = class MagicString {
1003
995
  }
1004
996
  if (searchValue.global) matchAll(searchValue, this.original).forEach((match) => {
1005
997
  if (match.index != null) {
1006
- const replacement$1 = getReplacement(match, this.original);
1007
- if (replacement$1 !== match[0]) this.overwrite(match.index, match.index + match[0].length, replacement$1);
998
+ const replacement = getReplacement(match, this.original);
999
+ if (replacement !== match[0]) this.overwrite(match.index, match.index + match[0].length, replacement);
1008
1000
  }
1009
1001
  });
1010
1002
  else {
1011
1003
  const match = this.original.match(searchValue);
1012
1004
  if (match && match.index != null) {
1013
- const replacement$1 = getReplacement(match, this.original);
1014
- if (replacement$1 !== match[0]) this.overwrite(match.index, match.index + match[0].length, replacement$1);
1005
+ const replacement = getReplacement(match, this.original);
1006
+ if (replacement !== match[0]) this.overwrite(match.index, match.index + match[0].length, replacement);
1015
1007
  }
1016
1008
  }
1017
1009
  return this;
@@ -1046,18 +1038,15 @@ var MagicString = class MagicString {
1046
1038
  return this._replaceRegexp(searchValue, replacement);
1047
1039
  }
1048
1040
  };
1049
-
1050
1041
  //#endregion
1051
1042
  //#region ../../virtual-shared/integration/src/utils.ts
1052
1043
  function isCssId(id) {
1053
1044
  return cssIdRE.test(id);
1054
1045
  }
1055
-
1056
1046
  //#endregion
1057
1047
  //#region ../../packages-presets/extractor-arbitrary-variants/src/index.ts
1058
1048
  const quotedArbitraryValuesRE$1 = /(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g;
1059
1049
  const arbitraryPropertyRE$1 = /\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g;
1060
-
1061
1050
  //#endregion
1062
1051
  //#region ../../virtual-shared/integration/src/match-positions.ts
1063
1052
  async function isPug(uno, code, id = "") {
@@ -1090,7 +1079,7 @@ function getPlainClassMatchedPositionsForPug(codeSplit, matchedPlain, start) {
1090
1079
  plainClassName
1091
1080
  ]);
1092
1081
  } else {
1093
- const match = (/* @__PURE__ */ new RegExp(`\.(${plainClassName})[\.#=\s(]|\.(${plainClassName})$`)).exec(codeSplit);
1082
+ const match = new RegExp(`\.(${plainClassName})[\.#=\s(]|\.(${plainClassName})$`).exec(codeSplit);
1094
1083
  if (match) result.push([
1095
1084
  start + match.index + 1,
1096
1085
  start + match.index + plainClassName.length + 1,
@@ -1128,10 +1117,10 @@ function getMatchedPositions(code, matched, extraAnnotations = [], options = {})
1128
1117
  });
1129
1118
  function highlightLessGreaterThanSign(str) {
1130
1119
  if (/[><]/.test(str)) for (const match of code.matchAll(new RegExp(escapeRegExp(str), "g"))) {
1131
- const start$1 = match.index;
1132
- const end = start$1 + match[0].length;
1120
+ const start = match.index;
1121
+ const end = start + match[0].length;
1133
1122
  result.push([
1134
- start$1,
1123
+ start,
1135
1124
  end,
1136
1125
  match[0]
1137
1126
  ]);
@@ -1149,20 +1138,20 @@ function getMatchedPositions(code, matched, extraAnnotations = [], options = {})
1149
1138
  start = end;
1150
1139
  });
1151
1140
  for (const match of code.matchAll(quotedArbitraryValuesRE$1)) {
1152
- const start$1 = match.index;
1153
- const end = start$1 + match[0].length;
1141
+ const start = match.index;
1142
+ const end = start + match[0].length;
1154
1143
  if (plain.has(match[0])) result.push([
1155
- start$1,
1144
+ start,
1156
1145
  end,
1157
1146
  match[0]
1158
1147
  ]);
1159
1148
  }
1160
1149
  for (const match of code.matchAll(arbitraryPropertyRE$1)) {
1161
- const start$1 = match.index;
1162
- const end = start$1 + match[0].length;
1150
+ const start = match.index;
1151
+ const end = start + match[0].length;
1163
1152
  if (plain.has(match[0])) {
1164
- if (result.findIndex(([s, e]) => s === start$1 && e === end) < 0) result.push([
1165
- start$1,
1153
+ if (result.findIndex(([s, e]) => s === start && e === end) < 0) result.push([
1154
+ start,
1166
1155
  end,
1167
1156
  match[0]
1168
1157
  ]);
@@ -1176,10 +1165,10 @@ function getMatchedPositions(code, matched, extraAnnotations = [], options = {})
1176
1165
  let bodyIndex = body.match(`[\\b\\s'"]${escapeRegExp(value)}[\\b\\s'"]`)?.index ?? -1;
1177
1166
  if (/[\s'"]/.test(body[bodyIndex] ?? "")) bodyIndex++;
1178
1167
  if (bodyIndex < 0) return;
1179
- const start$1 = match.index + escaped.length + bodyIndex;
1180
- const end = start$1 + value.length;
1168
+ const start = match.index + escaped.length + bodyIndex;
1169
+ const end = start + value.length;
1181
1170
  result.push([
1182
- start$1,
1171
+ start,
1183
1172
  end,
1184
1173
  `[${name}="${value}"]`
1185
1174
  ]);
@@ -1190,8 +1179,8 @@ function getMatchedPositions(code, matched, extraAnnotations = [], options = {})
1190
1179
  i.offset + i.length,
1191
1180
  i.className
1192
1181
  ]));
1193
- return result.filter(([start$1, end]) => {
1194
- if (includeRanges.some(([s, e]) => start$1 >= s && end <= e)) return true;
1182
+ return result.filter(([start, end]) => {
1183
+ if (includeRanges.some(([s, e]) => start >= s && end <= e)) return true;
1195
1184
  return false;
1196
1185
  }).sort((a, b) => a[0] - b[0]);
1197
1186
  }
@@ -1208,7 +1197,7 @@ async function getMatchedPositionsFromCode(uno, code, id = "", options = {}) {
1208
1197
  "pre",
1209
1198
  "default",
1210
1199
  "post"
1211
- ]) for (const i of transformers?.filter((i$1) => (i$1.enforce ?? "default") === enforce) || []) {
1200
+ ]) for (const i of transformers?.filter((i) => (i.enforce ?? "default") === enforce) || []) {
1212
1201
  const _annotations = (await i.transform(s, id, ctx))?.highlightAnnotations;
1213
1202
  if (_annotations) annotations.push(..._annotations);
1214
1203
  }
@@ -1218,7 +1207,6 @@ async function getMatchedPositionsFromCode(uno, code, id = "", options = {}) {
1218
1207
  ...options
1219
1208
  });
1220
1209
  }
1221
-
1222
1210
  //#endregion
1223
1211
  //#region src/core/cache.ts
1224
1212
  const cache = /* @__PURE__ */ new Map();
@@ -1235,7 +1223,6 @@ function getMatchedPositionsFromDoc(uno, code, id, strictAnnotationMatch = false
1235
1223
  cache.set(id, result);
1236
1224
  return result;
1237
1225
  }
1238
-
1239
1226
  //#endregion
1240
1227
  //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/constants.js
1241
1228
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -1289,28 +1276,24 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1289
1276
  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
1290
1277
  SEP: "\\"
1291
1278
  };
1292
- /**
1293
- * POSIX Bracket Regex
1294
- */
1295
- const POSIX_REGEX_SOURCE = {
1296
- alnum: "a-zA-Z0-9",
1297
- alpha: "a-zA-Z",
1298
- ascii: "\\x00-\\x7F",
1299
- blank: " \\t",
1300
- cntrl: "\\x00-\\x1F\\x7F",
1301
- digit: "0-9",
1302
- graph: "\\x21-\\x7E",
1303
- lower: "a-z",
1304
- print: "\\x20-\\x7E ",
1305
- punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
1306
- space: " \\t\\r\\n\\v\\f",
1307
- upper: "A-Z",
1308
- word: "A-Za-z0-9_",
1309
- xdigit: "A-Fa-f0-9"
1310
- };
1311
1279
  module.exports = {
1312
1280
  MAX_LENGTH: 1024 * 64,
1313
- POSIX_REGEX_SOURCE,
1281
+ POSIX_REGEX_SOURCE: {
1282
+ alnum: "a-zA-Z0-9",
1283
+ alpha: "a-zA-Z",
1284
+ ascii: "\\x00-\\x7F",
1285
+ blank: " \\t",
1286
+ cntrl: "\\x00-\\x1F\\x7F",
1287
+ digit: "0-9",
1288
+ graph: "\\x21-\\x7E",
1289
+ lower: "a-z",
1290
+ print: "\\x20-\\x7E ",
1291
+ punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
1292
+ space: " \\t\\r\\n\\v\\f",
1293
+ upper: "A-Z",
1294
+ word: "A-Za-z0-9_",
1295
+ xdigit: "A-Fa-f0-9"
1296
+ },
1314
1297
  REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
1315
1298
  REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
1316
1299
  REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
@@ -1366,12 +1349,12 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1366
1349
  CHAR_UNDERSCORE: 95,
1367
1350
  CHAR_VERTICAL_LINE: 124,
1368
1351
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
1369
- extglobChars(chars$1) {
1352
+ extglobChars(chars) {
1370
1353
  return {
1371
1354
  "!": {
1372
1355
  type: "negate",
1373
1356
  open: "(?:(?!(?:",
1374
- close: `))${chars$1.STAR})`
1357
+ close: `))${chars.STAR})`
1375
1358
  },
1376
1359
  "?": {
1377
1360
  type: "qmark",
@@ -1400,7 +1383,6 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1400
1383
  }
1401
1384
  };
1402
1385
  }));
1403
-
1404
1386
  //#endregion
1405
1387
  //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/utils.js
1406
1388
  var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -1442,14 +1424,13 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
1442
1424
  if (state.negated === true) output = `(?:^(?!${output}).*$)`;
1443
1425
  return output;
1444
1426
  };
1445
- exports.basename = (path$1, { windows } = {}) => {
1446
- const segs = path$1.split(windows ? /[\\/]/ : "/");
1427
+ exports.basename = (path, { windows } = {}) => {
1428
+ const segs = path.split(windows ? /[\\/]/ : "/");
1447
1429
  const last = segs[segs.length - 1];
1448
1430
  if (last === "") return segs[segs.length - 2];
1449
1431
  return last;
1450
1432
  };
1451
1433
  }));
1452
-
1453
1434
  //#endregion
1454
1435
  //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/scan.js
1455
1436
  var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -1707,9 +1688,9 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1707
1688
  if (opts.parts === true || opts.tokens === true) {
1708
1689
  let prevIndex;
1709
1690
  for (let idx = 0; idx < slashes.length; idx++) {
1710
- const n$1 = prevIndex ? prevIndex + 1 : start;
1691
+ const n = prevIndex ? prevIndex + 1 : start;
1711
1692
  const i = slashes[idx];
1712
- const value = input.slice(n$1, i);
1693
+ const value = input.slice(n, i);
1713
1694
  if (opts.tokens) {
1714
1695
  if (idx === 0 && start !== 0) {
1715
1696
  tokens[idx].isPrefix = true;
@@ -1737,7 +1718,6 @@ var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1737
1718
  };
1738
1719
  module.exports = scan;
1739
1720
  }));
1740
-
1741
1721
  //#endregion
1742
1722
  //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/parse.js
1743
1723
  var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -1790,8 +1770,8 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1790
1770
  const PLATFORM_CHARS = constants.globChars(opts.windows);
1791
1771
  const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
1792
1772
  const { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS;
1793
- const globstar = (opts$1) => {
1794
- return `(${capture}(?:(?!${START_ANCHOR}${opts$1.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1773
+ const globstar = (opts) => {
1774
+ return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1795
1775
  };
1796
1776
  const nodot = opts.dot ? "" : NO_DOT;
1797
1777
  const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
@@ -1826,11 +1806,11 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1826
1806
  * Tokenizing helpers
1827
1807
  */
1828
1808
  const eos = () => state.index === len - 1;
1829
- const peek = state.peek = (n$1 = 1) => input[state.index + n$1];
1809
+ const peek = state.peek = (n = 1) => input[state.index + n];
1830
1810
  const advance = state.advance = () => input[++state.index] || "";
1831
1811
  const remaining = () => input.slice(state.index + 1);
1832
- const consume = (value$1 = "", num = 0) => {
1833
- state.consumed += value$1;
1812
+ const consume = (value = "", num = 0) => {
1813
+ state.consumed += value;
1834
1814
  state.index += num;
1835
1815
  };
1836
1816
  const append = (token) => {
@@ -1887,9 +1867,9 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1887
1867
  tokens.push(tok);
1888
1868
  prev = tok;
1889
1869
  };
1890
- const extglobOpen = (type, value$1) => {
1870
+ const extglobOpen = (type, value) => {
1891
1871
  const token = {
1892
- ...EXTGLOB_CHARS[value$1],
1872
+ ...EXTGLOB_CHARS[value],
1893
1873
  conditions: 1,
1894
1874
  inner: ""
1895
1875
  };
@@ -1900,7 +1880,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1900
1880
  increment("parens");
1901
1881
  push({
1902
1882
  type,
1903
- value: value$1,
1883
+ value,
1904
1884
  output: state.output ? "" : ONE_CHAR
1905
1885
  });
1906
1886
  push({
@@ -1937,7 +1917,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1937
1917
  */
1938
1918
  if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
1939
1919
  let backslashes = false;
1940
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars$1, first, rest, index) => {
1920
+ let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
1941
1921
  if (first === "\\") {
1942
1922
  backslashes = true;
1943
1923
  return m;
@@ -1945,9 +1925,9 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1945
1925
  if (first === "?") {
1946
1926
  if (esc) return esc + first + (rest ? QMARK.repeat(rest.length) : "");
1947
1927
  if (index === 0) return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
1948
- return QMARK.repeat(chars$1.length);
1928
+ return QMARK.repeat(chars.length);
1949
1929
  }
1950
- if (first === ".") return DOT_LITERAL.repeat(chars$1.length);
1930
+ if (first === ".") return DOT_LITERAL.repeat(chars.length);
1951
1931
  if (first === "*") {
1952
1932
  if (esc) return esc + first + (rest ? star : "");
1953
1933
  return star;
@@ -2567,9 +2547,9 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2567
2547
  };
2568
2548
  let star = opts.bash === true ? ".*?" : STAR;
2569
2549
  if (opts.capture) star = `(${star})`;
2570
- const globstar = (opts$1) => {
2571
- if (opts$1.noglobstar === true) return star;
2572
- return `(${capture}(?:(?!${START_ANCHOR}${opts$1.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
2550
+ const globstar = (opts) => {
2551
+ if (opts.noglobstar === true) return star;
2552
+ return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
2573
2553
  };
2574
2554
  const create = (str) => {
2575
2555
  switch (str) {
@@ -2584,9 +2564,9 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2584
2564
  default: {
2585
2565
  const match = /^(.*?)\.(\w+)$/.exec(str);
2586
2566
  if (!match) return;
2587
- const source$1 = create(match[1]);
2588
- if (!source$1) return;
2589
- return source$1 + DOT_LITERAL + match[2];
2567
+ const source = create(match[1]);
2568
+ if (!source) return;
2569
+ return source + DOT_LITERAL + match[2];
2590
2570
  }
2591
2571
  }
2592
2572
  };
@@ -2596,7 +2576,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2596
2576
  };
2597
2577
  module.exports = parse;
2598
2578
  }));
2599
-
2600
2579
  //#endregion
2601
2580
  //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/lib/picomatch.js
2602
2581
  var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -2631,8 +2610,8 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2631
2610
  const fns = glob.map((input) => picomatch(input, options, returnState));
2632
2611
  const arrayMatcher = (str) => {
2633
2612
  for (const isMatch of fns) {
2634
- const state$1 = isMatch(str);
2635
- if (state$1) return state$1;
2613
+ const state = isMatch(str);
2614
+ if (state) return state;
2636
2615
  }
2637
2616
  return false;
2638
2617
  };
@@ -2889,10 +2868,9 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2889
2868
  */
2890
2869
  module.exports = picomatch;
2891
2870
  }));
2892
-
2893
2871
  //#endregion
2894
- //#region ../../node_modules/.pnpm/picomatch@4.0.3/node_modules/picomatch/index.js
2895
- var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2872
+ //#region ../../node_modules/.pnpm/unplugin-utils@0.3.1/node_modules/unplugin-utils/dist/index.js
2873
+ var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
2896
2874
  const pico = require_picomatch$1();
2897
2875
  const utils = require_utils();
2898
2876
  function picomatch(glob, options, returnState = false) {
@@ -2904,11 +2882,7 @@ var require_picomatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2904
2882
  }
2905
2883
  Object.assign(picomatch, pico);
2906
2884
  module.exports = picomatch;
2907
- }));
2908
-
2909
- //#endregion
2910
- //#region ../../node_modules/.pnpm/unplugin-utils@0.3.1/node_modules/unplugin-utils/dist/index.js
2911
- var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
2885
+ })))(), 1);
2912
2886
  /**
2913
2887
  * Converts path separators to forward slash.
2914
2888
  */
@@ -2961,24 +2935,18 @@ function createFilter(include, exclude, options) {
2961
2935
  return !includeMatchers.length;
2962
2936
  };
2963
2937
  }
2964
-
2965
2938
  //#endregion
2966
2939
  //#region ../../virtual-shared/integration/src/defaults.ts
2967
2940
  const defaultPipelineExclude = [cssIdRE];
2968
2941
  const defaultPipelineInclude = [/\.(vue|svelte|[jt]sx|vine.ts|mdx?|astro|elm|php|phtml|marko|html)($|\?)/];
2969
-
2970
- //#endregion
2971
- //#region ../../virtual-shared/integration/src/deprecation.ts
2972
- function deprecationCheck(config) {}
2973
-
2974
2942
  //#endregion
2975
2943
  //#region ../../virtual-shared/integration/src/context.ts
2976
- function createContext(configOrPath, defaults$1 = {}, extraConfigSources = [], resolveConfigResult = () => {}) {
2944
+ function createContext(configOrPath, defaults = {}, extraConfigSources = [], resolveConfigResult = () => {}) {
2977
2945
  let root = process$1.cwd();
2978
2946
  let rawConfig = {};
2979
2947
  let configFileList = [];
2980
2948
  let uno;
2981
- const _uno = createGenerator(rawConfig, defaults$1).then((r) => {
2949
+ const _uno = createGenerator(rawConfig, defaults).then((r) => {
2982
2950
  uno = r;
2983
2951
  return r;
2984
2952
  });
@@ -2993,9 +2961,9 @@ function createContext(configOrPath, defaults$1 = {}, extraConfigSources = [], r
2993
2961
  let ready = reloadConfig();
2994
2962
  async function reloadConfig() {
2995
2963
  await _uno;
2996
- const result = await loadConfig(root, configOrPath, extraConfigSources, defaults$1);
2964
+ const result = await loadConfig(root, configOrPath, extraConfigSources, defaults);
2997
2965
  resolveConfigResult(result);
2998
- /* @__PURE__ */ deprecationCheck(result.config);
2966
+ result.config;
2999
2967
  rawConfig = result.config;
3000
2968
  configFileList = result.sources;
3001
2969
  await uno.setConfig(rawConfig);
@@ -3021,15 +2989,15 @@ function createContext(configOrPath, defaults$1 = {}, extraConfigSources = [], r
3021
2989
  reloadListeners.forEach((cb) => cb());
3022
2990
  }
3023
2991
  async function extract(code, id) {
3024
- const uno$1 = await _uno;
2992
+ const uno = await _uno;
3025
2993
  if (id) modules.set(id, code);
3026
2994
  const len = tokens.size;
3027
- await uno$1.applyExtractors(code.replace(SKIP_COMMENT_RE, ""), id, tokens);
2995
+ await uno.applyExtractors(code.replace(SKIP_COMMENT_RE, ""), id, tokens);
3028
2996
  if (tokens.size > len) invalidate();
3029
2997
  }
3030
2998
  function filter(code, id) {
3031
- if (code.includes(IGNORE_COMMENT)) return false;
3032
- return code.includes(INCLUDE_COMMENT) || code.includes(CSS_PLACEHOLDER) || rollupFilter(id.replace(/\?v=\w+$/, ""));
2999
+ if (code.includes("@unocss-ignore")) return false;
3000
+ return code.includes("@unocss-include") || code.includes("@unocss-placeholder") || rollupFilter(id.replace(/\?v=\w+$/, ""));
3033
3001
  }
3034
3002
  async function getConfig() {
3035
3003
  await ready;
@@ -3049,8 +3017,8 @@ function createContext(configOrPath, defaults$1 = {}, extraConfigSources = [], r
3049
3017
  if (vmpCache.has(prefix)) return vmpCache.get(prefix);
3050
3018
  const regexes = {
3051
3019
  prefix,
3052
- RESOLVED_ID_WITH_QUERY_RE: /* @__PURE__ */ new RegExp(`[/\\\\]${prefix}(_.*?)?\\.css(\\?.*)?$`),
3053
- RESOLVED_ID_RE: /* @__PURE__ */ new RegExp(`[/\\\\]${prefix}(?:_(.*?))?\.css$`)
3020
+ RESOLVED_ID_WITH_QUERY_RE: new RegExp(`[/\\\\]${prefix}(_.*?)?\\.css(\\?.*)?$`),
3021
+ RESOLVED_ID_RE: new RegExp(`[/\\\\]${prefix}(?:_(.*?))?\.css$`)
3054
3022
  };
3055
3023
  vmpCache.set(prefix, regexes);
3056
3024
  return regexes;
@@ -3087,7 +3055,6 @@ function createContext(configOrPath, defaults$1 = {}, extraConfigSources = [], r
3087
3055
  getVMPRegexes
3088
3056
  };
3089
3057
  }
3090
-
3091
3058
  //#endregion
3092
3059
  //#region ../../packages-presets/preset-attributify/dist/index.mjs
3093
3060
  const variantsRE = /^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;
@@ -3105,24 +3072,24 @@ function variantAttributify(options = {}) {
3105
3072
  if (name.startsWith(prefix)) name = name.slice(prefix.length);
3106
3073
  else if (prefixedOnly) return;
3107
3074
  const content = match[2];
3108
- const [, variants$1 = "", body = content] = content.match(variantsRE) || [];
3109
- if (body === "~" || trueToNonValued && body === "true" || !body) return `${variants$1}${name}`;
3075
+ const [, variants = "", body = content] = content.match(variantsRE) || [];
3076
+ if (body === "~" || trueToNonValued && body === "true" || !body) return `${variants}${name}`;
3110
3077
  if (variantsValueRE == null) {
3111
3078
  const separators = generator?.config?.separators?.join("|");
3112
- if (separators) variantsValueRE = /* @__PURE__ */ new RegExp(`^(.*\\](?:${separators}))(\\[[^\\]]+?\\])$`);
3079
+ if (separators) variantsValueRE = new RegExp(`^(.*\\](?:${separators}))(\\[[^\\]]+?\\])$`);
3113
3080
  else variantsValueRE = false;
3114
3081
  }
3115
3082
  if (variantsValueRE) {
3116
3083
  const [, bodyVariant, bracketValue] = content.match(variantsValueRE) || [];
3117
- if (bracketValue) return `${bodyVariant}${variants$1}${name}-${bracketValue}`;
3084
+ if (bracketValue) return `${bodyVariant}${variants}${name}-${bracketValue}`;
3118
3085
  }
3119
- if (variants$1 && body.match(/^[\d.]+$/)) {
3120
- const variantParts = variants$1.split(/([^:]*:)/g).filter(Boolean);
3086
+ if (variants && /^[\d.]+$/.test(body)) {
3087
+ const variantParts = variants.split(/([^:]*:)/g).filter(Boolean);
3121
3088
  const _body = variantParts.pop() + body;
3122
3089
  const _variants = variantParts.join("");
3123
- return [{ matcher: `${variants$1}${name}-${body}` }, { matcher: `${_variants}${name}-${_body}` }];
3090
+ return [{ matcher: `${variants}${name}-${body}` }, { matcher: `${_variants}${name}-${_body}` }];
3124
3091
  }
3125
- return `${variants$1}${name}-${body}`;
3092
+ return `${variants}${name}-${body}`;
3126
3093
  }
3127
3094
  };
3128
3095
  }
@@ -3137,11 +3104,11 @@ function autocompleteExtractorAttributify(options) {
3137
3104
  let attrs;
3138
3105
  let elPos = 0;
3139
3106
  for (const match of matchedElements) {
3140
- const [, prefix, content$1] = match;
3141
- const currentPos$1 = match.index + prefix.length;
3142
- if (cursor > currentPos$1 && cursor <= currentPos$1 + content$1.length) {
3143
- elPos = currentPos$1;
3144
- attrs = content$1;
3107
+ const [, prefix, content] = match;
3108
+ const currentPos = match.index + prefix.length;
3109
+ if (cursor > currentPos && cursor <= currentPos + content.length) {
3110
+ elPos = currentPos;
3111
+ attrs = content;
3145
3112
  break;
3146
3113
  }
3147
3114
  }
@@ -3152,9 +3119,9 @@ function autocompleteExtractorAttributify(options) {
3152
3119
  let attrValues;
3153
3120
  for (const match of matchedAttributes) {
3154
3121
  const [matched, name, rawValues] = match;
3155
- const currentPos$1 = elPos + match.index;
3156
- if (cursor > currentPos$1 && cursor <= currentPos$1 + matched.length) {
3157
- attrsPos = currentPos$1;
3122
+ const currentPos = elPos + match.index;
3123
+ if (cursor > currentPos && cursor <= currentPos + matched.length) {
3124
+ attrsPos = currentPos;
3158
3125
  attrName = name;
3159
3126
  attrValues = rawValues?.slice(1);
3160
3127
  break;
@@ -3190,17 +3157,17 @@ function autocompleteExtractorAttributify(options) {
3190
3157
  matchSplit = splitterRE$1.exec(attrValues.slice(currentPos));
3191
3158
  }
3192
3159
  if (value === void 0) value = attrValues.slice(currentPos);
3193
- const [, variants$1 = "", body] = value.match(variantsRE) || [];
3160
+ const [, variants = "", body] = value.match(variantsRE) || [];
3194
3161
  return {
3195
- extracted: `${variants$1}${attrNameWithoutPrefix}-${body}`,
3162
+ extracted: `${variants}${attrNameWithoutPrefix}-${body}`,
3196
3163
  transformSuggestions(suggestions) {
3197
- return suggestions.filter((v) => v.startsWith(`${variants$1}${attrNameWithoutPrefix}-`)).map((v) => variants$1 + v.slice(variants$1.length + attrNameWithoutPrefix.length + 1));
3164
+ return suggestions.filter((v) => v.startsWith(`${variants}${attrNameWithoutPrefix}-`)).map((v) => variants + v.slice(variants.length + attrNameWithoutPrefix.length + 1));
3198
3165
  },
3199
3166
  resolveReplacement(suggestion) {
3200
3167
  return {
3201
3168
  start: currentPos + attrValuePos,
3202
3169
  end: currentPos + attrValuePos + value.length,
3203
- replacement: variants$1 + suggestion.slice(variants$1.length + attrNameWithoutPrefix.length + 1)
3170
+ replacement: variants + suggestion.slice(variants.length + attrNameWithoutPrefix.length + 1)
3204
3171
  };
3205
3172
  }
3206
3173
  };
@@ -3224,8 +3191,8 @@ function extractorAttributify(options) {
3224
3191
  return {
3225
3192
  name: "@unocss/preset-attributify/extractor",
3226
3193
  extract({ code }) {
3227
- return Array.from(code.matchAll(elementRE)).flatMap((match) => Array.from((match[1] || "").matchAll(valuedAttributeRE))).flatMap(([, name, ...contents$1]) => {
3228
- const content = contents$1.filter(Boolean).join("");
3194
+ return Array.from(code.matchAll(elementRE)).flatMap((match) => Array.from((match[1] || "").matchAll(valuedAttributeRE))).flatMap(([, name, ...contents]) => {
3195
+ const content = contents.filter(Boolean).join("");
3229
3196
  if (ignoreAttributes.includes(name)) return [];
3230
3197
  for (const prefix of strippedPrefixes) if (name.startsWith(prefix)) {
3231
3198
  name = name.slice(prefix.length);
@@ -3286,8 +3253,6 @@ const presetAttributify = definePreset((options = {}) => {
3286
3253
  extractorDefault: options.strict ? false : void 0
3287
3254
  };
3288
3255
  });
3289
- var src_default$5 = presetAttributify;
3290
-
3291
3256
  //#endregion
3292
3257
  //#region ../../node_modules/.pnpm/@iconify+utils@3.1.0/node_modules/@iconify/utils/lib/svg/url.js
3293
3258
  /**
@@ -3299,7 +3264,6 @@ var src_default$5 = presetAttributify;
3299
3264
  function encodeSVGforURL(svg) {
3300
3265
  return svg.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
3301
3266
  }
3302
-
3303
3267
  //#endregion
3304
3268
  //#region ../../node_modules/.pnpm/@iconify+utils@3.1.0/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js
3305
3269
  /**
@@ -3313,9 +3277,8 @@ function encodeSvgForCss(svg) {
3313
3277
  if (!useSvg.includes(" xmlns=")) useSvg = useSvg.replace("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" ");
3314
3278
  return encodeSVGforURL(useSvg);
3315
3279
  }
3316
-
3317
3280
  //#endregion
3318
- //#region ../../packages-presets/preset-icons/dist/core-DbR55bSN.mjs
3281
+ //#region ../../packages-presets/preset-icons/dist/core-DIrlUwzK.mjs
3319
3282
  function getEnvFlags() {
3320
3283
  const isNode = typeof process !== "undefined" && process.stdout;
3321
3284
  return {
@@ -3411,6 +3374,7 @@ var collections_default = [
3411
3374
  "gala",
3412
3375
  "game-icons",
3413
3376
  "garden",
3377
+ "gcp",
3414
3378
  "geo",
3415
3379
  "gg",
3416
3380
  "gis",
@@ -3695,14 +3659,12 @@ async function parseIconWithLoader(body, loader, options = {}, safeCollectionsNa
3695
3659
  svg
3696
3660
  };
3697
3661
  }
3698
-
3699
3662
  //#endregion
3700
- //#region ../../packages-presets/preset-icons/dist/cdn-CH1oTUdH.mjs
3663
+ //#region ../../packages-presets/preset-icons/dist/cdn-DYTPkoFm.mjs
3701
3664
  async function createCDNLoader(cdnBase) {
3702
- const { $fetch } = await import("./node-DvibxqDE.mjs");
3665
+ const { $fetch } = await import("./node-D23LglTq.mjs");
3703
3666
  return createCDNFetchLoader($fetch, cdnBase);
3704
3667
  }
3705
-
3706
3668
  //#endregion
3707
3669
  //#region ../../packages-presets/preset-icons/dist/index.mjs
3708
3670
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
@@ -3739,14 +3701,12 @@ const presetIcons = /* @__PURE__ */ definePreset((options = {}) => {
3739
3701
  });
3740
3702
  async function createNodeLoader() {
3741
3703
  try {
3742
- return await import("./node-loader-DpZIWCu9.mjs").then((i) => i?.loadNodeIcon);
3704
+ return await import("./node-loader-ZSa5xzQw.mjs").then((i) => i?.loadNodeIcon);
3743
3705
  } catch {}
3744
3706
  try {
3745
3707
  return __require("@iconify/utils/lib/loader/node-loader.cjs").loadNodeIcon;
3746
3708
  } catch {}
3747
3709
  }
3748
- var src_default$4 = presetIcons;
3749
-
3750
3710
  //#endregion
3751
3711
  //#region ../../packages-presets/preset-tagify/dist/index.mjs
3752
3712
  const MARKER = "__TAGIFY__";
@@ -3780,13 +3740,13 @@ function variantTagify(options) {
3780
3740
  match(input) {
3781
3741
  if (!input.startsWith(prefix)) return;
3782
3742
  const matcher = input.slice(prefix.length);
3783
- const handler$1 = {
3743
+ const handler = {
3784
3744
  matcher,
3785
3745
  selector: (i) => i.slice(11)
3786
3746
  };
3787
- if (extraProperties) if (typeof extraProperties === "function") handler$1.body = (entries) => [...entries, ...Object.entries(extraProperties(matcher) ?? {})];
3788
- else handler$1.body = (entries) => [...entries, ...Object.entries(extraProperties)];
3789
- return handler$1;
3747
+ if (extraProperties) if (typeof extraProperties === "function") handler.body = (entries) => [...entries, ...Object.entries(extraProperties(matcher) ?? {})];
3748
+ else handler.body = (entries) => [...entries, ...Object.entries(extraProperties)];
3749
+ return handler;
3790
3750
  }
3791
3751
  };
3792
3752
  }
@@ -3802,8 +3762,6 @@ const presetTagify = definePreset((options = {}) => {
3802
3762
  extractorDefault: defaultExtractor ? void 0 : false
3803
3763
  };
3804
3764
  });
3805
- var src_default$3 = presetTagify;
3806
-
3807
3765
  //#endregion
3808
3766
  //#region ../../packages-presets/rule-utils/dist/index.mjs
3809
3767
  function getBracket(str, open, close) {
@@ -3953,7 +3911,7 @@ function parseHexColor(str) {
3953
3911
  switch (body.length) {
3954
3912
  case 3:
3955
3913
  case 4: {
3956
- const digits = Array.from(body, (s) => Number.parseInt(s, 16)).map((n$1) => n$1 << 4 | n$1);
3914
+ const digits = Array.from(body, (s) => Number.parseInt(s, 16)).map((n) => n << 4 | n);
3957
3915
  return {
3958
3916
  type: "rgb",
3959
3917
  components: digits.slice(0, 3),
@@ -4061,21 +4019,21 @@ const themeFnRE = /theme\(\s*(['"])?(.*?)\1?\s*\)/g;
4061
4019
  function hasThemeFn(str) {
4062
4020
  return str.includes("theme(") && str.includes(")");
4063
4021
  }
4064
- function transformThemeFn(code, theme$2, throwOnMissing = true) {
4022
+ function transformThemeFn(code, theme, throwOnMissing = true) {
4065
4023
  const matches = Array.from(code.toString().matchAll(themeFnRE));
4066
4024
  if (!matches.length) return code;
4067
4025
  const s = new MagicString(code);
4068
4026
  for (const match of matches) {
4069
4027
  const rawArg = match[2];
4070
4028
  if (!rawArg) throw new Error("theme() expect exact one argument, but got 0");
4071
- const value = transformThemeString(rawArg, theme$2, throwOnMissing);
4029
+ const value = transformThemeString(rawArg, theme, throwOnMissing);
4072
4030
  if (value) s.overwrite(match.index, match.index + match[0].length, value);
4073
4031
  }
4074
4032
  return s.toString();
4075
4033
  }
4076
- function transformThemeString(code, theme$2, throwOnMissing = true) {
4034
+ function transformThemeString(code, theme, throwOnMissing = true) {
4077
4035
  const [rawKey, alpha] = code.split("/");
4078
- let value = rawKey.trim().split(".").reduce((t, k) => t === null || t === void 0 ? void 0 : t[k], theme$2);
4036
+ let value = rawKey.trim().split(".").reduce((t, k) => t === null || t === void 0 ? void 0 : t[k], theme);
4079
4037
  if (typeof value === "object") value = value.DEFAULT;
4080
4038
  if (typeof value === "string") {
4081
4039
  if (alpha) {
@@ -4096,12 +4054,12 @@ function calcMaxWidthBySize(size) {
4096
4054
  return `calc(${size} - 0.1px)`;
4097
4055
  }
4098
4056
  function createValueHandler(handlers) {
4099
- const handler$1 = function(str, theme$2) {
4057
+ const handler = function(str, theme) {
4100
4058
  var _this$__options;
4101
4059
  const s = ((_this$__options = this.__options) === null || _this$__options === void 0 ? void 0 : _this$__options.sequence) || [];
4102
4060
  this.__options.sequence = [];
4103
- for (const n$1 of s) {
4104
- const res = handlers[n$1](str, theme$2);
4061
+ for (const n of s) {
4062
+ const res = handlers[n](str, theme);
4105
4063
  if (res != null) return res;
4106
4064
  }
4107
4065
  };
@@ -4110,14 +4068,14 @@ function createValueHandler(handlers) {
4110
4068
  that.__options.sequence.push(name);
4111
4069
  return that;
4112
4070
  }
4113
- for (const name of Object.keys(handlers)) Object.defineProperty(handler$1, name, {
4071
+ for (const name of Object.keys(handlers)) Object.defineProperty(handler, name, {
4114
4072
  enumerable: true,
4115
4073
  configurable: true,
4116
4074
  get() {
4117
4075
  return addProcessor(this, name);
4118
4076
  }
4119
4077
  });
4120
- return handler$1;
4078
+ return handler;
4121
4079
  }
4122
4080
  const PseudoPlaceholder = "__pseudo_placeholder__";
4123
4081
  /**
@@ -4177,7 +4135,8 @@ const PseudoClasses = Object.fromEntries([
4177
4135
  ["placeholder", "::placeholder"],
4178
4136
  ["before", "::before"],
4179
4137
  ["after", "::after"],
4180
- ["file", "::file-selector-button"]
4138
+ ["file", "::file-selector-button"],
4139
+ ["details-content", "::details-content"]
4181
4140
  ].map((key) => Array.isArray(key) ? key : [key, `:${key}`]));
4182
4141
  const PseudoClassesKeys = Object.keys(PseudoClasses);
4183
4142
  const PseudoClassesColon = Object.fromEntries([["backdrop", "::backdrop"]].map((key) => Array.isArray(key) ? key : [key, `:${key}`]));
@@ -4206,18 +4165,18 @@ const excludedPseudo = [
4206
4165
  const PseudoClassesAndElementsStr = Object.entries(PseudoClasses).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
4207
4166
  const PseudoClassesAndElementsColonStr = Object.entries(PseudoClassesColon).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
4208
4167
  function createTaggedPseudoClassMatcher(tag, parent, combinator, utils) {
4209
- const { h: h$1, variantGetBracket: variantGetBracket$1 } = utils;
4210
- const rawRE = /* @__PURE__ */ new RegExp(`^(${escapeRegExp(parent)}:)(\\S+)${escapeRegExp(combinator)}\\1`);
4168
+ const { h, variantGetBracket } = utils;
4169
+ const rawRE = new RegExp(`^(${escapeRegExp(parent)}:)(\\S+)${escapeRegExp(combinator)}\\1`);
4211
4170
  let splitRE;
4212
4171
  let pseudoRE;
4213
4172
  let pseudoColonRE;
4214
4173
  let pseudoVarRE;
4215
4174
  const matchBracket = (input) => {
4216
4175
  var _rest$split;
4217
- const body = variantGetBracket$1(`${tag}-`, input, []);
4176
+ const body = variantGetBracket(`${tag}-`, input, []);
4218
4177
  if (!body) return;
4219
4178
  const [match, rest] = body;
4220
- const bracketValue = h$1.bracket(match);
4179
+ const bracketValue = h.bracket(match);
4221
4180
  if (bracketValue == null) return;
4222
4181
  const label = ((_rest$split = rest.split(splitRE, 1)) === null || _rest$split === void 0 ? void 0 : _rest$split[0]) ?? "";
4223
4182
  const prefix = `${parent}${escapeSelector(label)}`;
@@ -4257,10 +4216,10 @@ function createTaggedPseudoClassMatcher(tag, parent, combinator, utils) {
4257
4216
  name: `pseudo:${tag}`,
4258
4217
  match(input, ctx) {
4259
4218
  if (!(splitRE && pseudoRE && pseudoColonRE)) {
4260
- splitRE = /* @__PURE__ */ new RegExp(`(?:${ctx.generator.config.separators.join("|")})`);
4261
- pseudoRE = /* @__PURE__ */ new RegExp(`^${tag}-(?:(?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesStr}))(?:(/[\\w-]+))?(?:${ctx.generator.config.separators.join("|")})`);
4262
- pseudoColonRE = /* @__PURE__ */ new RegExp(`^${tag}-(?:(?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesColonStr}))(?:(/[\\w-]+))?(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
4263
- pseudoVarRE = /* @__PURE__ */ new RegExp(`^${tag}-(?:(${PseudoClassFunctionsStr})-)?\\[(.+)\\](?:(/[\\w-]+))?(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
4219
+ splitRE = new RegExp(`(?:${ctx.generator.config.separators.join("|")})`);
4220
+ pseudoRE = new RegExp(`^${tag}-(?:(?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesStr}))(?:(/[\\w-]+))?(?:${ctx.generator.config.separators.join("|")})`);
4221
+ pseudoColonRE = new RegExp(`^${tag}-(?:(?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesColonStr}))(?:(/[\\w-]+))?(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
4222
+ pseudoVarRE = new RegExp(`^${tag}-(?:(${PseudoClassFunctionsStr})-)?\\[(.+)\\](?:(/[\\w-]+))?(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
4264
4223
  }
4265
4224
  if (!input.startsWith(tag)) return;
4266
4225
  const result = matchBracket(input) || matchPseudo(input) || matchPseudoVar(input);
@@ -4268,9 +4227,9 @@ function createTaggedPseudoClassMatcher(tag, parent, combinator, utils) {
4268
4227
  const [_label, matcher, prefix, pseudoName = ""] = result;
4269
4228
  return {
4270
4229
  matcher,
4271
- handle: (input$1, next) => next({
4272
- ...input$1,
4273
- prefix: `${prefix}${combinator}${input$1.prefix}`.replace(rawRE, "$1$2:"),
4230
+ handle: (input, next) => next({
4231
+ ...input,
4232
+ prefix: `${prefix}${combinator}${input.prefix}`.replace(rawRE, "$1$2:"),
4274
4233
  sort: PseudoClassesKeys.indexOf(pseudoName) ?? PseudoClassesColonKeys.indexOf(pseudoName)
4275
4234
  })
4276
4235
  };
@@ -4279,7 +4238,7 @@ function createTaggedPseudoClassMatcher(tag, parent, combinator, utils) {
4279
4238
  };
4280
4239
  }
4281
4240
  function createPseudoClassesAndElements(utils) {
4282
- const { h: h$1 } = utils;
4241
+ const { h } = utils;
4283
4242
  let PseudoClassesAndElementsRE;
4284
4243
  let PseudoClassesAndElementsColonRE;
4285
4244
  let PseudoClassesMultiRE;
@@ -4287,15 +4246,15 @@ function createPseudoClassesAndElements(utils) {
4287
4246
  name: "pseudo",
4288
4247
  match(input, ctx) {
4289
4248
  if (!(PseudoClassesAndElementsRE && PseudoClassesAndElementsColonRE)) {
4290
- PseudoClassesAndElementsRE = /* @__PURE__ */ new RegExp(`^(${PseudoClassesAndElementsStr})(?:-(\\d+|\\[(\\w|[+-.])+\\]))?(?:${ctx.generator.config.separators.join("|")})`);
4291
- PseudoClassesAndElementsColonRE = /* @__PURE__ */ new RegExp(`^(${PseudoClassesAndElementsColonStr})(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
4249
+ PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})(?:-(\\d+|\\[(\\w|[+-.])+\\]))?(?:${ctx.generator.config.separators.join("|")})`);
4250
+ PseudoClassesAndElementsColonRE = new RegExp(`^(${PseudoClassesAndElementsColonStr})(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
4292
4251
  }
4293
4252
  const match = input.match(PseudoClassesAndElementsRE) || input.match(PseudoClassesAndElementsColonRE);
4294
4253
  if (match) {
4295
4254
  let pseudo = PseudoClasses[match[1]] || PseudoClassesColon[match[1]] || `:${match[1]}`;
4296
4255
  if (match[2]) {
4297
4256
  let anPlusB;
4298
- if (match[2].startsWith("[") && match[2].endsWith("]")) anPlusB = h$1.bracket(match[2]);
4257
+ if (match[2].startsWith("[") && match[2].endsWith("]")) anPlusB = h.bracket(match[2]);
4299
4258
  else anPlusB = match[2];
4300
4259
  if (anPlusB) pseudo = pseudo.replace(PseudoPlaceholder, anPlusB);
4301
4260
  }
@@ -4304,10 +4263,10 @@ function createPseudoClassesAndElements(utils) {
4304
4263
  if (index === -1) index = void 0;
4305
4264
  return {
4306
4265
  matcher: input.slice(match[0].length),
4307
- handle: (input$1, next) => {
4308
- const selectors = pseudo.includes("::") && !excludedPseudo.includes(pseudo) ? { pseudo: `${input$1.pseudo}${pseudo}` } : { selector: `${input$1.selector}${pseudo}` };
4266
+ handle: (input, next) => {
4267
+ const selectors = pseudo.includes("::") && !excludedPseudo.includes(pseudo) ? { pseudo: `${input.pseudo}${pseudo}` } : { selector: `${input.selector}${pseudo}` };
4309
4268
  return next({
4310
- ...input$1,
4269
+ ...input,
4311
4270
  ...selectors,
4312
4271
  sort: index,
4313
4272
  noMerge: true
@@ -4321,14 +4280,14 @@ function createPseudoClassesAndElements(utils) {
4321
4280
  }, {
4322
4281
  name: "pseudo:multi",
4323
4282
  match(input, ctx) {
4324
- if (!PseudoClassesMultiRE) PseudoClassesMultiRE = /* @__PURE__ */ new RegExp(`^(${PseudoClassesMultiStr})(?:${ctx.generator.config.separators.join("|")})`);
4283
+ if (!PseudoClassesMultiRE) PseudoClassesMultiRE = new RegExp(`^(${PseudoClassesMultiStr})(?:${ctx.generator.config.separators.join("|")})`);
4325
4284
  const match = input.match(PseudoClassesMultiRE);
4326
4285
  if (match) return PseudoClassesMulti[match[1]].map((pseudo) => {
4327
4286
  return {
4328
4287
  matcher: input.slice(match[0].length),
4329
- handle: (input$1, next) => next({
4330
- ...input$1,
4331
- pseudo: `${input$1.pseudo}${pseudo}`
4288
+ handle: (input, next) => next({
4289
+ ...input,
4290
+ pseudo: `${input.pseudo}${pseudo}`
4332
4291
  })
4333
4292
  };
4334
4293
  });
@@ -4338,21 +4297,21 @@ function createPseudoClassesAndElements(utils) {
4338
4297
  }];
4339
4298
  }
4340
4299
  function createPseudoClassFunctions(utils) {
4341
- const { getBracket: getBracket$1, h: h$1 } = utils;
4300
+ const { getBracket, h } = utils;
4342
4301
  let PseudoClassFunctionsRE;
4343
4302
  let PseudoClassColonFunctionsRE;
4344
4303
  let PseudoClassVarFunctionRE;
4345
4304
  return {
4346
4305
  match(input, ctx) {
4347
4306
  if (!(PseudoClassFunctionsRE && PseudoClassColonFunctionsRE)) {
4348
- PseudoClassFunctionsRE = /* @__PURE__ */ new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesStr})(?:${ctx.generator.config.separators.join("|")})`);
4349
- PseudoClassColonFunctionsRE = /* @__PURE__ */ new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesColonStr})(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
4350
- PseudoClassVarFunctionRE = /* @__PURE__ */ new RegExp(`^(${PseudoClassFunctionsStr})-(\\[.+\\])(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
4307
+ PseudoClassFunctionsRE = new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesStr})(?:${ctx.generator.config.separators.join("|")})`);
4308
+ PseudoClassColonFunctionsRE = new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesColonStr})(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
4309
+ PseudoClassVarFunctionRE = new RegExp(`^(${PseudoClassFunctionsStr})-(\\[.+\\])(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
4351
4310
  }
4352
4311
  const match = input.match(PseudoClassFunctionsRE) || input.match(PseudoClassColonFunctionsRE) || input.match(PseudoClassVarFunctionRE);
4353
4312
  if (match) {
4354
4313
  const fn = match[1];
4355
- const pseudo = getBracket$1(match[2], "[", "]") ? h$1.bracket(match[2]) : PseudoClasses[match[2]] || PseudoClassesColon[match[2]] || `:${match[2]}`;
4314
+ const pseudo = getBracket(match[2], "[", "]") ? h.bracket(match[2]) : PseudoClasses[match[2]] || PseudoClassesColon[match[2]] || `:${match[2]}`;
4356
4315
  return {
4357
4316
  matcher: input.slice(match[0].length),
4358
4317
  selector: (s) => `${s}:${fn}(${pseudo})`
@@ -4391,20 +4350,20 @@ function createPartClasses() {
4391
4350
  multiPass: true
4392
4351
  };
4393
4352
  }
4394
- function variantMatcher(name, handler$1, options = {}) {
4353
+ function variantMatcher(name, handler, options = {}) {
4395
4354
  let re;
4396
4355
  return {
4397
4356
  name,
4398
4357
  match(input, ctx) {
4399
- if (!re) re = /* @__PURE__ */ new RegExp(`^${escapeRegExp(name)}(?:${ctx.generator.config.separators.join("|")})`);
4358
+ if (!re) re = new RegExp(`^${escapeRegExp(name)}(?:${ctx.generator.config.separators.join("|")})`);
4400
4359
  const match = input.match(re);
4401
4360
  if (match) {
4402
4361
  const matcher = input.slice(match[0].length);
4403
- const handlers = toArray(handler$1).map((handler$1$1) => ({
4362
+ const handlers = toArray(handler).map((handler) => ({
4404
4363
  matcher,
4405
- handle: (input$1, next) => next({
4406
- ...input$1,
4407
- ...handler$1$1(input$1)
4364
+ handle: (input, next) => next({
4365
+ ...input,
4366
+ ...handler(input)
4408
4367
  }),
4409
4368
  ...options
4410
4369
  }));
@@ -4419,13 +4378,13 @@ function variantParentMatcher(name, parent) {
4419
4378
  return {
4420
4379
  name,
4421
4380
  match(input, ctx) {
4422
- if (!re) re = /* @__PURE__ */ new RegExp(`^${escapeRegExp(name)}(?:${ctx.generator.config.separators.join("|")})`);
4381
+ if (!re) re = new RegExp(`^${escapeRegExp(name)}(?:${ctx.generator.config.separators.join("|")})`);
4423
4382
  const match = input.match(re);
4424
4383
  if (match) return {
4425
4384
  matcher: input.slice(match[0].length),
4426
- handle: (input$1, next) => next({
4427
- ...input$1,
4428
- parent: `${input$1.parent ? `${input$1.parent} $$ ` : ""}${parent}`
4385
+ handle: (input, next) => next({
4386
+ ...input,
4387
+ parent: `${input.parent ? `${input.parent} $$ ` : ""}${parent}`
4429
4388
  })
4430
4389
  };
4431
4390
  },
@@ -4474,7 +4433,6 @@ function variantGetParameter(prefix, matcher, separators) {
4474
4433
  }
4475
4434
  }
4476
4435
  }
4477
-
4478
4436
  //#endregion
4479
4437
  //#region ../../packages-presets/preset-typography/dist/index.mjs
4480
4438
  const modifiers = [
@@ -4537,8 +4495,8 @@ const defaultColorScheme = {
4537
4495
  "td-borders": [200, 700]
4538
4496
  };
4539
4497
  const round$1 = (num) => num.toFixed(7).replace(/0+$/, "").replace(/\.$/, "");
4540
- const rem$1 = (px$1) => `${round$1(px$1 / 16)}rem`;
4541
- const em = (px$1, base) => `${round$1(px$1 / base)}em`;
4498
+ const rem$1 = (px) => `${round$1(px / 16)}rem`;
4499
+ const em = (px, base) => `${round$1(px / base)}em`;
4542
4500
  const ProseDefaultCSSObject = {
4543
4501
  "color": "var(--un-prose-body)",
4544
4502
  "max-width": "65ch",
@@ -5503,17 +5461,17 @@ function resolveSizeScheme(userSizeScheme) {
5503
5461
  if (userSizeScheme) return mergeDeep(ProseDefaultSize, userSizeScheme);
5504
5462
  return ProseDefaultSize;
5505
5463
  }
5506
- function getCSS$1(preflights$1, options) {
5464
+ function getCSS$1(preflights, options) {
5507
5465
  const selectorName = options.selectorName || "prose";
5508
5466
  const notProseSelector = `:not(:where([class~="not-${selectorName}"],[class~="not-${selectorName}"] *))`;
5509
- const important$1 = options.important === true;
5467
+ const important = options.important === true;
5510
5468
  let css = "";
5511
- for (const [selectorOrKey, cssObjectOrValue] of Object.entries(preflights$1)) if (typeof cssObjectOrValue !== "object") css += `${selectorOrKey}:${cssObjectOrValue}${important$1 ? " !important" : ""};`;
5469
+ for (const [selectorOrKey, cssObjectOrValue] of Object.entries(preflights)) if (typeof cssObjectOrValue !== "object") css += `${selectorOrKey}:${cssObjectOrValue}${important ? " !important" : ""};`;
5512
5470
  else {
5513
5471
  const [selectorOrGroup, pseudo] = selectorOrKey.split("::");
5514
5472
  const _selector = `:where(${selectorOrGroup})${notProseSelector}${pseudo ? `::${pseudo}` : ""}`;
5515
5473
  css += `${_selector} {`;
5516
- for (const [key, value] of Object.entries(cssObjectOrValue)) css += `${key}:${value}${important$1 ? " !important" : ""};`;
5474
+ for (const [key, value] of Object.entries(cssObjectOrValue)) css += `${key}:${value}${important ? " !important" : ""};`;
5517
5475
  css += `}`;
5518
5476
  }
5519
5477
  return css;
@@ -5547,8 +5505,8 @@ const presetTypography = definePreset((options) => {
5547
5505
  const cssVarPrefix = options?.cssVarPrefix ?? "--un-prose";
5548
5506
  const resolvedColorScheme = resolveColorScheme(options?.colorScheme);
5549
5507
  const resolvedSizeScheme = resolveSizeScheme(options?.sizeScheme);
5550
- const extended = (entries, theme$2) => {
5551
- const merged = mergeDeep(entries, (typeof options?.cssExtend === "function" ? options?.cssExtend(theme$2) : options?.cssExtend) ?? {});
5508
+ const extended = (entries, theme) => {
5509
+ const merged = mergeDeep(entries, (typeof options?.cssExtend === "function" ? options?.cssExtend(theme) : options?.cssExtend) ?? {});
5552
5510
  for (const key in merged) {
5553
5511
  const value = merged[key];
5554
5512
  if (value == null || typeof value === "object" && Object.keys(value).length === 0) delete merged[key];
@@ -5560,9 +5518,9 @@ const presetTypography = definePreset((options) => {
5560
5518
  if (!options?.compatibility?.noColonIs) s = `:is(${s})`;
5561
5519
  return s;
5562
5520
  };
5563
- const defaultRE = /* @__PURE__ */ new RegExp(`^${selectorName}-default$`);
5564
- const colorsRE = /* @__PURE__ */ new RegExp(`^${selectorName}-([-\\w]+)$`);
5565
- const sizeRE = /* @__PURE__ */ new RegExp(`^${selectorName}-(${Object.keys(resolvedSizeScheme).join("|")})$`);
5521
+ const defaultRE = new RegExp(`^${selectorName}-default$`);
5522
+ const colorsRE = new RegExp(`^${selectorName}-([-\\w]+)$`);
5523
+ const sizeRE = new RegExp(`^${selectorName}-(${Object.keys(resolvedSizeScheme).join("|")})$`);
5566
5524
  return {
5567
5525
  name: "@unocss/preset-typography",
5568
5526
  enforce: "post",
@@ -5575,11 +5533,11 @@ const presetTypography = definePreset((options) => {
5575
5533
  rules: [
5576
5534
  [
5577
5535
  defaultRE,
5578
- (_, { symbols: symbols$1, theme: theme$2 }) => {
5579
- const css = getCSS$1(extended(mergeDeep(ProseDefaultCSSObject, ProseDefaultSize.base), theme$2), options ?? {});
5536
+ (_, { symbols, theme }) => {
5537
+ const css = getCSS$1(extended(mergeDeep(ProseDefaultCSSObject, ProseDefaultSize.base), theme), options ?? {});
5580
5538
  return {
5581
- [symbols$1.body]: css,
5582
- [symbols$1.selector]: normalizeSelector
5539
+ [symbols.body]: css,
5540
+ [symbols.selector]: normalizeSelector
5583
5541
  };
5584
5542
  },
5585
5543
  {
@@ -5590,8 +5548,8 @@ const presetTypography = definePreset((options) => {
5590
5548
  ],
5591
5549
  [
5592
5550
  colorsRE,
5593
- ([, color], { theme: theme$2, symbols: symbols$1 }) => {
5594
- const baseColor = theme$2.colors?.[color];
5551
+ ([, color], { theme, symbols }) => {
5552
+ const baseColor = theme.colors?.[color];
5595
5553
  if (!baseColor || typeof baseColor !== "object") return;
5596
5554
  if ([
5597
5555
  "red",
@@ -5614,20 +5572,20 @@ const presetTypography = definePreset((options) => {
5614
5572
  ].includes(color)) return {
5615
5573
  [`${cssVarPrefix}-links`]: baseColor["600"],
5616
5574
  [`${cssVarPrefix}-invert-links`]: baseColor["500"],
5617
- [symbols$1.selector]: normalizeSelector
5575
+ [symbols.selector]: normalizeSelector
5618
5576
  };
5619
5577
  else return Object.entries(resolvedColorScheme).reduce((acc, [key, value]) => {
5620
5578
  const [colorKey, invertKey] = value;
5621
- const resolve$2 = (key$1) => baseColor[key$1] ?? theme$2[key$1] ?? key$1;
5622
- const color$1 = resolve$2(colorKey);
5623
- const invertColor = resolve$2(invertKey);
5579
+ const resolve = (key) => baseColor[key] ?? theme[key] ?? key;
5580
+ const color = resolve(colorKey);
5581
+ const invertColor = resolve(invertKey);
5624
5582
  const cssVarColorKey = `${cssVarPrefix}-${key}`;
5625
5583
  const cssVarInvertColorKey = `${cssVarPrefix}-invert-${key}`;
5626
- acc[cssVarColorKey] = colorToString(color$1, `var(${cssVarColorKey}-opacity)`);
5584
+ acc[cssVarColorKey] = colorToString(color, `var(${cssVarColorKey}-opacity)`);
5627
5585
  acc[cssVarInvertColorKey] = colorToString(invertColor, `var(${cssVarInvertColorKey}-opacity)`);
5628
- for (const [c, k] of [[color$1, `${cssVarColorKey}-opacity`], [invertColor, `${cssVarInvertColorKey}-opacity`]]) if (alphaPlaceholders.some((p) => c.includes(p))) acc[k] = "1";
5586
+ for (const [c, k] of [[color, `${cssVarColorKey}-opacity`], [invertColor, `${cssVarInvertColorKey}-opacity`]]) if (alphaPlaceholders.some((p) => c.includes(p))) acc[k] = "1";
5629
5587
  return acc;
5630
- }, { [symbols$1.selector]: normalizeSelector });
5588
+ }, { [symbols.selector]: normalizeSelector });
5631
5589
  },
5632
5590
  {
5633
5591
  layer: "typography",
@@ -5636,11 +5594,11 @@ const presetTypography = definePreset((options) => {
5636
5594
  ],
5637
5595
  [
5638
5596
  sizeRE,
5639
- ([, size], { symbols: symbols$1, theme: theme$2 }) => {
5640
- const css = getCSS$1(extended(resolvedSizeScheme[size], theme$2), options ?? {});
5597
+ ([, size], { symbols, theme }) => {
5598
+ const css = getCSS$1(extended(resolvedSizeScheme[size], theme), options ?? {});
5641
5599
  return {
5642
- [symbols$1.body]: css,
5643
- [symbols$1.selector]: normalizeSelector
5600
+ [symbols.body]: css,
5601
+ [symbols.selector]: normalizeSelector
5644
5602
  };
5645
5603
  },
5646
5604
  {
@@ -5678,7 +5636,7 @@ const presetTypography = definePreset((options) => {
5678
5636
  name: "typography element modifiers",
5679
5637
  match: (matcher) => {
5680
5638
  if (matcher.startsWith(`${selectorName}-`)) {
5681
- const modifyRe = /* @__PURE__ */ new RegExp(`^${selectorName}-(\\w+)[:-].+$`);
5639
+ const modifyRe = new RegExp(`^${selectorName}-(\\w+)[:-].+$`);
5682
5640
  const modifier = matcher.match(modifyRe)?.[1];
5683
5641
  if (modifier) {
5684
5642
  const elements = getElements(modifier);
@@ -5696,17 +5654,15 @@ const presetTypography = definePreset((options) => {
5696
5654
  }]
5697
5655
  };
5698
5656
  });
5699
- var src_default$2 = presetTypography;
5700
-
5701
5657
  //#endregion
5702
5658
  //#region ../../packages-presets/preset-web-fonts/dist/index.mjs
5703
5659
  function createBunnyFontsProvider(name, host) {
5704
5660
  return {
5705
5661
  name,
5706
- getImportUrl(fonts$1) {
5707
- return `${host}/css?family=${fonts$1.map((font$1) => {
5708
- const { name: name$1, weights, italic } = font$1;
5709
- const formattedName = name$1.toLowerCase().replace(/\s/g, "-");
5662
+ getImportUrl(fonts) {
5663
+ return `${host}/css?family=${fonts.map((font) => {
5664
+ const { name, weights, italic } = font;
5665
+ const formattedName = name.toLowerCase().replace(/\s/g, "-");
5710
5666
  if (!weights?.length) return `${formattedName}${italic ? ":i" : ""}`;
5711
5667
  let weightsAsString = weights.map((weight) => weight.toString());
5712
5668
  if (!weightsAsString.some((weight) => weight.endsWith("i")) && italic) weightsAsString = weightsAsString.map((weight) => weight += "i");
@@ -5729,9 +5685,9 @@ function generateFontAxes(axes) {
5729
5685
  function createGoogleCompatibleProvider(name, host) {
5730
5686
  return {
5731
5687
  name,
5732
- getImportUrl(fonts$1) {
5733
- return `${host}/css2?${fonts$1.map((i) => {
5734
- let name$1 = i.name.replace(/\s+/g, "+");
5688
+ getImportUrl(fonts) {
5689
+ return `${host}/css2?${fonts.map((i) => {
5690
+ let name = i.name.replace(/\s+/g, "+");
5735
5691
  /**
5736
5692
  * When using the Google Fonts API, be sure to list them alphabetically.
5737
5693
  * @see https://fonts.google.com/knowledge/using_type/styling_type_on_the_web_with_variable_fonts
@@ -5751,12 +5707,12 @@ function createGoogleCompatibleProvider(name, host) {
5751
5707
  values: i.weights.map((w) => w.toString())
5752
5708
  });
5753
5709
  if (axisValues.length) {
5754
- name$1 += ":";
5755
- name$1 += axisValues.map((a) => a.axis).join(",");
5756
- name$1 += "@";
5757
- name$1 += generateFontAxes(axisValues);
5710
+ name += ":";
5711
+ name += axisValues.map((a) => a.axis).join(",");
5712
+ name += "@";
5713
+ name += generateFontAxes(axisValues);
5758
5714
  }
5759
- return `family=${name$1}`;
5715
+ return `family=${name}`;
5760
5716
  }).join("&")}&display=swap`;
5761
5717
  }
5762
5718
  };
@@ -5767,12 +5723,12 @@ const FontshareProvider = createFontshareProvider("fontshare", "https://api.font
5767
5723
  function createFontshareProvider(name, host) {
5768
5724
  return {
5769
5725
  name,
5770
- getImportUrl(fonts$1) {
5771
- return `${host}/v2/css?${fonts$1.map((f) => {
5772
- let name$1 = f.name.replace(/\s+/g, "-").toLocaleLowerCase();
5773
- if (f.weights?.length) name$1 += `@${f.weights.flatMap((w) => f.italic ? Number(w) + 1 : w).sort().join()}`;
5774
- else name$1 += `@${f.italic ? 2 : 1}`;
5775
- return `f[]=${name$1}`;
5726
+ getImportUrl(fonts) {
5727
+ return `${host}/v2/css?${fonts.map((f) => {
5728
+ let name = f.name.replace(/\s+/g, "-").toLocaleLowerCase();
5729
+ if (f.weights?.length) name += `@${f.weights.flatMap((w) => f.italic ? Number(w) + 1 : w).sort().join()}`;
5730
+ else name += `@${f.italic ? 2 : 1}`;
5731
+ return `f[]=${name}`;
5776
5732
  }).join("&")}&display=swap`;
5777
5733
  }
5778
5734
  };
@@ -5782,10 +5738,10 @@ function createFontSourceProvider(name, host) {
5782
5738
  const variablesMap = /* @__PURE__ */ new Map();
5783
5739
  return {
5784
5740
  name,
5785
- async getPreflight(fonts$1, fetcher) {
5786
- return (await Promise.all(fonts$1.map(async (font$1) => {
5741
+ async getPreflight(fonts, fetcher) {
5742
+ return (await Promise.all(fonts.map(async (font) => {
5787
5743
  const css = [];
5788
- const id = font$1.name.toLowerCase().replace(/\s+/g, "-");
5744
+ const id = font.name.toLowerCase().replace(/\s+/g, "-");
5789
5745
  let metadata = fontsMap.get(id);
5790
5746
  if (!metadata) {
5791
5747
  const url = `https://api.fontsource.org/v1/fonts/${id}`;
@@ -5793,22 +5749,22 @@ function createFontSourceProvider(name, host) {
5793
5749
  metadata = await fetcher(url);
5794
5750
  fontsMap.set(id, metadata);
5795
5751
  } catch {
5796
- throw new Error(`Failed to fetch font: ${font$1.name}`);
5752
+ throw new Error(`Failed to fetch font: ${font.name}`);
5797
5753
  }
5798
5754
  }
5799
- const { weights, unicodeRange, variants: variants$1, family } = metadata;
5800
- const subsets = metadata.subsets.filter((subset) => font$1.subsets ? font$1.subsets.includes(subset) : true);
5801
- const style = font$1.italic ? "italic" : "normal";
5802
- if (metadata.variable && !font$1.preferStatic) {
5755
+ const { weights, unicodeRange, variants, family } = metadata;
5756
+ const subsets = metadata.subsets.filter((subset) => font.subsets ? font.subsets.includes(subset) : true);
5757
+ const style = font.italic ? "italic" : "normal";
5758
+ if (metadata.variable && !font.preferStatic) {
5803
5759
  let variableData = variablesMap.get(id);
5804
5760
  const url = `https://api.fontsource.org/v1/variable/${id}`;
5805
5761
  try {
5806
5762
  variableData = await fetcher(url);
5807
5763
  variablesMap.set(id, variableData);
5808
5764
  } catch {
5809
- throw new Error(`Failed to fetch font variable: ${font$1.name}`);
5765
+ throw new Error(`Failed to fetch font variable: ${font.name}`);
5810
5766
  }
5811
- const mergeAxes = mergeDeep(variableData.axes, font$1.variable ?? {});
5767
+ const mergeAxes = mergeDeep(variableData.axes, font.variable ?? {});
5812
5768
  for (const subset of subsets) if (unicodeRange[subset]) {
5813
5769
  const fontObj = {
5814
5770
  family,
@@ -5849,9 +5805,9 @@ function createFontSourceProvider(name, host) {
5849
5805
  css.push(generateFontFace(fontObj));
5850
5806
  });
5851
5807
  } else {
5852
- const _weights = font$1.weights && font$1.weights.length > 0 ? font$1.weights : weights;
5808
+ const _weights = font.weights && font.weights.length > 0 ? font.weights : weights;
5853
5809
  for (const subset of subsets) for (const weight of _weights) {
5854
- const url = variants$1[weight][style][subset].url;
5810
+ const url = variants[weight][style][subset].url;
5855
5811
  const fontObj = {
5856
5812
  family,
5857
5813
  display: "swap",
@@ -5873,8 +5829,8 @@ function createFontSourceProvider(name, host) {
5873
5829
  };
5874
5830
  }
5875
5831
  const FontSourceProvider = createFontSourceProvider("fontsource", "https://cdn.jsdelivr.net");
5876
- function generateFontFace(font$1) {
5877
- const { family, style, display, weight, variable, src, unicodeRange, comment, spacer = "\n " } = font$1;
5832
+ function generateFontFace(font) {
5833
+ const { family, style, display, weight, variable, src, unicodeRange, comment, spacer = "\n " } = font;
5878
5834
  const { wght, wdth, slnt } = variable ?? {};
5879
5835
  let result = "@font-face {";
5880
5836
  result += `${spacer}font-family: '${family}';`;
@@ -5903,8 +5859,8 @@ const builtinProviders = {
5903
5859
  getPreflight() {
5904
5860
  return "";
5905
5861
  },
5906
- getFontName(font$1) {
5907
- return font$1.name;
5862
+ getFontName(font) {
5863
+ return font.name;
5908
5864
  }
5909
5865
  }
5910
5866
  };
@@ -5933,20 +5889,20 @@ function createWebFontPreset(fetcher) {
5933
5889
  const layerName = inlineImports ? fontLayer : LAYER_IMPORTS;
5934
5890
  const processors = toArray(options.processors || []);
5935
5891
  const fontObject = Object.fromEntries(Object.entries(options.fonts || {}).map(([name, meta]) => [name, toArray(meta).map((m) => normalizedFontMeta(m, defaultProvider))]));
5936
- const fonts$1 = Object.values(fontObject).flatMap((i) => i);
5892
+ const fonts = Object.values(fontObject).flatMap((i) => i);
5937
5893
  const importCache = {};
5938
5894
  async function fetchWithTimeout(url) {
5939
5895
  if (timeouts === false) return customFetch(url);
5940
5896
  const { warning = 1e3, failure = 2e3 } = timeouts;
5941
- let warned$1 = false;
5897
+ let warned = false;
5942
5898
  const timer = setTimeout(() => {
5943
5899
  console.warn(`[unocss] Fetching web fonts: ${url}`);
5944
- warned$1 = true;
5900
+ warned = true;
5945
5901
  }, warning);
5946
5902
  return await Promise.race([customFetch(url), new Promise((_, reject) => {
5947
5903
  setTimeout(() => reject(/* @__PURE__ */ new Error(`[unocss] Fetch web fonts timeout.`)), failure);
5948
5904
  })]).then((res) => {
5949
- if (warned$1) console.info(`[unocss] Web fonts fetched.`);
5905
+ if (warned) console.info(`[unocss] Web fonts fetched.`);
5950
5906
  return res;
5951
5907
  }).finally(() => clearTimeout(timer));
5952
5908
  }
@@ -5960,22 +5916,22 @@ function createWebFontPreset(fetcher) {
5960
5916
  return await importCache[url];
5961
5917
  } else return `@import url('${url}');`;
5962
5918
  }
5963
- const enabledProviders = Array.from(new Set(fonts$1.map((i) => i.provider)));
5964
- async function getCSSDefault(fonts$1$1, providers) {
5965
- const preflights$1 = [];
5919
+ const enabledProviders = Array.from(new Set(fonts.map((i) => i.provider)));
5920
+ async function getCSSDefault(fonts, providers) {
5921
+ const preflights = [];
5966
5922
  for (const provider of providers) {
5967
- const fontsForProvider = fonts$1$1.filter((i) => i.provider.name === provider.name);
5923
+ const fontsForProvider = fonts.filter((i) => i.provider.name === provider.name);
5968
5924
  if (provider.getImportUrl) {
5969
5925
  const url = provider.getImportUrl(fontsForProvider);
5970
- if (url) preflights$1.push(await importUrl(url));
5926
+ if (url) preflights.push(await importUrl(url));
5971
5927
  }
5972
5928
  try {
5973
- preflights$1.push(await provider.getPreflight?.(fontsForProvider, fetchWithTimeout));
5929
+ preflights.push(await provider.getPreflight?.(fontsForProvider, fetchWithTimeout));
5974
5930
  } catch (e) {
5975
5931
  console.warn(`[unocss] Web fonts preflight fetch failed.`, e);
5976
5932
  }
5977
5933
  }
5978
- return preflights$1.filter(Boolean).join("\n");
5934
+ return preflights.filter(Boolean).join("\n");
5979
5935
  }
5980
5936
  const preset = {
5981
5937
  name: "@unocss/preset-web-fonts",
@@ -5983,13 +5939,13 @@ function createWebFontPreset(fetcher) {
5983
5939
  async getCSS() {
5984
5940
  let css;
5985
5941
  for (const processor of processors) {
5986
- const result = await processor.getCSS?.(fonts$1, enabledProviders, getCSSDefault);
5942
+ const result = await processor.getCSS?.(fonts, enabledProviders, getCSSDefault);
5987
5943
  if (result) {
5988
5944
  css = result;
5989
5945
  break;
5990
5946
  }
5991
5947
  }
5992
- if (!css) css = await getCSSDefault(fonts$1, enabledProviders);
5948
+ if (!css) css = await getCSSDefault(fonts, enabledProviders);
5993
5949
  for (const processor of processors) css = await processor.transformCSS?.(css) || css;
5994
5950
  return css;
5995
5951
  },
@@ -5997,19 +5953,19 @@ function createWebFontPreset(fetcher) {
5997
5953
  }],
5998
5954
  layers: { [fontLayer]: -200 }
5999
5955
  };
6000
- if (extendTheme) preset.extendTheme = (theme$2, config) => {
5956
+ if (extendTheme) preset.extendTheme = (theme, config) => {
6001
5957
  const hasWind4 = config.presets.some((p) => p.name === "@unocss/preset-wind4");
6002
5958
  const themeKey = options.themeKey ?? (hasWind4 ? "font" : "fontFamily");
6003
- if (!theme$2[themeKey]) theme$2[themeKey] = {};
6004
- const obj = Object.fromEntries(Object.entries(fontObject).map(([name, fonts$1$1]) => [name, fonts$1$1.map((f) => f.provider.getFontName?.(f) ?? `"${f.name}"`)]));
6005
- for (const key of Object.keys(obj)) if (typeof theme$2[themeKey][key] === "string") theme$2[themeKey][key] = obj[key].map((i) => `${i},`).join("") + theme$2[themeKey][key];
6006
- else theme$2[themeKey][key] = obj[key].join(",");
5959
+ if (!theme[themeKey]) theme[themeKey] = {};
5960
+ const obj = Object.fromEntries(Object.entries(fontObject).map(([name, fonts]) => [name, fonts.map((f) => f.provider.getFontName?.(f) ?? `"${f.name}"`)]));
5961
+ for (const key of Object.keys(obj)) if (typeof theme[themeKey][key] === "string") theme[themeKey][key] = obj[key].map((i) => `${i},`).join("") + theme[themeKey][key];
5962
+ else theme[themeKey][key] = obj[key].join(",");
6007
5963
  };
6008
5964
  return preset;
6009
5965
  };
6010
5966
  }
6011
5967
  const userAgentWoff2 = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36";
6012
- const defaultFetch = async (url) => (await import("./node-DvibxqDE.mjs")).$fetch(url, {
5968
+ const defaultFetch = async (url) => (await import("./node-D23LglTq.mjs")).$fetch(url, {
6013
5969
  headers: { "User-Agent": userAgentWoff2 },
6014
5970
  retry: 3
6015
5971
  });
@@ -6019,8 +5975,6 @@ const defaultFetch = async (url) => (await import("./node-DvibxqDE.mjs")).$fetch
6019
5975
  * @see https://unocss.dev/presets/web-fonts
6020
5976
  */
6021
5977
  const presetWebFonts = definePreset(createWebFontPreset(defaultFetch));
6022
- var src_default$1 = presetWebFonts;
6023
-
6024
5978
  //#endregion
6025
5979
  //#region ../../packages-presets/preset-wind4/dist/postprocess.mjs
6026
5980
  function important({ important: option }) {
@@ -6040,6 +5994,7 @@ function important({ important: option }) {
6040
5994
  }
6041
5995
  function varPrefix({ variablePrefix: prefix }) {
6042
5996
  const processor = (obj) => {
5997
+ if (obj.layer === "properties") obj.selector = obj.selector.replace(/^@property --un-/, `@property --${prefix}`);
6043
5998
  obj.entries.forEach((i) => {
6044
5999
  i[0] = i[0].replace(/^--un-/, `--${prefix}`);
6045
6000
  if (typeof i[1] === "string") i[1] = i[1].replace(/var\(--un-/g, `var(--${prefix}`);
@@ -6050,22 +6005,20 @@ function varPrefix({ variablePrefix: prefix }) {
6050
6005
  function postprocessors(options) {
6051
6006
  return [important, varPrefix].flatMap((i) => i(options));
6052
6007
  }
6053
-
6054
6008
  //#endregion
6055
- //#region ../../packages-presets/preset-wind4/dist/chunk-w_xFUvYo.mjs
6009
+ //#region ../../packages-presets/preset-wind4/dist/chunk-D1SwGrFN.mjs
6056
6010
  var __defProp = Object.defineProperty;
6057
- var __exportAll = (all, symbols$1) => {
6011
+ var __exportAll = (all, no_symbols) => {
6058
6012
  let target = {};
6059
6013
  for (var name in all) __defProp(target, name, {
6060
6014
  get: all[name],
6061
6015
  enumerable: true
6062
6016
  });
6063
- if (symbols$1) __defProp(target, Symbol.toStringTag, { value: "Module" });
6017
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
6064
6018
  return target;
6065
6019
  };
6066
-
6067
6020
  //#endregion
6068
- //#region ../../packages-presets/preset-wind4/dist/utils-B_qFX7UQ.mjs
6021
+ //#region ../../packages-presets/preset-wind4/dist/utils-B60b98El.mjs
6069
6022
  const PRESET_NAME = "@unocss/preset-wind4";
6070
6023
  const CONTROL_NO_NEGATIVE = "$$mini-no-negative";
6071
6024
  const SpecialColorKey = {
@@ -6199,6 +6152,7 @@ const unitOnlyMap = {
6199
6152
  };
6200
6153
  const bracketTypeRe = /^\[(color|image|length|size|position|quoted|string|number|family):/i;
6201
6154
  const splitComma = /,(?![^()]*\))/g;
6155
+ const cssVarsRE = /(?<!var\()--([\w.-]+)(\([^)]+\)|,[#.\s\w]+)?/g;
6202
6156
  var handlers_exports = /* @__PURE__ */ __exportAll({
6203
6157
  auto: () => auto,
6204
6158
  bracket: () => bracket,
@@ -6280,14 +6234,14 @@ const cssProps = [
6280
6234
  "clip",
6281
6235
  "border-radius"
6282
6236
  ];
6283
- function round(n$1) {
6284
- return +n$1.toFixed(10);
6237
+ function round(n) {
6238
+ return +n.toFixed(10);
6285
6239
  }
6286
6240
  function numberWithUnit(str) {
6287
6241
  const match = str.match(numberWithUnitRE);
6288
6242
  if (!match) return;
6289
- const [, n$1, unit] = match;
6290
- const num = Number.parseFloat(n$1);
6243
+ const [, n, unit] = match;
6244
+ const num = Number.parseFloat(n);
6291
6245
  if (unit && !Number.isNaN(num)) return `${round(num)}${unit}`;
6292
6246
  }
6293
6247
  function auto(str) {
@@ -6298,8 +6252,8 @@ function rem(str) {
6298
6252
  if (unitOnlyRE.test(str)) return `${unitOnlyMap[str]}${str}`;
6299
6253
  const match = str.match(numberWithUnitRE);
6300
6254
  if (!match) return;
6301
- const [, n$1, unit] = match;
6302
- const num = Number.parseFloat(n$1);
6255
+ const [, n, unit] = match;
6256
+ const num = Number.parseFloat(n);
6303
6257
  if (!Number.isNaN(num)) {
6304
6258
  if (num === 0) return "0";
6305
6259
  return unit ? `${round(num)}${unit}` : `${round(num / 4)}rem`;
@@ -6309,8 +6263,8 @@ function px(str) {
6309
6263
  if (unitOnlyRE.test(str)) return `${unitOnlyMap[str]}${str}`;
6310
6264
  const match = str.match(numberWithUnitRE);
6311
6265
  if (!match) return;
6312
- const [, n$1, unit] = match;
6313
- const num = Number.parseFloat(n$1);
6266
+ const [, n, unit] = match;
6267
+ const num = Number.parseFloat(n);
6314
6268
  if (!Number.isNaN(num)) return unit ? `${round(num)}${unit}` : `${round(num)}px`;
6315
6269
  }
6316
6270
  function number(str) {
@@ -6333,19 +6287,29 @@ function fraction(str) {
6333
6287
  return `${round(num * 100)}%`;
6334
6288
  }
6335
6289
  }
6336
- function processThemeVariable(name, key, paths, theme$2) {
6337
- const valOrObj = getThemeByKey(theme$2, key, paths);
6290
+ /**
6291
+ * Process a theme variable reference and retrieve its value and corresponding CSS variable key.
6292
+ *
6293
+ * @example theme => Theme object
6294
+ * @example themeKey => 'colors
6295
+ * @example themeKeyPaths => ['blue', '500']
6296
+ * @example varPaths => 'colors.blue.500'
6297
+ *
6298
+ * @returns An object containing the resolved value from the theme and the corresponding CSS variable key.
6299
+ */
6300
+ function processThemeVariable(theme, themeKey, themeKeyPaths, varPaths) {
6301
+ const valOrObj = getThemeByKey(theme, themeKey, themeKeyPaths);
6338
6302
  const hasDefault = typeof valOrObj === "object" && "DEFAULT" in valOrObj;
6339
- if (hasDefault) paths.push("DEFAULT");
6303
+ if (hasDefault) themeKeyPaths.push("DEFAULT");
6340
6304
  const val = hasDefault ? valOrObj.DEFAULT : valOrObj;
6341
- const varKey = hasDefault && key !== "spacing" ? `${name}.DEFAULT` : name;
6342
- if (val != null) themeTracking(key, paths.length ? paths : void 0);
6305
+ const varKey = hasDefault && themeKey !== "spacing" ? `${varPaths}.DEFAULT` : varPaths;
6306
+ if (val != null) themeTracking(themeKey, themeKeyPaths.length ? themeKeyPaths : void 0);
6343
6307
  return {
6344
6308
  val,
6345
6309
  varKey
6346
6310
  };
6347
6311
  }
6348
- function bracketWithType(str, requiredType, theme$2) {
6312
+ function bracketWithType(str, requiredType, theme) {
6349
6313
  if (str && str.startsWith("[") && str.endsWith("]")) {
6350
6314
  let base;
6351
6315
  let hintedType;
@@ -6358,23 +6322,24 @@ function bracketWithType(str, requiredType, theme$2) {
6358
6322
  }
6359
6323
  if (!base) return;
6360
6324
  if (base === "=\"\"") return;
6361
- if (base.startsWith("--")) {
6362
- const calcMatch = base.match(/^--([\w.-]+)\(([^)]+)\)$/);
6363
- if (calcMatch != null && theme$2) {
6364
- const [, name, factor] = calcMatch;
6365
- const [key, ...paths] = name.split(".");
6366
- const { val, varKey } = processThemeVariable(name, key, paths, theme$2);
6367
- if (val != null) base = `calc(var(--${escapeSelector(varKey.replaceAll(".", "-"))}) * ${factor})`;
6368
- } else {
6369
- const [name, defaultValue] = base.slice(2).split(",");
6370
- const suffix = defaultValue ? `, ${defaultValue}` : "";
6371
- const escapedName = escapeSelector(name);
6372
- if (theme$2) {
6373
- const [key, ...paths] = name.split(".");
6374
- const { val, varKey } = processThemeVariable(name, key, paths, theme$2);
6375
- base = val != null ? `var(--${escapeSelector(varKey.replaceAll(".", "-"))}${suffix})` : `var(--${escapedName}${suffix})`;
6376
- } else base = `var(--${escapedName}${suffix})`;
6325
+ if (theme) base = transformThemeFn(base, theme);
6326
+ const matches = Array.from(base.matchAll(cssVarsRE));
6327
+ for (const match of matches) {
6328
+ const [full, varPaths, _value] = match;
6329
+ if (theme) {
6330
+ const [key, ...paths] = varPaths.split(".");
6331
+ const { val, varKey } = processThemeVariable(theme, key, paths, varPaths);
6332
+ if (val != null) {
6333
+ const cssVar = `--${varKey.replaceAll(".", "-")}`;
6334
+ if (_value && !_value.startsWith(",")) base = base.replace(full, `calc(var(${cssVar}) * ${_value.slice(1, -1)})`);
6335
+ else {
6336
+ const fallback = _value?.slice(1);
6337
+ base = base.replace(full, `var(${cssVar}${fallback ? `, ${fallback}` : ""})`);
6338
+ }
6339
+ continue;
6340
+ }
6377
6341
  }
6342
+ base = base.replace(full, `var(${full})`);
6378
6343
  }
6379
6344
  let curly = 0;
6380
6345
  for (const i of base) if (i === "[") curly += 1;
@@ -6387,32 +6352,32 @@ function bracketWithType(str, requiredType, theme$2) {
6387
6352
  case "string": return base.replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_");
6388
6353
  case "quoted": return base.replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_").replace(/(["\\])/g, "\\$1").replace(/^(.+)$/, "\"$1\"");
6389
6354
  }
6390
- return base.replace(/(url\(.*?\))/g, (v) => v.replace(/_/g, "\\_")).replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_").replace(/(?:calc|clamp|max|min)\((.*)/g, (match$1) => {
6355
+ return base.replace(/(url\(.*?\))/g, (v) => v.replace(/_/g, "\\_")).replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_").replace(/(?:calc|clamp|max|min)\((.*)/g, (match) => {
6391
6356
  const vars = [];
6392
- return match$1.replace(/var\((--.+?)[,)]/g, (match$2, g1) => {
6357
+ return match.replace(/var\((--.+?)[,)]/g, (match, g1) => {
6393
6358
  vars.push(g1);
6394
- return match$2.replace(g1, "--un-calc");
6359
+ return match.replace(g1, "--un-calc");
6395
6360
  }).replace(/(-?\d*\.?\d(?!-\d.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, "$1 $2 ").replace(/--un-calc/g, () => vars.shift());
6396
6361
  });
6397
6362
  }
6398
6363
  }
6399
- function bracket(str, theme$2) {
6400
- return bracketWithType(str, void 0, theme$2);
6364
+ function bracket(str, theme) {
6365
+ return bracketWithType(str, void 0, theme);
6401
6366
  }
6402
- function bracketOfColor(str, theme$2) {
6403
- return bracketWithType(str, "color", theme$2);
6367
+ function bracketOfColor(str, theme) {
6368
+ return bracketWithType(str, "color", theme);
6404
6369
  }
6405
- function bracketOfLength(str, theme$2) {
6406
- return bracketWithType(str, "length", theme$2) || bracketWithType(str, "size", theme$2);
6370
+ function bracketOfLength(str, theme) {
6371
+ return bracketWithType(str, "length", theme) || bracketWithType(str, "size", theme);
6407
6372
  }
6408
- function bracketOfPosition(str, theme$2) {
6409
- return bracketWithType(str, "position", theme$2);
6373
+ function bracketOfPosition(str, theme) {
6374
+ return bracketWithType(str, "position", theme);
6410
6375
  }
6411
- function bracketOfFamily(str, theme$2) {
6412
- return bracketWithType(str, "family", theme$2);
6376
+ function bracketOfFamily(str, theme) {
6377
+ return bracketWithType(str, "family", theme);
6413
6378
  }
6414
- function bracketOfNumber(str, theme$2) {
6415
- return bracketWithType(str, "number", theme$2);
6379
+ function bracketOfNumber(str, theme) {
6380
+ return bracketWithType(str, "number", theme);
6416
6381
  }
6417
6382
  function cssvar(str) {
6418
6383
  if (str.startsWith("var(")) return str;
@@ -6425,8 +6390,8 @@ function cssvar(str) {
6425
6390
  function time(str) {
6426
6391
  const match = str.match(/^(-?[0-9.]+)(s|ms)?$/i);
6427
6392
  if (!match) return;
6428
- const [, n$1, unit] = match;
6429
- const num = Number.parseFloat(n$1);
6393
+ const [, n, unit] = match;
6394
+ const num = Number.parseFloat(n);
6430
6395
  if (!Number.isNaN(num)) {
6431
6396
  if (num === 0 && !unit) return "0s";
6432
6397
  return unit ? `${round(num)}${unit}` : `${round(num)}ms`;
@@ -6435,8 +6400,8 @@ function time(str) {
6435
6400
  function degree(str) {
6436
6401
  const match = str.match(/^(-?[0-9.]+)(deg|rad|grad|turn)?$/i);
6437
6402
  if (!match) return;
6438
- const [, n$1, unit] = match;
6439
- const num = Number.parseFloat(n$1);
6403
+ const [, n, unit] = match;
6404
+ const num = Number.parseFloat(n);
6440
6405
  if (!Number.isNaN(num)) {
6441
6406
  if (num === 0) return "0deg";
6442
6407
  return unit ? `${round(num)}${unit}` : `${round(num)}deg`;
@@ -6460,8 +6425,7 @@ function position(str) {
6460
6425
  function none(str) {
6461
6426
  if (str === "none") return "none";
6462
6427
  }
6463
- const handler = createValueHandler(handlers_exports);
6464
- const h = handler;
6428
+ const h = createValueHandler(handlers_exports);
6465
6429
  function numberResolver(size, defaultValue) {
6466
6430
  const v = h.number(size) ?? defaultValue;
6467
6431
  if (v != null) {
@@ -6477,8 +6441,8 @@ function numberResolver(size, defaultValue) {
6477
6441
  * @param map - Optional mapping of direction keys to property postfixes. Defaults to {@link directionMap}.
6478
6442
  * @param formatter - Optional function to format the final property name. Defaults to `(p, d) => \`\${p}\${d}\``.
6479
6443
  */
6480
- function directionSize(property$2, map = directionMap, formatter = (p, d) => `${p}${d}`) {
6481
- return (([_, direction, size = "4"], { theme: theme$2 }) => {
6444
+ function directionSize(property, map = directionMap, formatter = (p, d) => `${p}${d}`) {
6445
+ return (([_, direction, size = "4"], { theme }) => {
6482
6446
  if (size != null && direction != null) {
6483
6447
  let v;
6484
6448
  const isNegative = size.startsWith("-");
@@ -6486,13 +6450,13 @@ function directionSize(property$2, map = directionMap, formatter = (p, d) => `${
6486
6450
  v = numberResolver(size);
6487
6451
  if (v != null && !Number.isNaN(v)) {
6488
6452
  themeTracking("spacing");
6489
- return map[direction].map((i) => [formatter(property$2, i), `calc(var(--spacing) * ${isNegative ? "-" : ""}${v})`]);
6490
- } else if (theme$2.spacing && size in theme$2.spacing) {
6453
+ return map[direction].map((i) => [formatter(property, i), `calc(var(--spacing) * ${isNegative ? "-" : ""}${v})`]);
6454
+ } else if (theme.spacing && size in theme.spacing) {
6491
6455
  themeTracking("spacing", size);
6492
- return map[direction].map((i) => [formatter(property$2, i), isNegative ? `calc(var(--${escapeSelector(`spacing-${size}`)}) * -1)` : `var(--${escapeSelector(`spacing-${size}`)})`]);
6456
+ return map[direction].map((i) => [formatter(property, i), isNegative ? `calc(var(--${escapeSelector(`spacing-${size}`)}) * -1)` : `var(--${escapeSelector(`spacing-${size}`)})`]);
6493
6457
  }
6494
- v = h.bracket.cssvar.global.auto.fraction.rem(isNegative ? `-${size}` : size, theme$2);
6495
- if (v != null) return map[direction].map((i) => [formatter(property$2, i), v]);
6458
+ v = h.bracket.cssvar.global.auto.fraction.rem(isNegative ? `-${size}` : size, theme);
6459
+ if (v != null) return map[direction].map((i) => [formatter(property, i), v]);
6496
6460
  }
6497
6461
  });
6498
6462
  }
@@ -6511,7 +6475,7 @@ function directionSize(property$2, map = directionMap, formatter = (p, d) => `${
6511
6475
  * @param theme - {@link Theme} object.
6512
6476
  * @return object if string is parseable.
6513
6477
  */
6514
- function parseColor(body, theme$2) {
6478
+ function parseColor(body, theme) {
6515
6479
  let split;
6516
6480
  const [front, ...rest] = getStringComponents(body, ["/", ":"], 3) ?? [];
6517
6481
  if (front != null) {
@@ -6519,47 +6483,47 @@ function parseColor(body, theme$2) {
6519
6483
  if (match == null || match === "color") split = [front, ...rest];
6520
6484
  }
6521
6485
  if (!split) return;
6522
- let opacity$1;
6486
+ let opacity;
6523
6487
  let [main, opacityOrModifier, modifier] = split;
6524
6488
  if (isInterpolatedMethod(opacityOrModifier) || isInterpolatedMethod(h.bracket(opacityOrModifier ?? ""))) modifier = opacityOrModifier;
6525
- else opacity$1 = opacityOrModifier;
6526
- const colors$1 = main.replace(/([a-z])(\d)(?![-_a-z])/g, "$1-$2").split(/-/g);
6527
- const [name] = colors$1;
6489
+ else opacity = opacityOrModifier;
6490
+ const colors = main.replace(/([a-z])(\d)(?![-_a-z])/g, "$1-$2").split(/-/g);
6491
+ const [name] = colors;
6528
6492
  if (!name) return;
6529
- let parsed = parseThemeColor(theme$2, colors$1);
6530
- if (!parsed && colors$1.length >= 2) {
6531
- const last = colors$1.at(-1);
6532
- const secondLast = colors$1.at(-2);
6533
- if (/^\d+$/.test(last)) parsed = parseThemeColor(theme$2, colors$1.slice(0, -2).concat([`${secondLast}${last}`]));
6493
+ let parsed = parseThemeColor(theme, colors);
6494
+ if (!parsed && colors.length >= 2) {
6495
+ const last = colors.at(-1);
6496
+ const secondLast = colors.at(-2);
6497
+ if (/^\d+$/.test(last)) parsed = parseThemeColor(theme, colors.slice(0, -2).concat([`${secondLast}${last}`]));
6534
6498
  }
6535
6499
  let { no, keys, color } = parsed ?? {};
6536
6500
  if (!color) {
6537
- const bracket$1 = h.bracketOfColor(main, theme$2);
6538
- const bracketOrMain = bracket$1 || main;
6501
+ const bracket = h.bracketOfColor(main, theme);
6502
+ const bracketOrMain = bracket || main;
6539
6503
  if (h.numberWithUnit(bracketOrMain)) return;
6540
6504
  if (/^#[\da-f]+$/i.test(bracketOrMain)) color = bracketOrMain;
6541
6505
  else if (/^hex-[\da-fA-F]+$/.test(bracketOrMain)) color = `#${bracketOrMain.slice(4)}`;
6542
6506
  else if (main.startsWith("$")) color = h.cssvar(main);
6543
- color = color || bracket$1;
6507
+ color = color || bracket;
6544
6508
  }
6545
6509
  return {
6546
- opacity: opacity$1,
6510
+ opacity,
6547
6511
  modifier: modifier && h.bracket.cssvar(modifier) || modifier,
6548
6512
  name,
6549
6513
  no,
6550
6514
  color: color ?? SpecialColorKey[name],
6551
- alpha: h.bracket.cssvar.percent(opacity$1 ?? ""),
6515
+ alpha: h.bracket.cssvar.percent(opacity ?? ""),
6552
6516
  keys,
6553
6517
  get cssColor() {
6554
6518
  return parseCssColor(this.color);
6555
6519
  }
6556
6520
  };
6557
6521
  }
6558
- function parseThemeColor(theme$2, keys) {
6522
+ function parseThemeColor(theme, keys) {
6559
6523
  let color;
6560
6524
  let no;
6561
6525
  let key;
6562
- const colorData = getThemeByKey(theme$2, "colors", keys);
6526
+ const colorData = getThemeByKey(theme, "colors", keys);
6563
6527
  if (typeof colorData === "object") {
6564
6528
  if ("DEFAULT" in colorData) {
6565
6529
  color = colorData.DEFAULT;
@@ -6578,23 +6542,23 @@ function parseThemeColor(theme$2, keys) {
6578
6542
  keys: key
6579
6543
  };
6580
6544
  }
6581
- function getThemeByKey(theme$2, themeKey, keys) {
6582
- const obj = theme$2[themeKey];
6583
- function deepGet(current, path$1) {
6584
- if (path$1.length === 0) return current;
6545
+ function getThemeByKey(theme, themeKey, keys) {
6546
+ const obj = theme[themeKey];
6547
+ function deepGet(current, path) {
6548
+ if (path.length === 0) return current;
6585
6549
  if (!current || typeof current !== "object") return void 0;
6586
- for (let i = path$1.length; i > 0; i--) {
6587
- const flatKey = path$1.slice(0, i).join("-");
6550
+ for (let i = path.length; i > 0; i--) {
6551
+ const flatKey = path.slice(0, i).join("-");
6588
6552
  if (flatKey in current) {
6589
6553
  const v = current[flatKey];
6590
- if (i === path$1.length) return v;
6591
- return deepGet(v, path$1.slice(i));
6554
+ if (i === path.length) return v;
6555
+ return deepGet(v, path.slice(i));
6592
6556
  }
6593
6557
  }
6594
6558
  }
6595
6559
  return deepGet(obj, keys);
6596
6560
  }
6597
- function colorCSSGenerator(data, property$2, varName, ctx) {
6561
+ function colorCSSGenerator(data, property, varName, ctx) {
6598
6562
  if (!data) return;
6599
6563
  const { color, keys, alpha, modifier } = data;
6600
6564
  const rawColorComment = ctx?.generator.config.envMode === "dev" && color ? ` /* ${color} */` : "";
@@ -6604,14 +6568,14 @@ function colorCSSGenerator(data, property$2, varName, ctx) {
6604
6568
  const isCSSVar = color.includes("var(");
6605
6569
  const isSpecial = Object.values(SpecialColorKey).includes(color);
6606
6570
  if (isSpecial && !alpha) {
6607
- css[property$2] = color;
6571
+ css[property] = color;
6608
6572
  return result;
6609
6573
  }
6610
6574
  const alphaKey = `--un-${varName}-opacity`;
6611
6575
  const value = keys && !isCSSVar && !isSpecial ? generateThemeVariable("colors", keys) : color;
6612
6576
  let method = modifier ?? (keys ? "in srgb" : "in oklab");
6613
6577
  if (!method.startsWith("in ") && !method.startsWith("var(")) method = `in ${method}`;
6614
- css[property$2] = `color-mix(${method}, ${value} ${alpha ?? `var(${alphaKey})`}, transparent)${rawColorComment}`;
6578
+ css[property] = `color-mix(${method}, ${value} ${alpha ?? `var(${alphaKey})`}, transparent)${rawColorComment}`;
6615
6579
  result.push(defineProperty(alphaKey, {
6616
6580
  syntax: "<percentage>",
6617
6581
  initialValue: "100%"
@@ -6629,7 +6593,7 @@ function colorCSSGenerator(data, property$2, varName, ctx) {
6629
6593
  result.push({
6630
6594
  [symbols.parent]: "@supports (color: color-mix(in lab, red, red))",
6631
6595
  [symbols.noMerge]: true,
6632
- [property$2]: `color-mix(in oklab, ${colorValue}, transparent)${rawColorComment}`
6596
+ [property]: `color-mix(in oklab, ${colorValue}, transparent)${rawColorComment}`
6633
6597
  });
6634
6598
  }
6635
6599
  }
@@ -6638,11 +6602,11 @@ function colorCSSGenerator(data, property$2, varName, ctx) {
6638
6602
  return result;
6639
6603
  }
6640
6604
  }
6641
- function colorResolver(property$2, varName) {
6605
+ function colorResolver(property, varName) {
6642
6606
  return ([, body], ctx) => {
6643
6607
  const data = parseColor(body ?? "", ctx.theme);
6644
6608
  if (!data) return;
6645
- return colorCSSGenerator(data, property$2, varName, ctx);
6609
+ return colorCSSGenerator(data, property, varName, ctx);
6646
6610
  };
6647
6611
  }
6648
6612
  function colorableShadows(shadows, colorVar, alpha) {
@@ -6673,26 +6637,26 @@ function colorableShadows(shadows, colorVar, alpha) {
6673
6637
  }
6674
6638
  return colored;
6675
6639
  }
6676
- function hasParseableColor(color, theme$2) {
6677
- return color != null && !!parseColor(color, theme$2)?.color;
6640
+ function hasParseableColor(color, theme) {
6641
+ return color != null && !!parseColor(color, theme)?.color;
6678
6642
  }
6679
6643
  const reLetters = /[a-z]+/gi;
6680
6644
  const resolvedBreakpoints = /* @__PURE__ */ new WeakMap();
6681
- function resolveBreakpoints({ theme: theme$2, generator }, key = "breakpoint") {
6682
- const breakpoints = (generator?.userConfig?.theme)?.[key] || theme$2[key];
6645
+ function resolveBreakpoints({ theme, generator }, key = "breakpoint") {
6646
+ const breakpoints = (generator?.userConfig?.theme)?.[key] || theme[key];
6683
6647
  if (!breakpoints) return void 0;
6684
- if (resolvedBreakpoints.has(theme$2)) return resolvedBreakpoints.get(theme$2);
6648
+ if (resolvedBreakpoints.has(theme)) return resolvedBreakpoints.get(theme);
6685
6649
  const resolved = Object.entries(breakpoints).sort((a, b) => Number.parseInt(a[1].replace(reLetters, "")) - Number.parseInt(b[1].replace(reLetters, ""))).map(([point, size]) => ({
6686
6650
  point,
6687
6651
  size
6688
6652
  }));
6689
- resolvedBreakpoints.set(theme$2, resolved);
6653
+ resolvedBreakpoints.set(theme, resolved);
6690
6654
  return resolved;
6691
6655
  }
6692
- function makeGlobalStaticRules(prefix, property$2) {
6693
- return globalKeywords.map((keyword) => [`${prefix}-${keyword}`, { [property$2 ?? prefix]: keyword }]);
6656
+ function makeGlobalStaticRules(prefix, property) {
6657
+ return globalKeywords.map((keyword) => [`${prefix}-${keyword}`, { [property ?? prefix]: keyword }]);
6694
6658
  }
6695
- function defineProperty(property$2, options = {}) {
6659
+ function defineProperty(property, options = {}) {
6696
6660
  const { syntax = "*", inherits = false, initialValue } = options;
6697
6661
  const value = {
6698
6662
  [symbols.shortcutsNoMerge]: true,
@@ -6701,13 +6665,13 @@ function defineProperty(property$2, options = {}) {
6701
6665
  [symbols.variants]: () => [{
6702
6666
  parent: "",
6703
6667
  layer: "properties",
6704
- selector: () => `@property ${property$2}`
6668
+ selector: () => `@property ${property}`
6705
6669
  }],
6706
6670
  syntax: JSON.stringify(syntax),
6707
6671
  inherits: inherits ? "true" : "false"
6708
6672
  };
6709
6673
  if (initialValue != null) value["initial-value"] = initialValue;
6710
- propertyTracking(property$2, initialValue ? String(initialValue) : "initial");
6674
+ propertyTracking(property, initialValue ? String(initialValue) : "initial");
6711
6675
  return value;
6712
6676
  }
6713
6677
  function isCSSMathFn(value) {
@@ -6739,26 +6703,25 @@ function themeTracking(key, props = "DEFAULT") {
6739
6703
  function generateThemeVariable(key, props) {
6740
6704
  return `var(--${key}-${toArray(props).join("-")})`;
6741
6705
  }
6742
- function detectThemeValue(value, theme$2) {
6706
+ function detectThemeValue(value, theme) {
6743
6707
  if (value.startsWith("var(")) {
6744
6708
  const variable = value.match(/var\(--([\w-]+)(?:,.*)?\)/)?.[1];
6745
6709
  if (variable) {
6746
- const [key, ...path$1] = variable.split("-");
6747
- const themeValue = getThemeByKey(theme$2, key, path$1);
6710
+ const [key, ...path] = variable.split("-");
6711
+ const themeValue = getThemeByKey(theme, key, path);
6748
6712
  if (typeof themeValue === "string") {
6749
- themeTracking(key, path$1);
6750
- detectThemeValue(themeValue, theme$2);
6713
+ themeTracking(key, path);
6714
+ detectThemeValue(themeValue, theme);
6751
6715
  }
6752
6716
  }
6753
6717
  }
6754
6718
  }
6755
6719
  const trackedProperties = /* @__PURE__ */ new Map();
6756
- function propertyTracking(property$2, value) {
6757
- if (!trackedProperties.has(property$2)) trackedProperties.set(property$2, value);
6720
+ function propertyTracking(property, value) {
6721
+ if (!trackedProperties.has(property)) trackedProperties.set(property, value);
6758
6722
  }
6759
-
6760
6723
  //#endregion
6761
- //#region ../../packages-presets/preset-wind4/dist/container-BsDB8iH5.mjs
6724
+ //#region ../../packages-presets/preset-wind4/dist/container-m1WfKD7R.mjs
6762
6725
  const containerParent = [[/^@container(?:\/(\w+))?(?:-(normal))?$/, ([, l, v]) => {
6763
6726
  return {
6764
6727
  "container-type": v ?? "inline-size",
@@ -6769,12 +6732,12 @@ const queryMatcher = /@media \(min-width: (.+)\)/;
6769
6732
  const container$1 = [[
6770
6733
  /^__container$/,
6771
6734
  (_, context) => {
6772
- const { theme: theme$2, variantHandlers } = context;
6773
- const themePadding = theme$2.containers?.padding;
6735
+ const { theme, variantHandlers } = context;
6736
+ const themePadding = theme.containers?.padding;
6774
6737
  let padding;
6775
6738
  if (isString(themePadding)) padding = themePadding;
6776
6739
  else padding = themePadding?.DEFAULT;
6777
- const themeMaxWidth = theme$2.containers?.maxWidth;
6740
+ const themeMaxWidth = theme.containers?.maxWidth;
6778
6741
  let maxWidth;
6779
6742
  for (const v of variantHandlers) {
6780
6743
  const query = v.handle?.({}, (x) => x)?.parent;
@@ -6790,7 +6753,7 @@ const container$1 = [[
6790
6753
  }
6791
6754
  const css = { "max-width": maxWidth };
6792
6755
  if (!variantHandlers.length) css.width = "100%";
6793
- if (theme$2.containers?.center) {
6756
+ if (theme.containers?.center) {
6794
6757
  css["margin-left"] = "auto";
6795
6758
  css["margin-right"] = "auto";
6796
6759
  }
@@ -6808,11 +6771,10 @@ const containerShortcuts = [[/^(?:(\w+)[:-])?container$/, ([, bp], context) => {
6808
6771
  if (!points.includes(bp)) return;
6809
6772
  points = points.slice(points.indexOf(bp));
6810
6773
  }
6811
- const shortcuts$1 = points.map((p) => `${p}:__container`);
6812
- if (!bp) shortcuts$1.unshift("__container");
6813
- return shortcuts$1;
6774
+ const shortcuts = points.map((p) => `${p}:__container`);
6775
+ if (!bp) shortcuts.unshift("__container");
6776
+ return shortcuts;
6814
6777
  }]];
6815
-
6816
6778
  //#endregion
6817
6779
  //#region ../../packages-presets/preset-wind4/dist/rules.mjs
6818
6780
  const verticalAlignAlias = {
@@ -6848,21 +6810,21 @@ const textAligns = [...textAlignValues.map((v) => [`text-${v}`, { "text-align":
6848
6810
  const animations = [
6849
6811
  [
6850
6812
  /^(?:animate-)?keyframes-(.+)$/,
6851
- ([, name], { theme: theme$2 }) => {
6852
- const kf = theme$2.animation?.keyframes?.[name];
6813
+ ([, name], { theme }) => {
6814
+ const kf = theme.animation?.keyframes?.[name];
6853
6815
  if (kf) return [`@keyframes ${name}${kf}`, { animation: name }];
6854
6816
  },
6855
6817
  { autocomplete: ["animate-keyframes-$animation.keyframes", "keyframes-$animation.keyframes"] }
6856
6818
  ],
6857
6819
  [
6858
6820
  /^animate-(.+)$/,
6859
- ([, name], { theme: theme$2 }) => {
6860
- const kf = theme$2.animation?.keyframes?.[name];
6821
+ ([, name], { theme }) => {
6822
+ const kf = theme.animation?.keyframes?.[name];
6861
6823
  if (kf) {
6862
- const duration = theme$2.animation?.durations?.[name] ?? "1s";
6863
- const timing = theme$2.animation?.timingFns?.[name] ?? "linear";
6864
- const count = theme$2.animation?.counts?.[name] ?? 1;
6865
- const props = theme$2.animation?.properties?.[name];
6824
+ const duration = theme.animation?.durations?.[name] ?? "1s";
6825
+ const timing = theme.animation?.timingFns?.[name] ?? "linear";
6826
+ const count = theme.animation?.counts?.[name] ?? 1;
6827
+ const props = theme.animation?.properties?.[name];
6866
6828
  return [`@keyframes ${name}${kf}`, {
6867
6829
  animation: `${name} ${duration} ${timing} ${count}`,
6868
6830
  ...props
@@ -6875,17 +6837,17 @@ const animations = [
6875
6837
  [/^animate-name-(.+)/, ([, d]) => ({ "animation-name": h.bracket.cssvar(d) ?? d })],
6876
6838
  [
6877
6839
  /^animate-duration-(.+)$/,
6878
- ([, d], { theme: theme$2 }) => ({ "animation-duration": theme$2.duration?.[d || "DEFAULT"] ?? h.bracket.cssvar.time(d) }),
6840
+ ([, d], { theme }) => ({ "animation-duration": theme.duration?.[d || "DEFAULT"] ?? h.bracket.cssvar.time(d) }),
6879
6841
  { autocomplete: ["animate-duration"] }
6880
6842
  ],
6881
6843
  [
6882
6844
  /^animate-delay-(.+)$/,
6883
- ([, d], { theme: theme$2 }) => ({ "animation-delay": theme$2.duration?.[d || "DEFAULT"] ?? h.bracket.cssvar.time(d) }),
6845
+ ([, d], { theme }) => ({ "animation-delay": theme.duration?.[d || "DEFAULT"] ?? h.bracket.cssvar.time(d) }),
6884
6846
  { autocomplete: ["animate-delay"] }
6885
6847
  ],
6886
6848
  [
6887
6849
  /^animate-ease(?:-(.+))?$/,
6888
- ([, d], { theme: theme$2 }) => ({ "animation-timing-function": theme$2.ease?.[d || "DEFAULT"] ?? h.bracket.cssvar(d) }),
6850
+ ([, d], { theme }) => ({ "animation-timing-function": theme.ease?.[d || "DEFAULT"] ?? h.bracket.cssvar(d) }),
6889
6851
  { autocomplete: ["animate-ease", "animate-ease-$ease"] }
6890
6852
  ],
6891
6853
  [
@@ -6983,28 +6945,28 @@ function resolveModifier(modifier) {
6983
6945
  return interpolationMethod;
6984
6946
  }
6985
6947
  function bgGradientColorResolver() {
6986
- return function* ([, position$1, body], { theme: theme$2 }) {
6948
+ return function* ([, position, body], { theme }) {
6987
6949
  const css = {};
6988
- const data = parseColor(body, theme$2);
6950
+ const data = parseColor(body, theme);
6989
6951
  if (data) {
6990
6952
  const { color, keys, alpha } = data;
6991
6953
  if (color) {
6992
- if (Object.values(SpecialColorKey).includes(color)) css[`--un-gradient-${position$1}`] = color;
6954
+ if (Object.values(SpecialColorKey).includes(color)) css[`--un-gradient-${position}`] = color;
6993
6955
  else {
6994
- css[`--un-${position$1}-opacity`] = alpha;
6956
+ css[`--un-${position}-opacity`] = alpha;
6995
6957
  const value = keys ? generateThemeVariable("colors", keys) : color;
6996
- css[`--un-gradient-${position$1}`] = `color-mix(in oklab, ${value} var(--un-${position$1}-opacity), transparent)`;
6997
- yield defineProperty(`--un-${position$1}-opacity`, {
6958
+ css[`--un-gradient-${position}`] = `color-mix(in oklab, ${value} var(--un-${position}-opacity), transparent)`;
6959
+ yield defineProperty(`--un-${position}-opacity`, {
6998
6960
  syntax: "<percentage>",
6999
6961
  initialValue: "100%"
7000
6962
  });
7001
6963
  }
7002
6964
  if (keys) themeTracking(`colors`, keys);
7003
- if (theme$2) detectThemeValue(color, theme$2);
6965
+ if (theme) detectThemeValue(color, theme);
7004
6966
  }
7005
- } else css[`--un-gradient-${position$1}`] = h.bracket.cssvar(body);
7006
- if (css[`--un-gradient-${position$1}`]) {
7007
- switch (position$1) {
6967
+ } else css[`--un-gradient-${position}`] = h.bracket.cssvar(body);
6968
+ if (css[`--un-gradient-${position}`]) {
6969
+ switch (position) {
7008
6970
  case "from":
7009
6971
  yield {
7010
6972
  ...css,
@@ -7058,7 +7020,7 @@ const backgroundStyles = [
7058
7020
  ] }
7059
7021
  ],
7060
7022
  [/^(from|via|to|stops)-(.+)$/, bgGradientColorResolver()],
7061
- [/^(from|via|to)-op(?:acity)?-?(.+)$/, ([, position$1, opacity$1]) => ({ [`--un-${position$1}-opacity`]: h.bracket.percent(opacity$1) })],
7023
+ [/^(from|via|to)-op(?:acity)?-?(.+)$/, ([, position, opacity]) => ({ [`--un-${position}-opacity`]: h.bracket.percent(opacity) })],
7062
7024
  [/^(from|via|to)-([\d.]+%)$/, bgGradientPositionResolver()],
7063
7025
  [
7064
7026
  /^bg-((?:repeating-)?(?:linear|radial|conic))$/,
@@ -7143,7 +7105,7 @@ const outline = [
7143
7105
  ],
7144
7106
  [
7145
7107
  /^outline-op(?:acity)?-?(.+)$/,
7146
- ([, opacity$1]) => ({ "--un-outline-opacity": h.bracket.percent.cssvar(opacity$1) }),
7108
+ ([, opacity]) => ({ "--un-outline-opacity": h.bracket.percent.cssvar(opacity) }),
7147
7109
  { autocomplete: "outline-(op|opacity)-<percent>" }
7148
7110
  ],
7149
7111
  [
@@ -7231,11 +7193,11 @@ const listStyles = {
7231
7193
  const listStyle = [
7232
7194
  [
7233
7195
  /^list-(.+?)(?:-(outside|inside))?$/,
7234
- ([, alias, position$1]) => {
7196
+ ([, alias, position]) => {
7235
7197
  const style = listStyles[alias];
7236
7198
  if (style) {
7237
- if (position$1) return {
7238
- "list-style-position": position$1,
7199
+ if (position) return {
7200
+ "list-style-position": position,
7239
7201
  "list-style-type": style
7240
7202
  };
7241
7203
  return { "list-style-type": style };
@@ -7404,24 +7366,24 @@ function handlerBorderColorOrSize([, a = "", b], ctx) {
7404
7366
  b
7405
7367
  ]);
7406
7368
  if (hasParseableColor(b, ctx.theme)) {
7407
- const directions$1 = directionMap[a].map((i) => borderColorResolver(i)(["", b], ctx)).filter(notNull);
7408
- return [directions$1.map((d) => d[0]).reduce((acc, item) => {
7369
+ const directions = directionMap[a].map((i) => borderColorResolver(i)(["", b], ctx)).filter(notNull);
7370
+ return [directions.map((d) => d[0]).reduce((acc, item) => {
7409
7371
  Object.assign(acc, item);
7410
7372
  return acc;
7411
- }, {}), ...directions$1.flatMap((d) => d.slice(1))];
7373
+ }, {}), ...directions.flatMap((d) => d.slice(1))];
7412
7374
  }
7413
7375
  }
7414
7376
  }
7415
- function handlerBorderOpacity([, a = "", opacity$1]) {
7416
- const v = h.bracket.percent.cssvar(opacity$1);
7377
+ function handlerBorderOpacity([, a = "", opacity]) {
7378
+ const v = h.bracket.percent.cssvar(opacity);
7417
7379
  if (a in directionMap && v != null) return directionMap[a].map((i) => [`--un-border${i}-opacity`, v]);
7418
7380
  }
7419
- function handlerRounded([, a = "", s = "DEFAULT"], { theme: theme$2 }) {
7381
+ function handlerRounded([, a = "", s = "DEFAULT"], { theme }) {
7420
7382
  if (a in cornerMap) {
7421
7383
  if (s === "full") return cornerMap[a].map((i) => [`border${i}-radius`, "calc(infinity * 1px)"]);
7422
- const _v = theme$2.radius?.[s] ?? h.bracket.cssvar.global.fraction.rem(s);
7384
+ const _v = theme.radius?.[s] ?? h.bracket.cssvar.global.fraction.rem(s);
7423
7385
  if (_v != null) {
7424
- const isVar = theme$2.radius && s in theme$2.radius;
7386
+ const isVar = theme.radius && s in theme.radius;
7425
7387
  if (isVar) themeTracking(`radius`, s);
7426
7388
  return cornerMap[a].map((i) => [`border${i}-radius`, isVar ? generateThemeVariable("radius", s) : _v]);
7427
7389
  }
@@ -7461,15 +7423,15 @@ const bgColors = [[
7461
7423
  { autocomplete: "bg-$colors" }
7462
7424
  ], [
7463
7425
  /^bg-op(?:acity)?-?(.+)$/,
7464
- ([, opacity$1]) => ({ "--un-bg-opacity": h.bracket.percent.cssvar(opacity$1) }),
7426
+ ([, opacity]) => ({ "--un-bg-opacity": h.bracket.percent.cssvar(opacity) }),
7465
7427
  { autocomplete: "bg-(op|opacity)-<percent>" }
7466
7428
  ]];
7467
7429
  const colorScheme = [[/^(?:color-)?scheme-(.+)$/, ([, v]) => ({ "color-scheme": v.split("-").join(" ") })]];
7468
7430
  const columns = [
7469
7431
  [
7470
7432
  /^columns-(.+)$/,
7471
- ([, v], { theme: theme$2 }) => {
7472
- if (theme$2.container && v in theme$2.container) {
7433
+ ([, v], { theme }) => {
7434
+ if (theme.container && v in theme.container) {
7473
7435
  themeTracking("container", v);
7474
7436
  return { columns: generateThemeVariable("container", v) };
7475
7437
  }
@@ -7533,7 +7495,7 @@ const textDecorations = [
7533
7495
  ],
7534
7496
  [
7535
7497
  /^(?:underline|decoration)-op(?:acity)?-?(.+)$/,
7536
- ([, opacity$1]) => ({ "--un-line-opacity": h.bracket.percent.cssvar(opacity$1) }),
7498
+ ([, opacity]) => ({ "--un-line-opacity": h.bracket.percent.cssvar(opacity) }),
7537
7499
  { autocomplete: "(underline|decoration)-(op|opacity)-<percent>" }
7538
7500
  ],
7539
7501
  [
@@ -7602,9 +7564,9 @@ const spaces = [[
7602
7564
  "space-(x|y)-reverse",
7603
7565
  "space-(x|y)-$spacing"
7604
7566
  ] }
7605
- ], [/^space-([xy])-reverse$/, function* ([m, d], { symbols: symbols$1 }) {
7567
+ ], [/^space-([xy])-reverse$/, function* ([m, d], { symbols }) {
7606
7568
  yield {
7607
- [symbols$1.variants]: [notLastChildSelectorVariant(m)],
7569
+ [symbols.variants]: [notLastChildSelectorVariant(m)],
7608
7570
  [`--un-space-${d}-reverse`]: "1"
7609
7571
  };
7610
7572
  yield defineProperty(`--un-space-${d}-reverse`, { initialValue: 0 });
@@ -7619,20 +7581,20 @@ function notLastChildSelectorVariant(s) {
7619
7581
  })
7620
7582
  };
7621
7583
  }
7622
- function* handlerSpace([m, d, s], { theme: theme$2, symbols: symbols$1 }) {
7584
+ function* handlerSpace([m, d, s], { theme, symbols }) {
7623
7585
  let v;
7624
7586
  const num = numberResolver(s);
7625
7587
  if (num != null) {
7626
7588
  themeTracking(`spacing`);
7627
7589
  v = `calc(var(--spacing) * ${num})`;
7628
- } else v = theme$2.spacing?.[s] ?? h.bracket.cssvar.auto.fraction.rem(s || "1");
7590
+ } else v = theme.spacing?.[s] ?? h.bracket.cssvar.auto.fraction.rem(s || "1");
7629
7591
  if (v != null) {
7630
7592
  const results = directionMap[d === "x" ? "inline" : "block"].map((item, index) => {
7631
7593
  return [`margin${item}`, `calc(${v} * ${index === 0 ? `var(--un-space-${d}-reverse)` : `calc(1 - var(--un-space-${d}-reverse))`})`];
7632
7594
  });
7633
7595
  if (results) {
7634
7596
  yield {
7635
- [symbols$1.variants]: [notLastChildSelectorVariant(m)],
7597
+ [symbols.variants]: [notLastChildSelectorVariant(m)],
7636
7598
  [`--un-space-${d}-reverse`]: "0",
7637
7599
  ...Object.fromEntries(results)
7638
7600
  };
@@ -7657,10 +7619,10 @@ const divides = [
7657
7619
  ],
7658
7620
  [
7659
7621
  /^divide-op(?:acity)?-?(.+)$/,
7660
- function* ([match, opacity$1], { symbols: symbols$1 }) {
7622
+ function* ([match, opacity], { symbols }) {
7661
7623
  yield {
7662
- [symbols$1.variants]: [notLastChildSelectorVariant(match)],
7663
- "--un-divide-opacity": h.bracket.percent(opacity$1)
7624
+ [symbols.variants]: [notLastChildSelectorVariant(match)],
7625
+ "--un-divide-opacity": h.bracket.percent(opacity)
7664
7626
  };
7665
7627
  },
7666
7628
  { autocomplete: ["divide-(op|opacity)", "divide-(op|opacity)-<percent>"] }
@@ -7671,25 +7633,25 @@ const divides = [
7671
7633
  { autocomplete: ["divide-(x|y)", "divide-(x|y)-reverse"] }
7672
7634
  ],
7673
7635
  [/^divide-?([xy])-?(.+)$/, handlerDivide],
7674
- [/^divide-?([xy])-reverse$/, function* ([m, d], { symbols: symbols$1 }) {
7636
+ [/^divide-?([xy])-reverse$/, function* ([m, d], { symbols }) {
7675
7637
  yield {
7676
- [symbols$1.variants]: [notLastChildSelectorVariant(m)],
7638
+ [symbols.variants]: [notLastChildSelectorVariant(m)],
7677
7639
  [`--un-divide-${d}-reverse`]: "1"
7678
7640
  };
7679
7641
  yield defineProperty(`--un-divide-${d}-reverse`, { initialValue: 0 });
7680
7642
  }],
7681
7643
  [
7682
- /* @__PURE__ */ new RegExp(`^divide-(${borderStyles.join("|")})$`),
7683
- function* ([match, style], { symbols: symbols$1 }) {
7644
+ new RegExp(`^divide-(${borderStyles.join("|")})$`),
7645
+ function* ([match, style], { symbols }) {
7684
7646
  yield {
7685
- [symbols$1.variants]: [notLastChildSelectorVariant(match)],
7647
+ [symbols.variants]: [notLastChildSelectorVariant(match)],
7686
7648
  "border-style": style
7687
7649
  };
7688
7650
  },
7689
7651
  { autocomplete: borderStyles.map((i) => `divide-${i}`) }
7690
7652
  ]
7691
7653
  ];
7692
- function* handlerDivide([m, d, s], { symbols: symbols$1 }) {
7654
+ function* handlerDivide([m, d, s], { symbols }) {
7693
7655
  let v = h.bracket.cssvar.px(s || "1");
7694
7656
  if (v != null) {
7695
7657
  if (v === "0") v = "0px";
@@ -7702,7 +7664,7 @@ function* handlerDivide([m, d, s], { symbols: symbols$1 }) {
7702
7664
  });
7703
7665
  if (results) {
7704
7666
  yield {
7705
- [symbols$1.variants]: [notLastChildSelectorVariant(m)],
7667
+ [symbols.variants]: [notLastChildSelectorVariant(m)],
7706
7668
  [`--un-divide-${d}-reverse`]: 0,
7707
7669
  ...Object.fromEntries(results.flat())
7708
7670
  };
@@ -7744,8 +7706,8 @@ function percentWithDefault(str) {
7744
7706
  if (v != null && Number.parseFloat(v.slice(0, -1)) <= 100) return v;
7745
7707
  }
7746
7708
  function toFilter(varName, resolver) {
7747
- return ([, b, s], { theme: theme$2 }) => {
7748
- const value = resolver(s, theme$2) ?? (s === "none" ? "0" : "");
7709
+ return ([, b, s], { theme }) => {
7710
+ const value = resolver(s, theme) ?? (s === "none" ? "0" : "");
7749
7711
  if (value !== "") if (b) return [{
7750
7712
  [`--un-${b}${varName}`]: `${varName}(${value})`,
7751
7713
  "-webkit-backdrop-filter": backdropCSS,
@@ -7759,15 +7721,15 @@ function toFilter(varName, resolver) {
7759
7721
  }
7760
7722
  function dropShadowResolver(match, ctx) {
7761
7723
  const [, s] = match;
7762
- const { theme: theme$2 } = ctx;
7724
+ const { theme } = ctx;
7763
7725
  let res = [];
7764
7726
  if (s) {
7765
7727
  res = getStringComponents(s, "/", 2) ?? [];
7766
7728
  if (s.startsWith("/")) res = ["", s.slice(1)];
7767
7729
  }
7768
- let v = theme$2.dropShadow?.[res[0] || "DEFAULT"];
7730
+ let v = theme.dropShadow?.[res[0] || "DEFAULT"];
7769
7731
  const c = s ? h.bracket.cssvar(s) : void 0;
7770
- if ((v != null || c != null) && !hasParseableColor(c, theme$2)) {
7732
+ if ((v != null || c != null) && !hasParseableColor(c, theme)) {
7771
7733
  const alpha = res[1] ? h.bracket.percent.cssvar(res[1]) : void 0;
7772
7734
  return [{
7773
7735
  "--un-drop-shadow-opacity": alpha,
@@ -7775,7 +7737,7 @@ function dropShadowResolver(match, ctx) {
7775
7737
  "filter": filterCSS
7776
7738
  }, ...filterProperties];
7777
7739
  }
7778
- if (hasParseableColor(s, theme$2)) return colorResolver("--un-drop-shadow-color", "drop-shadow")(match, ctx);
7740
+ if (hasParseableColor(s, theme)) return colorResolver("--un-drop-shadow-color", "drop-shadow")(match, ctx);
7779
7741
  v = h.bracket.cssvar(s) ?? (s === "none" ? "" : void 0);
7780
7742
  if (v != null) return [{
7781
7743
  "--un-drop-shadow": v ? `drop-shadow(${v})` : v,
@@ -7785,7 +7747,7 @@ function dropShadowResolver(match, ctx) {
7785
7747
  const filters = [
7786
7748
  [
7787
7749
  /^(?:(backdrop-)|filter-)?blur(?:-(.+))?$/,
7788
- toFilter("blur", (s, theme$2) => theme$2.blur?.[s || "DEFAULT"] || h.bracket.cssvar.px(s)),
7750
+ toFilter("blur", (s, theme) => theme.blur?.[s || "DEFAULT"] || h.bracket.cssvar.px(s)),
7789
7751
  { autocomplete: [
7790
7752
  "(backdrop|filter)-blur-$blur",
7791
7753
  "blur-$blur",
@@ -7824,7 +7786,7 @@ const filters = [
7824
7786
  ] }
7825
7787
  ],
7826
7788
  [/^(?:filter-)?drop-shadow-color-(.+)$/, colorResolver("--un-drop-shadow-color", "drop-shadow")],
7827
- [/^(?:filter-)?drop-shadow(?:-color)?-op(?:acity)?-?(.+)$/, ([, opacity$1]) => ({ "--un-drop-shadow-opacity": h.bracket.percent(opacity$1) })],
7789
+ [/^(?:filter-)?drop-shadow(?:-color)?-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-drop-shadow-opacity": h.bracket.percent(opacity) })],
7828
7790
  [
7829
7791
  /^(?:(backdrop-)|filter-)?grayscale(?:-(.+))?$/,
7830
7792
  toFilter("grayscale", percentWithDefault),
@@ -7995,7 +7957,7 @@ const grids = [
7995
7957
  { autocomplete: "(grid-rows|grid-cols|rows|cols)-<num>" }
7996
7958
  ],
7997
7959
  [/^grid-area(s)?-(.+)$/, ([, s, v]) => {
7998
- if (s != null) return { "grid-template-areas": h.cssvar(v) ?? v.split("-").map((s$1) => `"${h.bracket(s$1)}"`).join(" ") };
7960
+ if (s != null) return { "grid-template-areas": h.cssvar(v) ?? v.split("-").map((s) => `"${h.bracket(s)}"`).join(" ") };
7999
7961
  return { "grid-area": h.bracket.cssvar(v) };
8000
7962
  }],
8001
7963
  ["grid-rows-none", { "grid-template-rows": "none" }],
@@ -8047,8 +8009,8 @@ const baseMaskImage = {
8047
8009
  };
8048
8010
  function handlePosition([, v = ""]) {
8049
8011
  if (v in cornerMap) {
8050
- const positions$1 = v.split("").flatMap((c) => linearMap[c]).join(" ");
8051
- return { "mask-position": positions$1 };
8012
+ const positions = v.split("").flatMap((c) => linearMap[c]).join(" ");
8013
+ return { "mask-position": positions };
8052
8014
  }
8053
8015
  const _v = h.bracket.cssvar.global.position(v);
8054
8016
  if (_v !== null) return { "mask-position": _v };
@@ -8210,7 +8172,7 @@ const placeholders = [[
8210
8172
  { autocomplete: "placeholder-$colors" }
8211
8173
  ], [
8212
8174
  /^\$ placeholder-op(?:acity)?-?(.+)$/,
8213
- ([, opacity$1]) => ({ "--un-placeholder-opacity": h.bracket.percent(opacity$1) }),
8175
+ ([, opacity]) => ({ "--un-placeholder-opacity": h.bracket.percent(opacity) }),
8214
8176
  { autocomplete: ["placeholder-(op|opacity)", "placeholder-(op|opacity)-<percent>"] }
8215
8177
  ]];
8216
8178
  const positions = [
@@ -8421,7 +8383,7 @@ const boxShadows = [
8421
8383
  ],
8422
8384
  [
8423
8385
  /^shadow-op(?:acity)?-?(.+)$/,
8424
- ([, opacity$1]) => ({ "--un-shadow-opacity": h.bracket.percent.cssvar(opacity$1) }),
8386
+ ([, opacity]) => ({ "--un-shadow-opacity": h.bracket.percent.cssvar(opacity) }),
8425
8387
  { autocomplete: "shadow-(op|opacity)-<percent>" }
8426
8388
  ],
8427
8389
  [
@@ -8431,23 +8393,23 @@ const boxShadows = [
8431
8393
  ],
8432
8394
  [
8433
8395
  /^inset-shadow-op(?:acity)?-?(.+)$/,
8434
- ([, opacity$1]) => ({ "--un-inset-shadow-opacity": h.bracket.percent.cssvar(opacity$1) }),
8396
+ ([, opacity]) => ({ "--un-inset-shadow-opacity": h.bracket.percent.cssvar(opacity) }),
8435
8397
  { autocomplete: "shadow-(op|opacity)-<percent>" }
8436
8398
  ]
8437
8399
  ];
8438
8400
  function handleShadow(themeKey) {
8439
8401
  return (match, ctx) => {
8440
8402
  const [, d] = match;
8441
- const { theme: theme$2 } = ctx;
8403
+ const { theme } = ctx;
8442
8404
  let res = [];
8443
8405
  if (d) {
8444
8406
  res = getStringComponents(d, "/", 2) ?? [];
8445
8407
  if (d.startsWith("/")) res = ["", d.slice(1)];
8446
8408
  }
8447
- const v = theme$2[themeKey]?.[res[0] || "DEFAULT"];
8409
+ const v = theme[themeKey]?.[res[0] || "DEFAULT"];
8448
8410
  const c = d ? h.bracket.cssvar(d) : void 0;
8449
8411
  const shadowVar = hyphenate(themeKey);
8450
- if ((v != null || c != null) && !hasParseableColor(c, theme$2)) {
8412
+ if ((v != null || c != null) && !hasParseableColor(c, theme)) {
8451
8413
  const alpha = res[1] ? h.bracket.percent.cssvar(res[1]) : void 0;
8452
8414
  return [{
8453
8415
  [`--un-${shadowVar}-opacity`]: alpha,
@@ -8473,7 +8435,7 @@ const rings = [
8473
8435
  ],
8474
8436
  [
8475
8437
  /^ring-op(?:acity)?-?(.+)$/,
8476
- ([, opacity$1]) => ({ "--un-ring-opacity": h.bracket.percent.cssvar(opacity$1) }),
8438
+ ([, opacity]) => ({ "--un-ring-opacity": h.bracket.percent.cssvar(opacity) }),
8477
8439
  { autocomplete: "ring-(op|opacity)-<percent>" }
8478
8440
  ],
8479
8441
  [/^inset-ring(?:-(.+))?$/, ([, d]) => {
@@ -8490,7 +8452,7 @@ const rings = [
8490
8452
  ],
8491
8453
  [
8492
8454
  /^inset-ring-op(?:acity)?-?(.+)$/,
8493
- ([, opacity$1]) => ({ "--un-inset-ring-opacity": h.bracket.percent.cssvar(opacity$1) }),
8455
+ ([, opacity]) => ({ "--un-inset-ring-opacity": h.bracket.percent.cssvar(opacity) }),
8494
8456
  { autocomplete: "inset-ring-(op|opacity)-<percent>" }
8495
8457
  ],
8496
8458
  [
@@ -8511,7 +8473,7 @@ const rings = [
8511
8473
  ],
8512
8474
  [
8513
8475
  /^ring-offset-op(?:acity)?-?(.+)$/,
8514
- ([, opacity$1]) => ({ "--un-ring-offset-opacity": h.bracket.percent.cssvar(opacity$1) }),
8476
+ ([, opacity]) => ({ "--un-ring-offset-opacity": h.bracket.percent.cssvar(opacity) }),
8515
8477
  { autocomplete: "ring-offset-(op|opacity)-<percent>" }
8516
8478
  ],
8517
8479
  ["ring-inset", { "--un-ring-inset": "inset" }]
@@ -8559,9 +8521,9 @@ const sizeMapping = {
8559
8521
  function getPropName(minmax, hw) {
8560
8522
  return `${minmax || ""}${sizeMapping[hw]}`;
8561
8523
  }
8562
- function getSizeValue(theme$2, hw, prop) {
8524
+ function getSizeValue(theme, hw, prop) {
8563
8525
  let v;
8564
- for (const key of ["container", "spacing"]) if (theme$2[key]?.[prop]) {
8526
+ for (const key of ["container", "spacing"]) if (theme[key]?.[prop]) {
8565
8527
  themeTracking(key, prop);
8566
8528
  v = generateThemeVariable(key, prop);
8567
8529
  break;
@@ -8583,17 +8545,17 @@ function getSizeValue(theme$2, hw, prop) {
8583
8545
  themeTracking(`spacing`);
8584
8546
  v = `calc(var(--spacing) * ${h.number(prop)})`;
8585
8547
  }
8586
- return v ?? h.bracket.cssvar.global.auto.none.fraction.rem(prop);
8548
+ return v ?? h.bracket.cssvar.global.auto.none.fraction.rem(prop, theme);
8587
8549
  }
8588
8550
  const sizes = [
8589
- [/^size-(min-|max-)?(.+)$/, ([, m, s], { theme: theme$2 }) => ({
8590
- [getPropName(m, "w")]: getSizeValue(theme$2, "w", s),
8591
- [getPropName(m, "h")]: getSizeValue(theme$2, "h", s)
8551
+ [/^size-(min-|max-)?(.+)$/, ([, m, s], { theme }) => ({
8552
+ [getPropName(m, "w")]: getSizeValue(theme, "w", s),
8553
+ [getPropName(m, "h")]: getSizeValue(theme, "h", s)
8592
8554
  })],
8593
- [/^(?:size-)?(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme: theme$2 }) => ({ [getPropName(m, w)]: getSizeValue(theme$2, w, s) })],
8555
+ [/^(?:size-)?(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(theme, w, s) })],
8594
8556
  [
8595
8557
  /^(?:size-)?(min-|max-)?(block|inline)-(.+)$/,
8596
- ([, m, w, s], { theme: theme$2 }) => ({ [getPropName(m, w)]: getSizeValue(theme$2, w, s) }),
8558
+ ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(theme, w, s) }),
8597
8559
  { autocomplete: [
8598
8560
  "(w|h)-<num>",
8599
8561
  "(w|h)-(full|screen|fit|max|min)",
@@ -8606,7 +8568,7 @@ const sizes = [
8606
8568
  "(max|min)-(w|h|block|inline)-(full|screen|fit|max|min)"
8607
8569
  ] }
8608
8570
  ],
8609
- [/^(?:size-)?(min-|max-)?(h)-screen-(.+)$/, ([, m, h$1, p], context) => ({ [getPropName(m, h$1)]: handleBreakpoint(context, p, "verticalBreakpoint") })],
8571
+ [/^(?:size-)?(min-|max-)?(h)-screen-(.+)$/, ([, m, h, p], context) => ({ [getPropName(m, h)]: handleBreakpoint(context, p, "verticalBreakpoint") })],
8610
8572
  [
8611
8573
  /^(?:size-)?(min-|max-)?(w)-screen-(.+)$/,
8612
8574
  ([, m, w, p], context) => ({ [getPropName(m, w)]: handleBreakpoint(context, p) }),
@@ -8971,7 +8933,7 @@ const svgUtilities = [
8971
8933
  ],
8972
8934
  [
8973
8935
  /^fill-op(?:acity)?-?(.+)$/,
8974
- ([, opacity$1]) => ({ "--un-fill-opacity": h.bracket.percent.cssvar(opacity$1) }),
8936
+ ([, opacity]) => ({ "--un-fill-opacity": h.bracket.percent.cssvar(opacity) }),
8975
8937
  { autocomplete: "fill-(op|opacity)-<percent>" }
8976
8938
  ],
8977
8939
  ["fill-none", { fill: "none" }],
@@ -8989,7 +8951,7 @@ const svgUtilities = [
8989
8951
  ],
8990
8952
  [
8991
8953
  /^stroke-op(?:acity)?-?(.+)$/,
8992
- ([, opacity$1]) => ({ "--un-stroke-opacity": h.bracket.percent.cssvar(opacity$1) }),
8954
+ ([, opacity]) => ({ "--un-stroke-opacity": h.bracket.percent.cssvar(opacity) }),
8993
8955
  { autocomplete: "stroke-(op|opacity)-<percent>" }
8994
8956
  ],
8995
8957
  ["stroke-cap-square", { "stroke-linecap": "square" }],
@@ -9024,8 +8986,8 @@ const tables = [
9024
8986
  ["border-separate", { "border-collapse": "separate" }],
9025
8987
  [
9026
8988
  /^border-spacing-(.+)$/,
9027
- function* ([, s], { theme: theme$2 }) {
9028
- const v = resolveValue(s, theme$2);
8989
+ function* ([, s], { theme }) {
8990
+ const v = resolveValue(s, theme);
9029
8991
  if (v != null) {
9030
8992
  yield {
9031
8993
  "--un-border-spacing-x": v,
@@ -9042,14 +9004,14 @@ const tables = [
9042
9004
  ],
9043
9005
  [
9044
9006
  /^border-spacing-([xy])-(.+)$/,
9045
- function* ([, d, s], { theme: theme$2 }) {
9046
- const v = resolveValue(s, theme$2);
9007
+ function* ([, d, s], { theme }) {
9008
+ const v = resolveValue(s, theme);
9047
9009
  if (v != null) {
9048
9010
  yield {
9049
9011
  [`--un-border-spacing-${d}`]: v,
9050
9012
  "border-spacing": "var(--un-border-spacing-x) var(--un-border-spacing-y)"
9051
9013
  };
9052
- for (const d$1 of ["x", "y"]) yield defineProperty(`--un-border-spacing-${d$1}`, {
9014
+ for (const d of ["x", "y"]) yield defineProperty(`--un-border-spacing-${d}`, {
9053
9015
  syntax: "<length>",
9054
9016
  initialValue: "0"
9055
9017
  });
@@ -9064,8 +9026,8 @@ const tables = [
9064
9026
  ["table-empty-cells-visible", { "empty-cells": "show" }],
9065
9027
  ["table-empty-cells-hidden", { "empty-cells": "hide" }]
9066
9028
  ];
9067
- function resolveValue(s, theme$2) {
9068
- let v = theme$2.spacing?.[s];
9029
+ function resolveValue(s, theme) {
9030
+ let v = theme.spacing?.[s];
9069
9031
  if (!v) {
9070
9032
  const num = numberResolver(s);
9071
9033
  if (num != null) {
@@ -9134,9 +9096,9 @@ const transforms = [
9134
9096
  ],
9135
9097
  [
9136
9098
  /^(transform-)?perspect(?:ive)?-(.+)$/,
9137
- ([, t, s], { theme: theme$2 }) => {
9099
+ ([, t, s], { theme }) => {
9138
9100
  let v;
9139
- if (theme$2.perspective?.[s]) {
9101
+ if (theme.perspective?.[s]) {
9140
9102
  themeTracking(`perspective`, s);
9141
9103
  v = generateThemeVariable("perspective", s);
9142
9104
  } else v = h.bracket.cssvar.px.numberWithUnit(s);
@@ -9197,7 +9159,7 @@ function handleTranslate([, d, b]) {
9197
9159
  "x",
9198
9160
  "y",
9199
9161
  "z"
9200
- ].map((d$1) => defineProperty(`--un-translate-${d$1}`, { initialValue: 0 }))];
9162
+ ].map((d) => defineProperty(`--un-translate-${d}`, { initialValue: 0 }))];
9201
9163
  }
9202
9164
  }
9203
9165
  function handleScale([, d, b]) {
@@ -9208,7 +9170,7 @@ function handleScale([, d, b]) {
9208
9170
  "x",
9209
9171
  "y",
9210
9172
  "z"
9211
- ].map((d$1) => defineProperty(`--un-scale-${d$1}`, { initialValue: 1 }))];
9173
+ ].map((d) => defineProperty(`--un-scale-${d}`, { initialValue: 1 }))];
9212
9174
  }
9213
9175
  }
9214
9176
  function handleRotate([, d = "", b]) {
@@ -9221,8 +9183,8 @@ function handleRotate([, d = "", b]) {
9221
9183
  "x",
9222
9184
  "y",
9223
9185
  "z"
9224
- ].map((d$1) => defineProperty(`--un-rotate-${d$1}`, { initialValue: `rotate${d$1.toUpperCase()}(0)` })),
9225
- ...["x", "y"].map((d$1) => defineProperty(`--un-skew-${d$1}`, { initialValue: `skew${d$1.toUpperCase()}(0)` }))
9186
+ ].map((d) => defineProperty(`--un-rotate-${d}`, { initialValue: `rotate${d.toUpperCase()}(0)` })),
9187
+ ...["x", "y"].map((d) => defineProperty(`--un-skew-${d}`, { initialValue: `skew${d.toUpperCase()}(0)` }))
9226
9188
  ];
9227
9189
  else return { rotate: h.bracket.cssvar.degree(b) };
9228
9190
  }
@@ -9236,37 +9198,37 @@ function handleSkew([, d, b]) {
9236
9198
  "x",
9237
9199
  "y",
9238
9200
  "z"
9239
- ].map((d$1) => defineProperty(`--un-rotate-${d$1}`, { initialValue: `rotate${d$1.toUpperCase()}(0)` })),
9240
- ...["x", "y"].map((d$1) => defineProperty(`--un-skew-${d$1}`, { initialValue: `skew${d$1.toUpperCase()}(0)` }))
9201
+ ].map((d) => defineProperty(`--un-rotate-${d}`, { initialValue: `rotate${d.toUpperCase()}(0)` })),
9202
+ ...["x", "y"].map((d) => defineProperty(`--un-skew-${d}`, { initialValue: `skew${d.toUpperCase()}(0)` }))
9241
9203
  ];
9242
9204
  }
9243
9205
  function transformXYZ(d, v, name) {
9244
9206
  const values = v.split(splitComma);
9245
9207
  if (d || !d && values.length === 1) return xyzMap[d].map((i) => [`--un-${name}${i}`, v]);
9246
- return values.map((v$1, i) => [`--un-${name}-${xyzArray[i]}`, v$1]);
9208
+ return values.map((v, i) => [`--un-${name}-${xyzArray[i]}`, v]);
9247
9209
  }
9248
- function resolveTransitionProperty(prop, theme$2) {
9210
+ function resolveTransitionProperty(prop, theme) {
9249
9211
  let p;
9250
9212
  if (h.cssvar(prop) != null) p = h.cssvar(prop);
9251
9213
  else {
9252
9214
  if (prop.startsWith("[") && prop.endsWith("]")) prop = prop.slice(1, -1);
9253
- const props = prop.split(",").map((p$1) => theme$2.property?.[p$1] ?? h.properties(p$1));
9215
+ const props = prop.split(",").map((p) => theme.property?.[p] ?? h.properties(p));
9254
9216
  if (props.every(Boolean)) p = props.join(",");
9255
9217
  }
9256
9218
  return p;
9257
9219
  }
9258
9220
  const transitions = [
9259
- [/^transition(?:-(\D+?))?(?:-(\d+))?$/, ([, prop, d], { theme: theme$2 }) => {
9221
+ [/^transition(?:-(\D+?))?(?:-(\d+))?$/, ([, prop, d], { theme }) => {
9260
9222
  themeTracking("default", ["transition", "timingFunction"]);
9261
9223
  themeTracking("default", ["transition", "duration"]);
9262
9224
  const defaultTransition = {
9263
- "transition-property": theme$2.property?.DEFAULT,
9225
+ "transition-property": theme.property?.DEFAULT,
9264
9226
  "transition-timing-function": `var(--un-ease, ${generateThemeVariable("default", ["transition", "timingFunction"])})`,
9265
9227
  "transition-duration": `var(--un-duration, ${generateThemeVariable("default", ["transition", "duration"])})`
9266
9228
  };
9267
9229
  if (!prop && !d) return { ...defaultTransition };
9268
9230
  else if (prop != null) {
9269
- const p = resolveTransitionProperty(prop, theme$2);
9231
+ const p = resolveTransitionProperty(prop, theme);
9270
9232
  if (p) return {
9271
9233
  "--un-duration": d && h.time(d),
9272
9234
  ...defaultTransition,
@@ -9284,9 +9246,9 @@ const transitions = [
9284
9246
  [/^(?:transition-)?delay-(.+)$/, ([, d]) => ({ "transition-delay": h.bracket.cssvar.time(d) })],
9285
9247
  [
9286
9248
  /^(?:transition-)?ease(?:-(.+))?$/,
9287
- ([, d = "DEFAULT"], { theme: theme$2 }) => {
9249
+ ([, d = "DEFAULT"], { theme }) => {
9288
9250
  let v;
9289
- if (theme$2.ease?.[d]) {
9251
+ if (theme.ease?.[d]) {
9290
9252
  themeTracking("ease", d);
9291
9253
  v = generateThemeVariable("ease", d);
9292
9254
  } else v = h.bracket.cssvar(d);
@@ -9299,8 +9261,8 @@ const transitions = [
9299
9261
  ],
9300
9262
  [
9301
9263
  /^(?:transition-)?property-(.+)$/,
9302
- ([, v], { theme: theme$2 }) => {
9303
- const p = h.global(v) || resolveTransitionProperty(v, theme$2);
9264
+ ([, v], { theme }) => {
9265
+ const p = h.global(v) || resolveTransitionProperty(v, theme);
9304
9266
  if (p) return { "transition-property": p };
9305
9267
  },
9306
9268
  { autocomplete: [`transition-property-(${[...globalKeywords].join("|")})`] }
@@ -9334,14 +9296,14 @@ const fonts = [
9334
9296
  ],
9335
9297
  [
9336
9298
  /^(?:text|color|c)-op(?:acity)?-?(.+)$/,
9337
- ([, opacity$1]) => ({ "--un-text-opacity": h.bracket.percent.cssvar(opacity$1) }),
9299
+ ([, opacity]) => ({ "--un-text-opacity": h.bracket.percent.cssvar(opacity) }),
9338
9300
  { autocomplete: "(text|color|c)-(op|opacity)-<percent>" }
9339
9301
  ],
9340
9302
  [
9341
9303
  /^fw-?([^-]+)$/,
9342
- ([, s], { theme: theme$2 }) => {
9304
+ ([, s], { theme }) => {
9343
9305
  let v;
9344
- if (theme$2.fontWeight?.[s]) {
9306
+ if (theme.fontWeight?.[s]) {
9345
9307
  themeTracking(`fontWeight`, s);
9346
9308
  v = generateThemeVariable("fontWeight", s);
9347
9309
  } else v = h.bracket.cssvar.global.number(s);
@@ -9354,9 +9316,9 @@ const fonts = [
9354
9316
  ],
9355
9317
  [
9356
9318
  /^(?:font-)?(?:leading|lh|line-height)-(.+)$/,
9357
- ([, s], { theme: theme$2 }) => {
9319
+ ([, s], { theme }) => {
9358
9320
  let v;
9359
- if (theme$2.leading?.[s]) {
9321
+ if (theme.leading?.[s]) {
9360
9322
  themeTracking("leading", s);
9361
9323
  v = generateThemeVariable("leading", s);
9362
9324
  } else if (numberResolver(s)) {
@@ -9377,9 +9339,9 @@ const fonts = [
9377
9339
  [/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis": h.bracket.cssvar.global(s) })],
9378
9340
  [
9379
9341
  /^(?:font-)?tracking-(.+)$/,
9380
- ([, s], { theme: theme$2 }) => {
9342
+ ([, s], { theme }) => {
9381
9343
  let v;
9382
- if (theme$2.tracking?.[s]) {
9344
+ if (theme.tracking?.[s]) {
9383
9345
  themeTracking(`tracking`, s);
9384
9346
  v = generateThemeVariable("tracking", s);
9385
9347
  } else v = h.bracket.cssvar.global.rem(s);
@@ -9392,8 +9354,8 @@ const fonts = [
9392
9354
  ],
9393
9355
  [
9394
9356
  /^(?:font-)?word-spacing-(.+)$/,
9395
- ([, s], { theme: theme$2 }) => {
9396
- const v = theme$2.tracking?.[s] ? generateThemeVariable("tracking", s) : h.bracket.cssvar.global.rem(s);
9357
+ ([, s], { theme }) => {
9358
+ const v = theme.tracking?.[s] ? generateThemeVariable("tracking", s) : h.bracket.cssvar.global.rem(s);
9397
9359
  return {
9398
9360
  "--un-word-spacing": v,
9399
9361
  "word-spacing": v
@@ -9417,14 +9379,14 @@ const fonts = [
9417
9379
  ],
9418
9380
  [
9419
9381
  /^font-(.+)$/,
9420
- ([, d], { theme: theme$2 }) => {
9382
+ ([, d], { theme }) => {
9421
9383
  let v;
9422
- if (theme$2.font?.[d]) {
9384
+ if (theme.font?.[d]) {
9423
9385
  themeTracking("font", d);
9424
9386
  v = generateThemeVariable("font", d);
9425
9387
  return { "font-family": v };
9426
9388
  }
9427
- if (theme$2.fontWeight?.[d]) {
9389
+ if (theme.fontWeight?.[d]) {
9428
9390
  themeTracking("fontWeight", d);
9429
9391
  v = generateThemeVariable("fontWeight", d);
9430
9392
  return {
@@ -9484,9 +9446,9 @@ const textIndents = [[/^indent-(.+)$/, ([, s]) => {
9484
9446
  const textStrokes = [
9485
9447
  [
9486
9448
  /^text-stroke(?:-(.+))?$/,
9487
- ([, s = "DEFAULT"], { theme: theme$2 }) => {
9488
- if (theme$2.textStrokeWidth?.[s]) themeTracking(`textStrokeWidth`, s);
9489
- return { "-webkit-text-stroke-width": theme$2.textStrokeWidth?.[s] ? generateThemeVariable("textStrokeWidth", s) : h.bracket.cssvar.px(s) };
9449
+ ([, s = "DEFAULT"], { theme }) => {
9450
+ if (theme.textStrokeWidth?.[s]) themeTracking(`textStrokeWidth`, s);
9451
+ return { "-webkit-text-stroke-width": theme.textStrokeWidth?.[s] ? generateThemeVariable("textStrokeWidth", s) : h.bracket.cssvar.px(s) };
9490
9452
  },
9491
9453
  { autocomplete: "text-stroke-$textStrokeWidth" }
9492
9454
  ],
@@ -9497,18 +9459,18 @@ const textStrokes = [
9497
9459
  ],
9498
9460
  [
9499
9461
  /^text-stroke-op(?:acity)?-?(.+)$/,
9500
- ([, opacity$1]) => ({ "--un-text-stroke-opacity": h.bracket.percent.cssvar(opacity$1) }),
9462
+ ([, opacity]) => ({ "--un-text-stroke-opacity": h.bracket.percent.cssvar(opacity) }),
9501
9463
  { autocomplete: "text-stroke-(op|opacity)-<percent>" }
9502
9464
  ]
9503
9465
  ];
9504
9466
  function handleTextShadow(match, ctx) {
9505
9467
  const [, s] = match;
9506
- const { theme: theme$2 } = ctx;
9468
+ const { theme } = ctx;
9507
9469
  let res = [];
9508
9470
  if (s) res = getStringComponents(s, "/", 2) ?? [];
9509
- const v = theme$2.textShadow?.[res[0]];
9471
+ const v = theme.textShadow?.[res[0]];
9510
9472
  const c = s ? h.bracket.cssvar(s) : void 0;
9511
- if ((v != null || c != null) && !hasParseableColor(c, theme$2)) {
9473
+ if ((v != null || c != null) && !hasParseableColor(c, theme)) {
9512
9474
  const alpha = res[1] ? h.bracket.percent.cssvar(res[1]) : void 0;
9513
9475
  return {
9514
9476
  "--un-text-shadow-opacity": alpha,
@@ -9535,7 +9497,7 @@ const textShadows = [
9535
9497
  ],
9536
9498
  [
9537
9499
  /^text-shadow(?:-color)?-op(?:acity)?-?(.+)$/,
9538
- ([, opacity$1]) => ({ "--un-text-shadow-opacity": h.bracket.percent.cssvar(opacity$1) }),
9500
+ ([, opacity]) => ({ "--un-text-shadow-opacity": h.bracket.percent.cssvar(opacity) }),
9539
9501
  { autocomplete: "text-shadow(-color)?-(op|opacity)-<percent>" }
9540
9502
  ]
9541
9503
  ];
@@ -9582,16 +9544,16 @@ const fontVariantNumeric = [
9582
9544
  }, ...fontVariantNumericProperties]],
9583
9545
  ["normal-nums", [{ "font-variant-numeric": "normal" }]]
9584
9546
  ];
9585
- function handleText([, s = "base"], { theme: theme$2 }) {
9547
+ function handleText([, s = "base"], { theme }) {
9586
9548
  const split = splitShorthand(s, "length");
9587
9549
  if (!split) return;
9588
- const [size, leading$1] = split;
9589
- const sizePairs = theme$2.text?.[size];
9550
+ const [size, leading] = split;
9551
+ const sizePairs = theme.text?.[size];
9590
9552
  let lineHeight;
9591
- if (leading$1) if (theme$2.leading?.[leading$1]) {
9592
- themeTracking(`leading`, leading$1);
9593
- lineHeight = generateThemeVariable("leading", leading$1);
9594
- } else lineHeight = h.bracket.cssvar.global.rem(leading$1);
9553
+ if (leading) if (theme.leading?.[leading]) {
9554
+ themeTracking(`leading`, leading);
9555
+ lineHeight = generateThemeVariable("leading", leading);
9556
+ } else lineHeight = h.bracket.cssvar.global.rem(leading);
9595
9557
  if (sizePairs) {
9596
9558
  themeTracking(`text`, [size, "fontSize"]);
9597
9559
  themeTracking(`text`, [size, "lineHeight"]);
@@ -9609,8 +9571,8 @@ function handleText([, s = "base"], { theme: theme$2 }) {
9609
9571
  };
9610
9572
  return { "font-size": h.bracketOfLength.rem(s) };
9611
9573
  }
9612
- function handleSize([, s], { theme: theme$2 }) {
9613
- if (theme$2.text?.[s] != null) {
9574
+ function handleSize([, s], { theme }) {
9575
+ if (theme.text?.[s] != null) {
9614
9576
  themeTracking(`text`, [s, "fontSize"]);
9615
9577
  themeTracking(`text`, [s, "lineHeight"]);
9616
9578
  return {
@@ -9664,12 +9626,12 @@ const cssVariables = [[/^(.+?)-(\$.+)$/, ([, name, varname]) => {
9664
9626
  const prop = variablesAbbrMap[name];
9665
9627
  if (prop) return { [prop]: h.cssvar(varname) };
9666
9628
  }]];
9667
- const cssProperty = [[/^\[(.*)\]$/, ([_, body], { theme: theme$2 }) => {
9629
+ const cssProperty = [[/^\[(.*)\]$/, ([_, body], { theme }) => {
9668
9630
  if (!body.includes(":")) return;
9669
9631
  const [prop, ...rest] = body.split(":");
9670
9632
  const value = rest.join(":");
9671
9633
  if (!isURI(body) && /^[\w-]+$/.test(prop) && isValidCSSBody(value)) {
9672
- const parsed = h.bracket(`[${value}]`, theme$2);
9634
+ const parsed = h.bracket(`[${value}]`, theme);
9673
9635
  if (parsed) return { [prop]: parsed };
9674
9636
  }
9675
9637
  }]];
@@ -9700,9 +9662,6 @@ function isURI(declaration) {
9700
9662
  return false;
9701
9663
  }
9702
9664
  }
9703
- const viewTransition = [[/^view-transition-([\w-]+)$/, ([, name]) => {
9704
- return { "view-transition-name": name };
9705
- }]];
9706
9665
  const rules = [
9707
9666
  fonts,
9708
9667
  tabSizes,
@@ -9791,19 +9750,19 @@ const rules = [
9791
9750
  tables,
9792
9751
  touchActions,
9793
9752
  fontVariantNumeric,
9794
- viewTransition,
9753
+ [[/^view-transition-([\w-]+)$/, ([, name]) => {
9754
+ return { "view-transition-name": name };
9755
+ }]],
9795
9756
  spaces,
9796
9757
  divides,
9797
9758
  fieldSizing,
9798
9759
  questionMark
9799
9760
  ].flat();
9800
-
9801
9761
  //#endregion
9802
9762
  //#region ../../packages-presets/preset-wind4/dist/shortcuts.mjs
9803
9763
  const shortcuts = [...containerShortcuts];
9804
-
9805
9764
  //#endregion
9806
- //#region ../../packages-presets/preset-wind4/dist/colors-DfOpBqNN.mjs
9765
+ //#region ../../packages-presets/preset-wind4/dist/colors-DSN24uxs.mjs
9807
9766
  const colors = {
9808
9767
  black: "#000",
9809
9768
  white: "#fff",
@@ -10175,7 +10134,6 @@ const colors = {
10175
10134
  Object.values(colors).forEach((color) => {
10176
10135
  if (typeof color !== "string" && color !== void 0) color.DEFAULT = color.DEFAULT || color[400];
10177
10136
  });
10178
-
10179
10137
  //#endregion
10180
10138
  //#region ../../packages-presets/preset-wind4/dist/theme.mjs
10181
10139
  const animation = {
@@ -10726,47 +10684,6 @@ const breakpoint = {
10726
10684
  };
10727
10685
  const verticalBreakpoint = { ...breakpoint };
10728
10686
  const supports = { grid: "(display: grid)" };
10729
- const ease = {
10730
- "linear": "linear",
10731
- "in": "cubic-bezier(0.4, 0, 1, 1)",
10732
- "out": "cubic-bezier(0, 0, 0.2, 1)",
10733
- "in-out": "cubic-bezier(0.4, 0, 0.2, 1)",
10734
- "DEFAULT": "cubic-bezier(0.4, 0, 0.2, 1)"
10735
- };
10736
- const property$1 = {
10737
- none: "none",
10738
- all: "all",
10739
- colors: [
10740
- "color",
10741
- "background-color",
10742
- "border-color",
10743
- "text-decoration-color",
10744
- "fill",
10745
- "stroke",
10746
- "--un-gradient-from",
10747
- "--un-gradient-via",
10748
- "--un-gradient-to"
10749
- ].join(","),
10750
- opacity: "opacity",
10751
- shadow: "box-shadow",
10752
- transform: [
10753
- "transform",
10754
- "translate",
10755
- "scale",
10756
- "rotate"
10757
- ].join(","),
10758
- get DEFAULT() {
10759
- return [
10760
- this.colors,
10761
- this.opacity,
10762
- this.shadow,
10763
- this.transform,
10764
- "filter",
10765
- "-webkit-backdrop-filter",
10766
- "backdrop-filter"
10767
- ].join(",");
10768
- }
10769
- };
10770
10687
  const theme = {
10771
10688
  font,
10772
10689
  colors,
@@ -10783,30 +10700,68 @@ const theme = {
10783
10700
  insetShadow,
10784
10701
  dropShadow,
10785
10702
  textShadow,
10786
- ease,
10703
+ ease: {
10704
+ "linear": "linear",
10705
+ "in": "cubic-bezier(0.4, 0, 1, 1)",
10706
+ "out": "cubic-bezier(0, 0, 0.2, 1)",
10707
+ "in-out": "cubic-bezier(0.4, 0, 0.2, 1)",
10708
+ "DEFAULT": "cubic-bezier(0.4, 0, 0.2, 1)"
10709
+ },
10787
10710
  animation,
10788
10711
  blur,
10789
10712
  perspective,
10790
- property: property$1,
10713
+ property: {
10714
+ none: "none",
10715
+ all: "all",
10716
+ colors: [
10717
+ "color",
10718
+ "background-color",
10719
+ "border-color",
10720
+ "text-decoration-color",
10721
+ "fill",
10722
+ "stroke",
10723
+ "--un-gradient-from",
10724
+ "--un-gradient-via",
10725
+ "--un-gradient-to"
10726
+ ].join(","),
10727
+ opacity: "opacity",
10728
+ shadow: "box-shadow",
10729
+ transform: [
10730
+ "transform",
10731
+ "translate",
10732
+ "scale",
10733
+ "rotate"
10734
+ ].join(","),
10735
+ get DEFAULT() {
10736
+ return [
10737
+ this.colors,
10738
+ this.opacity,
10739
+ this.shadow,
10740
+ this.transform,
10741
+ "filter",
10742
+ "-webkit-backdrop-filter",
10743
+ "backdrop-filter"
10744
+ ].join(",");
10745
+ }
10746
+ },
10791
10747
  default: defaults,
10792
10748
  container,
10793
10749
  aria,
10794
10750
  media,
10795
10751
  supports
10796
10752
  };
10797
-
10798
10753
  //#endregion
10799
- //#region ../../packages-presets/preset-wind4/dist/variants-Dae_1bdw.mjs
10754
+ //#region ../../packages-presets/preset-wind4/dist/variants-B5PDncV-.mjs
10800
10755
  const variantAria = {
10801
10756
  name: "aria",
10802
10757
  match(matcher, ctx) {
10803
10758
  const variant = variantGetParameter("aria-", matcher, ctx.generator.config.separators);
10804
10759
  if (variant) {
10805
10760
  const [match, rest] = variant;
10806
- const aria$1 = h.bracket(match) ?? ctx.theme.aria?.[match] ?? "";
10807
- if (aria$1) return {
10761
+ const aria = h.bracket(match) ?? ctx.theme.aria?.[match] ?? "";
10762
+ if (aria) return {
10808
10763
  matcher: rest,
10809
- selector: (s) => `${s}[aria-${aria$1}]`
10764
+ selector: (s) => `${s}[aria-${aria}]`
10810
10765
  };
10811
10766
  }
10812
10767
  },
@@ -10874,7 +10829,7 @@ function variantBreakpoints() {
10874
10829
  idx
10875
10830
  ]);
10876
10831
  for (const [point, size, idx] of variantEntries) {
10877
- if (!regexCache[point]) regexCache[point] = /* @__PURE__ */ new RegExp(`^((?:([al]t-|[<~]|max-))?${point}(?:${context.generator.config.separators.join("|")}))`);
10832
+ if (!regexCache[point]) regexCache[point] = new RegExp(`^((?:([al]t-|[<~]|max-))?${point}(?:${context.generator.config.separators.join("|")}))`);
10878
10833
  const match = matcher.match(regexCache[point]);
10879
10834
  if (!match) continue;
10880
10835
  const [, pre] = match;
@@ -10958,17 +10913,17 @@ const variantContainerQuery = {
10958
10913
  if (variant) {
10959
10914
  const [match, rest, label] = variant;
10960
10915
  const unbracket = h.bracket(match);
10961
- let container$2;
10962
- if (unbracket) container$2 = h.numberWithUnit(unbracket);
10963
- else container$2 = ctx.theme.container?.[match] ?? "";
10964
- if (container$2) {
10916
+ let container;
10917
+ if (unbracket) container = h.numberWithUnit(unbracket);
10918
+ else container = ctx.theme.container?.[match] ?? "";
10919
+ if (container) {
10965
10920
  let order = 1e3 + Object.keys(ctx.theme.container ?? {}).indexOf(match);
10966
10921
  if (label) order += 1e3;
10967
10922
  return {
10968
10923
  matcher: rest,
10969
10924
  handle: (input, next) => next({
10970
10925
  ...input,
10971
- parent: `${input.parent ? `${input.parent} $$ ` : ""}@container${label ? ` ${label} ` : " "}(min-width: ${container$2})`,
10926
+ parent: `${input.parent ? `${input.parent} $$ ` : ""}@container${label ? ` ${label} ` : " "}(min-width: ${container})`,
10972
10927
  parentOrder: order
10973
10928
  })
10974
10929
  };
@@ -11051,7 +11006,7 @@ function variantImportant() {
11051
11006
  return {
11052
11007
  name: "important",
11053
11008
  match(matcher, ctx) {
11054
- if (!re) re = /* @__PURE__ */ new RegExp(`^(important(?:${ctx.generator.config.separators.join("|")})|!)`);
11009
+ if (!re) re = new RegExp(`^(important(?:${ctx.generator.config.separators.join("|")})|!)`);
11055
11010
  let base;
11056
11011
  const match = matcher.match(re);
11057
11012
  if (match) base = matcher.slice(match[0].length);
@@ -11102,13 +11057,13 @@ const variantCustomMedia = {
11102
11057
  const variant = variantGetParameter("media-", matcher, ctx.generator.config.separators);
11103
11058
  if (variant) {
11104
11059
  const [match, rest] = variant;
11105
- let media$1 = h.bracket(match) ?? "";
11106
- if (media$1 === "") media$1 = ctx.theme.media?.[match] ?? "";
11107
- if (media$1) return {
11060
+ let media = h.bracket(match) ?? "";
11061
+ if (media === "") media = ctx.theme.media?.[match] ?? "";
11062
+ if (media) return {
11108
11063
  matcher: rest,
11109
11064
  handle: (input, next) => next({
11110
11065
  ...input,
11111
- parent: `${input.parent ? `${input.parent} $$ ` : ""}@media ${media$1}`
11066
+ parent: `${input.parent ? `${input.parent} $$ ` : ""}@media ${media}`
11112
11067
  })
11113
11068
  };
11114
11069
  }
@@ -11284,12 +11239,12 @@ const variantNegative = {
11284
11239
  return {
11285
11240
  matcher: matcher.slice(1),
11286
11241
  body: (body) => {
11287
- if (body.find((v) => v[0] === CONTROL_NO_NEGATIVE)) return;
11242
+ if (body.some((v) => v[0] === "$$mini-no-negative")) return;
11288
11243
  let changed = false;
11289
11244
  for (const v of body) {
11290
11245
  const [prop, rawValue, meta] = v;
11291
11246
  if (typeof rawValue === "object") continue;
11292
- if (meta && toArray(meta).includes(CONTROL_NO_NEGATIVE)) continue;
11247
+ if (meta && toArray(meta).includes("$$mini-no-negative")) continue;
11293
11248
  const value = rawValue?.toString();
11294
11249
  if (!value || value === "0" || ignoreProps.some((i) => i.test(prop))) continue;
11295
11250
  const nextValue = negateMathFunction(value) ?? negateFunctionBody(value) ?? (anchoredNumberRE.test(value) ? value.replace(numberRE, (i) => i.startsWith("-") ? i.slice(1) : `-${i}`) : void 0);
@@ -11303,11 +11258,11 @@ const variantNegative = {
11303
11258
  };
11304
11259
  }
11305
11260
  };
11306
- const placeholderModifier = (input, { theme: theme$2 }) => {
11261
+ const placeholderModifier = (input, { theme }) => {
11307
11262
  const m = input.match(/^(.*)\b(placeholder-)(.+)$/);
11308
11263
  if (m) {
11309
11264
  const [, pre = "", p, body] = m;
11310
- if (hasParseableColor(body, theme$2) || hasOpacityValue(body)) return { matcher: `${pre}placeholder-$ ${p}${body}` };
11265
+ if (hasParseableColor(body, theme) || hasOpacityValue(body)) return { matcher: `${pre}placeholder-$ ${p}${body}` };
11311
11266
  }
11312
11267
  };
11313
11268
  function hasOpacityValue(body) {
@@ -11356,15 +11311,15 @@ const variantSupports = {
11356
11311
  const variant = variantGetParameter("supports-", matcher, ctx.generator.config.separators);
11357
11312
  if (variant) {
11358
11313
  const [match, rest] = variant;
11359
- let supports$1 = h.bracket(match) ?? "";
11360
- if (supports$1 === "") supports$1 = ctx.theme.supports?.[match] ?? "";
11361
- if (supports$1) {
11362
- if (!(supports$1.startsWith("(") && supports$1.endsWith(")"))) supports$1 = `(${supports$1})`;
11314
+ let supports = h.bracket(match) ?? "";
11315
+ if (supports === "") supports = ctx.theme.supports?.[match] ?? "";
11316
+ if (supports) {
11317
+ if (!(supports.startsWith("(") && supports.endsWith(")"))) supports = `(${supports})`;
11363
11318
  return {
11364
11319
  matcher: rest,
11365
11320
  handle: (input, next) => next({
11366
11321
  ...input,
11367
- parent: `${input.parent ? `${input.parent} $$ ` : ""}@supports ${supports$1}`
11322
+ parent: `${input.parent ? `${input.parent} $$ ` : ""}@supports ${supports}`
11368
11323
  })
11369
11324
  };
11370
11325
  }
@@ -11414,7 +11369,6 @@ function variants(options) {
11414
11369
  variantImplicitGroup
11415
11370
  ].flat();
11416
11371
  }
11417
-
11418
11372
  //#endregion
11419
11373
  //#region ../../packages-presets/extractor-arbitrary-variants/dist/index.mjs
11420
11374
  function hash(str) {
@@ -11474,7 +11428,6 @@ function extractorArbitraryVariants() {
11474
11428
  }
11475
11429
  };
11476
11430
  }
11477
-
11478
11431
  //#endregion
11479
11432
  //#region ../../packages-presets/preset-wind4/dist/index.mjs
11480
11433
  function property(options) {
@@ -11482,10 +11435,11 @@ function property(options) {
11482
11435
  const propertyConfig = typeof options.preflights?.property === "object" ? options.preflights.property : void 0;
11483
11436
  const parentSelector = propertyConfig?.parent !== void 0 ? propertyConfig.parent : "@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))";
11484
11437
  const selector = propertyConfig?.selector ?? "*, ::before, ::after, ::backdrop";
11438
+ const prefix = options.variablePrefix ?? "un-";
11485
11439
  return {
11486
11440
  getCSS: () => {
11487
11441
  if (trackedProperties.size === 0) return;
11488
- const css = Array.from(trackedProperties.entries()).map(([property$1$1, value]) => `${property$1$1}:${value};`).join("");
11442
+ const css = Array.from(trackedProperties.entries()).map(([property, value]) => `${property.replace(/^--un-/, `--${prefix}`)}:${value};`).join("");
11489
11443
  return parentSelector === false ? `${selector}{${css}}` : `${parentSelector}{${selector}{${css}}}`;
11490
11444
  },
11491
11445
  layer: "properties"
@@ -11915,17 +11869,17 @@ const ExcludeCssVarKeys = [
11915
11869
  "supports",
11916
11870
  "containers"
11917
11871
  ];
11918
- function getThemeVarsMap(theme$2, keys) {
11919
- const themeMap = new Map([["--spacing", theme$2.spacing.DEFAULT]]);
11872
+ function getThemeVarsMap(theme, keys) {
11873
+ const themeMap = new Map([["--spacing", theme.spacing.DEFAULT]]);
11920
11874
  const normalizeValue = (value) => value.replace(alphaPlaceholdersRE, "1");
11921
- function process$2(obj, prefix) {
11875
+ function process(obj, prefix) {
11922
11876
  for (const key in obj) if (Array.isArray(obj[key])) themeMap.set(`--${prefix}-${key}`, normalizeValue(obj[key].join(",")));
11923
- else if (typeof obj[key] === "object") process$2(obj[key], `${prefix}-${key}`);
11877
+ else if (typeof obj[key] === "object") process(obj[key], `${prefix}-${key}`);
11924
11878
  else themeMap.set(`--${prefix}-${key}`, normalizeValue(obj[key]));
11925
11879
  }
11926
- for (const key in theme$2) {
11880
+ for (const key in theme) {
11927
11881
  if (!keys.includes(key)) continue;
11928
- process$2(theme$2[key], key);
11882
+ process(theme[key], key);
11929
11883
  }
11930
11884
  return themeMap;
11931
11885
  }
@@ -11937,25 +11891,25 @@ function theme$1(options) {
11937
11891
  return {
11938
11892
  layer: "theme",
11939
11893
  getCSS(ctx) {
11940
- const { theme: theme$2, generator } = ctx;
11894
+ const { theme, generator } = ctx;
11941
11895
  const safelist = uniq(generator.config.safelist.flatMap((s) => typeof s === "function" ? s(ctx) : s));
11942
- const { mode, process: process$2 } = preflightsTheme;
11896
+ const { mode, process } = preflightsTheme;
11943
11897
  if (mode === false) return;
11944
11898
  if (safelist.length > 0) for (const s of safelist) {
11945
11899
  const [key, ...prop] = s.trim().split(":");
11946
- if (key in theme$2 && prop.length <= 1) {
11900
+ if (key in theme && prop.length <= 1) {
11947
11901
  const props = prop.length === 0 ? ["DEFAULT"] : prop[0].split("-");
11948
- const v = getThemeByKey(theme$2, key, props);
11902
+ const v = getThemeByKey(theme, key, props);
11949
11903
  if (typeof v === "string") {
11950
11904
  themeTracking(key, props);
11951
- detectThemeValue(v, theme$2);
11905
+ detectThemeValue(v, theme);
11952
11906
  }
11953
11907
  }
11954
11908
  }
11955
11909
  let deps;
11956
- const generateCSS = (deps$1) => {
11957
- if (process$2) for (const utility of deps$1) for (const p of toArray(process$2)) p(utility, ctx);
11958
- const resolvedDeps = deps$1.map(([key, value]) => key && value ? `${escapeSelector(key)}: ${value};` : void 0).filter(Boolean);
11910
+ const generateCSS = (deps) => {
11911
+ if (process) for (const utility of deps) for (const p of toArray(process)) p(utility, ctx);
11912
+ const resolvedDeps = deps.map(([key, value]) => key && value ? `${escapeSelector(key)}: ${value};` : void 0).filter(Boolean);
11959
11913
  if (resolvedDeps.length === 0) return;
11960
11914
  return compressCSS(`
11961
11915
  :root, :host {
@@ -11966,12 +11920,12 @@ ${resolvedDeps.join("\n")}
11966
11920
  if (trackedTheme.size === 0) return void 0;
11967
11921
  deps = Array.from(trackedTheme).map((k) => {
11968
11922
  const [key, prop] = k.split(":");
11969
- const v = getThemeByKey(theme$2, key, prop.split("-"));
11923
+ const v = getThemeByKey(theme, key, prop.split("-"));
11970
11924
  if (typeof v === "string") return [`--${key}${`${key === "spacing" && prop === "DEFAULT" ? "" : `-${prop}`}`}`, v];
11971
11925
  }).filter(Boolean);
11972
11926
  } else {
11973
- const keys = Object.keys(theme$2).filter((k) => !ExcludeCssVarKeys.includes(k));
11974
- deps = Array.from(getThemeVarsMap(theme$2, keys));
11927
+ const keys = Object.keys(theme).filter((k) => !ExcludeCssVarKeys.includes(k));
11928
+ deps = Array.from(getThemeVarsMap(theme, keys));
11975
11929
  }
11976
11930
  return generateCSS(deps);
11977
11931
  }
@@ -12026,8 +11980,6 @@ const presetWind4 = definePreset((options = {}) => {
12026
11980
  }
12027
11981
  };
12028
11982
  });
12029
- var src_default = presetWind4;
12030
-
12031
11983
  //#endregion
12032
11984
  //#region ../nuxt/src/options.ts
12033
11985
  function resolveOptions(options) {
@@ -12039,12 +11991,12 @@ function resolveOptions(options) {
12039
11991
  options.presets = [];
12040
11992
  const presetMap = {
12041
11993
  wind3: presetWind3,
12042
- wind4: src_default,
12043
- attributify: src_default$5,
12044
- icons: src_default$4,
12045
- webFonts: src_default$1,
12046
- typography: src_default$2,
12047
- tagify: src_default$3
11994
+ wind4: presetWind4,
11995
+ attributify: presetAttributify,
11996
+ icons: presetIcons,
11997
+ webFonts: presetWebFonts,
11998
+ typography: presetTypography,
11999
+ tagify: presetTagify
12048
12000
  };
12049
12001
  for (const [key, preset] of Object.entries(presetMap)) {
12050
12002
  const option = options[key];
@@ -12058,7 +12010,6 @@ function resolveOptions(options) {
12058
12010
  if (Array.isArray(options.content.pipeline.exclude)) options.content.pipeline.exclude.push(/\?macro=true/);
12059
12011
  }
12060
12012
  }
12061
-
12062
12013
  //#endregion
12063
12014
  //#region src/utils/position.ts
12064
12015
  const styleTagsRe = /<style[^>]*>[\s\S]*?(?:<\/style>|<\/>)/g;
@@ -12080,7 +12031,6 @@ function isSubdir(parent, child) {
12080
12031
  const relative = path.relative(parent, child);
12081
12032
  return relative && !relative.startsWith("..") && !path.isAbsolute(relative);
12082
12033
  }
12083
-
12084
12034
  //#endregion
12085
12035
  //#region src/core/context.ts
12086
12036
  const frameworkConfigRE = /^(?:vite|svelte|astro|iles|nuxt|unocss|uno)\.config/;
@@ -12095,10 +12045,12 @@ var ContextManager = class {
12095
12045
  loadingContexts = /* @__PURE__ */ new Map();
12096
12046
  discoveredConfigs = /* @__PURE__ */ new Set();
12097
12047
  defaultUnocssConfig = { presets: [presetWind3()] };
12048
+ workspaceRoots;
12098
12049
  events = createNanoEvents();
12099
- constructor(cwd$1, connection) {
12100
- this.cwd = cwd$1;
12050
+ constructor(cwd, connection, workspaceRoots = [cwd]) {
12051
+ this.cwd = cwd;
12101
12052
  this.connection = connection;
12053
+ this.workspaceRoots = Array.from(new Set(workspaceRoots.length ? workspaceRoots : [cwd]));
12102
12054
  this.ready = this.reload();
12103
12055
  }
12104
12056
  log(message) {
@@ -12108,28 +12060,26 @@ var ContextManager = class {
12108
12060
  this.connection.console.warn(message);
12109
12061
  }
12110
12062
  isTarget(id) {
12111
- return Array.from(this.contextsMap.keys()).some((cwd$1) => isSubdir(cwd$1, id));
12063
+ return Array.from(this.contextsMap.keys()).some((cwd) => isSubdir(cwd, id));
12112
12064
  }
12113
12065
  get contexts() {
12114
12066
  return Array.from(new Set(this.contextsMap.values())).filter(notNull);
12115
12067
  }
12068
+ async setRoots(roots) {
12069
+ const nextRoots = Array.from(new Set(roots.length ? roots : this.workspaceRoots));
12070
+ const currentRoots = Array.from(this.contextsMap.keys());
12071
+ if (currentRoots.length === nextRoots.length && nextRoots.every((root) => currentRoots.includes(root))) return;
12072
+ await Promise.all(currentRoots.filter((root) => !nextRoots.includes(root)).map((root) => this.unloadContext(root)));
12073
+ this.resetCaches();
12074
+ await this.loadRoots(nextRoots.filter((root) => !currentRoots.includes(root)));
12075
+ this.events.emit("reload");
12076
+ }
12116
12077
  async reload() {
12117
12078
  const dirs = Array.from(this.contextsMap.keys());
12079
+ const rootsToLoad = dirs.length ? dirs : this.workspaceRoots;
12118
12080
  await Promise.all(dirs.map((dir) => this.unloadContext(dir)));
12119
- this.fileContextCache.clear();
12120
- this.configExistsCache.clear();
12121
- if (dirs.length) await Promise.all(dirs.map(async (dir) => {
12122
- try {
12123
- await this.loadContextInDirectory(dir);
12124
- } catch (e) {
12125
- this.warn(`⚠️ Failed to reload context for ${dir}: ${String(e.stack ?? e)}`);
12126
- }
12127
- }));
12128
- else try {
12129
- await this.loadContextInDirectory(this.cwd);
12130
- } catch (e) {
12131
- this.warn(`⚠️ Failed to reload context for ${this.cwd}: ${String(e.stack ?? e)}`);
12132
- }
12081
+ this.resetCaches();
12082
+ await this.loadRoots(rootsToLoad);
12133
12083
  this.events.emit("reload");
12134
12084
  }
12135
12085
  async unloadContext(configDir) {
@@ -12149,7 +12099,20 @@ var ContextManager = class {
12149
12099
  this.events.emit("unload", context);
12150
12100
  }
12151
12101
  clearFileContextCache(context) {
12152
- for (const [path$1, ctx] of this.fileContextCache) if (ctx === context) this.fileContextCache.delete(path$1);
12102
+ for (const [path, ctx] of this.fileContextCache) if (ctx === context) this.fileContextCache.delete(path);
12103
+ }
12104
+ resetCaches() {
12105
+ this.fileContextCache.clear();
12106
+ this.configExistsCache.clear();
12107
+ }
12108
+ async loadRoots(roots) {
12109
+ await Promise.all(roots.map(async (dir) => {
12110
+ try {
12111
+ await this.loadContextInDirectory(dir);
12112
+ } catch (e) {
12113
+ this.warn(`⚠️ Failed to reload context for ${dir}: ${String(e.stack ?? e)}`);
12114
+ }
12115
+ }));
12153
12116
  }
12154
12117
  async loadContextInDirectory(dir) {
12155
12118
  const cached = this.contextsMap.get(dir);
@@ -12189,9 +12152,9 @@ var ContextManager = class {
12189
12152
  files: "nuxt.config",
12190
12153
  fields: "unocss"
12191
12154
  })
12192
- ], (result$1) => {
12193
- if (result$1.sources.some((s) => s.includes("nuxt.config"))) resolveOptions(result$1.config);
12194
- result$1.config.details = true;
12155
+ ], (result) => {
12156
+ if (result.sources.some((s) => s.includes("nuxt.config"))) resolveOptions(result.config);
12157
+ result.config.details = true;
12195
12158
  });
12196
12159
  let sources = [];
12197
12160
  try {
@@ -12224,11 +12187,11 @@ var ContextManager = class {
12224
12187
  }
12225
12188
  setupContextReload(context) {
12226
12189
  context.onReload(() => {
12227
- for (const [path$1, ctx] of this.fileContextCache) if (ctx === context || !ctx) this.fileContextCache.delete(path$1);
12190
+ for (const [path, ctx] of this.fileContextCache) if (ctx === context || !ctx) this.fileContextCache.delete(path);
12228
12191
  this.configExistsCache.clear();
12229
12192
  this.events.emit("contextReload", context);
12230
12193
  });
12231
- for (const [path$1, ctx] of this.fileContextCache) if (!ctx) this.fileContextCache.delete(path$1);
12194
+ for (const [path, ctx] of this.fileContextCache) if (!ctx) this.fileContextCache.delete(path);
12232
12195
  }
12233
12196
  logConfigInfo(sources, uno) {
12234
12197
  const sourcesStr = sources.length === 1 ? sources[0] : `\n${sources.map((s) => ` - ${s}`).join("\n")}`;
@@ -12243,7 +12206,7 @@ var ContextManager = class {
12243
12206
  if (!this.contextsMap.has(dir)) this.contextsMap.set(dir, context);
12244
12207
  this.fileContextCache.clear();
12245
12208
  this.events.emit("reload");
12246
- const enabledContexts = Array.from(this.contextsMap.entries()).filter(([, ctx]) => ctx).map(([dir$1]) => dir$1).join(", ") || "[none]";
12209
+ const enabledContexts = Array.from(this.contextsMap.entries()).filter(([, ctx]) => ctx).map(([dir]) => dir).join(", ") || "[none]";
12247
12210
  this.log(`🗂️ Enabled context: ${enabledContexts}`);
12248
12211
  return context;
12249
12212
  }
@@ -12279,15 +12242,17 @@ var ContextManager = class {
12279
12242
  async findConfigDirectory(startDir) {
12280
12243
  const cached = this.configExistsCache.get(startDir);
12281
12244
  if (cached !== void 0) return cached || void 0;
12245
+ const searchBoundary = this.getWorkspaceBoundary(startDir);
12246
+ if (!searchBoundary) return void 0;
12282
12247
  const root = path.parse(startDir).root;
12283
12248
  const searchedDirs = [];
12284
12249
  let dir = startDir;
12285
- while (dir !== root && (isSubdir(this.cwd, dir) || dir === this.cwd)) {
12250
+ while (dir !== root && (isSubdir(searchBoundary, dir) || dir === searchBoundary)) {
12286
12251
  searchedDirs.push(dir);
12287
- const cached$1 = this.configExistsCache.get(dir);
12288
- if (cached$1 !== void 0) {
12289
- this.cacheSearchPath(searchedDirs, cached$1 || false);
12290
- return cached$1 || void 0;
12252
+ const cached = this.configExistsCache.get(dir);
12253
+ if (cached !== void 0) {
12254
+ this.cacheSearchPath(searchedDirs, cached || false);
12255
+ return cached || void 0;
12291
12256
  }
12292
12257
  if (await this.hasConfigFiles(dir)) {
12293
12258
  this.cacheSearchPath(searchedDirs, dir);
@@ -12297,6 +12262,9 @@ var ContextManager = class {
12297
12262
  }
12298
12263
  this.cacheSearchPath(searchedDirs, false);
12299
12264
  }
12265
+ getWorkspaceBoundary(dir) {
12266
+ return [...this.workspaceRoots, ...this.contextsMap.keys()].filter((root) => root === dir || isSubdir(root, dir)).sort((a, b) => b.length - a.length)[0];
12267
+ }
12300
12268
  async hasConfigFiles(dir) {
12301
12269
  try {
12302
12270
  return (await readdir(dir)).some((file) => unoConfigRE.test(file) || frameworkConfigRE.test(file));
@@ -12308,7 +12276,6 @@ var ContextManager = class {
12308
12276
  for (const dir of dirs) this.configExistsCache.set(dir, result);
12309
12277
  }
12310
12278
  };
12311
-
12312
12279
  //#endregion
12313
12280
  //#region src/types.ts
12314
12281
  const defaultSettings = {
@@ -12327,7 +12294,6 @@ const defaultSettings = {
12327
12294
  autocompleteStrict: false,
12328
12295
  autocompleteMaxItems: 1e3
12329
12296
  };
12330
-
12331
12297
  //#endregion
12332
12298
  //#region src/utils/color.ts
12333
12299
  const matchCssVarNameRE = /var\((?<cssVarName>--[^,|)]+)(?:,(?<fallback>[^)]+))?\)/g;
@@ -12335,12 +12301,12 @@ const cssColorRE = /(?:#|0x)(?:[a-f0-9]{3}|[a-f0-9]{6})\b|(?:rgb|rgba|hsl|hsla|o
12335
12301
  const varFnRE = /var\((--[^,|)]+)(?:,([^)]+))?\)/;
12336
12302
  function getCssVariables(code) {
12337
12303
  const regex = /(?<key>--[^\s:]+):(?<value>.+?)[!;]/g;
12338
- const cssVariables$1 = /* @__PURE__ */ new Map();
12304
+ const cssVariables = /* @__PURE__ */ new Map();
12339
12305
  for (const match of code.matchAll(regex)) {
12340
12306
  const key = match.groups?.key;
12341
- if (key) cssVariables$1.set(key, match.groups?.value ?? "");
12307
+ if (key) cssVariables.set(key, match.groups?.value ?? "");
12342
12308
  }
12343
- return cssVariables$1;
12309
+ return cssVariables;
12344
12310
  }
12345
12311
  /**
12346
12312
  * Get CSS color string from CSS string
@@ -12425,7 +12391,6 @@ function parseColorToRGBA(colorString) {
12425
12391
  };
12426
12392
  }
12427
12393
  }
12428
-
12429
12394
  //#endregion
12430
12395
  //#region src/utils/css.ts
12431
12396
  const remUnitRE = /(-?[\d.]+)rem(\s+!important)?;/;
@@ -12441,12 +12406,12 @@ function addRemToPxComment(str, remToPixel = 16) {
12441
12406
  let index = 0;
12442
12407
  const output = [];
12443
12408
  while (index < str.length) {
12444
- const rem$2 = str.slice(index).match(remUnitRE);
12445
- if (!rem$2 || !rem$2.index) break;
12446
- const px$1 = ` /* ${Number.parseFloat(rem$2[1]) * remToPixel}px */`;
12447
- const end = index + rem$2.index + rem$2[0].length;
12409
+ const rem = str.slice(index).match(remUnitRE);
12410
+ if (!rem || !rem.index) break;
12411
+ const px = ` /* ${Number.parseFloat(rem[1]) * remToPixel}px */`;
12412
+ const end = index + rem.index + rem[0].length;
12448
12413
  output.push(str.slice(index, end));
12449
- output.push(px$1);
12414
+ output.push(px);
12450
12415
  index = end;
12451
12416
  }
12452
12417
  output.push(str.slice(index));
@@ -12477,6 +12442,5 @@ async function getPrettiedCSS(uno, util, remToPxRatio) {
12477
12442
  async function getPrettiedMarkdown(uno, util, remToPxRatio) {
12478
12443
  return `\`\`\`css\n${(await getPrettiedCSS(uno, util, remToPxRatio)).prettified.trimEnd()}\n\`\`\``;
12479
12444
  }
12480
-
12481
12445
  //#endregion
12482
- export { ContextManager, addRemToPxComment, clearDocumentCache, convertToRGBA, defaultSettings, getCSS, getColorString, getMatchedPositionsFromCode, getMatchedPositionsFromDoc, getPrettiedCSS, getPrettiedMarkdown, isSubdir, isVueWithPug, parseColorToRGBA, shouldProvideAutocomplete };
12446
+ export { ContextManager, addRemToPxComment, clearDocumentCache, convertToRGBA, defaultSettings, getCSS, getColorString, getMatchedPositionsFromCode, getMatchedPositionsFromDoc, getPrettiedCSS, getPrettiedMarkdown, isSubdir, isVueWithPug, parseColorToRGBA, shouldProvideAutocomplete };