prettier-plugin-embed 0.4.13 → 0.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embedded/register.d.ts +2 -2
- package/dist/embedded/utils.d.ts +1 -2
- package/dist/index.js +609 -640
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { builders as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { printers as
|
|
1
|
+
import { builders as T, utils as ii } from "prettier/doc";
|
|
2
|
+
import hi from "prettier/parser-babel";
|
|
3
|
+
import Ei from "prettier/parser-espree";
|
|
4
|
+
import bi from "prettier/parser-flow";
|
|
5
|
+
import fi from "prettier/parser-meriyah";
|
|
6
|
+
import yi from "prettier/parser-typescript";
|
|
7
|
+
import { printers as _i } from "prettier/plugins/estree.mjs";
|
|
8
8
|
import { resolveConfigFile as vi } from "prettier";
|
|
9
|
-
const { group:
|
|
10
|
-
function
|
|
9
|
+
const { group: $i, indent: Di, softline: Pe, hardline: Ti, lineSuffixBoundary: Mi } = T, { mapDoc: Ai } = ii;
|
|
10
|
+
function Si(e, t) {
|
|
11
11
|
const { node: n } = e;
|
|
12
12
|
let r = t();
|
|
13
|
-
return n?.comments?.length && (r =
|
|
13
|
+
return n?.comments?.length && (r = $i([Di([Pe, r]), Pe])), ["${", r, Mi, "}"];
|
|
14
14
|
}
|
|
15
15
|
function S(e, t) {
|
|
16
16
|
return e.map(
|
|
17
|
-
(n) =>
|
|
17
|
+
(n) => Si(n, t),
|
|
18
18
|
"expressions"
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
function A(e, t, n, r = !1) {
|
|
22
|
-
return
|
|
22
|
+
return Ai(e, (a) => {
|
|
23
23
|
if (typeof a != "string")
|
|
24
24
|
return a;
|
|
25
25
|
const s = [], l = a.split(t);
|
|
@@ -42,17 +42,7 @@ function A(e, t, n, r = !1) {
|
|
|
42
42
|
return s;
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
if (!(t.plugins?.some(
|
|
47
|
-
(r) => r.name?.match(
|
|
48
|
-
new RegExp(`(^|/)${Pe(e)}($|/)`)
|
|
49
|
-
) ?? !1
|
|
50
|
-
) ?? !1))
|
|
51
|
-
throw new Error(
|
|
52
|
-
`Cannot format embedded language identified by "${n}", because plugin "${e}" is not loaded.`
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
function ki(e, t, n) {
|
|
45
|
+
function Li(e, t, n) {
|
|
56
46
|
if (t === n) {
|
|
57
47
|
e.unshift(t);
|
|
58
48
|
return;
|
|
@@ -68,7 +58,7 @@ function ki(e, t, n) {
|
|
|
68
58
|
}
|
|
69
59
|
e.splice(r, 0, t);
|
|
70
60
|
}
|
|
71
|
-
const
|
|
61
|
+
const me = (() => {
|
|
72
62
|
const e = [...Array(26).keys()].map((t) => String.fromCharCode(t + 97)).concat([...Array(10).keys()].map((t) => `${t}`));
|
|
73
63
|
return () => {
|
|
74
64
|
let n = "";
|
|
@@ -78,7 +68,7 @@ const he = (() => {
|
|
|
78
68
|
};
|
|
79
69
|
})();
|
|
80
70
|
function L(e = "p", t = "") {
|
|
81
|
-
const n =
|
|
71
|
+
const n = me(), r = me(), i = Be(e), a = Be(t), s = (u) => `${e}${n}${u}${r}${t}`, l = new RegExp(
|
|
82
72
|
`${i}${n}(\\d+)${r}${a}`,
|
|
83
73
|
"ig"
|
|
84
74
|
);
|
|
@@ -87,25 +77,25 @@ function L(e = "p", t = "") {
|
|
|
87
77
|
placeholderRegex: l
|
|
88
78
|
};
|
|
89
79
|
}
|
|
90
|
-
function
|
|
80
|
+
function Be(e) {
|
|
91
81
|
return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
92
82
|
}
|
|
93
|
-
function
|
|
83
|
+
function $(e) {
|
|
94
84
|
return `${e}Identifiers`;
|
|
95
85
|
}
|
|
96
|
-
function
|
|
86
|
+
function M(e) {
|
|
97
87
|
return `${e}Comments`;
|
|
98
88
|
}
|
|
99
89
|
function D(e) {
|
|
100
90
|
return `${e}Tags`;
|
|
101
91
|
}
|
|
102
|
-
function
|
|
92
|
+
function ki(e) {
|
|
103
93
|
return `${e}Plugin`;
|
|
104
94
|
}
|
|
105
|
-
function
|
|
95
|
+
function N(e) {
|
|
106
96
|
return `${e}Parser`;
|
|
107
97
|
}
|
|
108
|
-
const { line:
|
|
98
|
+
const { line: qe, group: x, indent: je, softline: Ue } = T, Gi = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
109
99
|
const s = {
|
|
110
100
|
...r,
|
|
111
101
|
...a
|
|
@@ -119,59 +109,59 @@ const { line: je, group: O, indent: Ue, softline: Re } = M, Ni = async (e, t, n,
|
|
|
119
109
|
parser: s.embeddedCssParser ?? "scss"
|
|
120
110
|
}), o = A(_, E, b);
|
|
121
111
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
122
|
-
return
|
|
112
|
+
return x([
|
|
123
113
|
"`",
|
|
124
114
|
c,
|
|
125
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
115
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [x(o)] : je([x(o)]),
|
|
126
116
|
p,
|
|
127
117
|
"`"
|
|
128
118
|
]);
|
|
129
|
-
const h = c.length ?
|
|
130
|
-
return
|
|
119
|
+
const h = c.length ? qe : Ue, v = p.length ? qe : Ue;
|
|
120
|
+
return x([
|
|
131
121
|
"`",
|
|
132
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
133
|
-
|
|
122
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, x(o)] : je([h, x(o)]),
|
|
123
|
+
v,
|
|
134
124
|
"`"
|
|
135
125
|
]);
|
|
136
|
-
},
|
|
137
|
-
[
|
|
126
|
+
}, se = "embeddedCss", Ni = ["css"], Oi = ["css", "less", "scss"], xi = $(se), Re = M(se), Ce = D(se), Ii = N(se), Pi = {
|
|
127
|
+
[xi]: {
|
|
138
128
|
category: "Embed",
|
|
139
129
|
type: "string",
|
|
140
130
|
array: !0,
|
|
141
|
-
default: [{ value: [...
|
|
131
|
+
default: [{ value: [...Ni] }],
|
|
142
132
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language.",
|
|
143
|
-
deprecated: `Please use \`${
|
|
133
|
+
deprecated: `Please use \`${Re}\` or \`${Ce}\`.`
|
|
144
134
|
},
|
|
145
|
-
[
|
|
135
|
+
[Re]: {
|
|
146
136
|
category: "Embed",
|
|
147
137
|
type: "string",
|
|
148
138
|
array: !0,
|
|
149
139
|
default: [{ value: [] }],
|
|
150
140
|
description: "Block comments that make their subsequent template literals be identified as embedded CSS language."
|
|
151
141
|
},
|
|
152
|
-
[
|
|
142
|
+
[Ce]: {
|
|
153
143
|
category: "Embed",
|
|
154
144
|
type: "string",
|
|
155
145
|
array: !0,
|
|
156
146
|
default: [{ value: [] }],
|
|
157
147
|
description: "Tags that make their subsequent template literals be identified as embedded CSS language."
|
|
158
148
|
},
|
|
159
|
-
[
|
|
149
|
+
[Ii]: {
|
|
160
150
|
category: "Embed",
|
|
161
151
|
type: "choice",
|
|
162
152
|
default: "scss",
|
|
163
153
|
description: "The parser used to parse the embedded CSS language.",
|
|
164
|
-
choices:
|
|
154
|
+
choices: Oi.map((e) => ({
|
|
165
155
|
value: e,
|
|
166
156
|
description: `Use the "${e}" parser.`
|
|
167
157
|
}))
|
|
168
158
|
}
|
|
169
|
-
},
|
|
159
|
+
}, Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
170
160
|
__proto__: null,
|
|
171
|
-
embedder:
|
|
172
|
-
language:
|
|
173
|
-
options:
|
|
174
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
161
|
+
embedder: Gi,
|
|
162
|
+
language: se,
|
|
163
|
+
options: Pi
|
|
164
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: we, group: I, indent: Fe, softline: We } = T, qi = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
175
165
|
const s = {
|
|
176
166
|
...r,
|
|
177
167
|
...a
|
|
@@ -185,21 +175,21 @@ const { line: je, group: O, indent: Ue, softline: Re } = M, Ni = async (e, t, n,
|
|
|
185
175
|
parser: s.embeddedEsParser ?? "babel"
|
|
186
176
|
}), o = A(_, E, b);
|
|
187
177
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
188
|
-
return
|
|
178
|
+
return I([
|
|
189
179
|
"`",
|
|
190
180
|
c,
|
|
191
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
181
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [I(o)] : Fe([I(o)]),
|
|
192
182
|
p,
|
|
193
183
|
"`"
|
|
194
184
|
]);
|
|
195
|
-
const h = c.length ?
|
|
196
|
-
return
|
|
185
|
+
const h = c.length ? we : We, v = p.length ? we : We;
|
|
186
|
+
return I([
|
|
197
187
|
"`",
|
|
198
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
199
|
-
|
|
188
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, I(o)] : Fe([h, I(o)]),
|
|
189
|
+
v,
|
|
200
190
|
"`"
|
|
201
191
|
]);
|
|
202
|
-
},
|
|
192
|
+
}, re = "embeddedEs", ji = [
|
|
203
193
|
"js",
|
|
204
194
|
"jsx",
|
|
205
195
|
"es",
|
|
@@ -208,53 +198,52 @@ const { line: je, group: O, indent: Ue, softline: Re } = M, Ni = async (e, t, n,
|
|
|
208
198
|
"cjs",
|
|
209
199
|
"pac",
|
|
210
200
|
"javascript"
|
|
211
|
-
],
|
|
201
|
+
], Ui = [
|
|
212
202
|
"babel",
|
|
213
203
|
"babel-flow",
|
|
214
204
|
"acorn",
|
|
215
205
|
"espree",
|
|
216
206
|
"flow",
|
|
217
207
|
"meriyah"
|
|
218
|
-
],
|
|
219
|
-
[
|
|
208
|
+
], Ri = $(re), ze = M(re), Ke = D(re), Ci = N(re), wi = {
|
|
209
|
+
[Ri]: {
|
|
220
210
|
category: "Embed",
|
|
221
211
|
type: "string",
|
|
222
212
|
array: !0,
|
|
223
|
-
default: [{ value: [...
|
|
213
|
+
default: [{ value: [...ji] }],
|
|
224
214
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language.",
|
|
225
|
-
deprecated: `Please use \`${
|
|
215
|
+
deprecated: `Please use \`${ze}\` or \`${Ke}\`.`
|
|
226
216
|
},
|
|
227
|
-
[
|
|
217
|
+
[ze]: {
|
|
228
218
|
category: "Embed",
|
|
229
219
|
type: "string",
|
|
230
220
|
array: !0,
|
|
231
221
|
default: [{ value: [] }],
|
|
232
222
|
description: "Block comments that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
|
|
233
223
|
},
|
|
234
|
-
[
|
|
224
|
+
[Ke]: {
|
|
235
225
|
category: "Embed",
|
|
236
226
|
type: "string",
|
|
237
227
|
array: !0,
|
|
238
228
|
default: [{ value: [] }],
|
|
239
229
|
description: "Tags that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
|
|
240
230
|
},
|
|
241
|
-
[
|
|
231
|
+
[Ci]: {
|
|
242
232
|
category: "Embed",
|
|
243
233
|
type: "choice",
|
|
244
234
|
default: "babel",
|
|
245
235
|
description: "The parser used to parse the embedded ECMASCript/JavaScript language.",
|
|
246
|
-
choices:
|
|
236
|
+
choices: Ui.map((e) => ({
|
|
247
237
|
value: e,
|
|
248
238
|
description: `Use the "${e}" parser.`
|
|
249
239
|
}))
|
|
250
240
|
}
|
|
251
|
-
},
|
|
241
|
+
}, Fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
252
242
|
__proto__: null,
|
|
253
|
-
embedder:
|
|
254
|
-
language:
|
|
255
|
-
options:
|
|
256
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
257
|
-
N("prettier-plugin-glsl", r, i);
|
|
243
|
+
embedder: qi,
|
|
244
|
+
language: re,
|
|
245
|
+
options: wi
|
|
246
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Je, group: P, indent: He, softline: Xe } = T, Wi = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
258
247
|
const s = {
|
|
259
248
|
...r,
|
|
260
249
|
...a
|
|
@@ -268,49 +257,49 @@ const { line: je, group: O, indent: Ue, softline: Re } = M, Ni = async (e, t, n,
|
|
|
268
257
|
parser: "glsl-parser"
|
|
269
258
|
}), o = A(_, E, b);
|
|
270
259
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
271
|
-
return
|
|
260
|
+
return P([
|
|
272
261
|
"`",
|
|
273
262
|
c,
|
|
274
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
263
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [P(o)] : He([P(o)]),
|
|
275
264
|
p,
|
|
276
265
|
"`"
|
|
277
266
|
]);
|
|
278
|
-
const h = c.length ?
|
|
279
|
-
return
|
|
267
|
+
const h = c.length ? Je : Xe, v = p.length ? Je : Xe;
|
|
268
|
+
return P([
|
|
280
269
|
"`",
|
|
281
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
282
|
-
|
|
270
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, P(o)] : He([h, P(o)]),
|
|
271
|
+
v,
|
|
283
272
|
"`"
|
|
284
273
|
]);
|
|
285
|
-
},
|
|
286
|
-
[
|
|
274
|
+
}, Ee = "embeddedGlsl", zi = ["glsl", "shader"], Ki = $(Ee), Qe = M(Ee), Ye = D(Ee), Ji = {
|
|
275
|
+
[Ki]: {
|
|
287
276
|
category: "Embed",
|
|
288
277
|
type: "string",
|
|
289
278
|
array: !0,
|
|
290
|
-
default: [{ value: [...
|
|
279
|
+
default: [{ value: [...zi] }],
|
|
291
280
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin.",
|
|
292
|
-
deprecated: `Please use \`${
|
|
281
|
+
deprecated: `Please use \`${Qe}\` or \`${Ye}\`.`
|
|
293
282
|
},
|
|
294
|
-
[
|
|
283
|
+
[Qe]: {
|
|
295
284
|
category: "Embed",
|
|
296
285
|
type: "string",
|
|
297
286
|
array: !0,
|
|
298
287
|
default: [{ value: [] }],
|
|
299
288
|
description: "Block comments that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
|
|
300
289
|
},
|
|
301
|
-
[
|
|
290
|
+
[Ye]: {
|
|
302
291
|
category: "Embed",
|
|
303
292
|
type: "string",
|
|
304
293
|
array: !0,
|
|
305
294
|
default: [{ value: [] }],
|
|
306
295
|
description: "Tags that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
|
|
307
296
|
}
|
|
308
|
-
},
|
|
297
|
+
}, Hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
309
298
|
__proto__: null,
|
|
310
|
-
embedder:
|
|
311
|
-
language:
|
|
312
|
-
options:
|
|
313
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
299
|
+
embedder: Wi,
|
|
300
|
+
language: Ee,
|
|
301
|
+
options: Ji
|
|
302
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Ve, group: B, indent: Ze, softline: et } = T, Xi = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
314
303
|
const s = {
|
|
315
304
|
...r,
|
|
316
305
|
...a
|
|
@@ -324,49 +313,49 @@ const { line: je, group: O, indent: Ue, softline: Re } = M, Ni = async (e, t, n,
|
|
|
324
313
|
parser: "graphql"
|
|
325
314
|
}), o = A(_, E, b);
|
|
326
315
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
327
|
-
return
|
|
316
|
+
return B([
|
|
328
317
|
"`",
|
|
329
318
|
c,
|
|
330
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
319
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [B(o)] : Ze([B(o)]),
|
|
331
320
|
p,
|
|
332
321
|
"`"
|
|
333
322
|
]);
|
|
334
|
-
const h = c.length ?
|
|
335
|
-
return
|
|
323
|
+
const h = c.length ? Ve : et, v = p.length ? Ve : et;
|
|
324
|
+
return B([
|
|
336
325
|
"`",
|
|
337
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
338
|
-
|
|
326
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, B(o)] : Ze([h, B(o)]),
|
|
327
|
+
v,
|
|
339
328
|
"`"
|
|
340
329
|
]);
|
|
341
|
-
},
|
|
342
|
-
[
|
|
330
|
+
}, be = "embeddedGraphql", Qi = ["graphql", "gql"], Yi = $(be), tt = M(be), nt = D(be), Vi = {
|
|
331
|
+
[Yi]: {
|
|
343
332
|
category: "Embed",
|
|
344
333
|
type: "string",
|
|
345
334
|
array: !0,
|
|
346
|
-
default: [{ value: [...
|
|
335
|
+
default: [{ value: [...Qi] }],
|
|
347
336
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language.",
|
|
348
|
-
deprecated: `Please use \`${
|
|
337
|
+
deprecated: `Please use \`${tt}\` or \`${nt}\`.`
|
|
349
338
|
},
|
|
350
|
-
[
|
|
339
|
+
[tt]: {
|
|
351
340
|
category: "Embed",
|
|
352
341
|
type: "string",
|
|
353
342
|
array: !0,
|
|
354
343
|
default: [{ value: [] }],
|
|
355
344
|
description: "Block comments that make their subsequent template literals be identified as embedded GraphQL language."
|
|
356
345
|
},
|
|
357
|
-
[
|
|
346
|
+
[nt]: {
|
|
358
347
|
category: "Embed",
|
|
359
348
|
type: "string",
|
|
360
349
|
array: !0,
|
|
361
350
|
default: [{ value: [] }],
|
|
362
351
|
description: "Tags that make their subsequent template literals be identified as embedded GraphQL language."
|
|
363
352
|
}
|
|
364
|
-
},
|
|
353
|
+
}, Zi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
365
354
|
__proto__: null,
|
|
366
|
-
embedder:
|
|
367
|
-
language:
|
|
368
|
-
options:
|
|
369
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
355
|
+
embedder: Xi,
|
|
356
|
+
language: be,
|
|
357
|
+
options: Vi
|
|
358
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: it, group: q, indent: st, softline: rt } = T, { mapDoc: es } = ii, ts = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
370
359
|
const s = {
|
|
371
360
|
...r,
|
|
372
361
|
...a
|
|
@@ -378,7 +367,7 @@ const { line: je, group: O, indent: Ue, softline: Re } = M, Ni = async (e, t, n,
|
|
|
378
367
|
), b = S(n, t), _ = await e(f, {
|
|
379
368
|
...s,
|
|
380
369
|
parser: s.embeddedHtmlParser ?? "html"
|
|
381
|
-
}), o =
|
|
370
|
+
}), o = es(_, (m) => {
|
|
382
371
|
if (typeof m != "string")
|
|
383
372
|
return m;
|
|
384
373
|
const g = [], y = m.split(E);
|
|
@@ -389,68 +378,67 @@ const { line: je, group: O, indent: Ue, softline: Re } = M, Ni = async (e, t, n,
|
|
|
389
378
|
continue;
|
|
390
379
|
G = G.replaceAll(/([\\`]|\${)/g, "\\$1"), s.__embeddedInHtml && (G = G.replaceAll(/<\/(?=script\b)/gi, "<\\/")), g.push(G);
|
|
391
380
|
} else {
|
|
392
|
-
const
|
|
393
|
-
g.push(b[
|
|
381
|
+
const O = Number(G);
|
|
382
|
+
g.push(b[O]);
|
|
394
383
|
}
|
|
395
384
|
}
|
|
396
385
|
return g;
|
|
397
386
|
});
|
|
398
387
|
if (s.htmlWhitespaceSensitivity === "strict" || // TODO: is css mode should be included here?
|
|
399
388
|
s.htmlWhitespaceSensitivity === "css" || s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
400
|
-
return
|
|
389
|
+
return q([
|
|
401
390
|
"`",
|
|
402
391
|
c,
|
|
403
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
392
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [q(o)] : st([q(o)]),
|
|
404
393
|
p,
|
|
405
394
|
"`"
|
|
406
395
|
]);
|
|
407
|
-
const h = c.length ?
|
|
408
|
-
return
|
|
396
|
+
const h = c.length ? it : rt, v = p.length ? it : rt;
|
|
397
|
+
return q([
|
|
409
398
|
"`",
|
|
410
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
411
|
-
|
|
399
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, q(o)] : st([h, q(o)]),
|
|
400
|
+
v,
|
|
412
401
|
"`"
|
|
413
402
|
]);
|
|
414
|
-
},
|
|
415
|
-
[
|
|
403
|
+
}, oe = "embeddedHtml", ns = ["html", "xhtml"], is = ["html", "vue", "angular", "lwc"], ss = $(oe), ot = M(oe), at = D(oe), rs = N(oe), os = {
|
|
404
|
+
[ss]: {
|
|
416
405
|
category: "Embed",
|
|
417
406
|
type: "string",
|
|
418
407
|
array: !0,
|
|
419
|
-
default: [{ value: [...
|
|
408
|
+
default: [{ value: [...ns] }],
|
|
420
409
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language.",
|
|
421
|
-
deprecated: `Please use \`${
|
|
410
|
+
deprecated: `Please use \`${ot}\` or \`${at}\`.`
|
|
422
411
|
},
|
|
423
|
-
[
|
|
412
|
+
[ot]: {
|
|
424
413
|
category: "Embed",
|
|
425
414
|
type: "string",
|
|
426
415
|
array: !0,
|
|
427
416
|
default: [{ value: [] }],
|
|
428
417
|
description: "Block comments that make their subsequent template literals be identified as embedded HTML language."
|
|
429
418
|
},
|
|
430
|
-
[
|
|
419
|
+
[at]: {
|
|
431
420
|
category: "Embed",
|
|
432
421
|
type: "string",
|
|
433
422
|
array: !0,
|
|
434
423
|
default: [{ value: [] }],
|
|
435
424
|
description: "Tags that make their subsequent template literals be identified as embedded HTML language."
|
|
436
425
|
},
|
|
437
|
-
[
|
|
426
|
+
[rs]: {
|
|
438
427
|
category: "Embed",
|
|
439
428
|
type: "choice",
|
|
440
429
|
default: "html",
|
|
441
430
|
description: "The parser used to parse the embedded HTML language.",
|
|
442
|
-
choices:
|
|
431
|
+
choices: is.map((e) => ({
|
|
443
432
|
value: e,
|
|
444
433
|
description: `Use the "${e}" parser.`
|
|
445
434
|
}))
|
|
446
435
|
}
|
|
447
|
-
},
|
|
436
|
+
}, as = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
448
437
|
__proto__: null,
|
|
449
|
-
embedder:
|
|
450
|
-
language:
|
|
451
|
-
options:
|
|
452
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
453
|
-
N("prettier-plugin-ini", r, i);
|
|
438
|
+
embedder: ts,
|
|
439
|
+
language: oe,
|
|
440
|
+
options: os
|
|
441
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: dt, group: j, indent: lt, softline: ct } = T, ds = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
454
442
|
const s = {
|
|
455
443
|
...r,
|
|
456
444
|
...a
|
|
@@ -464,50 +452,49 @@ const { line: je, group: O, indent: Ue, softline: Re } = M, Ni = async (e, t, n,
|
|
|
464
452
|
parser: "ini"
|
|
465
453
|
}), o = A(_, E, b);
|
|
466
454
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
467
|
-
return
|
|
455
|
+
return j([
|
|
468
456
|
"`",
|
|
469
457
|
c,
|
|
470
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
458
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [j(o)] : lt([j(o)]),
|
|
471
459
|
p,
|
|
472
460
|
"`"
|
|
473
461
|
]);
|
|
474
|
-
const h = c.length ?
|
|
475
|
-
return
|
|
462
|
+
const h = c.length ? dt : ct, v = p.length ? dt : ct;
|
|
463
|
+
return j([
|
|
476
464
|
"`",
|
|
477
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
478
|
-
|
|
465
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, j(o)] : lt([h, j(o)]),
|
|
466
|
+
v,
|
|
479
467
|
"`"
|
|
480
468
|
]);
|
|
481
|
-
},
|
|
482
|
-
[
|
|
469
|
+
}, fe = "embeddedIni", ls = ["ini", "cfg", "pro"], cs = $(fe), ut = M(fe), pt = D(fe), us = {
|
|
470
|
+
[cs]: {
|
|
483
471
|
category: "Embed",
|
|
484
472
|
type: "string",
|
|
485
473
|
array: !0,
|
|
486
|
-
default: [{ value: [...
|
|
474
|
+
default: [{ value: [...ls] }],
|
|
487
475
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin.",
|
|
488
|
-
deprecated: `Please use \`${
|
|
476
|
+
deprecated: `Please use \`${ut}\` or \`${pt}\`.`
|
|
489
477
|
},
|
|
490
|
-
[
|
|
478
|
+
[ut]: {
|
|
491
479
|
category: "Embed",
|
|
492
480
|
type: "string",
|
|
493
481
|
array: !0,
|
|
494
482
|
default: [{ value: [] }],
|
|
495
483
|
description: "Block comments that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
|
|
496
484
|
},
|
|
497
|
-
[
|
|
485
|
+
[pt]: {
|
|
498
486
|
category: "Embed",
|
|
499
487
|
type: "string",
|
|
500
488
|
array: !0,
|
|
501
489
|
default: [{ value: [] }],
|
|
502
490
|
description: "Tags that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
|
|
503
491
|
}
|
|
504
|
-
},
|
|
492
|
+
}, ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
505
493
|
__proto__: null,
|
|
506
|
-
embedder:
|
|
507
|
-
language:
|
|
508
|
-
options:
|
|
509
|
-
}, Symbol.toStringTag, { value: "Module" })), { group:
|
|
510
|
-
N("prettier-plugin-java", r, i);
|
|
494
|
+
embedder: ds,
|
|
495
|
+
language: fe,
|
|
496
|
+
options: us
|
|
497
|
+
}, Symbol.toStringTag, { value: "Module" })), { group: U, line: gt, softline: mt, indent: ht } = T, gs = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
511
498
|
const s = {
|
|
512
499
|
...r,
|
|
513
500
|
...a
|
|
@@ -526,53 +513,53 @@ const { line: je, group: O, indent: Ue, softline: Re } = M, Ni = async (e, t, n,
|
|
|
526
513
|
!0
|
|
527
514
|
);
|
|
528
515
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
529
|
-
return
|
|
516
|
+
return U([
|
|
530
517
|
"`",
|
|
531
518
|
c,
|
|
532
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
519
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [U(o)] : ht([U(o)]),
|
|
533
520
|
p,
|
|
534
521
|
"`"
|
|
535
522
|
]);
|
|
536
|
-
const h = c.length ?
|
|
537
|
-
return
|
|
523
|
+
const h = c.length ? gt : mt, v = p.length ? gt : mt;
|
|
524
|
+
return U([
|
|
538
525
|
"`",
|
|
539
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
540
|
-
|
|
526
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, U(o)] : ht([h, U(o)]),
|
|
527
|
+
v,
|
|
541
528
|
"`"
|
|
542
529
|
]);
|
|
543
|
-
},
|
|
544
|
-
[
|
|
530
|
+
}, ye = "embeddedJava", ms = ["java"], hs = $(ye), Et = M(ye), bt = D(ye), Es = {
|
|
531
|
+
[hs]: {
|
|
545
532
|
category: "Embed",
|
|
546
533
|
type: "string",
|
|
547
534
|
array: !0,
|
|
548
|
-
default: [{ value: [...
|
|
535
|
+
default: [{ value: [...ms] }],
|
|
549
536
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin.",
|
|
550
|
-
deprecated: `Please use \`${
|
|
537
|
+
deprecated: `Please use \`${Et}\` or \`${bt}\`.`
|
|
551
538
|
},
|
|
552
|
-
[
|
|
539
|
+
[Et]: {
|
|
553
540
|
category: "Embed",
|
|
554
541
|
type: "string",
|
|
555
542
|
array: !0,
|
|
556
543
|
default: [{ value: [] }],
|
|
557
544
|
description: "Block comments that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
|
|
558
545
|
},
|
|
559
|
-
[
|
|
546
|
+
[bt]: {
|
|
560
547
|
category: "Embed",
|
|
561
548
|
type: "string",
|
|
562
549
|
array: !0,
|
|
563
550
|
default: [{ value: [] }],
|
|
564
551
|
description: "Tags that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
|
|
565
552
|
}
|
|
566
|
-
},
|
|
553
|
+
}, bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
567
554
|
__proto__: null,
|
|
568
|
-
embedder:
|
|
569
|
-
language:
|
|
570
|
-
options:
|
|
571
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
555
|
+
embedder: gs,
|
|
556
|
+
language: ye,
|
|
557
|
+
options: Es
|
|
558
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: ft, group: R, indent: yt, softline: _t } = T, fs = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
572
559
|
const s = {
|
|
573
560
|
...r,
|
|
574
561
|
...a
|
|
575
|
-
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } =
|
|
562
|
+
}, { node: l } = n, { createPlaceholder: u, placeholderRegex: E } = ys(), d = l.quasis.map(
|
|
576
563
|
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + u(g)
|
|
577
564
|
).join(""), c = d.match(/^\s+/)?.[0] ?? "", p = d.match(/\s+$/)?.[0] ?? "", f = d.slice(
|
|
578
565
|
c.length,
|
|
@@ -582,23 +569,23 @@ const { line: je, group: O, indent: Ue, softline: Re } = M, Ni = async (e, t, n,
|
|
|
582
569
|
parser: s.embeddedJsonParser ?? "json"
|
|
583
570
|
}), o = A(_, E, b);
|
|
584
571
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
585
|
-
return
|
|
572
|
+
return R([
|
|
586
573
|
"`",
|
|
587
574
|
c,
|
|
588
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
575
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [R(o)] : yt([R(o)]),
|
|
589
576
|
p,
|
|
590
577
|
"`"
|
|
591
578
|
]);
|
|
592
|
-
const h = c.length ?
|
|
593
|
-
return
|
|
579
|
+
const h = c.length ? ft : _t, v = p.length ? ft : _t;
|
|
580
|
+
return R([
|
|
594
581
|
"`",
|
|
595
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
596
|
-
|
|
582
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, R(o)] : yt([h, R(o)]),
|
|
583
|
+
v,
|
|
597
584
|
"`"
|
|
598
585
|
]);
|
|
599
586
|
};
|
|
600
|
-
function
|
|
601
|
-
const e =
|
|
587
|
+
function ys() {
|
|
588
|
+
const e = me(), t = me(), n = (i) => `'0${e}${i}${t}'`, r = new RegExp(
|
|
602
589
|
`["']?0${e}(\\d+)${t}['"]?`,
|
|
603
590
|
"ig"
|
|
604
591
|
);
|
|
@@ -607,14 +594,14 @@ function _s() {
|
|
|
607
594
|
placeholderRegex: r
|
|
608
595
|
};
|
|
609
596
|
}
|
|
610
|
-
const
|
|
611
|
-
[
|
|
597
|
+
const ae = "embeddedJson", _s = ["json", "jsonl"], vs = ["json", "json5", "jsonc", "json-stringify"], $s = $(ae), vt = M(ae), $t = D(ae), Ds = N(ae), Ts = {
|
|
598
|
+
[$s]: {
|
|
612
599
|
category: "Embed",
|
|
613
600
|
type: "string",
|
|
614
601
|
array: !0,
|
|
615
|
-
default: [{ value: [
|
|
602
|
+
default: [{ value: [..._s] }],
|
|
616
603
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language.",
|
|
617
|
-
deprecated: `Please use \`${vt}\` or \`${
|
|
604
|
+
deprecated: `Please use \`${vt}\` or \`${$t}\`.`
|
|
618
605
|
},
|
|
619
606
|
[vt]: {
|
|
620
607
|
category: "Embed",
|
|
@@ -623,14 +610,14 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
623
610
|
default: [{ value: [] }],
|
|
624
611
|
description: "Block comments that make their subsequent template literals be identified as embedded JSON language."
|
|
625
612
|
},
|
|
626
|
-
[
|
|
613
|
+
[$t]: {
|
|
627
614
|
category: "Embed",
|
|
628
615
|
type: "string",
|
|
629
616
|
array: !0,
|
|
630
617
|
default: [{ value: [] }],
|
|
631
618
|
description: "Tags that make their subsequent template literals be identified as embedded JSON language."
|
|
632
619
|
},
|
|
633
|
-
[
|
|
620
|
+
[Ds]: {
|
|
634
621
|
category: "Embed",
|
|
635
622
|
type: "choice",
|
|
636
623
|
default: "json",
|
|
@@ -640,17 +627,12 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
640
627
|
description: `Use the "${e}" parser.`
|
|
641
628
|
}))
|
|
642
629
|
}
|
|
643
|
-
},
|
|
630
|
+
}, Ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
644
631
|
__proto__: null,
|
|
645
|
-
embedder:
|
|
646
|
-
language:
|
|
632
|
+
embedder: fs,
|
|
633
|
+
language: ae,
|
|
647
634
|
options: Ts
|
|
648
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
649
|
-
N(
|
|
650
|
-
"@stedi/prettier-plugin-jsonata",
|
|
651
|
-
r,
|
|
652
|
-
i
|
|
653
|
-
);
|
|
635
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Dt, group: C, indent: Tt, softline: Mt } = T, As = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
654
636
|
const s = {
|
|
655
637
|
...r,
|
|
656
638
|
...a
|
|
@@ -664,50 +646,49 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
664
646
|
parser: "JSONata"
|
|
665
647
|
}), o = A(_, E, b);
|
|
666
648
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
667
|
-
return
|
|
649
|
+
return C([
|
|
668
650
|
"`",
|
|
669
651
|
c,
|
|
670
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
652
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [C(o)] : Tt([C(o)]),
|
|
671
653
|
p,
|
|
672
654
|
"`"
|
|
673
655
|
]);
|
|
674
|
-
const h = c.length ?
|
|
675
|
-
return
|
|
656
|
+
const h = c.length ? Dt : Mt, v = p.length ? Dt : Mt;
|
|
657
|
+
return C([
|
|
676
658
|
"`",
|
|
677
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
678
|
-
|
|
659
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, C(o)] : Tt([h, C(o)]),
|
|
660
|
+
v,
|
|
679
661
|
"`"
|
|
680
662
|
]);
|
|
681
|
-
},
|
|
682
|
-
[
|
|
663
|
+
}, _e = "embeddedJsonata", Ss = ["jsonata"], Ls = $(_e), At = M(_e), St = D(_e), ks = {
|
|
664
|
+
[Ls]: {
|
|
683
665
|
category: "Embed",
|
|
684
666
|
type: "string",
|
|
685
667
|
array: !0,
|
|
686
|
-
default: [{ value: [...
|
|
668
|
+
default: [{ value: [...Ss] }],
|
|
687
669
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin.",
|
|
688
|
-
deprecated: `Please use \`${
|
|
670
|
+
deprecated: `Please use \`${At}\` or \`${St}\`.`
|
|
689
671
|
},
|
|
690
|
-
[
|
|
672
|
+
[At]: {
|
|
691
673
|
category: "Embed",
|
|
692
674
|
type: "string",
|
|
693
675
|
array: !0,
|
|
694
676
|
default: [{ value: [] }],
|
|
695
677
|
description: "Block comments that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
|
|
696
678
|
},
|
|
697
|
-
[
|
|
679
|
+
[St]: {
|
|
698
680
|
category: "Embed",
|
|
699
681
|
type: "string",
|
|
700
682
|
array: !0,
|
|
701
683
|
default: [{ value: [] }],
|
|
702
684
|
description: "Tags that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
|
|
703
685
|
}
|
|
704
|
-
},
|
|
686
|
+
}, Gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
705
687
|
__proto__: null,
|
|
706
|
-
embedder:
|
|
707
|
-
language:
|
|
708
|
-
options:
|
|
709
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
710
|
-
N("prettier-plugin-latex", r, i);
|
|
688
|
+
embedder: As,
|
|
689
|
+
language: _e,
|
|
690
|
+
options: ks
|
|
691
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Lt, group: w, indent: kt, softline: Gt } = T, Ns = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
711
692
|
const s = {
|
|
712
693
|
...r,
|
|
713
694
|
...a
|
|
@@ -721,21 +702,21 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
721
702
|
parser: "latex-parser"
|
|
722
703
|
}), o = A(_, E, b);
|
|
723
704
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
724
|
-
return
|
|
705
|
+
return w([
|
|
725
706
|
"`",
|
|
726
707
|
c,
|
|
727
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
708
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [w(o)] : kt([w(o)]),
|
|
728
709
|
p,
|
|
729
710
|
"`"
|
|
730
711
|
]);
|
|
731
|
-
const h = c.length ?
|
|
732
|
-
return
|
|
712
|
+
const h = c.length ? Lt : Gt, v = p.length ? Lt : Gt;
|
|
713
|
+
return w([
|
|
733
714
|
"`",
|
|
734
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
735
|
-
|
|
715
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, w(o)] : kt([h, w(o)]),
|
|
716
|
+
v,
|
|
736
717
|
"`"
|
|
737
718
|
]);
|
|
738
|
-
}, ve = "embeddedLatex",
|
|
719
|
+
}, ve = "embeddedLatex", Os = [
|
|
739
720
|
"latex",
|
|
740
721
|
"tex",
|
|
741
722
|
"aux",
|
|
@@ -744,35 +725,35 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
744
725
|
"bib",
|
|
745
726
|
"toc",
|
|
746
727
|
"sty"
|
|
747
|
-
],
|
|
748
|
-
[
|
|
728
|
+
], xs = $(ve), Nt = M(ve), Ot = D(ve), Is = {
|
|
729
|
+
[xs]: {
|
|
749
730
|
category: "Embed",
|
|
750
731
|
type: "string",
|
|
751
732
|
array: !0,
|
|
752
|
-
default: [{ value: [...
|
|
733
|
+
default: [{ value: [...Os] }],
|
|
753
734
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin.",
|
|
754
|
-
deprecated: `Please use \`${
|
|
735
|
+
deprecated: `Please use \`${Nt}\` or \`${Ot}\`.`
|
|
755
736
|
},
|
|
756
|
-
[
|
|
737
|
+
[Nt]: {
|
|
757
738
|
category: "Embed",
|
|
758
739
|
type: "string",
|
|
759
740
|
array: !0,
|
|
760
741
|
default: [{ value: [] }],
|
|
761
742
|
description: "Block comments that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
|
|
762
743
|
},
|
|
763
|
-
[
|
|
744
|
+
[Ot]: {
|
|
764
745
|
category: "Embed",
|
|
765
746
|
type: "string",
|
|
766
747
|
array: !0,
|
|
767
748
|
default: [{ value: [] }],
|
|
768
749
|
description: "Tags that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
|
|
769
750
|
}
|
|
770
|
-
},
|
|
751
|
+
}, Ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
771
752
|
__proto__: null,
|
|
772
|
-
embedder:
|
|
753
|
+
embedder: Ns,
|
|
773
754
|
language: ve,
|
|
774
|
-
options:
|
|
775
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
755
|
+
options: Is
|
|
756
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: xt, group: F, indent: It, softline: Pt } = T, Bs = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
776
757
|
const s = {
|
|
777
758
|
...r,
|
|
778
759
|
...a
|
|
@@ -787,60 +768,59 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
787
768
|
__inJsTemplate: !0
|
|
788
769
|
}), o = A(_, E, b);
|
|
789
770
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
790
|
-
return
|
|
771
|
+
return F([
|
|
791
772
|
"`",
|
|
792
773
|
c,
|
|
793
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
774
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [F(o)] : It([F(o)]),
|
|
794
775
|
p,
|
|
795
776
|
"`"
|
|
796
777
|
]);
|
|
797
|
-
const h = c.length ?
|
|
798
|
-
return
|
|
778
|
+
const h = c.length ? xt : Pt, v = p.length ? xt : Pt;
|
|
779
|
+
return F([
|
|
799
780
|
"`",
|
|
800
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
801
|
-
|
|
781
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, F(o)] : It([h, F(o)]),
|
|
782
|
+
v,
|
|
802
783
|
"`"
|
|
803
784
|
]);
|
|
804
|
-
},
|
|
805
|
-
[
|
|
785
|
+
}, de = "embeddedMarkdown", qs = ["md", "markdown"], js = ["markdown", "mdx", "remark"], Us = $(de), Bt = M(de), qt = D(de), Rs = N(de), Cs = {
|
|
786
|
+
[Us]: {
|
|
806
787
|
category: "Embed",
|
|
807
788
|
type: "string",
|
|
808
789
|
array: !0,
|
|
809
|
-
default: [{ value: [...
|
|
790
|
+
default: [{ value: [...qs] }],
|
|
810
791
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Markdown language.",
|
|
811
|
-
deprecated: `Please use \`${
|
|
792
|
+
deprecated: `Please use \`${Bt}\` or \`${qt}\`.`
|
|
812
793
|
},
|
|
813
|
-
[
|
|
794
|
+
[Bt]: {
|
|
814
795
|
category: "Embed",
|
|
815
796
|
type: "string",
|
|
816
797
|
array: !0,
|
|
817
798
|
default: [{ value: [] }],
|
|
818
799
|
description: "Block comments that make their subsequent template literals be identified as embedded Markdown language."
|
|
819
800
|
},
|
|
820
|
-
[
|
|
801
|
+
[qt]: {
|
|
821
802
|
category: "Embed",
|
|
822
803
|
type: "string",
|
|
823
804
|
array: !0,
|
|
824
805
|
default: [{ value: [] }],
|
|
825
806
|
description: "Tags that make their subsequent template literals be identified as embedded Markdown language."
|
|
826
807
|
},
|
|
827
|
-
[
|
|
808
|
+
[Rs]: {
|
|
828
809
|
category: "Embed",
|
|
829
810
|
type: "choice",
|
|
830
811
|
default: "markdown",
|
|
831
812
|
description: "The parser used to parse the embedded Markdown language.",
|
|
832
|
-
choices:
|
|
813
|
+
choices: js.map((e) => ({
|
|
833
814
|
value: e,
|
|
834
815
|
description: `Use the "${e}" parser.`
|
|
835
816
|
}))
|
|
836
817
|
}
|
|
837
|
-
},
|
|
818
|
+
}, ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
838
819
|
__proto__: null,
|
|
839
|
-
embedder:
|
|
840
|
-
language:
|
|
841
|
-
options:
|
|
842
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
843
|
-
N("prettier-plugin-nginx", r, i);
|
|
820
|
+
embedder: Bs,
|
|
821
|
+
language: de,
|
|
822
|
+
options: Cs
|
|
823
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: jt, group: W, indent: Ut, softline: Rt } = T, Fs = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
844
824
|
const s = {
|
|
845
825
|
...r,
|
|
846
826
|
...a
|
|
@@ -854,77 +834,76 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
854
834
|
parser: "nginx"
|
|
855
835
|
}), o = A(_, E, b);
|
|
856
836
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
857
|
-
return
|
|
837
|
+
return W([
|
|
858
838
|
"`",
|
|
859
839
|
c,
|
|
860
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
840
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [W(o)] : Ut([W(o)]),
|
|
861
841
|
p,
|
|
862
842
|
"`"
|
|
863
843
|
]);
|
|
864
|
-
const h = c.length ?
|
|
865
|
-
return
|
|
844
|
+
const h = c.length ? jt : Rt, v = p.length ? jt : Rt;
|
|
845
|
+
return W([
|
|
866
846
|
"`",
|
|
867
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
868
|
-
|
|
847
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, W(o)] : Ut([h, W(o)]),
|
|
848
|
+
v,
|
|
869
849
|
"`"
|
|
870
850
|
]);
|
|
871
|
-
},
|
|
872
|
-
[
|
|
851
|
+
}, $e = "embeddedNginx", Ws = ["nginx"], zs = $($e), Ct = M($e), wt = D($e), Ks = {
|
|
852
|
+
[zs]: {
|
|
873
853
|
category: "Embed",
|
|
874
854
|
type: "string",
|
|
875
855
|
array: !0,
|
|
876
|
-
default: [{ value: [...
|
|
856
|
+
default: [{ value: [...Ws] }],
|
|
877
857
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin.",
|
|
878
|
-
deprecated: `Please use \`${
|
|
858
|
+
deprecated: `Please use \`${Ct}\` or \`${wt}\`.`
|
|
879
859
|
},
|
|
880
|
-
[
|
|
860
|
+
[Ct]: {
|
|
881
861
|
category: "Embed",
|
|
882
862
|
type: "string",
|
|
883
863
|
array: !0,
|
|
884
864
|
default: [{ value: [] }],
|
|
885
865
|
description: "Block comments that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
|
|
886
866
|
},
|
|
887
|
-
[
|
|
867
|
+
[wt]: {
|
|
888
868
|
category: "Embed",
|
|
889
869
|
type: "string",
|
|
890
870
|
array: !0,
|
|
891
871
|
default: [{ value: [] }],
|
|
892
872
|
description: "Tags that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
|
|
893
873
|
}
|
|
894
|
-
},
|
|
874
|
+
}, Js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
895
875
|
__proto__: null,
|
|
896
|
-
embedder:
|
|
897
|
-
language:
|
|
898
|
-
options:
|
|
899
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
900
|
-
[
|
|
876
|
+
embedder: Fs,
|
|
877
|
+
language: $e,
|
|
878
|
+
options: Ks
|
|
879
|
+
}, Symbol.toStringTag, { value: "Module" })), le = "embeddedNoop", Hs = $(le), Ft = M(le), Wt = D(le), Xs = {
|
|
880
|
+
[Hs]: {
|
|
901
881
|
category: "Embed",
|
|
902
882
|
type: "string",
|
|
903
883
|
array: !0,
|
|
904
884
|
default: [{ value: [] }],
|
|
905
885
|
description: "Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted.",
|
|
906
|
-
deprecated: `Please use \`${
|
|
886
|
+
deprecated: `Please use \`${Ft}\` or \`${Wt}\`.`
|
|
907
887
|
},
|
|
908
|
-
[
|
|
888
|
+
[Ft]: {
|
|
909
889
|
category: "Embed",
|
|
910
890
|
type: "string",
|
|
911
891
|
array: !0,
|
|
912
892
|
default: [{ value: [] }],
|
|
913
893
|
description: "Block comments that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
|
|
914
894
|
},
|
|
915
|
-
[
|
|
895
|
+
[Wt]: {
|
|
916
896
|
category: "Embed",
|
|
917
897
|
type: "string",
|
|
918
898
|
array: !0,
|
|
919
899
|
default: [{ value: [] }],
|
|
920
900
|
description: "Tags that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
|
|
921
901
|
}
|
|
922
|
-
},
|
|
902
|
+
}, Qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
923
903
|
__proto__: null,
|
|
924
|
-
language:
|
|
925
|
-
options:
|
|
926
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
927
|
-
N("prettier-plugin-pegjs", r, i);
|
|
904
|
+
language: le,
|
|
905
|
+
options: Xs
|
|
906
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: zt, group: z, indent: Kt, softline: Jt } = T, Ys = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
928
907
|
const s = {
|
|
929
908
|
...r,
|
|
930
909
|
...a
|
|
@@ -938,50 +917,49 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
938
917
|
parser: "pegjs-parser"
|
|
939
918
|
}), o = A(_, E, b);
|
|
940
919
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
941
|
-
return
|
|
920
|
+
return z([
|
|
942
921
|
"`",
|
|
943
922
|
c,
|
|
944
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
923
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [z(o)] : Kt([z(o)]),
|
|
945
924
|
p,
|
|
946
925
|
"`"
|
|
947
926
|
]);
|
|
948
|
-
const h = c.length ?
|
|
949
|
-
return
|
|
927
|
+
const h = c.length ? zt : Jt, v = p.length ? zt : Jt;
|
|
928
|
+
return z([
|
|
950
929
|
"`",
|
|
951
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
952
|
-
|
|
930
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, z(o)] : Kt([h, z(o)]),
|
|
931
|
+
v,
|
|
953
932
|
"`"
|
|
954
933
|
]);
|
|
955
|
-
},
|
|
956
|
-
[
|
|
934
|
+
}, De = "embeddedPegjs", Vs = ["pegjs", "peggy", "peg"], Zs = $(De), Ht = M(De), Xt = D(De), er = {
|
|
935
|
+
[Zs]: {
|
|
957
936
|
category: "Embed",
|
|
958
937
|
type: "string",
|
|
959
938
|
array: !0,
|
|
960
|
-
default: [{ value: [...
|
|
939
|
+
default: [{ value: [...Vs] }],
|
|
961
940
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin.",
|
|
962
|
-
deprecated: `Please use \`${
|
|
941
|
+
deprecated: `Please use \`${Ht}\` or \`${Xt}\`.`
|
|
963
942
|
},
|
|
964
|
-
[
|
|
943
|
+
[Ht]: {
|
|
965
944
|
category: "Embed",
|
|
966
945
|
type: "string",
|
|
967
946
|
array: !0,
|
|
968
947
|
default: [{ value: [] }],
|
|
969
948
|
description: "Block comments that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
|
|
970
949
|
},
|
|
971
|
-
[
|
|
950
|
+
[Xt]: {
|
|
972
951
|
category: "Embed",
|
|
973
952
|
type: "string",
|
|
974
953
|
array: !0,
|
|
975
954
|
default: [{ value: [] }],
|
|
976
955
|
description: "Tags that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
|
|
977
956
|
}
|
|
978
|
-
},
|
|
957
|
+
}, tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
979
958
|
__proto__: null,
|
|
980
|
-
embedder:
|
|
981
|
-
language:
|
|
982
|
-
options:
|
|
983
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
984
|
-
N("@prettier/plugin-php", r, i);
|
|
959
|
+
embedder: Ys,
|
|
960
|
+
language: De,
|
|
961
|
+
options: er
|
|
962
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Qt, group: K, indent: Yt, softline: Vt } = T, nr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
985
963
|
const s = {
|
|
986
964
|
...r,
|
|
987
965
|
...a
|
|
@@ -995,50 +973,49 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
995
973
|
parser: "php"
|
|
996
974
|
}), o = A(_, E, b);
|
|
997
975
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
998
|
-
return
|
|
976
|
+
return K([
|
|
999
977
|
"`",
|
|
1000
978
|
c,
|
|
1001
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
979
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [K(o)] : Yt([K(o)]),
|
|
1002
980
|
p,
|
|
1003
981
|
"`"
|
|
1004
982
|
]);
|
|
1005
|
-
const h = c.length ?
|
|
1006
|
-
return
|
|
983
|
+
const h = c.length ? Qt : Vt, v = p.length ? Qt : Vt;
|
|
984
|
+
return K([
|
|
1007
985
|
"`",
|
|
1008
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
1009
|
-
|
|
986
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, K(o)] : Yt([h, K(o)]),
|
|
987
|
+
v,
|
|
1010
988
|
"`"
|
|
1011
989
|
]);
|
|
1012
|
-
}, Te = "embeddedPhp",
|
|
1013
|
-
[
|
|
990
|
+
}, Te = "embeddedPhp", ir = ["php", "php5"], sr = $(Te), Zt = M(Te), en = D(Te), rr = {
|
|
991
|
+
[sr]: {
|
|
1014
992
|
category: "Embed",
|
|
1015
993
|
type: "string",
|
|
1016
994
|
array: !0,
|
|
1017
|
-
default: [{ value: [...
|
|
995
|
+
default: [{ value: [...ir] }],
|
|
1018
996
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin.",
|
|
1019
|
-
deprecated: `Please use \`${
|
|
997
|
+
deprecated: `Please use \`${Zt}\` or \`${en}\`.`
|
|
1020
998
|
},
|
|
1021
|
-
[
|
|
999
|
+
[Zt]: {
|
|
1022
1000
|
category: "Embed",
|
|
1023
1001
|
type: "string",
|
|
1024
1002
|
array: !0,
|
|
1025
1003
|
default: [{ value: [] }],
|
|
1026
1004
|
description: "Block comments that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
|
|
1027
1005
|
},
|
|
1028
|
-
[
|
|
1006
|
+
[en]: {
|
|
1029
1007
|
category: "Embed",
|
|
1030
1008
|
type: "string",
|
|
1031
1009
|
array: !0,
|
|
1032
1010
|
default: [{ value: [] }],
|
|
1033
1011
|
description: "Tags that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
|
|
1034
1012
|
}
|
|
1035
|
-
},
|
|
1013
|
+
}, or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1036
1014
|
__proto__: null,
|
|
1037
|
-
embedder:
|
|
1015
|
+
embedder: nr,
|
|
1038
1016
|
language: Te,
|
|
1039
|
-
options:
|
|
1040
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
1041
|
-
N("prettier-plugin-prisma", r, i);
|
|
1017
|
+
options: rr
|
|
1018
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: tn, group: J, indent: nn, softline: sn } = T, ar = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1042
1019
|
const s = {
|
|
1043
1020
|
...r,
|
|
1044
1021
|
...a
|
|
@@ -1052,50 +1029,49 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
1052
1029
|
parser: "prisma-parse"
|
|
1053
1030
|
}), o = A(_, E, b);
|
|
1054
1031
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1055
|
-
return
|
|
1032
|
+
return J([
|
|
1056
1033
|
"`",
|
|
1057
1034
|
c,
|
|
1058
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
1035
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [J(o)] : nn([J(o)]),
|
|
1059
1036
|
p,
|
|
1060
1037
|
"`"
|
|
1061
1038
|
]);
|
|
1062
|
-
const h = c.length ?
|
|
1063
|
-
return
|
|
1039
|
+
const h = c.length ? tn : sn, v = p.length ? tn : sn;
|
|
1040
|
+
return J([
|
|
1064
1041
|
"`",
|
|
1065
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
1066
|
-
|
|
1042
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, J(o)] : nn([h, J(o)]),
|
|
1043
|
+
v,
|
|
1067
1044
|
"`"
|
|
1068
1045
|
]);
|
|
1069
|
-
},
|
|
1070
|
-
[
|
|
1046
|
+
}, Me = "embeddedPrisma", dr = ["prisma"], lr = $(Me), rn = M(Me), on = D(Me), cr = {
|
|
1047
|
+
[lr]: {
|
|
1071
1048
|
category: "Embed",
|
|
1072
1049
|
type: "string",
|
|
1073
1050
|
array: !0,
|
|
1074
|
-
default: [{ value: [...
|
|
1051
|
+
default: [{ value: [...dr] }],
|
|
1075
1052
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin.",
|
|
1076
|
-
deprecated: `Please use \`${
|
|
1053
|
+
deprecated: `Please use \`${rn}\` or \`${on}\`.`
|
|
1077
1054
|
},
|
|
1078
|
-
[
|
|
1055
|
+
[rn]: {
|
|
1079
1056
|
category: "Embed",
|
|
1080
1057
|
type: "string",
|
|
1081
1058
|
array: !0,
|
|
1082
1059
|
default: [{ value: [] }],
|
|
1083
1060
|
description: "Block comments that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
|
|
1084
1061
|
},
|
|
1085
|
-
[
|
|
1062
|
+
[on]: {
|
|
1086
1063
|
category: "Embed",
|
|
1087
1064
|
type: "string",
|
|
1088
1065
|
array: !0,
|
|
1089
1066
|
default: [{ value: [] }],
|
|
1090
1067
|
description: "Tags that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
|
|
1091
1068
|
}
|
|
1092
|
-
},
|
|
1069
|
+
}, ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1093
1070
|
__proto__: null,
|
|
1094
|
-
embedder:
|
|
1095
|
-
language:
|
|
1096
|
-
options:
|
|
1097
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
1098
|
-
N("prettier-plugin-properties", r, i);
|
|
1071
|
+
embedder: ar,
|
|
1072
|
+
language: Me,
|
|
1073
|
+
options: cr
|
|
1074
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: an, group: H, indent: dn, softline: ln } = T, pr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1099
1075
|
const s = {
|
|
1100
1076
|
...r,
|
|
1101
1077
|
...a
|
|
@@ -1109,50 +1085,49 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
1109
1085
|
parser: "dot-properties"
|
|
1110
1086
|
}), o = A(_, E, b);
|
|
1111
1087
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1112
|
-
return
|
|
1088
|
+
return H([
|
|
1113
1089
|
"`",
|
|
1114
1090
|
c,
|
|
1115
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
1091
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [H(o)] : dn([H(o)]),
|
|
1116
1092
|
p,
|
|
1117
1093
|
"`"
|
|
1118
1094
|
]);
|
|
1119
|
-
const h = c.length ?
|
|
1120
|
-
return
|
|
1095
|
+
const h = c.length ? an : ln, v = p.length ? an : ln;
|
|
1096
|
+
return H([
|
|
1121
1097
|
"`",
|
|
1122
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
1123
|
-
|
|
1098
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, H(o)] : dn([h, H(o)]),
|
|
1099
|
+
v,
|
|
1124
1100
|
"`"
|
|
1125
1101
|
]);
|
|
1126
|
-
},
|
|
1127
|
-
[
|
|
1102
|
+
}, Ae = "embeddedProperties", gr = ["properties"], mr = $(Ae), cn = M(Ae), un = D(Ae), hr = {
|
|
1103
|
+
[mr]: {
|
|
1128
1104
|
category: "Embed",
|
|
1129
1105
|
type: "string",
|
|
1130
1106
|
array: !0,
|
|
1131
|
-
default: [{ value: [...
|
|
1107
|
+
default: [{ value: [...gr] }],
|
|
1132
1108
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin.",
|
|
1133
|
-
deprecated: `Please use \`${
|
|
1109
|
+
deprecated: `Please use \`${cn}\` or \`${un}\`.`
|
|
1134
1110
|
},
|
|
1135
|
-
[
|
|
1111
|
+
[cn]: {
|
|
1136
1112
|
category: "Embed",
|
|
1137
1113
|
type: "string",
|
|
1138
1114
|
array: !0,
|
|
1139
1115
|
default: [{ value: [] }],
|
|
1140
1116
|
description: "Block comments that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
|
|
1141
1117
|
},
|
|
1142
|
-
[
|
|
1118
|
+
[un]: {
|
|
1143
1119
|
category: "Embed",
|
|
1144
1120
|
type: "string",
|
|
1145
1121
|
array: !0,
|
|
1146
1122
|
default: [{ value: [] }],
|
|
1147
1123
|
description: "Tags that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
|
|
1148
1124
|
}
|
|
1149
|
-
},
|
|
1125
|
+
}, Er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1150
1126
|
__proto__: null,
|
|
1151
|
-
embedder:
|
|
1152
|
-
language:
|
|
1153
|
-
options:
|
|
1154
|
-
}, Symbol.toStringTag, { value: "Module" })), { group:
|
|
1155
|
-
N("@prettier/plugin-pug", r, i);
|
|
1127
|
+
embedder: pr,
|
|
1128
|
+
language: Ae,
|
|
1129
|
+
options: hr
|
|
1130
|
+
}, Symbol.toStringTag, { value: "Module" })), { group: X, line: pn, softline: gn, indent: mn } = T, br = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1156
1131
|
const s = {
|
|
1157
1132
|
...r,
|
|
1158
1133
|
...a
|
|
@@ -1171,37 +1146,37 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
1171
1146
|
!0
|
|
1172
1147
|
);
|
|
1173
1148
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1174
|
-
return
|
|
1149
|
+
return X([
|
|
1175
1150
|
"`",
|
|
1176
1151
|
c,
|
|
1177
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
1152
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [X(o)] : mn([X(o)]),
|
|
1178
1153
|
p,
|
|
1179
1154
|
"`"
|
|
1180
1155
|
]);
|
|
1181
|
-
const h = c.length ?
|
|
1182
|
-
return
|
|
1156
|
+
const h = c.length ? pn : gn, v = p.length ? pn : gn;
|
|
1157
|
+
return X([
|
|
1183
1158
|
"`",
|
|
1184
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
1185
|
-
|
|
1159
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, X(o)] : mn([h, X(o)]),
|
|
1160
|
+
v,
|
|
1186
1161
|
"`"
|
|
1187
1162
|
]);
|
|
1188
|
-
},
|
|
1189
|
-
[
|
|
1163
|
+
}, Se = "embeddedPug", fr = ["pug", "jade"], yr = $(Se), hn = M(Se), En = D(Se), _r = {
|
|
1164
|
+
[yr]: {
|
|
1190
1165
|
category: "Embed",
|
|
1191
1166
|
type: "string",
|
|
1192
1167
|
array: !0,
|
|
1193
|
-
default: [{ value: [...
|
|
1168
|
+
default: [{ value: [...fr] }],
|
|
1194
1169
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin.",
|
|
1195
|
-
deprecated: `Please use \`${
|
|
1170
|
+
deprecated: `Please use \`${hn}\` or \`${En}\`.`
|
|
1196
1171
|
},
|
|
1197
|
-
[
|
|
1172
|
+
[hn]: {
|
|
1198
1173
|
category: "Embed",
|
|
1199
1174
|
type: "string",
|
|
1200
1175
|
array: !0,
|
|
1201
1176
|
default: [{ value: [] }],
|
|
1202
1177
|
description: "Block comments that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin."
|
|
1203
1178
|
},
|
|
1204
|
-
[
|
|
1179
|
+
[En]: {
|
|
1205
1180
|
category: "Embed",
|
|
1206
1181
|
type: "string",
|
|
1207
1182
|
array: !0,
|
|
@@ -1210,11 +1185,10 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
1210
1185
|
}
|
|
1211
1186
|
}, vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1212
1187
|
__proto__: null,
|
|
1213
|
-
embedder:
|
|
1214
|
-
language:
|
|
1215
|
-
options:
|
|
1216
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
1217
|
-
N("@prettier/plugin-ruby", r, i);
|
|
1188
|
+
embedder: br,
|
|
1189
|
+
language: Se,
|
|
1190
|
+
options: _r
|
|
1191
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: bn, group: Q, indent: fn, softline: yn } = T, $r = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1218
1192
|
const s = {
|
|
1219
1193
|
...r,
|
|
1220
1194
|
...a
|
|
@@ -1228,30 +1202,30 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
1228
1202
|
parser: s.embeddedRubyParser ?? "ruby"
|
|
1229
1203
|
}), o = A(_, E, b);
|
|
1230
1204
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1231
|
-
return
|
|
1205
|
+
return Q([
|
|
1232
1206
|
"`",
|
|
1233
1207
|
c,
|
|
1234
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
1208
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [Q(o)] : fn([Q(o)]),
|
|
1235
1209
|
p,
|
|
1236
1210
|
"`"
|
|
1237
1211
|
]);
|
|
1238
|
-
const h = c.length ?
|
|
1239
|
-
return
|
|
1212
|
+
const h = c.length ? bn : yn, v = p.length ? bn : yn;
|
|
1213
|
+
return Q([
|
|
1240
1214
|
"`",
|
|
1241
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
1242
|
-
|
|
1215
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, Q(o)] : fn([h, Q(o)]),
|
|
1216
|
+
v,
|
|
1243
1217
|
"`"
|
|
1244
1218
|
]);
|
|
1245
|
-
},
|
|
1246
|
-
[
|
|
1219
|
+
}, ce = "embeddedRuby", Dr = ["ruby"], Tr = ["ruby", "rbs", "haml"], Mr = $(ce), _n = M(ce), vn = D(ce), Ar = N(ce), Sr = {
|
|
1220
|
+
[Mr]: {
|
|
1247
1221
|
category: "Embed",
|
|
1248
1222
|
type: "string",
|
|
1249
1223
|
array: !0,
|
|
1250
|
-
default: [{ value: [...
|
|
1224
|
+
default: [{ value: [...Dr] }],
|
|
1251
1225
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.",
|
|
1252
|
-
deprecated: `Please use \`${
|
|
1226
|
+
deprecated: `Please use \`${_n}\` or \`${vn}\`.`
|
|
1253
1227
|
},
|
|
1254
|
-
[
|
|
1228
|
+
[_n]: {
|
|
1255
1229
|
category: "Embed",
|
|
1256
1230
|
type: "string",
|
|
1257
1231
|
array: !0,
|
|
@@ -1265,7 +1239,7 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
1265
1239
|
default: [{ value: [] }],
|
|
1266
1240
|
description: "Tags that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
|
|
1267
1241
|
},
|
|
1268
|
-
[
|
|
1242
|
+
[Ar]: {
|
|
1269
1243
|
category: "Embed",
|
|
1270
1244
|
type: "choice",
|
|
1271
1245
|
default: "ruby",
|
|
@@ -1275,13 +1249,12 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
1275
1249
|
description: `Use the "${e}" parser.`
|
|
1276
1250
|
}))
|
|
1277
1251
|
}
|
|
1278
|
-
},
|
|
1252
|
+
}, Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1279
1253
|
__proto__: null,
|
|
1280
|
-
embedder:
|
|
1281
|
-
language:
|
|
1282
|
-
options:
|
|
1283
|
-
}, Symbol.toStringTag, { value: "Module" })), { group:
|
|
1284
|
-
N("prettier-plugin-sh", r, i);
|
|
1254
|
+
embedder: $r,
|
|
1255
|
+
language: ce,
|
|
1256
|
+
options: Sr
|
|
1257
|
+
}, Symbol.toStringTag, { value: "Module" })), { group: Y, line: $n, softline: Dn, indent: Tn } = T, kr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1285
1258
|
const s = {
|
|
1286
1259
|
...r,
|
|
1287
1260
|
...a
|
|
@@ -1300,50 +1273,50 @@ const de = "embeddedJson", $s = ["json", "jsonl"], vs = ["json", "json5", "jsonc
|
|
|
1300
1273
|
!0
|
|
1301
1274
|
);
|
|
1302
1275
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1303
|
-
return
|
|
1276
|
+
return Y([
|
|
1304
1277
|
"`",
|
|
1305
1278
|
c,
|
|
1306
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
1279
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [Y(o)] : Tn([Y(o)]),
|
|
1307
1280
|
p,
|
|
1308
1281
|
"`"
|
|
1309
1282
|
]);
|
|
1310
|
-
const h = c.length ?
|
|
1311
|
-
return
|
|
1283
|
+
const h = c.length ? $n : Dn, v = p.length ? $n : Dn;
|
|
1284
|
+
return Y([
|
|
1312
1285
|
"`",
|
|
1313
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
1314
|
-
|
|
1286
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, Y(o)] : Tn([h, Y(o)]),
|
|
1287
|
+
v,
|
|
1315
1288
|
"`"
|
|
1316
1289
|
]);
|
|
1317
|
-
},
|
|
1318
|
-
[
|
|
1290
|
+
}, Le = "embeddedSh", Gr = ["sh"], Nr = $(Le), Mn = M(Le), An = D(Le), Or = {
|
|
1291
|
+
[Nr]: {
|
|
1319
1292
|
category: "Embed",
|
|
1320
1293
|
type: "string",
|
|
1321
1294
|
array: !0,
|
|
1322
|
-
default: [{ value: [...
|
|
1295
|
+
default: [{ value: [...Gr] }],
|
|
1323
1296
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.",
|
|
1324
|
-
deprecated: `Please use \`${
|
|
1297
|
+
deprecated: `Please use \`${Mn}\` or \`${An}\`.`
|
|
1325
1298
|
},
|
|
1326
|
-
[
|
|
1299
|
+
[Mn]: {
|
|
1327
1300
|
category: "Embed",
|
|
1328
1301
|
type: "string",
|
|
1329
1302
|
array: !0,
|
|
1330
1303
|
default: [{ value: [] }],
|
|
1331
1304
|
description: "Block comments that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
|
|
1332
1305
|
},
|
|
1333
|
-
[
|
|
1306
|
+
[An]: {
|
|
1334
1307
|
category: "Embed",
|
|
1335
1308
|
type: "string",
|
|
1336
1309
|
array: !0,
|
|
1337
1310
|
default: [{ value: [] }],
|
|
1338
1311
|
description: "Tags that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
|
|
1339
1312
|
}
|
|
1340
|
-
},
|
|
1313
|
+
}, xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1341
1314
|
__proto__: null,
|
|
1342
|
-
embedder:
|
|
1343
|
-
language:
|
|
1344
|
-
options:
|
|
1315
|
+
embedder: kr,
|
|
1316
|
+
language: Le,
|
|
1317
|
+
options: Or
|
|
1345
1318
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1346
|
-
function
|
|
1319
|
+
function Sn(e, t) {
|
|
1347
1320
|
var n = Object.keys(e);
|
|
1348
1321
|
if (Object.getOwnPropertySymbols) {
|
|
1349
1322
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -1353,25 +1326,25 @@ function Ln(e, t) {
|
|
|
1353
1326
|
}
|
|
1354
1327
|
return n;
|
|
1355
1328
|
}
|
|
1356
|
-
function
|
|
1329
|
+
function Ln(e) {
|
|
1357
1330
|
for (var t = 1; t < arguments.length; t++) {
|
|
1358
1331
|
var n = arguments[t] != null ? arguments[t] : {};
|
|
1359
|
-
t % 2 ?
|
|
1360
|
-
|
|
1361
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1332
|
+
t % 2 ? Sn(Object(n), !0).forEach(function(r) {
|
|
1333
|
+
Ir(e, r, n[r]);
|
|
1334
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Sn(Object(n)).forEach(function(r) {
|
|
1362
1335
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
|
1363
1336
|
});
|
|
1364
1337
|
}
|
|
1365
1338
|
return e;
|
|
1366
1339
|
}
|
|
1367
|
-
function
|
|
1368
|
-
return t =
|
|
1340
|
+
function Ir(e, t, n) {
|
|
1341
|
+
return t = Pr(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
|
1369
1342
|
}
|
|
1370
|
-
function
|
|
1371
|
-
var t =
|
|
1343
|
+
function Pr(e) {
|
|
1344
|
+
var t = Br(e, "string");
|
|
1372
1345
|
return typeof t == "symbol" ? t : String(t);
|
|
1373
1346
|
}
|
|
1374
|
-
function
|
|
1347
|
+
function Br(e, t) {
|
|
1375
1348
|
if (typeof e != "object" || e === null)
|
|
1376
1349
|
return e;
|
|
1377
1350
|
var n = e[Symbol.toPrimitive];
|
|
@@ -1383,9 +1356,9 @@ function qr(e, t) {
|
|
|
1383
1356
|
}
|
|
1384
1357
|
return (t === "string" ? String : Number)(e);
|
|
1385
1358
|
}
|
|
1386
|
-
const
|
|
1387
|
-
function
|
|
1388
|
-
return t.withOptions = (n) =>
|
|
1359
|
+
const qr = si({});
|
|
1360
|
+
function si(e) {
|
|
1361
|
+
return t.withOptions = (n) => si(Ln(Ln({}, e), n)), t;
|
|
1389
1362
|
function t(n, ...r) {
|
|
1390
1363
|
const i = typeof n == "string" ? [n] : n.raw, {
|
|
1391
1364
|
escapeSpecialCharacters: a = Array.isArray(n)
|
|
@@ -1414,13 +1387,11 @@ function ri(e) {
|
|
|
1414
1387
|
`);
|
|
1415
1388
|
}
|
|
1416
1389
|
}
|
|
1417
|
-
const { group:
|
|
1390
|
+
const { group: V, line: kn, softline: Gn, indent: Nn } = T, jr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1418
1391
|
const s = {
|
|
1419
1392
|
...r,
|
|
1420
1393
|
...a
|
|
1421
|
-
}, l = s.embeddedSqlPlugin ?? "prettier-plugin-sql"
|
|
1422
|
-
N(l, s, i);
|
|
1423
|
-
const { node: u } = n, { createPlaceholder: E, placeholderRegex: d } = L(), c = u.quasis.map(
|
|
1394
|
+
}, l = s.embeddedSqlPlugin ?? "prettier-plugin-sql", { node: u } = n, { createPlaceholder: E, placeholderRegex: d } = L(), c = u.quasis.map(
|
|
1424
1395
|
(m, g, { length: y }) => g === y - 1 ? m.value.cooked : m.value.cooked + E(g)
|
|
1425
1396
|
).join(""), p = c.match(/^\s+/)?.[0] ?? "", f = c.match(/\s+$/)?.[0] ?? "", b = c.slice(
|
|
1426
1397
|
p.length,
|
|
@@ -1434,7 +1405,7 @@ const { group: Z, line: Gn, softline: Nn, indent: xn } = M, Ur = async (e, t, n,
|
|
|
1434
1405
|
});
|
|
1435
1406
|
o = A(m, d, _);
|
|
1436
1407
|
} else {
|
|
1437
|
-
const m = await e(
|
|
1408
|
+
const m = await e(qr(b), {
|
|
1438
1409
|
...s,
|
|
1439
1410
|
parser: "sql"
|
|
1440
1411
|
});
|
|
@@ -1446,76 +1417,75 @@ const { group: Z, line: Gn, softline: Nn, indent: xn } = M, Ur = async (e, t, n,
|
|
|
1446
1417
|
);
|
|
1447
1418
|
}
|
|
1448
1419
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1449
|
-
return
|
|
1420
|
+
return V([
|
|
1450
1421
|
"`",
|
|
1451
1422
|
p,
|
|
1452
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
1423
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [V(o)] : Nn([V(o)]),
|
|
1453
1424
|
f,
|
|
1454
1425
|
"`"
|
|
1455
1426
|
]);
|
|
1456
|
-
const h = p.length ?
|
|
1457
|
-
return
|
|
1427
|
+
const h = p.length ? kn : Gn, v = f.length ? kn : Gn;
|
|
1428
|
+
return V([
|
|
1458
1429
|
"`",
|
|
1459
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
1460
|
-
|
|
1430
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, V(o)] : Nn([h, V(o)]),
|
|
1431
|
+
v,
|
|
1461
1432
|
"`"
|
|
1462
1433
|
]);
|
|
1463
|
-
},
|
|
1434
|
+
}, ie = "embeddedSql", Ur = ["sql"], Rr = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], Cr = [
|
|
1464
1435
|
"sqlite",
|
|
1465
1436
|
"bigquery",
|
|
1466
1437
|
"mysql",
|
|
1467
1438
|
"mariadb",
|
|
1468
1439
|
"postgresql"
|
|
1469
|
-
],
|
|
1470
|
-
[
|
|
1440
|
+
], wr = $(ie), On = M(ie), xn = D(ie), Fr = ki(ie), Wr = N(ie), zr = {
|
|
1441
|
+
[wr]: {
|
|
1471
1442
|
category: "Embed",
|
|
1472
1443
|
type: "string",
|
|
1473
1444
|
array: !0,
|
|
1474
|
-
default: [{ value: [...
|
|
1445
|
+
default: [{ value: [...Ur] }],
|
|
1475
1446
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.",
|
|
1476
|
-
deprecated: `Please use \`${
|
|
1447
|
+
deprecated: `Please use \`${On}\` or \`${xn}\`.`
|
|
1477
1448
|
},
|
|
1478
|
-
[
|
|
1449
|
+
[On]: {
|
|
1479
1450
|
category: "Embed",
|
|
1480
1451
|
type: "string",
|
|
1481
1452
|
array: !0,
|
|
1482
1453
|
default: [{ value: [] }],
|
|
1483
1454
|
description: "Block comments that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin."
|
|
1484
1455
|
},
|
|
1485
|
-
[
|
|
1456
|
+
[xn]: {
|
|
1486
1457
|
category: "Embed",
|
|
1487
1458
|
type: "string",
|
|
1488
1459
|
array: !0,
|
|
1489
1460
|
default: [{ value: [] }],
|
|
1490
1461
|
description: "Tags that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin."
|
|
1491
1462
|
},
|
|
1492
|
-
[
|
|
1463
|
+
[Fr]: {
|
|
1493
1464
|
category: "Embed",
|
|
1494
1465
|
type: "choice",
|
|
1495
1466
|
default: "prettier-plugin-sql",
|
|
1496
1467
|
description: "The plugin used to format the embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.",
|
|
1497
|
-
choices:
|
|
1468
|
+
choices: Rr.map((e) => ({
|
|
1498
1469
|
value: e,
|
|
1499
1470
|
description: `Use the "${e}" plugin.`
|
|
1500
1471
|
}))
|
|
1501
1472
|
},
|
|
1502
|
-
[
|
|
1473
|
+
[Wr]: {
|
|
1503
1474
|
category: "Embed",
|
|
1504
1475
|
type: "choice",
|
|
1505
1476
|
default: "sqlite",
|
|
1506
1477
|
description: "Specify the embedded SQL language parser. This option is only needed with the `prettier-plugin-sql-cst` plugin.",
|
|
1507
|
-
choices:
|
|
1478
|
+
choices: Cr.map((e) => ({
|
|
1508
1479
|
value: e,
|
|
1509
1480
|
description: `Use the "${e}" parser.`
|
|
1510
1481
|
}))
|
|
1511
1482
|
}
|
|
1512
|
-
},
|
|
1483
|
+
}, Kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1513
1484
|
__proto__: null,
|
|
1514
|
-
embedder:
|
|
1515
|
-
language:
|
|
1516
|
-
options:
|
|
1517
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
1518
|
-
N("prettier-plugin-toml", r, i);
|
|
1485
|
+
embedder: jr,
|
|
1486
|
+
language: ie,
|
|
1487
|
+
options: zr
|
|
1488
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: In, group: Z, indent: Pn, softline: Bn } = T, Jr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1519
1489
|
const s = {
|
|
1520
1490
|
...r,
|
|
1521
1491
|
...a
|
|
@@ -1534,49 +1504,49 @@ const { group: Z, line: Gn, softline: Nn, indent: xn } = M, Ur = async (e, t, n,
|
|
|
1534
1504
|
!0
|
|
1535
1505
|
);
|
|
1536
1506
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1537
|
-
return
|
|
1507
|
+
return Z([
|
|
1538
1508
|
"`",
|
|
1539
1509
|
c,
|
|
1540
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
1510
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [Z(o)] : Pn([Z(o)]),
|
|
1541
1511
|
p,
|
|
1542
1512
|
"`"
|
|
1543
1513
|
]);
|
|
1544
|
-
const h = c.length ?
|
|
1545
|
-
return
|
|
1514
|
+
const h = c.length ? In : Bn, v = p.length ? In : Bn;
|
|
1515
|
+
return Z([
|
|
1546
1516
|
"`",
|
|
1547
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
1548
|
-
|
|
1517
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, Z(o)] : Pn([h, Z(o)]),
|
|
1518
|
+
v,
|
|
1549
1519
|
"`"
|
|
1550
1520
|
]);
|
|
1551
|
-
},
|
|
1552
|
-
[
|
|
1521
|
+
}, ke = "embeddedToml", Hr = ["toml"], Xr = $(ke), qn = M(ke), jn = D(ke), Qr = {
|
|
1522
|
+
[Xr]: {
|
|
1553
1523
|
category: "Embed",
|
|
1554
1524
|
type: "string",
|
|
1555
1525
|
array: !0,
|
|
1556
|
-
default: [{ value: [...
|
|
1526
|
+
default: [{ value: [...Hr] }],
|
|
1557
1527
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.",
|
|
1558
|
-
deprecated: `Please use \`${
|
|
1528
|
+
deprecated: `Please use \`${qn}\` or \`${jn}\`.`
|
|
1559
1529
|
},
|
|
1560
|
-
[
|
|
1530
|
+
[qn]: {
|
|
1561
1531
|
category: "Embed",
|
|
1562
1532
|
type: "string",
|
|
1563
1533
|
array: !0,
|
|
1564
1534
|
default: [{ value: [] }],
|
|
1565
1535
|
description: "Block comments that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
|
|
1566
1536
|
},
|
|
1567
|
-
[
|
|
1537
|
+
[jn]: {
|
|
1568
1538
|
category: "Embed",
|
|
1569
1539
|
type: "string",
|
|
1570
1540
|
array: !0,
|
|
1571
1541
|
default: [{ value: [] }],
|
|
1572
1542
|
description: "Tags that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
|
|
1573
1543
|
}
|
|
1574
|
-
},
|
|
1544
|
+
}, Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1575
1545
|
__proto__: null,
|
|
1576
|
-
embedder:
|
|
1577
|
-
language:
|
|
1578
|
-
options:
|
|
1579
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
1546
|
+
embedder: Jr,
|
|
1547
|
+
language: ke,
|
|
1548
|
+
options: Qr
|
|
1549
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Un, group: ee, indent: Rn, softline: Cn } = T, Vr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1580
1550
|
const s = {
|
|
1581
1551
|
...r,
|
|
1582
1552
|
...a
|
|
@@ -1593,66 +1563,65 @@ const { group: Z, line: Gn, softline: Nn, indent: xn } = M, Ur = async (e, t, n,
|
|
|
1593
1563
|
filepath: void 0
|
|
1594
1564
|
}), o = A(_, E, b);
|
|
1595
1565
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1596
|
-
return
|
|
1566
|
+
return ee([
|
|
1597
1567
|
"`",
|
|
1598
1568
|
c,
|
|
1599
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
1569
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [ee(o)] : Rn([ee(o)]),
|
|
1600
1570
|
p,
|
|
1601
1571
|
"`"
|
|
1602
1572
|
]);
|
|
1603
|
-
const h = c.length ?
|
|
1604
|
-
return
|
|
1573
|
+
const h = c.length ? Un : Cn, v = p.length ? Un : Cn;
|
|
1574
|
+
return ee([
|
|
1605
1575
|
"`",
|
|
1606
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
1607
|
-
|
|
1576
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, ee(o)] : Rn([h, ee(o)]),
|
|
1577
|
+
v,
|
|
1608
1578
|
"`"
|
|
1609
1579
|
]);
|
|
1610
|
-
},
|
|
1580
|
+
}, ue = "embeddedTs", Zr = [
|
|
1611
1581
|
"ts",
|
|
1612
1582
|
"tsx",
|
|
1613
1583
|
"cts",
|
|
1614
1584
|
"mts",
|
|
1615
1585
|
"typescript"
|
|
1616
|
-
],
|
|
1617
|
-
[
|
|
1586
|
+
], eo = ["typescript", "babel-ts"], to = $(ue), wn = M(ue), Fn = D(ue), no = N(ue), io = {
|
|
1587
|
+
[to]: {
|
|
1618
1588
|
category: "Embed",
|
|
1619
1589
|
type: "string",
|
|
1620
1590
|
array: !0,
|
|
1621
|
-
default: [{ value: [...
|
|
1591
|
+
default: [{ value: [...Zr] }],
|
|
1622
1592
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language.",
|
|
1623
|
-
deprecated: `Please use \`${
|
|
1593
|
+
deprecated: `Please use \`${wn}\` or \`${Fn}\`.`
|
|
1624
1594
|
},
|
|
1625
|
-
[
|
|
1595
|
+
[wn]: {
|
|
1626
1596
|
category: "Embed",
|
|
1627
1597
|
type: "string",
|
|
1628
1598
|
array: !0,
|
|
1629
1599
|
default: [{ value: [] }],
|
|
1630
1600
|
description: "Block comments that make their subsequent template literals be identified as embedded TypeScript language."
|
|
1631
1601
|
},
|
|
1632
|
-
[
|
|
1602
|
+
[Fn]: {
|
|
1633
1603
|
category: "Embed",
|
|
1634
1604
|
type: "string",
|
|
1635
1605
|
array: !0,
|
|
1636
1606
|
default: [{ value: [] }],
|
|
1637
1607
|
description: "Tags that make their subsequent template literals be identified as embedded TypeScript language."
|
|
1638
1608
|
},
|
|
1639
|
-
[
|
|
1609
|
+
[no]: {
|
|
1640
1610
|
category: "Embed",
|
|
1641
1611
|
type: "choice",
|
|
1642
1612
|
default: "typescript",
|
|
1643
1613
|
description: "The parser used to parse the embedded TypeScript language.",
|
|
1644
|
-
choices:
|
|
1614
|
+
choices: eo.map((e) => ({
|
|
1645
1615
|
value: e,
|
|
1646
1616
|
description: `Use the "${e}" parser.`
|
|
1647
1617
|
}))
|
|
1648
1618
|
}
|
|
1649
|
-
},
|
|
1619
|
+
}, so = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1650
1620
|
__proto__: null,
|
|
1651
|
-
embedder:
|
|
1652
|
-
language:
|
|
1653
|
-
options:
|
|
1654
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1655
|
-
N("@prettier/plugin-xml", r, i);
|
|
1621
|
+
embedder: Vr,
|
|
1622
|
+
language: ue,
|
|
1623
|
+
options: io
|
|
1624
|
+
}, Symbol.toStringTag, { value: "Module" })), pe = "embeddedXml", { line: Wn, group: te, indent: zn, softline: Ne } = T, ro = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1656
1625
|
const s = {
|
|
1657
1626
|
...r,
|
|
1658
1627
|
...a
|
|
@@ -1667,50 +1636,50 @@ const { group: Z, line: Gn, softline: Nn, indent: xn } = M, Ur = async (e, t, n,
|
|
|
1667
1636
|
const g = f.slice(o);
|
|
1668
1637
|
if (g.length === 0)
|
|
1669
1638
|
break;
|
|
1670
|
-
o > 0 && s.xmlWhitespaceSensitivity !== "strict" && _.push(
|
|
1639
|
+
o > 0 && s.xmlWhitespaceSensitivity !== "strict" && _.push(Ne), s.__embeddedXmlFragmentRecoverIndex?.splice(
|
|
1671
1640
|
0,
|
|
1672
1641
|
s.__embeddedXmlFragmentRecoverIndex.length
|
|
1673
1642
|
);
|
|
1674
1643
|
let y = await e(g, {
|
|
1675
1644
|
...s,
|
|
1676
|
-
parser:
|
|
1645
|
+
parser: pe
|
|
1677
1646
|
});
|
|
1678
1647
|
const [k, G] = s.__embeddedXmlFragmentRecoverIndex ?? [];
|
|
1679
1648
|
k === void 0 ? o = void 0 : G === void 0 ? o += k : (y = g.slice(k, G + 1), o += G + 1), _.push(y);
|
|
1680
1649
|
}
|
|
1681
1650
|
const h = A(_, E, b);
|
|
1682
1651
|
if (s.xmlWhitespaceSensitivity === "strict" || s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1683
|
-
return
|
|
1652
|
+
return te([
|
|
1684
1653
|
"`",
|
|
1685
1654
|
c,
|
|
1686
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
1655
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [te(h)] : zn([te(h)]),
|
|
1687
1656
|
p,
|
|
1688
1657
|
"`"
|
|
1689
1658
|
]);
|
|
1690
|
-
const
|
|
1691
|
-
return
|
|
1659
|
+
const v = c.length ? Wn : Ne, m = p.length ? Wn : Ne;
|
|
1660
|
+
return te([
|
|
1692
1661
|
"`",
|
|
1693
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
1662
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [v, te(h)] : zn([v, te(h)]),
|
|
1694
1663
|
m,
|
|
1695
1664
|
"`"
|
|
1696
1665
|
]);
|
|
1697
|
-
},
|
|
1698
|
-
[
|
|
1666
|
+
}, oo = ["xml", "opml", "rss", "svg"], ao = $(pe), Kn = M(pe), Jn = D(pe), lo = {
|
|
1667
|
+
[ao]: {
|
|
1699
1668
|
category: "Embed",
|
|
1700
1669
|
type: "string",
|
|
1701
1670
|
array: !0,
|
|
1702
|
-
default: [{ value: [...
|
|
1671
|
+
default: [{ value: [...oo] }],
|
|
1703
1672
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.",
|
|
1704
|
-
deprecated: `Please use \`${
|
|
1673
|
+
deprecated: `Please use \`${Kn}\` or \`${Jn}\`.`
|
|
1705
1674
|
},
|
|
1706
|
-
[
|
|
1675
|
+
[Kn]: {
|
|
1707
1676
|
category: "Embed",
|
|
1708
1677
|
type: "string",
|
|
1709
1678
|
array: !0,
|
|
1710
1679
|
default: [{ value: [] }],
|
|
1711
1680
|
description: "Block comments that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
|
|
1712
1681
|
},
|
|
1713
|
-
[
|
|
1682
|
+
[Jn]: {
|
|
1714
1683
|
category: "Embed",
|
|
1715
1684
|
type: "string",
|
|
1716
1685
|
array: !0,
|
|
@@ -1728,7 +1697,7 @@ const { group: Z, line: Gn, softline: Nn, indent: xn } = M, Ur = async (e, t, n,
|
|
|
1728
1697
|
description: "This option is read only and is used internally as a workaround to support xml fragments"
|
|
1729
1698
|
}
|
|
1730
1699
|
};
|
|
1731
|
-
function
|
|
1700
|
+
function co(e) {
|
|
1732
1701
|
const t = {
|
|
1733
1702
|
loc: {
|
|
1734
1703
|
start: {
|
|
@@ -1748,7 +1717,7 @@ function uo(e) {
|
|
|
1748
1717
|
);
|
|
1749
1718
|
return Object.assign(n, t), n;
|
|
1750
1719
|
}
|
|
1751
|
-
function
|
|
1720
|
+
function Hn(e) {
|
|
1752
1721
|
const t = {
|
|
1753
1722
|
loc: {
|
|
1754
1723
|
start: {
|
|
@@ -1768,12 +1737,12 @@ function Xn(e) {
|
|
|
1768
1737
|
);
|
|
1769
1738
|
return Object.assign(n, t), n;
|
|
1770
1739
|
}
|
|
1771
|
-
const
|
|
1740
|
+
const uo = {
|
|
1772
1741
|
async parse(e, t) {
|
|
1773
1742
|
const { parse: n } = await import("@xml-tools/parser"), { lexErrors: r, parseErrors: i, cst: a } = n(e);
|
|
1774
1743
|
if (r.length > 0) {
|
|
1775
1744
|
const s = r[0];
|
|
1776
|
-
throw
|
|
1745
|
+
throw co(s);
|
|
1777
1746
|
}
|
|
1778
1747
|
if (i.length > 0) {
|
|
1779
1748
|
let s = !1;
|
|
@@ -1781,7 +1750,7 @@ const po = {
|
|
|
1781
1750
|
if (!["MismatchedTokenException", "NotAllInputParsedException"].includes(
|
|
1782
1751
|
l.name
|
|
1783
1752
|
))
|
|
1784
|
-
throw
|
|
1753
|
+
throw Hn(l);
|
|
1785
1754
|
if (l.message === "Expecting token of type --> OPEN <-- but found --> '' <--") {
|
|
1786
1755
|
s = !0;
|
|
1787
1756
|
continue;
|
|
@@ -1809,9 +1778,9 @@ const po = {
|
|
|
1809
1778
|
), s = !0;
|
|
1810
1779
|
break;
|
|
1811
1780
|
}
|
|
1812
|
-
throw
|
|
1781
|
+
throw Hn(l);
|
|
1813
1782
|
}
|
|
1814
|
-
s &&
|
|
1783
|
+
s && ri(a);
|
|
1815
1784
|
}
|
|
1816
1785
|
return a;
|
|
1817
1786
|
},
|
|
@@ -1823,32 +1792,32 @@ const po = {
|
|
|
1823
1792
|
return e.location.endOffset ?? NaN;
|
|
1824
1793
|
}
|
|
1825
1794
|
};
|
|
1826
|
-
function
|
|
1795
|
+
function ri(e) {
|
|
1827
1796
|
const t = e.children;
|
|
1828
1797
|
for (const n in t) {
|
|
1829
1798
|
const r = t[n] ?? [];
|
|
1830
1799
|
for (let i = r.length - 1; i >= 0; --i) {
|
|
1831
1800
|
const a = r[i];
|
|
1832
|
-
if (
|
|
1801
|
+
if (po(a)) {
|
|
1833
1802
|
if (Object.keys(a.children).length === 0) {
|
|
1834
1803
|
r.splice(i, 1), r.length === 0 && delete t[n];
|
|
1835
1804
|
continue;
|
|
1836
1805
|
}
|
|
1837
|
-
|
|
1806
|
+
ri(a);
|
|
1838
1807
|
}
|
|
1839
1808
|
}
|
|
1840
1809
|
}
|
|
1841
1810
|
}
|
|
1842
|
-
function
|
|
1811
|
+
function po(e) {
|
|
1843
1812
|
return "name" in e && "children" in e && "location" in e;
|
|
1844
1813
|
}
|
|
1845
|
-
const
|
|
1814
|
+
const go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1846
1815
|
__proto__: null,
|
|
1847
|
-
embedder:
|
|
1848
|
-
language:
|
|
1849
|
-
options:
|
|
1850
|
-
parser:
|
|
1851
|
-
}, Symbol.toStringTag, { value: "Module" })), { line:
|
|
1816
|
+
embedder: ro,
|
|
1817
|
+
language: pe,
|
|
1818
|
+
options: lo,
|
|
1819
|
+
parser: uo
|
|
1820
|
+
}, Symbol.toStringTag, { value: "Module" })), { line: Xn, group: ne, indent: Qn, softline: Yn } = T, mo = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
|
|
1852
1821
|
const s = {
|
|
1853
1822
|
...r,
|
|
1854
1823
|
...a
|
|
@@ -1862,83 +1831,83 @@ const mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1862
1831
|
parser: "yaml"
|
|
1863
1832
|
}), o = A(_, E, b);
|
|
1864
1833
|
if (s.preserveEmbeddedExteriorWhitespaces?.includes(i))
|
|
1865
|
-
return
|
|
1834
|
+
return ne([
|
|
1866
1835
|
"`",
|
|
1867
1836
|
c,
|
|
1868
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [
|
|
1837
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [ne(o)] : Qn([ne(o)]),
|
|
1869
1838
|
p,
|
|
1870
1839
|
"`"
|
|
1871
1840
|
]);
|
|
1872
|
-
const h = c.length ?
|
|
1873
|
-
return
|
|
1841
|
+
const h = c.length ? Xn : Yn, v = p.length ? Xn : Yn;
|
|
1842
|
+
return ne([
|
|
1874
1843
|
"`",
|
|
1875
|
-
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h,
|
|
1876
|
-
|
|
1844
|
+
s.noEmbeddedMultiLineIndentation?.includes(i) ? [h, ne(o)] : Qn([h, ne(o)]),
|
|
1845
|
+
v,
|
|
1877
1846
|
"`"
|
|
1878
1847
|
]);
|
|
1879
|
-
},
|
|
1880
|
-
[
|
|
1848
|
+
}, Ge = "embeddedYaml", ho = ["yaml", "yml"], Eo = $(Ge), Vn = M(Ge), Zn = D(Ge), bo = {
|
|
1849
|
+
[Eo]: {
|
|
1881
1850
|
category: "Embed",
|
|
1882
1851
|
type: "string",
|
|
1883
1852
|
array: !0,
|
|
1884
|
-
default: [{ value: [...
|
|
1853
|
+
default: [{ value: [...ho] }],
|
|
1885
1854
|
description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language.",
|
|
1886
|
-
deprecated: `Please use \`${
|
|
1855
|
+
deprecated: `Please use \`${Vn}\` or \`${Zn}\`.`
|
|
1887
1856
|
},
|
|
1888
|
-
[
|
|
1857
|
+
[Vn]: {
|
|
1889
1858
|
category: "Embed",
|
|
1890
1859
|
type: "string",
|
|
1891
1860
|
array: !0,
|
|
1892
1861
|
default: [{ value: [] }],
|
|
1893
1862
|
description: "Block comments that make their subsequent template literals be identified as embedded YAML language."
|
|
1894
1863
|
},
|
|
1895
|
-
[
|
|
1864
|
+
[Zn]: {
|
|
1896
1865
|
category: "Embed",
|
|
1897
1866
|
type: "string",
|
|
1898
1867
|
array: !0,
|
|
1899
1868
|
default: [{ value: [] }],
|
|
1900
1869
|
description: "Tags that make their subsequent template literals be identified as embedded YAML language."
|
|
1901
1870
|
}
|
|
1902
|
-
},
|
|
1871
|
+
}, fo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1903
1872
|
__proto__: null,
|
|
1904
|
-
embedder:
|
|
1905
|
-
language:
|
|
1906
|
-
options:
|
|
1907
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1908
|
-
"./css/index.ts":
|
|
1909
|
-
"./es/index.ts":
|
|
1910
|
-
"./glsl/index.ts":
|
|
1911
|
-
"./graphql/index.ts":
|
|
1912
|
-
"./html/index.ts":
|
|
1913
|
-
"./ini/index.ts":
|
|
1914
|
-
"./java/index.ts":
|
|
1915
|
-
"./json/index.ts":
|
|
1916
|
-
"./jsonata/index.ts":
|
|
1917
|
-
"./latex/index.ts":
|
|
1918
|
-
"./markdown/index.ts":
|
|
1919
|
-
"./nginx/index.ts":
|
|
1920
|
-
"./noop/index.ts":
|
|
1921
|
-
"./pegjs/index.ts":
|
|
1922
|
-
"./php/index.ts":
|
|
1923
|
-
"./prisma/index.ts":
|
|
1924
|
-
"./properties/index.ts":
|
|
1873
|
+
embedder: mo,
|
|
1874
|
+
language: Ge,
|
|
1875
|
+
options: bo
|
|
1876
|
+
}, Symbol.toStringTag, { value: "Module" })), ge = [], oi = {}, ai = {}, di = {}, yo = /* @__PURE__ */ Object.assign({
|
|
1877
|
+
"./css/index.ts": Bi,
|
|
1878
|
+
"./es/index.ts": Fi,
|
|
1879
|
+
"./glsl/index.ts": Hi,
|
|
1880
|
+
"./graphql/index.ts": Zi,
|
|
1881
|
+
"./html/index.ts": as,
|
|
1882
|
+
"./ini/index.ts": ps,
|
|
1883
|
+
"./java/index.ts": bs,
|
|
1884
|
+
"./json/index.ts": Ms,
|
|
1885
|
+
"./jsonata/index.ts": Gs,
|
|
1886
|
+
"./latex/index.ts": Ps,
|
|
1887
|
+
"./markdown/index.ts": ws,
|
|
1888
|
+
"./nginx/index.ts": Js,
|
|
1889
|
+
"./noop/index.ts": Qs,
|
|
1890
|
+
"./pegjs/index.ts": tr,
|
|
1891
|
+
"./php/index.ts": or,
|
|
1892
|
+
"./prisma/index.ts": ur,
|
|
1893
|
+
"./properties/index.ts": Er,
|
|
1925
1894
|
"./pug/index.ts": vr,
|
|
1926
|
-
"./ruby/index.ts":
|
|
1927
|
-
"./sh/index.ts":
|
|
1928
|
-
"./sql/index.ts":
|
|
1929
|
-
"./toml/index.ts":
|
|
1930
|
-
"./ts/index.ts":
|
|
1931
|
-
"./xml/index.ts":
|
|
1932
|
-
"./yaml/index.ts":
|
|
1895
|
+
"./ruby/index.ts": Lr,
|
|
1896
|
+
"./sh/index.ts": xr,
|
|
1897
|
+
"./sql/index.ts": Kr,
|
|
1898
|
+
"./toml/index.ts": Yr,
|
|
1899
|
+
"./ts/index.ts": so,
|
|
1900
|
+
"./xml/index.ts": go,
|
|
1901
|
+
"./yaml/index.ts": fo
|
|
1933
1902
|
});
|
|
1934
|
-
for (const { language: e, parser: t, embedder: n, options: r } of Object.values(
|
|
1935
|
-
|
|
1936
|
-
const
|
|
1937
|
-
...
|
|
1903
|
+
for (const { language: e, parser: t, embedder: n, options: r } of Object.values(yo))
|
|
1904
|
+
Li(ge, e, le), t && (oi[e] = t), n && (ai[e] = n), Object.assign(di, r);
|
|
1905
|
+
const _o = "noEmbeddedIdentificationByComment", vo = "noEmbeddedIdentificationByTag", $o = "preserveEmbeddedExteriorWhitespaces", Do = "noEmbeddedMultiLineIndentation", To = "embeddedOverrides", na = {
|
|
1906
|
+
...di,
|
|
1938
1907
|
/**
|
|
1939
1908
|
* @deprecated Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore.
|
|
1940
1909
|
*/
|
|
1941
|
-
[
|
|
1910
|
+
[_o]: {
|
|
1942
1911
|
category: "Embed",
|
|
1943
1912
|
type: "string",
|
|
1944
1913
|
array: !0,
|
|
@@ -1957,14 +1926,14 @@ const $o = "noEmbeddedIdentificationByComment", vo = "noEmbeddedIdentificationBy
|
|
|
1957
1926
|
description: "Turns off `` tag`...` `` tag-based embedded language identification for the specified identifiers.",
|
|
1958
1927
|
deprecated: "Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore."
|
|
1959
1928
|
},
|
|
1960
|
-
[
|
|
1929
|
+
[$o]: {
|
|
1961
1930
|
category: "Embed",
|
|
1962
1931
|
type: "string",
|
|
1963
1932
|
array: !0,
|
|
1964
1933
|
default: [{ value: [] }],
|
|
1965
1934
|
description: "Preserves leading and trailing whitespaces in the formatting results for the specified comments or tags."
|
|
1966
1935
|
},
|
|
1967
|
-
[
|
|
1936
|
+
[Do]: {
|
|
1968
1937
|
category: "Embed",
|
|
1969
1938
|
type: "string",
|
|
1970
1939
|
array: !0,
|
|
@@ -1978,17 +1947,17 @@ const $o = "noEmbeddedIdentificationByComment", vo = "noEmbeddedIdentificationBy
|
|
|
1978
1947
|
default: void 0,
|
|
1979
1948
|
description: "Option overrides for the specified comments or tags. It should either be a stringified JSON or an absolute filepath to the option overrides file."
|
|
1980
1949
|
}
|
|
1981
|
-
},
|
|
1950
|
+
}, Mo = {
|
|
1982
1951
|
// parsers from internal
|
|
1952
|
+
...hi.parsers,
|
|
1983
1953
|
...Ei.parsers,
|
|
1984
1954
|
...bi.parsers,
|
|
1985
|
-
...fi.parsers,
|
|
1986
|
-
..._i.parsers,
|
|
1987
1955
|
...yi.parsers,
|
|
1956
|
+
...fi.parsers,
|
|
1988
1957
|
// parsers from this plugin
|
|
1989
|
-
...
|
|
1958
|
+
...oi
|
|
1990
1959
|
};
|
|
1991
|
-
var
|
|
1960
|
+
var Ao = {
|
|
1992
1961
|
isEqual: !0,
|
|
1993
1962
|
isMatchingKey: !0,
|
|
1994
1963
|
isPromise: !0,
|
|
@@ -1997,24 +1966,24 @@ var So = {
|
|
|
1997
1966
|
onCacheChange: !0,
|
|
1998
1967
|
onCacheHit: !0,
|
|
1999
1968
|
transformKey: !0
|
|
2000
|
-
},
|
|
2001
|
-
function
|
|
1969
|
+
}, So = Array.prototype.slice;
|
|
1970
|
+
function he(e) {
|
|
2002
1971
|
var t = e.length;
|
|
2003
|
-
return t ? t === 1 ? [e[0]] : t === 2 ? [e[0], e[1]] : t === 3 ? [e[0], e[1], e[2]] :
|
|
1972
|
+
return t ? t === 1 ? [e[0]] : t === 2 ? [e[0], e[1]] : t === 3 ? [e[0], e[1], e[2]] : So.call(e, 0) : [];
|
|
2004
1973
|
}
|
|
2005
|
-
function
|
|
1974
|
+
function Lo(e) {
|
|
2006
1975
|
var t = {};
|
|
2007
1976
|
for (var n in e)
|
|
2008
|
-
|
|
1977
|
+
Ao[n] || (t[n] = e[n]);
|
|
2009
1978
|
return t;
|
|
2010
1979
|
}
|
|
2011
|
-
function
|
|
1980
|
+
function ko(e) {
|
|
2012
1981
|
return typeof e == "function" && e.isMemoized;
|
|
2013
1982
|
}
|
|
2014
|
-
function
|
|
1983
|
+
function Go(e, t) {
|
|
2015
1984
|
return e === t || e !== e && t !== t;
|
|
2016
1985
|
}
|
|
2017
|
-
function
|
|
1986
|
+
function ei(e, t) {
|
|
2018
1987
|
var n = {};
|
|
2019
1988
|
for (var r in e)
|
|
2020
1989
|
n[r] = e[r];
|
|
@@ -2022,7 +1991,7 @@ function ti(e, t) {
|
|
|
2022
1991
|
n[r] = t[r];
|
|
2023
1992
|
return n;
|
|
2024
1993
|
}
|
|
2025
|
-
var
|
|
1994
|
+
var No = (
|
|
2026
1995
|
/** @class */
|
|
2027
1996
|
function() {
|
|
2028
1997
|
function e(t) {
|
|
@@ -2047,9 +2016,9 @@ var xo = (
|
|
|
2047
2016
|
*/
|
|
2048
2017
|
get: function() {
|
|
2049
2018
|
return {
|
|
2050
|
-
keys:
|
|
2019
|
+
keys: he(this.keys),
|
|
2051
2020
|
size: this.size,
|
|
2052
|
-
values:
|
|
2021
|
+
values: he(this.values)
|
|
2053
2022
|
};
|
|
2054
2023
|
},
|
|
2055
2024
|
enumerable: !1,
|
|
@@ -2118,12 +2087,12 @@ var xo = (
|
|
|
2118
2087
|
}, e;
|
|
2119
2088
|
}()
|
|
2120
2089
|
);
|
|
2121
|
-
function
|
|
2122
|
-
if (t === void 0 && (t = {}),
|
|
2123
|
-
return
|
|
2090
|
+
function li(e, t) {
|
|
2091
|
+
if (t === void 0 && (t = {}), ko(e))
|
|
2092
|
+
return li(e.fn, ei(e.options, t));
|
|
2124
2093
|
if (typeof e != "function")
|
|
2125
2094
|
throw new TypeError("You must pass a function to `memoize`.");
|
|
2126
|
-
var n = t.isEqual, r = n === void 0 ?
|
|
2095
|
+
var n = t.isEqual, r = n === void 0 ? Go : n, i = t.isMatchingKey, a = t.isPromise, s = a === void 0 ? !1 : a, l = t.maxSize, u = l === void 0 ? 1 : l, E = t.onCacheAdd, d = t.onCacheChange, c = t.onCacheHit, p = t.transformKey, f = ei({
|
|
2127
2096
|
isEqual: r,
|
|
2128
2097
|
isMatchingKey: i,
|
|
2129
2098
|
isPromise: s,
|
|
@@ -2132,46 +2101,46 @@ function ci(e, t) {
|
|
|
2132
2101
|
onCacheChange: d,
|
|
2133
2102
|
onCacheHit: c,
|
|
2134
2103
|
transformKey: p
|
|
2135
|
-
},
|
|
2136
|
-
var G =
|
|
2104
|
+
}, Lo(t)), b = new No(f), _ = b.keys, o = b.values, h = b.canTransformKey, v = b.shouldCloneArguments, m = b.shouldUpdateOnAdd, g = b.shouldUpdateOnChange, y = b.shouldUpdateOnHit, k = function() {
|
|
2105
|
+
var G = v ? he(arguments) : arguments;
|
|
2137
2106
|
h && (G = p(G));
|
|
2138
|
-
var
|
|
2139
|
-
if (
|
|
2140
|
-
y && c(b, f, k),
|
|
2107
|
+
var O = _.length ? b.getKeyIndex(G) : -1;
|
|
2108
|
+
if (O !== -1)
|
|
2109
|
+
y && c(b, f, k), O && (b.orderByLru(_[O], o[O], O), g && d(b, f, k));
|
|
2141
2110
|
else {
|
|
2142
|
-
var
|
|
2143
|
-
b.orderByLru(
|
|
2111
|
+
var gi = e.apply(this, arguments), mi = v ? G : he(arguments);
|
|
2112
|
+
b.orderByLru(mi, gi, _.length), s && b.updateAsyncCache(k), m && E(b, f, k), g && d(b, f, k);
|
|
2144
2113
|
}
|
|
2145
2114
|
return o[0];
|
|
2146
2115
|
};
|
|
2147
2116
|
return k.cache = b, k.fn = e, k.isMemoized = !0, k.options = f, k;
|
|
2148
2117
|
}
|
|
2149
|
-
const
|
|
2118
|
+
const Oo = /("(?:\\?[^])*?")|(\/\/.*)|(\/\*[^]*?\*\/)/g, xo = /("(?:\\?[^])*?")|(,\s*)(?=]|})/g, Ie = {
|
|
2150
2119
|
parse: (e) => {
|
|
2151
2120
|
e = String(e);
|
|
2152
2121
|
try {
|
|
2153
2122
|
return JSON.parse(e);
|
|
2154
2123
|
} catch {
|
|
2155
|
-
return JSON.parse(e.replace(
|
|
2124
|
+
return JSON.parse(e.replace(Oo, "$1").replace(xo, "$1"));
|
|
2156
2125
|
}
|
|
2157
2126
|
}
|
|
2158
|
-
}, { label:
|
|
2159
|
-
async function
|
|
2127
|
+
}, { label: Io } = T;
|
|
2128
|
+
async function ti(e) {
|
|
2160
2129
|
try {
|
|
2161
2130
|
const { readFile: t } = await import("node:fs/promises"), n = await t(e, { encoding: "utf-8" });
|
|
2162
|
-
return
|
|
2131
|
+
return Ie.parse(n);
|
|
2163
2132
|
} catch {
|
|
2164
2133
|
}
|
|
2165
2134
|
}
|
|
2166
|
-
const
|
|
2135
|
+
const Po = /* @__PURE__ */ new URL(
|
|
2167
2136
|
`data:text/javascript,${encodeURIComponent('import{pathToFileURL as o}from"node:url";import{parentPort as t,workerData as a}from"node:worker_threads";const s=async({absolutePath:r})=>{try{const e=await import(o(r).href);t?.postMessage(e.embeddedOverrides??e.default??void 0)}catch{t?.postMessage(void 0)}};s(a);')}`
|
|
2168
|
-
),
|
|
2137
|
+
), Bo = /* @__PURE__ */ new URL(
|
|
2169
2138
|
`data:text/javascript,${encodeURIComponent('import{register as a}from"node:module";import{pathToFileURL as s}from"node:url";import{parentPort as t,workerData as i}from"node:worker_threads";const d=async({absolutePath:r,importMetaUrl:o})=>{a("tsx/esm",{parentURL:o,data:!0});try{const e=await import(s(r).href);t?.postMessage(e.embeddedOverrides??e.default??void 0)}catch{t?.postMessage(void 0)}};d(i);')}`
|
|
2170
2139
|
);
|
|
2171
|
-
async function
|
|
2140
|
+
async function qo(e) {
|
|
2172
2141
|
const { Worker: t } = await import("node:worker_threads");
|
|
2173
2142
|
return new Promise((n) => {
|
|
2174
|
-
const r = new t(
|
|
2143
|
+
const r = new t(Po, {
|
|
2175
2144
|
workerData: {
|
|
2176
2145
|
absolutePath: e
|
|
2177
2146
|
}
|
|
@@ -2183,10 +2152,10 @@ async function jo(e) {
|
|
|
2183
2152
|
});
|
|
2184
2153
|
});
|
|
2185
2154
|
}
|
|
2186
|
-
async function
|
|
2155
|
+
async function jo(e) {
|
|
2187
2156
|
const { Worker: t } = await import("node:worker_threads");
|
|
2188
2157
|
return new Promise((n) => {
|
|
2189
|
-
const r = new t(
|
|
2158
|
+
const r = new t(Bo, {
|
|
2190
2159
|
workerData: {
|
|
2191
2160
|
absolutePath: e,
|
|
2192
2161
|
importMetaUrl: import.meta.url
|
|
@@ -2199,7 +2168,7 @@ async function Uo(e) {
|
|
|
2199
2168
|
});
|
|
2200
2169
|
});
|
|
2201
2170
|
}
|
|
2202
|
-
const
|
|
2171
|
+
const Uo = li(
|
|
2203
2172
|
async (e, t) => {
|
|
2204
2173
|
const { isAbsolute: n, dirname: r, resolve: i } = await import("node:path");
|
|
2205
2174
|
if (n(e))
|
|
@@ -2208,7 +2177,7 @@ const Ro = ci(
|
|
|
2208
2177
|
let s;
|
|
2209
2178
|
return typeof a != "string" ? s = process.env.PWD ?? process.cwd() : s = r(a), i(s, e);
|
|
2210
2179
|
}
|
|
2211
|
-
),
|
|
2180
|
+
), Ro = async (e, t) => {
|
|
2212
2181
|
let n;
|
|
2213
2182
|
try {
|
|
2214
2183
|
n = (await import("node:path")).extname(
|
|
@@ -2216,56 +2185,56 @@ const Ro = ci(
|
|
|
2216
2185
|
);
|
|
2217
2186
|
} catch {
|
|
2218
2187
|
try {
|
|
2219
|
-
return
|
|
2188
|
+
return Ie.parse(e);
|
|
2220
2189
|
} catch {
|
|
2221
2190
|
console.error("Failed to parse embeddedOverrides as a json object");
|
|
2222
2191
|
return;
|
|
2223
2192
|
}
|
|
2224
2193
|
}
|
|
2225
|
-
const r =
|
|
2194
|
+
const r = Uo(
|
|
2226
2195
|
e,
|
|
2227
2196
|
t
|
|
2228
2197
|
);
|
|
2229
2198
|
if (n === ".json" || n === ".jsonc") {
|
|
2230
|
-
const i = await r, a = await
|
|
2199
|
+
const i = await r, a = await ti(i);
|
|
2231
2200
|
if (a !== void 0)
|
|
2232
2201
|
return a;
|
|
2233
2202
|
console.error(`Failed to parse the json file: ${i}`);
|
|
2234
2203
|
return;
|
|
2235
2204
|
}
|
|
2236
2205
|
if (n === ".mjs" || n === ".cjs" || n === ".js") {
|
|
2237
|
-
const i = await r, a = await
|
|
2206
|
+
const i = await r, a = await qo(i);
|
|
2238
2207
|
if (a !== void 0)
|
|
2239
2208
|
return a;
|
|
2240
2209
|
console.error(`Failed to parse the js module file: ${i}`);
|
|
2241
2210
|
return;
|
|
2242
2211
|
}
|
|
2243
2212
|
if (n === ".mts" || n === ".cts" || n === ".ts") {
|
|
2244
|
-
const i = await r, a = await
|
|
2213
|
+
const i = await r, a = await jo(i);
|
|
2245
2214
|
if (a !== void 0)
|
|
2246
2215
|
return a;
|
|
2247
2216
|
console.error(`Failed to parse the ts module file: ${i}`);
|
|
2248
2217
|
return;
|
|
2249
2218
|
}
|
|
2250
2219
|
if (n === "") {
|
|
2251
|
-
const i = await r, a = await
|
|
2220
|
+
const i = await r, a = await ti(i);
|
|
2252
2221
|
if (a !== void 0)
|
|
2253
2222
|
return a;
|
|
2254
2223
|
}
|
|
2255
2224
|
try {
|
|
2256
|
-
return
|
|
2225
|
+
return Ie.parse(e);
|
|
2257
2226
|
} catch {
|
|
2258
2227
|
console.error("Failed to parse embeddedOverrides as a json object");
|
|
2259
2228
|
}
|
|
2260
2229
|
};
|
|
2261
|
-
async function
|
|
2230
|
+
async function Co(e, {
|
|
2262
2231
|
commentOrTag: t,
|
|
2263
2232
|
kind: n,
|
|
2264
2233
|
filepath: r
|
|
2265
2234
|
}) {
|
|
2266
2235
|
if (e === void 0)
|
|
2267
2236
|
return;
|
|
2268
|
-
const i = await
|
|
2237
|
+
const i = await Ro(
|
|
2269
2238
|
e,
|
|
2270
2239
|
r
|
|
2271
2240
|
);
|
|
@@ -2280,7 +2249,7 @@ async function wo(e, {
|
|
|
2280
2249
|
return l;
|
|
2281
2250
|
}
|
|
2282
2251
|
}
|
|
2283
|
-
const
|
|
2252
|
+
const wo = /* @__PURE__ */ (() => {
|
|
2284
2253
|
const e = /* @__PURE__ */ new Set([
|
|
2285
2254
|
"start",
|
|
2286
2255
|
"end",
|
|
@@ -2303,14 +2272,14 @@ const Fo = /* @__PURE__ */ (() => {
|
|
|
2303
2272
|
if (i.type === "File" && (i = i.program), !(i.type === "Program" && i.body[0]?.type === "ExpressionStatement"))
|
|
2304
2273
|
return !1;
|
|
2305
2274
|
const a = i.body[0]?.expression;
|
|
2306
|
-
return a?.type !== "TaggedTemplateExpression" ? !1 : !!
|
|
2275
|
+
return a?.type !== "TaggedTemplateExpression" ? !1 : !!ui(
|
|
2307
2276
|
t,
|
|
2308
2277
|
a.tag,
|
|
2309
2278
|
e
|
|
2310
2279
|
);
|
|
2311
2280
|
};
|
|
2312
2281
|
})();
|
|
2313
|
-
function
|
|
2282
|
+
function Fo({
|
|
2314
2283
|
node: e,
|
|
2315
2284
|
parent: t
|
|
2316
2285
|
}) {
|
|
@@ -2331,23 +2300,23 @@ function Wo({
|
|
|
2331
2300
|
if (i.length > 1 && i.startsWith(" ") && i.endsWith(" "))
|
|
2332
2301
|
return i.slice(1, -1);
|
|
2333
2302
|
}
|
|
2334
|
-
function
|
|
2303
|
+
function Wo({
|
|
2335
2304
|
parent: e
|
|
2336
2305
|
}) {
|
|
2337
2306
|
if (e?.type === "TaggedTemplateExpression")
|
|
2338
2307
|
return e.tag.type === "Identifier" ? e.tag.name : e.tag;
|
|
2339
2308
|
}
|
|
2340
|
-
function
|
|
2309
|
+
function zo(e, t) {
|
|
2341
2310
|
const n = /* @__PURE__ */ (() => {
|
|
2342
2311
|
let r;
|
|
2343
2312
|
return () => (r === void 0 && (r = !(e.noEmbeddedIdentificationByComment?.includes(t) ?? !1)), r);
|
|
2344
2313
|
})();
|
|
2345
2314
|
return function* (r) {
|
|
2346
|
-
const i = e[
|
|
2347
|
-
i.length === 0 && n() ? yield* e[
|
|
2315
|
+
const i = e[M(r)] ?? [];
|
|
2316
|
+
i.length === 0 && n() ? yield* e[$(r)] ?? [] : yield* i;
|
|
2348
2317
|
};
|
|
2349
2318
|
}
|
|
2350
|
-
function
|
|
2319
|
+
function ni(e, t) {
|
|
2351
2320
|
if (typeof t == "string") {
|
|
2352
2321
|
const n = /* @__PURE__ */ (() => {
|
|
2353
2322
|
let r;
|
|
@@ -2355,26 +2324,26 @@ function ii(e, t) {
|
|
|
2355
2324
|
})();
|
|
2356
2325
|
return function* (r) {
|
|
2357
2326
|
const i = e[D(r)] ?? [];
|
|
2358
|
-
i.length === 0 && n() ? yield* e[
|
|
2327
|
+
i.length === 0 && n() ? yield* e[$(r)] ?? [] : yield* i;
|
|
2359
2328
|
};
|
|
2360
2329
|
}
|
|
2361
2330
|
return function* (n) {
|
|
2362
2331
|
const r = e[D(n)] ?? [];
|
|
2363
2332
|
if (r.length === 0) {
|
|
2364
2333
|
const { noEmbeddedIdentificationByTag: i } = e;
|
|
2365
|
-
for (const a of e[
|
|
2334
|
+
for (const a of e[$(n)] ?? [])
|
|
2366
2335
|
i?.includes(a) || (yield a);
|
|
2367
2336
|
} else
|
|
2368
2337
|
yield* r;
|
|
2369
2338
|
};
|
|
2370
2339
|
}
|
|
2371
|
-
function
|
|
2372
|
-
const a =
|
|
2340
|
+
function Oe(e, t, n, r, i) {
|
|
2341
|
+
const a = ai[t];
|
|
2373
2342
|
if (!a)
|
|
2374
2343
|
return null;
|
|
2375
2344
|
if (e.quasis.length === 1 && e.quasis[0]?.value.raw.trim() === "")
|
|
2376
2345
|
return "``";
|
|
2377
|
-
const s =
|
|
2346
|
+
const s = Co(
|
|
2378
2347
|
i.embeddedOverrides,
|
|
2379
2348
|
{
|
|
2380
2349
|
commentOrTag: n,
|
|
@@ -2389,7 +2358,7 @@ function Ie(e, t, n, r, i) {
|
|
|
2389
2358
|
kind: r,
|
|
2390
2359
|
embeddedOverrideOptions: await s
|
|
2391
2360
|
});
|
|
2392
|
-
return
|
|
2361
|
+
return Io(
|
|
2393
2362
|
{
|
|
2394
2363
|
embed: !0,
|
|
2395
2364
|
...u.label
|
|
@@ -2401,35 +2370,35 @@ function Ie(e, t, n, r, i) {
|
|
|
2401
2370
|
}
|
|
2402
2371
|
};
|
|
2403
2372
|
}
|
|
2404
|
-
function
|
|
2405
|
-
return Object.is(e, t) ? !0 : e === null || t === null ? !1 : Array.isArray(e) ?
|
|
2373
|
+
function ci(e, t, n) {
|
|
2374
|
+
return Object.is(e, t) ? !0 : e === null || t === null ? !1 : Array.isArray(e) ? Ko(e, t, n) : typeof e == "object" ? ui(e, t, n) : !1;
|
|
2406
2375
|
}
|
|
2407
|
-
function
|
|
2376
|
+
function Ko(e, t, n) {
|
|
2408
2377
|
const r = e.length;
|
|
2409
2378
|
if (r !== t.length)
|
|
2410
2379
|
return !1;
|
|
2411
2380
|
for (let i = 0; i < r; i++)
|
|
2412
|
-
if (!
|
|
2381
|
+
if (!ci(e[i], t[i], n))
|
|
2413
2382
|
return !1;
|
|
2414
2383
|
return !0;
|
|
2415
2384
|
}
|
|
2416
|
-
function
|
|
2385
|
+
function ui(e, t, n) {
|
|
2417
2386
|
for (const r of Object.keys(e))
|
|
2418
|
-
if (!n?.has(r) && !(Object.prototype.hasOwnProperty.call(t, r) &&
|
|
2387
|
+
if (!n?.has(r) && !(Object.prototype.hasOwnProperty.call(t, r) && ci(e[r], t[r], n)))
|
|
2419
2388
|
return !1;
|
|
2420
2389
|
return !0;
|
|
2421
2390
|
}
|
|
2422
|
-
const { estree:
|
|
2391
|
+
const { estree: pi } = _i, { embed: xe } = pi, Jo = (e, t) => {
|
|
2423
2392
|
const { node: n } = e;
|
|
2424
2393
|
if (n.type !== "TemplateLiteral" || n.quasis.some(({ value: { cooked: a } }) => a === null))
|
|
2425
2394
|
return null;
|
|
2426
|
-
const r =
|
|
2395
|
+
const r = Fo(e);
|
|
2427
2396
|
if (typeof r == "string") {
|
|
2428
|
-
const a =
|
|
2397
|
+
const a = zo(
|
|
2429
2398
|
t,
|
|
2430
2399
|
r
|
|
2431
2400
|
);
|
|
2432
|
-
for (const s of
|
|
2401
|
+
for (const s of ge) {
|
|
2433
2402
|
let l = !1;
|
|
2434
2403
|
for (const u of a(
|
|
2435
2404
|
s
|
|
@@ -2439,7 +2408,7 @@ const { estree: gi } = $i, { embed: Oe } = gi, Ho = (e, t) => {
|
|
|
2439
2408
|
break;
|
|
2440
2409
|
}
|
|
2441
2410
|
if (l)
|
|
2442
|
-
return
|
|
2411
|
+
return Oe(
|
|
2443
2412
|
n,
|
|
2444
2413
|
s,
|
|
2445
2414
|
r,
|
|
@@ -2447,12 +2416,12 @@ const { estree: gi } = $i, { embed: Oe } = gi, Ho = (e, t) => {
|
|
|
2447
2416
|
t
|
|
2448
2417
|
);
|
|
2449
2418
|
}
|
|
2450
|
-
return
|
|
2419
|
+
return xe?.(e, t) ?? null;
|
|
2451
2420
|
}
|
|
2452
|
-
const i =
|
|
2421
|
+
const i = Wo(e);
|
|
2453
2422
|
if (typeof i == "string") {
|
|
2454
|
-
const a =
|
|
2455
|
-
for (const s of
|
|
2423
|
+
const a = ni(t, i);
|
|
2424
|
+
for (const s of ge) {
|
|
2456
2425
|
let l = !1;
|
|
2457
2426
|
for (const u of a(s))
|
|
2458
2427
|
if (i === u) {
|
|
@@ -2460,24 +2429,24 @@ const { estree: gi } = $i, { embed: Oe } = gi, Ho = (e, t) => {
|
|
|
2460
2429
|
break;
|
|
2461
2430
|
}
|
|
2462
2431
|
if (l)
|
|
2463
|
-
return
|
|
2432
|
+
return Oe(n, s, i, "tag", t);
|
|
2464
2433
|
}
|
|
2465
|
-
return
|
|
2434
|
+
return xe?.(e, t) ?? null;
|
|
2466
2435
|
}
|
|
2467
2436
|
if (i !== void 0) {
|
|
2468
|
-
const a = (l) =>
|
|
2437
|
+
const a = (l) => Mo[t.parser].parse(
|
|
2469
2438
|
l,
|
|
2470
2439
|
t
|
|
2471
|
-
), s =
|
|
2472
|
-
for (const l of
|
|
2440
|
+
), s = ni(t);
|
|
2441
|
+
for (const l of ge) {
|
|
2473
2442
|
let u;
|
|
2474
2443
|
for (const E of s(l))
|
|
2475
|
-
if (
|
|
2444
|
+
if (wo(i, E, a)) {
|
|
2476
2445
|
u = E;
|
|
2477
2446
|
break;
|
|
2478
2447
|
}
|
|
2479
2448
|
if (u !== void 0)
|
|
2480
|
-
return
|
|
2449
|
+
return Oe(
|
|
2481
2450
|
n,
|
|
2482
2451
|
l,
|
|
2483
2452
|
u,
|
|
@@ -2486,15 +2455,15 @@ const { estree: gi } = $i, { embed: Oe } = gi, Ho = (e, t) => {
|
|
|
2486
2455
|
);
|
|
2487
2456
|
}
|
|
2488
2457
|
}
|
|
2489
|
-
return
|
|
2490
|
-
},
|
|
2458
|
+
return xe?.(e, t) ?? null;
|
|
2459
|
+
}, ia = {
|
|
2491
2460
|
estree: {
|
|
2492
|
-
...
|
|
2493
|
-
embed:
|
|
2461
|
+
...pi,
|
|
2462
|
+
embed: Jo
|
|
2494
2463
|
}
|
|
2495
2464
|
};
|
|
2496
2465
|
export {
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2466
|
+
na as options,
|
|
2467
|
+
Mo as parsers,
|
|
2468
|
+
ia as printers
|
|
2500
2469
|
};
|