@styleframe/cli 2.3.2 → 3.0.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.
- package/CHANGELOG.md +24 -0
- package/dist/build-BFZSJ2Zh.js +49 -0
- package/dist/export-SH70kD-5.js +139 -0
- package/dist/import-CwuwczM7.js +90 -0
- package/dist/index-C3Gqfamh.js +3689 -0
- package/dist/index-DH3Hm47n.js +14 -0
- package/dist/{build-aC0xw4RW.js → index-DtEAy_us.js} +750 -602
- package/dist/index.cjs +6408 -2211
- package/dist/index.js +4 -3
- package/dist/{init-CzpnWkDQ.js → init-DnrkQJYO.js} +91 -1
- package/package.json +8 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
1
|
import { rm, mkdir, writeFile, stat } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
3
|
import { validateInstanceLicense, getLicenseKeyFromEnv } from "@styleframe/license";
|
|
4
|
+
import require$$2, { existsSync } from "node:fs";
|
|
4
5
|
import require$$1, { createRequire } from "node:module";
|
|
5
6
|
import require$$0 from "node:os";
|
|
6
|
-
import require$$2, { existsSync } from "node:fs";
|
|
7
7
|
import require$$3 from "node:url";
|
|
8
8
|
import require$$4 from "node:assert";
|
|
9
9
|
import require$$5 from "node:process";
|
|
@@ -13,8 +13,6 @@ import require$$9 from "node:crypto";
|
|
|
13
13
|
import require$$10 from "node:tty";
|
|
14
14
|
import require$$11 from "node:perf_hooks";
|
|
15
15
|
import require$$12 from "node:vm";
|
|
16
|
-
import { defineCommand } from "citty";
|
|
17
|
-
import consola from "consola";
|
|
18
16
|
function getDefaultExportFromCjs(x2) {
|
|
19
17
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
20
18
|
}
|
|
@@ -49,7 +47,7 @@ function requireJiti() {
|
|
|
49
47
|
(() => {
|
|
50
48
|
__webpack_require__.d(i, { default: () => createJiti2 });
|
|
51
49
|
const e2 = require$$0;
|
|
52
|
-
var t2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], s = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], r = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", n = { 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", 5: "class enum extends super const export import", 6: "enum", strict: "implements interface let package private protected public static yield", strictBind: "eval arguments" }, a = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", o = { 5: a, "5module": a + " export import", 6: a + " const class extends export import super" }, h2 = /^in(stanceof)?$/, c = new RegExp("[" + r + "]"),
|
|
50
|
+
var t2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239], s = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191], r = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", n = { 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", 5: "class enum extends super const export import", 6: "enum", strict: "implements interface let package private protected public static yield", strictBind: "eval arguments" }, a = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this", o = { 5: a, "5module": a + " export import", 6: a + " const class extends export import super" }, h2 = /^in(stanceof)?$/, c = new RegExp("[" + r + "]"), p = new RegExp("[" + r + "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");
|
|
53
51
|
function isInAstralSet(e3, t3) {
|
|
54
52
|
for (var i2 = 65536, s2 = 0; s2 < t3.length; s2 += 2) {
|
|
55
53
|
if ((i2 += t3[s2]) > e3) return false;
|
|
@@ -61,7 +59,7 @@ function requireJiti() {
|
|
|
61
59
|
return e3 < 65 ? 36 === e3 : e3 < 91 || (e3 < 97 ? 95 === e3 : e3 < 123 || (e3 <= 65535 ? e3 >= 170 && c.test(String.fromCharCode(e3)) : false !== t3 && isInAstralSet(e3, s)));
|
|
62
60
|
}
|
|
63
61
|
function isIdentifierChar(e3, i2) {
|
|
64
|
-
return e3 < 48 ? 36 === e3 : e3 < 58 || !(e3 < 65) && (e3 < 91 || (e3 < 97 ? 95 === e3 : e3 < 123 || (e3 <= 65535 ? e3 >= 170 &&
|
|
62
|
+
return e3 < 48 ? 36 === e3 : e3 < 58 || !(e3 < 65) && (e3 < 91 || (e3 < 97 ? 95 === e3 : e3 < 123 || (e3 <= 65535 ? e3 >= 170 && p.test(String.fromCharCode(e3)) : false !== i2 && (isInAstralSet(e3, s) || isInAstralSet(e3, t2)))));
|
|
65
63
|
}
|
|
66
64
|
var acorn_TokenType = function(e3, t3) {
|
|
67
65
|
void 0 === t3 && (t3 = {}), this.label = e3, this.keyword = t3.keyword, this.beforeExpr = !!t3.beforeExpr, this.startsExpr = !!t3.startsExpr, this.isLoop = !!t3.isLoop, this.isAssign = !!t3.isAssign, this.prefix = !!t3.prefix, this.postfix = !!t3.postfix, this.binop = t3.binop || null, this.updateContext = null;
|
|
@@ -73,7 +71,7 @@ function requireJiti() {
|
|
|
73
71
|
function kw(e3, t3) {
|
|
74
72
|
return void 0 === t3 && (t3 = {}), t3.keyword = e3, d2[e3] = new acorn_TokenType(e3, t3);
|
|
75
73
|
}
|
|
76
|
-
var f = { num: new acorn_TokenType("num", u), regexp: new acorn_TokenType("regexp", u), string: new acorn_TokenType("string", u), name: new acorn_TokenType("name", u), privateId: new acorn_TokenType("privateId", u), eof: new acorn_TokenType("eof"), bracketL: new acorn_TokenType("[", { beforeExpr: true, startsExpr: true }), bracketR: new acorn_TokenType("]"), braceL: new acorn_TokenType("{", { beforeExpr: true, startsExpr: true }), braceR: new acorn_TokenType("}"), parenL: new acorn_TokenType("(", { beforeExpr: true, startsExpr: true }), parenR: new acorn_TokenType(")"), comma: new acorn_TokenType(",", l), semi: new acorn_TokenType(";", l), colon: new acorn_TokenType(":", l), dot: new acorn_TokenType("."), question: new acorn_TokenType("?", l), questionDot: new acorn_TokenType("?."), arrow: new acorn_TokenType("=>", l), template: new acorn_TokenType("template"), invalidTemplate: new acorn_TokenType("invalidTemplate"), ellipsis: new acorn_TokenType("...", l), backQuote: new acorn_TokenType("`", u), dollarBraceL: new acorn_TokenType("${", { beforeExpr: true, startsExpr: true }), eq: new acorn_TokenType("=", { beforeExpr: true, isAssign: true }), assign: new acorn_TokenType("_=", { beforeExpr: true, isAssign: true }), incDec: new acorn_TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }), prefix: new acorn_TokenType("!/~", { beforeExpr: true, prefix: true, startsExpr: true }), logicalOR: binop("||", 1), logicalAND: binop("&&", 2), bitwiseOR: binop("|", 3), bitwiseXOR: binop("^", 4), bitwiseAND: binop("&", 5), equality: binop("==/!=/===/!==", 6), relational: binop("</>/<=/>=", 7), bitShift: binop("<</>>/>>>", 8), plusMin: new acorn_TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }), modulo: binop("%", 10), star: binop("*", 10), slash: binop("/", 10), starstar: new acorn_TokenType("**", { beforeExpr: true }), coalesce: binop("??", 1), _break: kw("break"), _case: kw("case", l), _catch: kw("catch"), _continue: kw("continue"), _debugger: kw("debugger"), _default: kw("default", l), _do: kw("do", { isLoop: true, beforeExpr: true }), _else: kw("else", l), _finally: kw("finally"), _for: kw("for", { isLoop: true }), _function: kw("function", u), _if: kw("if"), _return: kw("return", l), _switch: kw("switch"), _throw: kw("throw", l), _try: kw("try"), _var: kw("var"), _const: kw("const"), _while: kw("while", { isLoop: true }), _with: kw("with"), _new: kw("new", { beforeExpr: true, startsExpr: true }), _this: kw("this", u), _super: kw("super", u), _class: kw("class", u), _extends: kw("extends", l), _export: kw("export"), _import: kw("import", u), _null: kw("null", u), _true: kw("true", u), _false: kw("false", u), _in: kw("in", { beforeExpr: true, binop: 7 }), _instanceof: kw("instanceof", { beforeExpr: true, binop: 7 }), _typeof: kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }), _void: kw("void", { beforeExpr: true, prefix: true, startsExpr: true }), _delete: kw("delete", { beforeExpr: true, prefix: true, startsExpr: true }) }, m = /\r\n?|\n|\u2028|\u2029/,
|
|
74
|
+
var f = { num: new acorn_TokenType("num", u), regexp: new acorn_TokenType("regexp", u), string: new acorn_TokenType("string", u), name: new acorn_TokenType("name", u), privateId: new acorn_TokenType("privateId", u), eof: new acorn_TokenType("eof"), bracketL: new acorn_TokenType("[", { beforeExpr: true, startsExpr: true }), bracketR: new acorn_TokenType("]"), braceL: new acorn_TokenType("{", { beforeExpr: true, startsExpr: true }), braceR: new acorn_TokenType("}"), parenL: new acorn_TokenType("(", { beforeExpr: true, startsExpr: true }), parenR: new acorn_TokenType(")"), comma: new acorn_TokenType(",", l), semi: new acorn_TokenType(";", l), colon: new acorn_TokenType(":", l), dot: new acorn_TokenType("."), question: new acorn_TokenType("?", l), questionDot: new acorn_TokenType("?."), arrow: new acorn_TokenType("=>", l), template: new acorn_TokenType("template"), invalidTemplate: new acorn_TokenType("invalidTemplate"), ellipsis: new acorn_TokenType("...", l), backQuote: new acorn_TokenType("`", u), dollarBraceL: new acorn_TokenType("${", { beforeExpr: true, startsExpr: true }), eq: new acorn_TokenType("=", { beforeExpr: true, isAssign: true }), assign: new acorn_TokenType("_=", { beforeExpr: true, isAssign: true }), incDec: new acorn_TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }), prefix: new acorn_TokenType("!/~", { beforeExpr: true, prefix: true, startsExpr: true }), logicalOR: binop("||", 1), logicalAND: binop("&&", 2), bitwiseOR: binop("|", 3), bitwiseXOR: binop("^", 4), bitwiseAND: binop("&", 5), equality: binop("==/!=/===/!==", 6), relational: binop("</>/<=/>=", 7), bitShift: binop("<</>>/>>>", 8), plusMin: new acorn_TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }), modulo: binop("%", 10), star: binop("*", 10), slash: binop("/", 10), starstar: new acorn_TokenType("**", { beforeExpr: true }), coalesce: binop("??", 1), _break: kw("break"), _case: kw("case", l), _catch: kw("catch"), _continue: kw("continue"), _debugger: kw("debugger"), _default: kw("default", l), _do: kw("do", { isLoop: true, beforeExpr: true }), _else: kw("else", l), _finally: kw("finally"), _for: kw("for", { isLoop: true }), _function: kw("function", u), _if: kw("if"), _return: kw("return", l), _switch: kw("switch"), _throw: kw("throw", l), _try: kw("try"), _var: kw("var"), _const: kw("const"), _while: kw("while", { isLoop: true }), _with: kw("with"), _new: kw("new", { beforeExpr: true, startsExpr: true }), _this: kw("this", u), _super: kw("super", u), _class: kw("class", u), _extends: kw("extends", l), _export: kw("export"), _import: kw("import", u), _null: kw("null", u), _true: kw("true", u), _false: kw("false", u), _in: kw("in", { beforeExpr: true, binop: 7 }), _instanceof: kw("instanceof", { beforeExpr: true, binop: 7 }), _typeof: kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }), _void: kw("void", { beforeExpr: true, prefix: true, startsExpr: true }), _delete: kw("delete", { beforeExpr: true, prefix: true, startsExpr: true }) }, m = /\r\n?|\n|\u2028|\u2029/, g = new RegExp(m.source, "g");
|
|
77
75
|
function isNewLine(e3) {
|
|
78
76
|
return 10 === e3 || 13 === e3 || 8232 === e3 || 8233 === e3;
|
|
79
77
|
}
|
|
@@ -340,8 +338,8 @@ function requireJiti() {
|
|
|
340
338
|
if (this.isAsyncFunction()) return e3 && this.unexpected(), this.next(), this.parseFunctionStatement(n2, true, !e3);
|
|
341
339
|
var c2 = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
|
|
342
340
|
if (c2) return t3 && "script" === this.options.sourceType && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), "await using" === c2 && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(n2, false, c2), this.semicolon(), this.finishNode(n2, "VariableDeclaration");
|
|
343
|
-
var
|
|
344
|
-
return r2 === f.name && "Identifier" === l2.type && this.eat(f.colon) ? this.parseLabeledStatement(n2,
|
|
341
|
+
var p2 = this.value, l2 = this.parseExpression();
|
|
342
|
+
return r2 === f.name && "Identifier" === l2.type && this.eat(f.colon) ? this.parseLabeledStatement(n2, p2, l2, e3) : this.parseExpressionStatement(n2, l2);
|
|
345
343
|
}
|
|
346
344
|
}, L2.parseBreakContinueStatement = function(e3, t3) {
|
|
347
345
|
var i2 = "break" === t3;
|
|
@@ -372,8 +370,8 @@ function requireJiti() {
|
|
|
372
370
|
var h3 = this.startNode();
|
|
373
371
|
return this.next(), "await using" === o2 && this.next(), this.parseVar(h3, true, o2), this.finishNode(h3, "VariableDeclaration"), this.parseForAfterInit(e3, h3, t3);
|
|
374
372
|
}
|
|
375
|
-
var c2 = this.containsEsc,
|
|
376
|
-
return this.type === f._in || (a2 = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t3 > -1 ? (this.type === f._in && this.unexpected(t3), e3.await = true) : a2 && this.options.ecmaVersion >= 8 && (u2.start !== l2 || c2 || "Identifier" !== u2.type || "async" !== u2.name ? this.options.ecmaVersion >= 9 && (e3.await = false) : this.unexpected()), n2 && a2 && this.raise(u2.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(u2, false,
|
|
373
|
+
var c2 = this.containsEsc, p2 = new acorn_DestructuringErrors(), l2 = this.start, u2 = t3 > -1 ? this.parseExprSubscripts(p2, "await") : this.parseExpression(true, p2);
|
|
374
|
+
return this.type === f._in || (a2 = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (t3 > -1 ? (this.type === f._in && this.unexpected(t3), e3.await = true) : a2 && this.options.ecmaVersion >= 8 && (u2.start !== l2 || c2 || "Identifier" !== u2.type || "async" !== u2.name ? this.options.ecmaVersion >= 9 && (e3.await = false) : this.unexpected()), n2 && a2 && this.raise(u2.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(u2, false, p2), this.checkLValPattern(u2), this.parseForIn(e3, u2)) : (this.checkExpressionErrors(p2, true), t3 > -1 && this.unexpected(t3), this.parseFor(e3, u2));
|
|
377
375
|
}, L2.parseForAfterInit = function(e3, t3, i2) {
|
|
378
376
|
return (this.type === f._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && 1 === t3.declarations.length ? (this.options.ecmaVersion >= 9 && (this.type === f._in ? i2 > -1 && this.unexpected(i2) : e3.await = i2 > -1), this.parseForIn(e3, t3)) : (i2 > -1 && this.unexpected(i2), this.parseFor(e3, t3));
|
|
379
377
|
}, L2.parseFunctionStatement = function(e3, t3, i2) {
|
|
@@ -480,8 +478,8 @@ function requireJiti() {
|
|
|
480
478
|
(this.eatContextual("get") || this.eatContextual("set")) && (this.isClassElementNameStart() ? a2 = h3 : s2 = h3);
|
|
481
479
|
}
|
|
482
480
|
if (s2 ? (i2.computed = false, i2.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc), i2.key.name = s2, this.finishNode(i2.key, "Identifier")) : this.parseClassElementName(i2), t3 < 13 || this.type === f.parenL || "method" !== a2 || r2 || n2) {
|
|
483
|
-
var c2 = !i2.static && checkKeyName(i2, "constructor"),
|
|
484
|
-
c2 && "method" !== a2 && this.raise(i2.key.start, "Constructor can't have get/set modifier"), i2.kind = c2 ? "constructor" : a2, this.parseClassMethod(i2, r2, n2,
|
|
481
|
+
var c2 = !i2.static && checkKeyName(i2, "constructor"), p2 = c2 && e3;
|
|
482
|
+
c2 && "method" !== a2 && this.raise(i2.key.start, "Constructor can't have get/set modifier"), i2.kind = c2 ? "constructor" : a2, this.parseClassMethod(i2, r2, n2, p2);
|
|
485
483
|
} else this.parseClassField(i2);
|
|
486
484
|
return i2;
|
|
487
485
|
}, L2.isClassElementNameStart = function() {
|
|
@@ -865,8 +863,8 @@ function requireJiti() {
|
|
|
865
863
|
this.type !== f.parenL && this.type !== f.name || (this.potentialArrowAt = this.start, this.potentialArrowInForAwait = "await" === e3);
|
|
866
864
|
var c2 = this.parseMaybeConditional(e3, t3);
|
|
867
865
|
if (i2 && (c2 = i2.call(this, c2, o2, h3)), this.type.isAssign) {
|
|
868
|
-
var
|
|
869
|
-
return
|
|
866
|
+
var p2 = this.startNodeAt(o2, h3);
|
|
867
|
+
return p2.operator = this.value, this.type === f.eq && (c2 = this.toAssignable(c2, false, t3)), s2 || (t3.parenthesizedAssign = t3.trailingComma = t3.doubleProto = -1), t3.shorthandAssign >= c2.start && (t3.shorthandAssign = -1), this.type === f.eq ? this.checkLValPattern(c2) : this.checkLValSimple(c2), p2.left = c2, this.next(), p2.right = this.parseMaybeAssign(e3), a2 > -1 && (t3.doubleProto = a2), this.finishNode(p2, "AssignmentExpression");
|
|
870
868
|
}
|
|
871
869
|
return s2 && this.checkExpressionErrors(t3, true), r2 > -1 && (t3.parenthesizedAssign = r2), n2 > -1 && (t3.trailingComma = n2), c2;
|
|
872
870
|
}, $2.parseMaybeConditional = function(e3, t3) {
|
|
@@ -887,7 +885,7 @@ function requireJiti() {
|
|
|
887
885
|
o2 && (n2 = f.logicalAND.binop);
|
|
888
886
|
var h3 = this.value;
|
|
889
887
|
this.next();
|
|
890
|
-
var c2 = this.start,
|
|
888
|
+
var c2 = this.start, p2 = this.startLoc, l2 = this.parseExprOp(this.parseMaybeUnary(null, false, false, r2), c2, p2, n2, r2), u2 = this.buildBinary(t3, i2, e3, l2, h3, a2 || o2);
|
|
891
889
|
return (a2 && this.type === f.coalesce || o2 && (this.type === f.logicalOR || this.type === f.logicalAND)) && this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"), this.parseExprOp(u2, t3, i2, s2, r2);
|
|
892
890
|
}
|
|
893
891
|
return e3;
|
|
@@ -935,16 +933,16 @@ function requireJiti() {
|
|
|
935
933
|
s2 && h3 && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
936
934
|
var c2 = this.eat(f.bracketL);
|
|
937
935
|
if (c2 || h3 && this.type !== f.parenL && this.type !== f.backQuote || this.eat(f.dot)) {
|
|
938
|
-
var
|
|
939
|
-
|
|
936
|
+
var p2 = this.startNodeAt(t3, i2);
|
|
937
|
+
p2.object = e3, c2 ? (p2.property = this.parseExpression(), this.expect(f.bracketR)) : this.type === f.privateId && "Super" !== e3.type ? p2.property = this.parsePrivateIdent() : p2.property = this.parseIdent("never" !== this.options.allowReserved), p2.computed = !!c2, o2 && (p2.optional = h3), e3 = this.finishNode(p2, "MemberExpression");
|
|
940
938
|
} else if (!s2 && this.eat(f.parenL)) {
|
|
941
939
|
var l2 = new acorn_DestructuringErrors(), u2 = this.yieldPos, d3 = this.awaitPos, m2 = this.awaitIdentPos;
|
|
942
940
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
943
|
-
var
|
|
944
|
-
if (r2 && !h3 && this.shouldParseAsyncArrow()) return this.checkPatternErrors(l2, false), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = u2, this.awaitPos = d3, this.awaitIdentPos = m2, this.parseSubscriptAsyncArrow(t3, i2,
|
|
941
|
+
var g2 = this.parseExprList(f.parenR, this.options.ecmaVersion >= 8, false, l2);
|
|
942
|
+
if (r2 && !h3 && this.shouldParseAsyncArrow()) return this.checkPatternErrors(l2, false), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = u2, this.awaitPos = d3, this.awaitIdentPos = m2, this.parseSubscriptAsyncArrow(t3, i2, g2, a2);
|
|
945
943
|
this.checkExpressionErrors(l2, true), this.yieldPos = u2 || this.yieldPos, this.awaitPos = d3 || this.awaitPos, this.awaitIdentPos = m2 || this.awaitIdentPos;
|
|
946
944
|
var x3 = this.startNodeAt(t3, i2);
|
|
947
|
-
x3.callee = e3, x3.arguments =
|
|
945
|
+
x3.callee = e3, x3.arguments = g2, o2 && (x3.optional = h3), e3 = this.finishNode(x3, "CallExpression");
|
|
948
946
|
} else if (this.type === f.backQuote) {
|
|
949
947
|
(h3 || n2) && this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions");
|
|
950
948
|
var v3 = this.startNodeAt(t3, i2);
|
|
@@ -978,8 +976,8 @@ function requireJiti() {
|
|
|
978
976
|
case f._false:
|
|
979
977
|
return (s2 = this.startNode()).value = this.type === f._null ? null : this.type === f._true, s2.raw = this.type.keyword, this.next(), this.finishNode(s2, "Literal");
|
|
980
978
|
case f.parenL:
|
|
981
|
-
var
|
|
982
|
-
return e3 && (e3.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(l2) && (e3.parenthesizedAssign =
|
|
979
|
+
var p2 = this.start, l2 = this.parseParenAndDistinguishExpression(r2, t3);
|
|
980
|
+
return e3 && (e3.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(l2) && (e3.parenthesizedAssign = p2), e3.parenthesizedBind < 0 && (e3.parenthesizedBind = p2)), l2;
|
|
983
981
|
case f.bracketL:
|
|
984
982
|
return s2 = this.startNode(), this.next(), s2.elements = this.parseExprList(f.bracketR, true, true, e3), this.finishNode(s2, "ArrayExpression");
|
|
985
983
|
case f.braceL:
|
|
@@ -1031,9 +1029,9 @@ function requireJiti() {
|
|
|
1031
1029
|
var i2, s2 = this.start, r2 = this.startLoc, n2 = this.options.ecmaVersion >= 8;
|
|
1032
1030
|
if (this.options.ecmaVersion >= 6) {
|
|
1033
1031
|
this.next();
|
|
1034
|
-
var a2, o2 = this.start, h3 = this.startLoc, c2 = [],
|
|
1032
|
+
var a2, o2 = this.start, h3 = this.startLoc, c2 = [], p2 = true, l2 = false, u2 = new acorn_DestructuringErrors(), d3 = this.yieldPos, m2 = this.awaitPos;
|
|
1035
1033
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== f.parenR; ) {
|
|
1036
|
-
if (
|
|
1034
|
+
if (p2 ? p2 = false : this.expect(f.comma), n2 && this.afterTrailingComma(f.parenR, true)) {
|
|
1037
1035
|
l2 = true;
|
|
1038
1036
|
break;
|
|
1039
1037
|
}
|
|
@@ -1043,9 +1041,9 @@ function requireJiti() {
|
|
|
1043
1041
|
}
|
|
1044
1042
|
c2.push(this.parseMaybeAssign(false, u2, this.parseParenItem));
|
|
1045
1043
|
}
|
|
1046
|
-
var
|
|
1044
|
+
var g2 = this.lastTokEnd, x3 = this.lastTokEndLoc;
|
|
1047
1045
|
if (this.expect(f.parenR), e3 && this.shouldParseArrow(c2) && this.eat(f.arrow)) return this.checkPatternErrors(u2, false), this.checkYieldAwaitInDefaultParams(), this.yieldPos = d3, this.awaitPos = m2, this.parseParenArrowList(s2, r2, c2, t3);
|
|
1048
|
-
c2.length && !l2 || this.unexpected(this.lastTokStart), a2 && this.unexpected(a2), this.checkExpressionErrors(u2, true), this.yieldPos = d3 || this.yieldPos, this.awaitPos = m2 || this.awaitPos, c2.length > 1 ? ((i2 = this.startNodeAt(o2, h3)).expressions = c2, this.finishNodeAt(i2, "SequenceExpression",
|
|
1046
|
+
c2.length && !l2 || this.unexpected(this.lastTokStart), a2 && this.unexpected(a2), this.checkExpressionErrors(u2, true), this.yieldPos = d3 || this.yieldPos, this.awaitPos = m2 || this.awaitPos, c2.length > 1 ? ((i2 = this.startNodeAt(o2, h3)).expressions = c2, this.finishNodeAt(i2, "SequenceExpression", g2, x3)) : i2 = c2[0];
|
|
1049
1047
|
} else i2 = this.parseParenExpression();
|
|
1050
1048
|
if (this.options.preserveParens) {
|
|
1051
1049
|
var v3 = this.startNodeAt(s2, r2);
|
|
@@ -1944,11 +1942,11 @@ function requireJiti() {
|
|
|
1944
1942
|
return this.finishToken(f.regexp, { pattern: r2, flags: a2, value: h3 });
|
|
1945
1943
|
}, ce2.readInt = function(e3, t3, i2) {
|
|
1946
1944
|
for (var s2 = this.options.ecmaVersion >= 12 && void 0 === t3, r2 = i2 && 48 === this.input.charCodeAt(this.pos), n2 = this.pos, a2 = 0, o2 = 0, h3 = 0, c2 = null == t3 ? 1 / 0 : t3; h3 < c2; ++h3, ++this.pos) {
|
|
1947
|
-
var
|
|
1948
|
-
if (s2 && 95 ===
|
|
1945
|
+
var p2 = this.input.charCodeAt(this.pos), l2 = void 0;
|
|
1946
|
+
if (s2 && 95 === p2) r2 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"), 95 === o2 && this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"), 0 === h3 && this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"), o2 = p2;
|
|
1949
1947
|
else {
|
|
1950
|
-
if ((l2 =
|
|
1951
|
-
o2 =
|
|
1948
|
+
if ((l2 = p2 >= 97 ? p2 - 97 + 10 : p2 >= 65 ? p2 - 65 + 10 : p2 >= 48 && p2 <= 57 ? p2 - 48 : 1 / 0) >= e3) break;
|
|
1949
|
+
o2 = p2, a2 = a2 * e3 + l2;
|
|
1952
1950
|
}
|
|
1953
1951
|
}
|
|
1954
1952
|
return s2 && 95 === o2 && this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"), this.pos === n2 || null != t3 && this.pos - n2 !== t3 ? null : a2;
|
|
@@ -2095,7 +2093,7 @@ function requireJiti() {
|
|
|
2095
2093
|
var e3 = this.readWord1(), t3 = f.name;
|
|
2096
2094
|
return this.keywords.test(e3) && (t3 = d2[e3]), this.finishToken(t3, e3);
|
|
2097
2095
|
};
|
|
2098
|
-
acorn_Parser.acorn = { Parser: acorn_Parser, version: "8.15.0", defaultOptions: I2, Position: acorn_Position, SourceLocation: acorn_SourceLocation, getLineInfo, Node: acorn_Node, TokenType: acorn_TokenType, tokTypes: f, keywordTypes: d2, TokContext: acorn_TokContext, tokContexts: F2, isIdentifierChar, isIdentifierStart, Token: acorn_Token, isNewLine, lineBreak: m, lineBreakG:
|
|
2096
|
+
acorn_Parser.acorn = { Parser: acorn_Parser, version: "8.15.0", defaultOptions: I2, Position: acorn_Position, SourceLocation: acorn_SourceLocation, getLineInfo, Node: acorn_Node, TokenType: acorn_TokenType, tokTypes: f, keywordTypes: d2, TokContext: acorn_TokContext, tokContexts: F2, isIdentifierChar, isIdentifierStart, Token: acorn_Token, isNewLine, lineBreak: m, lineBreakG: g, nonASCIIwhitespace: x2 };
|
|
2099
2097
|
const le2 = require$$1, ue2 = require$$2;
|
|
2100
2098
|
const fe2 = /^\.?\//;
|
|
2101
2099
|
function withTrailingSlash(e3 = "", t3) {
|
|
@@ -2116,7 +2114,7 @@ function requireJiti() {
|
|
|
2116
2114
|
function pathe_M_eThtNZ_normalizeWindowsPath(e3 = "") {
|
|
2117
2115
|
return e3 ? e3.replace(/\\/g, "/").replace(me2, (e4) => e4.toUpperCase()) : e3;
|
|
2118
2116
|
}
|
|
2119
|
-
const ge2 = /^[/\\]{2}/,
|
|
2117
|
+
const ge2 = /^[/\\]{2}/, xe2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, ve2 = /^[A-Za-z]:$/, ye2 = /.(\.[^./]+|\.)$/, pathe_M_eThtNZ_normalize = function(e3) {
|
|
2120
2118
|
if (0 === e3.length) return ".";
|
|
2121
2119
|
const t3 = (e3 = pathe_M_eThtNZ_normalizeWindowsPath(e3)).match(ge2), i2 = isAbsolute(e3), s2 = "/" === e3[e3.length - 1];
|
|
2122
2120
|
return 0 === (e3 = normalizeString(e3, !i2)).length ? i2 ? "/" : s2 ? "./" : "." : (s2 && (e3 += "/"), ve2.test(e3) && (e3 += "/"), t3 ? i2 ? `//${e3}` : `//./${e3}` : i2 && !isAbsolute(e3) ? `/${e3}` : e3);
|
|
@@ -2169,7 +2167,7 @@ function requireJiti() {
|
|
|
2169
2167
|
return i2;
|
|
2170
2168
|
}
|
|
2171
2169
|
const isAbsolute = function(e3) {
|
|
2172
|
-
return
|
|
2170
|
+
return xe2.test(e3);
|
|
2173
2171
|
}, extname = function(e3) {
|
|
2174
2172
|
if (".." === e3) return "";
|
|
2175
2173
|
const t3 = ye2.exec(pathe_M_eThtNZ_normalizeWindowsPath(e3));
|
|
@@ -2188,11 +2186,11 @@ function requireJiti() {
|
|
|
2188
2186
|
}
|
|
2189
2187
|
}
|
|
2190
2188
|
return s2;
|
|
2191
|
-
}, _e2 = require$$3, Ee2 = require$$4, be2 = require$$5, Se2 = path,
|
|
2189
|
+
}, _e2 = require$$3, Ee2 = require$$4, be2 = require$$5, Se2 = path, ke2 = require$$7, we2 = require$$8, Ie2 = new Set(le2.builtinModules);
|
|
2192
2190
|
function normalizeSlash(e3) {
|
|
2193
2191
|
return e3.replace(/\\/g, "/");
|
|
2194
2192
|
}
|
|
2195
|
-
const Ce2 = {}.hasOwnProperty, Re2 = /^([A-Z][a-z\d]*)+$/,
|
|
2193
|
+
const Ce2 = {}.hasOwnProperty, Re2 = /^([A-Z][a-z\d]*)+$/, Pe2 = /* @__PURE__ */ new Set(["string", "function", "number", "object", "Function", "Object", "boolean", "bigint", "symbol"]), Te2 = {};
|
|
2196
2194
|
function formatList(e3, t3 = "and") {
|
|
2197
2195
|
return e3.length < 3 ? e3.join(` ${t3} `) : `${e3.slice(0, -1).join(", ")}, ${t3} ${e3[e3.length - 1]}`;
|
|
2198
2196
|
}
|
|
@@ -2222,7 +2220,7 @@ function requireJiti() {
|
|
|
2222
2220
|
}
|
|
2223
2221
|
function isErrorStackTraceLimitWritable() {
|
|
2224
2222
|
try {
|
|
2225
|
-
if (
|
|
2223
|
+
if (ke2.startupSnapshot.isBuildingSnapshot()) return false;
|
|
2226
2224
|
} catch {
|
|
2227
2225
|
}
|
|
2228
2226
|
const e3 = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
@@ -2238,7 +2236,7 @@ function requireJiti() {
|
|
|
2238
2236
|
}
|
|
2239
2237
|
s2 += "must be ";
|
|
2240
2238
|
const r2 = [], n2 = [], a2 = [];
|
|
2241
|
-
for (const e4 of t3) Ee2("string" == typeof e4, "All expected entries have to be of type string"),
|
|
2239
|
+
for (const e4 of t3) Ee2("string" == typeof e4, "All expected entries have to be of type string"), Pe2.has(e4) ? r2.push(e4.toLowerCase()) : null === Re2.exec(e4) ? (Ee2("object" !== e4, 'The value "object" should be written as "Object"'), a2.push(e4)) : n2.push(e4);
|
|
2242
2240
|
if (n2.length > 0) {
|
|
2243
2241
|
const e4 = r2.indexOf("object");
|
|
2244
2242
|
-1 !== e4 && (r2.slice(e4, 1), n2.push("Object"));
|
|
@@ -2266,9 +2264,9 @@ function requireJiti() {
|
|
|
2266
2264
|
const t3 = isErrorStackTraceLimitWritable();
|
|
2267
2265
|
return t3 && (Ne2 = Error.stackTraceLimit, Error.stackTraceLimit = Number.POSITIVE_INFINITY), Error.captureStackTrace(e3), t3 && (Error.stackTraceLimit = Ne2), e3;
|
|
2268
2266
|
});
|
|
2269
|
-
const Oe2 = {}.hasOwnProperty, { ERR_INVALID_PACKAGE_CONFIG:
|
|
2267
|
+
const Oe2 = {}.hasOwnProperty, { ERR_INVALID_PACKAGE_CONFIG: De2 } = Te2, Ve2 = /* @__PURE__ */ new Map();
|
|
2270
2268
|
function read(e3, { base: t3, specifier: i2 }) {
|
|
2271
|
-
const s2 =
|
|
2269
|
+
const s2 = Ve2.get(e3);
|
|
2272
2270
|
if (s2) return s2;
|
|
2273
2271
|
let r2;
|
|
2274
2272
|
try {
|
|
@@ -2283,12 +2281,12 @@ function requireJiti() {
|
|
|
2283
2281
|
try {
|
|
2284
2282
|
s3 = JSON.parse(r2);
|
|
2285
2283
|
} catch (s4) {
|
|
2286
|
-
const r3 = s4, n3 = new
|
|
2284
|
+
const r3 = s4, n3 = new De2(e3, (t3 ? `"${i2}" from ` : "") + (0, _e2.fileURLToPath)(t3 || i2), r3.message);
|
|
2287
2285
|
throw n3.cause = r3, n3;
|
|
2288
2286
|
}
|
|
2289
2287
|
n2.exists = true, Oe2.call(s3, "name") && "string" == typeof s3.name && (n2.name = s3.name), Oe2.call(s3, "main") && "string" == typeof s3.main && (n2.main = s3.main), Oe2.call(s3, "exports") && (n2.exports = s3.exports), Oe2.call(s3, "imports") && (n2.imports = s3.imports), !Oe2.call(s3, "type") || "commonjs" !== s3.type && "module" !== s3.type || (n2.type = s3.type);
|
|
2290
2288
|
}
|
|
2291
|
-
return
|
|
2289
|
+
return Ve2.set(e3, n2), n2;
|
|
2292
2290
|
}
|
|
2293
2291
|
function getPackageScopeConfig(e3) {
|
|
2294
2292
|
let t3 = new URL("package.json", e3);
|
|
@@ -2305,7 +2303,7 @@ function requireJiti() {
|
|
|
2305
2303
|
return getPackageScopeConfig(e3).type;
|
|
2306
2304
|
}
|
|
2307
2305
|
const { ERR_UNKNOWN_FILE_EXTENSION: Ue } = Te2, Me = {}.hasOwnProperty, je2 = { __proto__: null, ".cjs": "commonjs", ".js": "module", ".json": "json", ".mjs": "module" };
|
|
2308
|
-
const
|
|
2306
|
+
const Fe2 = { __proto__: null, "data:": function(e3) {
|
|
2309
2307
|
const { 1: t3 } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e3.pathname) || [null, null, null];
|
|
2310
2308
|
return (function(e4) {
|
|
2311
2309
|
return e4 && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e4) ? "module" : "application/json" === e4 ? "json" : null;
|
|
@@ -2347,7 +2345,7 @@ function requireJiti() {
|
|
|
2347
2345
|
if (be2.noDeprecation) return;
|
|
2348
2346
|
const r2 = (function(e4, t4) {
|
|
2349
2347
|
const i3 = e4.protocol;
|
|
2350
|
-
return Me.call(
|
|
2348
|
+
return Me.call(Fe2, i3) && Fe2[i3](e4, t4, true) || null;
|
|
2351
2349
|
})(e3, { parentURL: i2.href });
|
|
2352
2350
|
if ("module" !== r2) return;
|
|
2353
2351
|
const n2 = (0, _e2.fileURLToPath)(e3.href), a2 = (0, _e2.fileURLToPath)(new _e2.URL(".", t3)), o2 = (0, _e2.fileURLToPath)(i2);
|
|
@@ -2408,8 +2406,8 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
2408
2406
|
emitInvalidSegmentDeprecation(n2 ? Be2.call(et, e3, () => t3) : e3, o3, i2, s2, a2, r2, true);
|
|
2409
2407
|
}
|
|
2410
2408
|
}
|
|
2411
|
-
const c2 = new _e2.URL(e3, s2),
|
|
2412
|
-
if (!
|
|
2409
|
+
const c2 = new _e2.URL(e3, s2), p2 = c2.pathname, l2 = new _e2.URL(".", s2).pathname;
|
|
2410
|
+
if (!p2.startsWith(l2)) throw invalidPackageTarget(i2, e3, s2, a2, r2);
|
|
2413
2411
|
if ("" === t3) return c2;
|
|
2414
2412
|
if (null !== Qe.exec(t3)) {
|
|
2415
2413
|
const h4 = n2 ? i2.replace("*", () => t3) : i2 + t3;
|
|
@@ -2433,32 +2431,32 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
2433
2431
|
if (Array.isArray(t3)) {
|
|
2434
2432
|
const c2 = t3;
|
|
2435
2433
|
if (0 === c2.length) return null;
|
|
2436
|
-
let
|
|
2434
|
+
let p2, l2 = -1;
|
|
2437
2435
|
for (; ++l2 < c2.length; ) {
|
|
2438
2436
|
const t4 = c2[l2];
|
|
2439
2437
|
let u2;
|
|
2440
2438
|
try {
|
|
2441
2439
|
u2 = resolvePackageTarget(e3, t4, i2, s2, r2, n2, a2, o2, h3);
|
|
2442
2440
|
} catch (e4) {
|
|
2443
|
-
if (
|
|
2441
|
+
if (p2 = e4, "ERR_INVALID_PACKAGE_TARGET" === e4.code) continue;
|
|
2444
2442
|
throw e4;
|
|
2445
2443
|
}
|
|
2446
2444
|
if (void 0 !== u2) {
|
|
2447
2445
|
if (null !== u2) return u2;
|
|
2448
|
-
|
|
2446
|
+
p2 = null;
|
|
2449
2447
|
}
|
|
2450
2448
|
}
|
|
2451
|
-
if (null ==
|
|
2452
|
-
throw
|
|
2449
|
+
if (null == p2) return null;
|
|
2450
|
+
throw p2;
|
|
2453
2451
|
}
|
|
2454
2452
|
if ("object" == typeof t3 && null !== t3) {
|
|
2455
2453
|
const c2 = Object.getOwnPropertyNames(t3);
|
|
2456
|
-
let
|
|
2457
|
-
for (; ++
|
|
2458
|
-
if (isArrayIndex(c2[
|
|
2454
|
+
let p2 = -1;
|
|
2455
|
+
for (; ++p2 < c2.length; ) {
|
|
2456
|
+
if (isArrayIndex(c2[p2])) throw new qe((0, _e2.fileURLToPath)(e3), r2, '"exports" cannot contain numeric property keys.');
|
|
2459
2457
|
}
|
|
2460
|
-
for (
|
|
2461
|
-
const l2 = c2[
|
|
2458
|
+
for (p2 = -1; ++p2 < c2.length; ) {
|
|
2459
|
+
const l2 = c2[p2];
|
|
2462
2460
|
if ("default" === l2 || h3 && h3.has(l2)) {
|
|
2463
2461
|
const c3 = resolvePackageTarget(e3, t3[l2], i2, s2, r2, n2, a2, o2, h3);
|
|
2464
2462
|
if (void 0 === c3) continue;
|
|
@@ -2568,8 +2566,8 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
2568
2566
|
o2 = c2, h3 = new _e2.URL((n2 ? "../../../../node_modules/" : "../../../node_modules/") + s2 + "/package.json", h3), c2 = (0, _e2.fileURLToPath)(h3);
|
|
2569
2567
|
continue;
|
|
2570
2568
|
}
|
|
2571
|
-
const
|
|
2572
|
-
return void 0 !==
|
|
2569
|
+
const p2 = read(c2, { base: t3, specifier: e3 });
|
|
2570
|
+
return void 0 !== p2.exports && null !== p2.exports ? packageExportsResolve(h3, r2, p2, t3, i2) : "." === r2 ? legacyMainResolve(h3, p2, t3) : new _e2.URL(r2, h3);
|
|
2573
2571
|
} while (c2.length !== o2.length);
|
|
2574
2572
|
throw new Ge(s2, (0, _e2.fileURLToPath)(t3), false);
|
|
2575
2573
|
}
|
|
@@ -2645,14 +2643,14 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
2645
2643
|
e3 = fileURLToPath(e3);
|
|
2646
2644
|
}
|
|
2647
2645
|
if (/(?:node|data|http|https):/.test(e3)) return e3;
|
|
2648
|
-
if (
|
|
2646
|
+
if (Ie2.has(e3)) return "node:" + e3;
|
|
2649
2647
|
if (e3.startsWith("file://") && (e3 = fileURLToPath(e3)), isAbsolute(e3)) try {
|
|
2650
2648
|
if ((0, ue2.statSync)(e3).isFile()) return pathToFileURL(e3);
|
|
2651
2649
|
} catch (e4) {
|
|
2652
2650
|
if ("ENOENT" !== e4?.code) throw e4;
|
|
2653
2651
|
}
|
|
2654
2652
|
const i2 = t3.conditions ? new Set(t3.conditions) : rt, s2 = (Array.isArray(t3.url) ? t3.url : [t3.url]).filter(Boolean).map((e4) => new URL((function(e5) {
|
|
2655
|
-
return "string" != typeof e5 && (e5 = e5.toString()), /(?:node|data|http|https|file):/.test(e5) ? e5 :
|
|
2653
|
+
return "string" != typeof e5 && (e5 = e5.toString()), /(?:node|data|http|https|file):/.test(e5) ? e5 : Ie2.has(e5) ? "node:" + e5 : "file://" + encodeURI(normalizeSlash(e5));
|
|
2656
2654
|
})(e4.toString())));
|
|
2657
2655
|
0 === s2.length && s2.push(new URL(pathToFileURL(process.cwd())));
|
|
2658
2656
|
const r2 = [...s2];
|
|
@@ -2947,8 +2945,8 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
2947
2945
|
} catch {
|
|
2948
2946
|
}
|
|
2949
2947
|
}
|
|
2950
|
-
})(r2)?.type, c2 = ".cjs" === n2,
|
|
2951
|
-
if (
|
|
2948
|
+
})(r2)?.type, c2 = ".cjs" === n2, p2 = i2.forceTranspile ?? (!c2 && !(h3 && i2.async) && (o2 || h3 || e3.isTransformRe.test(r2) || hasESMSyntax(t3))), l2 = Gt.performance.now();
|
|
2949
|
+
if (p2) {
|
|
2952
2950
|
t3 = transform(e3, { filename: r2, source: t3, ts: o2, async: i2.async ?? false, jsx: e3.opts.jsx });
|
|
2953
2951
|
const s3 = Math.round(1e3 * (Gt.performance.now() - l2)) / 1e3;
|
|
2954
2952
|
debug(e3, "[transpile]", i2.async ? "[esm]" : "[cjs]", r2, `(${s3}ms)`);
|
|
@@ -2977,9 +2975,9 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
2977
2975
|
return (...e5) => t5(i3).then((t6) => t6.default(...e5));
|
|
2978
2976
|
})(m2, e3.nativeImport)) : (e3.opts.moduleCache && delete e3.nativeRequire.cache[r2], e3.onError(t4));
|
|
2979
2977
|
}
|
|
2980
|
-
let
|
|
2978
|
+
let g2;
|
|
2981
2979
|
try {
|
|
2982
|
-
|
|
2980
|
+
g2 = f2(u2.exports, u2.require, u2, u2.filename, pathe_M_eThtNZ_dirname(u2.filename), d3.import, d3.esmResolve);
|
|
2983
2981
|
} catch (t4) {
|
|
2984
2982
|
e3.opts.moduleCache && delete e3.nativeRequire.cache[r2], e3.onError(t4);
|
|
2985
2983
|
}
|
|
@@ -2992,7 +2990,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
2992
2990
|
u2.loaded = true;
|
|
2993
2991
|
return jitiInteropDefault(e3, u2.exports);
|
|
2994
2992
|
}
|
|
2995
|
-
return i2.async ? Promise.resolve(
|
|
2993
|
+
return i2.async ? Promise.resolve(g2).then(next) : next();
|
|
2996
2994
|
}
|
|
2997
2995
|
const Jt = "win32" === (0, e2.platform)();
|
|
2998
2996
|
function createJiti2(e3, t3 = {}, i2, s2 = false) {
|
|
@@ -3003,7 +3001,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
3003
3001
|
return void 0 !== e4.cache && (i3.fsCache = e4.cache), void 0 !== e4.requireCache && (i3.moduleCache = e4.requireCache), { ...t4, ...i3, ...e4 };
|
|
3004
3002
|
})(t3), n2 = r2.alias && Object.keys(r2.alias).length > 0 ? normalizeAliases(r2.alias || {}) : void 0, a2 = ["typescript", "jiti", ...r2.nativeModules || []], o2 = new RegExp(`node_modules/(${a2.map((e4) => escapeStringRegexp(e4)).join("|")})/`), h3 = [...r2.transformModules || []], c2 = new RegExp(`node_modules/(${h3.map((e4) => escapeStringRegexp(e4)).join("|")})/`);
|
|
3005
3003
|
e3 || (e3 = process.cwd()), !s2 && isDir(e3) && (e3 = pathe_M_eThtNZ_join(e3, "_index.js"));
|
|
3006
|
-
const
|
|
3004
|
+
const p2 = pathToFileURL(e3), l2 = [...r2.extensions].filter((e4) => ".js" !== e4), u2 = i2.createRequire(Jt ? e3.replace(/\//g, "\\") : e3), d3 = { filename: e3, url: p2, opts: r2, alias: n2, nativeModules: a2, transformModules: h3, isNativeRe: o2, isTransformRe: c2, additionalExts: l2, nativeRequire: u2, onError: i2.onError, parentModule: i2.parentModule, parentCache: i2.parentCache, nativeImport: i2.nativeImport, createRequire: i2.createRequire };
|
|
3007
3005
|
s2 || debug(d3, "[init]", ...[["version:", ut.rE], ["module-cache:", r2.moduleCache], ["fs-cache:", r2.fsCache], ["rebuild-fs-cache:", r2.rebuildFsCache], ["interop-defaults:", r2.interopDefault]].flat()), s2 || prepareCacheDir(d3);
|
|
3008
3006
|
const f2 = Object.assign(function(e4) {
|
|
3009
3007
|
return jitiRequire(d3, e4, { async: false });
|
|
@@ -3014,7 +3012,7 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
|
|
|
3014
3012
|
return t4?.default ? i3?.default ?? i3 : i3;
|
|
3015
3013
|
}, esmResolve(e4, t4) {
|
|
3016
3014
|
"string" == typeof t4 && (t4 = { parentURL: t4 });
|
|
3017
|
-
const i3 = jitiResolve(d3, e4, { parentURL:
|
|
3015
|
+
const i3 = jitiResolve(d3, e4, { parentURL: p2, ...t4, async: true });
|
|
3018
3016
|
return !i3 || "string" != typeof i3 || i3.startsWith("file://") ? i3 : pathToFileURL(i3);
|
|
3019
3017
|
} });
|
|
3020
3018
|
return f2;
|
|
@@ -3046,193 +3044,193 @@ function createJiti(id, opts = {}) {
|
|
|
3046
3044
|
createRequire
|
|
3047
3045
|
});
|
|
3048
3046
|
}
|
|
3049
|
-
const
|
|
3047
|
+
const P$1 = ["charset", "import", "namespace"], U = ["layer"], k = ({ name: e }) => `[data-theme="${e}"]`, M = ({
|
|
3050
3048
|
name: e,
|
|
3051
3049
|
value: t,
|
|
3052
3050
|
modifiers: r
|
|
3053
|
-
}) => `._${[...r, e, ...t === "default" ? [] : [t]].filter(Boolean).join("\\:").replace(/[[\].#()%,]/g, "\\$&")}`,
|
|
3054
|
-
function
|
|
3051
|
+
}) => `._${[...r, e, ...t === "default" ? [] : [t]].filter(Boolean).join("\\:").replace(/[[\].#()%,]/g, "\\$&")}`, O = ({ name: e }) => e.replace(/^\.+|\.+$/g, "").replace(/\.+/g, "--");
|
|
3052
|
+
function V$1(e, t) {
|
|
3055
3053
|
return `@${e}${t ? " " : ""}${t}`;
|
|
3056
3054
|
}
|
|
3057
|
-
const
|
|
3058
|
-
function
|
|
3059
|
-
if (!
|
|
3055
|
+
const K$1 = /\d/, q = ["-", "_", "/", "."];
|
|
3056
|
+
function z$1(e = "") {
|
|
3057
|
+
if (!K$1.test(e))
|
|
3060
3058
|
return e !== e.toLowerCase();
|
|
3061
3059
|
}
|
|
3062
|
-
function
|
|
3063
|
-
const r =
|
|
3060
|
+
function _$1(e, t) {
|
|
3061
|
+
const r = q, o = [];
|
|
3064
3062
|
if (!e || typeof e != "string")
|
|
3065
|
-
return
|
|
3066
|
-
let
|
|
3063
|
+
return o;
|
|
3064
|
+
let n = "", s, u;
|
|
3067
3065
|
for (const a of e) {
|
|
3068
3066
|
const c = r.includes(a);
|
|
3069
3067
|
if (c === true) {
|
|
3070
|
-
|
|
3068
|
+
o.push(n), n = "", s = void 0;
|
|
3071
3069
|
continue;
|
|
3072
3070
|
}
|
|
3073
|
-
const i =
|
|
3071
|
+
const i = z$1(a);
|
|
3074
3072
|
if (u === false) {
|
|
3075
3073
|
if (s === false && i === true) {
|
|
3076
|
-
|
|
3074
|
+
o.push(n), n = a, s = i;
|
|
3077
3075
|
continue;
|
|
3078
3076
|
}
|
|
3079
|
-
if (s === true && i === false &&
|
|
3080
|
-
const f =
|
|
3081
|
-
|
|
3077
|
+
if (s === true && i === false && n.length > 1) {
|
|
3078
|
+
const f = n.at(-1);
|
|
3079
|
+
o.push(n.slice(0, Math.max(0, n.length - 1))), n = f + a, s = i;
|
|
3082
3080
|
continue;
|
|
3083
3081
|
}
|
|
3084
3082
|
}
|
|
3085
|
-
|
|
3083
|
+
n += a, s = i, u = c;
|
|
3086
3084
|
}
|
|
3087
|
-
return
|
|
3085
|
+
return o.push(n), o;
|
|
3088
3086
|
}
|
|
3089
|
-
function
|
|
3087
|
+
function H(e) {
|
|
3090
3088
|
return e ? e[0].toUpperCase() + e.slice(1) : "";
|
|
3091
3089
|
}
|
|
3092
|
-
function
|
|
3090
|
+
function Q$1(e) {
|
|
3093
3091
|
return e ? e[0].toLowerCase() + e.slice(1) : "";
|
|
3094
3092
|
}
|
|
3095
|
-
function
|
|
3096
|
-
return e ? (Array.isArray(e) ? e :
|
|
3093
|
+
function J$1(e, t) {
|
|
3094
|
+
return e ? (Array.isArray(e) ? e : _$1(e)).map((r) => H(r)).join("") : "";
|
|
3097
3095
|
}
|
|
3098
|
-
function
|
|
3099
|
-
return
|
|
3096
|
+
function Z$1(e, t) {
|
|
3097
|
+
return Q$1(J$1(e || ""));
|
|
3100
3098
|
}
|
|
3101
|
-
function
|
|
3102
|
-
return e ? (Array.isArray(e) ? e :
|
|
3099
|
+
function W(e, t) {
|
|
3100
|
+
return e ? (Array.isArray(e) ? e : _$1(e)).map((r) => r.toLowerCase()).join("-") : "";
|
|
3103
3101
|
}
|
|
3104
|
-
function
|
|
3102
|
+
function G$1(e) {
|
|
3105
3103
|
return ` ${e}`;
|
|
3106
3104
|
}
|
|
3107
|
-
function
|
|
3105
|
+
function Y$1(e) {
|
|
3108
3106
|
return e.split(`
|
|
3109
|
-
`).map((t) =>
|
|
3107
|
+
`).map((t) => G$1(t)).join(`
|
|
3110
3108
|
`);
|
|
3111
3109
|
}
|
|
3112
|
-
function
|
|
3110
|
+
function x$1(e) {
|
|
3113
3111
|
return e === e.toUpperCase();
|
|
3114
3112
|
}
|
|
3115
|
-
function
|
|
3116
|
-
return
|
|
3113
|
+
function T$1(e) {
|
|
3114
|
+
return Z$1(e);
|
|
3117
3115
|
}
|
|
3118
|
-
function
|
|
3119
|
-
return
|
|
3116
|
+
function X$1(e) {
|
|
3117
|
+
return W(e);
|
|
3120
3118
|
}
|
|
3121
|
-
function
|
|
3122
|
-
return
|
|
3119
|
+
function ee$1(e) {
|
|
3120
|
+
return X$1(e);
|
|
3123
3121
|
}
|
|
3124
|
-
function
|
|
3125
|
-
return `${e.startsWith("--") ? e :
|
|
3122
|
+
function B(e, t) {
|
|
3123
|
+
return `${e.startsWith("--") ? e : ee$1(e)}: ${t};`;
|
|
3126
3124
|
}
|
|
3127
|
-
function
|
|
3125
|
+
function te$1(e) {
|
|
3128
3126
|
return `{${e.length > 0 ? `
|
|
3129
|
-
` : ""}${e.map((t) => `${
|
|
3127
|
+
` : ""}${e.map((t) => `${Y$1(`${t}`)}
|
|
3130
3128
|
`).join("")}}`;
|
|
3131
3129
|
}
|
|
3132
3130
|
function E$1(e) {
|
|
3133
3131
|
return `--${(e.startsWith("--") ? e.slice(2) : e).replace(/[^a-zA-Z0-9_\-\u0080-\uFFFF]/g, "-") || "unknown-variable"}`;
|
|
3134
3132
|
}
|
|
3135
|
-
function
|
|
3136
|
-
return
|
|
3133
|
+
function re$1(e, t) {
|
|
3134
|
+
return B(E$1(e), t);
|
|
3137
3135
|
}
|
|
3138
|
-
function
|
|
3136
|
+
function ne$1(e, t) {
|
|
3139
3137
|
return `var(${E$1(e)}${t ? `, ${t}` : ""})`;
|
|
3140
3138
|
}
|
|
3141
|
-
function
|
|
3142
|
-
return `${e} ${
|
|
3139
|
+
function w(e, t) {
|
|
3140
|
+
return `${e} ${te$1(t)}`;
|
|
3143
3141
|
}
|
|
3144
|
-
function
|
|
3145
|
-
return function(r,
|
|
3146
|
-
return Object.entries(r).map(([
|
|
3142
|
+
function oe(e) {
|
|
3143
|
+
return function(r, o) {
|
|
3144
|
+
return Object.entries(r).map(([n, s]) => B(n, e(s, o)));
|
|
3147
3145
|
};
|
|
3148
3146
|
}
|
|
3149
|
-
function
|
|
3150
|
-
return function(r,
|
|
3151
|
-
const s = (
|
|
3152
|
-
return
|
|
3147
|
+
function F$1(e) {
|
|
3148
|
+
return function(r, o) {
|
|
3149
|
+
const s = (o.variables?.name ?? O)({ name: r.name });
|
|
3150
|
+
return re$1(s, e(r.value, o));
|
|
3153
3151
|
};
|
|
3154
3152
|
}
|
|
3155
3153
|
function S$1(e) {
|
|
3156
|
-
const t =
|
|
3157
|
-
return function(
|
|
3158
|
-
const { variables: a, declarations: c, children: i } = s, f =
|
|
3159
|
-
(
|
|
3154
|
+
const t = F$1(e), r = oe(e);
|
|
3155
|
+
return function(n, s, u) {
|
|
3156
|
+
const { variables: a, declarations: c, children: i } = s, f = n === ":root", l = (a ?? []).map(
|
|
3157
|
+
(g) => t(g, u)
|
|
3160
3158
|
), m = r(
|
|
3161
3159
|
c ?? {},
|
|
3162
3160
|
u
|
|
3163
3161
|
), y = (i ?? []).map(
|
|
3164
|
-
(
|
|
3165
|
-
),
|
|
3166
|
-
return f ? `${
|
|
3162
|
+
(g) => e(g, u)
|
|
3163
|
+
), p = l.length > 0, b = m.length > 0, j2 = y.length > 0;
|
|
3164
|
+
return f ? `${p || b ? w(n, [
|
|
3167
3165
|
...l,
|
|
3168
|
-
...
|
|
3166
|
+
...p && b ? [""] : [],
|
|
3169
3167
|
...m
|
|
3170
|
-
]) : ""}${
|
|
3168
|
+
]) : ""}${j2 && (p || b) ? `
|
|
3171
3169
|
|
|
3172
3170
|
` : ""}${y.join(`
|
|
3173
3171
|
|
|
3174
|
-
`)}` :
|
|
3172
|
+
`)}` : w(n, [
|
|
3175
3173
|
...l,
|
|
3176
|
-
...
|
|
3174
|
+
...p && (j2 || b) ? [""] : [],
|
|
3177
3175
|
...m,
|
|
3178
|
-
...b &&
|
|
3176
|
+
...b && j2 ? [""] : [],
|
|
3179
3177
|
...y.flatMap(
|
|
3180
|
-
(
|
|
3178
|
+
(g, I2) => I2 === y.length - 1 ? [g] : [g, ""]
|
|
3181
3179
|
)
|
|
3182
3180
|
]);
|
|
3183
3181
|
};
|
|
3184
3182
|
}
|
|
3185
|
-
function
|
|
3183
|
+
function ce(e) {
|
|
3186
3184
|
const t = S$1(e);
|
|
3187
|
-
return function(
|
|
3188
|
-
const s =
|
|
3189
|
-
|
|
3190
|
-
), a = Object.keys(
|
|
3191
|
-
return s || u && !(a || c || i) ? `${f};` : t(f,
|
|
3185
|
+
return function(o, n) {
|
|
3186
|
+
const s = P$1.includes(o.identifier), u = U.includes(
|
|
3187
|
+
o.identifier
|
|
3188
|
+
), a = Object.keys(o.declarations).length > 0, c = o.variables.length > 0, i = o.children.length > 0, f = V$1(o.identifier, o.rule);
|
|
3189
|
+
return s || u && !(a || c || i) ? `${f};` : t(f, o, n);
|
|
3192
3190
|
};
|
|
3193
3191
|
}
|
|
3194
|
-
function
|
|
3195
|
-
return function(r,
|
|
3196
|
-
return r.value.map((
|
|
3192
|
+
function ue$1(e) {
|
|
3193
|
+
return function(r, o) {
|
|
3194
|
+
return r.value.map((n) => e(n, o)).join("").trim();
|
|
3197
3195
|
};
|
|
3198
3196
|
}
|
|
3199
|
-
function
|
|
3197
|
+
function se$1(e) {
|
|
3200
3198
|
return typeof e == "object" && e !== null;
|
|
3201
3199
|
}
|
|
3202
|
-
function h(e, t) {
|
|
3203
|
-
return
|
|
3200
|
+
function h$1(e, t) {
|
|
3201
|
+
return se$1(e) && "type" in e && e.type === t;
|
|
3204
3202
|
}
|
|
3205
|
-
function
|
|
3206
|
-
return h(e, "variable");
|
|
3203
|
+
function ie$1(e) {
|
|
3204
|
+
return h$1(e, "variable");
|
|
3207
3205
|
}
|
|
3208
|
-
function
|
|
3209
|
-
return h(e, "reference");
|
|
3206
|
+
function ae$1(e) {
|
|
3207
|
+
return h$1(e, "reference");
|
|
3210
3208
|
}
|
|
3211
|
-
function
|
|
3212
|
-
return h(e, "selector");
|
|
3209
|
+
function C$1(e) {
|
|
3210
|
+
return h$1(e, "selector");
|
|
3213
3211
|
}
|
|
3214
|
-
function
|
|
3215
|
-
return h(e, "at-rule");
|
|
3212
|
+
function le$1(e) {
|
|
3213
|
+
return h$1(e, "at-rule");
|
|
3216
3214
|
}
|
|
3217
|
-
function
|
|
3218
|
-
return h(e, "utility");
|
|
3215
|
+
function fe(e) {
|
|
3216
|
+
return h$1(e, "utility");
|
|
3219
3217
|
}
|
|
3220
|
-
function
|
|
3221
|
-
return h(e, "css");
|
|
3218
|
+
function me$1(e) {
|
|
3219
|
+
return h$1(e, "css");
|
|
3222
3220
|
}
|
|
3223
|
-
function
|
|
3224
|
-
return h(e, "theme");
|
|
3221
|
+
function pe$1(e) {
|
|
3222
|
+
return h$1(e, "theme");
|
|
3225
3223
|
}
|
|
3226
|
-
function
|
|
3227
|
-
return h(e, "root");
|
|
3224
|
+
function N(e) {
|
|
3225
|
+
return h$1(e, "root");
|
|
3228
3226
|
}
|
|
3229
|
-
function
|
|
3230
|
-
return h(e, "recipe");
|
|
3227
|
+
function D$1(e) {
|
|
3228
|
+
return h$1(e, "recipe");
|
|
3231
3229
|
}
|
|
3232
|
-
function
|
|
3230
|
+
function L$1(e) {
|
|
3233
3231
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
3234
3232
|
}
|
|
3235
|
-
function
|
|
3233
|
+
function A$1(e) {
|
|
3236
3234
|
if (e instanceof Buffer)
|
|
3237
3235
|
return Buffer.from(e);
|
|
3238
3236
|
const t = e.constructor;
|
|
@@ -3242,81 +3240,81 @@ function g(e) {
|
|
|
3242
3240
|
e.byteLength / e.BYTES_PER_ELEMENT || 1
|
|
3243
3241
|
);
|
|
3244
3242
|
}
|
|
3245
|
-
function
|
|
3243
|
+
function ye$1(e) {
|
|
3246
3244
|
if (e = e || {}, e.circular)
|
|
3247
|
-
return
|
|
3245
|
+
return de$1(e);
|
|
3248
3246
|
const t = /* @__PURE__ */ new Map();
|
|
3249
3247
|
if (t.set(Date, (u) => new Date(u)), t.set(
|
|
3250
3248
|
Map,
|
|
3251
|
-
(u, a) => new Map(
|
|
3249
|
+
(u, a) => new Map(o(Array.from(u), a))
|
|
3252
3250
|
), t.set(
|
|
3253
3251
|
Set,
|
|
3254
|
-
(u, a) => new Set(
|
|
3252
|
+
(u, a) => new Set(o(Array.from(u), a))
|
|
3255
3253
|
), e.constructorHandlers)
|
|
3256
3254
|
for (const u of e.constructorHandlers)
|
|
3257
3255
|
t.set(u[0], u[1]);
|
|
3258
3256
|
let r;
|
|
3259
|
-
return e.proto ? s :
|
|
3260
|
-
function
|
|
3257
|
+
return e.proto ? s : n;
|
|
3258
|
+
function o(u, a) {
|
|
3261
3259
|
const c = Object.keys(u), i = Array.from({ length: c.length });
|
|
3262
3260
|
for (let f = 0; f < c.length; f++) {
|
|
3263
3261
|
const l = c[f], m = u[l];
|
|
3264
|
-
typeof m != "object" || m === null ? i[l] = m : m.constructor !== Object && (r = t.get(m.constructor)) ? i[l] = r(m, a) : ArrayBuffer.isView(m) ? i[l] =
|
|
3262
|
+
typeof m != "object" || m === null ? i[l] = m : m.constructor !== Object && (r = t.get(m.constructor)) ? i[l] = r(m, a) : ArrayBuffer.isView(m) ? i[l] = A$1(m) : i[l] = a(m);
|
|
3265
3263
|
}
|
|
3266
3264
|
return i;
|
|
3267
3265
|
}
|
|
3268
|
-
function
|
|
3266
|
+
function n(u) {
|
|
3269
3267
|
if (typeof u != "object" || u === null) return u;
|
|
3270
|
-
if (Array.isArray(u)) return
|
|
3268
|
+
if (Array.isArray(u)) return o(u, n);
|
|
3271
3269
|
if (u.constructor !== Object && (r = t.get(u.constructor)))
|
|
3272
|
-
return r(u,
|
|
3270
|
+
return r(u, n);
|
|
3273
3271
|
const a = {};
|
|
3274
3272
|
for (const c in u) {
|
|
3275
3273
|
if (Object.hasOwnProperty.call(u, c) === false) continue;
|
|
3276
3274
|
const i = u[c];
|
|
3277
|
-
typeof i != "object" || i === null ? a[c] = i : i.constructor !== Object && (r = t.get(i.constructor)) ? a[c] = r(i,
|
|
3275
|
+
typeof i != "object" || i === null ? a[c] = i : i.constructor !== Object && (r = t.get(i.constructor)) ? a[c] = r(i, n) : ArrayBuffer.isView(i) ? a[c] = A$1(i) : a[c] = n(i);
|
|
3278
3276
|
}
|
|
3279
3277
|
return a;
|
|
3280
3278
|
}
|
|
3281
3279
|
function s(u) {
|
|
3282
3280
|
if (typeof u != "object" || u === null) return u;
|
|
3283
|
-
if (Array.isArray(u)) return
|
|
3281
|
+
if (Array.isArray(u)) return o(u, s);
|
|
3284
3282
|
if (u.constructor !== Object && (r = t.get(u.constructor)))
|
|
3285
3283
|
return r(u, s);
|
|
3286
3284
|
const a = {};
|
|
3287
3285
|
for (const c in u) {
|
|
3288
3286
|
const i = u[c];
|
|
3289
|
-
typeof i != "object" || i === null ? a[c] = i : i.constructor !== Object && (r = t.get(i.constructor)) ? a[c] = r(i, s) : ArrayBuffer.isView(i) ? a[c] =
|
|
3287
|
+
typeof i != "object" || i === null ? a[c] = i : i.constructor !== Object && (r = t.get(i.constructor)) ? a[c] = r(i, s) : ArrayBuffer.isView(i) ? a[c] = A$1(i) : a[c] = s(i);
|
|
3290
3288
|
}
|
|
3291
3289
|
return a;
|
|
3292
3290
|
}
|
|
3293
3291
|
}
|
|
3294
|
-
function
|
|
3295
|
-
const t = [], r = [],
|
|
3296
|
-
if (
|
|
3292
|
+
function de$1(e) {
|
|
3293
|
+
const t = [], r = [], o = /* @__PURE__ */ new Map();
|
|
3294
|
+
if (o.set(Date, (c) => new Date(c)), o.set(
|
|
3297
3295
|
Map,
|
|
3298
3296
|
(c, i) => new Map(s(Array.from(c), i))
|
|
3299
|
-
),
|
|
3297
|
+
), o.set(
|
|
3300
3298
|
Set,
|
|
3301
3299
|
(c, i) => new Set(s(Array.from(c), i))
|
|
3302
3300
|
), e.constructorHandlers)
|
|
3303
3301
|
for (const c of e.constructorHandlers)
|
|
3304
|
-
|
|
3305
|
-
let
|
|
3302
|
+
o.set(c[0], c[1]);
|
|
3303
|
+
let n;
|
|
3306
3304
|
return e.proto ? a : u;
|
|
3307
3305
|
function s(c, i) {
|
|
3308
3306
|
const f = Object.keys(c), l = Array.from({ length: f.length });
|
|
3309
3307
|
for (let m = 0; m < f.length; m++) {
|
|
3310
|
-
const y = f[m],
|
|
3311
|
-
if (typeof
|
|
3312
|
-
l[y] =
|
|
3313
|
-
else if (
|
|
3314
|
-
l[y] =
|
|
3315
|
-
else if (ArrayBuffer.isView(
|
|
3316
|
-
l[y] =
|
|
3308
|
+
const y = f[m], p = c[y];
|
|
3309
|
+
if (typeof p != "object" || p === null)
|
|
3310
|
+
l[y] = p;
|
|
3311
|
+
else if (p.constructor !== Object && (n = o.get(p.constructor)))
|
|
3312
|
+
l[y] = n(p, i);
|
|
3313
|
+
else if (ArrayBuffer.isView(p))
|
|
3314
|
+
l[y] = A$1(p);
|
|
3317
3315
|
else {
|
|
3318
|
-
const b = t.indexOf(
|
|
3319
|
-
b !== -1 ? l[y] = r[b] : l[y] = i(
|
|
3316
|
+
const b = t.indexOf(p);
|
|
3317
|
+
b !== -1 ? l[y] = r[b] : l[y] = i(p);
|
|
3320
3318
|
}
|
|
3321
3319
|
}
|
|
3322
3320
|
return l;
|
|
@@ -3324,8 +3322,8 @@ function ye$1(e) {
|
|
|
3324
3322
|
function u(c) {
|
|
3325
3323
|
if (typeof c != "object" || c === null) return c;
|
|
3326
3324
|
if (Array.isArray(c)) return s(c, u);
|
|
3327
|
-
if (c.constructor !== Object && (
|
|
3328
|
-
return
|
|
3325
|
+
if (c.constructor !== Object && (n = o.get(c.constructor)))
|
|
3326
|
+
return n(c, u);
|
|
3329
3327
|
const i = {};
|
|
3330
3328
|
t.push(c), r.push(i);
|
|
3331
3329
|
for (const f in c) {
|
|
@@ -3333,10 +3331,10 @@ function ye$1(e) {
|
|
|
3333
3331
|
const l = c[f];
|
|
3334
3332
|
if (typeof l != "object" || l === null)
|
|
3335
3333
|
i[f] = l;
|
|
3336
|
-
else if (l.constructor !== Object && (
|
|
3337
|
-
i[f] =
|
|
3334
|
+
else if (l.constructor !== Object && (n = o.get(l.constructor)))
|
|
3335
|
+
i[f] = n(l, u);
|
|
3338
3336
|
else if (ArrayBuffer.isView(l))
|
|
3339
|
-
i[f] =
|
|
3337
|
+
i[f] = A$1(l);
|
|
3340
3338
|
else {
|
|
3341
3339
|
const m = t.indexOf(l);
|
|
3342
3340
|
m !== -1 ? i[f] = r[m] : i[f] = u(l);
|
|
@@ -3347,18 +3345,18 @@ function ye$1(e) {
|
|
|
3347
3345
|
function a(c) {
|
|
3348
3346
|
if (typeof c != "object" || c === null) return c;
|
|
3349
3347
|
if (Array.isArray(c)) return s(c, a);
|
|
3350
|
-
if (c.constructor !== Object && (
|
|
3351
|
-
return
|
|
3348
|
+
if (c.constructor !== Object && (n = o.get(c.constructor)))
|
|
3349
|
+
return n(c, a);
|
|
3352
3350
|
const i = {};
|
|
3353
3351
|
t.push(c), r.push(i);
|
|
3354
3352
|
for (const f in c) {
|
|
3355
3353
|
const l = c[f];
|
|
3356
3354
|
if (typeof l != "object" || l === null)
|
|
3357
3355
|
i[f] = l;
|
|
3358
|
-
else if (l.constructor !== Object && (
|
|
3359
|
-
i[f] =
|
|
3356
|
+
else if (l.constructor !== Object && (n = o.get(l.constructor)))
|
|
3357
|
+
i[f] = n(l, a);
|
|
3360
3358
|
else if (ArrayBuffer.isView(l))
|
|
3361
|
-
i[f] =
|
|
3359
|
+
i[f] = A$1(l);
|
|
3362
3360
|
else {
|
|
3363
3361
|
const m = t.indexOf(l);
|
|
3364
3362
|
m !== -1 ? i[f] = r[m] : i[f] = a(l);
|
|
@@ -3367,27 +3365,27 @@ function ye$1(e) {
|
|
|
3367
3365
|
return t.pop(), r.pop(), i;
|
|
3368
3366
|
}
|
|
3369
3367
|
}
|
|
3370
|
-
|
|
3371
|
-
function
|
|
3372
|
-
return function(r,
|
|
3368
|
+
ye$1();
|
|
3369
|
+
function he$1(e) {
|
|
3370
|
+
return function(r, o) {
|
|
3373
3371
|
return r != null ? `${r}` : "";
|
|
3374
3372
|
};
|
|
3375
3373
|
}
|
|
3376
|
-
function
|
|
3377
|
-
return function(r,
|
|
3378
|
-
const s = (
|
|
3379
|
-
return
|
|
3374
|
+
function be$1(e) {
|
|
3375
|
+
return function(r, o) {
|
|
3376
|
+
const s = (o.variables?.name ?? O)({ name: r.name });
|
|
3377
|
+
return ne$1(
|
|
3380
3378
|
s,
|
|
3381
|
-
r.fallback ? e(r.fallback,
|
|
3379
|
+
r.fallback ? e(r.fallback, o) : void 0
|
|
3382
3380
|
);
|
|
3383
3381
|
};
|
|
3384
3382
|
}
|
|
3385
|
-
function
|
|
3383
|
+
function ge$1(e) {
|
|
3386
3384
|
const t = S$1(e);
|
|
3387
|
-
return function(
|
|
3388
|
-
return
|
|
3389
|
-
(s, u) => (s.push(e(u,
|
|
3390
|
-
[t(":root",
|
|
3385
|
+
return function(o, n) {
|
|
3386
|
+
return o.themes.reduce(
|
|
3387
|
+
(s, u) => (s.push(e(u, n)), s),
|
|
3388
|
+
[t(":root", o, n)]
|
|
3391
3389
|
// Default theme (root)
|
|
3392
3390
|
).join(`
|
|
3393
3391
|
|
|
@@ -3396,108 +3394,108 @@ function be$1(e) {
|
|
|
3396
3394
|
}
|
|
3397
3395
|
function Ae$1(e) {
|
|
3398
3396
|
const t = S$1(e);
|
|
3399
|
-
return function(
|
|
3400
|
-
return t(
|
|
3397
|
+
return function(o, n) {
|
|
3398
|
+
return t(o.query, o, n);
|
|
3401
3399
|
};
|
|
3402
3400
|
}
|
|
3403
|
-
function
|
|
3401
|
+
function Se(e) {
|
|
3404
3402
|
const t = S$1(e);
|
|
3405
|
-
return function(
|
|
3406
|
-
const u = (
|
|
3407
|
-
return t(u,
|
|
3403
|
+
return function(o, n) {
|
|
3404
|
+
const u = (n.themes?.selector ?? k)({ name: o.name });
|
|
3405
|
+
return t(u, o, n);
|
|
3408
3406
|
};
|
|
3409
3407
|
}
|
|
3410
|
-
function
|
|
3408
|
+
function Ce(e) {
|
|
3411
3409
|
const t = S$1(e);
|
|
3412
|
-
return function(
|
|
3413
|
-
const s = [], a = (
|
|
3414
|
-
name:
|
|
3415
|
-
value:
|
|
3416
|
-
modifiers:
|
|
3410
|
+
return function(o, n) {
|
|
3411
|
+
const s = [], a = (n.utilities?.selector ?? M)({
|
|
3412
|
+
name: o.name,
|
|
3413
|
+
value: o.value,
|
|
3414
|
+
modifiers: o.modifiers
|
|
3417
3415
|
});
|
|
3418
|
-
return s.push(t(a,
|
|
3416
|
+
return s.push(t(a, o, n)), s.join(`
|
|
3419
3417
|
|
|
3420
3418
|
`);
|
|
3421
3419
|
};
|
|
3422
3420
|
}
|
|
3423
3421
|
function d(e, t) {
|
|
3424
|
-
const r =
|
|
3422
|
+
const r = ge$1(d), o = Ae$1(d), n = Ce(d), s = ce(d), u = Se(d), a = F$1(d), c = be$1(d), i = ue$1(d), f = he$1();
|
|
3425
3423
|
switch (true) {
|
|
3426
|
-
case
|
|
3427
|
-
return n(e, t);
|
|
3428
|
-
case se(e):
|
|
3424
|
+
case C$1(e):
|
|
3429
3425
|
return o(e, t);
|
|
3430
|
-
case
|
|
3426
|
+
case fe(e):
|
|
3427
|
+
return n(e, t);
|
|
3428
|
+
case le$1(e):
|
|
3431
3429
|
return s(e, t);
|
|
3432
|
-
case
|
|
3430
|
+
case N(e):
|
|
3433
3431
|
return r(e, t);
|
|
3434
|
-
case
|
|
3432
|
+
case pe$1(e):
|
|
3435
3433
|
return u(e, t);
|
|
3436
|
-
case
|
|
3434
|
+
case ie$1(e):
|
|
3437
3435
|
return a(e, t);
|
|
3438
|
-
case ue$1(e):
|
|
3439
|
-
return c(e, t);
|
|
3440
3436
|
case ae$1(e):
|
|
3437
|
+
return c(e, t);
|
|
3438
|
+
case me$1(e):
|
|
3441
3439
|
return i(e, t);
|
|
3442
3440
|
default:
|
|
3443
3441
|
return f(e, t);
|
|
3444
3442
|
}
|
|
3445
3443
|
}
|
|
3446
|
-
function
|
|
3447
|
-
return function(r,
|
|
3448
|
-
let
|
|
3449
|
-
|
|
3450
|
-
const s = `${
|
|
3444
|
+
function je(e) {
|
|
3445
|
+
return function(r, o) {
|
|
3446
|
+
let n = r._exportName;
|
|
3447
|
+
n || (n = T$1(r.name), r.name[0] && x$1(r.name[0]) && (n = L$1(n)));
|
|
3448
|
+
const s = `${n}Recipe`, u = r._runtime ?? {};
|
|
3451
3449
|
return `const ${s} = ${JSON.stringify(
|
|
3452
3450
|
u,
|
|
3453
3451
|
null,
|
|
3454
3452
|
4
|
|
3455
3453
|
)} as const satisfies RecipeRuntime;
|
|
3456
3454
|
|
|
3457
|
-
export const ${
|
|
3455
|
+
export const ${n} = createRecipe("${r.name}", ${s});
|
|
3458
3456
|
`;
|
|
3459
3457
|
};
|
|
3460
3458
|
}
|
|
3461
|
-
function
|
|
3459
|
+
function ve(e) {
|
|
3462
3460
|
return e.filter(
|
|
3463
|
-
(t) =>
|
|
3461
|
+
(t) => C$1(t) && !!t._exportName
|
|
3464
3462
|
);
|
|
3465
3463
|
}
|
|
3466
|
-
function
|
|
3467
|
-
return function(r,
|
|
3468
|
-
const
|
|
3464
|
+
function Re(e) {
|
|
3465
|
+
return function(r, o) {
|
|
3466
|
+
const n = ve(r.children), s = r.recipes.length > 0, u = n.length > 0;
|
|
3469
3467
|
if (!s && !u)
|
|
3470
3468
|
return "";
|
|
3471
3469
|
const a = [];
|
|
3472
3470
|
return s && (a.push(`import { createRecipe } from '@styleframe/runtime';
|
|
3473
3471
|
import type { RecipeRuntime } from '@styleframe/runtime';
|
|
3474
|
-
`), a.push(e(r.recipes,
|
|
3472
|
+
`), a.push(e(r.recipes, o))), u && a.push(e(n, o)), a.join(`
|
|
3475
3473
|
`);
|
|
3476
3474
|
};
|
|
3477
3475
|
}
|
|
3478
|
-
function
|
|
3479
|
-
return function(r,
|
|
3476
|
+
function $e(e) {
|
|
3477
|
+
return function(r, o) {
|
|
3480
3478
|
return r._exportName ? `export const ${r._exportName} = ${JSON.stringify(r.query)};
|
|
3481
3479
|
` : "";
|
|
3482
3480
|
};
|
|
3483
3481
|
}
|
|
3484
|
-
function
|
|
3485
|
-
const r =
|
|
3482
|
+
function R$1(e, t) {
|
|
3483
|
+
const r = Re(R$1), o = je(), n = $e();
|
|
3486
3484
|
switch (true) {
|
|
3487
3485
|
case Array.isArray(e):
|
|
3488
|
-
return e.map((s) =>
|
|
3486
|
+
return e.map((s) => R$1(s, t)).join(`
|
|
3489
3487
|
`);
|
|
3490
|
-
case
|
|
3488
|
+
case N(e):
|
|
3491
3489
|
return r(e, t);
|
|
3492
|
-
case
|
|
3493
|
-
return n(e, t);
|
|
3494
|
-
case v$1(e):
|
|
3490
|
+
case D$1(e):
|
|
3495
3491
|
return o(e, t);
|
|
3492
|
+
case C$1(e):
|
|
3493
|
+
return n(e, t);
|
|
3496
3494
|
default:
|
|
3497
3495
|
return "";
|
|
3498
3496
|
}
|
|
3499
3497
|
}
|
|
3500
|
-
const
|
|
3498
|
+
const Ne = `-----BEGIN PUBLIC KEY-----
|
|
3501
3499
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs7zAFssgxOMPeo80iig4
|
|
3502
3500
|
qSSshgNOLnW1gd4tPUrsezndaUrAKlsAys6XD8kuF+bBEIR0uFNSgKlqINLjWM1n
|
|
3503
3501
|
BiTUzCctodyRaq6/tyFSoPLD35iblkwtfxKPM42lAJZsyTu9qoBr8MJyXmhDLuqA
|
|
@@ -3505,9 +3503,9 @@ dQ8di7mQHz+mCy96jQR4lFSDfHMgl27qaAh5VboTBRxgZliN8D5Fl590QkS94wAj
|
|
|
3505
3503
|
hC7NbH+hPcGc/qIaZSjZfyZeBIZS74qJkrzjEA7/pukROD8UQUrQ512HHZ6XlgMn
|
|
3506
3504
|
4bWT2K9CpWbbhsKFTecCHuxlmPkFJNMuvAb/LdP08BSnpntlyAJcQeBrna2qBen+
|
|
3507
3505
|
GwIDAQAB
|
|
3508
|
-
-----END PUBLIC KEY-----`, we = "__licenseRequired",
|
|
3509
|
-
async function
|
|
3510
|
-
const t = e.replace(/-----BEGIN PUBLIC KEY-----/, "").replace(/-----END PUBLIC KEY-----/, "").replace(/\s/g, ""), r = Uint8Array.from(atob(t), (
|
|
3506
|
+
-----END PUBLIC KEY-----`, we = "__licenseRequired", Oe = "__licenseValidated";
|
|
3507
|
+
async function _e(e) {
|
|
3508
|
+
const t = e.replace(/-----BEGIN PUBLIC KEY-----/, "").replace(/-----END PUBLIC KEY-----/, "").replace(/\s/g, ""), r = Uint8Array.from(atob(t), (o) => o.charCodeAt(0));
|
|
3511
3509
|
return await crypto.subtle.importKey(
|
|
3512
3510
|
"spki",
|
|
3513
3511
|
r,
|
|
@@ -3519,18 +3517,18 @@ async function Oe(e) {
|
|
|
3519
3517
|
["verify"]
|
|
3520
3518
|
);
|
|
3521
3519
|
}
|
|
3522
|
-
async function
|
|
3520
|
+
async function xe({
|
|
3523
3521
|
payload: e,
|
|
3524
3522
|
signature: t
|
|
3525
3523
|
}) {
|
|
3526
|
-
const r = new TextEncoder().encode(e),
|
|
3524
|
+
const r = new TextEncoder().encode(e), o = Uint8Array.from(
|
|
3527
3525
|
atob(t),
|
|
3528
3526
|
(s) => s.charCodeAt(0)
|
|
3529
|
-
),
|
|
3527
|
+
), n = await _e(Ne);
|
|
3530
3528
|
if (!await crypto.subtle.verify(
|
|
3531
3529
|
{ name: "RSASSA-PKCS1-v1_5" },
|
|
3532
|
-
o,
|
|
3533
3530
|
n,
|
|
3531
|
+
o,
|
|
3534
3532
|
r
|
|
3535
3533
|
))
|
|
3536
3534
|
throw new Error(
|
|
@@ -3538,13 +3536,13 @@ async function Ee({
|
|
|
3538
3536
|
);
|
|
3539
3537
|
return JSON.parse(e);
|
|
3540
3538
|
}
|
|
3541
|
-
function
|
|
3539
|
+
function Te(e) {
|
|
3542
3540
|
return Object.prototype.hasOwnProperty.call(e, we);
|
|
3543
3541
|
}
|
|
3544
|
-
async function
|
|
3542
|
+
async function Be(e) {
|
|
3545
3543
|
const t = Object.getOwnPropertyDescriptor(
|
|
3546
3544
|
e,
|
|
3547
|
-
|
|
3545
|
+
Oe
|
|
3548
3546
|
);
|
|
3549
3547
|
if (!t?.value)
|
|
3550
3548
|
return {
|
|
@@ -3562,7 +3560,7 @@ async function Te(e) {
|
|
|
3562
3560
|
valid: false
|
|
3563
3561
|
};
|
|
3564
3562
|
try {
|
|
3565
|
-
return await
|
|
3563
|
+
return await xe(
|
|
3566
3564
|
r
|
|
3567
3565
|
);
|
|
3568
3566
|
} catch {
|
|
@@ -3574,7 +3572,81 @@ async function Te(e) {
|
|
|
3574
3572
|
};
|
|
3575
3573
|
}
|
|
3576
3574
|
}
|
|
3577
|
-
function
|
|
3575
|
+
function Ee(e) {
|
|
3576
|
+
const t = e?.variants;
|
|
3577
|
+
if (!t || Object.keys(t).length === 0)
|
|
3578
|
+
return "Record<string, never>";
|
|
3579
|
+
const r = [];
|
|
3580
|
+
for (const [o, n] of Object.entries(t)) {
|
|
3581
|
+
if (!n) continue;
|
|
3582
|
+
const s = Object.keys(n);
|
|
3583
|
+
if (s.length > 0) {
|
|
3584
|
+
const u = s.map((a) => `"${a}"`).join(" | ");
|
|
3585
|
+
r.push(`${o}?: ${u}`);
|
|
3586
|
+
}
|
|
3587
|
+
}
|
|
3588
|
+
return r.length === 0 ? "Record<string, never>" : `{ ${r.join("; ")} }`;
|
|
3589
|
+
}
|
|
3590
|
+
function Fe$1(e) {
|
|
3591
|
+
return function(r, o) {
|
|
3592
|
+
let n = r._exportName;
|
|
3593
|
+
n || (n = T$1(r.name), r.name[0] && x$1(r.name[0]) && (n = L$1(n)));
|
|
3594
|
+
const s = Ee(r._runtime);
|
|
3595
|
+
return ` export const ${n}: (props?: ${s}) => string;`;
|
|
3596
|
+
};
|
|
3597
|
+
}
|
|
3598
|
+
function De(e) {
|
|
3599
|
+
return e.filter(
|
|
3600
|
+
(t) => C$1(t) && !!t._exportName
|
|
3601
|
+
);
|
|
3602
|
+
}
|
|
3603
|
+
function Le(e) {
|
|
3604
|
+
return function(r, o) {
|
|
3605
|
+
const n = De(r.children), s = r.recipes.length > 0, u = n.length > 0, a = [
|
|
3606
|
+
"// Auto-generated by @styleframe/plugin - DO NOT EDIT",
|
|
3607
|
+
"",
|
|
3608
|
+
'declare module "virtual:styleframe" {',
|
|
3609
|
+
' import type { Styleframe } from "@styleframe/core";',
|
|
3610
|
+
"",
|
|
3611
|
+
" /** Returns the global styleframe instance from styleframe.config.ts */",
|
|
3612
|
+
" export function styleframe(): Styleframe;"
|
|
3613
|
+
];
|
|
3614
|
+
if (s) {
|
|
3615
|
+
a.push("");
|
|
3616
|
+
const c = r.recipes.map((i) => e(i, o)).filter(Boolean);
|
|
3617
|
+
a.push(...c);
|
|
3618
|
+
}
|
|
3619
|
+
if (u) {
|
|
3620
|
+
a.push("");
|
|
3621
|
+
const c = n.map((i) => e(i, o)).filter(Boolean);
|
|
3622
|
+
a.push(...c);
|
|
3623
|
+
}
|
|
3624
|
+
return a.push("}"), a.push(""), a.push('declare module "virtual:styleframe.css" {'), a.push(" const css: string;"), a.push(" export default css;"), a.push("}"), a.push(""), a.join(`
|
|
3625
|
+
`);
|
|
3626
|
+
};
|
|
3627
|
+
}
|
|
3628
|
+
function Ie(e) {
|
|
3629
|
+
return function(r, o) {
|
|
3630
|
+
return r._exportName ? ` export const ${r._exportName}: string;` : "";
|
|
3631
|
+
};
|
|
3632
|
+
}
|
|
3633
|
+
function $(e, t) {
|
|
3634
|
+
const r = Le($), o = Fe$1(), n = Ie();
|
|
3635
|
+
switch (true) {
|
|
3636
|
+
case Array.isArray(e):
|
|
3637
|
+
return e.map((s) => $(s, t)).join(`
|
|
3638
|
+
`);
|
|
3639
|
+
case N(e):
|
|
3640
|
+
return r(e, t);
|
|
3641
|
+
case D$1(e):
|
|
3642
|
+
return o(e, t);
|
|
3643
|
+
case C$1(e):
|
|
3644
|
+
return n(e, t);
|
|
3645
|
+
default:
|
|
3646
|
+
return "";
|
|
3647
|
+
}
|
|
3648
|
+
}
|
|
3649
|
+
function Pe(e) {
|
|
3578
3650
|
const t = Math.floor(Math.random() * 100);
|
|
3579
3651
|
e.root.children.push({
|
|
3580
3652
|
type: "selector",
|
|
@@ -3598,36 +3670,43 @@ function _e(e) {
|
|
|
3598
3670
|
}
|
|
3599
3671
|
});
|
|
3600
3672
|
}
|
|
3601
|
-
function
|
|
3673
|
+
function v$1(e, t = "") {
|
|
3602
3674
|
return {
|
|
3603
3675
|
name: e,
|
|
3604
3676
|
content: t
|
|
3605
3677
|
};
|
|
3606
3678
|
}
|
|
3607
|
-
async function
|
|
3679
|
+
async function ke$1(e, {
|
|
3608
3680
|
type: t = "all",
|
|
3609
|
-
consumers: r = { css: d, ts:
|
|
3681
|
+
consumers: r = { css: d, ts: R$1, dts: $ }
|
|
3610
3682
|
} = {}) {
|
|
3611
|
-
const
|
|
3612
|
-
if (
|
|
3613
|
-
const s = await
|
|
3614
|
-
(!s.valid || s.instanceId !== e.id) &&
|
|
3683
|
+
const o = { files: [] }, n = e.options;
|
|
3684
|
+
if (Te(e)) {
|
|
3685
|
+
const s = await Be(e);
|
|
3686
|
+
(!s.valid || s.instanceId !== e.id) && Pe(e);
|
|
3615
3687
|
}
|
|
3616
3688
|
if (t === "all" || t === "css") {
|
|
3617
|
-
const s =
|
|
3689
|
+
const s = v$1(
|
|
3618
3690
|
"index.css",
|
|
3619
|
-
r.css(e.root,
|
|
3691
|
+
r.css(e.root, n)
|
|
3620
3692
|
);
|
|
3621
|
-
|
|
3693
|
+
o.files.push(s);
|
|
3622
3694
|
}
|
|
3623
3695
|
if (t === "all" || t === "ts") {
|
|
3624
|
-
const s =
|
|
3696
|
+
const s = v$1(
|
|
3625
3697
|
"index.ts",
|
|
3626
|
-
r.ts(e.root,
|
|
3698
|
+
r.ts(e.root, n)
|
|
3627
3699
|
);
|
|
3628
|
-
|
|
3700
|
+
o.files.push(s);
|
|
3629
3701
|
}
|
|
3630
|
-
|
|
3702
|
+
if (t === "dts") {
|
|
3703
|
+
const s = v$1(
|
|
3704
|
+
"index.d.ts",
|
|
3705
|
+
r.dts(e.root, n)
|
|
3706
|
+
);
|
|
3707
|
+
o.files.push(s);
|
|
3708
|
+
}
|
|
3709
|
+
return o;
|
|
3631
3710
|
}
|
|
3632
3711
|
async function directoryExists(path2) {
|
|
3633
3712
|
try {
|
|
@@ -3637,13 +3716,13 @@ async function directoryExists(path2) {
|
|
|
3637
3716
|
return false;
|
|
3638
3717
|
}
|
|
3639
3718
|
}
|
|
3640
|
-
async function build
|
|
3719
|
+
async function build(instance, { clean = true, outputDir = "./styleframe", transpiler } = {}) {
|
|
3641
3720
|
await validateInstanceLicense(instance, {
|
|
3642
3721
|
licenseKey: getLicenseKeyFromEnv() || "",
|
|
3643
3722
|
environment: process.env.NODE_ENV || "development",
|
|
3644
3723
|
isBuild: true
|
|
3645
3724
|
});
|
|
3646
|
-
const output = await
|
|
3725
|
+
const output = await ke$1(instance, transpiler);
|
|
3647
3726
|
const outputDirExists = await directoryExists(outputDir);
|
|
3648
3727
|
if (clean && outputDirExists) {
|
|
3649
3728
|
await rm(outputDir, { recursive: true });
|
|
@@ -3658,90 +3737,109 @@ async function build$1(instance, { clean = true, outputDir = "./styleframe", tra
|
|
|
3658
3737
|
await writeFile(filePath, file.content);
|
|
3659
3738
|
}
|
|
3660
3739
|
}
|
|
3661
|
-
function
|
|
3740
|
+
function C(e) {
|
|
3662
3741
|
return typeof e == "object" && e !== null;
|
|
3663
3742
|
}
|
|
3664
|
-
function
|
|
3665
|
-
return
|
|
3743
|
+
function h(e, r) {
|
|
3744
|
+
return C(e) && "type" in e && e.type === r;
|
|
3666
3745
|
}
|
|
3667
|
-
function
|
|
3668
|
-
return
|
|
3746
|
+
function G(e) {
|
|
3747
|
+
return h(e, "variable");
|
|
3669
3748
|
}
|
|
3670
|
-
function
|
|
3671
|
-
return
|
|
3749
|
+
function j(e) {
|
|
3750
|
+
return h(e, "reference");
|
|
3672
3751
|
}
|
|
3673
|
-
function
|
|
3674
|
-
return
|
|
3752
|
+
function Ae(e) {
|
|
3753
|
+
return h(e, "selector");
|
|
3675
3754
|
}
|
|
3676
|
-
function
|
|
3677
|
-
return
|
|
3755
|
+
function I(e) {
|
|
3756
|
+
return h(e, "modifier");
|
|
3678
3757
|
}
|
|
3679
|
-
function
|
|
3680
|
-
return
|
|
3758
|
+
function T(e) {
|
|
3759
|
+
return h(e, "css");
|
|
3681
3760
|
}
|
|
3682
|
-
function
|
|
3683
|
-
return
|
|
3761
|
+
function V(e) {
|
|
3762
|
+
return h(e, "root");
|
|
3684
3763
|
}
|
|
3685
|
-
function
|
|
3764
|
+
function ke(e) {
|
|
3765
|
+
return h(e, "recipe");
|
|
3766
|
+
}
|
|
3767
|
+
function z(e) {
|
|
3686
3768
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
3687
3769
|
}
|
|
3688
|
-
function
|
|
3689
|
-
return
|
|
3770
|
+
function D(e) {
|
|
3771
|
+
return z(e) || j(e) || T(e) || Array.isArray(e) && e.every(D);
|
|
3690
3772
|
}
|
|
3691
|
-
function
|
|
3692
|
-
return
|
|
3773
|
+
function Y(e) {
|
|
3774
|
+
return C(e) && "children" in e && "declarations" in e && "variables" in e;
|
|
3693
3775
|
}
|
|
3694
|
-
function
|
|
3695
|
-
return (
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3776
|
+
function Ve(e) {
|
|
3777
|
+
return C(e) && "id" in e && "root" in e && "variable" in e && "selector" in e && "recipe" in e && typeof e.id == "string" && V(e.root);
|
|
3778
|
+
}
|
|
3779
|
+
function P(e) {
|
|
3780
|
+
const r = typeof e == "function" ? { replacer: e } : e ?? {}, { replacer: n = (c) => c, namespace: t } = r, i = Array.isArray(t) ? t : t ? [t] : [];
|
|
3781
|
+
return (c) => {
|
|
3782
|
+
let s = c, a;
|
|
3783
|
+
if (typeof s == "string" && s[0] === "@") {
|
|
3784
|
+
const o = s.slice(1), f = i.find(
|
|
3785
|
+
(y) => o === y || o.startsWith(`${y}.`)
|
|
3786
|
+
);
|
|
3787
|
+
let l, u;
|
|
3788
|
+
f ? (l = o, u = o.startsWith(`${f}.`) ? o.slice(f.length + 1) : o) : i.length > 0 ? (l = `${i[0]}.${o}`, u = o) : (l = o, u = o), a = n(u), s = {
|
|
3700
3789
|
type: "reference",
|
|
3701
|
-
name:
|
|
3790
|
+
name: l
|
|
3702
3791
|
};
|
|
3703
|
-
} else
|
|
3792
|
+
} else if (j(s)) {
|
|
3793
|
+
let o = s.name;
|
|
3794
|
+
for (const f of i)
|
|
3795
|
+
if (o.startsWith(`${f}.`)) {
|
|
3796
|
+
o = o.slice(f.length + 1);
|
|
3797
|
+
break;
|
|
3798
|
+
}
|
|
3799
|
+
a = n(o);
|
|
3800
|
+
} else
|
|
3801
|
+
a = `[${c}]`;
|
|
3704
3802
|
return {
|
|
3705
|
-
[
|
|
3803
|
+
[a]: s
|
|
3706
3804
|
};
|
|
3707
3805
|
};
|
|
3708
3806
|
}
|
|
3709
|
-
function
|
|
3807
|
+
function Z(e, r) {
|
|
3710
3808
|
return function(t, ...i) {
|
|
3711
3809
|
return {
|
|
3712
3810
|
type: "css",
|
|
3713
|
-
value: t.reduce((
|
|
3811
|
+
value: t.reduce((s, a, o) => (s.push(a), o < i.length && s.push(i[o]), s), [])
|
|
3714
3812
|
};
|
|
3715
3813
|
};
|
|
3716
3814
|
}
|
|
3717
|
-
function
|
|
3815
|
+
function K(e, r) {
|
|
3718
3816
|
return function(t, i, c) {
|
|
3719
|
-
const
|
|
3817
|
+
const s = {
|
|
3720
3818
|
type: "at-rule",
|
|
3721
3819
|
identifier: t,
|
|
3722
3820
|
rule: i,
|
|
3723
3821
|
declarations: {},
|
|
3724
3822
|
variables: [],
|
|
3725
3823
|
children: []
|
|
3726
|
-
},
|
|
3727
|
-
return typeof c == "function" ?
|
|
3824
|
+
}, a = v(s, r);
|
|
3825
|
+
return typeof c == "function" ? s.declarations = c(a) ?? {} : c && (s.declarations = c), R(s.declarations, a), e.children.push(s), s;
|
|
3728
3826
|
};
|
|
3729
3827
|
}
|
|
3730
|
-
function
|
|
3731
|
-
const n =
|
|
3828
|
+
function J(e, r) {
|
|
3829
|
+
const n = K(e, r);
|
|
3732
3830
|
return function(i, c) {
|
|
3733
3831
|
return n("media", i, c);
|
|
3734
3832
|
};
|
|
3735
3833
|
}
|
|
3736
|
-
function
|
|
3737
|
-
const n =
|
|
3834
|
+
function Q(e, r) {
|
|
3835
|
+
const n = K(e, r);
|
|
3738
3836
|
return function(i, c) {
|
|
3739
3837
|
return n("keyframes", i, c);
|
|
3740
3838
|
};
|
|
3741
3839
|
}
|
|
3742
|
-
function
|
|
3840
|
+
function X(e, r) {
|
|
3743
3841
|
return function(t, i) {
|
|
3744
|
-
return
|
|
3842
|
+
return G(t) ? {
|
|
3745
3843
|
type: "reference",
|
|
3746
3844
|
name: t.name,
|
|
3747
3845
|
fallback: i
|
|
@@ -3752,7 +3850,7 @@ function J(e, r) {
|
|
|
3752
3850
|
};
|
|
3753
3851
|
};
|
|
3754
3852
|
}
|
|
3755
|
-
function
|
|
3853
|
+
function ee(e, r) {
|
|
3756
3854
|
return function(t, i) {
|
|
3757
3855
|
const c = {
|
|
3758
3856
|
type: "selector",
|
|
@@ -3760,56 +3858,60 @@ function Q(e, r) {
|
|
|
3760
3858
|
declarations: {},
|
|
3761
3859
|
variables: [],
|
|
3762
3860
|
children: []
|
|
3763
|
-
},
|
|
3764
|
-
return typeof i == "function" ? c.declarations = i(
|
|
3861
|
+
}, s = v(c, r);
|
|
3862
|
+
return typeof i == "function" ? c.declarations = i(s) ?? {} : Y(i) ? (c.variables = i.variables, c.declarations = i.declarations, c.children = i.children) : c.declarations = i, R(c.declarations, s), e.children.push(c), c;
|
|
3765
3863
|
};
|
|
3766
3864
|
}
|
|
3767
|
-
function
|
|
3865
|
+
function te(e, r) {
|
|
3768
3866
|
return function(t, i, c = {
|
|
3769
3867
|
default: false
|
|
3770
3868
|
}) {
|
|
3771
|
-
const
|
|
3772
|
-
(f) => f.name ===
|
|
3869
|
+
const s = typeof t == "string" ? t : t.name, a = e.variables.find(
|
|
3870
|
+
(f) => f.name === s
|
|
3773
3871
|
);
|
|
3774
|
-
if (c.default &&
|
|
3775
|
-
return
|
|
3776
|
-
if (
|
|
3777
|
-
return
|
|
3778
|
-
const
|
|
3872
|
+
if (c.default && a)
|
|
3873
|
+
return a;
|
|
3874
|
+
if (a)
|
|
3875
|
+
return a.value = i, a;
|
|
3876
|
+
const o = {
|
|
3779
3877
|
type: "variable",
|
|
3780
|
-
name:
|
|
3878
|
+
name: s,
|
|
3781
3879
|
value: i
|
|
3782
3880
|
};
|
|
3783
|
-
return e.variables.push(
|
|
3881
|
+
return e.variables.push(o), o;
|
|
3784
3882
|
};
|
|
3785
3883
|
}
|
|
3786
3884
|
function v(e, r) {
|
|
3787
|
-
const n =
|
|
3885
|
+
const n = te(e), t = ee(e, r), i = K(e, r), c = Q(r, r), s = J(e, r), a = X(), o = Z();
|
|
3788
3886
|
return {
|
|
3789
3887
|
variable: n,
|
|
3790
3888
|
selector: t,
|
|
3791
3889
|
keyframes: c,
|
|
3792
3890
|
atRule: i,
|
|
3793
|
-
media:
|
|
3794
|
-
ref:
|
|
3795
|
-
css:
|
|
3891
|
+
media: s,
|
|
3892
|
+
ref: a,
|
|
3893
|
+
css: o
|
|
3796
3894
|
};
|
|
3797
3895
|
}
|
|
3798
|
-
function
|
|
3896
|
+
function R(e, r) {
|
|
3799
3897
|
for (const n in e)
|
|
3800
3898
|
if (n.startsWith("@")) {
|
|
3801
3899
|
const t = e[n];
|
|
3802
|
-
if (typeof t == "object" && t !== null &&
|
|
3900
|
+
if (typeof t == "object" && t !== null && !D(t)) {
|
|
3803
3901
|
const i = n.replace(/^@(\w+).*/, "$1"), c = n.replace(`@${i}`, "").trim();
|
|
3804
3902
|
r.atRule(i, c, t), delete e[n];
|
|
3805
3903
|
}
|
|
3806
|
-
} else if (/^[.&:]/.test(n)) {
|
|
3904
|
+
} else if (/^[.&:]/.test(n) || /^\d+%$/.test(n) || n === "from" || n === "to") {
|
|
3807
3905
|
const t = e[n];
|
|
3808
3906
|
typeof t == "object" && (r.selector(n, t), delete e[n]);
|
|
3809
3907
|
}
|
|
3908
|
+
for (const n in e) {
|
|
3909
|
+
const t = e[n];
|
|
3910
|
+
typeof t == "string" && t[0] === "@" && (e[n] = r.ref(t.slice(1)));
|
|
3911
|
+
}
|
|
3810
3912
|
return e;
|
|
3811
3913
|
}
|
|
3812
|
-
function
|
|
3914
|
+
function A(e) {
|
|
3813
3915
|
if (e instanceof Buffer)
|
|
3814
3916
|
return Buffer.from(e);
|
|
3815
3917
|
const r = e.constructor;
|
|
@@ -3819,133 +3921,133 @@ function j(e) {
|
|
|
3819
3921
|
e.byteLength / e.BYTES_PER_ELEMENT || 1
|
|
3820
3922
|
);
|
|
3821
3923
|
}
|
|
3822
|
-
function
|
|
3924
|
+
function ne(e) {
|
|
3823
3925
|
if (e = e || {}, e.circular)
|
|
3824
|
-
return
|
|
3926
|
+
return re(e);
|
|
3825
3927
|
const r = /* @__PURE__ */ new Map();
|
|
3826
|
-
if (r.set(Date, (
|
|
3928
|
+
if (r.set(Date, (s) => new Date(s)), r.set(
|
|
3827
3929
|
Map,
|
|
3828
|
-
(
|
|
3930
|
+
(s, a) => new Map(t(Array.from(s), a))
|
|
3829
3931
|
), r.set(
|
|
3830
3932
|
Set,
|
|
3831
|
-
(
|
|
3933
|
+
(s, a) => new Set(t(Array.from(s), a))
|
|
3832
3934
|
), e.constructorHandlers)
|
|
3833
|
-
for (const
|
|
3834
|
-
r.set(
|
|
3935
|
+
for (const s of e.constructorHandlers)
|
|
3936
|
+
r.set(s[0], s[1]);
|
|
3835
3937
|
let n;
|
|
3836
3938
|
return e.proto ? c : i;
|
|
3837
|
-
function t(
|
|
3838
|
-
const
|
|
3839
|
-
for (let l = 0; l <
|
|
3840
|
-
const
|
|
3841
|
-
typeof y != "object" || y === null ? f[
|
|
3939
|
+
function t(s, a) {
|
|
3940
|
+
const o = Object.keys(s), f = Array.from({ length: o.length });
|
|
3941
|
+
for (let l = 0; l < o.length; l++) {
|
|
3942
|
+
const u = o[l], y = s[u];
|
|
3943
|
+
typeof y != "object" || y === null ? f[u] = y : y.constructor !== Object && (n = r.get(y.constructor)) ? f[u] = n(y, a) : ArrayBuffer.isView(y) ? f[u] = A(y) : f[u] = a(y);
|
|
3842
3944
|
}
|
|
3843
3945
|
return f;
|
|
3844
3946
|
}
|
|
3845
|
-
function i(
|
|
3846
|
-
if (typeof
|
|
3847
|
-
if (Array.isArray(
|
|
3848
|
-
if (
|
|
3849
|
-
return n(
|
|
3850
|
-
const
|
|
3851
|
-
for (const
|
|
3852
|
-
if (Object.hasOwnProperty.call(
|
|
3853
|
-
const f = o
|
|
3854
|
-
typeof f != "object" || f === null ?
|
|
3947
|
+
function i(s) {
|
|
3948
|
+
if (typeof s != "object" || s === null) return s;
|
|
3949
|
+
if (Array.isArray(s)) return t(s, i);
|
|
3950
|
+
if (s.constructor !== Object && (n = r.get(s.constructor)))
|
|
3951
|
+
return n(s, i);
|
|
3952
|
+
const a = {};
|
|
3953
|
+
for (const o in s) {
|
|
3954
|
+
if (Object.hasOwnProperty.call(s, o) === false) continue;
|
|
3955
|
+
const f = s[o];
|
|
3956
|
+
typeof f != "object" || f === null ? a[o] = f : f.constructor !== Object && (n = r.get(f.constructor)) ? a[o] = n(f, i) : ArrayBuffer.isView(f) ? a[o] = A(f) : a[o] = i(f);
|
|
3855
3957
|
}
|
|
3856
|
-
return
|
|
3958
|
+
return a;
|
|
3857
3959
|
}
|
|
3858
|
-
function c(
|
|
3859
|
-
if (typeof
|
|
3860
|
-
if (Array.isArray(
|
|
3861
|
-
if (
|
|
3862
|
-
return n(
|
|
3863
|
-
const
|
|
3864
|
-
for (const
|
|
3865
|
-
const f = o
|
|
3866
|
-
typeof f != "object" || f === null ?
|
|
3960
|
+
function c(s) {
|
|
3961
|
+
if (typeof s != "object" || s === null) return s;
|
|
3962
|
+
if (Array.isArray(s)) return t(s, c);
|
|
3963
|
+
if (s.constructor !== Object && (n = r.get(s.constructor)))
|
|
3964
|
+
return n(s, c);
|
|
3965
|
+
const a = {};
|
|
3966
|
+
for (const o in s) {
|
|
3967
|
+
const f = s[o];
|
|
3968
|
+
typeof f != "object" || f === null ? a[o] = f : f.constructor !== Object && (n = r.get(f.constructor)) ? a[o] = n(f, c) : ArrayBuffer.isView(f) ? a[o] = A(f) : a[o] = c(f);
|
|
3867
3969
|
}
|
|
3868
|
-
return
|
|
3970
|
+
return a;
|
|
3869
3971
|
}
|
|
3870
3972
|
}
|
|
3871
|
-
function
|
|
3973
|
+
function re(e) {
|
|
3872
3974
|
const r = [], n = [], t = /* @__PURE__ */ new Map();
|
|
3873
|
-
if (t.set(Date, (
|
|
3975
|
+
if (t.set(Date, (o) => new Date(o)), t.set(
|
|
3874
3976
|
Map,
|
|
3875
|
-
(
|
|
3977
|
+
(o, f) => new Map(c(Array.from(o), f))
|
|
3876
3978
|
), t.set(
|
|
3877
3979
|
Set,
|
|
3878
|
-
(
|
|
3980
|
+
(o, f) => new Set(c(Array.from(o), f))
|
|
3879
3981
|
), e.constructorHandlers)
|
|
3880
|
-
for (const
|
|
3881
|
-
t.set(
|
|
3982
|
+
for (const o of e.constructorHandlers)
|
|
3983
|
+
t.set(o[0], o[1]);
|
|
3882
3984
|
let i;
|
|
3883
|
-
return e.proto ?
|
|
3884
|
-
function c(
|
|
3885
|
-
const l = Object.keys(
|
|
3985
|
+
return e.proto ? a : s;
|
|
3986
|
+
function c(o, f) {
|
|
3987
|
+
const l = Object.keys(o), u = Array.from({ length: l.length });
|
|
3886
3988
|
for (let y = 0; y < l.length; y++) {
|
|
3887
|
-
const
|
|
3989
|
+
const p = l[y], d2 = o[p];
|
|
3888
3990
|
if (typeof d2 != "object" || d2 === null)
|
|
3889
|
-
|
|
3991
|
+
u[p] = d2;
|
|
3890
3992
|
else if (d2.constructor !== Object && (i = t.get(d2.constructor)))
|
|
3891
|
-
|
|
3993
|
+
u[p] = i(d2, f);
|
|
3892
3994
|
else if (ArrayBuffer.isView(d2))
|
|
3893
|
-
|
|
3995
|
+
u[p] = A(d2);
|
|
3894
3996
|
else {
|
|
3895
|
-
const
|
|
3896
|
-
|
|
3997
|
+
const w2 = r.indexOf(d2);
|
|
3998
|
+
w2 !== -1 ? u[p] = n[w2] : u[p] = f(d2);
|
|
3897
3999
|
}
|
|
3898
4000
|
}
|
|
3899
|
-
return
|
|
4001
|
+
return u;
|
|
3900
4002
|
}
|
|
3901
|
-
function o
|
|
3902
|
-
if (typeof
|
|
3903
|
-
if (Array.isArray(
|
|
3904
|
-
if (
|
|
3905
|
-
return i(
|
|
4003
|
+
function s(o) {
|
|
4004
|
+
if (typeof o != "object" || o === null) return o;
|
|
4005
|
+
if (Array.isArray(o)) return c(o, s);
|
|
4006
|
+
if (o.constructor !== Object && (i = t.get(o.constructor)))
|
|
4007
|
+
return i(o, s);
|
|
3906
4008
|
const f = {};
|
|
3907
|
-
r.push(
|
|
3908
|
-
for (const l in
|
|
3909
|
-
if (Object.hasOwnProperty.call(
|
|
3910
|
-
const
|
|
3911
|
-
if (typeof
|
|
3912
|
-
f[l] =
|
|
3913
|
-
else if (
|
|
3914
|
-
f[l] = i(
|
|
3915
|
-
else if (ArrayBuffer.isView(
|
|
3916
|
-
f[l] =
|
|
4009
|
+
r.push(o), n.push(f);
|
|
4010
|
+
for (const l in o) {
|
|
4011
|
+
if (Object.hasOwnProperty.call(o, l) === false) continue;
|
|
4012
|
+
const u = o[l];
|
|
4013
|
+
if (typeof u != "object" || u === null)
|
|
4014
|
+
f[l] = u;
|
|
4015
|
+
else if (u.constructor !== Object && (i = t.get(u.constructor)))
|
|
4016
|
+
f[l] = i(u, s);
|
|
4017
|
+
else if (ArrayBuffer.isView(u))
|
|
4018
|
+
f[l] = A(u);
|
|
3917
4019
|
else {
|
|
3918
|
-
const y = r.indexOf(
|
|
3919
|
-
y !== -1 ? f[l] = n[y] : f[l] =
|
|
4020
|
+
const y = r.indexOf(u);
|
|
4021
|
+
y !== -1 ? f[l] = n[y] : f[l] = s(u);
|
|
3920
4022
|
}
|
|
3921
4023
|
}
|
|
3922
4024
|
return r.pop(), n.pop(), f;
|
|
3923
4025
|
}
|
|
3924
|
-
function
|
|
3925
|
-
if (typeof
|
|
3926
|
-
if (Array.isArray(
|
|
3927
|
-
if (
|
|
3928
|
-
return i(
|
|
4026
|
+
function a(o) {
|
|
4027
|
+
if (typeof o != "object" || o === null) return o;
|
|
4028
|
+
if (Array.isArray(o)) return c(o, a);
|
|
4029
|
+
if (o.constructor !== Object && (i = t.get(o.constructor)))
|
|
4030
|
+
return i(o, a);
|
|
3929
4031
|
const f = {};
|
|
3930
|
-
r.push(
|
|
3931
|
-
for (const l in
|
|
3932
|
-
const
|
|
3933
|
-
if (typeof
|
|
3934
|
-
f[l] =
|
|
3935
|
-
else if (
|
|
3936
|
-
f[l] = i(
|
|
3937
|
-
else if (ArrayBuffer.isView(
|
|
3938
|
-
f[l] =
|
|
4032
|
+
r.push(o), n.push(f);
|
|
4033
|
+
for (const l in o) {
|
|
4034
|
+
const u = o[l];
|
|
4035
|
+
if (typeof u != "object" || u === null)
|
|
4036
|
+
f[l] = u;
|
|
4037
|
+
else if (u.constructor !== Object && (i = t.get(u.constructor)))
|
|
4038
|
+
f[l] = i(u, a);
|
|
4039
|
+
else if (ArrayBuffer.isView(u))
|
|
4040
|
+
f[l] = A(u);
|
|
3939
4041
|
else {
|
|
3940
|
-
const y = r.indexOf(
|
|
3941
|
-
y !== -1 ? f[l] = n[y] : f[l] = u
|
|
4042
|
+
const y = r.indexOf(u);
|
|
4043
|
+
y !== -1 ? f[l] = n[y] : f[l] = a(u);
|
|
3942
4044
|
}
|
|
3943
4045
|
}
|
|
3944
4046
|
return r.pop(), n.pop(), f;
|
|
3945
4047
|
}
|
|
3946
4048
|
}
|
|
3947
|
-
const
|
|
3948
|
-
function
|
|
4049
|
+
const F = ne();
|
|
4050
|
+
function ie(e, r = 8) {
|
|
3949
4051
|
const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
3950
4052
|
let t = "";
|
|
3951
4053
|
for (let i = 0; i < r; i++) {
|
|
@@ -3954,7 +4056,7 @@ function ne(e, r = 8) {
|
|
|
3954
4056
|
}
|
|
3955
4057
|
return e ? `${e}${t}` : t;
|
|
3956
4058
|
}
|
|
3957
|
-
function
|
|
4059
|
+
function se(e, r) {
|
|
3958
4060
|
const n = e.modifiers.find(
|
|
3959
4061
|
(t) => t.key.includes(r)
|
|
3960
4062
|
);
|
|
@@ -3962,23 +4064,23 @@ function re(e, r) {
|
|
|
3962
4064
|
throw new Error(`Modifier "${r}" not found`);
|
|
3963
4065
|
return n;
|
|
3964
4066
|
}
|
|
3965
|
-
function
|
|
4067
|
+
function ae(e) {
|
|
3966
4068
|
const r = [];
|
|
3967
4069
|
function n(t, i) {
|
|
3968
4070
|
i.length > 0 && r.push([...i].sort());
|
|
3969
4071
|
for (let c = t; c < e.length; c++) {
|
|
3970
|
-
const
|
|
3971
|
-
if (
|
|
3972
|
-
if (
|
|
3973
|
-
n(c + 1, [...i,
|
|
4072
|
+
const s = e[c];
|
|
4073
|
+
if (s)
|
|
4074
|
+
if (s.length === 1 && s[0])
|
|
4075
|
+
n(c + 1, [...i, s[0]]);
|
|
3974
4076
|
else
|
|
3975
|
-
for (const
|
|
3976
|
-
n(c + 1, [...i,
|
|
4077
|
+
for (const a of s)
|
|
4078
|
+
n(c + 1, [...i, a]);
|
|
3977
4079
|
}
|
|
3978
4080
|
}
|
|
3979
4081
|
return n(0, []), r.sort((t, i) => t.length !== i.length ? t.length - i.length : t.join(",").localeCompare(i.join(",")));
|
|
3980
4082
|
}
|
|
3981
|
-
function
|
|
4083
|
+
function ue(e, r, n) {
|
|
3982
4084
|
const t = {
|
|
3983
4085
|
...e,
|
|
3984
4086
|
modifiers: [...n.keys()]
|
|
@@ -3986,13 +4088,13 @@ function fe(e, r, n) {
|
|
|
3986
4088
|
for (const c of n.values())
|
|
3987
4089
|
c.factory({
|
|
3988
4090
|
...i,
|
|
3989
|
-
declarations:
|
|
3990
|
-
variables:
|
|
3991
|
-
children:
|
|
3992
|
-
}),
|
|
4091
|
+
declarations: F(t.declarations),
|
|
4092
|
+
variables: F(t.variables),
|
|
4093
|
+
children: F(t.children)
|
|
4094
|
+
}), R(t.declarations, i);
|
|
3993
4095
|
return t;
|
|
3994
4096
|
}
|
|
3995
|
-
function
|
|
4097
|
+
function le(e, r) {
|
|
3996
4098
|
return function(t, i) {
|
|
3997
4099
|
const c = {
|
|
3998
4100
|
type: "modifier",
|
|
@@ -4002,7 +4104,7 @@ function ue(e, r) {
|
|
|
4002
4104
|
return r.modifiers.push(c), c;
|
|
4003
4105
|
};
|
|
4004
4106
|
}
|
|
4005
|
-
function
|
|
4107
|
+
function ye() {
|
|
4006
4108
|
return {
|
|
4007
4109
|
type: "root",
|
|
4008
4110
|
declarations: {},
|
|
@@ -4014,30 +4116,84 @@ function ae() {
|
|
|
4014
4116
|
themes: []
|
|
4015
4117
|
};
|
|
4016
4118
|
}
|
|
4017
|
-
function
|
|
4119
|
+
function de(e, r) {
|
|
4120
|
+
const n = P({ namespace: e });
|
|
4121
|
+
return (t) => {
|
|
4122
|
+
if (typeof t == "string" && t[0] === "@") {
|
|
4123
|
+
const i = t.slice(1), c = e.find(
|
|
4124
|
+
(s) => i === s || i.startsWith(`${s}.`)
|
|
4125
|
+
);
|
|
4126
|
+
if (c) {
|
|
4127
|
+
const s = i.slice(c.length + 1) || i;
|
|
4128
|
+
if (r.variables.some((a) => a.name === i))
|
|
4129
|
+
return {
|
|
4130
|
+
[s]: {
|
|
4131
|
+
type: "reference",
|
|
4132
|
+
name: i
|
|
4133
|
+
}
|
|
4134
|
+
};
|
|
4135
|
+
} else
|
|
4136
|
+
for (const s of e) {
|
|
4137
|
+
const a = `${s}.${i}`;
|
|
4138
|
+
if (r.variables.some((o) => o.name === a))
|
|
4139
|
+
return {
|
|
4140
|
+
[i]: {
|
|
4141
|
+
type: "reference",
|
|
4142
|
+
name: a
|
|
4143
|
+
}
|
|
4144
|
+
};
|
|
4145
|
+
}
|
|
4146
|
+
return n(t);
|
|
4147
|
+
}
|
|
4148
|
+
return n(t);
|
|
4149
|
+
};
|
|
4150
|
+
}
|
|
4151
|
+
function me(e, r) {
|
|
4018
4152
|
return function(t, i, c = {}) {
|
|
4019
|
-
const
|
|
4153
|
+
const s = {
|
|
4020
4154
|
type: "utility",
|
|
4021
4155
|
name: t,
|
|
4022
4156
|
factory: i,
|
|
4023
4157
|
values: [],
|
|
4024
|
-
autogenerate: c.autogenerate ??
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4158
|
+
autogenerate: c.autogenerate ?? (Array.isArray(c.namespace) ? de(c.namespace, r) : P(
|
|
4159
|
+
c.namespace ? { namespace: c.namespace } : void 0
|
|
4160
|
+
)),
|
|
4161
|
+
namespace: c.namespace,
|
|
4162
|
+
create: (a, o = []) => {
|
|
4163
|
+
let f = a;
|
|
4164
|
+
if (Array.isArray(a)) {
|
|
4028
4165
|
f = {};
|
|
4029
|
-
for (const l of
|
|
4030
|
-
const
|
|
4166
|
+
for (const l of a) {
|
|
4167
|
+
const u = s.autogenerate(l);
|
|
4031
4168
|
f = {
|
|
4032
4169
|
...f,
|
|
4033
|
-
...
|
|
4170
|
+
...u
|
|
4034
4171
|
};
|
|
4035
4172
|
}
|
|
4036
4173
|
}
|
|
4037
|
-
for (const [l,
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4174
|
+
for (const [l, u] of Object.entries(f)) {
|
|
4175
|
+
let y = u;
|
|
4176
|
+
if (s.namespace && j(u))
|
|
4177
|
+
if (r.variables.some((g) => g.name === u.name))
|
|
4178
|
+
y = u;
|
|
4179
|
+
else {
|
|
4180
|
+
const g = Array.isArray(s.namespace) ? s.namespace : [s.namespace];
|
|
4181
|
+
let $2 = false;
|
|
4182
|
+
for (const O2 of g) {
|
|
4183
|
+
const m = `${O2}.${l}`;
|
|
4184
|
+
if (m !== u.name && r.variables.some((b) => b.name === m)) {
|
|
4185
|
+
y = {
|
|
4186
|
+
type: "reference",
|
|
4187
|
+
name: m
|
|
4188
|
+
}, $2 = true;
|
|
4189
|
+
break;
|
|
4190
|
+
}
|
|
4191
|
+
}
|
|
4192
|
+
$2 || (y = l);
|
|
4193
|
+
}
|
|
4194
|
+
const p = s.values.find(
|
|
4195
|
+
(g) => g.key === l && g.modifiers.length === 0
|
|
4196
|
+
), d2 = {
|
|
4041
4197
|
type: "utility",
|
|
4042
4198
|
name: t,
|
|
4043
4199
|
value: l,
|
|
@@ -4045,196 +4201,246 @@ function le(e, r) {
|
|
|
4045
4201
|
variables: [],
|
|
4046
4202
|
children: [],
|
|
4047
4203
|
modifiers: []
|
|
4048
|
-
},
|
|
4049
|
-
|
|
4204
|
+
}, w2 = v(
|
|
4205
|
+
d2,
|
|
4050
4206
|
r
|
|
4051
4207
|
);
|
|
4052
|
-
if (
|
|
4053
|
-
...
|
|
4054
|
-
value:
|
|
4055
|
-
}) ?? {},
|
|
4208
|
+
if (d2.declarations = i({
|
|
4209
|
+
...w2,
|
|
4210
|
+
value: y
|
|
4211
|
+
}) ?? {}, R(d2.declarations, w2), p || (s.values.push({
|
|
4056
4212
|
key: l,
|
|
4057
|
-
value:
|
|
4213
|
+
value: y,
|
|
4058
4214
|
modifiers: []
|
|
4059
|
-
}), e.children.push(
|
|
4060
|
-
const
|
|
4061
|
-
(
|
|
4062
|
-
)).reduce((
|
|
4063
|
-
const
|
|
4064
|
-
for (const
|
|
4065
|
-
const
|
|
4066
|
-
(
|
|
4215
|
+
}), e.children.push(d2)), o && o.length > 0) {
|
|
4216
|
+
const g = o.map((m) => m.key), O2 = ae(g).filter((m) => !s.values.find(
|
|
4217
|
+
(b) => b.key === l && b.modifiers.length === m.length && b.modifiers.every((k2) => m.includes(k2))
|
|
4218
|
+
)).reduce((m, b) => {
|
|
4219
|
+
const k2 = /* @__PURE__ */ new Map();
|
|
4220
|
+
for (const U2 of b) {
|
|
4221
|
+
const M2 = o.find(
|
|
4222
|
+
(q2) => q2.key.includes(U2)
|
|
4067
4223
|
);
|
|
4068
|
-
|
|
4224
|
+
M2 && I(M2) && k2.set(U2, M2);
|
|
4069
4225
|
}
|
|
4070
|
-
return
|
|
4226
|
+
return s.values.push({
|
|
4071
4227
|
key: l,
|
|
4072
|
-
value:
|
|
4073
|
-
modifiers:
|
|
4074
|
-
}),
|
|
4228
|
+
value: y,
|
|
4229
|
+
modifiers: b
|
|
4230
|
+
}), m.push(ue(d2, r, k2)), m;
|
|
4075
4231
|
}, []);
|
|
4076
|
-
e.children.push(...
|
|
4232
|
+
e.children.push(...O2);
|
|
4077
4233
|
}
|
|
4078
4234
|
}
|
|
4079
4235
|
}
|
|
4080
4236
|
};
|
|
4081
|
-
return r.utilities.push(
|
|
4237
|
+
return r.utilities.push(s), s.create;
|
|
4082
4238
|
};
|
|
4083
4239
|
}
|
|
4084
|
-
function
|
|
4240
|
+
function pe(e, r) {
|
|
4085
4241
|
return function(t, i) {
|
|
4086
|
-
const c = r.themes.find((
|
|
4242
|
+
const c = r.themes.find((o) => o.name === t), s = c ?? {
|
|
4087
4243
|
type: "theme",
|
|
4088
4244
|
name: t,
|
|
4089
4245
|
declarations: {},
|
|
4090
4246
|
variables: [],
|
|
4091
4247
|
children: []
|
|
4092
4248
|
};
|
|
4093
|
-
c || r.themes.push(
|
|
4094
|
-
const
|
|
4095
|
-
return i && i(
|
|
4249
|
+
c || r.themes.push(s);
|
|
4250
|
+
const a = v(s, r);
|
|
4251
|
+
return i && i(a), s;
|
|
4096
4252
|
};
|
|
4097
4253
|
}
|
|
4098
|
-
function
|
|
4254
|
+
function he(e, r) {
|
|
4099
4255
|
return function(t) {
|
|
4100
4256
|
const i = {
|
|
4101
4257
|
type: "recipe",
|
|
4102
4258
|
...t
|
|
4103
4259
|
};
|
|
4104
|
-
return i._runtime =
|
|
4260
|
+
return i._runtime = ge(i, r), be(i, r), r.recipes.push(i), i;
|
|
4105
4261
|
};
|
|
4106
4262
|
}
|
|
4107
4263
|
function _(e, r) {
|
|
4108
4264
|
const n = e.autogenerate(r);
|
|
4109
4265
|
return Object.keys(n)[0] ?? "default";
|
|
4110
4266
|
}
|
|
4111
|
-
function
|
|
4267
|
+
function x(e, r) {
|
|
4112
4268
|
const n = {};
|
|
4113
4269
|
for (const [t, i] of Object.entries(e))
|
|
4114
|
-
if (
|
|
4270
|
+
if (L(i)) {
|
|
4115
4271
|
const c = {};
|
|
4116
|
-
for (const [
|
|
4117
|
-
const
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
)
|
|
4272
|
+
for (const [s, a] of Object.entries(i)) {
|
|
4273
|
+
const o = S(r, s);
|
|
4274
|
+
o ? c[s] = _(
|
|
4275
|
+
o,
|
|
4276
|
+
a
|
|
4277
|
+
) : console.warn(
|
|
4278
|
+
`[styleframe] Utility "${s}" not found in registry. Skipping runtime generation for this declaration.`
|
|
4279
|
+
);
|
|
4122
4280
|
}
|
|
4123
4281
|
n[t] = c;
|
|
4124
4282
|
} else if (typeof i == "boolean")
|
|
4125
4283
|
n[t] = i;
|
|
4126
4284
|
else {
|
|
4127
|
-
const c =
|
|
4128
|
-
c
|
|
4285
|
+
const c = S(r, t);
|
|
4286
|
+
c ? n[t] = _(c, i) : console.warn(
|
|
4287
|
+
`[styleframe] Utility "${t}" not found in registry. Skipping runtime generation for this declaration.`
|
|
4288
|
+
);
|
|
4129
4289
|
}
|
|
4130
4290
|
return n;
|
|
4131
4291
|
}
|
|
4132
|
-
function
|
|
4292
|
+
function ge(e, r) {
|
|
4133
4293
|
const n = {};
|
|
4134
|
-
if (e.base && (n.base =
|
|
4294
|
+
if (e.base && (n.base = x(e.base, r)), e.variants) {
|
|
4135
4295
|
const t = {};
|
|
4136
4296
|
for (const [i, c] of Object.entries(e.variants)) {
|
|
4137
|
-
const
|
|
4138
|
-
for (const [
|
|
4297
|
+
const s = {};
|
|
4298
|
+
for (const [a, o] of Object.entries(
|
|
4139
4299
|
c
|
|
4140
4300
|
))
|
|
4141
|
-
|
|
4142
|
-
|
|
4301
|
+
o == null ? s[a] = null : s[a] = x(
|
|
4302
|
+
o,
|
|
4143
4303
|
r
|
|
4144
4304
|
);
|
|
4145
|
-
t[i] =
|
|
4305
|
+
t[i] = s;
|
|
4146
4306
|
}
|
|
4147
4307
|
n.variants = t;
|
|
4148
4308
|
}
|
|
4149
4309
|
return e.defaultVariants && (n.defaultVariants = { ...e.defaultVariants }), e.compoundVariants && (n.compoundVariants = e.compoundVariants.map((t) => ({
|
|
4150
4310
|
match: { ...t.match },
|
|
4151
|
-
css:
|
|
4311
|
+
css: x(t.css, r)
|
|
4152
4312
|
}))), n;
|
|
4153
4313
|
}
|
|
4154
|
-
function
|
|
4155
|
-
return !
|
|
4314
|
+
function L(e) {
|
|
4315
|
+
return !j(e) && typeof e == "object" && e !== null;
|
|
4156
4316
|
}
|
|
4157
|
-
function
|
|
4317
|
+
function E(e, r) {
|
|
4158
4318
|
const n = (t, i, c) => {
|
|
4159
|
-
let
|
|
4160
|
-
|
|
4319
|
+
let s = r.get(t);
|
|
4320
|
+
s || (s = [], r.set(t, s)), s.push({ value: i, modifiers: c });
|
|
4161
4321
|
};
|
|
4162
4322
|
for (const [t, i] of Object.entries(e))
|
|
4163
|
-
if (
|
|
4323
|
+
if (L(i)) {
|
|
4164
4324
|
const c = t.split(":");
|
|
4165
|
-
for (const [
|
|
4166
|
-
n(
|
|
4325
|
+
for (const [s, a] of Object.entries(i))
|
|
4326
|
+
n(s, a, c);
|
|
4167
4327
|
} else
|
|
4168
4328
|
n(t, i, []);
|
|
4169
4329
|
}
|
|
4170
|
-
function
|
|
4330
|
+
function S(e, r) {
|
|
4171
4331
|
const n = e.utilities.find((i) => i.name === r);
|
|
4172
4332
|
if (n)
|
|
4173
4333
|
return n;
|
|
4174
4334
|
const t = r.replace(/[A-Z]/g, (i) => `-${i.toLowerCase()}`);
|
|
4175
4335
|
return e.utilities.find((i) => i.name === t);
|
|
4176
4336
|
}
|
|
4177
|
-
function
|
|
4337
|
+
function be(e, r) {
|
|
4178
4338
|
const n = /* @__PURE__ */ new Map();
|
|
4179
|
-
if (e.base &&
|
|
4339
|
+
if (e.base && E(e.base, n), e.variants)
|
|
4180
4340
|
for (const i of Object.values(e.variants))
|
|
4181
4341
|
for (const c of Object.values(i))
|
|
4182
|
-
|
|
4342
|
+
E(
|
|
4183
4343
|
c,
|
|
4184
4344
|
n
|
|
4185
4345
|
);
|
|
4186
4346
|
if (e.compoundVariants)
|
|
4187
4347
|
for (const i of e.compoundVariants)
|
|
4188
|
-
i.css &&
|
|
4348
|
+
i.css && E(i.css, n);
|
|
4189
4349
|
const t = /* @__PURE__ */ new Map();
|
|
4190
4350
|
for (const [i, c] of n) {
|
|
4191
|
-
const
|
|
4192
|
-
if (!
|
|
4351
|
+
const s = S(r, i);
|
|
4352
|
+
if (!s) {
|
|
4193
4353
|
console.warn(
|
|
4194
4354
|
`[styleframe] Utility "${i}" not found in registry. Skipping.`
|
|
4195
4355
|
);
|
|
4196
4356
|
continue;
|
|
4197
4357
|
}
|
|
4198
|
-
for (const
|
|
4199
|
-
const
|
|
4200
|
-
for (const f of
|
|
4358
|
+
for (const a of c) {
|
|
4359
|
+
const o = [];
|
|
4360
|
+
for (const f of a.modifiers) {
|
|
4201
4361
|
if (!t.has(f))
|
|
4202
4362
|
try {
|
|
4203
|
-
t.set(f,
|
|
4363
|
+
t.set(f, se(r, f));
|
|
4204
4364
|
} catch {
|
|
4205
4365
|
console.warn(
|
|
4206
4366
|
`[styleframe] Modifier "${f}" not found in registry. Skipping modifier for utility "${i}".`
|
|
4207
4367
|
), t.set(f, null);
|
|
4208
4368
|
}
|
|
4209
4369
|
const l = t.get(f);
|
|
4210
|
-
l &&
|
|
4370
|
+
l && o.push(l);
|
|
4211
4371
|
}
|
|
4212
|
-
|
|
4213
|
-
[
|
|
4214
|
-
|
|
4372
|
+
s.create(
|
|
4373
|
+
[a.value],
|
|
4374
|
+
o.length > 0 ? o : void 0
|
|
4215
4375
|
);
|
|
4216
4376
|
}
|
|
4217
4377
|
}
|
|
4218
4378
|
}
|
|
4219
|
-
function
|
|
4220
|
-
const r =
|
|
4379
|
+
function Fe(e) {
|
|
4380
|
+
const r = ie("sf-"), n = ye(), t = { ...e }, i = me(n, n), c = le(n, n), s = he(n, n), a = pe(n, n), { variable: o, selector: f, atRule: l, keyframes: u, media: y, ref: p, css: d2 } = v(n, n);
|
|
4221
4381
|
return {
|
|
4222
4382
|
id: r,
|
|
4223
4383
|
root: n,
|
|
4224
|
-
variable:
|
|
4384
|
+
variable: o,
|
|
4225
4385
|
selector: f,
|
|
4226
4386
|
utility: i,
|
|
4227
4387
|
modifier: c,
|
|
4228
|
-
recipe:
|
|
4229
|
-
theme:
|
|
4388
|
+
recipe: s,
|
|
4389
|
+
theme: a,
|
|
4230
4390
|
atRule: l,
|
|
4231
|
-
keyframes:
|
|
4391
|
+
keyframes: u,
|
|
4232
4392
|
media: y,
|
|
4233
|
-
ref:
|
|
4393
|
+
ref: p,
|
|
4234
4394
|
css: d2,
|
|
4235
4395
|
options: t
|
|
4236
4396
|
};
|
|
4237
4397
|
}
|
|
4398
|
+
function createLoader(basePath, alias) {
|
|
4399
|
+
return createJiti(basePath, {
|
|
4400
|
+
fsCache: false,
|
|
4401
|
+
moduleCache: false,
|
|
4402
|
+
alias
|
|
4403
|
+
});
|
|
4404
|
+
}
|
|
4405
|
+
function trackExports(module) {
|
|
4406
|
+
const exports = /* @__PURE__ */ new Map();
|
|
4407
|
+
for (const [name, value] of Object.entries(module)) {
|
|
4408
|
+
if (name === "default") continue;
|
|
4409
|
+
let type = null;
|
|
4410
|
+
if (ke(value)) {
|
|
4411
|
+
type = "recipe";
|
|
4412
|
+
value._exportName = name;
|
|
4413
|
+
} else if (Ae(value)) {
|
|
4414
|
+
type = "selector";
|
|
4415
|
+
value._exportName = name;
|
|
4416
|
+
}
|
|
4417
|
+
if (type) {
|
|
4418
|
+
exports.set(name, { name, type });
|
|
4419
|
+
}
|
|
4420
|
+
}
|
|
4421
|
+
return exports;
|
|
4422
|
+
}
|
|
4423
|
+
async function loadModule(filePath, options = {}) {
|
|
4424
|
+
const { alias, validateInstance = true } = options;
|
|
4425
|
+
const jiti2 = createLoader(path.dirname(filePath), alias);
|
|
4426
|
+
const module = await jiti2.import(filePath);
|
|
4427
|
+
if (!module.default) {
|
|
4428
|
+
throw new Error(
|
|
4429
|
+
`Missing default export in ${filePath}. Expected a Styleframe instance.`
|
|
4430
|
+
);
|
|
4431
|
+
}
|
|
4432
|
+
if (validateInstance && !Ve(module.default)) {
|
|
4433
|
+
throw new Error(
|
|
4434
|
+
`Invalid default export in ${filePath}. Expected a Styleframe instance created with styleframe().`
|
|
4435
|
+
);
|
|
4436
|
+
}
|
|
4437
|
+
const exports = trackExports(module);
|
|
4438
|
+
return {
|
|
4439
|
+
module,
|
|
4440
|
+
instance: module.default,
|
|
4441
|
+
exports
|
|
4442
|
+
};
|
|
4443
|
+
}
|
|
4238
4444
|
const SUPPORTED_EXTENSIONS = [".ts", ".mts", ".cts", ".js", ".mjs", ".cjs"];
|
|
4239
4445
|
function hasKnownExtension(filePath) {
|
|
4240
4446
|
return SUPPORTED_EXTENSIONS.some((ext) => filePath.endsWith(ext));
|
|
@@ -4252,76 +4458,18 @@ function resolveConfigFile(cwd, entry) {
|
|
|
4252
4458
|
}
|
|
4253
4459
|
return void 0;
|
|
4254
4460
|
}
|
|
4255
|
-
function trackNamedExports(module) {
|
|
4256
|
-
for (const [exportName, exportValue] of Object.entries(module)) {
|
|
4257
|
-
if (exportName === "default") continue;
|
|
4258
|
-
if (Ae(exportValue)) {
|
|
4259
|
-
exportValue._exportName = exportName;
|
|
4260
|
-
} else if (be(exportValue)) {
|
|
4261
|
-
exportValue._exportName = exportName;
|
|
4262
|
-
}
|
|
4263
|
-
}
|
|
4264
|
-
}
|
|
4265
4461
|
async function loadConfiguration({
|
|
4266
4462
|
cwd = process.cwd(),
|
|
4267
4463
|
entry = "styleframe.config"
|
|
4268
4464
|
} = {}) {
|
|
4269
4465
|
const resolvedPath = resolveConfigFile(cwd, entry);
|
|
4270
4466
|
if (!resolvedPath) {
|
|
4271
|
-
return
|
|
4467
|
+
return Fe();
|
|
4272
4468
|
}
|
|
4273
|
-
const
|
|
4274
|
-
|
|
4275
|
-
if (!module.default) {
|
|
4276
|
-
throw new Error(
|
|
4277
|
-
`Missing default export in ${resolvedPath}. Expected a Styleframe instance.`
|
|
4278
|
-
);
|
|
4279
|
-
}
|
|
4280
|
-
trackNamedExports(module);
|
|
4281
|
-
return module.default;
|
|
4469
|
+
const { instance } = await loadModule(resolvedPath);
|
|
4470
|
+
return instance;
|
|
4282
4471
|
}
|
|
4283
|
-
const build = defineCommand({
|
|
4284
|
-
meta: {
|
|
4285
|
-
name: "build",
|
|
4286
|
-
description: "Build Styleframe project from source files"
|
|
4287
|
-
},
|
|
4288
|
-
args: {
|
|
4289
|
-
entry: {
|
|
4290
|
-
type: "positional",
|
|
4291
|
-
description: "Entry point file(s) for the build",
|
|
4292
|
-
default: "styleframe.config.ts",
|
|
4293
|
-
valueHint: "path"
|
|
4294
|
-
},
|
|
4295
|
-
outputDir: {
|
|
4296
|
-
type: "string",
|
|
4297
|
-
description: "Output directory for built files",
|
|
4298
|
-
default: "styleframe",
|
|
4299
|
-
alias: ["o", "out"],
|
|
4300
|
-
valueHint: "path"
|
|
4301
|
-
},
|
|
4302
|
-
clean: {
|
|
4303
|
-
type: "boolean",
|
|
4304
|
-
description: "Clean output directory before build",
|
|
4305
|
-
default: false
|
|
4306
|
-
}
|
|
4307
|
-
},
|
|
4308
|
-
async run({ args }) {
|
|
4309
|
-
consola.info(
|
|
4310
|
-
`Loading configuration from "${path.relative(process.cwd(), path.resolve(args.entry))}"...`
|
|
4311
|
-
);
|
|
4312
|
-
const instance = await loadConfiguration({ entry: args.entry });
|
|
4313
|
-
consola.info("Building styleframe...");
|
|
4314
|
-
try {
|
|
4315
|
-
await build$1(instance, {
|
|
4316
|
-
outputDir: args.outputDir,
|
|
4317
|
-
clean: args.clean
|
|
4318
|
-
});
|
|
4319
|
-
consola.success("Styleframe built successfully!");
|
|
4320
|
-
} catch (error) {
|
|
4321
|
-
consola.error("Failed to build Styleframe:", error);
|
|
4322
|
-
}
|
|
4323
|
-
}
|
|
4324
|
-
});
|
|
4325
4472
|
export {
|
|
4326
|
-
build as
|
|
4473
|
+
build as b,
|
|
4474
|
+
loadConfiguration as l
|
|
4327
4475
|
};
|