prettier-plugin-embed 0.6.0 → 0.7.1

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.
Files changed (94) hide show
  1. package/README.md +362 -51
  2. package/dist/embedded/astro/embedder.d.ts +7 -0
  3. package/dist/embedded/astro/index.d.ts +3 -0
  4. package/dist/embedded/astro/language.d.ts +6 -0
  5. package/dist/embedded/astro/options.d.ts +40 -0
  6. package/dist/embedded/create-embedder.d.ts +14 -0
  7. package/dist/embedded/css/embedder.d.ts +1 -6
  8. package/dist/embedded/dockerfile/embedder.d.ts +7 -0
  9. package/dist/embedded/dockerfile/index.d.ts +3 -0
  10. package/dist/embedded/dockerfile/language.d.ts +6 -0
  11. package/dist/embedded/dockerfile/options.d.ts +40 -0
  12. package/dist/embedded/es/embedder.d.ts +1 -6
  13. package/dist/embedded/gherkin/embedder.d.ts +7 -0
  14. package/dist/embedded/gherkin/index.d.ts +3 -0
  15. package/dist/embedded/gherkin/language.d.ts +6 -0
  16. package/dist/embedded/gherkin/options.d.ts +40 -0
  17. package/dist/embedded/glsl/embedder.d.ts +1 -6
  18. package/dist/embedded/go-template/embedder.d.ts +7 -0
  19. package/dist/embedded/go-template/index.d.ts +3 -0
  20. package/dist/embedded/go-template/language.d.ts +6 -0
  21. package/dist/embedded/go-template/options.d.ts +40 -0
  22. package/dist/embedded/graphql/embedder.d.ts +1 -6
  23. package/dist/embedded/handlebars/embedder.d.ts +7 -0
  24. package/dist/embedded/handlebars/index.d.ts +3 -0
  25. package/dist/embedded/handlebars/language.d.ts +6 -0
  26. package/dist/embedded/handlebars/options.d.ts +40 -0
  27. package/dist/embedded/html/embedder.d.ts +1 -6
  28. package/dist/embedded/hugo/embedder.d.ts +7 -0
  29. package/dist/embedded/hugo/index.d.ts +3 -0
  30. package/dist/embedded/hugo/language.d.ts +6 -0
  31. package/dist/embedded/hugo/options.d.ts +40 -0
  32. package/dist/embedded/ini/embedder.d.ts +1 -6
  33. package/dist/embedded/java/embedder.d.ts +1 -6
  34. package/dist/embedded/jinja/embedder.d.ts +7 -0
  35. package/dist/embedded/jinja/index.d.ts +3 -0
  36. package/dist/embedded/jinja/language.d.ts +6 -0
  37. package/dist/embedded/jinja/options.d.ts +40 -0
  38. package/dist/embedded/jsonata/embedder.d.ts +1 -6
  39. package/dist/embedded/jte/embedder.d.ts +7 -0
  40. package/dist/embedded/jte/index.d.ts +3 -0
  41. package/dist/embedded/jte/language.d.ts +6 -0
  42. package/dist/embedded/jte/options.d.ts +40 -0
  43. package/dist/embedded/latex/embedder.d.ts +1 -6
  44. package/dist/embedded/liquid/embedder.d.ts +7 -0
  45. package/dist/embedded/liquid/index.d.ts +3 -0
  46. package/dist/embedded/liquid/language.d.ts +6 -0
  47. package/dist/embedded/liquid/options.d.ts +40 -0
  48. package/dist/embedded/marko/embedder.d.ts +7 -0
  49. package/dist/embedded/marko/index.d.ts +3 -0
  50. package/dist/embedded/marko/language.d.ts +6 -0
  51. package/dist/embedded/marko/options.d.ts +40 -0
  52. package/dist/embedded/motoko/embedder.d.ts +7 -0
  53. package/dist/embedded/motoko/index.d.ts +3 -0
  54. package/dist/embedded/motoko/language.d.ts +6 -0
  55. package/dist/embedded/motoko/options.d.ts +40 -0
  56. package/dist/embedded/mustache/embedder.d.ts +7 -0
  57. package/dist/embedded/mustache/index.d.ts +3 -0
  58. package/dist/embedded/mustache/language.d.ts +6 -0
  59. package/dist/embedded/mustache/options.d.ts +40 -0
  60. package/dist/embedded/nginx/embedder.d.ts +1 -6
  61. package/dist/embedded/nunjucks/embedder.d.ts +7 -0
  62. package/dist/embedded/nunjucks/index.d.ts +3 -0
  63. package/dist/embedded/nunjucks/language.d.ts +6 -0
  64. package/dist/embedded/nunjucks/options.d.ts +40 -0
  65. package/dist/embedded/pegjs/embedder.d.ts +1 -6
  66. package/dist/embedded/php/embedder.d.ts +1 -6
  67. package/dist/embedded/powershell/embedder.d.ts +7 -0
  68. package/dist/embedded/powershell/index.d.ts +3 -0
  69. package/dist/embedded/powershell/language.d.ts +6 -0
  70. package/dist/embedded/powershell/options.d.ts +40 -0
  71. package/dist/embedded/prisma/embedder.d.ts +1 -6
  72. package/dist/embedded/properties/embedder.d.ts +1 -6
  73. package/dist/embedded/pug/embedder.d.ts +1 -6
  74. package/dist/embedded/register.d.ts +42 -25
  75. package/dist/embedded/ruby/embedder.d.ts +1 -6
  76. package/dist/embedded/sh/embedder.d.ts +1 -6
  77. package/dist/embedded/solidity/embedder.d.ts +7 -0
  78. package/dist/embedded/solidity/index.d.ts +3 -0
  79. package/dist/embedded/solidity/language.d.ts +6 -0
  80. package/dist/embedded/solidity/options.d.ts +58 -0
  81. package/dist/embedded/svelte/embedder.d.ts +7 -0
  82. package/dist/embedded/svelte/index.d.ts +3 -0
  83. package/dist/embedded/svelte/language.d.ts +6 -0
  84. package/dist/embedded/svelte/options.d.ts +40 -0
  85. package/dist/embedded/toml/embedder.d.ts +1 -6
  86. package/dist/embedded/ts/embedder.d.ts +1 -6
  87. package/dist/embedded/utils.d.ts +1 -1
  88. package/dist/embedded/xquery/embedder.d.ts +7 -0
  89. package/dist/embedded/xquery/index.d.ts +3 -0
  90. package/dist/embedded/xquery/language.d.ts +6 -0
  91. package/dist/embedded/xquery/options.d.ts +55 -0
  92. package/dist/index.js +1126 -819
  93. package/dist/options.d.ts +335 -0
  94. package/package.json +18 -1
package/dist/index.js CHANGED
@@ -17,8 +17,95 @@ var f = Object.defineProperty, p = (e, t) => {
17
17
  enumerable: !0
18
18
  });
19
19
  return t || f(n, Symbol.toStringTag, { value: "Module" }), n;
