@vue/devtools-electron 7.0.17 → 7.0.19
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/client/assets/index-GBG_N3yP.css +1 -0
- package/client/assets/index-RYPjiZAm.js +1096 -0
- package/client/assets/unocss-runtime-1I7U-Xvx.js +2 -0
- package/client/assets/vitesse-dark-jCpginLY.js +1 -0
- package/client/assets/vitesse-light-W1hZpt2R.js +1 -0
- package/client/assets/{vue-Wn5yI_YW.js → vue-EJd75Pva.js} +2 -2
- package/client/assets/{vue-html-eZW7UT2w.js → vue-html-Zq9JvlnT.js} +1 -1
- package/client/devtools-panel.css +1 -1
- package/client/devtools-panel.js +37531 -37510
- package/client/index.html +2 -2
- package/client/{unocss-runtime-JevVua36.js → unocss-runtime-3cAvH9Ku.js} +691 -666
- package/client/{vitesse-dark-Q3b2Vb5y.js → vitesse-dark-dKCfdby4.js} +7 -7
- package/client/{vitesse-light-T_UJmsth.js → vitesse-light-zG4GVY1U.js} +7 -7
- package/client/{vue--7M_SvxI.js → vue-Wq24sg5G.js} +2 -2
- package/client/{vue-html-GGnAavHU.js → vue-html-IdmxoL84.js} +1 -1
- package/dist/devtools.js +133 -133
- package/dist/index.cjs +14 -14
- package/dist/index.js +14 -14
- package/dist/user-app.cjs +39 -39
- package/dist/user-app.iife.js +57 -57
- package/dist/user-app.js +40 -40
- package/package.json +6 -6
- package/client/assets/index-rw3ThENc.css +0 -1
- package/client/assets/index-znADLMKs.js +0 -1096
- package/client/assets/onig-mBJmD8D5.js +0 -1
- package/client/assets/unocss-runtime-hgvl0qIb.js +0 -2
- package/client/assets/vitesse-dark-5VceXvs6.js +0 -1
- package/client/assets/vitesse-light-HOMMxGxw.js +0 -1
- package/client/onig-NuJRzyUz.js +0 -4
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
1
|
+
const Fe = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/, Ve = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/, Be = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
|
|
2
|
+
function Ge(e, t) {
|
|
3
3
|
if (e === "__proto__" || e === "constructor" && t && typeof t == "object" && "prototype" in t) {
|
|
4
|
-
|
|
4
|
+
He(e);
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
7
|
return t;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function He(e) {
|
|
10
10
|
console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function ze(e, t = {}) {
|
|
13
13
|
if (typeof e != "string")
|
|
14
14
|
return e;
|
|
15
15
|
const n = e.trim();
|
|
@@ -35,16 +35,16 @@ function He(e, t = {}) {
|
|
|
35
35
|
if (s === "-infinity")
|
|
36
36
|
return Number.NEGATIVE_INFINITY;
|
|
37
37
|
}
|
|
38
|
-
if (!
|
|
38
|
+
if (!Be.test(e)) {
|
|
39
39
|
if (t.strict)
|
|
40
40
|
throw new SyntaxError("[destr] Invalid JSON");
|
|
41
41
|
return e;
|
|
42
42
|
}
|
|
43
43
|
try {
|
|
44
|
-
if (
|
|
44
|
+
if (Fe.test(e) || Ve.test(e)) {
|
|
45
45
|
if (t.strict)
|
|
46
46
|
throw new Error("[destr] Possible prototype pollution");
|
|
47
|
-
return JSON.parse(e,
|
|
47
|
+
return JSON.parse(e, Ge);
|
|
48
48
|
}
|
|
49
49
|
return JSON.parse(e);
|
|
50
50
|
} catch (s) {
|
|
@@ -53,61 +53,61 @@ function He(e, t = {}) {
|
|
|
53
53
|
return e;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
function
|
|
58
|
-
return encodeURI("" + e).replace(
|
|
56
|
+
const qe = /#/g, We = /&/g, Ke = /\//g, Je = /=/g, se = /\+/g, Xe = /%5e/gi, Qe = /%60/gi, Ye = /%7c/gi, Ze = /%20/gi;
|
|
57
|
+
function et(e) {
|
|
58
|
+
return encodeURI("" + e).replace(Ye, "|");
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
return
|
|
60
|
+
function ee(e) {
|
|
61
|
+
return et(typeof e == "string" ? e : JSON.stringify(e)).replace(se, "%2B").replace(Ze, "+").replace(qe, "%23").replace(We, "%26").replace(Qe, "`").replace(Xe, "^").replace(Ke, "%2F");
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
return
|
|
63
|
+
function J(e) {
|
|
64
|
+
return ee(e).replace(Je, "%3D");
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Ee(e = "") {
|
|
67
67
|
try {
|
|
68
68
|
return decodeURIComponent("" + e);
|
|
69
69
|
} catch {
|
|
70
70
|
return "" + e;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
return
|
|
73
|
+
function tt(e) {
|
|
74
|
+
return Ee(e.replace(se, " "));
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return
|
|
76
|
+
function nt(e) {
|
|
77
|
+
return Ee(e.replace(se, " "));
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function st(e = "") {
|
|
80
80
|
const t = {};
|
|
81
81
|
e[0] === "?" && (e = e.slice(1));
|
|
82
82
|
for (const n of e.split("&")) {
|
|
83
83
|
const s = n.match(/([^=]+)=?(.*)/) || [];
|
|
84
84
|
if (s.length < 2)
|
|
85
85
|
continue;
|
|
86
|
-
const o =
|
|
86
|
+
const o = tt(s[1]);
|
|
87
87
|
if (o === "__proto__" || o === "constructor")
|
|
88
88
|
continue;
|
|
89
|
-
const r =
|
|
89
|
+
const r = nt(s[2] || "");
|
|
90
90
|
t[o] === void 0 ? t[o] = r : Array.isArray(t[o]) ? t[o].push(r) : t[o] = [t[o], r];
|
|
91
91
|
}
|
|
92
92
|
return t;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
return (typeof t == "number" || typeof t == "boolean") && (t = String(t)), t ? Array.isArray(t) ? t.map((n) => `${
|
|
94
|
+
function ot(e, t) {
|
|
95
|
+
return (typeof t == "number" || typeof t == "boolean") && (t = String(t)), t ? Array.isArray(t) ? t.map((n) => `${J(e)}=${ee(n)}`).join("&") : `${J(e)}=${ee(t)}` : J(e);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
return Object.keys(e).filter((t) => e[t] !== void 0).map((t) =>
|
|
97
|
+
function rt(e) {
|
|
98
|
+
return Object.keys(e).filter((t) => e[t] !== void 0).map((t) => ot(t, e[t])).filter(Boolean).join("&");
|
|
99
99
|
}
|
|
100
|
-
const
|
|
101
|
-
function
|
|
102
|
-
return typeof t == "boolean" && (t = { acceptRelative: t }), t.strict ?
|
|
100
|
+
const it = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/, at = /^[\s\w\0+.-]{2,}:([/\\]{2})?/, ct = /^([/\\]\s*){2,}[^/\\]/, lt = /\/$|\/\?|\/#/, ut = /^\.?\//;
|
|
101
|
+
function xe(e, t = {}) {
|
|
102
|
+
return typeof t == "boolean" && (t = { acceptRelative: t }), t.strict ? it.test(e) : at.test(e) || (t.acceptRelative ? ct.test(e) : !1);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
return t ?
|
|
104
|
+
function te(e = "", t) {
|
|
105
|
+
return t ? lt.test(e) : e.endsWith("/");
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function ft(e = "", t) {
|
|
108
108
|
if (!t)
|
|
109
|
-
return (
|
|
110
|
-
if (!
|
|
109
|
+
return (te(e) ? e.slice(0, -1) : e) || "/";
|
|
110
|
+
if (!te(e, !0))
|
|
111
111
|
return e || "/";
|
|
112
112
|
let n = e, s = "";
|
|
113
113
|
const o = e.indexOf("#");
|
|
@@ -115,10 +115,10 @@ function lt(e = "", t) {
|
|
|
115
115
|
const [r, ...a] = n.split("?");
|
|
116
116
|
return (r.slice(0, -1) || "/") + (a.length > 0 ? `?${a.join("?")}` : "") + s;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function pt(e = "", t) {
|
|
119
119
|
if (!t)
|
|
120
120
|
return e.endsWith("/") ? e : e + "/";
|
|
121
|
-
if (
|
|
121
|
+
if (te(e, !0))
|
|
122
122
|
return e || "/";
|
|
123
123
|
let n = e, s = "";
|
|
124
124
|
const o = e.indexOf("#");
|
|
@@ -127,52 +127,52 @@ function ut(e = "", t) {
|
|
|
127
127
|
const [r, ...a] = n.split("?");
|
|
128
128
|
return r + "/" + (a.length > 0 ? `?${a.join("?")}` : "") + s;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
if (
|
|
130
|
+
function dt(e, t) {
|
|
131
|
+
if (ht(t) || xe(e))
|
|
132
132
|
return e;
|
|
133
|
-
const n =
|
|
134
|
-
return e.startsWith(n) ? e :
|
|
133
|
+
const n = ft(t);
|
|
134
|
+
return e.startsWith(n) ? e : gt(n, e);
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
const n =
|
|
138
|
-
return n.search =
|
|
136
|
+
function mt(e, t) {
|
|
137
|
+
const n = Ce(e), s = { ...st(n.search), ...t };
|
|
138
|
+
return n.search = rt(s), yt(n);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function ht(e) {
|
|
141
141
|
return !e || e === "/";
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function _t(e) {
|
|
144
144
|
return e && e !== "/";
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function gt(e, ...t) {
|
|
147
147
|
let n = e || "";
|
|
148
|
-
for (const s of t.filter((o) =>
|
|
148
|
+
for (const s of t.filter((o) => _t(o)))
|
|
149
149
|
if (n) {
|
|
150
|
-
const o = s.replace(
|
|
151
|
-
n =
|
|
150
|
+
const o = s.replace(ut, "");
|
|
151
|
+
n = pt(n) + o;
|
|
152
152
|
} else
|
|
153
153
|
n = s;
|
|
154
154
|
return n;
|
|
155
155
|
}
|
|
156
|
-
const
|
|
157
|
-
function
|
|
156
|
+
const Ae = Symbol.for("ufo:protocolRelative");
|
|
157
|
+
function Ce(e = "", t) {
|
|
158
158
|
const n = e.match(
|
|
159
159
|
/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i
|
|
160
160
|
);
|
|
161
161
|
if (n) {
|
|
162
|
-
const [,
|
|
162
|
+
const [, u, d = ""] = n;
|
|
163
163
|
return {
|
|
164
|
-
protocol:
|
|
164
|
+
protocol: u.toLowerCase(),
|
|
165
165
|
pathname: d,
|
|
166
|
-
href:
|
|
166
|
+
href: u + d,
|
|
167
167
|
auth: "",
|
|
168
168
|
host: "",
|
|
169
169
|
search: "",
|
|
170
170
|
hash: ""
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
-
if (!
|
|
174
|
-
return t ?
|
|
175
|
-
const [, s = "", o, r = ""] = e.replace(/\\/g, "/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/) || [], [, a = "", l = ""] = r.match(/([^#/?]*)(.*)?/) || [], { pathname: c, search:
|
|
173
|
+
if (!xe(e, { acceptRelative: !0 }))
|
|
174
|
+
return t ? Ce(t + e) : ae(e);
|
|
175
|
+
const [, s = "", o, r = ""] = e.replace(/\\/g, "/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/) || [], [, a = "", l = ""] = r.match(/([^#/?]*)(.*)?/) || [], { pathname: c, search: f, hash: i } = ae(
|
|
176
176
|
l.replace(/\/(?=[A-Za-z]:)/, "")
|
|
177
177
|
);
|
|
178
178
|
return {
|
|
@@ -180,12 +180,12 @@ function xe(e = "", t) {
|
|
|
180
180
|
auth: o ? o.slice(0, Math.max(0, o.length - 1)) : "",
|
|
181
181
|
host: a,
|
|
182
182
|
pathname: c,
|
|
183
|
-
search:
|
|
183
|
+
search: f,
|
|
184
184
|
hash: i,
|
|
185
|
-
[
|
|
185
|
+
[Ae]: !s
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function ae(e = "") {
|
|
189
189
|
const [t = "", n = "", s = ""] = (e.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
|
|
190
190
|
return {
|
|
191
191
|
pathname: t,
|
|
@@ -193,66 +193,66 @@ function re(e = "") {
|
|
|
193
193
|
hash: s
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function yt(e) {
|
|
197
197
|
const t = e.pathname || "", n = e.search ? (e.search.startsWith("?") ? "" : "?") + e.search : "", s = e.hash || "", o = e.auth ? e.auth + "@" : "", r = e.host || "";
|
|
198
|
-
return (e.protocol || e[
|
|
198
|
+
return (e.protocol || e[Ae] ? (e.protocol || "") + "//" : "") + o + r + t + n + s;
|
|
199
199
|
}
|
|
200
|
-
class
|
|
200
|
+
class bt extends Error {
|
|
201
201
|
constructor(t, n) {
|
|
202
202
|
super(t, n), this.name = "FetchError", n != null && n.cause && !this.cause && (this.cause = n.cause);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
var c,
|
|
207
|
-
const t = ((c = e.error) == null ? void 0 : c.message) || ((
|
|
205
|
+
function vt(e) {
|
|
206
|
+
var c, f, i, u, d;
|
|
207
|
+
const t = ((c = e.error) == null ? void 0 : c.message) || ((f = e.error) == null ? void 0 : f.toString()) || "", n = ((i = e.request) == null ? void 0 : i.method) || ((u = e.options) == null ? void 0 : u.method) || "GET", s = ((d = e.request) == null ? void 0 : d.url) || String(e.request) || "/", o = `[${n}] ${JSON.stringify(s)}`, r = e.response ? `${e.response.status} ${e.response.statusText}` : "<no response>", a = `${o}: ${r}${t ? ` ${t}` : ""}`, l = new bt(
|
|
208
208
|
a,
|
|
209
209
|
e.error ? { cause: e.error } : void 0
|
|
210
210
|
);
|
|
211
|
-
for (const
|
|
212
|
-
Object.defineProperty(l,
|
|
211
|
+
for (const m of ["request", "options", "response"])
|
|
212
|
+
Object.defineProperty(l, m, {
|
|
213
213
|
get() {
|
|
214
|
-
return e[
|
|
214
|
+
return e[m];
|
|
215
215
|
}
|
|
216
216
|
});
|
|
217
|
-
for (const [
|
|
217
|
+
for (const [m, y] of [
|
|
218
218
|
["data", "_data"],
|
|
219
219
|
["status", "status"],
|
|
220
220
|
["statusCode", "status"],
|
|
221
221
|
["statusText", "statusText"],
|
|
222
222
|
["statusMessage", "statusText"]
|
|
223
223
|
])
|
|
224
|
-
Object.defineProperty(l,
|
|
224
|
+
Object.defineProperty(l, m, {
|
|
225
225
|
get() {
|
|
226
|
-
return e.response && e.response[
|
|
226
|
+
return e.response && e.response[y];
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
229
|
return l;
|
|
230
230
|
}
|
|
231
|
-
const
|
|
231
|
+
const wt = new Set(
|
|
232
232
|
Object.freeze(["PATCH", "POST", "PUT", "DELETE"])
|
|
233
233
|
);
|
|
234
|
-
function
|
|
235
|
-
return
|
|
234
|
+
function ce(e = "GET") {
|
|
235
|
+
return wt.has(e.toUpperCase());
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function St(e) {
|
|
238
238
|
if (e === void 0)
|
|
239
239
|
return !1;
|
|
240
240
|
const t = typeof e;
|
|
241
241
|
return t === "string" || t === "number" || t === "boolean" || t === null ? !0 : t !== "object" ? !1 : Array.isArray(e) ? !0 : e.buffer ? !1 : e.constructor && e.constructor.name === "Object" || typeof e.toJSON == "function";
|
|
242
242
|
}
|
|
243
|
-
const
|
|
243
|
+
const Et = /* @__PURE__ */ new Set([
|
|
244
244
|
"image/svg",
|
|
245
245
|
"application/xml",
|
|
246
246
|
"application/xhtml",
|
|
247
247
|
"application/html"
|
|
248
|
-
]),
|
|
249
|
-
function
|
|
248
|
+
]), xt = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
|
|
249
|
+
function At(e = "") {
|
|
250
250
|
if (!e)
|
|
251
251
|
return "json";
|
|
252
252
|
const t = e.split(";").shift() || "";
|
|
253
|
-
return
|
|
253
|
+
return xt.test(t) ? "json" : Et.has(t) || t.startsWith("text/") ? "text" : "blob";
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function Ct(e, t, n = globalThis.Headers) {
|
|
256
256
|
const s = {
|
|
257
257
|
...t,
|
|
258
258
|
...e
|
|
@@ -270,7 +270,7 @@ function xt(e, t, n = globalThis.Headers) {
|
|
|
270
270
|
}
|
|
271
271
|
return s;
|
|
272
272
|
}
|
|
273
|
-
const
|
|
273
|
+
const Ot = /* @__PURE__ */ new Set([
|
|
274
274
|
408,
|
|
275
275
|
// Request Timeout
|
|
276
276
|
409,
|
|
@@ -287,8 +287,8 @@ const Ct = /* @__PURE__ */ new Set([
|
|
|
287
287
|
// Service Unavailable
|
|
288
288
|
504
|
|
289
289
|
// Gateway Timeout
|
|
290
|
-
]),
|
|
291
|
-
function
|
|
290
|
+
]), Rt = /* @__PURE__ */ new Set([101, 204, 205, 304]);
|
|
291
|
+
function Oe(e = {}) {
|
|
292
292
|
const {
|
|
293
293
|
fetch: t = globalThis.fetch,
|
|
294
294
|
Headers: n = globalThis.Headers,
|
|
@@ -298,53 +298,53 @@ function Ce(e = {}) {
|
|
|
298
298
|
const c = l.error && l.error.name === "AbortError" && !l.options.timeout || !1;
|
|
299
299
|
if (l.options.retry !== !1 && !c) {
|
|
300
300
|
let i;
|
|
301
|
-
typeof l.options.retry == "number" ? i = l.options.retry : i =
|
|
302
|
-
const
|
|
303
|
-
if (i > 0 && (Array.isArray(l.options.retryStatusCodes) ? l.options.retryStatusCodes.includes(
|
|
301
|
+
typeof l.options.retry == "number" ? i = l.options.retry : i = ce(l.options.method) ? 0 : 1;
|
|
302
|
+
const u = l.response && l.response.status || 500;
|
|
303
|
+
if (i > 0 && (Array.isArray(l.options.retryStatusCodes) ? l.options.retryStatusCodes.includes(u) : Ot.has(u))) {
|
|
304
304
|
const d = l.options.retryDelay || 0;
|
|
305
|
-
return d > 0 && await new Promise((
|
|
305
|
+
return d > 0 && await new Promise((m) => setTimeout(m, d)), r(l.request, {
|
|
306
306
|
...l.options,
|
|
307
307
|
retry: i - 1,
|
|
308
308
|
timeout: l.options.timeout
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
const
|
|
313
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
312
|
+
const f = vt(l);
|
|
313
|
+
throw Error.captureStackTrace && Error.captureStackTrace(f, r), f;
|
|
314
314
|
}
|
|
315
|
-
const r = async function(c,
|
|
315
|
+
const r = async function(c, f = {}) {
|
|
316
316
|
var d;
|
|
317
317
|
const i = {
|
|
318
318
|
request: c,
|
|
319
|
-
options:
|
|
319
|
+
options: Ct(f, e.defaults, n),
|
|
320
320
|
response: void 0,
|
|
321
321
|
error: void 0
|
|
322
322
|
};
|
|
323
|
-
if (i.options.method = (d = i.options.method) == null ? void 0 : d.toUpperCase(), i.options.onRequest && await i.options.onRequest(i), typeof i.request == "string" && (i.options.baseURL && (i.request =
|
|
323
|
+
if (i.options.method = (d = i.options.method) == null ? void 0 : d.toUpperCase(), i.options.onRequest && await i.options.onRequest(i), typeof i.request == "string" && (i.options.baseURL && (i.request = dt(i.request, i.options.baseURL)), (i.options.query || i.options.params) && (i.request = mt(i.request, {
|
|
324
324
|
...i.options.params,
|
|
325
325
|
...i.options.query
|
|
326
|
-
}))), i.options.body &&
|
|
326
|
+
}))), i.options.body && ce(i.options.method) && (St(i.options.body) ? (i.options.body = typeof i.options.body == "string" ? i.options.body : JSON.stringify(i.options.body), i.options.headers = new n(i.options.headers || {}), i.options.headers.has("content-type") || i.options.headers.set("content-type", "application/json"), i.options.headers.has("accept") || i.options.headers.set("accept", "application/json")) : (
|
|
327
327
|
// ReadableStream Body
|
|
328
328
|
("pipeTo" in i.options.body && typeof i.options.body.pipeTo == "function" || // Node.js Stream Body
|
|
329
329
|
typeof i.options.body.pipe == "function") && ("duplex" in i.options || (i.options.duplex = "half"))
|
|
330
330
|
)), !i.options.signal && i.options.timeout) {
|
|
331
|
-
const
|
|
332
|
-
setTimeout(() =>
|
|
331
|
+
const m = new s();
|
|
332
|
+
setTimeout(() => m.abort(), i.options.timeout), i.options.signal = m.signal;
|
|
333
333
|
}
|
|
334
334
|
try {
|
|
335
335
|
i.response = await t(
|
|
336
336
|
i.request,
|
|
337
337
|
i.options
|
|
338
338
|
);
|
|
339
|
-
} catch (
|
|
340
|
-
return i.error =
|
|
339
|
+
} catch (m) {
|
|
340
|
+
return i.error = m, i.options.onRequestError && await i.options.onRequestError(i), await o(i);
|
|
341
341
|
}
|
|
342
|
-
if (i.response.body && !
|
|
343
|
-
const
|
|
344
|
-
switch (
|
|
342
|
+
if (i.response.body && !Rt.has(i.response.status) && i.options.method !== "HEAD") {
|
|
343
|
+
const m = (i.options.parseResponse ? "json" : i.options.responseType) || At(i.response.headers.get("content-type") || "");
|
|
344
|
+
switch (m) {
|
|
345
345
|
case "json": {
|
|
346
|
-
const
|
|
347
|
-
i.response._data =
|
|
346
|
+
const y = await i.response.text(), h = i.options.parseResponse || ze;
|
|
347
|
+
i.response._data = h(y);
|
|
348
348
|
break;
|
|
349
349
|
}
|
|
350
350
|
case "stream": {
|
|
@@ -352,14 +352,14 @@ function Ce(e = {}) {
|
|
|
352
352
|
break;
|
|
353
353
|
}
|
|
354
354
|
default:
|
|
355
|
-
i.response._data = await i.response[
|
|
355
|
+
i.response._data = await i.response[m]();
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
return i.options.onResponse && await i.options.onResponse(i), !i.options.ignoreResponseError && i.response.status >= 400 && i.response.status < 600 ? (i.options.onResponseError && await i.options.onResponseError(i), await o(i)) : i.response;
|
|
359
|
-
}, a = async function(c,
|
|
360
|
-
return (await r(c,
|
|
359
|
+
}, a = async function(c, f) {
|
|
360
|
+
return (await r(c, f))._data;
|
|
361
361
|
};
|
|
362
|
-
return a.raw = r, a.native = (...l) => t(...l), a.create = (l = {}) =>
|
|
362
|
+
return a.raw = r, a.native = (...l) => t(...l), a.create = (l = {}) => Oe({
|
|
363
363
|
...e,
|
|
364
364
|
defaults: {
|
|
365
365
|
...e.defaults,
|
|
@@ -367,7 +367,7 @@ function Ce(e = {}) {
|
|
|
367
367
|
}
|
|
368
368
|
}), a;
|
|
369
369
|
}
|
|
370
|
-
const
|
|
370
|
+
const oe = function() {
|
|
371
371
|
if (typeof globalThis < "u")
|
|
372
372
|
return globalThis;
|
|
373
373
|
if (typeof self < "u")
|
|
@@ -377,8 +377,8 @@ const se = function() {
|
|
|
377
377
|
if (typeof global < "u")
|
|
378
378
|
return global;
|
|
379
379
|
throw new Error("unable to locate global object");
|
|
380
|
-
}(),
|
|
381
|
-
function
|
|
380
|
+
}(), kt = oe.fetch || (() => Promise.reject(new Error("[ofetch] global.fetch is not supported!"))), $t = oe.Headers, Tt = oe.AbortController, Lt = Oe({ fetch: kt, Headers: $t, AbortController: Tt }), Mt = Lt;
|
|
381
|
+
function Ut(e) {
|
|
382
382
|
const t = e.length;
|
|
383
383
|
let n = -1, s, o = "";
|
|
384
384
|
const r = e.charCodeAt(0);
|
|
@@ -419,26 +419,26 @@ function Lt(e) {
|
|
|
419
419
|
}
|
|
420
420
|
return o;
|
|
421
421
|
}
|
|
422
|
-
const
|
|
423
|
-
function
|
|
422
|
+
const X = Ut;
|
|
423
|
+
function I(e = []) {
|
|
424
424
|
return Array.isArray(e) ? e : [e];
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function W(e) {
|
|
427
427
|
return Array.from(new Set(e));
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function It(e, t) {
|
|
430
430
|
return e.reduce((n, s) => (n.findIndex((r) => t(s, r)) === -1 && n.push(s), n), []);
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function U(e) {
|
|
433
433
|
return typeof e == "string";
|
|
434
434
|
}
|
|
435
|
-
function
|
|
436
|
-
return
|
|
435
|
+
function B(e) {
|
|
436
|
+
return U(e) ? e : (Array.isArray(e) ? e : Object.entries(e)).filter((t) => t[1] != null);
|
|
437
437
|
}
|
|
438
|
-
function
|
|
439
|
-
return Array.isArray(e) ? e.find((t) => !Array.isArray(t) || Array.isArray(t[0])) ? e.map((t) =>
|
|
438
|
+
function Nt(e) {
|
|
439
|
+
return Array.isArray(e) ? e.find((t) => !Array.isArray(t) || Array.isArray(t[0])) ? e.map((t) => B(t)) : [e] : [B(e)];
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function Dt(e) {
|
|
442
442
|
return e.filter(([t, n], s) => {
|
|
443
443
|
if (t.startsWith("$$"))
|
|
444
444
|
return !1;
|
|
@@ -448,63 +448,63 @@ function Mt(e) {
|
|
|
448
448
|
return !0;
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
return e == null ? "" :
|
|
451
|
+
function Q(e) {
|
|
452
|
+
return e == null ? "" : Dt(e).map(([t, n]) => n != null ? `${t}:${n};` : void 0).filter(Boolean).join("");
|
|
453
453
|
}
|
|
454
454
|
function G(e) {
|
|
455
455
|
return e && typeof e == "object" && !Array.isArray(e);
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function Re(e, t, n = !1) {
|
|
458
458
|
const s = e, o = t;
|
|
459
459
|
if (Array.isArray(o))
|
|
460
460
|
return n && Array.isArray(o) ? [...s, ...o] : [...o];
|
|
461
461
|
const r = { ...s };
|
|
462
462
|
return G(s) && G(o) && Object.keys(o).forEach((a) => {
|
|
463
|
-
G(s[a]) && G(o[a]) || Array.isArray(s[a]) && Array.isArray(o[a]) ? r[a] =
|
|
463
|
+
G(s[a]) && G(o[a]) || Array.isArray(s[a]) && Array.isArray(o[a]) ? r[a] = Re(s[a], o[a], n) : Object.assign(r, { [a]: o[a] });
|
|
464
464
|
}), r;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function z(e) {
|
|
467
467
|
let t, n, s;
|
|
468
468
|
if (Array.isArray(e)) {
|
|
469
469
|
for (n = Array(t = e.length); t--; )
|
|
470
|
-
n[t] = (s = e[t]) && typeof s == "object" ?
|
|
470
|
+
n[t] = (s = e[t]) && typeof s == "object" ? z(s) : s;
|
|
471
471
|
return n;
|
|
472
472
|
}
|
|
473
473
|
if (Object.prototype.toString.call(e) === "[object Object]") {
|
|
474
474
|
n = {};
|
|
475
475
|
for (t in e)
|
|
476
476
|
t === "__proto__" ? Object.defineProperty(n, t, {
|
|
477
|
-
value:
|
|
477
|
+
value: z(e[t]),
|
|
478
478
|
configurable: !0,
|
|
479
479
|
enumerable: !0,
|
|
480
480
|
writable: !0
|
|
481
|
-
}) : n[t] = (s = e[t]) && typeof s == "object" ?
|
|
481
|
+
}) : n[t] = (s = e[t]) && typeof s == "object" ? z(s) : s;
|
|
482
482
|
return n;
|
|
483
483
|
}
|
|
484
484
|
return e;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
return
|
|
486
|
+
function jt(e) {
|
|
487
|
+
return U(e[0]);
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
return
|
|
489
|
+
function Pt(e) {
|
|
490
|
+
return U(e[0]);
|
|
491
491
|
}
|
|
492
|
-
const
|
|
493
|
-
function
|
|
492
|
+
const le = "$$shortcut-no-merge";
|
|
493
|
+
function Ft(e) {
|
|
494
494
|
return typeof e == "function" ? { match: e } : e;
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function ue(e) {
|
|
497
497
|
return e.length === 3;
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function Vt(e) {
|
|
500
500
|
return e != null;
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Bt() {
|
|
503
503
|
}
|
|
504
|
-
var
|
|
505
|
-
class
|
|
504
|
+
var Gt = Object.defineProperty, Ht = (e, t, n) => t in e ? Gt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, zt = (e, t, n) => (Ht(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
505
|
+
class qt {
|
|
506
506
|
constructor() {
|
|
507
|
-
|
|
507
|
+
zt(this, "_map", /* @__PURE__ */ new Map());
|
|
508
508
|
}
|
|
509
509
|
get(t, n) {
|
|
510
510
|
const s = this._map.get(t);
|
|
@@ -534,10 +534,28 @@ class Bt {
|
|
|
534
534
|
return Array.from(this._map.entries()).flatMap(([n, s]) => Array.from(s.entries()).map(([o, r]) => t(r, n, o)));
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
|
|
538
|
-
|
|
537
|
+
class Wt extends Map {
|
|
538
|
+
getFallback(t, n) {
|
|
539
|
+
const s = this.get(t);
|
|
540
|
+
return s === void 0 ? (this.set(t, n), n) : s;
|
|
541
|
+
}
|
|
542
|
+
map(t) {
|
|
543
|
+
const n = [];
|
|
544
|
+
return this.forEach((s, o) => {
|
|
545
|
+
n.push(t(s, o));
|
|
546
|
+
}), n;
|
|
547
|
+
}
|
|
548
|
+
flatMap(t) {
|
|
549
|
+
const n = [];
|
|
550
|
+
return this.forEach((s, o) => {
|
|
551
|
+
n.push(...t(s, o));
|
|
552
|
+
}), n;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
var Kt = Object.defineProperty, Jt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Xt = (e, t, n) => (Jt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
556
|
+
class ke extends Set {
|
|
539
557
|
constructor(t) {
|
|
540
|
-
super(t),
|
|
558
|
+
super(t), Xt(this, "_map"), this._map ?? (this._map = /* @__PURE__ */ new Map());
|
|
541
559
|
}
|
|
542
560
|
add(t) {
|
|
543
561
|
return this._map ?? (this._map = /* @__PURE__ */ new Map()), this._map.set(t, (this._map.get(t) ?? 0) + 1), super.add(t);
|
|
@@ -556,56 +574,56 @@ class Oe extends Set {
|
|
|
556
574
|
}
|
|
557
575
|
}
|
|
558
576
|
function Y(e) {
|
|
559
|
-
return e instanceof
|
|
577
|
+
return e instanceof ke;
|
|
560
578
|
}
|
|
561
579
|
const H = {};
|
|
562
|
-
function
|
|
580
|
+
function Qt(e = ["-", ":"]) {
|
|
563
581
|
const t = e.join("|");
|
|
564
582
|
return H[t] || (H[t] = new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`, "gm")), H[t].lastIndex = 0, H[t];
|
|
565
583
|
}
|
|
566
|
-
function
|
|
567
|
-
const s =
|
|
584
|
+
function Yt(e, t = ["-", ":"], n = 5) {
|
|
585
|
+
const s = Qt(t);
|
|
568
586
|
let o, r = e.toString();
|
|
569
587
|
const a = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
|
|
570
588
|
do
|
|
571
589
|
o = !1, r = r.replace(
|
|
572
590
|
s,
|
|
573
|
-
(
|
|
574
|
-
var
|
|
575
|
-
if (!t.includes(
|
|
576
|
-
return
|
|
577
|
-
o = !0, a.add(i +
|
|
578
|
-
const
|
|
579
|
-
l.set(
|
|
580
|
-
for (const
|
|
581
|
-
const
|
|
582
|
-
let
|
|
583
|
-
|
|
584
|
-
offset:
|
|
585
|
-
length:
|
|
586
|
-
className:
|
|
591
|
+
(f, i, u, d, m) => {
|
|
592
|
+
var v;
|
|
593
|
+
if (!t.includes(u))
|
|
594
|
+
return f;
|
|
595
|
+
o = !0, a.add(i + u);
|
|
596
|
+
const y = m + i.length + u.length + 1, h = { length: f.length, items: [] };
|
|
597
|
+
l.set(m, h);
|
|
598
|
+
for (const C of [...d.matchAll(/\S+/g)]) {
|
|
599
|
+
const x = y + C.index;
|
|
600
|
+
let g = (v = l.get(x)) == null ? void 0 : v.items;
|
|
601
|
+
g ? l.delete(x) : g = [{
|
|
602
|
+
offset: x,
|
|
603
|
+
length: C[0].length,
|
|
604
|
+
className: C[0]
|
|
587
605
|
}];
|
|
588
|
-
for (const
|
|
589
|
-
|
|
606
|
+
for (const S of g)
|
|
607
|
+
S.className = S.className === "~" ? i : S.className.replace(/^(!?)(.*)/, `$1${i}${u}$2`), h.items.push(S);
|
|
590
608
|
}
|
|
591
|
-
return "$".repeat(
|
|
609
|
+
return "$".repeat(f.length);
|
|
592
610
|
}
|
|
593
611
|
), n -= 1;
|
|
594
612
|
while (o && n);
|
|
595
613
|
let c;
|
|
596
614
|
if (typeof e == "string") {
|
|
597
615
|
c = "";
|
|
598
|
-
let
|
|
599
|
-
for (const [i,
|
|
600
|
-
c += e.slice(
|
|
601
|
-
c += e.slice(
|
|
616
|
+
let f = 0;
|
|
617
|
+
for (const [i, u] of l)
|
|
618
|
+
c += e.slice(f, i), c += u.items.map((d) => d.className).join(" "), f = i + u.length;
|
|
619
|
+
c += e.slice(f);
|
|
602
620
|
} else {
|
|
603
621
|
c = e;
|
|
604
|
-
for (const [
|
|
622
|
+
for (const [f, i] of l)
|
|
605
623
|
c.overwrite(
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
i.items.map((
|
|
624
|
+
f,
|
|
625
|
+
f + i.length,
|
|
626
|
+
i.items.map((u) => u.className).join(" ")
|
|
609
627
|
);
|
|
610
628
|
}
|
|
611
629
|
return {
|
|
@@ -618,26 +636,26 @@ function Jt(e, t = ["-", ":"], n = 5) {
|
|
|
618
636
|
}
|
|
619
637
|
};
|
|
620
638
|
}
|
|
621
|
-
function
|
|
622
|
-
const s =
|
|
639
|
+
function Zt(e, t = ["-", ":"], n = 5) {
|
|
640
|
+
const s = Yt(e, t, n);
|
|
623
641
|
return typeof e == "string" ? s.expanded : e;
|
|
624
642
|
}
|
|
625
|
-
const
|
|
626
|
-
function
|
|
627
|
-
|
|
643
|
+
const fe = /* @__PURE__ */ new Set();
|
|
644
|
+
function $e(e) {
|
|
645
|
+
fe.has(e) || (console.warn("[unocss]", e), fe.add(e));
|
|
628
646
|
}
|
|
629
|
-
const
|
|
630
|
-
function
|
|
631
|
-
return e.split(
|
|
647
|
+
const en = /[\\:]?[\s'"`;{}]+/g;
|
|
648
|
+
function tn(e) {
|
|
649
|
+
return e.split(en);
|
|
632
650
|
}
|
|
633
|
-
const
|
|
651
|
+
const nn = {
|
|
634
652
|
name: "@unocss/core/extractor-split",
|
|
635
653
|
order: 0,
|
|
636
654
|
extract({ code: e }) {
|
|
637
|
-
return
|
|
655
|
+
return tn(e);
|
|
638
656
|
}
|
|
639
657
|
};
|
|
640
|
-
function
|
|
658
|
+
function sn() {
|
|
641
659
|
return {
|
|
642
660
|
events: {},
|
|
643
661
|
emit(e, ...t) {
|
|
@@ -648,90 +666,90 @@ function en() {
|
|
|
648
666
|
}
|
|
649
667
|
};
|
|
650
668
|
}
|
|
651
|
-
const
|
|
652
|
-
[
|
|
653
|
-
[
|
|
654
|
-
[
|
|
655
|
-
[
|
|
669
|
+
const q = "default", ne = "preflights", on = "shortcuts", rn = "imports", an = {
|
|
670
|
+
[rn]: -200,
|
|
671
|
+
[ne]: -100,
|
|
672
|
+
[on]: -10,
|
|
673
|
+
[q]: 0
|
|
656
674
|
};
|
|
657
|
-
function
|
|
658
|
-
return
|
|
675
|
+
function Te(e) {
|
|
676
|
+
return I(e).flatMap((t) => Array.isArray(t) ? [t] : Object.entries(t));
|
|
659
677
|
}
|
|
660
|
-
const
|
|
661
|
-
function
|
|
678
|
+
const pe = "_uno_resolved";
|
|
679
|
+
function cn(e) {
|
|
662
680
|
var s;
|
|
663
681
|
let t = typeof e == "function" ? e() : e;
|
|
664
|
-
if (
|
|
682
|
+
if (pe in t)
|
|
665
683
|
return t;
|
|
666
|
-
t = { ...t }, Object.defineProperty(t,
|
|
684
|
+
t = { ...t }, Object.defineProperty(t, pe, {
|
|
667
685
|
value: !0,
|
|
668
686
|
enumerable: !1
|
|
669
687
|
});
|
|
670
|
-
const n = t.shortcuts ?
|
|
688
|
+
const n = t.shortcuts ? Te(t.shortcuts) : void 0;
|
|
671
689
|
if (t.shortcuts = n, t.prefix || t.layer) {
|
|
672
690
|
const o = (r) => {
|
|
673
691
|
r[2] || (r[2] = {});
|
|
674
692
|
const a = r[2];
|
|
675
|
-
a.prefix == null && t.prefix && (a.prefix =
|
|
693
|
+
a.prefix == null && t.prefix && (a.prefix = I(t.prefix)), a.layer == null && t.layer && (a.layer = t.layer);
|
|
676
694
|
};
|
|
677
695
|
n == null || n.forEach(o), (s = t.rules) == null || s.forEach(o);
|
|
678
696
|
}
|
|
679
697
|
return t;
|
|
680
698
|
}
|
|
681
|
-
function
|
|
682
|
-
const t =
|
|
699
|
+
function Le(e) {
|
|
700
|
+
const t = cn(e);
|
|
683
701
|
if (!t.presets)
|
|
684
702
|
return [t];
|
|
685
|
-
const n = (t.presets || []).flatMap(
|
|
703
|
+
const n = (t.presets || []).flatMap(I).flatMap(Le);
|
|
686
704
|
return [t, ...n];
|
|
687
705
|
}
|
|
688
|
-
function
|
|
689
|
-
var
|
|
690
|
-
const n = Object.assign({}, t, e), s =
|
|
706
|
+
function de(e = {}, t = {}) {
|
|
707
|
+
var S, b;
|
|
708
|
+
const n = Object.assign({}, t, e), s = It((n.presets || []).flatMap(I).flatMap(Le), (p, w) => p.name === w.name), o = [
|
|
691
709
|
...s.filter((p) => p.enforce === "pre"),
|
|
692
710
|
...s.filter((p) => !p.enforce),
|
|
693
711
|
...s.filter((p) => p.enforce === "post")
|
|
694
712
|
], r = [
|
|
695
713
|
...o,
|
|
696
714
|
n
|
|
697
|
-
], a = [...r].reverse(), l = Object.assign({},
|
|
715
|
+
], a = [...r].reverse(), l = Object.assign({}, an, ...r.map((p) => p.layers));
|
|
698
716
|
function c(p) {
|
|
699
|
-
return
|
|
717
|
+
return W(r.flatMap((w) => I(w[p] || [])));
|
|
700
718
|
}
|
|
701
|
-
const
|
|
702
|
-
let i = (
|
|
703
|
-
i === void 0 && (i =
|
|
704
|
-
const
|
|
719
|
+
const f = c("extractors");
|
|
720
|
+
let i = (S = a.find((p) => p.extractorDefault !== void 0)) == null ? void 0 : S.extractorDefault;
|
|
721
|
+
i === void 0 && (i = nn), i && !f.includes(i) && f.unshift(i), f.sort((p, w) => (p.order || 0) - (w.order || 0));
|
|
722
|
+
const u = c("rules"), d = {}, m = u.length, y = u.map((p, w) => {
|
|
705
723
|
var R;
|
|
706
|
-
if (
|
|
707
|
-
|
|
708
|
-
d[
|
|
724
|
+
if (jt(p)) {
|
|
725
|
+
I(((R = p[2]) == null ? void 0 : R.prefix) || "").forEach((L) => {
|
|
726
|
+
d[L + p[0]] = [w, p[1], p[2], p];
|
|
709
727
|
});
|
|
710
728
|
return;
|
|
711
729
|
}
|
|
712
|
-
return [
|
|
730
|
+
return [w, ...p];
|
|
713
731
|
}).filter(Boolean).reverse();
|
|
714
|
-
let
|
|
715
|
-
const
|
|
716
|
-
for (const p of
|
|
717
|
-
|
|
718
|
-
const
|
|
719
|
-
templates:
|
|
720
|
-
var
|
|
721
|
-
return
|
|
732
|
+
let h = ln(r.map((p) => p.theme));
|
|
733
|
+
const v = c("extendTheme");
|
|
734
|
+
for (const p of v)
|
|
735
|
+
h = p(h) || h;
|
|
736
|
+
const C = {
|
|
737
|
+
templates: W(r.flatMap((p) => {
|
|
738
|
+
var w;
|
|
739
|
+
return I((w = p.autocomplete) == null ? void 0 : w.templates);
|
|
722
740
|
})),
|
|
723
741
|
extractors: r.flatMap((p) => {
|
|
724
|
-
var
|
|
725
|
-
return
|
|
726
|
-
}).sort((p,
|
|
727
|
-
shorthands:
|
|
728
|
-
var
|
|
729
|
-
return ((
|
|
742
|
+
var w;
|
|
743
|
+
return I((w = p.autocomplete) == null ? void 0 : w.extractors);
|
|
744
|
+
}).sort((p, w) => (p.order || 0) - (w.order || 0)),
|
|
745
|
+
shorthands: un(r.map((p) => {
|
|
746
|
+
var w;
|
|
747
|
+
return ((w = p.autocomplete) == null ? void 0 : w.shorthands) || {};
|
|
730
748
|
}))
|
|
731
749
|
};
|
|
732
|
-
let
|
|
733
|
-
|
|
734
|
-
const
|
|
750
|
+
let x = c("separators");
|
|
751
|
+
x.length || (x = [":", "-"]);
|
|
752
|
+
const g = {
|
|
735
753
|
mergeSelectors: !0,
|
|
736
754
|
warn: !0,
|
|
737
755
|
sortLayers: (p) => p,
|
|
@@ -741,29 +759,29 @@ function fe(e = {}, t = {}) {
|
|
|
741
759
|
envMode: n.envMode || "build",
|
|
742
760
|
shortcutsLayer: n.shortcutsLayer || "shortcuts",
|
|
743
761
|
layers: l,
|
|
744
|
-
theme:
|
|
745
|
-
rulesSize:
|
|
746
|
-
rulesDynamic:
|
|
762
|
+
theme: h,
|
|
763
|
+
rulesSize: m,
|
|
764
|
+
rulesDynamic: y,
|
|
747
765
|
rulesStaticMap: d,
|
|
748
766
|
preprocess: c("preprocess"),
|
|
749
767
|
postprocess: c("postprocess"),
|
|
750
768
|
preflights: c("preflights"),
|
|
751
|
-
autocomplete:
|
|
752
|
-
variants: c("variants").map(
|
|
753
|
-
shortcuts:
|
|
754
|
-
extractors:
|
|
769
|
+
autocomplete: C,
|
|
770
|
+
variants: c("variants").map(Ft).sort((p, w) => (p.order || 0) - (w.order || 0)),
|
|
771
|
+
shortcuts: Te(c("shortcuts")).reverse(),
|
|
772
|
+
extractors: f,
|
|
755
773
|
safelist: c("safelist"),
|
|
756
|
-
separators:
|
|
774
|
+
separators: x,
|
|
757
775
|
details: n.details ?? n.envMode === "dev"
|
|
758
776
|
};
|
|
759
777
|
for (const p of r)
|
|
760
|
-
(
|
|
761
|
-
return
|
|
778
|
+
(b = p == null ? void 0 : p.configResolved) == null || b.call(p, g);
|
|
779
|
+
return g;
|
|
762
780
|
}
|
|
763
|
-
function
|
|
764
|
-
return e.map((t) => t ?
|
|
781
|
+
function ln(e) {
|
|
782
|
+
return e.map((t) => t ? z(t) : {}).reduce((t, n) => Re(t, n), {});
|
|
765
783
|
}
|
|
766
|
-
function
|
|
784
|
+
function un(e) {
|
|
767
785
|
return e.reduce((t, n) => {
|
|
768
786
|
const s = {};
|
|
769
787
|
for (const o in n) {
|
|
@@ -776,14 +794,14 @@ function an(e) {
|
|
|
776
794
|
};
|
|
777
795
|
}, {});
|
|
778
796
|
}
|
|
779
|
-
const
|
|
780
|
-
var
|
|
781
|
-
class
|
|
797
|
+
const fn = "0.58.6";
|
|
798
|
+
var pn = Object.defineProperty, dn = (e, t, n) => t in e ? pn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, D = (e, t, n) => (dn(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
799
|
+
class mn {
|
|
782
800
|
constructor(t = {}, n = {}) {
|
|
783
|
-
this.userConfig = t, this.defaults = n,
|
|
801
|
+
this.userConfig = t, this.defaults = n, D(this, "version", fn), D(this, "_cache", /* @__PURE__ */ new Map()), D(this, "config"), D(this, "blocked", /* @__PURE__ */ new Set()), D(this, "parentOrders", /* @__PURE__ */ new Map()), D(this, "events", sn()), this.config = de(t, n), this.events.emit("config", this.config);
|
|
784
802
|
}
|
|
785
803
|
setConfig(t, n) {
|
|
786
|
-
t && (n && (this.defaults = n), this.userConfig = t, this.blocked.clear(), this.parentOrders.clear(), this._cache.clear(), this.config =
|
|
804
|
+
t && (n && (this.defaults = n), this.userConfig = t, this.blocked.clear(), this.parentOrders.clear(), this._cache.clear(), this.config = de(t, this.defaults), this.events.emit("config", this.config));
|
|
787
805
|
}
|
|
788
806
|
async applyExtractors(t, n, s = /* @__PURE__ */ new Set()) {
|
|
789
807
|
var r;
|
|
@@ -819,7 +837,7 @@ class fn {
|
|
|
819
837
|
return s;
|
|
820
838
|
}
|
|
821
839
|
async parseToken(t, n) {
|
|
822
|
-
var
|
|
840
|
+
var f;
|
|
823
841
|
if (this.blocked.has(t))
|
|
824
842
|
return;
|
|
825
843
|
const s = `${t}${n ? ` ${n}` : ""}`;
|
|
@@ -839,7 +857,7 @@ class fn {
|
|
|
839
857
|
}
|
|
840
858
|
const a = this.makeContext(t, [n || r[0], r[1], r[2], r[3]]);
|
|
841
859
|
this.config.details && (a.variants = [...r[3]]);
|
|
842
|
-
const l = await this.expandShortcut(a.currentSelector, a), c = l ? await this.stringifyShortcuts(a.variantMatch, a, l[0], l[1]) : (
|
|
860
|
+
const l = await this.expandShortcut(a.currentSelector, a), c = l ? await this.stringifyShortcuts(a.variantMatch, a, l[0], l[1]) : (f = await this.parseUtil(a.variantMatch, a)) == null ? void 0 : f.map((i) => this.stringifyUtil(i, a)).filter(Vt);
|
|
843
861
|
if (c != null && c.length)
|
|
844
862
|
return this._cache.set(s, c), c;
|
|
845
863
|
this._cache.set(s, null);
|
|
@@ -852,103 +870,107 @@ class fn {
|
|
|
852
870
|
safelist: a = !0,
|
|
853
871
|
minify: l = !1,
|
|
854
872
|
extendedInfo: c = !1
|
|
855
|
-
} = n,
|
|
873
|
+
} = n, f = this.config.outputToCssLayers, i = U(t) ? await this.applyExtractors(
|
|
856
874
|
t,
|
|
857
875
|
s,
|
|
858
|
-
c ? new
|
|
876
|
+
c ? new ke() : /* @__PURE__ */ new Set()
|
|
859
877
|
) : Array.isArray(t) ? new Set(t) : t;
|
|
860
|
-
a && this.config.safelist.forEach((
|
|
861
|
-
|
|
878
|
+
a && this.config.safelist.forEach((b) => {
|
|
879
|
+
i.has(b) || i.add(b);
|
|
862
880
|
});
|
|
863
|
-
const
|
|
864
|
-
`,
|
|
865
|
-
let
|
|
866
|
-
const
|
|
867
|
-
var
|
|
868
|
-
if (
|
|
881
|
+
const u = l ? "" : `
|
|
882
|
+
`, d = /* @__PURE__ */ new Set([q]), m = c ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Map();
|
|
883
|
+
let h = {};
|
|
884
|
+
const v = Array.from(i).map(async (b) => {
|
|
885
|
+
var w;
|
|
886
|
+
if (m.has(b))
|
|
869
887
|
return;
|
|
870
|
-
const
|
|
871
|
-
if (
|
|
872
|
-
|
|
873
|
-
data:
|
|
874
|
-
count: Y(
|
|
875
|
-
}) :
|
|
876
|
-
for (const
|
|
877
|
-
const
|
|
878
|
-
|
|
888
|
+
const p = await this.parseToken(b);
|
|
889
|
+
if (p != null) {
|
|
890
|
+
m instanceof Map ? m.set(b, {
|
|
891
|
+
data: p,
|
|
892
|
+
count: Y(i) ? i.getCount(b) : -1
|
|
893
|
+
}) : m.add(b);
|
|
894
|
+
for (const R of p) {
|
|
895
|
+
const O = R[3] || "", L = (w = R[4]) == null ? void 0 : w.layer;
|
|
896
|
+
y.has(O) || y.set(O, []), y.get(O).push(R), L && d.add(L);
|
|
879
897
|
}
|
|
880
898
|
}
|
|
881
899
|
});
|
|
882
|
-
await Promise.all(
|
|
900
|
+
await Promise.all(v), await (async () => {
|
|
883
901
|
if (!r)
|
|
884
902
|
return;
|
|
885
|
-
const
|
|
903
|
+
const b = {
|
|
886
904
|
generator: this,
|
|
887
905
|
theme: this.config.theme
|
|
888
|
-
},
|
|
889
|
-
this.config.preflights.forEach(({ layer:
|
|
890
|
-
|
|
891
|
-
}),
|
|
892
|
-
await Promise.all(Array.from(
|
|
893
|
-
async (
|
|
894
|
-
const
|
|
895
|
-
this.config.preflights.filter((
|
|
896
|
-
)).filter(Boolean).join(
|
|
897
|
-
return [
|
|
906
|
+
}, p = /* @__PURE__ */ new Set([]);
|
|
907
|
+
this.config.preflights.forEach(({ layer: w = ne }) => {
|
|
908
|
+
d.add(w), p.add(w);
|
|
909
|
+
}), h = Object.fromEntries(
|
|
910
|
+
await Promise.all(Array.from(p).map(
|
|
911
|
+
async (w) => {
|
|
912
|
+
const O = (await Promise.all(
|
|
913
|
+
this.config.preflights.filter((L) => (L.layer || ne) === w).map(async (L) => await L.getCSS(b))
|
|
914
|
+
)).filter(Boolean).join(u);
|
|
915
|
+
return [w, O];
|
|
898
916
|
}
|
|
899
917
|
))
|
|
900
918
|
);
|
|
901
919
|
})();
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
920
|
+
const C = this.config.sortLayers(Array.from(d).sort((b, p) => (this.config.layers[b] ?? 0) - (this.config.layers[p] ?? 0) || b.localeCompare(p))), x = {}, g = (b = q) => {
|
|
921
|
+
var R;
|
|
922
|
+
if (x[b])
|
|
923
|
+
return x[b];
|
|
924
|
+
let p = Array.from(y).sort((O, L) => {
|
|
925
|
+
var N;
|
|
926
|
+
return (this.parentOrders.get(O[0]) ?? 0) - (this.parentOrders.get(L[0]) ?? 0) || ((N = O[0]) == null ? void 0 : N.localeCompare(L[0] || "")) || 0;
|
|
927
|
+
}).map(([O, L]) => {
|
|
928
|
+
const N = L.length, j = L.filter((k) => {
|
|
929
|
+
var _;
|
|
930
|
+
return (((_ = k[4]) == null ? void 0 : _.layer) || q) === b;
|
|
931
|
+
}).sort((k, _) => {
|
|
932
|
+
var E, A, M, $, T, V, ie;
|
|
933
|
+
return k[0] - _[0] || (((E = k[4]) == null ? void 0 : E.sort) || 0) - (((A = _[4]) == null ? void 0 : A.sort) || 0) || ((T = (M = k[5]) == null ? void 0 : M.currentSelector) == null ? void 0 : T.localeCompare((($ = _[5]) == null ? void 0 : $.currentSelector) ?? "")) || ((V = k[1]) == null ? void 0 : V.localeCompare(_[1] || "")) || ((ie = k[2]) == null ? void 0 : ie.localeCompare(_[2] || "")) || 0;
|
|
934
|
+
}).map(([, k, _, , E, , A]) => [
|
|
935
|
+
[[(k && gn(k, o)) ?? "", (E == null ? void 0 : E.sort) ?? 0]],
|
|
936
|
+
_,
|
|
937
|
+
!!(A ?? (E == null ? void 0 : E.noMerge))
|
|
919
938
|
]);
|
|
920
|
-
if (!
|
|
939
|
+
if (!j.length)
|
|
921
940
|
return;
|
|
922
|
-
const P =
|
|
923
|
-
if (!
|
|
924
|
-
for (let
|
|
925
|
-
const
|
|
926
|
-
if (
|
|
927
|
-
return k &&
|
|
941
|
+
const P = j.reverse().map(([k, _, E], A) => {
|
|
942
|
+
if (!E && this.config.mergeSelectors)
|
|
943
|
+
for (let $ = A + 1; $ < N; $++) {
|
|
944
|
+
const T = j[$];
|
|
945
|
+
if (T && !T[2] && (k && T[0] || k == null && T[0] == null) && T[1] === _)
|
|
946
|
+
return k && T[0] && T[0].push(...k), null;
|
|
928
947
|
}
|
|
929
|
-
const
|
|
930
|
-
var
|
|
931
|
-
return
|
|
932
|
-
}).map((
|
|
933
|
-
return
|
|
934
|
-
}).filter(Boolean).reverse().join(
|
|
935
|
-
if (!
|
|
948
|
+
const M = k ? W(k.sort(($, T) => {
|
|
949
|
+
var V;
|
|
950
|
+
return $[1] - T[1] || ((V = $[0]) == null ? void 0 : V.localeCompare(T[0] || "")) || 0;
|
|
951
|
+
}).map(($) => $[0]).filter(Boolean)) : [];
|
|
952
|
+
return M.length ? `${M.join(`,${u}`)}{${_}}` : _;
|
|
953
|
+
}).filter(Boolean).reverse().join(u);
|
|
954
|
+
if (!O)
|
|
936
955
|
return P;
|
|
937
|
-
const
|
|
938
|
-
return `${
|
|
939
|
-
}).filter(Boolean).join(
|
|
940
|
-
r && (
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
956
|
+
const F = O.split(" $$ ");
|
|
957
|
+
return `${F.join("{")}{${u}${P}${u}${"}".repeat(F.length)}`;
|
|
958
|
+
}).filter(Boolean).join(u);
|
|
959
|
+
if (r && (p = [h[b], p].filter(Boolean).join(u)), f && p) {
|
|
960
|
+
let O = typeof f == "object" ? (R = f.cssLayerName) == null ? void 0 : R.call(f, b) : void 0;
|
|
961
|
+
O !== null && (O || (O = b), p = `@layer ${O}{${u}${p}${u}}`);
|
|
962
|
+
}
|
|
963
|
+
const w = l ? "" : `/* layer: ${b} */${u}`;
|
|
964
|
+
return x[b] = p ? w + p : "";
|
|
965
|
+
}, S = (b = C, p) => b.filter((w) => !(p != null && p.includes(w))).map((w) => g(w) || "").filter(Boolean).join(u);
|
|
944
966
|
return {
|
|
945
967
|
get css() {
|
|
946
|
-
return
|
|
968
|
+
return S();
|
|
947
969
|
},
|
|
948
|
-
layers:
|
|
949
|
-
matched:
|
|
950
|
-
getLayers:
|
|
951
|
-
getLayer:
|
|
970
|
+
layers: C,
|
|
971
|
+
matched: m,
|
|
972
|
+
getLayers: S,
|
|
973
|
+
getLayer: g
|
|
952
974
|
};
|
|
953
975
|
}
|
|
954
976
|
async matchVariants(t, n) {
|
|
@@ -964,14 +986,14 @@ class fn {
|
|
|
964
986
|
for (const c of this.config.variants) {
|
|
965
987
|
if (!c.multiPass && s.has(c))
|
|
966
988
|
continue;
|
|
967
|
-
let
|
|
968
|
-
if (
|
|
969
|
-
if (
|
|
970
|
-
if (
|
|
989
|
+
let f = await c.match(r, l);
|
|
990
|
+
if (f) {
|
|
991
|
+
if (U(f)) {
|
|
992
|
+
if (f === r)
|
|
971
993
|
continue;
|
|
972
|
-
|
|
994
|
+
f = { matcher: f };
|
|
973
995
|
}
|
|
974
|
-
r =
|
|
996
|
+
r = f.matcher, o.unshift(f), s.add(c), a = !0;
|
|
975
997
|
break;
|
|
976
998
|
}
|
|
977
999
|
}
|
|
@@ -983,24 +1005,24 @@ class fn {
|
|
|
983
1005
|
return [t, r, o, s];
|
|
984
1006
|
}
|
|
985
1007
|
applyVariants(t, n = t[4], s = t[1]) {
|
|
986
|
-
const r = n.slice().sort((
|
|
987
|
-
(
|
|
988
|
-
var
|
|
989
|
-
const d = ((
|
|
990
|
-
return (i.handle ??
|
|
991
|
-
...
|
|
1008
|
+
const r = n.slice().sort((f, i) => (f.order || 0) - (i.order || 0)).reduceRight(
|
|
1009
|
+
(f, i) => (u) => {
|
|
1010
|
+
var y, h;
|
|
1011
|
+
const d = ((y = i.body) == null ? void 0 : y.call(i, u.entries)) || u.entries, m = Array.isArray(i.parent) ? i.parent : [i.parent, void 0];
|
|
1012
|
+
return (i.handle ?? bn)({
|
|
1013
|
+
...u,
|
|
992
1014
|
entries: d,
|
|
993
|
-
selector: ((
|
|
994
|
-
parent:
|
|
995
|
-
parentOrder:
|
|
996
|
-
layer: i.layer ||
|
|
997
|
-
sort: i.sort ||
|
|
998
|
-
},
|
|
1015
|
+
selector: ((h = i.selector) == null ? void 0 : h.call(i, u.selector, d)) || u.selector,
|
|
1016
|
+
parent: m[0] || u.parent,
|
|
1017
|
+
parentOrder: m[1] || u.parentOrder,
|
|
1018
|
+
layer: i.layer || u.layer,
|
|
1019
|
+
sort: i.sort || u.sort
|
|
1020
|
+
}, f);
|
|
999
1021
|
},
|
|
1000
|
-
(
|
|
1022
|
+
(f) => f
|
|
1001
1023
|
)({
|
|
1002
1024
|
prefix: "",
|
|
1003
|
-
selector:
|
|
1025
|
+
selector: yn(s),
|
|
1004
1026
|
pseudo: "",
|
|
1005
1027
|
entries: t[2]
|
|
1006
1028
|
}), { parent: a, parentOrder: l } = r;
|
|
@@ -1017,72 +1039,72 @@ class fn {
|
|
|
1017
1039
|
sort: r.sort,
|
|
1018
1040
|
noMerge: r.noMerge
|
|
1019
1041
|
};
|
|
1020
|
-
for (const
|
|
1021
|
-
|
|
1042
|
+
for (const f of this.config.postprocess)
|
|
1043
|
+
f(c);
|
|
1022
1044
|
return c;
|
|
1023
1045
|
}
|
|
1024
1046
|
constructCustomCSS(t, n, s) {
|
|
1025
|
-
const o =
|
|
1026
|
-
if (
|
|
1047
|
+
const o = B(n);
|
|
1048
|
+
if (U(o))
|
|
1027
1049
|
return o;
|
|
1028
|
-
const { selector: r, entries: a, parent: l } = this.applyVariants([0, s || t.rawSelector, o, void 0, t.variantHandlers]), c = `${r}{${
|
|
1050
|
+
const { selector: r, entries: a, parent: l } = this.applyVariants([0, s || t.rawSelector, o, void 0, t.variantHandlers]), c = `${r}{${Q(a)}}`;
|
|
1029
1051
|
return l ? `${l}{${c}}` : c;
|
|
1030
1052
|
}
|
|
1031
1053
|
async parseUtil(t, n, s = !1, o) {
|
|
1032
1054
|
var i;
|
|
1033
|
-
const [r, a, l] =
|
|
1055
|
+
const [r, a, l] = U(t) ? await this.matchVariants(t) : t;
|
|
1034
1056
|
this.config.details && (n.rules = n.rules ?? []);
|
|
1035
1057
|
const c = this.config.rulesStaticMap[a];
|
|
1036
1058
|
if (c && c[1] && (s || !((i = c[2]) != null && i.internal))) {
|
|
1037
1059
|
this.config.details && n.rules.push(c[3]);
|
|
1038
|
-
const
|
|
1039
|
-
return
|
|
1060
|
+
const u = c[0], d = B(c[1]), m = c[2];
|
|
1061
|
+
return U(d) ? [[u, d, m]] : [[u, r, d, m, l]];
|
|
1040
1062
|
}
|
|
1041
1063
|
n.variantHandlers = l;
|
|
1042
|
-
const { rulesDynamic:
|
|
1043
|
-
for (const [
|
|
1044
|
-
if (
|
|
1064
|
+
const { rulesDynamic: f } = this.config;
|
|
1065
|
+
for (const [u, d, m, y] of f) {
|
|
1066
|
+
if (y != null && y.internal && !s)
|
|
1045
1067
|
continue;
|
|
1046
|
-
let
|
|
1047
|
-
if (
|
|
1048
|
-
const
|
|
1068
|
+
let h = a;
|
|
1069
|
+
if (y != null && y.prefix) {
|
|
1070
|
+
const g = I(y.prefix);
|
|
1049
1071
|
if (o) {
|
|
1050
|
-
const
|
|
1051
|
-
if (!
|
|
1072
|
+
const S = I(o);
|
|
1073
|
+
if (!g.some((b) => S.includes(b)))
|
|
1052
1074
|
continue;
|
|
1053
1075
|
} else {
|
|
1054
|
-
const
|
|
1055
|
-
if (
|
|
1076
|
+
const S = g.find((b) => a.startsWith(b));
|
|
1077
|
+
if (S == null)
|
|
1056
1078
|
continue;
|
|
1057
|
-
|
|
1079
|
+
h = a.slice(S.length);
|
|
1058
1080
|
}
|
|
1059
1081
|
}
|
|
1060
|
-
const
|
|
1061
|
-
if (!
|
|
1082
|
+
const v = h.match(d);
|
|
1083
|
+
if (!v)
|
|
1062
1084
|
continue;
|
|
1063
|
-
const
|
|
1064
|
-
if (!
|
|
1085
|
+
const C = await m(v, n);
|
|
1086
|
+
if (!C)
|
|
1065
1087
|
continue;
|
|
1066
|
-
this.config.details && n.rules.push([d,
|
|
1067
|
-
const
|
|
1068
|
-
if (
|
|
1069
|
-
return
|
|
1088
|
+
this.config.details && n.rules.push([d, m, y]);
|
|
1089
|
+
const x = Nt(C).filter((g) => g.length);
|
|
1090
|
+
if (x.length)
|
|
1091
|
+
return x.map((g) => U(g) ? [u, g, y] : [u, r, g, y, l]);
|
|
1070
1092
|
}
|
|
1071
1093
|
}
|
|
1072
1094
|
stringifyUtil(t, n) {
|
|
1073
1095
|
if (!t)
|
|
1074
1096
|
return;
|
|
1075
|
-
if (
|
|
1097
|
+
if (ue(t))
|
|
1076
1098
|
return [t[0], void 0, t[1], void 0, t[2], this.config.details ? n : void 0, void 0];
|
|
1077
|
-
const { selector: s, entries: o, parent: r, layer: a, sort: l, noMerge: c } = this.applyVariants(t),
|
|
1078
|
-
if (!
|
|
1099
|
+
const { selector: s, entries: o, parent: r, layer: a, sort: l, noMerge: c } = this.applyVariants(t), f = Q(o);
|
|
1100
|
+
if (!f)
|
|
1079
1101
|
return;
|
|
1080
|
-
const { layer: i, sort:
|
|
1102
|
+
const { layer: i, sort: u, ...d } = t[3] ?? {}, m = {
|
|
1081
1103
|
...d,
|
|
1082
1104
|
layer: a ?? i,
|
|
1083
|
-
sort: l ??
|
|
1105
|
+
sort: l ?? u
|
|
1084
1106
|
};
|
|
1085
|
-
return [t[0], s,
|
|
1107
|
+
return [t[0], s, f, r, m, this.config.details ? n : void 0, c];
|
|
1086
1108
|
}
|
|
1087
1109
|
async expandShortcut(t, n, s = 5) {
|
|
1088
1110
|
var l;
|
|
@@ -1090,139 +1112,141 @@ class fn {
|
|
|
1090
1112
|
return;
|
|
1091
1113
|
const o = this.config.details ? (c) => {
|
|
1092
1114
|
n.shortcuts = n.shortcuts ?? [], n.shortcuts.push(c);
|
|
1093
|
-
} :
|
|
1115
|
+
} : Bt;
|
|
1094
1116
|
let r, a;
|
|
1095
1117
|
for (const c of this.config.shortcuts) {
|
|
1096
|
-
let
|
|
1118
|
+
let f = t;
|
|
1097
1119
|
if ((l = c[2]) != null && l.prefix) {
|
|
1098
|
-
const
|
|
1099
|
-
if (
|
|
1120
|
+
const u = I(c[2].prefix).find((d) => t.startsWith(d));
|
|
1121
|
+
if (u == null)
|
|
1100
1122
|
continue;
|
|
1101
|
-
|
|
1123
|
+
f = t.slice(u.length);
|
|
1102
1124
|
}
|
|
1103
|
-
if (
|
|
1104
|
-
if (c[0] ===
|
|
1125
|
+
if (Pt(c)) {
|
|
1126
|
+
if (c[0] === f) {
|
|
1105
1127
|
r = r || c[2], a = c[1], o(c);
|
|
1106
1128
|
break;
|
|
1107
1129
|
}
|
|
1108
1130
|
} else {
|
|
1109
|
-
const i =
|
|
1131
|
+
const i = f.match(c[0]);
|
|
1110
1132
|
if (i && (a = c[1](i, n)), a) {
|
|
1111
1133
|
r = r || c[2], o(c);
|
|
1112
1134
|
break;
|
|
1113
1135
|
}
|
|
1114
1136
|
}
|
|
1115
1137
|
}
|
|
1116
|
-
if (
|
|
1117
|
-
const [c,
|
|
1118
|
-
if (c !==
|
|
1119
|
-
const i = await this.expandShortcut(
|
|
1120
|
-
i && (a = i[0].map((
|
|
1138
|
+
if (U(a) && (a = Zt(a.trim()).split(/\s+/g)), !a) {
|
|
1139
|
+
const [c, f] = U(t) ? await this.matchVariants(t) : t;
|
|
1140
|
+
if (c !== f) {
|
|
1141
|
+
const i = await this.expandShortcut(f, n, s - 1);
|
|
1142
|
+
i && (a = i[0].map((u) => U(u) ? c.replace(f, u) : u));
|
|
1121
1143
|
}
|
|
1122
1144
|
}
|
|
1123
1145
|
if (a)
|
|
1124
1146
|
return [
|
|
1125
1147
|
(await Promise.all(a.map(async (c) => {
|
|
1126
|
-
var
|
|
1127
|
-
return (
|
|
1148
|
+
var f;
|
|
1149
|
+
return (U(c) ? (f = await this.expandShortcut(c, n, s - 1)) == null ? void 0 : f[0] : void 0) || [c];
|
|
1128
1150
|
}))).flat(1).filter(Boolean),
|
|
1129
1151
|
r
|
|
1130
1152
|
];
|
|
1131
1153
|
}
|
|
1132
1154
|
async stringifyShortcuts(t, n, s, o = { layer: this.config.shortcutsLayer }) {
|
|
1133
1155
|
var i;
|
|
1134
|
-
const r = new
|
|
1135
|
-
const d =
|
|
1136
|
-
return !d && this.config.warn &&
|
|
1137
|
-
}))).flat(1).filter(Boolean).sort((
|
|
1138
|
-
for (const
|
|
1139
|
-
if (
|
|
1140
|
-
|
|
1156
|
+
const r = new Wt(), a = (await Promise.all(W(s).map(async (u) => {
|
|
1157
|
+
const d = U(u) ? await this.parseUtil(u, n, !0, o.prefix) : [[Number.POSITIVE_INFINITY, "{inline}", B(u), void 0, []]];
|
|
1158
|
+
return !d && this.config.warn && $e(`unmatched utility "${u}" in shortcut "${t[1]}"`), d || [];
|
|
1159
|
+
}))).flat(1).filter(Boolean).sort((u, d) => u[0] - d[0]), [l, , c] = t, f = [];
|
|
1160
|
+
for (const u of a) {
|
|
1161
|
+
if (ue(u)) {
|
|
1162
|
+
f.push([u[0], void 0, u[1], void 0, u[2], n, void 0]);
|
|
1141
1163
|
continue;
|
|
1142
1164
|
}
|
|
1143
|
-
const { selector: d, entries:
|
|
1144
|
-
r.getFallback(d,
|
|
1165
|
+
const { selector: d, entries: m, parent: y, sort: h, noMerge: v, layer: C } = this.applyVariants(u, [...u[4], ...c], l);
|
|
1166
|
+
r.getFallback(C ?? o.layer, new qt()).getFallback(d, y, [[], u[0]])[0].push([m, !!(v ?? ((i = u[3]) == null ? void 0 : i.noMerge)), h ?? 0]);
|
|
1145
1167
|
}
|
|
1146
|
-
return
|
|
1147
|
-
|
|
1148
|
-
const
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1168
|
+
return f.concat(r.flatMap(
|
|
1169
|
+
(u, d) => u.map(([m, y], h, v) => {
|
|
1170
|
+
const C = (g, S, b) => {
|
|
1171
|
+
const p = Math.max(...b.map((R) => R[1])), w = b.map((R) => R[0]);
|
|
1172
|
+
return (g ? [w.flat(1)] : w).map((R) => {
|
|
1173
|
+
const O = Q(R);
|
|
1174
|
+
if (O)
|
|
1175
|
+
return [y, h, O, v, { ...o, noMerge: S, sort: p, layer: d }, n, void 0];
|
|
1176
|
+
});
|
|
1177
|
+
};
|
|
1178
|
+
return [
|
|
1179
|
+
[m.filter(([, g]) => g).map(([g, , S]) => [g, S]), !0],
|
|
1180
|
+
[m.filter(([, g]) => !g).map(([g, , S]) => [g, S]), !1]
|
|
1181
|
+
].map(([g, S]) => [
|
|
1182
|
+
...C(!1, S, g.filter(([b]) => b.some((p) => p[0] === le))),
|
|
1183
|
+
...C(!0, S, g.filter(([b]) => b.every((p) => p[0] !== le)))
|
|
1184
|
+
]);
|
|
1185
|
+
}).flat(2).filter(Boolean)
|
|
1186
|
+
));
|
|
1163
1187
|
}
|
|
1164
1188
|
isBlocked(t) {
|
|
1165
|
-
return !t || this.config.blocklist.some((n) => typeof n == "function" ? n(t) :
|
|
1189
|
+
return !t || this.config.blocklist.some((n) => typeof n == "function" ? n(t) : U(n) ? n === t : n.test(t));
|
|
1166
1190
|
}
|
|
1167
1191
|
}
|
|
1168
|
-
function
|
|
1169
|
-
return new
|
|
1192
|
+
function hn(e, t) {
|
|
1193
|
+
return new mn(e, t);
|
|
1170
1194
|
}
|
|
1171
|
-
const
|
|
1172
|
-
function
|
|
1173
|
-
return
|
|
1195
|
+
const Me = /\s\$\$\s+/g;
|
|
1196
|
+
function _n(e) {
|
|
1197
|
+
return Me.test(e);
|
|
1174
1198
|
}
|
|
1175
|
-
function
|
|
1176
|
-
return
|
|
1199
|
+
function gn(e, t) {
|
|
1200
|
+
return _n(e) ? e.replace(Me, t ? ` ${t} ` : " ") : t ? `${t} ${e}` : e;
|
|
1177
1201
|
}
|
|
1178
|
-
const
|
|
1179
|
-
function
|
|
1180
|
-
return
|
|
1202
|
+
const me = /^\[(.+?)(~?=)"(.*)"\]$/;
|
|
1203
|
+
function yn(e) {
|
|
1204
|
+
return me.test(e) ? e.replace(me, (t, n, s, o) => `[${X(n)}${s}"${X(o)}"]`) : `.${X(e)}`;
|
|
1181
1205
|
}
|
|
1182
|
-
function
|
|
1206
|
+
function bn(e, t) {
|
|
1183
1207
|
return t(e);
|
|
1184
1208
|
}
|
|
1185
|
-
var
|
|
1186
|
-
const
|
|
1209
|
+
var he = { npm_package_dependencies__vueuse_core: "^10.9.0", TERM_PROGRAM: "vscode", npm_package_devDependencies__types_splitpanes: "^2.2.6", FNM_LOGLEVEL: "info", NODE: "/Users/arlo/Library/Application Support/fnm/node-versions/v20.11.0/installation/bin/node", INIT_CWD: "/Users/arlo/g/devtools-next/packages/client", TURBO_INVOCATION_DIR: "/Users/arlo/g/devtools-next", npm_package_devDependencies_vite: "^5.1.6", SHELL: "/bin/zsh", TERM: "xterm-256color", npm_config_shamefully_hoist: "true", npm_package_devDependencies_ohash: "^1.1.3", npm_package_devDependencies_floating_vue: "5.2.2", npm_package_dependencies__vue_devtools_shared: "workspace:^", FNM_NODE_DIST_MIRROR: "https://nodejs.org/dist", npm_package_dependencies__unocss_runtime: "^0.58.6", TMPDIR: "/var/folders/6s/79hm4q7x5f982tndmbvckmn80000gn/T/", TERM_PROGRAM_VERSION: "1.85.1", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.4", npm_package_devDependencies_unplugin_vue_components: "^0.26.0", MallocNanoZone: "0", ORIGINAL_XDG_CURRENT_DESKTOP: "undefined", ZDOTDIR: "/Users/arlo", TERM_SESSION_ID: "w0t0p0:B98979BC-00E4-4957-B14A-AD8EA006EB2E", npm_config_registry: "https://registry.npmjs.org/", npm_package_private: "true", PNPM_HOME: "/Users/arlo/Library/pnpm", ZSH: "/Users/arlo/.oh-my-zsh", FNM_COREPACK_ENABLED: "false", npm_package_devDependencies__vitejs_plugin_vue_jsx: "^3.1.0", USER: "arlo", npm_package_license: "MIT", LS_COLORS: "di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43", COMMAND_MODE: "unix2003", PNPM_SCRIPT_SRC_DIR: "/Users/arlo/g/devtools-next/packages/client", npm_config_strict_peer_dependencies: "", SSH_AUTH_SOCK: "/private/tmp/com.apple.launchd.s22dZSmLtN/Listeners", npm_package_devDependencies_dayjs: "^1.11.10", __CF_USER_TEXT_ENCODING: "0x1F5:0x19:0x34", npm_execpath: "/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules/pnpm/bin/pnpm.cjs", PAGER: "less", npm_package_devDependencies_unplugin_auto_import: "^0.17.5", npm_package_scripts_build_lib: "vite build --config vite.lib.config.ts", npm_config_frozen_lockfile: "", FNM_VERSION_FILE_STRATEGY: "local", LSCOLORS: "Gxfxcxdxbxegedabagacad", npm_package_dependencies_vue_virtual_scroller: "2.0.0-beta.8", npm_package_dependencies_fuse_js: "^7.0.0", FNM_ARCH: "arm64", PATH: "/Users/arlo/g/devtools-next/packages/client/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules/pnpm/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/packages/client/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules/pnpm/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules/pnpm/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/g/devtools-next/node_modules/.bin:/usr/local/lib/node_modules/pnpm/dist/node-gyp-bin:/Users/arlo/g/devtools-next/node_modules/.bin:/Users/arlo/Library/Caches/fnm_multishells/65390_1710823933131/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/arlo/Library/pnpm:/Users/arlo/Library/Caches/fnm_multishells/1288_1710726170295/bin:/opt/homebrew/bin", npm_package_dependencies__vue_devtools_ui: "workspace:*", npm_package_scripts_stub_lib: "vite build --config vite.lib.config.ts --watch", LaunchInstanceID: "442DCE3E-AA6C-46DB-8FA0-BEBF4252ACDA", npm_package_dependencies_splitpanes: "^3.1.5", npm_package_author: "webfansplz", USER_ZDOTDIR: "/Users/arlo", __CFBundleIdentifier: "com.microsoft.VSCode", npm_command: "run-script", PWD: "/Users/arlo/g/devtools-next/packages/client", npm_package_exports____: "./dist/*", npm_lifecycle_event: "build:lib", npm_package_devDependencies_vue: "^3.4.21", npm_package_name: "@vue/devtools-client", LANG: "zh_CN.UTF-8", ITERM_PROFILE: "Default", npm_package_devDependencies_simple_git_hooks: "^2.11.0", npm_package_devDependencies_sass: "^1.72.0", npm_package_devDependencies__unocss_reset: "^0.58.6", npm_package_scripts_build: "tsx ./scripts/pre-build.ts && (nr build:lib & vite build)", NODE_PATH: "/Users/arlo/g/devtools-next/node_modules/.pnpm/vite@5.1.6_@types+node@20.11.29_sass@1.72.0/node_modules/vite/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/vite@5.1.6_@types+node@20.11.29_sass@1.72.0/node_modules/vite/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/vite@5.1.6_@types+node@20.11.29_sass@1.72.0/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules/pnpm/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules/pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules/pnpm/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules/pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/turbo@1.12.5/node_modules/turbo/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/turbo@1.12.5/node_modules/turbo/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/turbo@1.12.5/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules/pnpm/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules/pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/pnpm@8.15.5/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/bin/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/@antfu+ni@0.21.12/node_modules:/Users/arlo/g/devtools-next/node_modules/.pnpm/node_modules:/Users/arlo/Library/pnpm/global/5/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/bin/node_modules:/Users/arlo/Library/pnpm/global/5/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/ni/node_modules:/Users/arlo/Library/pnpm/global/5/.pnpm/@antfu+ni@0.21.12/node_modules/@antfu/node_modules:/Users/arlo/Library/pnpm/global/5/.pnpm/@antfu+ni@0.21.12/node_modules:/Users/arlo/Library/pnpm/global/5/.pnpm/node_modules", npm_package_devDependencies_pinia: "^2.1.7", FNM_MULTISHELL_PATH: "/Users/arlo/Library/Caches/fnm_multishells/65390_1710823933131", TURBO_HASH: "f652c7ac66bb5829", VSCODE_GIT_ASKPASS_EXTRA_ARGS: "--ms-enable-electron-run-as-node", XPC_FLAGS: "0x0", npm_package_devDependencies__unocss_core: "^0.58.6", npm_package_engines_node: ">=v14.21.3", npm_config_node_gyp: "/usr/local/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", npm_config_side_effects_cache: "", npm_package_dependencies_colord: "^2.9.3", npm_package_devDependencies__iconify_json: "^2.2.193", npm_package_dependencies_minimatch: "^9.0.3", npm_package_version: "7.0.19", XPC_SERVICE_NAME: "0", VSCODE_INJECTION: "1", npm_package_devDependencies_unocss: "^0.58.6", npm_package_dependencies__vue_devtools_core: "workspace:^", npm_package_type: "module", COLORFGBG: "7;0", HOME: "/Users/arlo", SHLVL: "3", VSCODE_GIT_ASKPASS_MAIN: "/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js", npm_package_dependencies_vite_hot_client: "^0.2.3", LC_TERMINAL_VERSION: "3.4.23", FNM_DIR: "/Users/arlo/Library/Application Support/fnm", npm_package_dependencies_vis_network: "^9.1.9", ITERM_SESSION_ID: "w0t0p0:B98979BC-00E4-4957-B14A-AD8EA006EB2E", npm_package_peerDependencies_vite: "^3.1.0 || ^4.0.0-0 || ^5.0.0-0", LESS: "-R", LOGNAME: "arlo", npm_lifecycle_script: "vite build --config vite.lib.config.ts", npm_package_dependencies__vue_devtools_kit: "workspace:^", npm_package_dependencies__vueuse_integrations: "^10.9.0", VSCODE_GIT_IPC_HANDLE: "/var/folders/6s/79hm4q7x5f982tndmbvckmn80000gn/T/vscode-git-4d965c4849.sock", npm_config_user_agent: "pnpm/8.15.5 npm/? node/v20.11.0 darwin arm64", FNM_RESOLVE_ENGINES: "false", npm_package_devDependencies__types_node: "^20.11.29", GIT_ASKPASS: "/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh", VSCODE_GIT_ASKPASS_NODE: "/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)", npm_package_scripts_stub: "nr stub:lib & vite build --watch", LC_TERMINAL: "iTerm2", npm_package_files_0: "dist", npm_package_devDependencies_unplugin: "^1.10.0", npm_package_dependencies_vue_router: "^4.3.0", npm_package_dependencies_shiki: "1.2.0", SECURITYSESSIONID: "186a5", npm_package_dependencies__unocss_preset_icons: "^0.58.6", npm_node_execpath: "/Users/arlo/Library/Application Support/fnm/node-versions/v20.11.0/installation/bin/node", npm_config_shell_emulator: "true", COLORTERM: "truecolor", NODE_ENV: "production" };
|
|
1210
|
+
const vn = Object.freeze(
|
|
1187
1211
|
{
|
|
1188
1212
|
left: 0,
|
|
1189
1213
|
top: 0,
|
|
1190
1214
|
width: 16,
|
|
1191
1215
|
height: 16
|
|
1192
1216
|
}
|
|
1193
|
-
),
|
|
1217
|
+
), K = Object.freeze({
|
|
1194
1218
|
rotate: 0,
|
|
1195
1219
|
vFlip: !1,
|
|
1196
1220
|
hFlip: !1
|
|
1197
|
-
}),
|
|
1198
|
-
...
|
|
1199
|
-
...
|
|
1200
|
-
}),
|
|
1201
|
-
...
|
|
1221
|
+
}), Ue = Object.freeze({
|
|
1222
|
+
...vn,
|
|
1223
|
+
...K
|
|
1224
|
+
}), wn = Object.freeze({
|
|
1225
|
+
...Ue,
|
|
1202
1226
|
body: "",
|
|
1203
1227
|
hidden: !1
|
|
1204
|
-
}),
|
|
1228
|
+
}), Sn = Object.freeze({
|
|
1205
1229
|
width: null,
|
|
1206
1230
|
height: null
|
|
1207
|
-
}),
|
|
1231
|
+
}), Ie = Object.freeze({
|
|
1208
1232
|
// Dimensions
|
|
1209
|
-
...
|
|
1233
|
+
...Sn,
|
|
1210
1234
|
// Transformations
|
|
1211
|
-
...
|
|
1235
|
+
...K
|
|
1212
1236
|
});
|
|
1213
|
-
function
|
|
1237
|
+
function En(e, t) {
|
|
1214
1238
|
const n = {};
|
|
1215
1239
|
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
1216
1240
|
const s = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
1217
1241
|
return s && (n.rotate = s), n;
|
|
1218
1242
|
}
|
|
1219
|
-
function
|
|
1220
|
-
const n =
|
|
1221
|
-
for (const s in
|
|
1222
|
-
s in
|
|
1243
|
+
function _e(e, t) {
|
|
1244
|
+
const n = En(e, t);
|
|
1245
|
+
for (const s in wn)
|
|
1246
|
+
s in K ? s in e && !(s in n) && (n[s] = K[s]) : s in t ? n[s] = t[s] : s in e && (n[s] = e[s]);
|
|
1223
1247
|
return n;
|
|
1224
1248
|
}
|
|
1225
|
-
function
|
|
1249
|
+
function xn(e, t) {
|
|
1226
1250
|
const n = e.icons, s = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
|
|
1227
1251
|
function r(a) {
|
|
1228
1252
|
if (n[a])
|
|
@@ -1236,36 +1260,36 @@ function wn(e, t) {
|
|
|
1236
1260
|
}
|
|
1237
1261
|
return (t || Object.keys(n).concat(Object.keys(s))).forEach(r), o;
|
|
1238
1262
|
}
|
|
1239
|
-
function
|
|
1263
|
+
function ge(e, t, n) {
|
|
1240
1264
|
const s = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
1241
1265
|
let r = {};
|
|
1242
1266
|
function a(l) {
|
|
1243
|
-
r =
|
|
1267
|
+
r = _e(
|
|
1244
1268
|
s[l] || o[l],
|
|
1245
1269
|
r
|
|
1246
1270
|
);
|
|
1247
1271
|
}
|
|
1248
|
-
return a(t), n.forEach(a),
|
|
1272
|
+
return a(t), n.forEach(a), _e(e, r);
|
|
1249
1273
|
}
|
|
1250
|
-
function
|
|
1274
|
+
function An(e, t) {
|
|
1251
1275
|
if (e.icons[t])
|
|
1252
|
-
return
|
|
1253
|
-
const n =
|
|
1254
|
-
return n ?
|
|
1276
|
+
return ge(e, t, []);
|
|
1277
|
+
const n = xn(e, [t])[t];
|
|
1278
|
+
return n ? ge(e, t, n) : null;
|
|
1255
1279
|
}
|
|
1256
|
-
const
|
|
1257
|
-
function
|
|
1280
|
+
const Cn = /(-?[0-9.]*[0-9]+[0-9.]*)/g, On = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
1281
|
+
function ye(e, t, n) {
|
|
1258
1282
|
if (t === 1)
|
|
1259
1283
|
return e;
|
|
1260
1284
|
if (n = n || 100, typeof e == "number")
|
|
1261
1285
|
return Math.ceil(e * t * n) / n;
|
|
1262
1286
|
if (typeof e != "string")
|
|
1263
1287
|
return e;
|
|
1264
|
-
const s = e.split(
|
|
1288
|
+
const s = e.split(Cn);
|
|
1265
1289
|
if (s === null || !s.length)
|
|
1266
1290
|
return e;
|
|
1267
1291
|
const o = [];
|
|
1268
|
-
let r = s.shift(), a =
|
|
1292
|
+
let r = s.shift(), a = On.test(r);
|
|
1269
1293
|
for (; ; ) {
|
|
1270
1294
|
if (a) {
|
|
1271
1295
|
const l = parseFloat(r);
|
|
@@ -1277,7 +1301,7 @@ function _e(e, t, n) {
|
|
|
1277
1301
|
a = !a;
|
|
1278
1302
|
}
|
|
1279
1303
|
}
|
|
1280
|
-
function
|
|
1304
|
+
function Rn(e, t = "defs") {
|
|
1281
1305
|
let n = "";
|
|
1282
1306
|
const s = e.indexOf("<" + t);
|
|
1283
1307
|
for (; s >= 0; ) {
|
|
@@ -1294,20 +1318,20 @@ function Cn(e, t = "defs") {
|
|
|
1294
1318
|
content: e
|
|
1295
1319
|
};
|
|
1296
1320
|
}
|
|
1297
|
-
function
|
|
1321
|
+
function kn(e, t) {
|
|
1298
1322
|
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
1299
1323
|
}
|
|
1300
|
-
function
|
|
1301
|
-
const s =
|
|
1302
|
-
return
|
|
1324
|
+
function $n(e, t, n) {
|
|
1325
|
+
const s = Rn(e);
|
|
1326
|
+
return kn(s.defs, t + s.content + n);
|
|
1303
1327
|
}
|
|
1304
|
-
const
|
|
1305
|
-
function
|
|
1328
|
+
const re = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
1329
|
+
function Tn(e, t) {
|
|
1306
1330
|
const n = {
|
|
1307
|
-
...
|
|
1331
|
+
...Ue,
|
|
1308
1332
|
...e
|
|
1309
1333
|
}, s = {
|
|
1310
|
-
...
|
|
1334
|
+
...Ie,
|
|
1311
1335
|
...t
|
|
1312
1336
|
}, o = {
|
|
1313
1337
|
left: n.left,
|
|
@@ -1316,56 +1340,56 @@ function Rn(e, t) {
|
|
|
1316
1340
|
height: n.height
|
|
1317
1341
|
};
|
|
1318
1342
|
let r = n.body;
|
|
1319
|
-
[n, s].forEach((
|
|
1320
|
-
const
|
|
1321
|
-
let
|
|
1322
|
-
|
|
1343
|
+
[n, s].forEach((h) => {
|
|
1344
|
+
const v = [], C = h.hFlip, x = h.vFlip;
|
|
1345
|
+
let g = h.rotate;
|
|
1346
|
+
C ? x ? g += 2 : (v.push(
|
|
1323
1347
|
"translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"
|
|
1324
|
-
),
|
|
1348
|
+
), v.push("scale(-1 1)"), o.top = o.left = 0) : x && (v.push(
|
|
1325
1349
|
"translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"
|
|
1326
|
-
),
|
|
1327
|
-
let
|
|
1328
|
-
switch (
|
|
1350
|
+
), v.push("scale(1 -1)"), o.top = o.left = 0);
|
|
1351
|
+
let S;
|
|
1352
|
+
switch (g < 0 && (g -= Math.floor(g / 4) * 4), g = g % 4, g) {
|
|
1329
1353
|
case 1:
|
|
1330
|
-
|
|
1331
|
-
"rotate(90 " +
|
|
1354
|
+
S = o.height / 2 + o.top, v.unshift(
|
|
1355
|
+
"rotate(90 " + S.toString() + " " + S.toString() + ")"
|
|
1332
1356
|
);
|
|
1333
1357
|
break;
|
|
1334
1358
|
case 2:
|
|
1335
|
-
|
|
1359
|
+
v.unshift(
|
|
1336
1360
|
"rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")"
|
|
1337
1361
|
);
|
|
1338
1362
|
break;
|
|
1339
1363
|
case 3:
|
|
1340
|
-
|
|
1341
|
-
"rotate(-90 " +
|
|
1364
|
+
S = o.width / 2 + o.left, v.unshift(
|
|
1365
|
+
"rotate(-90 " + S.toString() + " " + S.toString() + ")"
|
|
1342
1366
|
);
|
|
1343
1367
|
break;
|
|
1344
1368
|
}
|
|
1345
|
-
|
|
1369
|
+
g % 2 === 1 && (o.left !== o.top && (S = o.left, o.left = o.top, o.top = S), o.width !== o.height && (S = o.width, o.width = o.height, o.height = S)), v.length && (r = $n(
|
|
1346
1370
|
r,
|
|
1347
|
-
'<g transform="' +
|
|
1371
|
+
'<g transform="' + v.join(" ") + '">',
|
|
1348
1372
|
"</g>"
|
|
1349
1373
|
));
|
|
1350
1374
|
});
|
|
1351
|
-
const a = s.width, l = s.height, c = o.width,
|
|
1352
|
-
let i,
|
|
1353
|
-
a === null ? (
|
|
1354
|
-
const d = {},
|
|
1355
|
-
|
|
1375
|
+
const a = s.width, l = s.height, c = o.width, f = o.height;
|
|
1376
|
+
let i, u;
|
|
1377
|
+
a === null ? (u = l === null ? "1em" : l === "auto" ? f : l, i = ye(u, c / f)) : (i = a === "auto" ? c : a, u = l === null ? ye(i, f / c) : l === "auto" ? f : l);
|
|
1378
|
+
const d = {}, m = (h, v) => {
|
|
1379
|
+
re(v) || (d[h] = v.toString());
|
|
1356
1380
|
};
|
|
1357
|
-
|
|
1358
|
-
const
|
|
1359
|
-
return d.viewBox =
|
|
1381
|
+
m("width", i), m("height", u);
|
|
1382
|
+
const y = [o.left, o.top, c, f];
|
|
1383
|
+
return d.viewBox = y.join(" "), {
|
|
1360
1384
|
attributes: d,
|
|
1361
|
-
viewBox:
|
|
1385
|
+
viewBox: y,
|
|
1362
1386
|
body: r
|
|
1363
1387
|
};
|
|
1364
1388
|
}
|
|
1365
|
-
function
|
|
1389
|
+
function Ln(e) {
|
|
1366
1390
|
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
1367
1391
|
}
|
|
1368
|
-
function
|
|
1392
|
+
function Mn(e) {
|
|
1369
1393
|
let t = e.startsWith("<svg>") ? e.replace("<svg>", "<svg >") : e;
|
|
1370
1394
|
return !t.includes(" xmlns:xlink=") && t.includes(" xlink:") && (t = t.replace(
|
|
1371
1395
|
"<svg ",
|
|
@@ -1373,41 +1397,41 @@ function $n(e) {
|
|
|
1373
1397
|
)), t.includes(" xmlns=") || (t = t.replace(
|
|
1374
1398
|
"<svg ",
|
|
1375
1399
|
'<svg xmlns="http://www.w3.org/2000/svg" '
|
|
1376
|
-
)),
|
|
1400
|
+
)), Ln(t);
|
|
1377
1401
|
}
|
|
1378
|
-
function
|
|
1402
|
+
function Un(e) {
|
|
1379
1403
|
return e.replace(/(['"])\s*\n\s*([^>\\/\s])/g, "$1 $2").replace(/(["';{}><])\s*\n\s*/g, "$1").replace(/\s*\n\s*/g, " ").replace(/\s+"/g, '"').replace(/="\s+/g, '="').replace(/(\s)+\/>/g, "/>").trim();
|
|
1380
1404
|
}
|
|
1381
|
-
const
|
|
1382
|
-
function
|
|
1405
|
+
const In = /\swidth\s*=\s*["']([\w.]+)["']/, Nn = /\sheight\s*=\s*["']([\w.]+)["']/, Z = /<svg\s+/;
|
|
1406
|
+
function Dn(e, t, n) {
|
|
1383
1407
|
const s = e.slice(0, e.indexOf(">")), o = (r, a) => {
|
|
1384
|
-
const l = a.exec(s), c = l != null,
|
|
1385
|
-
return !
|
|
1408
|
+
const l = a.exec(s), c = l != null, f = t[r];
|
|
1409
|
+
return !f && !re(f) && (typeof n == "number" ? n > 0 && (t[r] = `${n}em`) : l && (t[r] = l[1])), c;
|
|
1386
1410
|
};
|
|
1387
|
-
return [o("width",
|
|
1411
|
+
return [o("width", In), o("height", Nn)];
|
|
1388
1412
|
}
|
|
1389
|
-
async function
|
|
1390
|
-
const { scale: a, addXmlNs: l = !1 } = s ?? {}, { additionalProps: c = {}, iconCustomizer:
|
|
1391
|
-
await (
|
|
1392
|
-
const
|
|
1393
|
-
|
|
1413
|
+
async function Ne(e, t, n, s, o, r) {
|
|
1414
|
+
const { scale: a, addXmlNs: l = !1 } = s ?? {}, { additionalProps: c = {}, iconCustomizer: f } = (s == null ? void 0 : s.customizations) ?? {}, i = await (o == null ? void 0 : o()) ?? {};
|
|
1415
|
+
await (f == null ? void 0 : f(t, n, i)), Object.keys(c).forEach((h) => {
|
|
1416
|
+
const v = c[h];
|
|
1417
|
+
v != null && (i[h] = v);
|
|
1394
1418
|
}), r == null || r(i);
|
|
1395
|
-
const [
|
|
1419
|
+
const [u, d] = Dn(e, i, a);
|
|
1396
1420
|
l && (!e.includes("xmlns=") && !i.xmlns && (i.xmlns = "http://www.w3.org/2000/svg"), !e.includes("xmlns:xlink=") && e.includes("xlink:") && !i["xmlns:xlink"] && (i["xmlns:xlink"] = "http://www.w3.org/1999/xlink"));
|
|
1397
|
-
const
|
|
1398
|
-
(
|
|
1399
|
-
).filter((
|
|
1400
|
-
if (
|
|
1401
|
-
const { defaultStyle:
|
|
1402
|
-
|
|
1403
|
-
}
|
|
1404
|
-
const
|
|
1405
|
-
return
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1408
|
-
}), typeof i.width < "u" && i.width !== null && (
|
|
1409
|
-
}
|
|
1410
|
-
async function
|
|
1421
|
+
const m = Object.keys(i).map(
|
|
1422
|
+
(h) => h === "width" && u || h === "height" && d ? null : `${h}="${i[h]}"`
|
|
1423
|
+
).filter((h) => h != null);
|
|
1424
|
+
if (m.length && (e = e.replace(Z, `<svg ${m.join(" ")} `)), s) {
|
|
1425
|
+
const { defaultStyle: h, defaultClass: v } = s;
|
|
1426
|
+
v && !e.includes("class=") && (e = e.replace(Z, `<svg class="${v}" `)), h && !e.includes("style=") && (e = e.replace(Z, `<svg style="${h}" `));
|
|
1427
|
+
}
|
|
1428
|
+
const y = s == null ? void 0 : s.usedProps;
|
|
1429
|
+
return y && (Object.keys(c).forEach((h) => {
|
|
1430
|
+
const v = i[h];
|
|
1431
|
+
v != null && (y[h] = v);
|
|
1432
|
+
}), typeof i.width < "u" && i.width !== null && (y.width = i.width), typeof i.height < "u" && i.height !== null && (y.height = i.height)), e;
|
|
1433
|
+
}
|
|
1434
|
+
async function be(e, t, n, s) {
|
|
1411
1435
|
var r;
|
|
1412
1436
|
let o;
|
|
1413
1437
|
try {
|
|
@@ -1428,8 +1452,8 @@ async function ge(e, t, n, s) {
|
|
|
1428
1452
|
const a = o.indexOf("<svg");
|
|
1429
1453
|
a > 0 && (o = o.slice(a));
|
|
1430
1454
|
const { transform: l } = (s == null ? void 0 : s.customizations) ?? {};
|
|
1431
|
-
return o = typeof l == "function" ? await l(o, t, n) : o, o.startsWith("<svg") ? await
|
|
1432
|
-
((r = s == null ? void 0 : s.customizations) == null ? void 0 : r.trimCustomSvg) === !0 ?
|
|
1455
|
+
return o = typeof l == "function" ? await l(o, t, n) : o, o.startsWith("<svg") ? await Ne(
|
|
1456
|
+
((r = s == null ? void 0 : s.customizations) == null ? void 0 : r.trimCustomSvg) === !0 ? Un(o) : o,
|
|
1433
1457
|
t,
|
|
1434
1458
|
n,
|
|
1435
1459
|
s,
|
|
@@ -1439,41 +1463,41 @@ async function ge(e, t, n, s) {
|
|
|
1439
1463
|
), o);
|
|
1440
1464
|
}
|
|
1441
1465
|
}
|
|
1442
|
-
async function
|
|
1466
|
+
async function De(e, t, n, s) {
|
|
1443
1467
|
let o;
|
|
1444
1468
|
const { customize: r } = (s == null ? void 0 : s.customizations) ?? {};
|
|
1445
1469
|
for (const a of n)
|
|
1446
|
-
if (o =
|
|
1447
|
-
let l = { ...
|
|
1470
|
+
if (o = An(e, a), o) {
|
|
1471
|
+
let l = { ...Ie };
|
|
1448
1472
|
typeof r == "function" && (l = r(l));
|
|
1449
1473
|
const {
|
|
1450
|
-
attributes: { width: c, height:
|
|
1451
|
-
body:
|
|
1452
|
-
} =
|
|
1453
|
-
return await
|
|
1474
|
+
attributes: { width: c, height: f, ...i },
|
|
1475
|
+
body: u
|
|
1476
|
+
} = Tn(o, l), d = s == null ? void 0 : s.scale;
|
|
1477
|
+
return await Ne(
|
|
1454
1478
|
// DON'T remove space on <svg >
|
|
1455
|
-
`<svg >${
|
|
1479
|
+
`<svg >${u}</svg>`,
|
|
1456
1480
|
t,
|
|
1457
1481
|
a,
|
|
1458
1482
|
s,
|
|
1459
1483
|
() => ({ ...i }),
|
|
1460
|
-
(
|
|
1461
|
-
const
|
|
1462
|
-
const
|
|
1463
|
-
let
|
|
1464
|
-
if (!
|
|
1465
|
-
if (
|
|
1484
|
+
(m) => {
|
|
1485
|
+
const y = (h, v) => {
|
|
1486
|
+
const C = m[h];
|
|
1487
|
+
let x;
|
|
1488
|
+
if (!re(C)) {
|
|
1489
|
+
if (C)
|
|
1466
1490
|
return;
|
|
1467
|
-
typeof d == "number" ? d && (
|
|
1491
|
+
typeof d == "number" ? d && (x = `${d}em`) : x = v;
|
|
1468
1492
|
}
|
|
1469
|
-
|
|
1493
|
+
x ? m[h] = x : delete m[h];
|
|
1470
1494
|
};
|
|
1471
|
-
|
|
1495
|
+
y("width", c), y("height", f);
|
|
1472
1496
|
}
|
|
1473
1497
|
);
|
|
1474
1498
|
}
|
|
1475
1499
|
}
|
|
1476
|
-
const
|
|
1500
|
+
const je = async (e, t, n) => {
|
|
1477
1501
|
var o;
|
|
1478
1502
|
const s = (o = n == null ? void 0 : n.customCollections) == null ? void 0 : o[e];
|
|
1479
1503
|
if (s)
|
|
@@ -1490,7 +1514,7 @@ const Ne = async (e, t, n) => {
|
|
|
1490
1514
|
}
|
|
1491
1515
|
if (r) {
|
|
1492
1516
|
if (typeof r == "string")
|
|
1493
|
-
return await
|
|
1517
|
+
return await be(
|
|
1494
1518
|
() => r,
|
|
1495
1519
|
e,
|
|
1496
1520
|
t,
|
|
@@ -1502,7 +1526,7 @@ const Ne = async (e, t, n) => {
|
|
|
1502
1526
|
t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(),
|
|
1503
1527
|
t.replace(/([a-z])(\d+)/g, "$1-$2")
|
|
1504
1528
|
];
|
|
1505
|
-
return await
|
|
1529
|
+
return await De(
|
|
1506
1530
|
r,
|
|
1507
1531
|
e,
|
|
1508
1532
|
a,
|
|
@@ -1511,12 +1535,12 @@ const Ne = async (e, t, n) => {
|
|
|
1511
1535
|
}
|
|
1512
1536
|
}
|
|
1513
1537
|
} else
|
|
1514
|
-
return await
|
|
1538
|
+
return await be(s, e, t, n);
|
|
1515
1539
|
};
|
|
1516
|
-
function
|
|
1540
|
+
function jn(e) {
|
|
1517
1541
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1518
1542
|
}
|
|
1519
|
-
var
|
|
1543
|
+
var Pn = [
|
|
1520
1544
|
"academicons",
|
|
1521
1545
|
"akar-icons",
|
|
1522
1546
|
"ant-design",
|
|
@@ -1621,6 +1645,7 @@ var Nn = [
|
|
|
1621
1645
|
"logos",
|
|
1622
1646
|
"ls",
|
|
1623
1647
|
"lucide",
|
|
1648
|
+
"mage",
|
|
1624
1649
|
"majesticons",
|
|
1625
1650
|
"maki",
|
|
1626
1651
|
"map",
|
|
@@ -1688,8 +1713,8 @@ var Nn = [
|
|
|
1688
1713
|
"zmdi",
|
|
1689
1714
|
"zondicons"
|
|
1690
1715
|
];
|
|
1691
|
-
const
|
|
1692
|
-
function
|
|
1716
|
+
const Fn = /* @__PURE__ */ jn(Pn), Vn = 3;
|
|
1717
|
+
function Bn(e) {
|
|
1693
1718
|
return (t = {}) => {
|
|
1694
1719
|
const {
|
|
1695
1720
|
scale: n = 1,
|
|
@@ -1699,15 +1724,15 @@ function Pn(e) {
|
|
|
1699
1724
|
collections: a,
|
|
1700
1725
|
extraProperties: l = {},
|
|
1701
1726
|
customizations: c = {},
|
|
1702
|
-
autoInstall:
|
|
1727
|
+
autoInstall: f = !1,
|
|
1703
1728
|
collectionsNodeResolvePath: i,
|
|
1704
|
-
layer:
|
|
1729
|
+
layer: u = "icons",
|
|
1705
1730
|
unit: d
|
|
1706
|
-
} = t,
|
|
1731
|
+
} = t, m = Gn(), y = {
|
|
1707
1732
|
addXmlNs: !0,
|
|
1708
1733
|
scale: n,
|
|
1709
1734
|
customCollections: a,
|
|
1710
|
-
autoInstall:
|
|
1735
|
+
autoInstall: f,
|
|
1711
1736
|
cwd: i,
|
|
1712
1737
|
// avoid warn from @iconify/loader: we'll warn below if not found
|
|
1713
1738
|
warn: void 0,
|
|
@@ -1715,13 +1740,13 @@ function Pn(e) {
|
|
|
1715
1740
|
...c,
|
|
1716
1741
|
additionalProps: { ...l },
|
|
1717
1742
|
trimCustomSvg: !0,
|
|
1718
|
-
async iconCustomizer(
|
|
1719
|
-
var
|
|
1720
|
-
await ((
|
|
1743
|
+
async iconCustomizer(v, C, x) {
|
|
1744
|
+
var g;
|
|
1745
|
+
await ((g = c.iconCustomizer) == null ? void 0 : g.call(c, v, C, x)), d && (x.width || (x.width = `${n}${d}`), x.height || (x.height = `${n}${d}`));
|
|
1721
1746
|
}
|
|
1722
1747
|
}
|
|
1723
1748
|
};
|
|
1724
|
-
let
|
|
1749
|
+
let h;
|
|
1725
1750
|
return {
|
|
1726
1751
|
name: "@unocss/preset-icons",
|
|
1727
1752
|
enforce: "pre",
|
|
@@ -1729,24 +1754,24 @@ function Pn(e) {
|
|
|
1729
1754
|
layers: { icons: -30 },
|
|
1730
1755
|
rules: [[
|
|
1731
1756
|
/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,
|
|
1732
|
-
async ([
|
|
1733
|
-
let
|
|
1734
|
-
|
|
1757
|
+
async ([v, C, x = s]) => {
|
|
1758
|
+
let g = "", S = "", b;
|
|
1759
|
+
h = h || await e(t);
|
|
1735
1760
|
const p = {};
|
|
1736
|
-
if (
|
|
1737
|
-
[
|
|
1761
|
+
if (C.includes(":"))
|
|
1762
|
+
[g, S] = C.split(":"), b = await h(g, S, { ...y, usedProps: p });
|
|
1738
1763
|
else {
|
|
1739
|
-
const R =
|
|
1740
|
-
for (let
|
|
1764
|
+
const R = C.split(/-/g);
|
|
1765
|
+
for (let O = Vn; O >= 1 && (g = R.slice(0, O).join("-"), S = R.slice(O).join("-"), b = await h(g, S, { ...y, usedProps: p }), !b); O--)
|
|
1741
1766
|
;
|
|
1742
1767
|
}
|
|
1743
|
-
if (!
|
|
1744
|
-
r && !
|
|
1768
|
+
if (!b) {
|
|
1769
|
+
r && !m.isESLint && $e(`failed to load icon "${v}"`);
|
|
1745
1770
|
return;
|
|
1746
1771
|
}
|
|
1747
|
-
const
|
|
1748
|
-
return
|
|
1749
|
-
"--un-icon":
|
|
1772
|
+
const w = `url("data:image/svg+xml;utf8,${Mn(b)}")`;
|
|
1773
|
+
return x === "auto" && (x = b.includes("currentColor") ? "mask" : "bg"), x === "mask" ? {
|
|
1774
|
+
"--un-icon": w,
|
|
1750
1775
|
"-webkit-mask": "var(--un-icon) no-repeat",
|
|
1751
1776
|
mask: "var(--un-icon) no-repeat",
|
|
1752
1777
|
"-webkit-mask-size": "100% 100%",
|
|
@@ -1756,78 +1781,78 @@ function Pn(e) {
|
|
|
1756
1781
|
color: "inherit",
|
|
1757
1782
|
...p
|
|
1758
1783
|
} : {
|
|
1759
|
-
background: `${
|
|
1784
|
+
background: `${w} no-repeat`,
|
|
1760
1785
|
"background-size": "100% 100%",
|
|
1761
1786
|
"background-color": "transparent",
|
|
1762
1787
|
...p
|
|
1763
1788
|
};
|
|
1764
1789
|
},
|
|
1765
|
-
{ layer:
|
|
1790
|
+
{ layer: u, prefix: o }
|
|
1766
1791
|
]]
|
|
1767
1792
|
};
|
|
1768
1793
|
};
|
|
1769
1794
|
}
|
|
1770
|
-
function
|
|
1795
|
+
function Pe(e, t) {
|
|
1771
1796
|
const n = /* @__PURE__ */ new Map();
|
|
1772
1797
|
function s(o) {
|
|
1773
|
-
if (
|
|
1798
|
+
if (Fn.includes(o))
|
|
1774
1799
|
return n.has(o) || n.set(o, e(`${t}@iconify-json/${o}/icons.json`)), n.get(o);
|
|
1775
1800
|
}
|
|
1776
1801
|
return async (o, r, a) => {
|
|
1777
|
-
let l = await
|
|
1802
|
+
let l = await je(o, r, a);
|
|
1778
1803
|
if (l)
|
|
1779
1804
|
return l;
|
|
1780
1805
|
const c = await s(o);
|
|
1781
1806
|
if (c) {
|
|
1782
|
-
const
|
|
1807
|
+
const f = [
|
|
1783
1808
|
r,
|
|
1784
1809
|
r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(),
|
|
1785
1810
|
r.replace(/([a-z])(\d+)/g, "$1-$2")
|
|
1786
1811
|
];
|
|
1787
|
-
l = await
|
|
1812
|
+
l = await De(c, o, f, a);
|
|
1788
1813
|
}
|
|
1789
1814
|
return l;
|
|
1790
1815
|
};
|
|
1791
1816
|
}
|
|
1792
|
-
function
|
|
1793
|
-
const e = typeof process < "u" && process.stdout && !process.versions.deno, t = e && !!
|
|
1817
|
+
function Gn() {
|
|
1818
|
+
const e = typeof process < "u" && process.stdout && !process.versions.deno, t = e && !!he.VSCODE_CWD, n = e && !!he.ESLINT;
|
|
1794
1819
|
return {
|
|
1795
1820
|
isNode: e,
|
|
1796
1821
|
isVSCode: t,
|
|
1797
1822
|
isESLint: n
|
|
1798
1823
|
};
|
|
1799
1824
|
}
|
|
1800
|
-
function
|
|
1801
|
-
return
|
|
1825
|
+
function Hn(e) {
|
|
1826
|
+
return Pe(Mt, e);
|
|
1802
1827
|
}
|
|
1803
|
-
const
|
|
1828
|
+
const zn = Bn(async (e) => {
|
|
1804
1829
|
const t = e == null ? void 0 : e.customFetch, n = e == null ? void 0 : e.cdn;
|
|
1805
|
-
return t && n ?
|
|
1830
|
+
return t && n ? Pe(t, n) : n ? Hn(n) : je;
|
|
1806
1831
|
});
|
|
1807
|
-
function
|
|
1832
|
+
function qn(e) {
|
|
1808
1833
|
return e.replace(/-(\w)/g, (t, n) => n ? n.toUpperCase() : "");
|
|
1809
1834
|
}
|
|
1810
|
-
function
|
|
1835
|
+
function ve(e) {
|
|
1811
1836
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
1812
1837
|
}
|
|
1813
|
-
function
|
|
1838
|
+
function we(e) {
|
|
1814
1839
|
return e.replace(/(?:^|\B)([A-Z])/g, "-$1").toLowerCase();
|
|
1815
1840
|
}
|
|
1816
|
-
var
|
|
1817
|
-
function
|
|
1841
|
+
var Se = ["Webkit", "Moz", "ms"];
|
|
1842
|
+
function Wn(e) {
|
|
1818
1843
|
const t = {};
|
|
1819
1844
|
function n(s) {
|
|
1820
1845
|
const o = t[s];
|
|
1821
1846
|
if (o)
|
|
1822
1847
|
return o;
|
|
1823
|
-
let r =
|
|
1848
|
+
let r = qn(s);
|
|
1824
1849
|
if (r !== "filter" && r in e)
|
|
1825
|
-
return t[s] =
|
|
1826
|
-
r =
|
|
1827
|
-
for (let a = 0; a <
|
|
1828
|
-
const l = `${
|
|
1850
|
+
return t[s] = we(r);
|
|
1851
|
+
r = ve(r);
|
|
1852
|
+
for (let a = 0; a < Se.length; a++) {
|
|
1853
|
+
const l = `${Se[a]}${r}`;
|
|
1829
1854
|
if (l in e)
|
|
1830
|
-
return t[s] =
|
|
1855
|
+
return t[s] = we(ve(l));
|
|
1831
1856
|
}
|
|
1832
1857
|
return s;
|
|
1833
1858
|
}
|
|
@@ -1835,124 +1860,124 @@ function Bn(e) {
|
|
|
1835
1860
|
o[0].startsWith("--") || (o[0] = n(o[0]));
|
|
1836
1861
|
});
|
|
1837
1862
|
}
|
|
1838
|
-
function
|
|
1863
|
+
function Kn(e) {
|
|
1839
1864
|
return e.replace(/&/g, "&").replace(/>/g, ">").replace(/</g, "<");
|
|
1840
1865
|
}
|
|
1841
|
-
function
|
|
1842
|
-
var
|
|
1866
|
+
function Jn(e = {}) {
|
|
1867
|
+
var P, F, k;
|
|
1843
1868
|
if (typeof window > "u") {
|
|
1844
1869
|
console.warn("@unocss/runtime been used in non-browser environment, skipped.");
|
|
1845
1870
|
return;
|
|
1846
1871
|
}
|
|
1847
1872
|
const t = window, n = window.document, s = () => n.documentElement, o = t.__unocss || {}, r = Object.assign({}, e, o.runtime), a = r.defaults || {}, l = r.cloakAttribute ?? "un-cloak";
|
|
1848
|
-
r.autoPrefix && (a.postprocess =
|
|
1849
|
-
const c =
|
|
1850
|
-
let d = !0,
|
|
1851
|
-
const
|
|
1852
|
-
|
|
1853
|
-
const
|
|
1854
|
-
|
|
1873
|
+
r.autoPrefix && (a.postprocess = I(a.postprocess)).unshift(Wn(n.createElement("div").style)), (P = r.configResolved) == null || P.call(r, o, a);
|
|
1874
|
+
const c = hn(o, a), f = (_) => r.inject ? r.inject(_) : s().prepend(_), i = () => r.rootElement ? r.rootElement() : n.body, u = /* @__PURE__ */ new Map();
|
|
1875
|
+
let d = !0, m = /* @__PURE__ */ new Set(), y, h, v = [];
|
|
1876
|
+
const C = () => new Promise((_) => {
|
|
1877
|
+
v.push(_), h != null && clearTimeout(h), h = setTimeout(() => S().then(() => {
|
|
1878
|
+
const E = v;
|
|
1879
|
+
v = [], E.forEach((A) => A());
|
|
1855
1880
|
}), 0);
|
|
1856
1881
|
});
|
|
1857
|
-
function
|
|
1858
|
-
if (
|
|
1882
|
+
function x(_) {
|
|
1883
|
+
if (_.nodeType !== 1)
|
|
1859
1884
|
return;
|
|
1860
|
-
const
|
|
1861
|
-
|
|
1862
|
-
|
|
1885
|
+
const E = _;
|
|
1886
|
+
E.hasAttribute(l) && E.removeAttribute(l), E.querySelectorAll(`[${l}]`).forEach((A) => {
|
|
1887
|
+
A.removeAttribute(l);
|
|
1863
1888
|
});
|
|
1864
1889
|
}
|
|
1865
|
-
function
|
|
1866
|
-
let
|
|
1867
|
-
if (!
|
|
1868
|
-
if (
|
|
1869
|
-
|
|
1890
|
+
function g(_, E) {
|
|
1891
|
+
let A = u.get(_);
|
|
1892
|
+
if (!A)
|
|
1893
|
+
if (A = n.createElement("style"), A.setAttribute("data-unocss-runtime-layer", _), u.set(_, A), E == null)
|
|
1894
|
+
f(A);
|
|
1870
1895
|
else {
|
|
1871
|
-
const
|
|
1872
|
-
|
|
1896
|
+
const M = g(E), $ = M.parentNode;
|
|
1897
|
+
$ ? $.insertBefore(A, M.nextSibling) : f(A);
|
|
1873
1898
|
}
|
|
1874
|
-
return
|
|
1875
|
-
}
|
|
1876
|
-
async function
|
|
1877
|
-
const
|
|
1878
|
-
return
|
|
1879
|
-
...
|
|
1880
|
-
getStyleElement: (
|
|
1881
|
-
getStyleElements: () =>
|
|
1899
|
+
return A;
|
|
1900
|
+
}
|
|
1901
|
+
async function S() {
|
|
1902
|
+
const _ = await c.generate(m);
|
|
1903
|
+
return _.layers.reduce((E, A) => (g(A, E).innerHTML = _.getLayer(A) ?? "", A), void 0), m = _.matched, {
|
|
1904
|
+
..._,
|
|
1905
|
+
getStyleElement: (E) => u.get(E),
|
|
1906
|
+
getStyleElements: () => u
|
|
1882
1907
|
};
|
|
1883
1908
|
}
|
|
1884
|
-
async function
|
|
1885
|
-
const
|
|
1886
|
-
await c.applyExtractors(
|
|
1909
|
+
async function b(_) {
|
|
1910
|
+
const E = m.size;
|
|
1911
|
+
await c.applyExtractors(_, void 0, m), E !== m.size && await C();
|
|
1887
1912
|
}
|
|
1888
|
-
async function p(
|
|
1889
|
-
const
|
|
1890
|
-
|
|
1913
|
+
async function p(_ = i()) {
|
|
1914
|
+
const E = _ && _.outerHTML;
|
|
1915
|
+
E && (await b(`${E} ${Kn(E)}`), x(s()), x(_));
|
|
1891
1916
|
}
|
|
1892
|
-
const
|
|
1893
|
-
d ||
|
|
1894
|
-
if (
|
|
1917
|
+
const w = new MutationObserver((_) => {
|
|
1918
|
+
d || _.forEach(async (E) => {
|
|
1919
|
+
if (E.target.nodeType !== 1)
|
|
1895
1920
|
return;
|
|
1896
|
-
const
|
|
1897
|
-
for (const
|
|
1898
|
-
if (
|
|
1921
|
+
const A = E.target;
|
|
1922
|
+
for (const M of u)
|
|
1923
|
+
if (A === M[1])
|
|
1899
1924
|
return;
|
|
1900
|
-
if (
|
|
1901
|
-
|
|
1902
|
-
if (
|
|
1925
|
+
if (E.type === "childList")
|
|
1926
|
+
E.addedNodes.forEach(async (M) => {
|
|
1927
|
+
if (M.nodeType !== 1)
|
|
1903
1928
|
return;
|
|
1904
|
-
const
|
|
1905
|
-
|
|
1929
|
+
const $ = M;
|
|
1930
|
+
y && !y($) || (await b($.outerHTML), x($));
|
|
1906
1931
|
});
|
|
1907
1932
|
else {
|
|
1908
|
-
if (
|
|
1933
|
+
if (y && !y(A))
|
|
1909
1934
|
return;
|
|
1910
|
-
if (
|
|
1911
|
-
const
|
|
1912
|
-
await
|
|
1935
|
+
if (E.attributeName !== l) {
|
|
1936
|
+
const M = Array.from(A.attributes).map((T) => T.value ? `${T.name}="${T.value}"` : T.name).join(" "), $ = `<${A.tagName.toLowerCase()} ${M}>`;
|
|
1937
|
+
await b($);
|
|
1913
1938
|
}
|
|
1914
|
-
|
|
1939
|
+
A.hasAttribute(l) && A.removeAttribute(l);
|
|
1915
1940
|
}
|
|
1916
1941
|
});
|
|
1917
1942
|
});
|
|
1918
1943
|
let R = !1;
|
|
1919
|
-
function
|
|
1920
|
-
var
|
|
1944
|
+
function O() {
|
|
1945
|
+
var E, A;
|
|
1921
1946
|
if (R)
|
|
1922
1947
|
return;
|
|
1923
|
-
const
|
|
1924
|
-
|
|
1948
|
+
const _ = (E = r.observer) != null && E.target ? r.observer.target() : i();
|
|
1949
|
+
_ && (w.observe(_, {
|
|
1925
1950
|
childList: !0,
|
|
1926
1951
|
subtree: !0,
|
|
1927
1952
|
attributes: !0,
|
|
1928
|
-
attributeFilter: (
|
|
1953
|
+
attributeFilter: (A = r.observer) == null ? void 0 : A.attributeFilter
|
|
1929
1954
|
}), R = !0);
|
|
1930
1955
|
}
|
|
1931
|
-
function
|
|
1932
|
-
r.bypassDefined &&
|
|
1956
|
+
function L() {
|
|
1957
|
+
r.bypassDefined && Xn(c.blocked), p(), O();
|
|
1933
1958
|
}
|
|
1934
|
-
function
|
|
1935
|
-
n.readyState === "loading" ? t.addEventListener("DOMContentLoaded",
|
|
1959
|
+
function N() {
|
|
1960
|
+
n.readyState === "loading" ? t.addEventListener("DOMContentLoaded", L) : L();
|
|
1936
1961
|
}
|
|
1937
|
-
const
|
|
1962
|
+
const j = t.__unocss_runtime = t.__unocss_runtime = {
|
|
1938
1963
|
version: c.version,
|
|
1939
1964
|
uno: c,
|
|
1940
|
-
async extract(
|
|
1941
|
-
|
|
1965
|
+
async extract(_) {
|
|
1966
|
+
U(_) || (_.forEach((E) => m.add(E)), _ = ""), await b(_);
|
|
1942
1967
|
},
|
|
1943
1968
|
extractAll: p,
|
|
1944
|
-
inspect(
|
|
1945
|
-
|
|
1969
|
+
inspect(_) {
|
|
1970
|
+
y = _;
|
|
1946
1971
|
},
|
|
1947
|
-
toggleObserver(
|
|
1948
|
-
|
|
1972
|
+
toggleObserver(_) {
|
|
1973
|
+
_ === void 0 ? d = !d : d = !!_, !R && !d && N();
|
|
1949
1974
|
},
|
|
1950
|
-
update:
|
|
1951
|
-
presets: ((
|
|
1975
|
+
update: S,
|
|
1976
|
+
presets: ((F = t.__unocss_runtime) == null ? void 0 : F.presets) ?? {}
|
|
1952
1977
|
};
|
|
1953
|
-
((
|
|
1978
|
+
((k = r.ready) == null ? void 0 : k.call(r, j)) !== !1 && (d = !1, N());
|
|
1954
1979
|
}
|
|
1955
|
-
function
|
|
1980
|
+
function Xn(e = /* @__PURE__ */ new Set()) {
|
|
1956
1981
|
for (let t = 0; t < document.styleSheets.length; t++) {
|
|
1957
1982
|
const n = document.styleSheets[t];
|
|
1958
1983
|
let s;
|
|
@@ -1971,10 +1996,10 @@ function Wn(e = /* @__PURE__ */ new Set()) {
|
|
|
1971
1996
|
}
|
|
1972
1997
|
return e;
|
|
1973
1998
|
}
|
|
1974
|
-
|
|
1999
|
+
Jn({
|
|
1975
2000
|
defaults: {
|
|
1976
2001
|
presets: [
|
|
1977
|
-
|
|
2002
|
+
zn({
|
|
1978
2003
|
prefix: ["i-", ""],
|
|
1979
2004
|
collections: {},
|
|
1980
2005
|
cdn: "https://esm.sh/",
|