docs-i18n 0.1.0

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.
@@ -0,0 +1,875 @@
1
+ import {
2
+ __commonJS,
3
+ __esm,
4
+ __glob,
5
+ __require,
6
+ __toESM
7
+ } from "./chunk-AKLW2MUS.js";
8
+
9
+ // require("../lightningcss.*.node") in node_modules/lightningcss/node/index.js
10
+ var globRequire_lightningcss_node;
11
+ var init_ = __esm({
12
+ 'require("../lightningcss.*.node") in node_modules/lightningcss/node/index.js'() {
13
+ globRequire_lightningcss_node = __glob({});
14
+ }
15
+ });
16
+
17
+ // node_modules/detect-libc/lib/process.js
18
+ var require_process = __commonJS({
19
+ "node_modules/detect-libc/lib/process.js"(exports, module) {
20
+ "use strict";
21
+ var isLinux = () => process.platform === "linux";
22
+ var report = null;
23
+ var getReport = () => {
24
+ if (!report) {
25
+ if (isLinux() && process.report) {
26
+ const orig = process.report.excludeNetwork;
27
+ process.report.excludeNetwork = true;
28
+ report = process.report.getReport();
29
+ process.report.excludeNetwork = orig;
30
+ } else {
31
+ report = {};
32
+ }
33
+ }
34
+ return report;
35
+ };
36
+ module.exports = { isLinux, getReport };
37
+ }
38
+ });
39
+
40
+ // node_modules/detect-libc/lib/filesystem.js
41
+ var require_filesystem = __commonJS({
42
+ "node_modules/detect-libc/lib/filesystem.js"(exports, module) {
43
+ "use strict";
44
+ var fs = __require("fs");
45
+ var LDD_PATH = "/usr/bin/ldd";
46
+ var SELF_PATH = "/proc/self/exe";
47
+ var MAX_LENGTH = 2048;
48
+ var readFileSync = (path) => {
49
+ const fd = fs.openSync(path, "r");
50
+ const buffer = Buffer.alloc(MAX_LENGTH);
51
+ const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0);
52
+ fs.close(fd, () => {
53
+ });
54
+ return buffer.subarray(0, bytesRead);
55
+ };
56
+ var readFile = (path) => new Promise((resolve, reject) => {
57
+ fs.open(path, "r", (err, fd) => {
58
+ if (err) {
59
+ reject(err);
60
+ } else {
61
+ const buffer = Buffer.alloc(MAX_LENGTH);
62
+ fs.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {
63
+ resolve(buffer.subarray(0, bytesRead));
64
+ fs.close(fd, () => {
65
+ });
66
+ });
67
+ }
68
+ });
69
+ });
70
+ module.exports = {
71
+ LDD_PATH,
72
+ SELF_PATH,
73
+ readFileSync,
74
+ readFile
75
+ };
76
+ }
77
+ });
78
+
79
+ // node_modules/detect-libc/lib/elf.js
80
+ var require_elf = __commonJS({
81
+ "node_modules/detect-libc/lib/elf.js"(exports, module) {
82
+ "use strict";
83
+ var interpreterPath = (elf) => {
84
+ if (elf.length < 64) {
85
+ return null;
86
+ }
87
+ if (elf.readUInt32BE(0) !== 2135247942) {
88
+ return null;
89
+ }
90
+ if (elf.readUInt8(4) !== 2) {
91
+ return null;
92
+ }
93
+ if (elf.readUInt8(5) !== 1) {
94
+ return null;
95
+ }
96
+ const offset = elf.readUInt32LE(32);
97
+ const size = elf.readUInt16LE(54);
98
+ const count = elf.readUInt16LE(56);
99
+ for (let i = 0; i < count; i++) {
100
+ const headerOffset = offset + i * size;
101
+ const type = elf.readUInt32LE(headerOffset);
102
+ if (type === 3) {
103
+ const fileOffset = elf.readUInt32LE(headerOffset + 8);
104
+ const fileSize = elf.readUInt32LE(headerOffset + 32);
105
+ return elf.subarray(fileOffset, fileOffset + fileSize).toString().replace(/\0.*$/g, "");
106
+ }
107
+ }
108
+ return null;
109
+ };
110
+ module.exports = {
111
+ interpreterPath
112
+ };
113
+ }
114
+ });
115
+
116
+ // node_modules/detect-libc/lib/detect-libc.js
117
+ var require_detect_libc = __commonJS({
118
+ "node_modules/detect-libc/lib/detect-libc.js"(exports, module) {
119
+ "use strict";
120
+ var childProcess = __require("child_process");
121
+ var { isLinux, getReport } = require_process();
122
+ var { LDD_PATH, SELF_PATH, readFile, readFileSync } = require_filesystem();
123
+ var { interpreterPath } = require_elf();
124
+ var cachedFamilyInterpreter;
125
+ var cachedFamilyFilesystem;
126
+ var cachedVersionFilesystem;
127
+ var command = "getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true";
128
+ var commandOut = "";
129
+ var safeCommand = () => {
130
+ if (!commandOut) {
131
+ return new Promise((resolve) => {
132
+ childProcess.exec(command, (err, out) => {
133
+ commandOut = err ? " " : out;
134
+ resolve(commandOut);
135
+ });
136
+ });
137
+ }
138
+ return commandOut;
139
+ };
140
+ var safeCommandSync = () => {
141
+ if (!commandOut) {
142
+ try {
143
+ commandOut = childProcess.execSync(command, { encoding: "utf8" });
144
+ } catch (_err) {
145
+ commandOut = " ";
146
+ }
147
+ }
148
+ return commandOut;
149
+ };
150
+ var GLIBC = "glibc";
151
+ var RE_GLIBC_VERSION = /LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i;
152
+ var MUSL = "musl";
153
+ var isFileMusl = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
154
+ var familyFromReport = () => {
155
+ const report = getReport();
156
+ if (report.header && report.header.glibcVersionRuntime) {
157
+ return GLIBC;
158
+ }
159
+ if (Array.isArray(report.sharedObjects)) {
160
+ if (report.sharedObjects.some(isFileMusl)) {
161
+ return MUSL;
162
+ }
163
+ }
164
+ return null;
165
+ };
166
+ var familyFromCommand = (out) => {
167
+ const [getconf, ldd1] = out.split(/[\r\n]+/);
168
+ if (getconf && getconf.includes(GLIBC)) {
169
+ return GLIBC;
170
+ }
171
+ if (ldd1 && ldd1.includes(MUSL)) {
172
+ return MUSL;
173
+ }
174
+ return null;
175
+ };
176
+ var familyFromInterpreterPath = (path) => {
177
+ if (path) {
178
+ if (path.includes("/ld-musl-")) {
179
+ return MUSL;
180
+ } else if (path.includes("/ld-linux-")) {
181
+ return GLIBC;
182
+ }
183
+ }
184
+ return null;
185
+ };
186
+ var getFamilyFromLddContent = (content) => {
187
+ content = content.toString();
188
+ if (content.includes("musl")) {
189
+ return MUSL;
190
+ }
191
+ if (content.includes("GNU C Library")) {
192
+ return GLIBC;
193
+ }
194
+ return null;
195
+ };
196
+ var familyFromFilesystem = async () => {
197
+ if (cachedFamilyFilesystem !== void 0) {
198
+ return cachedFamilyFilesystem;
199
+ }
200
+ cachedFamilyFilesystem = null;
201
+ try {
202
+ const lddContent = await readFile(LDD_PATH);
203
+ cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
204
+ } catch (e) {
205
+ }
206
+ return cachedFamilyFilesystem;
207
+ };
208
+ var familyFromFilesystemSync = () => {
209
+ if (cachedFamilyFilesystem !== void 0) {
210
+ return cachedFamilyFilesystem;
211
+ }
212
+ cachedFamilyFilesystem = null;
213
+ try {
214
+ const lddContent = readFileSync(LDD_PATH);
215
+ cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
216
+ } catch (e) {
217
+ }
218
+ return cachedFamilyFilesystem;
219
+ };
220
+ var familyFromInterpreter = async () => {
221
+ if (cachedFamilyInterpreter !== void 0) {
222
+ return cachedFamilyInterpreter;
223
+ }
224
+ cachedFamilyInterpreter = null;
225
+ try {
226
+ const selfContent = await readFile(SELF_PATH);
227
+ const path = interpreterPath(selfContent);
228
+ cachedFamilyInterpreter = familyFromInterpreterPath(path);
229
+ } catch (e) {
230
+ }
231
+ return cachedFamilyInterpreter;
232
+ };
233
+ var familyFromInterpreterSync = () => {
234
+ if (cachedFamilyInterpreter !== void 0) {
235
+ return cachedFamilyInterpreter;
236
+ }
237
+ cachedFamilyInterpreter = null;
238
+ try {
239
+ const selfContent = readFileSync(SELF_PATH);
240
+ const path = interpreterPath(selfContent);
241
+ cachedFamilyInterpreter = familyFromInterpreterPath(path);
242
+ } catch (e) {
243
+ }
244
+ return cachedFamilyInterpreter;
245
+ };
246
+ var family = async () => {
247
+ let family2 = null;
248
+ if (isLinux()) {
249
+ family2 = await familyFromInterpreter();
250
+ if (!family2) {
251
+ family2 = await familyFromFilesystem();
252
+ if (!family2) {
253
+ family2 = familyFromReport();
254
+ }
255
+ if (!family2) {
256
+ const out = await safeCommand();
257
+ family2 = familyFromCommand(out);
258
+ }
259
+ }
260
+ }
261
+ return family2;
262
+ };
263
+ var familySync = () => {
264
+ let family2 = null;
265
+ if (isLinux()) {
266
+ family2 = familyFromInterpreterSync();
267
+ if (!family2) {
268
+ family2 = familyFromFilesystemSync();
269
+ if (!family2) {
270
+ family2 = familyFromReport();
271
+ }
272
+ if (!family2) {
273
+ const out = safeCommandSync();
274
+ family2 = familyFromCommand(out);
275
+ }
276
+ }
277
+ }
278
+ return family2;
279
+ };
280
+ var isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC;
281
+ var isNonGlibcLinuxSync = () => isLinux() && familySync() !== GLIBC;
282
+ var versionFromFilesystem = async () => {
283
+ if (cachedVersionFilesystem !== void 0) {
284
+ return cachedVersionFilesystem;
285
+ }
286
+ cachedVersionFilesystem = null;
287
+ try {
288
+ const lddContent = await readFile(LDD_PATH);
289
+ const versionMatch = lddContent.match(RE_GLIBC_VERSION);
290
+ if (versionMatch) {
291
+ cachedVersionFilesystem = versionMatch[1];
292
+ }
293
+ } catch (e) {
294
+ }
295
+ return cachedVersionFilesystem;
296
+ };
297
+ var versionFromFilesystemSync = () => {
298
+ if (cachedVersionFilesystem !== void 0) {
299
+ return cachedVersionFilesystem;
300
+ }
301
+ cachedVersionFilesystem = null;
302
+ try {
303
+ const lddContent = readFileSync(LDD_PATH);
304
+ const versionMatch = lddContent.match(RE_GLIBC_VERSION);
305
+ if (versionMatch) {
306
+ cachedVersionFilesystem = versionMatch[1];
307
+ }
308
+ } catch (e) {
309
+ }
310
+ return cachedVersionFilesystem;
311
+ };
312
+ var versionFromReport = () => {
313
+ const report = getReport();
314
+ if (report.header && report.header.glibcVersionRuntime) {
315
+ return report.header.glibcVersionRuntime;
316
+ }
317
+ return null;
318
+ };
319
+ var versionSuffix = (s) => s.trim().split(/\s+/)[1];
320
+ var versionFromCommand = (out) => {
321
+ const [getconf, ldd1, ldd2] = out.split(/[\r\n]+/);
322
+ if (getconf && getconf.includes(GLIBC)) {
323
+ return versionSuffix(getconf);
324
+ }
325
+ if (ldd1 && ldd2 && ldd1.includes(MUSL)) {
326
+ return versionSuffix(ldd2);
327
+ }
328
+ return null;
329
+ };
330
+ var version = async () => {
331
+ let version2 = null;
332
+ if (isLinux()) {
333
+ version2 = await versionFromFilesystem();
334
+ if (!version2) {
335
+ version2 = versionFromReport();
336
+ }
337
+ if (!version2) {
338
+ const out = await safeCommand();
339
+ version2 = versionFromCommand(out);
340
+ }
341
+ }
342
+ return version2;
343
+ };
344
+ var versionSync = () => {
345
+ let version2 = null;
346
+ if (isLinux()) {
347
+ version2 = versionFromFilesystemSync();
348
+ if (!version2) {
349
+ version2 = versionFromReport();
350
+ }
351
+ if (!version2) {
352
+ const out = safeCommandSync();
353
+ version2 = versionFromCommand(out);
354
+ }
355
+ }
356
+ return version2;
357
+ };
358
+ module.exports = {
359
+ GLIBC,
360
+ MUSL,
361
+ family,
362
+ familySync,
363
+ isNonGlibcLinux,
364
+ isNonGlibcLinuxSync,
365
+ version,
366
+ versionSync
367
+ };
368
+ }
369
+ });
370
+
371
+ // node_modules/lightningcss/node/browserslistToTargets.js
372
+ var require_browserslistToTargets = __commonJS({
373
+ "node_modules/lightningcss/node/browserslistToTargets.js"(exports, module) {
374
+ "use strict";
375
+ var BROWSER_MAPPING = {
376
+ and_chr: "chrome",
377
+ and_ff: "firefox",
378
+ ie_mob: "ie",
379
+ op_mob: "opera",
380
+ and_qq: null,
381
+ and_uc: null,
382
+ baidu: null,
383
+ bb: null,
384
+ kaios: null,
385
+ op_mini: null
386
+ };
387
+ function browserslistToTargets2(browserslist) {
388
+ let targets = {};
389
+ for (let browser of browserslist) {
390
+ let [name, v] = browser.split(" ");
391
+ if (BROWSER_MAPPING[name] === null) {
392
+ continue;
393
+ }
394
+ let version = parseVersion(v);
395
+ if (version == null) {
396
+ continue;
397
+ }
398
+ if (targets[name] == null || version < targets[name]) {
399
+ targets[name] = version;
400
+ }
401
+ }
402
+ return targets;
403
+ }
404
+ function parseVersion(version) {
405
+ let [major, minor = 0, patch = 0] = version.split("-")[0].split(".").map((v) => parseInt(v, 10));
406
+ if (isNaN(major) || isNaN(minor) || isNaN(patch)) {
407
+ return null;
408
+ }
409
+ return major << 16 | minor << 8 | patch;
410
+ }
411
+ module.exports = browserslistToTargets2;
412
+ }
413
+ });
414
+
415
+ // node_modules/lightningcss/node/composeVisitors.js
416
+ var require_composeVisitors = __commonJS({
417
+ "node_modules/lightningcss/node/composeVisitors.js"(exports, module) {
418
+ "use strict";
419
+ function composeVisitors2(visitors) {
420
+ if (visitors.length === 1) {
421
+ return visitors[0];
422
+ }
423
+ if (visitors.some((v) => typeof v === "function")) {
424
+ return (opts) => {
425
+ let v = visitors.map((v2) => typeof v2 === "function" ? v2(opts) : v2);
426
+ return composeVisitors2(v);
427
+ };
428
+ }
429
+ let res = {};
430
+ composeSimpleVisitors(res, visitors, "StyleSheet");
431
+ composeSimpleVisitors(res, visitors, "StyleSheetExit");
432
+ composeObjectVisitors(res, visitors, "Rule", ruleVisitor, wrapCustomAndUnknownAtRule);
433
+ composeObjectVisitors(res, visitors, "RuleExit", ruleVisitor, wrapCustomAndUnknownAtRule);
434
+ composeObjectVisitors(res, visitors, "Declaration", declarationVisitor, wrapCustomProperty);
435
+ composeObjectVisitors(res, visitors, "DeclarationExit", declarationVisitor, wrapCustomProperty);
436
+ composeSimpleVisitors(res, visitors, "Url");
437
+ composeSimpleVisitors(res, visitors, "Color");
438
+ composeSimpleVisitors(res, visitors, "Image");
439
+ composeSimpleVisitors(res, visitors, "ImageExit");
440
+ composeSimpleVisitors(res, visitors, "Length");
441
+ composeSimpleVisitors(res, visitors, "Angle");
442
+ composeSimpleVisitors(res, visitors, "Ratio");
443
+ composeSimpleVisitors(res, visitors, "Resolution");
444
+ composeSimpleVisitors(res, visitors, "Time");
445
+ composeSimpleVisitors(res, visitors, "CustomIdent");
446
+ composeSimpleVisitors(res, visitors, "DashedIdent");
447
+ composeArrayFunctions(res, visitors, "MediaQuery");
448
+ composeArrayFunctions(res, visitors, "MediaQueryExit");
449
+ composeSimpleVisitors(res, visitors, "SupportsCondition");
450
+ composeSimpleVisitors(res, visitors, "SupportsConditionExit");
451
+ composeArrayFunctions(res, visitors, "Selector");
452
+ composeTokenVisitors(res, visitors, "Token", "token", false);
453
+ composeTokenVisitors(res, visitors, "Function", "function", false);
454
+ composeTokenVisitors(res, visitors, "FunctionExit", "function", true);
455
+ composeTokenVisitors(res, visitors, "Variable", "var", false);
456
+ composeTokenVisitors(res, visitors, "VariableExit", "var", true);
457
+ composeTokenVisitors(res, visitors, "EnvironmentVariable", "env", false);
458
+ composeTokenVisitors(res, visitors, "EnvironmentVariableExit", "env", true);
459
+ return res;
460
+ }
461
+ module.exports = composeVisitors2;
462
+ function wrapCustomAndUnknownAtRule(k, f) {
463
+ if (k === "unknown") {
464
+ return ((value) => f({ type: "unknown", value }));
465
+ }
466
+ if (k === "custom") {
467
+ return ((value) => f({ type: "custom", value }));
468
+ }
469
+ return f;
470
+ }
471
+ function wrapCustomProperty(k, f) {
472
+ return k === "custom" ? ((value) => f({ property: "custom", value })) : f;
473
+ }
474
+ function ruleVisitor(f, item) {
475
+ if (typeof f === "object") {
476
+ if (item.type === "unknown") {
477
+ let v = f.unknown;
478
+ if (typeof v === "object") {
479
+ v = v[item.value.name];
480
+ }
481
+ return v?.(item.value);
482
+ }
483
+ if (item.type === "custom") {
484
+ let v = f.custom;
485
+ if (typeof v === "object") {
486
+ v = v[item.value.name];
487
+ }
488
+ return v?.(item.value);
489
+ }
490
+ return f[item.type]?.(item);
491
+ }
492
+ return f?.(item);
493
+ }
494
+ function declarationVisitor(f, item) {
495
+ if (typeof f === "object") {
496
+ let name = item.property;
497
+ if (item.property === "unparsed") {
498
+ name = item.value.propertyId.property;
499
+ } else if (item.property === "custom") {
500
+ let v = f.custom;
501
+ if (typeof v === "object") {
502
+ v = v[item.value.name];
503
+ }
504
+ return v?.(item.value);
505
+ }
506
+ return f[name]?.(item);
507
+ }
508
+ return f?.(item);
509
+ }
510
+ function extractObjectsOrFunctions(visitors, key) {
511
+ let values = [];
512
+ let hasFunction = false;
513
+ let allKeys = /* @__PURE__ */ new Set();
514
+ for (let visitor of visitors) {
515
+ let v = visitor[key];
516
+ if (v) {
517
+ if (typeof v === "function") {
518
+ hasFunction = true;
519
+ } else {
520
+ for (let key2 in v) {
521
+ allKeys.add(key2);
522
+ }
523
+ }
524
+ values.push(v);
525
+ }
526
+ }
527
+ return [values, hasFunction, allKeys];
528
+ }
529
+ function composeObjectVisitors(res, visitors, key, apply, wrapKey) {
530
+ let [values, hasFunction, allKeys] = extractObjectsOrFunctions(visitors, key);
531
+ if (values.length === 0) {
532
+ return;
533
+ }
534
+ if (values.length === 1) {
535
+ res[key] = values[0];
536
+ return;
537
+ }
538
+ let f = createArrayVisitor(visitors, (visitor, item) => apply(visitor[key], item));
539
+ if (hasFunction) {
540
+ res[key] = f;
541
+ } else {
542
+ let v = {};
543
+ for (let k of allKeys) {
544
+ v[k] = wrapKey(k, f);
545
+ }
546
+ res[key] = v;
547
+ }
548
+ }
549
+ function composeTokenVisitors(res, visitors, key, type, isExit) {
550
+ let [values, hasFunction, allKeys] = extractObjectsOrFunctions(visitors, key);
551
+ if (values.length === 0) {
552
+ return;
553
+ }
554
+ if (values.length === 1) {
555
+ res[key] = values[0];
556
+ return;
557
+ }
558
+ let f = createTokenVisitor(visitors, type, isExit);
559
+ if (hasFunction) {
560
+ res[key] = f;
561
+ } else {
562
+ let v = {};
563
+ for (let key2 of allKeys) {
564
+ v[key2] = f;
565
+ }
566
+ res[key] = v;
567
+ }
568
+ }
569
+ function createTokenVisitor(visitors, type, isExit) {
570
+ let v = createArrayVisitor(visitors, (visitor, item) => {
571
+ let f;
572
+ switch (item.type) {
573
+ case "token":
574
+ f = visitor.Token;
575
+ if (typeof f === "object") {
576
+ f = f[item.value.type];
577
+ }
578
+ break;
579
+ case "function":
580
+ f = isExit ? visitor.FunctionExit : visitor.Function;
581
+ if (typeof f === "object") {
582
+ f = f[item.value.name];
583
+ }
584
+ break;
585
+ case "var":
586
+ f = isExit ? visitor.VariableExit : visitor.Variable;
587
+ break;
588
+ case "env":
589
+ f = isExit ? visitor.EnvironmentVariableExit : visitor.EnvironmentVariable;
590
+ if (typeof f === "object") {
591
+ let name;
592
+ switch (item.value.name.type) {
593
+ case "ua":
594
+ case "unknown":
595
+ name = item.value.name.value;
596
+ break;
597
+ case "custom":
598
+ name = item.value.name.ident;
599
+ break;
600
+ }
601
+ f = f[name];
602
+ }
603
+ break;
604
+ case "color":
605
+ f = visitor.Color;
606
+ break;
607
+ case "url":
608
+ f = visitor.Url;
609
+ break;
610
+ case "length":
611
+ f = visitor.Length;
612
+ break;
613
+ case "angle":
614
+ f = visitor.Angle;
615
+ break;
616
+ case "time":
617
+ f = visitor.Time;
618
+ break;
619
+ case "resolution":
620
+ f = visitor.Resolution;
621
+ break;
622
+ case "dashed-ident":
623
+ f = visitor.DashedIdent;
624
+ break;
625
+ }
626
+ if (!f) {
627
+ return;
628
+ }
629
+ let res = f(item.value);
630
+ switch (item.type) {
631
+ case "color":
632
+ case "url":
633
+ case "length":
634
+ case "angle":
635
+ case "time":
636
+ case "resolution":
637
+ case "dashed-ident":
638
+ if (Array.isArray(res)) {
639
+ res = res.map((value) => ({ type: item.type, value }));
640
+ } else if (res) {
641
+ res = { type: item.type, value: res };
642
+ }
643
+ break;
644
+ }
645
+ return res;
646
+ });
647
+ return (value) => v({ type, value });
648
+ }
649
+ function extractFunctions(visitors, key) {
650
+ let functions = [];
651
+ for (let visitor of visitors) {
652
+ let f = visitor[key];
653
+ if (f) {
654
+ functions.push(f);
655
+ }
656
+ }
657
+ return functions;
658
+ }
659
+ function composeSimpleVisitors(res, visitors, key) {
660
+ let functions = extractFunctions(visitors, key);
661
+ if (functions.length === 0) {
662
+ return;
663
+ }
664
+ if (functions.length === 1) {
665
+ res[key] = functions[0];
666
+ return;
667
+ }
668
+ res[key] = (arg) => {
669
+ let mutated = false;
670
+ for (let f of functions) {
671
+ let res2 = f(arg);
672
+ if (res2) {
673
+ arg = res2;
674
+ mutated = true;
675
+ }
676
+ }
677
+ return mutated ? arg : void 0;
678
+ };
679
+ }
680
+ function composeArrayFunctions(res, visitors, key) {
681
+ let functions = extractFunctions(visitors, key);
682
+ if (functions.length === 0) {
683
+ return;
684
+ }
685
+ if (functions.length === 1) {
686
+ res[key] = functions[0];
687
+ return;
688
+ }
689
+ res[key] = createArrayVisitor(functions, (f, item) => f(item));
690
+ }
691
+ function createArrayVisitor(visitors, apply) {
692
+ let seen = new Bitset(visitors.length);
693
+ return (arg) => {
694
+ let arr = [arg];
695
+ let mutated = false;
696
+ seen.clear();
697
+ for (let i = 0; i < arr.length; i++) {
698
+ for (let v = 0; v < visitors.length && i < arr.length; ) {
699
+ if (seen.get(v)) {
700
+ v++;
701
+ continue;
702
+ }
703
+ let item = arr[i];
704
+ let visitor = visitors[v];
705
+ let res = apply(visitor, item);
706
+ if (Array.isArray(res)) {
707
+ if (res.length === 0) {
708
+ arr.splice(i, 1);
709
+ } else if (res.length === 1) {
710
+ arr[i] = res[0];
711
+ } else {
712
+ arr.splice(i, 1, ...res);
713
+ }
714
+ mutated = true;
715
+ seen.set(v);
716
+ v = 0;
717
+ } else if (res) {
718
+ arr[i] = res;
719
+ mutated = true;
720
+ seen.set(v);
721
+ v = 0;
722
+ } else {
723
+ v++;
724
+ }
725
+ }
726
+ }
727
+ if (!mutated) {
728
+ return;
729
+ }
730
+ return arr.length === 1 ? arr[0] : arr;
731
+ };
732
+ }
733
+ var Bitset = class {
734
+ constructor(maxBits = 32) {
735
+ this.bits = 0;
736
+ this.more = maxBits > 32 ? new Uint32Array(Math.ceil((maxBits - 32) / 32)) : null;
737
+ }
738
+ /** @param {number} bit */
739
+ get(bit) {
740
+ if (bit >= 32 && this.more) {
741
+ let i = Math.floor((bit - 32) / 32);
742
+ let b = bit % 32;
743
+ return Boolean(this.more[i] & 1 << b);
744
+ } else {
745
+ return Boolean(this.bits & 1 << bit);
746
+ }
747
+ }
748
+ /** @param {number} bit */
749
+ set(bit) {
750
+ if (bit >= 32 && this.more) {
751
+ let i = Math.floor((bit - 32) / 32);
752
+ let b = bit % 32;
753
+ this.more[i] |= 1 << b;
754
+ } else {
755
+ this.bits |= 1 << bit;
756
+ }
757
+ }
758
+ clear() {
759
+ this.bits = 0;
760
+ if (this.more) {
761
+ this.more.fill(0);
762
+ }
763
+ }
764
+ };
765
+ }
766
+ });
767
+
768
+ // node_modules/lightningcss/node/flags.js
769
+ var require_flags = __commonJS({
770
+ "node_modules/lightningcss/node/flags.js"(exports) {
771
+ "use strict";
772
+ exports.Features = {
773
+ Nesting: 1,
774
+ NotSelectorList: 2,
775
+ DirSelector: 4,
776
+ LangSelectorList: 8,
777
+ IsSelector: 16,
778
+ TextDecorationThicknessPercent: 32,
779
+ MediaIntervalSyntax: 64,
780
+ MediaRangeSyntax: 128,
781
+ CustomMediaQueries: 256,
782
+ ClampFunction: 512,
783
+ ColorFunction: 1024,
784
+ OklabColors: 2048,
785
+ LabColors: 4096,
786
+ P3Colors: 8192,
787
+ HexAlphaColors: 16384,
788
+ SpaceSeparatedColorNotation: 32768,
789
+ FontFamilySystemUi: 65536,
790
+ DoublePositionGradients: 131072,
791
+ VendorPrefixes: 262144,
792
+ LogicalProperties: 524288,
793
+ LightDark: 1048576,
794
+ Selectors: 31,
795
+ MediaQueries: 448,
796
+ Colors: 1113088
797
+ };
798
+ }
799
+ });
800
+
801
+ // node_modules/lightningcss/node/index.js
802
+ var require_node = __commonJS({
803
+ "node_modules/lightningcss/node/index.js"(exports, module) {
804
+ "use strict";
805
+ init_();
806
+ var parts = [process.platform, process.arch];
807
+ if (process.platform === "linux") {
808
+ const { MUSL, familySync } = require_detect_libc();
809
+ const family = familySync();
810
+ if (family === MUSL) {
811
+ parts.push("musl");
812
+ } else if (process.arch === "arm") {
813
+ parts.push("gnueabihf");
814
+ } else {
815
+ parts.push("gnu");
816
+ }
817
+ } else if (process.platform === "win32") {
818
+ parts.push("msvc");
819
+ }
820
+ var native;
821
+ try {
822
+ native = __require(`lightningcss-${parts.join("-")}`);
823
+ } catch (err) {
824
+ native = globRequire_lightningcss_node(`../lightningcss.${parts.join("-")}.node`);
825
+ }
826
+ module.exports.transform = wrap(native.transform);
827
+ module.exports.transformStyleAttribute = wrap(native.transformStyleAttribute);
828
+ module.exports.bundle = wrap(native.bundle);
829
+ module.exports.bundleAsync = wrap(native.bundleAsync);
830
+ module.exports.browserslistToTargets = require_browserslistToTargets();
831
+ module.exports.composeVisitors = require_composeVisitors();
832
+ module.exports.Features = require_flags().Features;
833
+ function wrap(call) {
834
+ return (options) => {
835
+ if (typeof options.visitor === "function") {
836
+ let deps = [];
837
+ options.visitor = options.visitor({
838
+ addDependency(dep) {
839
+ deps.push(dep);
840
+ }
841
+ });
842
+ let result = call(options);
843
+ if (result instanceof Promise) {
844
+ result = result.then((res) => {
845
+ if (deps.length) {
846
+ res.dependencies ??= [];
847
+ res.dependencies.push(...deps);
848
+ }
849
+ return res;
850
+ });
851
+ } else if (deps.length) {
852
+ result.dependencies ??= [];
853
+ result.dependencies.push(...deps);
854
+ }
855
+ return result;
856
+ } else {
857
+ return call(options);
858
+ }
859
+ };
860
+ }
861
+ }
862
+ });
863
+
864
+ // node_modules/lightningcss/node/index.mjs
865
+ var import_index = __toESM(require_node(), 1);
866
+ var { transform, transformStyleAttribute, bundle, bundleAsync, browserslistToTargets, composeVisitors, Features } = import_index.default;
867
+ export {
868
+ Features,
869
+ browserslistToTargets,
870
+ bundle,
871
+ bundleAsync,
872
+ composeVisitors,
873
+ transform,
874
+ transformStyleAttribute
875
+ };