20
- }, { group: m, indent: h, line: ee, softline: g, lineSuffixBoundary: te, addAlignmentToDoc: ne, align: re, hardline: ie } = e, { mapDoc: ae, replaceEndOfLine: oe } = t;
21
- function _(e, t) {
20
+ };
21
+ //#endregion
22
+ //#region node_modules/.pnpm/dedent@1.7.2/node_modules/dedent/dist/dedent.mjs
23
+ function m(e, t) {
24
+ var n = Object.keys(e);
25
+ if (Object.getOwnPropertySymbols) {
26
+ var r = Object.getOwnPropertySymbols(e);
27
+ t && (r = r.filter(function(t) {
28
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
29
+ })), n.push.apply(n, r);
30
+ }
31
+ return n;
32
+ }
33
+ function h(e) {
34
+ for (var t = 1; t < arguments.length; t++) {
35
+ var n = arguments[t] == null ? {} : arguments[t];
36
+ t % 2 ? m(Object(n), !0).forEach(function(t) {
37
+ ee(e, t, n[t]);
38
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : m(Object(n)).forEach(function(t) {
39
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
40
+ });
41
+ }
42
+ return e;
43
+ }
44
+ function ee(e, t, n) {
45
+ return t = te(t), t in e ? Object.defineProperty(e, t, {
46
+ value: n,
47
+ enumerable: !0,
48
+ configurable: !0,
49
+ writable: !0
50
+ }) : e[t] = n, e;
51
+ }
52
+ function te(e) {
53
+ var t = ne(e, "string");
54
+ return typeof t == "symbol" ? t : String(t);
55
+ }
56
+ function ne(e, t) {
57
+ if (typeof e != "object" || !e) return e;
58
+ var n = e[Symbol.toPrimitive];
59
+ if (n !== void 0) {
60
+ var r = n.call(e, t || "default");
61
+ if (typeof r != "object") return r;
62
+ throw TypeError("@@toPrimitive must return a primitive value.");
63
+ }
64
+ return (t === "string" ? String : Number)(e);
65
+ }
66
+ var re = ie({});
67
+ function ie(e) {
68
+ return t.withOptions = (t) => ie(h(h({}, e), t)), t;
69
+ function t(t, ...n) {
70
+ let r = typeof t == "string" ? [t] : t.raw, { alignValues: i = !1, escapeSpecialCharacters: a = Array.isArray(t), trimWhitespace: o = !0 } = e, s = "";
71
+ for (let e = 0; e < r.length; e++) {
72
+ let t = r[e];
73
+ if (a && (t = t.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\\{/g, "{")), s += t, e < n.length) {
74
+ let t = i ? ae(n[e], s) : n[e];
75
+ s += t;
76
+ }
77
+ }
78
+ let c = s.split("\n"), l = null;
79
+ for (let e of c) {
80
+ let t = e.match(/^(\s+)\S+/);
81
+ if (t) {
82
+ let e = t[1].length;
83
+ l = l ? Math.min(l, e) : e;
84
+ }
85
+ }
86
+ if (l !== null) {
87
+ let e = l;
88
+ s = c.map((t) => t[0] === " " || t[0] === " " ? t.slice(e) : t).join("\n");
89
+ }
90
+ return o && (s = s.trim()), a && (s = s.replace(/\\n/g, "\n").replace(/\\t/g, " ").replace(/\\r/g, "\r").replace(/\\v/g, "\v").replace(/\\b/g, "\b").replace(/\\f/g, "\f").replace(/\\0/g, "\0").replace(/\\x([\da-fA-F]{2})/g, (e, t) => String.fromCharCode(parseInt(t, 16))).replace(/\\u\{([\da-fA-F]{1,6})\}/g, (e, t) => String.fromCodePoint(parseInt(t, 16))).replace(/\\u([\da-fA-F]{4})/g, (e, t) => String.fromCharCode(parseInt(t, 16)))), typeof Bun < "u" && (s = s.replace(/\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g, (e, t, n) => {
91
+ let r = t ?? n ?? "";
92
+ return String.fromCodePoint(parseInt(r, 16));
93
+ })), s;
94
+ }
95
+ }
96
+ function ae(e, t) {
97
+ if (typeof e != "string" || !e.includes("\n")) return e;
98
+ let n = t.slice(t.lastIndexOf("\n") + 1).match(/^(\s+)/);
99
+ if (n) {
100
+ let t = n[1];
101
+ return e.replace(/\n/g, `\n${t}`);
102
+ }
103
+ return e;
104
+ }
105
+ //#endregion
106
+ //#region src/embedded/utils.ts
107
+ var { group: g, indent: _, line: oe, softline: v, lineSuffixBoundary: se, addAlignmentToDoc: ce, align: le, hardline: ue } = e, { mapDoc: de, replaceEndOfLine: fe } = t;
108
+ function y(e, t) {
22
109
  let n = e.quasis.map((e, n, { length: r }) => n === r - 1 ? e.value.cooked : e.value.cooked + t(n)).join(""), r = n.match(/^\s+/)?.[0] ?? "", i = n.match(/\s+$/)?.[0] ?? "";
23
110
  return {
24
111
  trimmedText: n.slice(r.length, -i.length || void 0),
@@ -26,42 +113,42 @@ function _(e, t) {
26
113
  trailingWhitespaces: i
27
114
  };
28
115
  }
29
- function v(e, t, n, r, i, a = !1) {
30
- let o = a || t.preserveEmbeddedExteriorWhitespaces?.includes(n), s = t.noEmbeddedMultiLineIndentation?.includes(n), c = m(e);
31
- if (o) return m([
116
+ function b(e, t, n, r, i, a = !1) {
117
+ let o = a || t.preserveEmbeddedExteriorWhitespaces?.includes(n), s = t.noEmbeddedMultiLineIndentation?.includes(n), c = g(e);
118
+ if (o) return g([
32
119
  "`",
33
120
  r,
34
- s ? c : h([c]),
121
+ s ? c : _([c]),
35
122
  i,
36
123
  "`"
37
124
  ]);
38
- let l = r.length ? ee : g, u = i.length ? ee : g;
39
- return m([
125
+ let l = r.length ? oe : v, u = i.length ? oe : v;
126
+ return g([
40
127
  "`",
41
- s ? [l, c] : h([l, c]),
128
+ s ? [l, c] : _([l, c]),
42
129
  u,
43
130
  "`"
44
131
  ]);
45
132
  }
46
- function se(e, t) {
133
+ function pe(e, t) {
47
134
  let n = 0;
48
135
  for (let r of e) r === " " ? n = n + t - n % t : n++;
49
136
  return n;
50
137
  }
51
- function ce(e, t) {
138
+ function me(e, t) {
52
139
  let n = e.lastIndexOf("\n"), r = e.slice(n + 1), i = /^[\t ]*/.exec(r)[0];
53
- return se(i, t);
140
+ return pe(i, t);
54
141
  }
55
- function le(e, t, n) {
142
+ function he(e, t, n) {
56
143
  let r = t, i = e.quasis[r].value.raw;
57
144
  if (i.includes("\n")) return {
58
- indentSize: ce(i, n),
145
+ indentSize: me(i, n),
59
146
  previousQuasiText: i
60
147
  };
61
148
  for (; r-- > 0;) {
62
149
  let t = e.quasis[r].value.raw;
63
150
  if (t.includes("\n")) return {
64
- indentSize: ce(t, n),
151
+ indentSize: me(t, n),
65
152
  previousQuasiText: i
66
153
  };
67
154
  }
@@ -70,55 +157,59 @@ function le(e, t, n) {
70
157
  previousQuasiText: i
71
158
  };
72
159
  }
73
- function ue(e, t, n, r, i, a = !0) {
160
+ function ge(e, t, n, r, i, a = !0) {
74
161
  let { node: o } = e, s = t();
75
- if (o?.comments?.length && (s = m([h([g, s]), g])), !a) return m([
162
+ if (o?.comments?.length && (s = g([_([v, s]), v])), !a) return g([
76
163
  "${",
77
164
  s,
78
- te,
165
+ se,
79
166
  "}"
80
167
  ]);
81
- let { indentSize: c, previousQuasiText: l } = le(n, r, i), u = s;
82
- return u = c === 0 && l.endsWith("\n") ? re(-Infinity, u) : ne(u, c, i), m([
168
+ let { indentSize: c, previousQuasiText: l } = he(n, r, i), u = s;
169
+ return u = c === 0 && l.endsWith("\n") ? le(-Infinity, u) : ce(u, c, i), g([
83
170
  "${",
84
171
  u,
85
- te,
172
+ se,
86
173
  "}"
87
174
  ]);
88
175
  }
89
- function y(e, t, n, r = !0) {
176
+ function x(e, t, n, r = !0) {
90
177
  let i = n?.tabWidth ?? 2, a = e.node;
91
- return e.map((e, n) => ue(e, t, a, n, i, r), "expressions");
178
+ return e.map((e, n) => ge(e, t, a, n, i, r), "expressions");
92
179
  }
93
- function b(e, t, n, r = !1, i, a) {
94
- return ae(e, (e) => {
180
+ function S(e, t, n, r = !1, i, a, o = !1) {
181
+ let s = n.length ? /* @__PURE__ */ new Set() : void 0, c = de(e, (e) => {
95
182
  if (typeof e != "string") return e;
96
- let o = [], s = e.split(t), c = "";
97
- for (let e = 0; e < s.length; e++) {
98
- let t = s[e];
183
+ let c = [], l = e.split(t), u = "";
184
+ for (let e = 0; e < l.length; e++) {
185
+ let t = l[e];
99
186
  if (e % 2 == 0) {
100
187
  if (e === 0 || t.includes("\n")) {
101
188
  let e = t.slice(t.lastIndexOf("\n") + 1);
102
- c = /^[\t ]*/.exec(e)[0];
189
+ u = /^[\t ]*/.exec(e)[0];
103
190
  }
104
191
  if (!t) continue;
105
- if (t = t.replaceAll(/([\\`]|\${)/g, "\\$1"), r === "literalline") o.push(oe(t));
106
- else if (r === "hardline") for (let e of t.split(/(\n)/)) e === "\n" ? o.push(ie) : o.push(e);
107
- else o.push(t);
192
+ if (t = t.replaceAll(/([\\`]|\${)/g, "\\$1"), o && (t = t.replaceAll(/<\/(?=script\b)/gi, "<\\/")), r === "literalline") c.push(fe(t));
193
+ else if (r === "hardline") for (let e of t.split(/(\n)/)) e === "\n" ? c.push(ue) : c.push(e);
194
+ else c.push(t);
108
195
  } else {
109
- let r = Number(t), l = s[e - 1];
110
- if (i?.has(r) && !/\n[\t ]*$/.test(l)) {
111
- let e = o.at(-1);
112
- typeof e == "string" && (o[o.length - 1] = e.replace(/[\t ]+$/, "")), o.push(ie), a !== void 0 && o.push(c);
196
+ let r = Number(t);
197
+ s?.add(r);
198
+ let o = l[e - 1];
199
+ if (i?.has(r) && !/\n[\t ]*$/.test(o)) {
200
+ let e = c.at(-1);
201
+ typeof e == "string" && (c[c.length - 1] = e.replace(/[\t ]+$/, "")), c.push(ue), a !== void 0 && c.push(u);
113
202
  }
114
- let u = n[r];
115
- o.push(a === void 0 ? u : re(se(c, a), u));
203
+ let d = n[r];
204
+ c.push(a === void 0 ? d : le(pe(u, a), d));
116
205
  }
117
206
  }
118
- return o;
207
+ return c;
119
208
  });
209
+ if (n.some((e, t) => !s.has(t))) throw Error("The embedded formatter changed an expression placeholder.");
210
+ return c;
120
211
  }
121
- function de(e, t, n) {
212
+ function _e(e, t, n) {
122
213
  if (t === n) {
123
214
  e.unshift(t);
124
215
  return;
@@ -134,7 +225,7 @@ function de(e, t, n) {
134
225
  }
135
226
  e.splice(r, 0, t);
136
227
  }
137
- var x = (() => {
228
+ var C = (() => {
138
229
  let e = [...Array(26).keys()].map((e) => String.fromCharCode(e + 97)).concat([...Array(10).keys()].map((e) => `${e}`));
139
230
  return () => {
140
231
  let t = "";
@@ -142,91 +233,143 @@ var x = (() => {
142
233
  return t;
143
234
  };
144
235
  })();
145
- function S(e = "p", t = "") {
146
- let n = x(), r = x(), i = fe(e), a = fe(t);
236
+ function w(e = "p", t = "") {
237
+ let n = C(), r = C(), i = ve(e), a = ve(t);
147
238
  return {
148
239
  createPlaceholder: (i) => `${e}${n}${i}${r}${t}`,
149
240
  placeholderRegex: RegExp(`${i}${n}(\\d+)${r}${a}`, "ig")
150
241
  };
151
242
  }
152
- function fe(e) {
243
+ function ve(e) {
153
244
  return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
154
245
  }
155
- function C(e) {
246
+ function T(e) {
156
247
  return `${e}Identifiers`;
157
248
  }
158
- function w(e) {
249
+ function E(e) {
159
250
  return `${e}Comments`;
160
251
  }
161
- function T(e) {
252
+ function D(e) {
162
253
  return `${e}Tags`;
163
254
  }
164
- function pe(e) {
255
+ function ye(e) {
165
256
  return `${e}Plugin`;
166
257
  }
167
- function E(e) {
258
+ function O(e) {
168
259
  return `${e}Parser`;
169
260
  }
170
- var D = "9ff2b366e8ca4c97b9aed1a29b5b94ed", me = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
171
- let o = {
172
- ...r,
173
- ...a
174
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S("@prettier-placeholder"), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
175
- return v(b(await e(u, {
176
- ...o,
177
- parser: o.embeddedCssParser ?? "scss"
178
- }), l, p, "literalline"), o, i, d, f);
179
- }, O = "embeddedCss", he = ["css"], ge = [
261
+ var k = "9ff2b366e8ca4c97b9aed1a29b5b94ed";
262
+ //#endregion
263
+ //#region src/embedded/create-embedder.ts
264
+ function A({ parser: e, parserOption: t, parserOptions: n, markup: r = !1, newlineHandling: i = !1, dedentContent: a = !1, placeholderPrefix: o = "p", transformDoc: s }) {
265
+ return async (c, l, u, d, { commentOrTag: f, embeddedOverrideOptions: p }) => {
266
+ let m = {
267
+ ...d,
268
+ ...p
269
+ }, { createPlaceholder: h, placeholderRegex: ee } = w(o), { trimmedText: te, leadingWhitespaces: ne, trailingWhitespaces: ie } = y(u.node, h), ae = x(u, l, m, !1), g = t ? m[t] : void 0, _ = await c(a ? re(te) : te, {
270
+ ...m,
271
+ ...n,
272
+ parser: g ?? e
273
+ });
274
+ return b(S(s ? s(_) : _, ee, ae, i, void 0, m.tabWidth, !!m.__embeddedInHtml), m, f, ne, ie, r && (m.htmlWhitespaceSensitivity === "strict" || m.htmlWhitespaceSensitivity === "css"));
275
+ };
276
+ }
277
+ //#endregion
278
+ //#region src/embedded/astro/embedder.ts
279
+ var be = A({
280
+ parser: "astro",
281
+ markup: !0
282
+ }), xe = "embeddedAstro", Se = ["astro"], Ce = E(xe), we = D(xe), Te = {
283
+ [Ce]: {
284
+ category: "Embed",
285
+ type: "string",
286
+ array: !0,
287
+ default: [{ value: [...Se] }],
288
+ description: "Block comments that identify embedded Astro in template literals. Requires the `prettier-plugin-astro` plugin."
289
+ },
290
+ [we]: {
291
+ category: "Embed",
292
+ type: "string",
293
+ array: !0,
294
+ default: [{ value: [...Se] }],
295
+ description: "Tags that identify embedded Astro in template literals. Requires the `prettier-plugin-astro` plugin."
296
+ }
297
+ }, Ee = /* @__PURE__ */ p({
298
+ embedder: () => be,
299
+ language: () => xe,
300
+ options: () => Te
301
+ }), De = A({
302
+ parser: "scss",
303
+ parserOption: "embeddedCssParser",
304
+ placeholderPrefix: "@prettier-placeholder",
305
+ newlineHandling: "literalline"
306
+ }), j = "embeddedCss", Oe = ["css"], ke = [
180
307
  "css",
181
308
  "less",
182
309
  "scss"
183
- ], _e = C(O), ve = w(O), ye = T(O), be = E(O), xe = {
184
- [_e]: {
310
+ ], Ae = T(j), je = E(j), Me = D(j), Ne = O(j), Pe = {
311
+ [Ae]: {
185
312
  category: "Embed",
186
313
  type: "string",
187
314
  array: !0,
188
- default: [{ value: [...he] }],
315
+ default: [{ value: [...Oe] }],
189
316
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language.",
190
- deprecated: `Please use \`${ve}\` or \`${ye}\`.`
317
+ deprecated: `Please use \`${je}\` or \`${Me}\`.`
191
318
  },
192
- [ve]: {
319
+ [je]: {
193
320
  category: "Embed",
194
321
  type: "string",
195
322
  array: !0,
196
- default: [{ value: [D] }],
323
+ default: [{ value: [k] }],
197
324
  description: "Block comments that make their subsequent template literals be identified as embedded CSS language."
198
325
  },
199
- [ye]: {
326
+ [Me]: {
200
327
  category: "Embed",
201
328
  type: "string",
202
329
  array: !0,
203
- default: [{ value: [D] }],
330
+ default: [{ value: [k] }],
204
331
  description: "Tags that make their subsequent template literals be identified as embedded CSS language."
205
332
  },
206
- [be]: {
333
+ [Ne]: {
207
334
  category: "Embed",
208
335
  type: "choice",
209
336
  default: "scss",
210
337
  description: "The parser used to parse the embedded CSS language.",
211
- choices: ge.map((e) => ({
338
+ choices: ke.map((e) => ({
212
339
  value: e,
213
340
  description: `Use the "${e}" parser.`
214
341
  }))
215
342
  }
216
- }, Se = /* @__PURE__ */ p({
217
- embedder: () => me,
218
- language: () => O,
219
- options: () => xe
220
- }), Ce = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
221
- let o = {
222
- ...r,
223
- ...a
224
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
225
- return v(b(await e(u, {
226
- ...o,
227
- parser: o.embeddedEsParser ?? "babel"
228
- }), l, p), o, i, d, f);
229
- }, k = "embeddedEs", we = [
343
+ }, Fe = /* @__PURE__ */ p({
344
+ embedder: () => De,
345
+ language: () => j,
346
+ options: () => Pe
347
+ }), Ie = A({
348
+ parser: "dockerfile",
349
+ newlineHandling: "hardline"
350
+ }), Le = "embeddedDockerfile", Re = ["dockerfile", "containerfile"], ze = E(Le), Be = D(Le), Ve = {
351
+ [ze]: {
352
+ category: "Embed",
353
+ type: "string",
354
+ array: !0,
355
+ default: [{ value: [...Re] }],
356
+ description: "Block comments that identify embedded Dockerfile in template literals. Requires the `prettier-plugin-sh` plugin."
357
+ },
358
+ [Be]: {
359
+ category: "Embed",
360
+ type: "string",
361
+ array: !0,
362
+ default: [{ value: [...Re] }],
363
+ description: "Tags that identify embedded Dockerfile in template literals. Requires the `prettier-plugin-sh` plugin."
364
+ }
365
+ }, He = /* @__PURE__ */ p({
366
+ embedder: () => Ie,
367
+ language: () => Le,
368
+ options: () => Ve
369
+ }), Ue = A({
370
+ parser: "babel",
371
+ parserOption: "embeddedEsParser"
372
+ }), M = "embeddedEs", We = [
230
373
  "js",
231
374
  "jsx",
232
375
  "es",
@@ -235,275 +378,336 @@ var D = "9ff2b366e8ca4c97b9aed1a29b5b94ed", me = async (e, t, n, r, { commentOrT
235
378
  "cjs",
236
379
  "pac",
237
380
  "javascript"
238
- ], Te = [
381
+ ], Ge = [
239
382
  "babel",
240
383
  "babel-flow",
241
384
  "acorn",
242
385
  "espree",
243
386
  "flow",
244
387
  "meriyah"
245
- ], Ee = C(k), De = w(k), Oe = T(k), ke = E(k), Ae = {
246
- [Ee]: {
388
+ ], Ke = T(M), qe = E(M), Je = D(M), Ye = O(M), Xe = {
389
+ [Ke]: {
247
390
  category: "Embed",
248
391
  type: "string",
249
392
  array: !0,
250
- default: [{ value: [...we] }],
393
+ default: [{ value: [...We] }],
251
394
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language.",
252
- deprecated: `Please use \`${De}\` or \`${Oe}\`.`
395
+ deprecated: `Please use \`${qe}\` or \`${Je}\`.`
253
396
  },
254
- [De]: {
397
+ [qe]: {
255
398
  category: "Embed",
256
399
  type: "string",
257
400
  array: !0,
258
- default: [{ value: [D] }],
401
+ default: [{ value: [k] }],
259
402
  description: "Block comments that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
260
403
  },
261
- [Oe]: {
404
+ [Je]: {
262
405
  category: "Embed",
263
406
  type: "string",
264
407
  array: !0,
265
- default: [{ value: [D] }],
408
+ default: [{ value: [k] }],
266
409
  description: "Tags that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
267
410
  },
268
- [ke]: {
411
+ [Ye]: {
269
412
  category: "Embed",
270
413
  type: "choice",
271
414
  default: "babel",
272
415
  description: "The parser used to parse the embedded ECMASCript/JavaScript language.",
273
- choices: Te.map((e) => ({
416
+ choices: Ge.map((e) => ({
274
417
  value: e,
275
418
  description: `Use the "${e}" parser.`
276
419
  }))
277
420
  }
278
- }, je = /* @__PURE__ */ p({
279
- embedder: () => Ce,
280
- language: () => k,
281
- options: () => Ae
282
- }), Me = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
283
- let o = {
284
- ...r,
285
- ...a
286
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
287
- return v(b(await e(u, {
288
- ...o,
289
- parser: "glsl-parser"
290
- }), l, p), o, i, d, f);
291
- }, A = "embeddedGlsl", Ne = ["glsl", "shader"], Pe = C(A), Fe = w(A), Ie = T(A), Le = {
292
- [Pe]: {
421
+ }, Ze = /* @__PURE__ */ p({
422
+ embedder: () => Ue,
423
+ language: () => M,
424
+ options: () => Xe
425
+ }), Qe = A({ parser: "gherkin" }), $e = "embeddedGherkin", et = ["gherkin", "feature"], tt = E($e), nt = D($e), rt = {
426
+ [tt]: {
427
+ category: "Embed",
428
+ type: "string",
429
+ array: !0,
430
+ default: [{ value: [...et] }],
431
+ description: "Block comments that identify embedded Gherkin in template literals. Requires the `prettier-plugin-gherkin` plugin."
432
+ },
433
+ [nt]: {
434
+ category: "Embed",
435
+ type: "string",
436
+ array: !0,
437
+ default: [{ value: [...et] }],
438
+ description: "Tags that identify embedded Gherkin in template literals. Requires the `prettier-plugin-gherkin` plugin."
439
+ }
440
+ }, it = /* @__PURE__ */ p({
441
+ embedder: () => Qe,
442
+ language: () => $e,
443
+ options: () => rt
444
+ }), at = A({ parser: "glsl-parser" }), ot = "embeddedGlsl", st = ["glsl", "shader"], ct = T(ot), lt = E(ot), ut = D(ot), dt = {
445
+ [ct]: {
293
446
  category: "Embed",
294
447
  type: "string",
295
448
  array: !0,
296
- default: [{ value: [...Ne] }],
449
+ default: [{ value: [...st] }],
297
450
  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.",
298
- deprecated: `Please use \`${Fe}\` or \`${Ie}\`.`
451
+ deprecated: `Please use \`${lt}\` or \`${ut}\`.`
299
452
  },
300
- [Fe]: {
453
+ [lt]: {
301
454
  category: "Embed",
302
455
  type: "string",
303
456
  array: !0,
304
- default: [{ value: [D] }],
457
+ default: [{ value: [k] }],
305
458
  description: "Block comments that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
306
459
  },
307
- [Ie]: {
460
+ [ut]: {
308
461
  category: "Embed",
309
462
  type: "string",
310
463
  array: !0,
311
- default: [{ value: [D] }],
464
+ default: [{ value: [k] }],
312
465
  description: "Tags that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
313
466
  }
314
- }, Re = /* @__PURE__ */ p({
315
- embedder: () => Me,
316
- language: () => A,
317
- options: () => Le
318
- }), ze = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
319
- let o = {
320
- ...r,
321
- ...a
322
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
323
- return v(b(await e(u, {
324
- ...o,
325
- parser: "graphql"
326
- }), l, p), o, i, d, f);
327
- }, j = "embeddedGraphql", Be = ["graphql", "gql"], Ve = C(j), He = w(j), Ue = T(j), We = {
328
- [Ve]: {
467
+ }, ft = /* @__PURE__ */ p({
468
+ embedder: () => at,
469
+ language: () => ot,
470
+ options: () => dt
471
+ }), pt = A({
472
+ parser: "go-template",
473
+ markup: !0
474
+ }), mt = "embeddedGoTemplate", ht = ["goTemplate", "gotmpl"], gt = E(mt), _t = D(mt), vt = {
475
+ [gt]: {
476
+ category: "Embed",
477
+ type: "string",
478
+ array: !0,
479
+ default: [{ value: [...ht] }],
480
+ description: "Block comments that identify embedded Go Template in template literals. Requires the `@htnabe/prettier-plugin-go-template` plugin."
481
+ },
482
+ [_t]: {
483
+ category: "Embed",
484
+ type: "string",
485
+ array: !0,
486
+ default: [{ value: [...ht] }],
487
+ description: "Tags that identify embedded Go Template in template literals. Requires the `@htnabe/prettier-plugin-go-template` plugin."
488
+ }
489
+ }, yt = /* @__PURE__ */ p({
490
+ embedder: () => pt,
491
+ language: () => mt,
492
+ options: () => vt
493
+ }), bt = A({ parser: "graphql" }), xt = "embeddedGraphql", St = ["graphql", "gql"], Ct = T(xt), wt = E(xt), Tt = D(xt), Et = {
494
+ [Ct]: {
329
495
  category: "Embed",
330
496
  type: "string",
331
497
  array: !0,
332
- default: [{ value: [...Be] }],
498
+ default: [{ value: [...St] }],
333
499
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language.",
334
- deprecated: `Please use \`${He}\` or \`${Ue}\`.`
500
+ deprecated: `Please use \`${wt}\` or \`${Tt}\`.`
335
501
  },
336
- [He]: {
502
+ [wt]: {
337
503
  category: "Embed",
338
504
  type: "string",
339
505
  array: !0,
340
- default: [{ value: [D] }],
506
+ default: [{ value: [k] }],
341
507
  description: "Block comments that make their subsequent template literals be identified as embedded GraphQL language."
342
508
  },
343
- [Ue]: {
509
+ [Tt]: {
344
510
  category: "Embed",
345
511
  type: "string",
346
512
  array: !0,
347
- default: [{ value: [D] }],
513
+ default: [{ value: [k] }],
348
514
  description: "Tags that make their subsequent template literals be identified as embedded GraphQL language."
349
515
  }
350
- }, Ge = /* @__PURE__ */ p({
351
- embedder: () => ze,
352
- language: () => j,
353
- options: () => We
354
- }), { mapDoc: Ke } = t, qe = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
355
- let o = {
356
- ...r,
357
- ...a
358
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
359
- return v(Ke(await e(u, {
360
- ...o,
361
- parser: o.embeddedHtmlParser ?? "html"
362
- }), (e) => {
363
- if (typeof e != "string") return e;
364
- let t = [], n = e.split(l);
365
- for (let e = 0; e < n.length; e++) {
366
- let r = n[e];
367
- if (e % 2 == 0) {
368
- if (!r) continue;
369
- r = r.replaceAll(/([\\`]|\${)/g, "\\$1"), o.__embeddedInHtml && (r = r.replaceAll(/<\/(?=script\b)/gi, "<\\/")), t.push(r);
370
- } else {
371
- let e = Number(r);
372
- t.push(p[e]);
373
- }
374
- }
375
- return t;
376
- }), o, i, d, f, o.htmlWhitespaceSensitivity === "strict" || o.htmlWhitespaceSensitivity === "css");
377
- }, M = "embeddedHtml", Je = ["html", "xhtml"], Ye = [
516
+ }, Dt = /* @__PURE__ */ p({
517
+ embedder: () => bt,
518
+ language: () => xt,
519
+ options: () => Et
520
+ }), Ot = A({
521
+ parser: "handlebars",
522
+ markup: !0
523
+ }), kt = "embeddedHandlebars", At = ["handlebars", "hbs"], jt = E(kt), Mt = D(kt), Nt = {
524
+ [jt]: {
525
+ category: "Embed",
526
+ type: "string",
527
+ array: !0,
528
+ default: [{ value: [...At] }],
529
+ description: "Block comments that identify embedded Handlebars in template literals. Requires the `@poliklot/prettier-plugin-handlebars` plugin."
530
+ },
531
+ [Mt]: {
532
+ category: "Embed",
533
+ type: "string",
534
+ array: !0,
535
+ default: [{ value: [...At] }],
536
+ description: "Tags that identify embedded Handlebars in template literals. Requires the `@poliklot/prettier-plugin-handlebars` plugin."
537
+ }
538
+ }, Pt = /* @__PURE__ */ p({
539
+ embedder: () => Ot,
540
+ language: () => kt,
541
+ options: () => Nt
542
+ }), Ft = A({
543
+ parser: "html",
544
+ parserOption: "embeddedHtmlParser",
545
+ markup: !0
546
+ }), N = "embeddedHtml", It = ["html", "xhtml"], Lt = [
378
547
  "html",
379
548
  "vue",
380
549
  "angular",
381
550
  "lwc"
382
- ], Xe = C(M), Ze = w(M), Qe = T(M), $e = E(M), et = {
383
- [Xe]: {
551
+ ], Rt = T(N), zt = E(N), Bt = D(N), Vt = O(N), Ht = {
552
+ [Rt]: {
384
553
  category: "Embed",
385
554
  type: "string",
386
555
  array: !0,
387
- default: [{ value: [...Je] }],
556
+ default: [{ value: [...It] }],
388
557
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language.",
389
- deprecated: `Please use \`${Ze}\` or \`${Qe}\`.`
558
+ deprecated: `Please use \`${zt}\` or \`${Bt}\`.`
390
559
  },
391
- [Ze]: {
560
+ [zt]: {
392
561
  category: "Embed",
393
562
  type: "string",
394
563
  array: !0,
395
- default: [{ value: [D] }],
564
+ default: [{ value: [k] }],
396
565
  description: "Block comments that make their subsequent template literals be identified as embedded HTML language."
397
566
  },
398
- [Qe]: {
567
+ [Bt]: {
399
568
  category: "Embed",
400
569
  type: "string",
401
570
  array: !0,
402
- default: [{ value: [D] }],
571
+ default: [{ value: [k] }],
403
572
  description: "Tags that make their subsequent template literals be identified as embedded HTML language."
404
573
  },
405
- [$e]: {
574
+ [Vt]: {
406
575
  category: "Embed",
407
576
  type: "choice",
408
577
  default: "html",
409
578
  description: "The parser used to parse the embedded HTML language.",
410
- choices: Ye.map((e) => ({
579
+ choices: Lt.map((e) => ({
411
580
  value: e,
412
581
  description: `Use the "${e}" parser.`
413
582
  }))
414
583
  }
415
- }, tt = /* @__PURE__ */ p({
416
- embedder: () => qe,
417
- language: () => M,
418
- options: () => et
419
- }), nt = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
420
- let o = {
421
- ...r,
422
- ...a
423
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
424
- return v(b(await e(u, {
425
- ...o,
426
- parser: "ini"
427
- }), l, p), o, i, d, f);
428
- }, N = "embeddedIni", rt = [
584
+ }, Ut = /* @__PURE__ */ p({
585
+ embedder: () => Ft,
586
+ language: () => N,
587
+ options: () => Ht
588
+ }), Wt = A({
589
+ parser: "hugo-post",
590
+ newlineHandling: "hardline",
591
+ dedentContent: !0
592
+ }), Gt = "embeddedHugo", Kt = ["hugo", "hugoPost"], qt = E(Gt), Jt = D(Gt), Yt = {
593
+ [qt]: {
594
+ category: "Embed",
595
+ type: "string",
596
+ array: !0,
597
+ default: [{ value: [...Kt] }],
598
+ description: "Block comments that identify embedded Hugo in template literals. Requires the `@htnabe/prettier-plugin-hugo-post` plugin."
599
+ },
600
+ [Jt]: {
601
+ category: "Embed",
602
+ type: "string",
603
+ array: !0,
604
+ default: [{ value: [...Kt] }],
605
+ description: "Tags that identify embedded Hugo in template literals. Requires the `@htnabe/prettier-plugin-hugo-post` plugin."
606
+ }
607
+ }, Xt = /* @__PURE__ */ p({
608
+ embedder: () => Wt,
609
+ language: () => Gt,
610
+ options: () => Yt
611
+ }), Zt = A({ parser: "ini" }), P = "embeddedIni", Qt = [
429
612
  "ini",
430
613
  "cfg",
431
614
  "pro"
432
- ], it = C(N), at = w(N), ot = T(N), st = {
433
- [it]: {
615
+ ], $t = T(P), en = E(P), tn = D(P), nn = {
616
+ [$t]: {
434
617
  category: "Embed",
435
618
  type: "string",
436
619
  array: !0,
437
- default: [{ value: [...rt] }],
620
+ default: [{ value: [...Qt] }],
438
621
  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.",
439
- deprecated: `Please use \`${at}\` or \`${ot}\`.`
622
+ deprecated: `Please use \`${en}\` or \`${tn}\`.`
440
623
  },
441
- [at]: {
624
+ [en]: {
442
625
  category: "Embed",
443
626
  type: "string",
444
627
  array: !0,
445
- default: [{ value: [D] }],
628
+ default: [{ value: [k] }],
446
629
  description: "Block comments that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
447
630
  },
448
- [ot]: {
631
+ [tn]: {
449
632
  category: "Embed",
450
633
  type: "string",
451
634
  array: !0,
452
- default: [{ value: [D] }],
635
+ default: [{ value: [k] }],
453
636
  description: "Tags that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
454
637
  }
455
- }, ct = /* @__PURE__ */ p({
456
- embedder: () => nt,
457
- language: () => N,
458
- options: () => st
459
- }), lt = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
460
- let o = {
461
- ...r,
462
- ...a
463
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
464
- return v(b(await e(u, {
465
- ...o,
466
- parser: "java"
467
- }), l, p, "hardline"), o, i, d, f);
468
- }, P = "embeddedJava", ut = ["java"], dt = C(P), ft = w(P), pt = T(P), mt = {
469
- [dt]: {
638
+ }, rn = /* @__PURE__ */ p({
639
+ embedder: () => Zt,
640
+ language: () => P,
641
+ options: () => nn
642
+ }), an = A({
643
+ parser: "java",
644
+ newlineHandling: "hardline"
645
+ }), F = "embeddedJava", on = ["java"], sn = T(F), cn = E(F), ln = D(F), un = {
646
+ [sn]: {
470
647
  category: "Embed",
471
648
  type: "string",
472
649
  array: !0,
473
- default: [{ value: [...ut] }],
650
+ default: [{ value: [...on] }],
474
651
  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.",
475
- deprecated: `Please use \`${ft}\` or \`${pt}\`.`
652
+ deprecated: `Please use \`${cn}\` or \`${ln}\`.`
476
653
  },
477
- [ft]: {
654
+ [cn]: {
478
655
  category: "Embed",
479
656
  type: "string",
480
657
  array: !0,
481
- default: [{ value: [D] }],
658
+ default: [{ value: [k] }],
482
659
  description: "Block comments that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
483
660
  },
484
- [pt]: {
661
+ [ln]: {
485
662
  category: "Embed",
486
663
  type: "string",
487
664
  array: !0,
488
- default: [{ value: [D] }],
665
+ default: [{ value: [k] }],
489
666
  description: "Tags that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
490
667
  }
491
- }, ht = /* @__PURE__ */ p({
492
- embedder: () => lt,
493
- language: () => P,
494
- options: () => mt
495
- }), gt = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
668
+ }, dn = /* @__PURE__ */ p({
669
+ embedder: () => an,
670
+ language: () => F,
671
+ options: () => un
672
+ }), fn = A({
673
+ parser: "jinja-template",
674
+ markup: !0,
675
+ dedentContent: !0
676
+ }), pn = "embeddedJinja", mn = [
677
+ "jinja",
678
+ "jinja2",
679
+ "j2"
680
+ ], hn = E(pn), gn = D(pn), _n = {
681
+ [hn]: {
682
+ category: "Embed",
683
+ type: "string",
684
+ array: !0,
685
+ default: [{ value: [...mn] }],
686
+ description: "Block comments that identify embedded Jinja in template literals. Requires the `prettier-plugin-jinja-template` plugin."
687
+ },
688
+ [gn]: {
689
+ category: "Embed",
690
+ type: "string",
691
+ array: !0,
692
+ default: [{ value: [...mn] }],
693
+ description: "Tags that identify embedded Jinja in template literals. Requires the `prettier-plugin-jinja-template` plugin."
694
+ }
695
+ }, vn = /* @__PURE__ */ p({
696
+ embedder: () => fn,
697
+ language: () => pn,
698
+ options: () => _n
699
+ }), yn = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
496
700
  let o = {
497
701
  ...r,
498
702
  ...a
499
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = _t(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
500
- return v(b(await e(u, {
703
+ }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = bn(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = x(n, t);
704
+ return b(S(await e(u, {
501
705
  ...o,
502
706
  parser: o.embeddedJsonParser ?? "json"
503
707
  }), l, p), o, i, d, f);
504
708
  };
505
- function _t() {
506
- let e = x(), t = x();
709
+ function bn() {
710
+ let e = C(), t = C();
507
711
  return {
508
712
  createPlaceholder: (n) => `'0${e}${n}${t}'`,
509
713
  placeholderRegex: RegExp(`["']?0${e}(\\d+)${t}['"]?`, "ig")
@@ -511,94 +715,101 @@ function _t() {
511
715
  }
512
716
  //#endregion
513
717
  //#region src/embedded/json/language.ts
514
- var F = "embeddedJson", vt = ["json", "jsonl"], yt = [
718
+ var I = "embeddedJson", xn = ["json", "jsonl"], Sn = [
515
719
  "json",
516
720
  "json5",
517
721
  "jsonc",
518
722
  "json-stringify"
519
- ], bt = C(F), xt = w(F), St = T(F), Ct = E(F), wt = {
520
- [bt]: {
723
+ ], Cn = T(I), wn = E(I), Tn = D(I), En = O(I), Dn = {
724
+ [Cn]: {
521
725
  category: "Embed",
522
726
  type: "string",
523
727
  array: !0,
524
- default: [{ value: [...vt] }],
728
+ default: [{ value: [...xn] }],
525
729
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language.",
526
- deprecated: `Please use \`${xt}\` or \`${St}\`.`
730
+ deprecated: `Please use \`${wn}\` or \`${Tn}\`.`
527
731
  },
528
- [xt]: {
732
+ [wn]: {
529
733
  category: "Embed",
530
734
  type: "string",
531
735
  array: !0,
532
- default: [{ value: [D] }],
736
+ default: [{ value: [k] }],
533
737
  description: "Block comments that make their subsequent template literals be identified as embedded JSON language."
534
738
  },
535
- [St]: {
739
+ [Tn]: {
536
740
  category: "Embed",
537
741
  type: "string",
538
742
  array: !0,
539
- default: [{ value: [D] }],
743
+ default: [{ value: [k] }],
540
744
  description: "Tags that make their subsequent template literals be identified as embedded JSON language."
541
745
  },
542
- [Ct]: {
746
+ [En]: {
543
747
  category: "Embed",
544
748
  type: "choice",
545
749
  default: "json",
546
750
  description: "The parser used to parse the embedded JSON language.",
547
- choices: yt.map((e) => ({
751
+ choices: Sn.map((e) => ({
548
752
  value: e,
549
753
  description: `Use the "${e}" parser.`
550
754
  }))
551
755
  }
552
- }, Tt = /* @__PURE__ */ p({
553
- embedder: () => gt,
554
- language: () => F,
555
- options: () => wt
556
- }), Et = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
557
- let o = {
558
- ...r,
559
- ...a
560
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S("$p"), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
561
- return v(b(await e(u, {
562
- ...o,
563
- parser: "JSONata"
564
- }), l, p), o, i, d, f);
565
- }, I = "embeddedJsonata", Dt = ["jsonata"], Ot = C(I), kt = w(I), At = T(I), jt = {
566
- [Ot]: {
756
+ }, On = /* @__PURE__ */ p({
757
+ embedder: () => yn,
758
+ language: () => I,
759
+ options: () => Dn
760
+ }), kn = A({
761
+ parser: "JSONata",
762
+ placeholderPrefix: "$p"
763
+ }), L = "embeddedJsonata", An = ["jsonata"], jn = T(L), Mn = E(L), Nn = D(L), Pn = {
764
+ [jn]: {
567
765
  category: "Embed",
568
766
  type: "string",
569
767
  array: !0,
570
- default: [{ value: [...Dt] }],
768
+ default: [{ value: [...An] }],
571
769
  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.",
572
- deprecated: `Please use \`${kt}\` or \`${At}\`.`
770
+ deprecated: `Please use \`${Mn}\` or \`${Nn}\`.`
573
771
  },
574
- [kt]: {
772
+ [Mn]: {
575
773
  category: "Embed",
576
774
  type: "string",
577
775
  array: !0,
578
- default: [{ value: [D] }],
776
+ default: [{ value: [k] }],
579
777
  description: "Block comments that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
580
778
  },
581
- [At]: {
779
+ [Nn]: {
582
780
  category: "Embed",
583
781
  type: "string",
584
782
  array: !0,
585
- default: [{ value: [D] }],
783
+ default: [{ value: [k] }],
586
784
  description: "Tags that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
587
785
  }
588
- }, Mt = /* @__PURE__ */ p({
589
- embedder: () => Et,
590
- language: () => I,
591
- options: () => jt
592
- }), Nt = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
593
- let o = {
594
- ...r,
595
- ...a
596
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
597
- return v(b(await e(u, {
598
- ...o,
599
- parser: "latex-parser"
600
- }), l, p), o, i, d, f);
601
- }, L = "embeddedLatex", Pt = [
786
+ }, Fn = /* @__PURE__ */ p({
787
+ embedder: () => kn,
788
+ language: () => L,
789
+ options: () => Pn
790
+ }), In = A({
791
+ parser: "jte",
792
+ markup: !0
793
+ }), Ln = "embeddedJte", Rn = ["jte"], zn = E(Ln), Bn = D(Ln), Vn = {
794
+ [zn]: {
795
+ category: "Embed",
796
+ type: "string",
797
+ array: !0,
798
+ default: [{ value: [...Rn] }],
799
+ description: "Block comments that identify embedded JTE in template literals. Requires the `prettier-plugin-jte` plugin."
800
+ },
801
+ [Bn]: {
802
+ category: "Embed",
803
+ type: "string",
804
+ array: !0,
805
+ default: [{ value: [...Rn] }],
806
+ description: "Tags that identify embedded JTE in template literals. Requires the `prettier-plugin-jte` plugin."
807
+ }
808
+ }, Hn = /* @__PURE__ */ p({
809
+ embedder: () => In,
810
+ language: () => Ln,
811
+ options: () => Vn
812
+ }), Un = A({ parser: "latex-parser" }), R = "embeddedLatex", Wn = [
602
813
  "latex",
603
814
  "tex",
604
815
  "aux",
@@ -607,723 +818,771 @@ var F = "embeddedJson", vt = ["json", "jsonl"], yt = [
607
818
  "bib",
608
819
  "toc",
609
820
  "sty"
610
- ], Ft = C(L), It = w(L), Lt = T(L), Rt = {
611
- [Ft]: {
821
+ ], Gn = T(R), Kn = E(R), qn = D(R), Jn = {
822
+ [Gn]: {
612
823
  category: "Embed",
613
824
  type: "string",
614
825
  array: !0,
615
- default: [{ value: [...Pt] }],
826
+ default: [{ value: [...Wn] }],
616
827
  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.",
617
- deprecated: `Please use \`${It}\` or \`${Lt}\`.`
828
+ deprecated: `Please use \`${Kn}\` or \`${qn}\`.`
618
829
  },
619
- [It]: {
830
+ [Kn]: {
620
831
  category: "Embed",
621
832
  type: "string",
622
833
  array: !0,
623
- default: [{ value: [D] }],
834
+ default: [{ value: [k] }],
624
835
  description: "Block comments that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
625
836
  },
626
- [Lt]: {
837
+ [qn]: {
627
838
  category: "Embed",
628
839
  type: "string",
629
840
  array: !0,
630
- default: [{ value: [D] }],
841
+ default: [{ value: [k] }],
631
842
  description: "Tags that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
632
843
  }
633
- }, zt = /* @__PURE__ */ p({
634
- embedder: () => Nt,
635
- language: () => L,
636
- options: () => Rt
637
- });
638
- //#endregion
639
- //#region node_modules/.pnpm/dedent@1.7.2/node_modules/dedent/dist/dedent.mjs
640
- function Bt(e, t) {
641
- var n = Object.keys(e);
642
- if (Object.getOwnPropertySymbols) {
643
- var r = Object.getOwnPropertySymbols(e);
644
- t && (r = r.filter(function(t) {
645
- return Object.getOwnPropertyDescriptor(e, t).enumerable;
646
- })), n.push.apply(n, r);
647
- }
648
- return n;
649
- }
650
- function Vt(e) {
651
- for (var t = 1; t < arguments.length; t++) {
652
- var n = arguments[t] == null ? {} : arguments[t];
653
- t % 2 ? Bt(Object(n), !0).forEach(function(t) {
654
- Ht(e, t, n[t]);
655
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Bt(Object(n)).forEach(function(t) {
656
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
657
- });
658
- }
659
- return e;
660
- }
661
- function Ht(e, t, n) {
662
- return t = Ut(t), t in e ? Object.defineProperty(e, t, {
663
- value: n,
664
- enumerable: !0,
665
- configurable: !0,
666
- writable: !0
667
- }) : e[t] = n, e;
668
- }
669
- function Ut(e) {
670
- var t = Wt(e, "string");
671
- return typeof t == "symbol" ? t : String(t);
672
- }
673
- function Wt(e, t) {
674
- if (typeof e != "object" || !e) return e;
675
- var n = e[Symbol.toPrimitive];
676
- if (n !== void 0) {
677
- var r = n.call(e, t || "default");
678
- if (typeof r != "object") return r;
679
- throw TypeError("@@toPrimitive must return a primitive value.");
680
- }
681
- return (t === "string" ? String : Number)(e);
682
- }
683
- var Gt = Kt({});
684
- function Kt(e) {
685
- return t.withOptions = (t) => Kt(Vt(Vt({}, e), t)), t;
686
- function t(t, ...n) {
687
- let r = typeof t == "string" ? [t] : t.raw, { alignValues: i = !1, escapeSpecialCharacters: a = Array.isArray(t), trimWhitespace: o = !0 } = e, s = "";
688
- for (let e = 0; e < r.length; e++) {
689
- let t = r[e];
690
- if (a && (t = t.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\\{/g, "{")), s += t, e < n.length) {
691
- let t = i ? qt(n[e], s) : n[e];
692
- s += t;
693
- }
694
- }
695
- let c = s.split("\n"), l = null;
696
- for (let e of c) {
697
- let t = e.match(/^(\s+)\S+/);
698
- if (t) {
699
- let e = t[1].length;
700
- l = l ? Math.min(l, e) : e;
701
- }
702
- }
703
- if (l !== null) {
704
- let e = l;
705
- s = c.map((t) => t[0] === " " || t[0] === " " ? t.slice(e) : t).join("\n");
706
- }
707
- return o && (s = s.trim()), a && (s = s.replace(/\\n/g, "\n").replace(/\\t/g, " ").replace(/\\r/g, "\r").replace(/\\v/g, "\v").replace(/\\b/g, "\b").replace(/\\f/g, "\f").replace(/\\0/g, "\0").replace(/\\x([\da-fA-F]{2})/g, (e, t) => String.fromCharCode(parseInt(t, 16))).replace(/\\u\{([\da-fA-F]{1,6})\}/g, (e, t) => String.fromCodePoint(parseInt(t, 16))).replace(/\\u([\da-fA-F]{4})/g, (e, t) => String.fromCharCode(parseInt(t, 16)))), typeof Bun < "u" && (s = s.replace(/\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g, (e, t, n) => {
708
- let r = t ?? n ?? "";
709
- return String.fromCodePoint(parseInt(r, 16));
710
- })), s;
711
- }
712
- }
713
- function qt(e, t) {
714
- if (typeof e != "string" || !e.includes("\n")) return e;
715
- let n = t.slice(t.lastIndexOf("\n") + 1).match(/^(\s+)/);
716
- if (n) {
717
- let t = n[1];
718
- return e.replace(/\n/g, `\n${t}`);
844
+ }, Yn = /* @__PURE__ */ p({
845
+ embedder: () => Un,
846
+ language: () => R,
847
+ options: () => Jn
848
+ }), Xn = A({
849
+ parser: "liquid-html",
850
+ markup: !0
851
+ }), Zn = "embeddedLiquid", Qn = ["liquid"], $n = E(Zn), er = D(Zn), tr = {
852
+ [$n]: {
853
+ category: "Embed",
854
+ type: "string",
855
+ array: !0,
856
+ default: [{ value: [...Qn] }],
857
+ description: "Block comments that identify embedded Liquid in template literals. Requires the `@shopify/prettier-plugin-liquid` plugin."
858
+ },
859
+ [er]: {
860
+ category: "Embed",
861
+ type: "string",
862
+ array: !0,
863
+ default: [{ value: [...Qn] }],
864
+ description: "Tags that identify embedded Liquid in template literals. Requires the `@shopify/prettier-plugin-liquid` plugin."
719
865
  }
720
- return e;
721
- }
722
- //#endregion
723
- //#region src/embedded/markdown/embedder.ts
724
- var { line: Jt, group: R, indent: Yt, softline: Xt, dedentToRoot: Zt, literalline: Qt } = e, $t = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
866
+ }, nr = /* @__PURE__ */ p({
867
+ embedder: () => Xn,
868
+ language: () => Zn,
869
+ options: () => tr
870
+ }), { line: rr, group: z, indent: ir, softline: ar, dedentToRoot: or, literalline: sr } = e, cr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
725
871
  let o = {
726
872
  ...r,
727
873
  ...a
728
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t), m = b(await e(Gt(u), {
874
+ }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = w(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = x(n, t), m = S(await e(re(u), {
729
875
  ...o,
730
876
  parser: o.embeddedMarkdownParser ?? "markdown",
731
877
  __inJsTemplate: !0
732
878
  }), l, p, "hardline");
733
- if (o.preserveEmbeddedExteriorWhitespaces?.includes(i)) return R([
879
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(i)) return z([
734
880
  "`",
735
881
  d,
736
- o.noEmbeddedMultiLineIndentation?.includes(i) ? Zt(R(m)) : Yt([R(m)]),
882
+ o.noEmbeddedMultiLineIndentation?.includes(i) ? or(z(m)) : ir([z(m)]),
737
883
  f,
738
884
  "`"
739
885
  ]);
740
- let h = d.length ? Jt : Xt, ee = f.length ? Jt : Xt;
886
+ let h = d.length ? rr : ar, ee = f.length ? rr : ar;
741
887
  return o.noEmbeddedMultiLineIndentation?.includes(i) ? [
742
888
  "`",
743
- Qt,
744
- Zt(m),
745
- Xt,
889
+ sr,
890
+ or(m),
891
+ ar,
746
892
  "`"
747
- ] : R([
893
+ ] : z([
748
894
  "`",
749
- Yt([h, R(m)]),
895
+ ir([h, z(m)]),
750
896
  ee,
751
897
  "`"
752
898
  ]);
753
- }, z = "embeddedMarkdown", en = ["md", "markdown"], tn = [
899
+ }, B = "embeddedMarkdown", lr = ["md", "markdown"], ur = [
754
900
  "markdown",
755
901
  "mdx",
756
902
  "remark"
757
- ], nn = C(z), rn = w(z), an = T(z), on = E(z), sn = {
758
- [nn]: {
903
+ ], dr = T(B), fr = E(B), pr = D(B), mr = O(B), hr = {
904
+ [dr]: {
759
905
  category: "Embed",
760
906
  type: "string",
761
907
  array: !0,
762
- default: [{ value: [...en] }],
908
+ default: [{ value: [...lr] }],
763
909
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Markdown language.",
764
- deprecated: `Please use \`${rn}\` or \`${an}\`.`
910
+ deprecated: `Please use \`${fr}\` or \`${pr}\`.`
765
911
  },
766
- [rn]: {
912
+ [fr]: {
767
913
  category: "Embed",
768
914
  type: "string",
769
915
  array: !0,
770
- default: [{ value: [D] }],
916
+ default: [{ value: [k] }],
771
917
  description: "Block comments that make their subsequent template literals be identified as embedded Markdown language."
772
918
  },
773
- [an]: {
919
+ [pr]: {
774
920
  category: "Embed",
775
921
  type: "string",
776
922
  array: !0,
777
- default: [{ value: [D] }],
923
+ default: [{ value: [k] }],
778
924
  description: "Tags that make their subsequent template literals be identified as embedded Markdown language."
779
925
  },
780
- [on]: {
926
+ [mr]: {
781
927
  category: "Embed",
782
928
  type: "choice",
783
929
  default: "markdown",
784
930
  description: "The parser used to parse the embedded Markdown language.",
785
- choices: tn.map((e) => ({
931
+ choices: ur.map((e) => ({
786
932
  value: e,
787
933
  description: `Use the "${e}" parser.`
788
934
  }))
789
935
  }
790
- }, cn = /* @__PURE__ */ p({
791
- embedder: () => $t,
792
- language: () => z,
793
- options: () => sn
794
- }), ln = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
795
- let o = {
796
- ...r,
797
- ...a
798
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
799
- return v(b(await e(u, {
800
- ...o,
801
- parser: "nginx"
802
- }), l, p), o, i, d, f);
803
- }, B = "embeddedNginx", un = ["nginx"], dn = C(B), fn = w(B), pn = T(B), mn = {
804
- [dn]: {
936
+ }, gr = /* @__PURE__ */ p({
937
+ embedder: () => cr,
938
+ language: () => B,
939
+ options: () => hr
940
+ }), _r = A({
941
+ parser: "marko",
942
+ markup: !0
943
+ }), vr = "embeddedMarko", yr = ["marko"], br = E(vr), xr = D(vr), Sr = {
944
+ [br]: {
945
+ category: "Embed",
946
+ type: "string",
947
+ array: !0,
948
+ default: [{ value: [...yr] }],
949
+ description: "Block comments that identify embedded Marko in template literals. Requires the `prettier-plugin-marko` plugin."
950
+ },
951
+ [xr]: {
952
+ category: "Embed",
953
+ type: "string",
954
+ array: !0,
955
+ default: [{ value: [...yr] }],
956
+ description: "Tags that identify embedded Marko in template literals. Requires the `prettier-plugin-marko` plugin."
957
+ }
958
+ }, Cr = /* @__PURE__ */ p({
959
+ embedder: () => _r,
960
+ language: () => vr,
961
+ options: () => Sr
962
+ }), wr = A({
963
+ parser: "motoko-tt-parse",
964
+ transformDoc: Tr
965
+ });
966
+ function Tr(e) {
967
+ if (!Array.isArray(e)) return e;
968
+ let t = e.at(-1);
969
+ return t && !Array.isArray(t) && typeof t == "object" && t.type === "line" && t.hard && t.literal ? e.slice(0, -1) : e;
970
+ }
971
+ //#endregion
972
+ //#region src/embedded/motoko/language.ts
973
+ var Er = "embeddedMotoko", Dr = ["motoko", "mo"], Or = E(Er), kr = D(Er), Ar = {
974
+ [Or]: {
975
+ category: "Embed",
976
+ type: "string",
977
+ array: !0,
978
+ default: [{ value: [...Dr] }],
979
+ description: "Block comments that identify embedded Motoko in template literals. Requires the `prettier-plugin-motoko` plugin."
980
+ },
981
+ [kr]: {
982
+ category: "Embed",
983
+ type: "string",
984
+ array: !0,
985
+ default: [{ value: [...Dr] }],
986
+ description: "Tags that identify embedded Motoko in template literals. Requires the `prettier-plugin-motoko` plugin."
987
+ }
988
+ }, jr = /* @__PURE__ */ p({
989
+ embedder: () => wr,
990
+ language: () => Er,
991
+ options: () => Ar
992
+ }), Mr = A({
993
+ parser: "mustache",
994
+ markup: !0
995
+ }), Nr = "embeddedMustache", Pr = ["mustache"], Fr = E(Nr), Ir = D(Nr), Lr = {
996
+ [Fr]: {
805
997
  category: "Embed",
806
998
  type: "string",
807
999
  array: !0,
808
- default: [{ value: [...un] }],
1000
+ default: [{ value: [...Pr] }],
1001
+ description: "Block comments that identify embedded Mustache in template literals. Requires the `prettier-plugin-mustache` plugin."
1002
+ },
1003
+ [Ir]: {
1004
+ category: "Embed",
1005
+ type: "string",
1006
+ array: !0,
1007
+ default: [{ value: [...Pr] }],
1008
+ description: "Tags that identify embedded Mustache in template literals. Requires the `prettier-plugin-mustache` plugin."
1009
+ }
1010
+ }, Rr = /* @__PURE__ */ p({
1011
+ embedder: () => Mr,
1012
+ language: () => Nr,
1013
+ options: () => Lr
1014
+ }), zr = A({ parser: "nginx" }), V = "embeddedNginx", Br = ["nginx"], Vr = T(V), Hr = E(V), Ur = D(V), Wr = {
1015
+ [Vr]: {
1016
+ category: "Embed",
1017
+ type: "string",
1018
+ array: !0,
1019
+ default: [{ value: [...Br] }],
809
1020
  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.",
810
- deprecated: `Please use \`${fn}\` or \`${pn}\`.`
1021
+ deprecated: `Please use \`${Hr}\` or \`${Ur}\`.`
811
1022
  },
812
- [fn]: {
1023
+ [Hr]: {
813
1024
  category: "Embed",
814
1025
  type: "string",
815
1026
  array: !0,
816
- default: [{ value: [D] }],
1027
+ default: [{ value: [k] }],
817
1028
  description: "Block comments that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
818
1029
  },
819
- [pn]: {
1030
+ [Ur]: {
820
1031
  category: "Embed",
821
1032
  type: "string",
822
1033
  array: !0,
823
- default: [{ value: [D] }],
1034
+ default: [{ value: [k] }],
824
1035
  description: "Tags that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
825
1036
  }
826
- }, hn = /* @__PURE__ */ p({
827
- embedder: () => ln,
828
- language: () => B,
829
- options: () => mn
830
- }), V = "embeddedNoop", gn = C(V), _n = w(V), vn = T(V), yn = {
831
- [gn]: {
1037
+ }, Gr = /* @__PURE__ */ p({
1038
+ embedder: () => zr,
1039
+ language: () => V,
1040
+ options: () => Wr
1041
+ }), H = "embeddedNoop", Kr = T(H), qr = E(H), Jr = D(H), Yr = {
1042
+ [Kr]: {
832
1043
  category: "Embed",
833
1044
  type: "string",
834
1045
  array: !0,
835
1046
  default: [{ value: [] }],
836
1047
  description: "Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted.",
837
- deprecated: `Please use \`${_n}\` or \`${vn}\`.`
1048
+ deprecated: `Please use \`${qr}\` or \`${Jr}\`.`
838
1049
  },
839
- [_n]: {
1050
+ [qr]: {
840
1051
  category: "Embed",
841
1052
  type: "string",
842
1053
  array: !0,
843
- default: [{ value: [D] }],
1054
+ default: [{ value: [k] }],
844
1055
  description: "Block comments that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
845
1056
  },
846
- [vn]: {
1057
+ [Jr]: {
847
1058
  category: "Embed",
848
1059
  type: "string",
849
1060
  array: !0,
850
- default: [{ value: [D] }],
1061
+ default: [{ value: [k] }],
851
1062
  description: "Tags that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
852
1063
  }
853
- }, bn = /* @__PURE__ */ p({
854
- language: () => V,
855
- options: () => yn
856
- }), xn = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
857
- let o = {
858
- ...r,
859
- ...a
860
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
861
- return v(b(await e(u, {
862
- ...o,
863
- parser: "pegjs-parser"
864
- }), l, p), o, i, d, f);
865
- }, H = "embeddedPegjs", Sn = [
1064
+ }, Xr = /* @__PURE__ */ p({
1065
+ language: () => H,
1066
+ options: () => Yr
1067
+ }), Zr = A({
1068
+ parser: "nunjucks",
1069
+ markup: !0
1070
+ }), Qr = "embeddedNunjucks", $r = ["nunjucks", "njk"], ei = E(Qr), ti = D(Qr), ni = {
1071
+ [ei]: {
1072
+ category: "Embed",
1073
+ type: "string",
1074
+ array: !0,
1075
+ default: [{ value: [...$r] }],
1076
+ description: "Block comments that identify embedded Nunjucks in template literals. Requires the `prettier-plugin-nunjucks` plugin."
1077
+ },
1078
+ [ti]: {
1079
+ category: "Embed",
1080
+ type: "string",
1081
+ array: !0,
1082
+ default: [{ value: [...$r] }],
1083
+ description: "Tags that identify embedded Nunjucks in template literals. Requires the `prettier-plugin-nunjucks` plugin."
1084
+ }
1085
+ }, ri = /* @__PURE__ */ p({
1086
+ embedder: () => Zr,
1087
+ language: () => Qr,
1088
+ options: () => ni
1089
+ }), ii = A({ parser: "pegjs-parser" }), U = "embeddedPegjs", ai = [
866
1090
  "pegjs",
867
1091
  "peggy",
868
1092
  "peg"
869
- ], Cn = C(H), wn = w(H), Tn = T(H), En = {
870
- [Cn]: {
1093
+ ], oi = T(U), si = E(U), ci = D(U), li = {
1094
+ [oi]: {
871
1095
  category: "Embed",
872
1096
  type: "string",
873
1097
  array: !0,
874
- default: [{ value: [...Sn] }],
1098
+ default: [{ value: [...ai] }],
875
1099
  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.",
876
- deprecated: `Please use \`${wn}\` or \`${Tn}\`.`
1100
+ deprecated: `Please use \`${si}\` or \`${ci}\`.`
877
1101
  },
878
- [wn]: {
1102
+ [si]: {
879
1103
  category: "Embed",
880
1104
  type: "string",
881
1105
  array: !0,
882
- default: [{ value: [D] }],
1106
+ default: [{ value: [k] }],
883
1107
  description: "Block comments that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
884
1108
  },
885
- [Tn]: {
1109
+ [ci]: {
886
1110
  category: "Embed",
887
1111
  type: "string",
888
1112
  array: !0,
889
- default: [{ value: [D] }],
1113
+ default: [{ value: [k] }],
890
1114
  description: "Tags that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
891
1115
  }
892
- }, Dn = /* @__PURE__ */ p({
893
- embedder: () => xn,
894
- language: () => H,
895
- options: () => En
896
- }), On = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
897
- let o = {
898
- ...r,
899
- ...a
900
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S("$p"), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
901
- return v(b(await e(u, {
902
- ...o,
903
- parser: "php"
904
- }), l, p), o, i, d, f);
905
- }, U = "embeddedPhp", kn = ["php", "php5"], An = C(U), jn = w(U), Mn = T(U), Nn = {
906
- [An]: {
1116
+ }, ui = /* @__PURE__ */ p({
1117
+ embedder: () => ii,
1118
+ language: () => U,
1119
+ options: () => li
1120
+ }), di = A({
1121
+ parser: "php",
1122
+ placeholderPrefix: "$p"
1123
+ }), W = "embeddedPhp", fi = ["php", "php5"], pi = T(W), mi = E(W), hi = D(W), gi = {
1124
+ [pi]: {
907
1125
  category: "Embed",
908
1126
  type: "string",
909
1127
  array: !0,
910
- default: [{ value: [...kn] }],
1128
+ default: [{ value: [...fi] }],
911
1129
  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.",
912
- deprecated: `Please use \`${jn}\` or \`${Mn}\`.`
1130
+ deprecated: `Please use \`${mi}\` or \`${hi}\`.`
913
1131
  },
914
- [jn]: {
1132
+ [mi]: {
915
1133
  category: "Embed",
916
1134
  type: "string",
917
1135
  array: !0,
918
- default: [{ value: [D] }],
1136
+ default: [{ value: [k] }],
919
1137
  description: "Block comments that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
920
1138
  },
921
- [Mn]: {
1139
+ [hi]: {
922
1140
  category: "Embed",
923
1141
  type: "string",
924
1142
  array: !0,
925
- default: [{ value: [D] }],
1143
+ default: [{ value: [k] }],
926
1144
  description: "Tags that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
927
1145
  }
928
- }, Pn = /* @__PURE__ */ p({
929
- embedder: () => On,
930
- language: () => U,
931
- options: () => Nn
932
- }), Fn = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
933
- let o = {
934
- ...r,
935
- ...a
936
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
937
- return v(b(await e(u, {
938
- ...o,
939
- parser: "prisma-parse"
940
- }), l, p, "hardline"), o, i, d, f);
941
- }, W = "embeddedPrisma", In = ["prisma"], Ln = C(W), Rn = w(W), zn = T(W), Bn = {
942
- [Ln]: {
1146
+ }, _i = /* @__PURE__ */ p({
1147
+ embedder: () => di,
1148
+ language: () => W,
1149
+ options: () => gi
1150
+ }), vi = A({
1151
+ parser: "powershell",
1152
+ newlineHandling: "hardline"
1153
+ }), yi = "embeddedPowerShell", bi = ["powershell", "ps1"], xi = E(yi), Si = D(yi), Ci = {
1154
+ [xi]: {
1155
+ category: "Embed",
1156
+ type: "string",
1157
+ array: !0,
1158
+ default: [{ value: [...bi] }],
1159
+ description: "Block comments that identify embedded PowerShell in template literals. Requires the `prettier-plugin-powershell` plugin."
1160
+ },
1161
+ [Si]: {
1162
+ category: "Embed",
1163
+ type: "string",
1164
+ array: !0,
1165
+ default: [{ value: [...bi] }],
1166
+ description: "Tags that identify embedded PowerShell in template literals. Requires the `prettier-plugin-powershell` plugin."
1167
+ }
1168
+ }, wi = /* @__PURE__ */ p({
1169
+ embedder: () => vi,
1170
+ language: () => yi,
1171
+ options: () => Ci
1172
+ }), Ti = A({
1173
+ parser: "prisma-parse",
1174
+ newlineHandling: "hardline"
1175
+ }), Ei = "embeddedPrisma", Di = ["prisma"], Oi = T(Ei), ki = E(Ei), Ai = D(Ei), ji = {
1176
+ [Oi]: {
943
1177
  category: "Embed",
944
1178
  type: "string",
945
1179
  array: !0,
946
- default: [{ value: [...In] }],
1180
+ default: [{ value: [...Di] }],
947
1181
  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.",
948
- deprecated: `Please use \`${Rn}\` or \`${zn}\`.`
1182
+ deprecated: `Please use \`${ki}\` or \`${Ai}\`.`
949
1183
  },
950
- [Rn]: {
1184
+ [ki]: {
951
1185
  category: "Embed",
952
1186
  type: "string",
953
1187
  array: !0,
954
- default: [{ value: [D] }],
1188
+ default: [{ value: [k] }],
955
1189
  description: "Block comments that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
956
1190
  },
957
- [zn]: {
1191
+ [Ai]: {
958
1192
  category: "Embed",
959
1193
  type: "string",
960
1194
  array: !0,
961
- default: [{ value: [D] }],
1195
+ default: [{ value: [k] }],
962
1196
  description: "Tags that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
963
1197
  }
964
- }, Vn = /* @__PURE__ */ p({
965
- embedder: () => Fn,
966
- language: () => W,
967
- options: () => Bn
968
- }), Hn = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
969
- let o = {
970
- ...r,
971
- ...a
972
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
973
- return v(b(await e(u, {
974
- ...o,
975
- parser: "dot-properties"
976
- }), l, p), o, i, d, f);
977
- }, G = "embeddedProperties", Un = ["properties"], Wn = C(G), Gn = w(G), Kn = T(G), qn = {
978
- [Wn]: {
1198
+ }, Mi = /* @__PURE__ */ p({
1199
+ embedder: () => Ti,
1200
+ language: () => Ei,
1201
+ options: () => ji
1202
+ }), Ni = A({ parser: "dot-properties" }), Pi = "embeddedProperties", Fi = ["properties"], Ii = T(Pi), Li = E(Pi), Ri = D(Pi), zi = {
1203
+ [Ii]: {
979
1204
  category: "Embed",
980
1205
  type: "string",
981
1206
  array: !0,
982
- default: [{ value: [...Un] }],
1207
+ default: [{ value: [...Fi] }],
983
1208
  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.",
984
- deprecated: `Please use \`${Gn}\` or \`${Kn}\`.`
1209
+ deprecated: `Please use \`${Li}\` or \`${Ri}\`.`
985
1210
  },
986
- [Gn]: {
1211
+ [Li]: {
987
1212
  category: "Embed",
988
1213
  type: "string",
989
1214
  array: !0,
990
- default: [{ value: [D] }],
1215
+ default: [{ value: [k] }],
991
1216
  description: "Block comments that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
992
1217
  },
993
- [Kn]: {
1218
+ [Ri]: {
994
1219
  category: "Embed",
995
1220
  type: "string",
996
1221
  array: !0,
997
- default: [{ value: [D] }],
1222
+ default: [{ value: [k] }],
998
1223
  description: "Tags that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
999
1224
  }
1000
- }, Jn = /* @__PURE__ */ p({
1001
- embedder: () => Hn,
1002
- language: () => G,
1003
- options: () => qn
1004
- }), Yn = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1005
- let o = {
1006
- ...r,
1007
- ...a
1008
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
1009
- return v(b(await e(u, {
1010
- ...o,
1011
- parser: "pug"
1012
- }), l, p, "hardline"), o, i, d, f);
1013
- }, K = "embeddedPug", Xn = ["pug", "jade"], Zn = C(K), Qn = w(K), $n = T(K), er = {
1014
- [Zn]: {
1225
+ }, Bi = /* @__PURE__ */ p({
1226
+ embedder: () => Ni,
1227
+ language: () => Pi,
1228
+ options: () => zi
1229
+ }), Vi = A({
1230
+ parser: "pug",
1231
+ newlineHandling: "hardline"
1232
+ }), Hi = "embeddedPug", Ui = ["pug", "jade"], Wi = T(Hi), Gi = E(Hi), Ki = D(Hi), qi = {
1233
+ [Wi]: {
1015
1234
  category: "Embed",
1016
1235
  type: "string",
1017
1236
  array: !0,
1018
- default: [{ value: [...Xn] }],
1237
+ default: [{ value: [...Ui] }],
1019
1238
  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.",
1020
- deprecated: `Please use \`${Qn}\` or \`${$n}\`.`
1239
+ deprecated: `Please use \`${Gi}\` or \`${Ki}\`.`
1021
1240
  },
1022
- [Qn]: {
1241
+ [Gi]: {
1023
1242
  category: "Embed",
1024
1243
  type: "string",
1025
1244
  array: !0,
1026
- default: [{ value: [D] }],
1245
+ default: [{ value: [k] }],
1027
1246
  description: "Block comments that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin."
1028
1247
  },
1029
- [$n]: {
1248
+ [Ki]: {
1030
1249
  category: "Embed",
1031
1250
  type: "string",
1032
1251
  array: !0,
1033
- default: [{ value: [D] }],
1252
+ default: [{ value: [k] }],
1034
1253
  description: "Tags that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin."
1035
1254
  }
1036
- }, tr = /* @__PURE__ */ p({
1037
- embedder: () => Yn,
1038
- language: () => K,
1039
- options: () => er
1040
- }), nr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1041
- let o = {
1042
- ...r,
1043
- ...a
1044
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
1045
- return v(b(await e(u, {
1046
- ...o,
1047
- parser: o.embeddedRubyParser ?? "ruby"
1048
- }), l, p), o, i, d, f);
1049
- }, q = "embeddedRuby", rr = ["ruby"], ir = [
1255
+ }, Ji = /* @__PURE__ */ p({
1256
+ embedder: () => Vi,
1257
+ language: () => Hi,
1258
+ options: () => qi
1259
+ }), Yi = A({
1260
+ parser: "ruby",
1261
+ parserOption: "embeddedRubyParser"
1262
+ }), G = "embeddedRuby", Xi = ["ruby"], Zi = [
1050
1263
  "ruby",
1051
1264
  "rbs",
1052
1265
  "haml"
1053
- ], ar = C(q), or = w(q), sr = T(q), cr = E(q), lr = {
1054
- [ar]: {
1266
+ ], Qi = T(G), $i = E(G), ea = D(G), ta = O(G), na = {
1267
+ [Qi]: {
1055
1268
  category: "Embed",
1056
1269
  type: "string",
1057
1270
  array: !0,
1058
- default: [{ value: [...rr] }],
1271
+ default: [{ value: [...Xi] }],
1059
1272
  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.",
1060
- deprecated: `Please use \`${or}\` or \`${sr}\`.`
1273
+ deprecated: `Please use \`${$i}\` or \`${ea}\`.`
1061
1274
  },
1062
- [or]: {
1275
+ [$i]: {
1063
1276
  category: "Embed",
1064
1277
  type: "string",
1065
1278
  array: !0,
1066
- default: [{ value: [D] }],
1279
+ default: [{ value: [k] }],
1067
1280
  description: "Block comments that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
1068
1281
  },
1069
- [sr]: {
1282
+ [ea]: {
1070
1283
  category: "Embed",
1071
1284
  type: "string",
1072
1285
  array: !0,
1073
- default: [{ value: [D] }],
1286
+ default: [{ value: [k] }],
1074
1287
  description: "Tags that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
1075
1288
  },
1076
- [cr]: {
1289
+ [ta]: {
1077
1290
  category: "Embed",
1078
1291
  type: "choice",
1079
1292
  default: "ruby",
1080
1293
  description: "The parser used to parse the embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.",
1081
- choices: ir.map((e) => ({
1294
+ choices: Zi.map((e) => ({
1082
1295
  value: e,
1083
1296
  description: `Use the "${e}" parser.`
1084
1297
  }))
1085
1298
  }
1086
- }, ur = /* @__PURE__ */ p({
1087
- embedder: () => nr,
1088
- language: () => q,
1089
- options: () => lr
1090
- }), dr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1091
- let o = {
1092
- ...r,
1093
- ...a
1094
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
1095
- return v(b(await e(u, {
1096
- ...o,
1097
- parser: "sh"
1098
- }), l, p, "hardline"), o, i, d, f);
1099
- }, J = "embeddedSh", fr = ["sh"], pr = C(J), mr = w(J), hr = T(J), gr = {
1100
- [pr]: {
1299
+ }, ra = /* @__PURE__ */ p({
1300
+ embedder: () => Yi,
1301
+ language: () => G,
1302
+ options: () => na
1303
+ }), ia = A({
1304
+ parser: "sh",
1305
+ newlineHandling: "hardline"
1306
+ }), aa = "embeddedSh", oa = ["sh"], sa = T(aa), ca = E(aa), la = D(aa), ua = {
1307
+ [sa]: {
1101
1308
  category: "Embed",
1102
1309
  type: "string",
1103
1310
  array: !0,
1104
- default: [{ value: [...fr] }],
1311
+ default: [{ value: [...oa] }],
1105
1312
  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.",
1106
- deprecated: `Please use \`${mr}\` or \`${hr}\`.`
1313
+ deprecated: `Please use \`${ca}\` or \`${la}\`.`
1107
1314
  },
1108
- [mr]: {
1315
+ [ca]: {
1109
1316
  category: "Embed",
1110
1317
  type: "string",
1111
1318
  array: !0,
1112
- default: [{ value: [D] }],
1319
+ default: [{ value: [k] }],
1113
1320
  description: "Block comments that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
1114
1321
  },
1115
- [hr]: {
1322
+ [la]: {
1116
1323
  category: "Embed",
1117
1324
  type: "string",
1118
1325
  array: !0,
1119
- default: [{ value: [D] }],
1326
+ default: [{ value: [k] }],
1120
1327
  description: "Tags that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
1121
1328
  }
1122
- }, _r = /* @__PURE__ */ p({
1123
- embedder: () => dr,
1124
- language: () => J,
1125
- options: () => gr
1126
- }), vr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1329
+ }, da = /* @__PURE__ */ p({
1330
+ embedder: () => ia,
1331
+ language: () => aa,
1332
+ options: () => ua
1333
+ }), K = "embeddedSolidity", fa = A({
1334
+ parser: "slang",
1335
+ parserOption: `${K}Parser`
1336
+ }), pa = ["solidity", "sol"], ma = E(K), ha = D(K), ga = `${K}Parser`, _a = {
1337
+ [ma]: {
1338
+ category: "Embed",
1339
+ type: "string",
1340
+ array: !0,
1341
+ default: [{ value: [...pa] }],
1342
+ description: "Block comments that identify embedded Solidity in template literals. Requires the `prettier-plugin-solidity` plugin."
1343
+ },
1344
+ [ha]: {
1345
+ category: "Embed",
1346
+ type: "string",
1347
+ array: !0,
1348
+ default: [{ value: [...pa] }],
1349
+ description: "Tags that identify embedded Solidity in template literals. Requires the `prettier-plugin-solidity` plugin."
1350
+ },
1351
+ [ga]: {
1352
+ category: "Embed",
1353
+ type: "choice",
1354
+ default: "slang",
1355
+ description: "The parser used to format embedded Solidity.",
1356
+ choices: [
1357
+ {
1358
+ value: "slang",
1359
+ description: "Use the `slang` parser."
1360
+ },
1361
+ {
1362
+ value: "antlr",
1363
+ description: "Use the `antlr` parser."
1364
+ },
1365
+ {
1366
+ value: "solidity-parse",
1367
+ description: "Use the `solidity-parse` parser."
1368
+ }
1369
+ ]
1370
+ }
1371
+ }, va = /* @__PURE__ */ p({
1372
+ embedder: () => fa,
1373
+ language: () => K,
1374
+ options: () => _a
1375
+ }), ya = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1127
1376
  let o = {
1128
1377
  ...r,
1129
1378
  ...a
1130
- }, s = o.embeddedSqlPlugin ?? "prettier-plugin-sql", { node: c } = n, { createPlaceholder: l, placeholderRegex: u } = S(), { trimmedText: d, leadingWhitespaces: f, trailingWhitespaces: p } = _(c, l), m = y(n, t, o, !1), h;
1131
- if (s === "prettier-plugin-sql-cst") h = b(await e(d, {
1379
+ }, s = o.embeddedSqlPlugin ?? "prettier-plugin-sql", { node: c } = n, { createPlaceholder: l, placeholderRegex: u } = w(), { trimmedText: d, leadingWhitespaces: f, trailingWhitespaces: p } = y(c, l), m = x(n, t, o, !1), h;
1380
+ if (s === "prettier-plugin-sql-cst") h = S(await e(d, {
1132
1381
  ...o,
1133
1382
  parser: o.embeddedSqlParser ?? "sqlite"
1134
1383
  }), u, m);
1135
1384
  else {
1136
1385
  let t = new Set(c.quasis.slice(0, -1).flatMap((e, t) => /\n[\t ]*$/.test(e.value.raw) ? [t] : []));
1137
- h = b(await e(Gt(d), {
1386
+ h = S(await e(re(d), {
1138
1387
  ...o,
1139
1388
  parser: "sql"
1140
1389
  }), u, m, "hardline", t, o.tabWidth ?? 2);
1141
1390
  }
1142
- return v(h, o, i, f, p);
1143
- }, Y = "embeddedSql", yr = ["sql"], br = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], xr = [
1391
+ return b(h, o, i, f, p);
1392
+ }, q = "embeddedSql", ba = ["sql"], xa = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], Sa = [
1144
1393
  "sqlite",
1145
1394
  "bigquery",
1146
1395
  "mysql",
1147
1396
  "mariadb",
1148
1397
  "postgresql"
1149
- ], Sr = C(Y), Cr = w(Y), wr = T(Y), Tr = pe(Y), Er = E(Y), Dr = {
1150
- [Sr]: {
1398
+ ], Ca = T(q), wa = E(q), Ta = D(q), Ea = ye(q), Da = O(q), Oa = {
1399
+ [Ca]: {
1151
1400
  category: "Embed",
1152
1401
  type: "string",
1153
1402
  array: !0,
1154
- default: [{ value: [...yr] }],
1403
+ default: [{ value: [...ba] }],
1155
1404
  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.",
1156
- deprecated: `Please use \`${Cr}\` or \`${wr}\`.`
1405
+ deprecated: `Please use \`${wa}\` or \`${Ta}\`.`
1157
1406
  },
1158
- [Cr]: {
1407
+ [wa]: {
1159
1408
  category: "Embed",
1160
1409
  type: "string",
1161
1410
  array: !0,
1162
- default: [{ value: [D] }],
1411
+ default: [{ value: [k] }],
1163
1412
  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."
1164
1413
  },
1165
- [wr]: {
1414
+ [Ta]: {
1166
1415
  category: "Embed",
1167
1416
  type: "string",
1168
1417
  array: !0,
1169
- default: [{ value: [D] }],
1418
+ default: [{ value: [k] }],
1170
1419
  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."
1171
1420
  },
1172
- [Tr]: {
1421
+ [Ea]: {
1173
1422
  category: "Embed",
1174
1423
  type: "choice",
1175
1424
  default: "prettier-plugin-sql",
1176
1425
  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.",
1177
- choices: br.map((e) => ({
1426
+ choices: xa.map((e) => ({
1178
1427
  value: e,
1179
1428
  description: `Use the "${e}" plugin.`
1180
1429
  }))
1181
1430
  },
1182
- [Er]: {
1431
+ [Da]: {
1183
1432
  category: "Embed",
1184
1433
  type: "choice",
1185
1434
  default: "sqlite",
1186
1435
  description: "Specify the embedded SQL language parser. This option is only needed with the `prettier-plugin-sql-cst` plugin.",
1187
- choices: xr.map((e) => ({
1436
+ choices: Sa.map((e) => ({
1188
1437
  value: e,
1189
1438
  description: `Use the "${e}" parser.`
1190
1439
  }))
1191
1440
  }
1192
- }, Or = /* @__PURE__ */ p({
1193
- embedder: () => vr,
1194
- language: () => Y,
1195
- options: () => Dr
1196
- }), kr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1197
- let o = {
1198
- ...r,
1199
- ...a
1200
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
1201
- return v(b(await e(u, {
1202
- ...o,
1203
- parser: "toml"
1204
- }), l, p, "hardline"), o, i, d, f);
1205
- }, X = "embeddedToml", Ar = ["toml"], jr = C(X), Mr = w(X), Nr = T(X), Pr = {
1206
- [jr]: {
1441
+ }, ka = /* @__PURE__ */ p({
1442
+ embedder: () => ya,
1443
+ language: () => q,
1444
+ options: () => Oa
1445
+ }), Aa = A({
1446
+ parser: "svelte",
1447
+ markup: !0
1448
+ }), ja = "embeddedSvelte", Ma = ["svelte"], Na = E(ja), Pa = D(ja), Fa = {
1449
+ [Na]: {
1450
+ category: "Embed",
1451
+ type: "string",
1452
+ array: !0,
1453
+ default: [{ value: [...Ma] }],
1454
+ description: "Block comments that identify embedded Svelte in template literals. Requires the `prettier-plugin-svelte` plugin."
1455
+ },
1456
+ [Pa]: {
1457
+ category: "Embed",
1458
+ type: "string",
1459
+ array: !0,
1460
+ default: [{ value: [...Ma] }],
1461
+ description: "Tags that identify embedded Svelte in template literals. Requires the `prettier-plugin-svelte` plugin."
1462
+ }
1463
+ }, Ia = /* @__PURE__ */ p({
1464
+ embedder: () => Aa,
1465
+ language: () => ja,
1466
+ options: () => Fa
1467
+ }), La = A({
1468
+ parser: "toml",
1469
+ newlineHandling: "hardline"
1470
+ }), J = "embeddedToml", Ra = ["toml"], za = T(J), Ba = E(J), Va = D(J), Ha = {
1471
+ [za]: {
1207
1472
  category: "Embed",
1208
1473
  type: "string",
1209
1474
  array: !0,
1210
- default: [{ value: [...Ar] }],
1475
+ default: [{ value: [...Ra] }],
1211
1476
  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.",
1212
- deprecated: `Please use \`${Mr}\` or \`${Nr}\`.`
1477
+ deprecated: `Please use \`${Ba}\` or \`${Va}\`.`
1213
1478
  },
1214
- [Mr]: {
1479
+ [Ba]: {
1215
1480
  category: "Embed",
1216
1481
  type: "string",
1217
1482
  array: !0,
1218
- default: [{ value: [D] }],
1483
+ default: [{ value: [k] }],
1219
1484
  description: "Block comments that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
1220
1485
  },
1221
- [Nr]: {
1486
+ [Va]: {
1222
1487
  category: "Embed",
1223
1488
  type: "string",
1224
1489
  array: !0,
1225
- default: [{ value: [D] }],
1490
+ default: [{ value: [k] }],
1226
1491
  description: "Tags that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
1227
1492
  }
1228
- }, Fr = /* @__PURE__ */ p({
1229
- embedder: () => kr,
1230
- language: () => X,
1231
- options: () => Pr
1232
- }), Ir = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1233
- let o = {
1234
- ...r,
1235
- ...a
1236
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t);
1237
- return v(b(await e(u, {
1238
- ...o,
1239
- parser: o.embeddedTsParser ?? "typescript",
1240
- filepath: void 0
1241
- }), l, p), o, i, d, f);
1242
- }, Z = "embeddedTs", Lr = [
1493
+ }, Ua = /* @__PURE__ */ p({
1494
+ embedder: () => La,
1495
+ language: () => J,
1496
+ options: () => Ha
1497
+ }), Wa = A({
1498
+ parser: "typescript",
1499
+ parserOption: "embeddedTsParser",
1500
+ parserOptions: { filepath: void 0 }
1501
+ }), Y = "embeddedTs", Ga = [
1243
1502
  "ts",
1244
1503
  "tsx",
1245
1504
  "cts",
1246
1505
  "mts",
1247
1506
  "typescript"
1248
- ], Rr = ["typescript", "babel-ts"], zr = C(Z), Br = w(Z), Vr = T(Z), Hr = E(Z), Ur = {
1249
- [zr]: {
1507
+ ], Ka = ["typescript", "babel-ts"], qa = T(Y), Ja = E(Y), Ya = D(Y), Xa = O(Y), Za = {
1508
+ [qa]: {
1250
1509
  category: "Embed",
1251
1510
  type: "string",
1252
1511
  array: !0,
1253
- default: [{ value: [...Lr] }],
1512
+ default: [{ value: [...Ga] }],
1254
1513
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language.",
1255
- deprecated: `Please use \`${Br}\` or \`${Vr}\`.`
1514
+ deprecated: `Please use \`${Ja}\` or \`${Ya}\`.`
1256
1515
  },
1257
- [Br]: {
1516
+ [Ja]: {
1258
1517
  category: "Embed",
1259
1518
  type: "string",
1260
1519
  array: !0,
1261
- default: [{ value: [D] }],
1520
+ default: [{ value: [k] }],
1262
1521
  description: "Block comments that make their subsequent template literals be identified as embedded TypeScript language."
1263
1522
  },
1264
- [Vr]: {
1523
+ [Ya]: {
1265
1524
  category: "Embed",
1266
1525
  type: "string",
1267
1526
  array: !0,
1268
- default: [{ value: [D] }],
1527
+ default: [{ value: [k] }],
1269
1528
  description: "Tags that make their subsequent template literals be identified as embedded TypeScript language."
1270
1529
  },
1271
- [Hr]: {
1530
+ [Xa]: {
1272
1531
  category: "Embed",
1273
1532
  type: "choice",
1274
1533
  default: "typescript",
1275
1534
  description: "The parser used to parse the embedded TypeScript language.",
1276
- choices: Rr.map((e) => ({
1535
+ choices: Ka.map((e) => ({
1277
1536
  value: e,
1278
1537
  description: `Use the "${e}" parser.`
1279
1538
  }))
1280
1539
  }
1281
- }, Wr = /* @__PURE__ */ p({
1282
- embedder: () => Ir,
1283
- language: () => Z,
1284
- options: () => Ur
1285
- }), Q = "embeddedXml", { softline: Gr } = e, Kr = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1540
+ }, Qa = /* @__PURE__ */ p({
1541
+ embedder: () => Wa,
1542
+ language: () => Y,
1543
+ options: () => Za
1544
+ }), X = "embeddedXml", { softline: $a } = e, eo = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1286
1545
  let o = {
1287
1546
  ...r,
1288
1547
  ...a
1289
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = y(n, t), m = [], h = 0;
1548
+ }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = w(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = x(n, t), m = [], h = 0;
1290
1549
  for (; h !== void 0;) {
1291
1550
  let t = u.slice(h);
1292
1551
  if (t.length === 0) break;
1293
- h > 0 && o.xmlWhitespaceSensitivity !== "strict" && m.push(Gr), o.__embeddedXmlFragmentRecoverIndex?.splice(0, o.__embeddedXmlFragmentRecoverIndex.length);
1552
+ h > 0 && o.xmlWhitespaceSensitivity !== "strict" && m.push($a), o.__embeddedXmlFragmentRecoverIndex?.splice(0, o.__embeddedXmlFragmentRecoverIndex.length);
1294
1553
  let n = await e(t, {
1295
1554
  ...o,
1296
- parser: Q
1555
+ parser: X
1297
1556
  }), [r, i] = o.__embeddedXmlFragmentRecoverIndex ?? [];
1298
1557
  r === void 0 ? h = void 0 : i === void 0 ? h += r : (n = t.slice(r, i + 1), h += i + 1), m.push(n);
1299
1558
  }
1300
- return v(b(m, l, p), o, i, d, f, o.xmlWhitespaceSensitivity === "strict");
1301
- }, qr = [
1559
+ return b(S(m, l, p), o, i, d, f, o.xmlWhitespaceSensitivity === "strict");
1560
+ }, to = [
1302
1561
  "xml",
1303
1562
  "opml",
1304
1563
  "rss",
1305
1564
  "svg"
1306
- ], Jr = C(Q), Yr = w(Q), Xr = T(Q), Zr = {
1307
- [Jr]: {
1565
+ ], no = T(X), ro = E(X), io = D(X), ao = {
1566
+ [no]: {
1308
1567
  category: "Embed",
1309
1568
  type: "string",
1310
1569
  array: !0,
1311
- default: [{ value: [...qr] }],
1570
+ default: [{ value: [...to] }],
1312
1571
  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.",
1313
- deprecated: `Please use \`${Yr}\` or \`${Xr}\`.`
1572
+ deprecated: `Please use \`${ro}\` or \`${io}\`.`
1314
1573
  },
1315
- [Yr]: {
1574
+ [ro]: {
1316
1575
  category: "Embed",
1317
1576
  type: "string",
1318
1577
  array: !0,
1319
- default: [{ value: [D] }],
1578
+ default: [{ value: [k] }],
1320
1579
  description: "Block comments that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
1321
1580
  },
1322
- [Xr]: {
1581
+ [io]: {
1323
1582
  category: "Embed",
1324
1583
  type: "string",
1325
1584
  array: !0,
1326
- default: [{ value: [D] }],
1585
+ default: [{ value: [k] }],
1327
1586
  description: "Tags that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
1328
1587
  },
1329
1588
  __embeddedXmlFragmentRecoverIndex: {
@@ -1336,15 +1595,15 @@ var { line: Jt, group: R, indent: Yt, softline: Xt, dedentToRoot: Zt, literallin
1336
1595
  };
1337
1596
  //#endregion
1338
1597
  //#region src/embedded/xml/parser.ts
1339
- function Qr(e, t) {
1598
+ function oo(e, t) {
1340
1599
  if (t && Number.isFinite(t.line) && Number.isFinite(t.column)) return e.split("\n").slice(0, t.line - 1).reduce((e, t) => e + t.length + 1, 0) + t.column - 1;
1341
1600
  }
1342
- async function $(e, t, n) {
1601
+ async function Z(e, t, n) {
1343
1602
  try {
1344
1603
  return await n.parse(e, t);
1345
1604
  } catch (r) {
1346
1605
  if (!(r instanceof Error)) throw r;
1347
- let { loc: i } = r, a = Qr(e, i?.start), o = Qr(e, i?.end), s = t, c = (...e) => s.__embeddedXmlFragmentRecoverIndex?.splice(0, s.__embeddedXmlFragmentRecoverIndex.length, ...e), l = "Expecting token of type --> OPEN <-- but found --> ";
1606
+ let { loc: i } = r, a = oo(e, i?.start), o = oo(e, i?.end), s = t, c = (...e) => s.__embeddedXmlFragmentRecoverIndex?.splice(0, s.__embeddedXmlFragmentRecoverIndex.length, ...e), l = "Expecting token of type --> OPEN <-- but found --> ";
1348
1607
  if (r.message.startsWith(`${l}'' <--`)) {
1349
1608
  let r = await n.parse(`${e}<prettier-embed-fragment />`, t);
1350
1609
  return r.children ? delete r.children.element : r.element = null, r.location = {
@@ -1352,39 +1611,39 @@ async function $(e, t, n) {
1352
1611
  endOffset: e.length - 1
1353
1612
  }, r;
1354
1613
  }
1355
- if (a !== void 0 && a > 0 && (r.message.startsWith("Expecting token of type --> EOF <--") || r.message.startsWith("Redundant input, expecting EOF but found: "))) return c(a), $(e.slice(0, a), t, n);
1356
- if (a !== void 0 && o !== void 0 && r.message.startsWith(l)) return c(a, o), $("", t, n);
1614
+ if (a !== void 0 && a > 0 && (r.message.startsWith("Expecting token of type --> EOF <--") || r.message.startsWith("Redundant input, expecting EOF but found: "))) return c(a), Z(e.slice(0, a), t, n);
1615
+ if (a !== void 0 && o !== void 0 && r.message.startsWith(l)) return c(a, o), Z("", t, n);
1357
1616
  throw r;
1358
1617
  }
1359
1618
  }
1360
- function $r(e) {
1619
+ function so(e) {
1361
1620
  if (typeof e == "object" && e && "parsers" in e) return e.parsers?.xml;
1362
1621
  }
1363
- function ei(e) {
1364
- let t = $r(typeof e == "object" && e && "default" in e ? e.default : e);
1622
+ function co(e) {
1623
+ let t = so(typeof e == "object" && e && "default" in e ? e.default : e);
1365
1624
  if (!t) throw Error("The XML plugin must provide the \"xml\" parser.");
1366
1625
  return t;
1367
1626
  }
1368
- async function ti(e, t = () => import("@prettier/plugin-xml"), a = import.meta.url) {
1627
+ async function lo(e, t = () => import("@prettier/plugin-xml"), a = import.meta.url) {
1369
1628
  try {
1370
- return ei(await t());
1629
+ return co(await t());
1371
1630
  } catch (t) {
1372
1631
  for (let t of [a, e ? r.resolve(e) : `${process.cwd()}/package.json`]) try {
1373
1632
  let e = n(t).resolve("@prettier/plugin-xml");
1374
- return ei(await import(i(e).href));
1633
+ return co(await import(i(e).href));
1375
1634
  } catch {}
1376
1635
  throw Error("Formatting embedded XML requires the consumer to install and load \"@prettier/plugin-xml\".", { cause: t });
1377
1636
  }
1378
1637
  }
1379
- async function ni(e, t, n = ti) {
1638
+ async function uo(e, t, n = lo) {
1380
1639
  for (let n = (t.plugins?.length ?? 0) - 1; n >= 0; n--) {
1381
- let r = $r(t.plugins[n]);
1382
- if (r) return $(e, t, r);
1640
+ let r = so(t.plugins[n]);
1641
+ if (r) return Z(e, t, r);
1383
1642
  }
1384
- return $(e, t, await n(t.filepath));
1643
+ return Z(e, t, await n(t.filepath));
1385
1644
  }
1386
- var ri = {
1387
- parse: ni,
1645
+ var fo = {
1646
+ parse: uo,
1388
1647
  astFormat: "xml",
1389
1648
  locStart(e) {
1390
1649
  return e.location?.startOffset ?? 0;
@@ -1392,83 +1651,135 @@ var ri = {
1392
1651
  locEnd(e) {
1393
1652
  return e.location?.endOffset ?? NaN;
1394
1653
  }
1395
- }, ii = /* @__PURE__ */ p({
1396
- embedder: () => Kr,
1654
+ }, po = /* @__PURE__ */ p({
1655
+ embedder: () => eo,
1656
+ language: () => X,
1657
+ loadXmlParser: () => lo,
1658
+ options: () => ao,
1659
+ parseWithXmlPlugin: () => Z,
1660
+ parseXml: () => uo,
1661
+ parser: () => fo
1662
+ }), Q = "embeddedXQuery", mo = A({
1663
+ parser: "xquery",
1664
+ parserOption: `${Q}Parser`
1665
+ }), ho = ["xquery", "xq"], go = E(Q), _o = D(Q), vo = `${Q}Parser`, yo = {
1666
+ [go]: {
1667
+ category: "Embed",
1668
+ type: "string",
1669
+ array: !0,
1670
+ default: [{ value: [...ho] }],
1671
+ description: "Block comments that identify embedded XQuery in template literals. Requires the `prettier-plugin-xquery` plugin."
1672
+ },
1673
+ [_o]: {
1674
+ category: "Embed",
1675
+ type: "string",
1676
+ array: !0,
1677
+ default: [{ value: [...ho] }],
1678
+ description: "Tags that identify embedded XQuery in template literals. Requires the `prettier-plugin-xquery` plugin."
1679
+ },
1680
+ [vo]: {
1681
+ category: "Embed",
1682
+ type: "choice",
1683
+ default: "xquery",
1684
+ description: "The parser used to format embedded XQuery.",
1685
+ choices: [{
1686
+ value: "xquery",
1687
+ description: "Use the `xquery` parser."
1688
+ }, {
1689
+ value: "xquery4",
1690
+ description: "Use the `xquery4` parser."
1691
+ }]
1692
+ }
1693
+ }, bo = /* @__PURE__ */ p({
1694
+ embedder: () => mo,
1397
1695
  language: () => Q,
1398
- loadXmlParser: () => ti,
1399
- options: () => Zr,
1400
- parseWithXmlPlugin: () => $,
1401
- parseXml: () => ni,
1402
- parser: () => ri
1403
- }), ai = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1696
+ options: () => yo
1697
+ }), xo = async (e, t, n, r, { commentOrTag: i, embeddedOverrideOptions: a }) => {
1404
1698
  let o = {
1405
1699
  ...r,
1406
1700
  ...a
1407
- }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = S(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = _(s, c), p = d.slice(d.lastIndexOf("\n") + 1), m = y(n, t);
1408
- return v(b(await e(p ? u.replace(RegExp(`(\\r?\\n)${fe(p)}`, "g"), "$1") : u, {
1701
+ }, { node: s } = n, { createPlaceholder: c, placeholderRegex: l } = w(), { trimmedText: u, leadingWhitespaces: d, trailingWhitespaces: f } = y(s, c), p = d.slice(d.lastIndexOf("\n") + 1), m = x(n, t);
1702
+ return b(S(await e(p ? u.replace(RegExp(`(\\r?\\n)${ve(p)}`, "g"), "$1") : u, {
1409
1703
  ...o,
1410
1704
  parser: "yaml"
1411
1705
  }), l, m), o, i, d, f);
1412
- }, oi = "embeddedYaml", si = ["yaml", "yml"], ci = C(oi), li = w(oi), ui = T(oi), di = {
1413
- [ci]: {
1706
+ }, So = "embeddedYaml", Co = ["yaml", "yml"], wo = T(So), To = E(So), Eo = D(So), Do = {
1707
+ [wo]: {
1414
1708
  category: "Embed",
1415
1709
  type: "string",
1416
1710
  array: !0,
1417
- default: [{ value: [...si] }],
1711
+ default: [{ value: [...Co] }],
1418
1712
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language.",
1419
- deprecated: `Please use \`${li}\` or \`${ui}\`.`
1713
+ deprecated: `Please use \`${To}\` or \`${Eo}\`.`
1420
1714
  },
1421
- [li]: {
1715
+ [To]: {
1422
1716
  category: "Embed",
1423
1717
  type: "string",
1424
1718
  array: !0,
1425
- default: [{ value: [D] }],
1719
+ default: [{ value: [k] }],
1426
1720
  description: "Block comments that make their subsequent template literals be identified as embedded YAML language."
1427
1721
  },
1428
- [ui]: {
1722
+ [Eo]: {
1429
1723
  category: "Embed",
1430
1724
  type: "string",
1431
1725
  array: !0,
1432
- default: [{ value: [D] }],
1726
+ default: [{ value: [k] }],
1433
1727
  description: "Tags that make their subsequent template literals be identified as embedded YAML language."
1434
1728
  }
1435
- }, fi = /* @__PURE__ */ p({
1436
- embedder: () => ai,
1437
- language: () => oi,
1438
- options: () => di
1439
- }), pi = [], mi = {}, hi = {}, gi = {}, _i = /* #__PURE__ */ Object.assign({
1440
- "./css/index.ts": Se,
1441
- "./es/index.ts": je,
1442
- "./glsl/index.ts": Re,
1443
- "./graphql/index.ts": Ge,
1444
- "./html/index.ts": tt,
1445
- "./ini/index.ts": ct,
1446
- "./java/index.ts": ht,
1447
- "./json/index.ts": Tt,
1448
- "./jsonata/index.ts": Mt,
1449
- "./latex/index.ts": zt,
1450
- "./markdown/index.ts": cn,
1451
- "./nginx/index.ts": hn,
1452
- "./noop/index.ts": bn,
1453
- "./pegjs/index.ts": Dn,
1454
- "./php/index.ts": Pn,
1455
- "./prisma/index.ts": Vn,
1456
- "./properties/index.ts": Jn,
1457
- "./pug/index.ts": tr,
1458
- "./ruby/index.ts": ur,
1459
- "./sh/index.ts": _r,
1460
- "./sql/index.ts": Or,
1461
- "./toml/index.ts": Fr,
1462
- "./ts/index.ts": Wr,
1463
- "./xml/index.ts": ii,
1464
- "./yaml/index.ts": fi
1729
+ }, Oo = /* @__PURE__ */ p({
1730
+ embedder: () => xo,
1731
+ language: () => So,
1732
+ options: () => Do
1733
+ }), ko = [], Ao = {}, jo = {}, Mo = {}, No = /* #__PURE__ */ Object.assign({
1734
+ "./astro/index.ts": Ee,
1735
+ "./css/index.ts": Fe,
1736
+ "./dockerfile/index.ts": He,
1737
+ "./es/index.ts": Ze,
1738
+ "./gherkin/index.ts": it,
1739
+ "./glsl/index.ts": ft,
1740
+ "./go-template/index.ts": yt,
1741
+ "./graphql/index.ts": Dt,
1742
+ "./handlebars/index.ts": Pt,
1743
+ "./html/index.ts": Ut,
1744
+ "./hugo/index.ts": Xt,
1745
+ "./ini/index.ts": rn,
1746
+ "./java/index.ts": dn,
1747
+ "./jinja/index.ts": vn,
1748
+ "./json/index.ts": On,
1749
+ "./jsonata/index.ts": Fn,
1750
+ "./jte/index.ts": Hn,
1751
+ "./latex/index.ts": Yn,
1752
+ "./liquid/index.ts": nr,
1753
+ "./markdown/index.ts": gr,
1754
+ "./marko/index.ts": Cr,
1755
+ "./motoko/index.ts": jr,
1756
+ "./mustache/index.ts": Rr,
1757
+ "./nginx/index.ts": Gr,
1758
+ "./noop/index.ts": Xr,
1759
+ "./nunjucks/index.ts": ri,
1760
+ "./pegjs/index.ts": ui,
1761
+ "./php/index.ts": _i,
1762
+ "./powershell/index.ts": wi,
1763
+ "./prisma/index.ts": Mi,
1764
+ "./properties/index.ts": Bi,
1765
+ "./pug/index.ts": Ji,
1766
+ "./ruby/index.ts": ra,
1767
+ "./sh/index.ts": da,
1768
+ "./solidity/index.ts": va,
1769
+ "./sql/index.ts": ka,
1770
+ "./svelte/index.ts": Ia,
1771
+ "./toml/index.ts": Ua,
1772
+ "./ts/index.ts": Qa,
1773
+ "./xml/index.ts": po,
1774
+ "./xquery/index.ts": bo,
1775
+ "./yaml/index.ts": Oo
1465
1776
  });
1466
- for (let { language: e, parser: t, embedder: n, options: r } of Object.values(_i)) de(pi, e, V), t && (mi[e] = t), n && (hi[e] = n), Object.assign(gi, r);
1777
+ for (let { language: e, parser: t, embedder: n, options: r } of Object.values(No)) _e(ko, e, H), t && (Ao[e] = t), n && (jo[e] = n), Object.assign(Mo, r);
1467
1778
  //#endregion
1468
1779
  //#region src/options.ts
1469
- var vi = "noEmbeddedIdentificationByComment", yi = "noEmbeddedIdentificationByTag", bi = "preserveEmbeddedExteriorWhitespaces", xi = "noEmbeddedMultiLineIndentation", Si = "embeddedOverrides", Ci = {
1470
- ...gi,
1471
- [vi]: {
1780
+ var Po = "noEmbeddedIdentificationByComment", Fo = "noEmbeddedIdentificationByTag", Io = "preserveEmbeddedExteriorWhitespaces", Lo = "noEmbeddedMultiLineIndentation", Ro = "embeddedOverrides", zo = {
1781
+ ...Mo,
1782
+ [Po]: {
1472
1783
  category: "Embed",
1473
1784
  type: "string",
1474
1785
  array: !0,
@@ -1476,7 +1787,7 @@ var vi = "noEmbeddedIdentificationByComment", yi = "noEmbeddedIdentificationByTa
1476
1787
  description: "Turns off `` /* comment */ `...` `` comment-based embedded language identification for the specified identifiers.",
1477
1788
  deprecated: "Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore."
1478
1789
  },
1479
- [yi]: {
1790
+ [Fo]: {
1480
1791
  category: "Embed",
1481
1792
  type: "string",
1482
1793
  array: !0,
@@ -1484,53 +1795,53 @@ var vi = "noEmbeddedIdentificationByComment", yi = "noEmbeddedIdentificationByTa
1484
1795
  description: "Turns off `` tag`...` `` tag-based embedded language identification for the specified identifiers.",
1485
1796
  deprecated: "Please use `embedded<Language>Comments` or `embedded<Language>Tags` to configure each embedded language, and you won't need this option anymore."
1486
1797
  },
1487
- [bi]: {
1798
+ [Io]: {
1488
1799
  category: "Embed",
1489
1800
  type: "string",
1490
1801
  array: !0,
1491
1802
  default: [{ value: [] }],
1492
1803
  description: "Preserves leading and trailing whitespaces in the formatting results for the specified comments or tags."
1493
1804
  },
1494
- [xi]: {
1805
+ [Lo]: {
1495
1806
  category: "Embed",
1496
1807
  type: "string",
1497
1808
  array: !0,
1498
1809
  default: [{ value: [] }],
1499
1810
  description: "Turns off auto indentation in the formatting results for the specified comments or tags when they are formatted to span multi lines."
1500
1811
  },
1501
- [Si]: {
1812
+ [Ro]: {
1502
1813
  category: "Embed",
1503
1814
  type: "string",
1504
1815
  array: !1,
1505
1816
  default: void 0,
1506
1817
  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."
1507
1818
  }
1508
- }, wi = {
1819
+ }, Bo = {
1509
1820
  ...a.parsers,
1510
1821
  ...o.parsers,
1511
1822
  ...s.parsers,
1512
1823
  ...l.parsers,
1513
1824
  ...c.parsers,
1514
- ...mi
1515
- }, Ti = /("(?:\\?[^])*?")|(\/\/.*)|(\/\*[^]*?\*\/)/g, Ei = /("(?:\\?[^])*?")|(,\s*)(?=]|})/g, Di = { parse: (e) => {
1825
+ ...Ao
1826
+ }, Vo = /("(?:\\?[^])*?")|(\/\/.*)|(\/\*[^]*?\*\/)/g, Ho = /("(?:\\?[^])*?")|(,\s*)(?=]|})/g, Uo = { parse: (e) => {
1516
1827
  e = String(e);
1517
1828
  try {
1518
1829
  return JSON.parse(e);
1519
1830
  } catch {
1520
- return JSON.parse(e.replace(Ti, "$1").replace(Ei, "$1"));
1831
+ return JSON.parse(e.replace(Vo, "$1").replace(Ho, "$1"));
1521
1832
  }
1522
- } }, { label: Oi } = e;
1523
- async function ki(e) {
1833
+ } }, { label: Wo } = e;
1834
+ async function Go(e) {
1524
1835
  try {
1525
1836
  let { readFile: t } = await import("node:fs/promises"), n = await t(e, { encoding: "utf-8" });
1526
- return Di.parse(n);
1837
+ return Uo.parse(n);
1527
1838
  } catch {}
1528
1839
  }
1529
- var Ai = /* @__PURE__ */ new URL("./import-module-worker.js", import.meta.url);
1530
- async function ji(e) {
1840
+ var Ko = /* @__PURE__ */ new URL("./import-module-worker.js", import.meta.url);
1841
+ async function qo(e) {
1531
1842
  let { Worker: t } = await import("node:worker_threads");
1532
1843
  return new Promise((n) => {
1533
- let r = new t(Ai, { workerData: { absolutePath: e } });
1844
+ let r = new t(Ko, { workerData: { absolutePath: e } });
1534
1845
  r.once("message", (e) => {
1535
1846
  r.terminate(), e.error && console.error(e.error), n(e.overrides);
1536
1847
  }), r.once("error", (e) => {
@@ -1540,88 +1851,88 @@ async function ji(e) {
1540
1851
  });
1541
1852
  });
1542
1853
  }
1543
- async function Mi(e, t) {
1854
+ async function Jo(e, t) {
1544
1855
  let { isAbsolute: n, dirname: r, resolve: i } = await import("node:path");
1545
1856
  if (n(e)) return e;
1546
1857
  let a = await d(t);
1547
1858
  return i(typeof a == "string" ? r(a) : process.env.PWD ?? process.cwd(), e);
1548
1859
  }
1549
- var Ni = async (e, t) => {
1860
+ var Yo = async (e, t) => {
1550
1861
  let n;
1551
1862
  try {
1552
1863
  n = (await import("node:path")).extname(e);
1553
1864
  } catch {
1554
1865
  try {
1555
- return Di.parse(e);
1866
+ return Uo.parse(e);
1556
1867
  } catch {
1557
1868
  console.error("Failed to parse embeddedOverrides as a json object");
1558
1869
  return;
1559
1870
  }
1560
1871
  }
1561
- let r = Mi(e, t);
1872
+ let r = Jo(e, t);
1562
1873
  if (n === ".json" || n === ".jsonc") {
1563
- let e = await r, t = await ki(e);
1874
+ let e = await r, t = await Go(e);
1564
1875
  if (t !== void 0) return t;
1565
1876
  console.error(`Failed to parse the json file: ${e}`);
1566
1877
  } else if (n === ".mjs" || n === ".cjs" || n === ".js") {
1567
- let e = await r, t = await ji(e);
1878
+ let e = await r, t = await qo(e);
1568
1879
  if (t !== void 0) return t;
1569
1880
  console.error(`Failed to parse the js module file: ${e}`);
1570
1881
  } else if (n === ".mts" || n === ".cts" || n === ".ts") {
1571
- let e = await r, t = await ji(e);
1882
+ let e = await r, t = await qo(e);
1572
1883
  if (t !== void 0) return t;
1573
1884
  console.error(`Failed to parse the ts module file: ${e}`);
1574
1885
  } else {
1575
1886
  if (n === "") {
1576
- let e = await ki(await r);
1887
+ let e = await Go(await r);
1577
1888
  if (e !== void 0) return e;
1578
1889
  }
1579
1890
  try {
1580
- return Di.parse(e);
1891
+ return Uo.parse(e);
1581
1892
  } catch {
1582
1893
  console.error("Failed to parse embeddedOverrides as a json object");
1583
1894
  }
1584
1895
  }
1585
- }, Pi = /* @__PURE__ */ new WeakMap();
1586
- async function Fi(e, { commentOrTag: t, kind: n }) {
1896
+ }, Xo = /* @__PURE__ */ new WeakMap();
1897
+ async function Zo(e, { commentOrTag: t, kind: n }) {
1587
1898
  if (e.embeddedOverrides === void 0) return;
1588
- let r = Pi.get(e);
1589
- r === void 0 && (r = Ni(e.embeddedOverrides, e.filepath), Pi.set(e, r));
1899
+ let r = Xo.get(e);
1900
+ r === void 0 && (r = Yo(e.embeddedOverrides, e.filepath), Xo.set(e, r));
1590
1901
  let i = await r;
1591
1902
  if (i !== void 0) for (let { [`${n}s`]: e, identifiers: r, options: a } of i) {
1592
1903
  let n = e ?? [];
1593
1904
  if (n.length === 0 && r?.includes(t) || n.includes(t)) return a;
1594
1905
  }
1595
1906
  }
1596
- function* Ii(e) {
1597
- yield e, e.type === "CallExpression" && (yield* Ii(e.callee));
1907
+ function* Qo(e) {
1908
+ yield e, e.type === "CallExpression" && (yield* Qo(e.callee));
1598
1909
  }
1599
- function Li(e) {
1910
+ function $(e) {
1600
1911
  if (e.type === "Identifier") return e.name;
1601
1912
  if (e.type === "ThisExpression") return "this";
1602
1913
  if (e.type === "MemberExpression") {
1603
- let t = Li(e.object);
1914
+ let t = $(e.object);
1604
1915
  if (t === void 0) return;
1605
1916
  let n = "optional" in e && e.optional;
1606
1917
  return !e.computed && e.property.type === "Identifier" ? `${t}${n ? "?." : "."}${e.property.name}` : e.property.type === "Literal" ? `${t}${n ? "?." : ""}[${JSON.stringify(e.property.value)}]` : e.property.type === "Identifier" ? `${t}${n ? "?." : ""}[${e.property.name}]` : void 0;
1607
1918
  }
1608
1919
  if (e.type === "CallExpression") {
1609
- let t = Li(e.callee);
1920
+ let t = $(e.callee);
1610
1921
  return t === void 0 ? void 0 : `${t}()`;
1611
1922
  }
1612
- if (e.type === "ChainExpression") return Li(e.expression);
1923
+ if (e.type === "ChainExpression") return $(e.expression);
1613
1924
  }
1614
- function Ri(e, t) {
1925
+ function $o(e, t) {
1615
1926
  let n = /^\/(.*)\/([dgimsuvy]*)$/.exec(t);
1616
1927
  if (!n) return !1;
1617
1928
  try {
1618
- let t = Li(e);
1929
+ let t = $(e);
1619
1930
  return t !== void 0 && new RegExp(n[1], n[2]).test(t);
1620
1931
  } catch {
1621
1932
  return !1;
1622
1933
  }
1623
1934
  }
1624
- var zi = (() => {
1935
+ var es = (() => {
1625
1936
  let e = /* @__PURE__ */ new Set([
1626
1937
  "start",
1627
1938
  "end",
@@ -1632,7 +1943,7 @@ var zi = (() => {
1632
1943
  "decorators"
1633
1944
  ]);
1634
1945
  return (t, n, r) => {
1635
- if (/^\/.*\/[dgimsuvy]*$/.test(n)) return Ri(t, n);
1946
+ if (/^\/.*\/[dgimsuvy]*$/.test(n)) return $o(t, n);
1636
1947
  let i;
1637
1948
  try {
1638
1949
  let e = r(`${n}\`\``);
@@ -1644,11 +1955,11 @@ var zi = (() => {
1644
1955
  if (i.type === "File" && (i = i.program), i.type !== "Program" || i.body[0]?.type !== "ExpressionStatement") return !1;
1645
1956
  let a = i.body[0]?.expression;
1646
1957
  if (a?.type !== "TaggedTemplateExpression") return !1;
1647
- for (let n of Ii(t)) if (qi(n, a.tag, e)) return !0;
1958
+ for (let n of Qo(t)) if (cs(n, a.tag, e)) return !0;
1648
1959
  return !1;
1649
1960
  };
1650
1961
  })();
1651
- function Bi({ node: e, parent: t }) {
1962
+ function ts({ node: e, parent: t }) {
1652
1963
  let n = e.comments ?? t?.comments;
1653
1964
  if (!n) return;
1654
1965
  let r = n[n.length - 1];
@@ -1660,113 +1971,109 @@ function Bi({ node: e, parent: t }) {
1660
1971
  let i = r.value;
1661
1972
  if (i.length > 1 && i.startsWith(" ") && i.endsWith(" ")) return i.slice(1, -1);
1662
1973
  }
1663
- function Vi({ parent: e }) {
1974
+ function ns({ parent: e }) {
1664
1975
  if (e?.type === "TaggedTemplateExpression") return e.tag.type === "Identifier" ? e.tag.name : e.tag;
1665
1976
  }
1666
- function Hi(e, t) {
1977
+ function rs(e, t) {
1667
1978
  return e.noEmbeddedIdentificationByComment?.includes(t) ?? !1 ? function* (e) {} : function* (t) {
1668
- let n = e[w(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1669
- n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[C(t)] ?? [] : yield* n;
1979
+ let n = e[E(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1980
+ n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[T(t)] ?? [] : yield* n;
1670
1981
  };
1671
1982
  }
1672
- function Ui(e, t) {
1983
+ function is(e, t) {
1673
1984
  return typeof t == "string" ? e.noEmbeddedIdentificationByTag?.includes(t) ?? !1 ? function* (e) {} : function* (t) {
1674
- let n = e[T(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1675
- n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[C(t)] ?? [] : yield* n;
1985
+ let n = e[D(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1986
+ n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed" ? yield* e[T(t)] ?? [] : yield* n;
1676
1987
  } : function* (t) {
1677
- let n = e[T(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1988
+ let n = e[D(t)] ?? ["9ff2b366e8ca4c97b9aed1a29b5b94ed"];
1678
1989
  if (n[0] === "9ff2b366e8ca4c97b9aed1a29b5b94ed") {
1679
1990
  let { noEmbeddedIdentificationByTag: n } = e;
1680
- for (let r of e[C(t)] ?? []) n?.includes(r) || (yield r);
1991
+ for (let r of e[T(t)] ?? []) n?.includes(r) || (yield r);
1681
1992
  } else yield* n;
1682
1993
  };
1683
1994
  }
1684
- function Wi(e, t, n, r, i) {
1685
- let a = hi[t];
1995
+ function as(e, t, n, r, i) {
1996
+ let a = jo[t];
1686
1997
  if (!a) return null;
1687
1998
  if (e.quasis.length === 1 && e.quasis[0]?.value.raw.trim() === "") return "``";
1688
- let o = Fi(i, {
1999
+ let o = Zo(i, {
1689
2000
  commentOrTag: n,
1690
2001
  kind: r
1691
2002
  });
1692
2003
  return async (...e) => {
1693
- try {
1694
- let t = await a(...e, {
1695
- commentOrTag: n,
1696
- kind: r,
1697
- embeddedOverrideOptions: await o
1698
- });
1699
- return Oi({
1700
- embed: !0,
1701
- ...t.label
1702
- }, t);
1703
- } catch (e) {
1704
- throw console.error(e), e;
1705
- }
2004
+ let t = await a(...e, {
2005
+ commentOrTag: n,
2006
+ kind: r,
2007
+ embeddedOverrideOptions: await o
2008
+ });
2009
+ return Wo({
2010
+ embed: !0,
2011
+ ...t.label
2012
+ }, t);
1706
2013
  };
1707
2014
  }
1708
- function Gi(e, t, n) {
1709
- return Object.is(e, t) ? !0 : e === null || t === null ? !1 : Array.isArray(e) ? Ki(e, t, n) : typeof e == "object" && qi(e, t, n);
2015
+ function os(e, t, n) {
2016
+ return Object.is(e, t) ? !0 : e === null || t === null ? !1 : Array.isArray(e) ? ss(e, t, n) : typeof e == "object" && cs(e, t, n);
1710
2017
  }
1711
- function Ki(e, t, n) {
2018
+ function ss(e, t, n) {
1712
2019
  let r = e.length;
1713
2020
  if (r !== t.length) return !1;
1714
- for (let i = 0; i < r; i++) if (!Gi(e[i], t[i], n)) return !1;
2021
+ for (let i = 0; i < r; i++) if (!os(e[i], t[i], n)) return !1;
1715
2022
  return !0;
1716
2023
  }
1717
- function qi(e, t, n) {
1718
- for (let r of Object.keys(e)) if (!n?.has(r) && !(Object.hasOwn(t, r) && Gi(e[r], t[r], n))) return !1;
2024
+ function cs(e, t, n) {
2025
+ for (let r of Object.keys(e)) if (!n?.has(r) && !(Object.hasOwn(t, r) && os(e[r], t[r], n))) return !1;
1719
2026
  return !0;
1720
2027
  }
1721
2028
  //#endregion
1722
2029
  //#region src/printers.ts
1723
- var { estree: Ji } = u, { embed: Yi } = Ji, Xi = (e, t) => {
2030
+ var { estree: ls } = u, { embed: us } = ls, ds = (e, t) => {
1724
2031
  let { node: n } = e;
1725
2032
  if (n.type !== "TemplateLiteral" || n.quasis.some(({ value: { cooked: e } }) => e === null)) return null;
1726
- let r = Bi(e);
2033
+ let r = ts(e);
1727
2034
  if (typeof r == "string") {
1728
- let i = Hi(t, r);
1729
- for (let e of pi) {
2035
+ let i = rs(t, r);
2036
+ for (let e of ko) {
1730
2037
  let a = !1;
1731
2038
  for (let t of i(e)) if (r === t) {
1732
2039
  a = !0;
1733
2040
  break;
1734
2041
  }
1735
- if (a) return Wi(n, e, r, "comment", t);
2042
+ if (a) return as(n, e, r, "comment", t);
1736
2043
  }
1737
- return Yi?.(e, t) ?? null;
2044
+ return us?.(e, t) ?? null;
1738
2045
  }
1739
- let i = Vi(e);
2046
+ let i = ns(e);
1740
2047
  if (typeof i == "string") {
1741
- let r = Ui(t, i);
1742
- for (let e of pi) {
2048
+ let r = is(t, i);
2049
+ for (let e of ko) {
1743
2050
  let a;
1744
- for (let t of r(e)) if (i === t || Ri({
2051
+ for (let t of r(e)) if (i === t || $o({
1745
2052
  type: "Identifier",
1746
2053
  name: i
1747
2054
  }, t)) {
1748
2055
  a = t;
1749
2056
  break;
1750
2057
  }
1751
- if (a !== void 0) return Wi(n, e, a, "tag", t);
2058
+ if (a !== void 0) return as(n, e, a, "tag", t);
1752
2059
  }
1753
- return Yi?.(e, t) ?? null;
2060
+ return us?.(e, t) ?? null;
1754
2061
  }
1755
2062
  if (i !== void 0) {
1756
- let e = (e) => wi[t.parser].parse(e, t), r = Ui(t);
1757
- for (let a of pi) {
2063
+ let e = (e) => Bo[t.parser].parse(e, t), r = is(t);
2064
+ for (let a of ko) {
1758
2065
  let o;
1759
- for (let t of r(a)) if (zi(i, t, e)) {
2066
+ for (let t of r(a)) if (es(i, t, e)) {
1760
2067
  o = t;
1761
2068
  break;
1762
2069
  }
1763
- if (o !== void 0) return Wi(n, a, o, "tag", t);
2070
+ if (o !== void 0) return as(n, a, o, "tag", t);
1764
2071
  }
1765
2072
  }
1766
- return Yi?.(e, t) ?? null;
1767
- }, Zi = { estree: {
1768
- ...Ji,
1769
- embed: Xi
2073
+ return us?.(e, t) ?? null;
2074
+ }, fs = { estree: {
2075
+ ...ls,
2076
+ embed: ds
1770
2077
  } };
1771
2078
  //#endregion
1772
- export { Ci as options, wi as parsers, Zi as printers };
2079
+ export { zo as options, Bo as parsers, fs as printers };