@dipusevilla/componentes-iu 1.1.4 → 1.1.6

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 (66) hide show
  1. package/dist/html-6Zgdkrh7.mjs +2784 -0
  2. package/dist/html-KxqAGR9q.js +25 -0
  3. package/dist/index.cjs.js +222 -123
  4. package/dist/index.css +1 -1
  5. package/dist/index.es.js +27469 -20227
  6. package/dist/index.umd.js +280 -129
  7. package/dist/standalone-CUhUiIuV.mjs +2458 -0
  8. package/dist/standalone-RFBVEkze.js +29 -0
  9. package/dist/types/components/FileUploader.d.ts +1 -0
  10. package/dist/types/components/FormFieldInput.d.ts +5 -1
  11. package/dist/types/components/FormLabel.d.ts +5 -1
  12. package/dist/types/components/FormRenderer.d.ts +1 -2
  13. package/dist/types/components/FormRenderer.test.d.ts +1 -0
  14. package/dist/types/components/InfoButton.d.ts +5 -0
  15. package/dist/types/components/Input.d.ts +6 -1
  16. package/dist/types/components/Modal.d.ts +5 -1
  17. package/dist/types/components/Select.d.ts +2 -0
  18. package/dist/types/components/Tabs.d.ts +3 -1
  19. package/dist/types/components/TextArea.d.ts +2 -1
  20. package/dist/types/editor/adapters/inMemoryTranslationAdapter.d.ts +2 -0
  21. package/dist/types/editor/components/CodeEditor.d.ts +18 -0
  22. package/dist/types/editor/components/EndpointBrowser.d.ts +1 -1
  23. package/dist/types/editor/components/EndpointConfigModal.d.ts +3 -2
  24. package/dist/types/editor/components/EndpointParameterConfig.d.ts +2 -1
  25. package/dist/types/editor/components/InfoBuilderModal.d.ts +11 -0
  26. package/dist/types/editor/components/OnloadEndpointsManager.d.ts +6 -0
  27. package/dist/types/editor/components/RuleBuilderModal.d.ts +22 -0
  28. package/dist/types/editor/components/SystemVariablesModal.d.ts +7 -0
  29. package/dist/types/editor/components/ValidationBuilderModal.d.ts +12 -0
  30. package/dist/types/editor/dnd/dndPaths.d.ts +4 -0
  31. package/dist/types/editor/importers/dto/analysis/analyzer.d.ts +11 -0
  32. package/dist/types/editor/importers/dto/generator.d.ts +11 -0
  33. package/dist/types/editor/importers/dto/inference.d.ts +8 -0
  34. package/dist/types/editor/importers/dto/layout.d.ts +5 -0
  35. package/dist/types/editor/importers/dto/naming.d.ts +5 -0
  36. package/dist/types/editor/importers/dto/parser.d.ts +9 -0
  37. package/dist/types/editor/importers/dto/strategies/MasterDetailStrategy.d.ts +8 -0
  38. package/dist/types/editor/importers/dto/strategies/MixedStrategy.d.ts +8 -0
  39. package/dist/types/editor/importers/dto/strategies/StandardStrategy.d.ts +8 -0
  40. package/dist/types/editor/importers/dto/strategies/TabsStrategy.d.ts +8 -0
  41. package/dist/types/editor/importers/dto/strategies/types.d.ts +14 -0
  42. package/dist/types/editor/importers/dto/strategies.d.ts +20 -0
  43. package/dist/types/editor/importers/dto/translations.d.ts +5 -0
  44. package/dist/types/editor/importers/dto/types.d.ts +45 -0
  45. package/dist/types/editor/importers/dto/utils.d.ts +11 -0
  46. package/dist/types/editor/importers/generateFromDTO.d.ts +3 -56
  47. package/dist/types/editor/store/runtimeDebugStore.d.ts +11 -0
  48. package/dist/types/editor/store.d.ts +43 -11
  49. package/dist/types/editor/types/endpointMetadata.d.ts +5 -3
  50. package/dist/types/editor/utils/adapterGenerator.d.ts +2 -3
  51. package/dist/types/editor/utils/adapterHelpers.d.ts +10 -0
  52. package/dist/types/editor/utils/exportProject.d.ts +10 -0
  53. package/dist/types/editor/utils/fieldKinds.d.ts +1 -1
  54. package/dist/types/editor/utils/generateServicesCode.d.ts +8 -0
  55. package/dist/types/editor/utils/importProject.d.ts +9 -0
  56. package/dist/types/index.d.ts +1 -0
  57. package/dist/types/rules/RuleDSL.d.ts +12 -0
  58. package/dist/types/types/EndpointTypes.d.ts +30 -0
  59. package/dist/types/types/FormTypes.d.ts +120 -19
  60. package/dist/types/utils/SecureValidator.d.ts +16 -0
  61. package/dist/types/utils/endpointHelpers.d.ts +2 -2
  62. package/dist/types/utils/interpolationHelpers.d.ts +1 -0
  63. package/dist/types/utils/translationHelpers.d.ts +5 -1
  64. package/package.json +16 -2
  65. package/dist/types/editor/components/ServiceAdapterGenerator.d.ts +0 -4
  66. package/dist/types/editor/helpers/serviceParser.d.ts +0 -6
@@ -0,0 +1,2458 @@
1
+ var Uu = Object.defineProperty;
2
+ var gt = (e) => {
3
+ throw TypeError(e);
4
+ };
5
+ var qu = (e, t, u) => t in e ? Uu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: u }) : e[t] = u;
6
+ var Ae = (e, t, u) => qu(e, typeof t != "symbol" ? t + "" : t, u), Hu = (e, t, u) => t.has(e) || gt("Cannot " + u);
7
+ var Et = (e, t, u) => t.has(e) ? gt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, u);
8
+ var fe = (e, t, u) => (Hu(e, t, "access private method"), u);
9
+ var Gu = Object.create, Qe = Object.defineProperty, Yu = Object.getOwnPropertyDescriptor, Qu = Object.getOwnPropertyNames, Zu = Object.getPrototypeOf, er = Object.prototype.hasOwnProperty, tr = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), Ze = (e, t) => {
10
+ for (var u in t) Qe(e, u, { get: t[u], enumerable: !0 });
11
+ }, ur = (e, t, u, r) => {
12
+ if (t && typeof t == "object" || typeof t == "function") for (let n of Qu(t)) !er.call(e, n) && n !== u && Qe(e, n, { get: () => t[n], enumerable: !(r = Yu(t, n)) || r.enumerable });
13
+ return e;
14
+ }, rr = (e, t, u) => (u = e != null ? Gu(Zu(e)) : {}, ur(Qe(u, "default", { value: e, enumerable: !0 }), e)), nr = tr((e, t) => {
15
+ var u, r, n, D, a, o, i, s, l, f, c, F, d, p, E, g, m, b, C;
16
+ d = /\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu, F = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y, u = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu, E = /(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y, c = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y, g = /[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y, C = /[\t\v\f\ufeff\p{Zs}]+/yu, s = /\r?\n|[\r\u2028\u2029]/y, l = /\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y, p = /\/\/.*/y, n = /[<>.:={}]|\/(?![\/*])/y, r = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu, D = /(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y, a = /[^<>{}]+/y, b = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/, m = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/, o = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/, i = /^(?:return|throw|yield)$/, f = RegExp(s.source), t.exports = function* (y, { jsx: w = !1 } = {}) {
17
+ var x, L, $, v, B, le, h, P, ce, N, re, A, ge, k;
18
+ for ({ length: le } = y, v = 0, B = "", k = [{ tag: "JS" }], x = [], re = 0, A = !1; v < le; ) {
19
+ switch (P = k[k.length - 1], P.tag) {
20
+ case "JS":
21
+ case "JSNonExpressionParen":
22
+ case "InterpolationInTemplate":
23
+ case "InterpolationInJSX":
24
+ if (y[v] === "/" && (b.test(B) || o.test(B)) && (d.lastIndex = v, h = d.exec(y))) {
25
+ v = d.lastIndex, B = h[0], A = !0, yield { type: "RegularExpressionLiteral", value: h[0], closed: h[1] !== void 0 && h[1] !== "\\" };
26
+ continue;
27
+ }
28
+ if (F.lastIndex = v, h = F.exec(y)) {
29
+ switch (ge = h[0], ce = F.lastIndex, N = ge, ge) {
30
+ case "(":
31
+ B === "?NonExpressionParenKeyword" && k.push({ tag: "JSNonExpressionParen", nesting: re }), re++, A = !1;
32
+ break;
33
+ case ")":
34
+ re--, A = !0, P.tag === "JSNonExpressionParen" && re === P.nesting && (k.pop(), N = "?NonExpressionParenEnd", A = !1);
35
+ break;
36
+ case "{":
37
+ F.lastIndex = 0, $ = !m.test(B) && (b.test(B) || o.test(B)), x.push($), A = !1;
38
+ break;
39
+ case "}":
40
+ switch (P.tag) {
41
+ case "InterpolationInTemplate":
42
+ if (x.length === P.nesting) {
43
+ g.lastIndex = v, h = g.exec(y), v = g.lastIndex, B = h[0], h[1] === "${" ? (B = "?InterpolationInTemplate", A = !1, yield { type: "TemplateMiddle", value: h[0] }) : (k.pop(), A = !0, yield { type: "TemplateTail", value: h[0], closed: h[1] === "`" });
44
+ continue;
45
+ }
46
+ break;
47
+ case "InterpolationInJSX":
48
+ if (x.length === P.nesting) {
49
+ k.pop(), v += 1, B = "}", yield { type: "JSXPunctuator", value: "}" };
50
+ continue;
51
+ }
52
+ }
53
+ A = x.pop(), N = A ? "?ExpressionBraceEnd" : "}";
54
+ break;
55
+ case "]":
56
+ A = !0;
57
+ break;
58
+ case "++":
59
+ case "--":
60
+ N = A ? "?PostfixIncDec" : "?UnaryIncDec";
61
+ break;
62
+ case "<":
63
+ if (w && (b.test(B) || o.test(B))) {
64
+ k.push({ tag: "JSXTag" }), v += 1, B = "<", yield { type: "JSXPunctuator", value: ge };
65
+ continue;
66
+ }
67
+ A = !1;
68
+ break;
69
+ default:
70
+ A = !1;
71
+ }
72
+ v = ce, B = N, yield { type: "Punctuator", value: ge };
73
+ continue;
74
+ }
75
+ if (u.lastIndex = v, h = u.exec(y)) {
76
+ switch (v = u.lastIndex, N = h[0], h[0]) {
77
+ case "for":
78
+ case "if":
79
+ case "while":
80
+ case "with":
81
+ B !== "." && B !== "?." && (N = "?NonExpressionParenKeyword");
82
+ }
83
+ B = N, A = !o.test(h[0]), yield { type: h[1] === "#" ? "PrivateIdentifier" : "IdentifierName", value: h[0] };
84
+ continue;
85
+ }
86
+ if (E.lastIndex = v, h = E.exec(y)) {
87
+ v = E.lastIndex, B = h[0], A = !0, yield { type: "StringLiteral", value: h[0], closed: h[2] !== void 0 };
88
+ continue;
89
+ }
90
+ if (c.lastIndex = v, h = c.exec(y)) {
91
+ v = c.lastIndex, B = h[0], A = !0, yield { type: "NumericLiteral", value: h[0] };
92
+ continue;
93
+ }
94
+ if (g.lastIndex = v, h = g.exec(y)) {
95
+ v = g.lastIndex, B = h[0], h[1] === "${" ? (B = "?InterpolationInTemplate", k.push({ tag: "InterpolationInTemplate", nesting: x.length }), A = !1, yield { type: "TemplateHead", value: h[0] }) : (A = !0, yield { type: "NoSubstitutionTemplate", value: h[0], closed: h[1] === "`" });
96
+ continue;
97
+ }
98
+ break;
99
+ case "JSXTag":
100
+ case "JSXTagEnd":
101
+ if (n.lastIndex = v, h = n.exec(y)) {
102
+ switch (v = n.lastIndex, N = h[0], h[0]) {
103
+ case "<":
104
+ k.push({ tag: "JSXTag" });
105
+ break;
106
+ case ">":
107
+ k.pop(), B === "/" || P.tag === "JSXTagEnd" ? (N = "?JSX", A = !0) : k.push({ tag: "JSXChildren" });
108
+ break;
109
+ case "{":
110
+ k.push({ tag: "InterpolationInJSX", nesting: x.length }), N = "?InterpolationInJSX", A = !1;
111
+ break;
112
+ case "/":
113
+ B === "<" && (k.pop(), k[k.length - 1].tag === "JSXChildren" && k.pop(), k.push({ tag: "JSXTagEnd" }));
114
+ }
115
+ B = N, yield { type: "JSXPunctuator", value: h[0] };
116
+ continue;
117
+ }
118
+ if (r.lastIndex = v, h = r.exec(y)) {
119
+ v = r.lastIndex, B = h[0], yield { type: "JSXIdentifier", value: h[0] };
120
+ continue;
121
+ }
122
+ if (D.lastIndex = v, h = D.exec(y)) {
123
+ v = D.lastIndex, B = h[0], yield { type: "JSXString", value: h[0], closed: h[2] !== void 0 };
124
+ continue;
125
+ }
126
+ break;
127
+ case "JSXChildren":
128
+ if (a.lastIndex = v, h = a.exec(y)) {
129
+ v = a.lastIndex, B = h[0], yield { type: "JSXText", value: h[0] };
130
+ continue;
131
+ }
132
+ switch (y[v]) {
133
+ case "<":
134
+ k.push({ tag: "JSXTag" }), v++, B = "<", yield { type: "JSXPunctuator", value: "<" };
135
+ continue;
136
+ case "{":
137
+ k.push({ tag: "InterpolationInJSX", nesting: x.length }), v++, B = "?InterpolationInJSX", A = !1, yield { type: "JSXPunctuator", value: "{" };
138
+ continue;
139
+ }
140
+ }
141
+ if (C.lastIndex = v, h = C.exec(y)) {
142
+ v = C.lastIndex, yield { type: "WhiteSpace", value: h[0] };
143
+ continue;
144
+ }
145
+ if (s.lastIndex = v, h = s.exec(y)) {
146
+ v = s.lastIndex, A = !1, i.test(B) && (B = "?NoLineTerminatorHere"), yield { type: "LineTerminatorSequence", value: h[0] };
147
+ continue;
148
+ }
149
+ if (l.lastIndex = v, h = l.exec(y)) {
150
+ v = l.lastIndex, f.test(h[0]) && (A = !1, i.test(B) && (B = "?NoLineTerminatorHere")), yield { type: "MultiLineComment", value: h[0], closed: h[1] !== void 0 };
151
+ continue;
152
+ }
153
+ if (p.lastIndex = v, h = p.exec(y)) {
154
+ v = p.lastIndex, A = !1, yield { type: "SingleLineComment", value: h[0] };
155
+ continue;
156
+ }
157
+ L = String.fromCodePoint(y.codePointAt(v)), v += L.length, B = L, A = !1, yield { type: P.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid", value: L };
158
+ }
159
+ };
160
+ }), Dr = {};
161
+ Ze(Dr, { __debug: () => qa, check: () => Xa, doc: () => Mu, format: () => Xu, formatWithCursor: () => zu, getSupportInfo: () => Ua, util: () => Vu, version: () => Ea });
162
+ var ve = (e, t) => (u, r, ...n) => u | 1 && r == null ? void 0 : (t.call(r) ?? r[e]).apply(r, n), ar = String.prototype.replaceAll ?? function(e, t) {
163
+ return e.global ? this.replace(e, t) : this.split(e).join(t);
164
+ }, or = ve("replaceAll", function() {
165
+ if (typeof this == "string") return ar;
166
+ }), Oe = or, ir = class {
167
+ diff(e, t, u = {}) {
168
+ let r;
169
+ typeof u == "function" ? (r = u, u = {}) : "callback" in u && (r = u.callback);
170
+ let n = this.castInput(e, u), D = this.castInput(t, u), a = this.removeEmpty(this.tokenize(n, u)), o = this.removeEmpty(this.tokenize(D, u));
171
+ return this.diffWithOptionsObj(a, o, u, r);
172
+ }
173
+ diffWithOptionsObj(e, t, u, r) {
174
+ var n;
175
+ let D = (g) => {
176
+ if (g = this.postProcess(g, u), r) {
177
+ setTimeout(function() {
178
+ r(g);
179
+ }, 0);
180
+ return;
181
+ } else return g;
182
+ }, a = t.length, o = e.length, i = 1, s = a + o;
183
+ u.maxEditLength != null && (s = Math.min(s, u.maxEditLength));
184
+ let l = (n = u.timeout) !== null && n !== void 0 ? n : 1 / 0, f = Date.now() + l, c = [{ oldPos: -1, lastComponent: void 0 }], F = this.extractCommon(c[0], t, e, 0, u);
185
+ if (c[0].oldPos + 1 >= o && F + 1 >= a) return D(this.buildValues(c[0].lastComponent, t, e));
186
+ let d = -1 / 0, p = 1 / 0, E = () => {
187
+ for (let g = Math.max(d, -i); g <= Math.min(p, i); g += 2) {
188
+ let m, b = c[g - 1], C = c[g + 1];
189
+ b && (c[g - 1] = void 0);
190
+ let y = !1;
191
+ if (C) {
192
+ let x = C.oldPos - g;
193
+ y = C && 0 <= x && x < a;
194
+ }
195
+ let w = b && b.oldPos + 1 < o;
196
+ if (!y && !w) {
197
+ c[g] = void 0;
198
+ continue;
199
+ }
200
+ if (!w || y && b.oldPos < C.oldPos ? m = this.addToPath(C, !0, !1, 0, u) : m = this.addToPath(b, !1, !0, 1, u), F = this.extractCommon(m, t, e, g, u), m.oldPos + 1 >= o && F + 1 >= a) return D(this.buildValues(m.lastComponent, t, e)) || !0;
201
+ c[g] = m, m.oldPos + 1 >= o && (p = Math.min(p, g - 1)), F + 1 >= a && (d = Math.max(d, g + 1));
202
+ }
203
+ i++;
204
+ };
205
+ if (r) (function g() {
206
+ setTimeout(function() {
207
+ if (i > s || Date.now() > f) return r(void 0);
208
+ E() || g();
209
+ }, 0);
210
+ })();
211
+ else for (; i <= s && Date.now() <= f; ) {
212
+ let g = E();
213
+ if (g) return g;
214
+ }
215
+ }
216
+ addToPath(e, t, u, r, n) {
217
+ let D = e.lastComponent;
218
+ return D && !n.oneChangePerToken && D.added === t && D.removed === u ? { oldPos: e.oldPos + r, lastComponent: { count: D.count + 1, added: t, removed: u, previousComponent: D.previousComponent } } : { oldPos: e.oldPos + r, lastComponent: { count: 1, added: t, removed: u, previousComponent: D } };
219
+ }
220
+ extractCommon(e, t, u, r, n) {
221
+ let D = t.length, a = u.length, o = e.oldPos, i = o - r, s = 0;
222
+ for (; i + 1 < D && o + 1 < a && this.equals(u[o + 1], t[i + 1], n); ) i++, o++, s++, n.oneChangePerToken && (e.lastComponent = { count: 1, previousComponent: e.lastComponent, added: !1, removed: !1 });
223
+ return s && !n.oneChangePerToken && (e.lastComponent = { count: s, previousComponent: e.lastComponent, added: !1, removed: !1 }), e.oldPos = o, i;
224
+ }
225
+ equals(e, t, u) {
226
+ return u.comparator ? u.comparator(e, t) : e === t || !!u.ignoreCase && e.toLowerCase() === t.toLowerCase();
227
+ }
228
+ removeEmpty(e) {
229
+ let t = [];
230
+ for (let u = 0; u < e.length; u++) e[u] && t.push(e[u]);
231
+ return t;
232
+ }
233
+ castInput(e, t) {
234
+ return e;
235
+ }
236
+ tokenize(e, t) {
237
+ return Array.from(e);
238
+ }
239
+ join(e) {
240
+ return e.join("");
241
+ }
242
+ postProcess(e, t) {
243
+ return e;
244
+ }
245
+ get useLongestToken() {
246
+ return !1;
247
+ }
248
+ buildValues(e, t, u) {
249
+ let r = [], n;
250
+ for (; e; ) r.push(e), n = e.previousComponent, delete e.previousComponent, e = n;
251
+ r.reverse();
252
+ let D = r.length, a = 0, o = 0, i = 0;
253
+ for (; a < D; a++) {
254
+ let s = r[a];
255
+ if (s.removed) s.value = this.join(u.slice(i, i + s.count)), i += s.count;
256
+ else {
257
+ if (!s.added && this.useLongestToken) {
258
+ let l = t.slice(o, o + s.count);
259
+ l = l.map(function(f, c) {
260
+ let F = u[i + c];
261
+ return F.length > f.length ? F : f;
262
+ }), s.value = this.join(l);
263
+ } else s.value = this.join(t.slice(o, o + s.count));
264
+ o += s.count, s.added || (i += s.count);
265
+ }
266
+ }
267
+ return r;
268
+ }
269
+ }, sr = class extends ir {
270
+ tokenize(e) {
271
+ return e.slice();
272
+ }
273
+ join(e) {
274
+ return e;
275
+ }
276
+ removeEmpty(e) {
277
+ return e;
278
+ }
279
+ }, lr = new sr();
280
+ function cr(e, t, u) {
281
+ return lr.diff(e, t, u);
282
+ }
283
+ var fr = () => {
284
+ }, Fr = fr, Ut = "cr", qt = "crlf", dr = "lf", pr = dr, et = "\r", Ht = `\r
285
+ `, _e = `
286
+ `, hr = _e;
287
+ function Cr(e) {
288
+ let t = e.indexOf(et);
289
+ return t !== -1 ? e.charAt(t + 1) === _e ? qt : Ut : pr;
290
+ }
291
+ function tt(e) {
292
+ return e === Ut ? et : e === qt ? Ht : hr;
293
+ }
294
+ var gr = /* @__PURE__ */ new Map([[_e, /\n/gu], [et, /\r/gu], [Ht, /\r\n/gu]]);
295
+ function Gt(e, t) {
296
+ var r;
297
+ let u = gr.get(t);
298
+ return ((r = e.match(u)) == null ? void 0 : r.length) ?? 0;
299
+ }
300
+ var Er = /\r\n?/gu;
301
+ function mr(e) {
302
+ return Oe(0, e, Er, _e);
303
+ }
304
+ function yr(e) {
305
+ return this[e < 0 ? this.length + e : e];
306
+ }
307
+ var vr = ve("at", function() {
308
+ if (Array.isArray(this) || typeof this == "string") return yr;
309
+ }), S = vr, ie = "string", X = "array", te = "cursor", U = "indent", q = "align", H = "trim", _ = "group", M = "fill", T = "if-break", G = "indent-if-break", Y = "line-suffix", Q = "line-suffix-boundary", I = "line", V = "label", j = "break-parent", Yt = /* @__PURE__ */ new Set([te, U, q, H, _, M, T, G, Y, Q, I, V, j]);
310
+ function Br(e) {
311
+ let t = e.length;
312
+ for (; t > 0 && (e[t - 1] === "\r" || e[t - 1] === `
313
+ `); ) t--;
314
+ return t < e.length ? e.slice(0, t) : e;
315
+ }
316
+ function br(e) {
317
+ if (typeof e == "string") return ie;
318
+ if (Array.isArray(e)) return X;
319
+ if (!e) return;
320
+ let { type: t } = e;
321
+ if (Yt.has(t)) return t;
322
+ }
323
+ var se = br, Ar = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
324
+ function wr(e) {
325
+ let t = e === null ? "null" : typeof e;
326
+ if (t !== "string" && t !== "object") return `Unexpected doc '${t}',
327
+ Expected it to be 'string' or 'object'.`;
328
+ if (se(e)) throw new Error("doc is valid.");
329
+ let u = Object.prototype.toString.call(e);
330
+ if (u !== "[object Object]") return `Unexpected doc '${u}'.`;
331
+ let r = Ar([...Yt].map((n) => `'${n}'`));
332
+ return `Unexpected doc.type '${e.type}'.
333
+ Expected it to be ${r}.`;
334
+ }
335
+ var kr = class extends Error {
336
+ constructor(t) {
337
+ super(wr(t));
338
+ Ae(this, "name", "InvalidDocError");
339
+ this.doc = t;
340
+ }
341
+ }, pe = kr, mt = {};
342
+ function xr(e, t, u, r) {
343
+ let n = [e];
344
+ for (; n.length > 0; ) {
345
+ let D = n.pop();
346
+ if (D === mt) {
347
+ u(n.pop());
348
+ continue;
349
+ }
350
+ u && n.push(D, mt);
351
+ let a = se(D);
352
+ if (!a) throw new pe(D);
353
+ if ((t == null ? void 0 : t(D)) !== !1) switch (a) {
354
+ case X:
355
+ case M: {
356
+ let o = a === X ? D : D.parts;
357
+ for (let i = o.length, s = i - 1; s >= 0; --s) n.push(o[s]);
358
+ break;
359
+ }
360
+ case T:
361
+ n.push(D.flatContents, D.breakContents);
362
+ break;
363
+ case _:
364
+ if (r && D.expandedStates) for (let o = D.expandedStates.length, i = o - 1; i >= 0; --i) n.push(D.expandedStates[i]);
365
+ else n.push(D.contents);
366
+ break;
367
+ case q:
368
+ case U:
369
+ case G:
370
+ case V:
371
+ case Y:
372
+ n.push(D.contents);
373
+ break;
374
+ case ie:
375
+ case te:
376
+ case H:
377
+ case Q:
378
+ case I:
379
+ case j:
380
+ break;
381
+ default:
382
+ throw new pe(D);
383
+ }
384
+ }
385
+ }
386
+ var ut = xr;
387
+ function Te(e, t) {
388
+ if (typeof e == "string") return t(e);
389
+ let u = /* @__PURE__ */ new Map();
390
+ return r(e);
391
+ function r(D) {
392
+ if (u.has(D)) return u.get(D);
393
+ let a = n(D);
394
+ return u.set(D, a), a;
395
+ }
396
+ function n(D) {
397
+ switch (se(D)) {
398
+ case X:
399
+ return t(D.map(r));
400
+ case M:
401
+ return t({ ...D, parts: D.parts.map(r) });
402
+ case T:
403
+ return t({ ...D, breakContents: r(D.breakContents), flatContents: r(D.flatContents) });
404
+ case _: {
405
+ let { expandedStates: a, contents: o } = D;
406
+ return a ? (a = a.map(r), o = a[0]) : o = r(o), t({ ...D, contents: o, expandedStates: a });
407
+ }
408
+ case q:
409
+ case U:
410
+ case G:
411
+ case V:
412
+ case Y:
413
+ return t({ ...D, contents: r(D.contents) });
414
+ case ie:
415
+ case te:
416
+ case H:
417
+ case Q:
418
+ case I:
419
+ case j:
420
+ return t(D);
421
+ default:
422
+ throw new pe(D);
423
+ }
424
+ }
425
+ }
426
+ function rt(e, t, u) {
427
+ let r = u, n = !1;
428
+ function D(a) {
429
+ if (n) return !1;
430
+ let o = t(a);
431
+ o !== void 0 && (n = !0, r = o);
432
+ }
433
+ return ut(e, D), r;
434
+ }
435
+ function Sr(e) {
436
+ if (e.type === _ && e.break || e.type === I && e.hard || e.type === j) return !0;
437
+ }
438
+ function Ir(e) {
439
+ return rt(e, Sr, !1);
440
+ }
441
+ function yt(e) {
442
+ if (e.length > 0) {
443
+ let t = S(0, e, -1);
444
+ !t.expandedStates && !t.break && (t.break = "propagated");
445
+ }
446
+ return null;
447
+ }
448
+ function Nr(e) {
449
+ let t = /* @__PURE__ */ new Set(), u = [];
450
+ function r(D) {
451
+ if (D.type === j && yt(u), D.type === _) {
452
+ if (u.push(D), t.has(D)) return !1;
453
+ t.add(D);
454
+ }
455
+ }
456
+ function n(D) {
457
+ D.type === _ && u.pop().break && yt(u);
458
+ }
459
+ ut(e, r, n, !0);
460
+ }
461
+ function Or(e) {
462
+ return e.type === I && !e.hard ? e.soft ? "" : " " : e.type === T ? e.flatContents : e;
463
+ }
464
+ function _r(e) {
465
+ return Te(e, Or);
466
+ }
467
+ function vt(e) {
468
+ for (e = [...e]; e.length >= 2 && S(0, e, -2).type === I && S(0, e, -1).type === j; ) e.length -= 2;
469
+ if (e.length > 0) {
470
+ let t = Ee(S(0, e, -1));
471
+ e[e.length - 1] = t;
472
+ }
473
+ return e;
474
+ }
475
+ function Ee(e) {
476
+ switch (se(e)) {
477
+ case U:
478
+ case G:
479
+ case _:
480
+ case Y:
481
+ case V: {
482
+ let t = Ee(e.contents);
483
+ return { ...e, contents: t };
484
+ }
485
+ case T:
486
+ return { ...e, breakContents: Ee(e.breakContents), flatContents: Ee(e.flatContents) };
487
+ case M:
488
+ return { ...e, parts: vt(e.parts) };
489
+ case X:
490
+ return vt(e);
491
+ case ie:
492
+ return Br(e);
493
+ case q:
494
+ case te:
495
+ case H:
496
+ case Q:
497
+ case I:
498
+ case j:
499
+ break;
500
+ default:
501
+ throw new pe(e);
502
+ }
503
+ return e;
504
+ }
505
+ function Qt(e) {
506
+ return Ee(Pr(e));
507
+ }
508
+ function Tr(e) {
509
+ switch (se(e)) {
510
+ case M:
511
+ if (e.parts.every((t) => t === "")) return "";
512
+ break;
513
+ case _:
514
+ if (!e.contents && !e.id && !e.break && !e.expandedStates) return "";
515
+ if (e.contents.type === _ && e.contents.id === e.id && e.contents.break === e.break && e.contents.expandedStates === e.expandedStates) return e.contents;
516
+ break;
517
+ case q:
518
+ case U:
519
+ case G:
520
+ case Y:
521
+ if (!e.contents) return "";
522
+ break;
523
+ case T:
524
+ if (!e.flatContents && !e.breakContents) return "";
525
+ break;
526
+ case X: {
527
+ let t = [];
528
+ for (let u of e) {
529
+ if (!u) continue;
530
+ let [r, ...n] = Array.isArray(u) ? u : [u];
531
+ typeof r == "string" && typeof S(0, t, -1) == "string" ? t[t.length - 1] += r : t.push(r), t.push(...n);
532
+ }
533
+ return t.length === 0 ? "" : t.length === 1 ? t[0] : t;
534
+ }
535
+ case ie:
536
+ case te:
537
+ case H:
538
+ case Q:
539
+ case I:
540
+ case V:
541
+ case j:
542
+ break;
543
+ default:
544
+ throw new pe(e);
545
+ }
546
+ return e;
547
+ }
548
+ function Pr(e) {
549
+ return Te(e, (t) => Tr(t));
550
+ }
551
+ function jr(e, t = Du) {
552
+ return Te(e, (u) => typeof u == "string" ? uu(t, u.split(`
553
+ `)) : u);
554
+ }
555
+ function Lr(e) {
556
+ if (e.type === I) return !0;
557
+ }
558
+ function $r(e) {
559
+ return rt(e, Lr, !1);
560
+ }
561
+ function xe(e, t) {
562
+ return e.type === V ? { ...e, contents: t(e.contents) } : t(e);
563
+ }
564
+ var Jr = Fr;
565
+ function Ne(e) {
566
+ return { type: U, contents: e };
567
+ }
568
+ function he(e, t) {
569
+ return { type: q, contents: t, n: e };
570
+ }
571
+ function Rr(e) {
572
+ return he(Number.NEGATIVE_INFINITY, e);
573
+ }
574
+ function Zt(e) {
575
+ return he({ type: "root" }, e);
576
+ }
577
+ function Mr(e) {
578
+ return he(-1, e);
579
+ }
580
+ function eu(e, t, u) {
581
+ let r = e;
582
+ if (t > 0) {
583
+ for (let n = 0; n < Math.floor(t / u); ++n) r = Ne(r);
584
+ r = he(t % u, r), r = he(Number.NEGATIVE_INFINITY, r);
585
+ }
586
+ return r;
587
+ }
588
+ var Pe = { type: j }, ae = { type: te };
589
+ function Vr(e) {
590
+ return { type: M, parts: e };
591
+ }
592
+ function tu(e, t = {}) {
593
+ return Jr(t.expandedStates), { type: _, id: t.id, contents: e, break: !!t.shouldBreak, expandedStates: t.expandedStates };
594
+ }
595
+ function Wr(e, t) {
596
+ return tu(e[0], { ...t, expandedStates: e });
597
+ }
598
+ function Kr(e, t = "", u = {}) {
599
+ return { type: T, breakContents: e, flatContents: t, groupId: u.groupId };
600
+ }
601
+ function zr(e, t) {
602
+ return { type: G, contents: e, groupId: t.groupId, negate: t.negate };
603
+ }
604
+ function uu(e, t) {
605
+ let u = [];
606
+ for (let r = 0; r < t.length; r++) r !== 0 && u.push(e), u.push(t[r]);
607
+ return u;
608
+ }
609
+ function Xr(e, t) {
610
+ return e ? { type: V, label: e, contents: t } : t;
611
+ }
612
+ var ru = { type: I }, Ur = { type: I, soft: !0 }, nt = { type: I, hard: !0 }, K = [nt, Pe], nu = { type: I, hard: !0, literal: !0 }, Du = [nu, Pe];
613
+ function Ue(e) {
614
+ return { type: Y, contents: e };
615
+ }
616
+ var qr = { type: Q }, Hr = { type: H };
617
+ function W(e) {
618
+ var t;
619
+ if (!e) return "";
620
+ if (Array.isArray(e)) {
621
+ let u = [];
622
+ for (let r of e) if (Array.isArray(r)) u.push(...W(r));
623
+ else {
624
+ let n = W(r);
625
+ n !== "" && u.push(n);
626
+ }
627
+ return u;
628
+ }
629
+ return e.type === T ? { ...e, breakContents: W(e.breakContents), flatContents: W(e.flatContents) } : e.type === _ ? { ...e, contents: W(e.contents), expandedStates: (t = e.expandedStates) == null ? void 0 : t.map(W) } : e.type === M ? { type: "fill", parts: e.parts.map(W) } : e.contents ? { ...e, contents: W(e.contents) } : e;
630
+ }
631
+ function Gr(e) {
632
+ let t = /* @__PURE__ */ Object.create(null), u = /* @__PURE__ */ new Set();
633
+ return r(W(e));
634
+ function r(D, a, o) {
635
+ var i, s;
636
+ if (typeof D == "string") return JSON.stringify(D);
637
+ if (Array.isArray(D)) {
638
+ let l = D.map(r).filter(Boolean);
639
+ return l.length === 1 ? l[0] : `[${l.join(", ")}]`;
640
+ }
641
+ if (D.type === I) {
642
+ let l = ((i = o == null ? void 0 : o[a + 1]) == null ? void 0 : i.type) === j;
643
+ return D.literal ? l ? "literalline" : "literallineWithoutBreakParent" : D.hard ? l ? "hardline" : "hardlineWithoutBreakParent" : D.soft ? "softline" : "line";
644
+ }
645
+ if (D.type === j) return ((s = o == null ? void 0 : o[a - 1]) == null ? void 0 : s.type) === I && o[a - 1].hard ? void 0 : "breakParent";
646
+ if (D.type === H) return "trim";
647
+ if (D.type === U) return "indent(" + r(D.contents) + ")";
648
+ if (D.type === q) return D.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + r(D.contents) + ")" : D.n < 0 ? "dedent(" + r(D.contents) + ")" : D.n.type === "root" ? "markAsRoot(" + r(D.contents) + ")" : "align(" + JSON.stringify(D.n) + ", " + r(D.contents) + ")";
649
+ if (D.type === T) return "ifBreak(" + r(D.breakContents) + (D.flatContents ? ", " + r(D.flatContents) : "") + (D.groupId ? (D.flatContents ? "" : ', ""') + `, { groupId: ${n(D.groupId)} }` : "") + ")";
650
+ if (D.type === G) {
651
+ let l = [];
652
+ D.negate && l.push("negate: true"), D.groupId && l.push(`groupId: ${n(D.groupId)}`);
653
+ let f = l.length > 0 ? `, { ${l.join(", ")} }` : "";
654
+ return `indentIfBreak(${r(D.contents)}${f})`;
655
+ }
656
+ if (D.type === _) {
657
+ let l = [];
658
+ D.break && D.break !== "propagated" && l.push("shouldBreak: true"), D.id && l.push(`id: ${n(D.id)}`);
659
+ let f = l.length > 0 ? `, { ${l.join(", ")} }` : "";
660
+ return D.expandedStates ? `conditionalGroup([${D.expandedStates.map((c) => r(c)).join(",")}]${f})` : `group(${r(D.contents)}${f})`;
661
+ }
662
+ if (D.type === M) return `fill([${D.parts.map((l) => r(l)).join(", ")}])`;
663
+ if (D.type === Y) return "lineSuffix(" + r(D.contents) + ")";
664
+ if (D.type === Q) return "lineSuffixBoundary";
665
+ if (D.type === V) return `label(${JSON.stringify(D.label)}, ${r(D.contents)})`;
666
+ if (D.type === te) return "cursor";
667
+ throw new Error("Unknown doc type " + D.type);
668
+ }
669
+ function n(D) {
670
+ if (typeof D != "symbol") return JSON.stringify(String(D));
671
+ if (D in t) return t[D];
672
+ let a = D.description || "symbol";
673
+ for (let o = 0; ; o++) {
674
+ let i = a + (o > 0 ? ` #${o}` : "");
675
+ if (!u.has(i)) return u.add(i), t[D] = `Symbol.for(${JSON.stringify(i)})`;
676
+ }
677
+ }
678
+ }
679
+ var Yr = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
680
+ function Qr(e) {
681
+ return e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510;
682
+ }
683
+ function Zr(e) {
684
+ return e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9776 && e <= 9783 || e >= 9800 && e <= 9811 || e === 9855 || e >= 9866 && e <= 9871 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12773 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e >= 94192 && e <= 94198 || e >= 94208 && e <= 101589 || e >= 101631 && e <= 101662 || e >= 101760 && e <= 101874 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e >= 119552 && e <= 119638 || e >= 119648 && e <= 119670 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128728 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129674 || e >= 129678 && e <= 129734 || e === 129736 || e >= 129741 && e <= 129756 || e >= 129759 && e <= 129770 || e >= 129775 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141;
685
+ }
686
+ var en = "©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇", tn = /[^\x20-\x7F]/u, un = new Set(en);
687
+ function rn(e) {
688
+ if (!e) return 0;
689
+ if (!tn.test(e)) return e.length;
690
+ e = e.replace(Yr(), (u) => un.has(u) ? " " : " ");
691
+ let t = 0;
692
+ for (let u of e) {
693
+ let r = u.codePointAt(0);
694
+ r <= 31 || r >= 127 && r <= 159 || r >= 768 && r <= 879 || r >= 65024 && r <= 65039 || (t += Qr(r) || Zr(r) ? 2 : 1);
695
+ }
696
+ return t;
697
+ }
698
+ var Dt = rn, nn = { type: 0 }, Dn = { type: 1 }, au = { value: "", length: 0, queue: [], get root() {
699
+ return au;
700
+ } };
701
+ function ou(e, t, u) {
702
+ let r = t.type === 1 ? e.queue.slice(0, -1) : [...e.queue, t], n = "", D = 0, a = 0, o = 0;
703
+ for (let d of r) switch (d.type) {
704
+ case 0:
705
+ l(), u.useTabs ? i(1) : s(u.tabWidth);
706
+ break;
707
+ case 3: {
708
+ let { string: p } = d;
709
+ l(), n += p, D += p.length;
710
+ break;
711
+ }
712
+ case 2: {
713
+ let { width: p } = d;
714
+ a += 1, o += p;
715
+ break;
716
+ }
717
+ default:
718
+ throw new Error(`Unexpected indent comment '${d.type}'.`);
719
+ }
720
+ return c(), { ...e, value: n, length: D, queue: r };
721
+ function i(d) {
722
+ n += " ".repeat(d), D += u.tabWidth * d;
723
+ }
724
+ function s(d) {
725
+ n += " ".repeat(d), D += d;
726
+ }
727
+ function l() {
728
+ u.useTabs ? f() : c();
729
+ }
730
+ function f() {
731
+ a > 0 && i(a), F();
732
+ }
733
+ function c() {
734
+ o > 0 && s(o), F();
735
+ }
736
+ function F() {
737
+ a = 0, o = 0;
738
+ }
739
+ }
740
+ function an(e, t, u) {
741
+ if (!t) return e;
742
+ if (t.type === "root") return { ...e, root: e };
743
+ if (t === Number.NEGATIVE_INFINITY) return e.root;
744
+ let r;
745
+ return typeof t == "number" ? t < 0 ? r = Dn : r = { type: 2, width: t } : r = { type: 3, string: t }, ou(e, r, u);
746
+ }
747
+ function on(e, t) {
748
+ return ou(e, nn, t);
749
+ }
750
+ function sn(e) {
751
+ let t = 0;
752
+ for (let u = e.length - 1; u >= 0; u--) {
753
+ let r = e[u];
754
+ if (r === " " || r === " ") t++;
755
+ else break;
756
+ }
757
+ return t;
758
+ }
759
+ function iu(e) {
760
+ let t = sn(e);
761
+ return { text: t === 0 ? e : e.slice(0, e.length - t), count: t };
762
+ }
763
+ var O = Symbol("MODE_BREAK"), J = Symbol("MODE_FLAT"), qe = Symbol("DOC_FILL_PRINTED_LENGTH");
764
+ function we(e, t, u, r, n, D) {
765
+ if (u === Number.POSITIVE_INFINITY) return !0;
766
+ let a = t.length, o = !1, i = [e], s = "";
767
+ for (; u >= 0; ) {
768
+ if (i.length === 0) {
769
+ if (a === 0) return !0;
770
+ i.push(t[--a]);
771
+ continue;
772
+ }
773
+ let { mode: l, doc: f } = i.pop(), c = se(f);
774
+ switch (c) {
775
+ case ie:
776
+ f && (o && (s += " ", u -= 1, o = !1), s += f, u -= Dt(f));
777
+ break;
778
+ case X:
779
+ case M: {
780
+ let F = c === X ? f : f.parts, d = f[qe] ?? 0;
781
+ for (let p = F.length - 1; p >= d; p--) i.push({ mode: l, doc: F[p] });
782
+ break;
783
+ }
784
+ case U:
785
+ case q:
786
+ case G:
787
+ case V:
788
+ i.push({ mode: l, doc: f.contents });
789
+ break;
790
+ case H: {
791
+ let { text: F, count: d } = iu(s);
792
+ s = F, u += d;
793
+ break;
794
+ }
795
+ case _: {
796
+ if (D && f.break) return !1;
797
+ let F = f.break ? O : l, d = f.expandedStates && F === O ? S(0, f.expandedStates, -1) : f.contents;
798
+ i.push({ mode: F, doc: d });
799
+ break;
800
+ }
801
+ case T: {
802
+ let F = (f.groupId ? n[f.groupId] || J : l) === O ? f.breakContents : f.flatContents;
803
+ F && i.push({ mode: l, doc: F });
804
+ break;
805
+ }
806
+ case I:
807
+ if (l === O || f.hard) return !0;
808
+ f.soft || (o = !0);
809
+ break;
810
+ case Y:
811
+ r = !0;
812
+ break;
813
+ case Q:
814
+ if (r) return !1;
815
+ break;
816
+ }
817
+ }
818
+ return !1;
819
+ }
820
+ function je(e, t) {
821
+ let u = /* @__PURE__ */ Object.create(null), r = t.printWidth, n = tt(t.endOfLine), D = 0, a = [{ indent: au, mode: O, doc: e }], o = "", i = !1, s = [], l = [], f = [], c = [], F = 0;
822
+ for (Nr(e); a.length > 0; ) {
823
+ let { indent: m, mode: b, doc: C } = a.pop();
824
+ switch (se(C)) {
825
+ case ie: {
826
+ let y = n !== `
827
+ ` ? Oe(0, C, `
828
+ `, n) : C;
829
+ y && (o += y, a.length > 0 && (D += Dt(y)));
830
+ break;
831
+ }
832
+ case X:
833
+ for (let y = C.length - 1; y >= 0; y--) a.push({ indent: m, mode: b, doc: C[y] });
834
+ break;
835
+ case te:
836
+ if (l.length >= 2) throw new Error("There are too many 'cursor' in doc.");
837
+ l.push(F + o.length);
838
+ break;
839
+ case U:
840
+ a.push({ indent: on(m, t), mode: b, doc: C.contents });
841
+ break;
842
+ case q:
843
+ a.push({ indent: an(m, C.n, t), mode: b, doc: C.contents });
844
+ break;
845
+ case H:
846
+ g();
847
+ break;
848
+ case _:
849
+ switch (b) {
850
+ case J:
851
+ if (!i) {
852
+ a.push({ indent: m, mode: C.break ? O : J, doc: C.contents });
853
+ break;
854
+ }
855
+ case O: {
856
+ i = !1;
857
+ let y = { indent: m, mode: J, doc: C.contents }, w = r - D, x = s.length > 0;
858
+ if (!C.break && we(y, a, w, x, u)) a.push(y);
859
+ else if (C.expandedStates) {
860
+ let L = S(0, C.expandedStates, -1);
861
+ if (C.break) {
862
+ a.push({ indent: m, mode: O, doc: L });
863
+ break;
864
+ } else for (let $ = 1; $ < C.expandedStates.length + 1; $++) if ($ >= C.expandedStates.length) {
865
+ a.push({ indent: m, mode: O, doc: L });
866
+ break;
867
+ } else {
868
+ let v = C.expandedStates[$], B = { indent: m, mode: J, doc: v };
869
+ if (we(B, a, w, x, u)) {
870
+ a.push(B);
871
+ break;
872
+ }
873
+ }
874
+ } else a.push({ indent: m, mode: O, doc: C.contents });
875
+ break;
876
+ }
877
+ }
878
+ C.id && (u[C.id] = S(0, a, -1).mode);
879
+ break;
880
+ case M: {
881
+ let y = r - D, w = C[qe] ?? 0, { parts: x } = C, L = x.length - w;
882
+ if (L === 0) break;
883
+ let $ = x[w + 0], v = x[w + 1], B = { indent: m, mode: J, doc: $ }, le = { indent: m, mode: O, doc: $ }, h = we(B, [], y, s.length > 0, u, !0);
884
+ if (L === 1) {
885
+ h ? a.push(B) : a.push(le);
886
+ break;
887
+ }
888
+ let P = { indent: m, mode: J, doc: v }, ce = { indent: m, mode: O, doc: v };
889
+ if (L === 2) {
890
+ h ? a.push(P, B) : a.push(ce, le);
891
+ break;
892
+ }
893
+ let N = x[w + 2], re = { indent: m, mode: b, doc: { ...C, [qe]: w + 2 } }, A = we({ indent: m, mode: J, doc: [$, v, N] }, [], y, s.length > 0, u, !0);
894
+ a.push(re), A ? a.push(P, B) : h ? a.push(ce, B) : a.push(ce, le);
895
+ break;
896
+ }
897
+ case T:
898
+ case G: {
899
+ let y = C.groupId ? u[C.groupId] : b;
900
+ if (y === O) {
901
+ let w = C.type === T ? C.breakContents : C.negate ? C.contents : Ne(C.contents);
902
+ w && a.push({ indent: m, mode: b, doc: w });
903
+ }
904
+ if (y === J) {
905
+ let w = C.type === T ? C.flatContents : C.negate ? Ne(C.contents) : C.contents;
906
+ w && a.push({ indent: m, mode: b, doc: w });
907
+ }
908
+ break;
909
+ }
910
+ case Y:
911
+ s.push({ indent: m, mode: b, doc: C.contents });
912
+ break;
913
+ case Q:
914
+ s.length > 0 && a.push({ indent: m, mode: b, doc: nt });
915
+ break;
916
+ case I:
917
+ switch (b) {
918
+ case J:
919
+ if (C.hard) i = !0;
920
+ else {
921
+ C.soft || (o += " ", D += 1);
922
+ break;
923
+ }
924
+ case O:
925
+ if (s.length > 0) {
926
+ a.push({ indent: m, mode: b, doc: C }, ...s.reverse()), s.length = 0;
927
+ break;
928
+ }
929
+ C.literal ? (o += n, D = 0, m.root && (m.root.value && (o += m.root.value), D = m.root.length)) : (g(), o += n + m.value, D = m.length);
930
+ break;
931
+ }
932
+ break;
933
+ case V:
934
+ a.push({ indent: m, mode: b, doc: C.contents });
935
+ break;
936
+ case j:
937
+ break;
938
+ default:
939
+ throw new pe(C);
940
+ }
941
+ a.length === 0 && s.length > 0 && (a.push(...s.reverse()), s.length = 0);
942
+ }
943
+ let d = f.join("") + o, p = [...c, ...l];
944
+ if (p.length !== 2) return { formatted: d };
945
+ let E = p[0];
946
+ return { formatted: d, cursorNodeStart: E, cursorNodeText: d.slice(E, S(0, p, -1)) };
947
+ function g() {
948
+ let { text: m, count: b } = iu(o);
949
+ m && (f.push(m), F += m.length), o = "", D -= b, l.length > 0 && (c.push(...l.map((C) => Math.min(C, F))), l.length = 0);
950
+ }
951
+ }
952
+ function ln(e, t, u = 0) {
953
+ let r = 0;
954
+ for (let n = u; n < e.length; ++n) e[n] === " " ? r = r + t - r % t : r++;
955
+ return r;
956
+ }
957
+ var at = ln, z, He, Se, Xt, cn = (Xt = class {
958
+ constructor(e) {
959
+ Et(this, z);
960
+ this.stack = [e];
961
+ }
962
+ get key() {
963
+ let { stack: e, siblings: t } = this;
964
+ return S(0, e, t === null ? -2 : -4) ?? null;
965
+ }
966
+ get index() {
967
+ return this.siblings === null ? null : S(0, this.stack, -2);
968
+ }
969
+ get node() {
970
+ return S(0, this.stack, -1);
971
+ }
972
+ get parent() {
973
+ return this.getNode(1);
974
+ }
975
+ get grandparent() {
976
+ return this.getNode(2);
977
+ }
978
+ get isInArray() {
979
+ return this.siblings !== null;
980
+ }
981
+ get siblings() {
982
+ let { stack: e } = this, t = S(0, e, -3);
983
+ return Array.isArray(t) ? t : null;
984
+ }
985
+ get next() {
986
+ let { siblings: e } = this;
987
+ return e === null ? null : e[this.index + 1];
988
+ }
989
+ get previous() {
990
+ let { siblings: e } = this;
991
+ return e === null ? null : e[this.index - 1];
992
+ }
993
+ get isFirst() {
994
+ return this.index === 0;
995
+ }
996
+ get isLast() {
997
+ let { siblings: e, index: t } = this;
998
+ return e !== null && t === e.length - 1;
999
+ }
1000
+ get isRoot() {
1001
+ return this.stack.length === 1;
1002
+ }
1003
+ get root() {
1004
+ return this.stack[0];
1005
+ }
1006
+ get ancestors() {
1007
+ return [...fe(this, z, Se).call(this)];
1008
+ }
1009
+ getName() {
1010
+ let { stack: e } = this, { length: t } = e;
1011
+ return t > 1 ? S(0, e, -2) : null;
1012
+ }
1013
+ getValue() {
1014
+ return S(0, this.stack, -1);
1015
+ }
1016
+ getNode(e = 0) {
1017
+ let t = fe(this, z, He).call(this, e);
1018
+ return t === -1 ? null : this.stack[t];
1019
+ }
1020
+ getParentNode(e = 0) {
1021
+ return this.getNode(e + 1);
1022
+ }
1023
+ call(e, ...t) {
1024
+ let { stack: u } = this, { length: r } = u, n = S(0, u, -1);
1025
+ for (let D of t) n = n == null ? void 0 : n[D], u.push(D, n);
1026
+ try {
1027
+ return e(this);
1028
+ } finally {
1029
+ u.length = r;
1030
+ }
1031
+ }
1032
+ callParent(e, t = 0) {
1033
+ let u = fe(this, z, He).call(this, t + 1), r = this.stack.splice(u + 1);
1034
+ try {
1035
+ return e(this);
1036
+ } finally {
1037
+ this.stack.push(...r);
1038
+ }
1039
+ }
1040
+ each(e, ...t) {
1041
+ let { stack: u } = this, { length: r } = u, n = S(0, u, -1);
1042
+ for (let D of t) n = n[D], u.push(D, n);
1043
+ try {
1044
+ for (let D = 0; D < n.length; ++D) u.push(D, n[D]), e(this, D, n), u.length -= 2;
1045
+ } finally {
1046
+ u.length = r;
1047
+ }
1048
+ }
1049
+ map(e, ...t) {
1050
+ let u = [];
1051
+ return this.each((r, n, D) => {
1052
+ u[n] = e(r, n, D);
1053
+ }, ...t), u;
1054
+ }
1055
+ match(...e) {
1056
+ let t = this.stack.length - 1, u = null, r = this.stack[t--];
1057
+ for (let n of e) {
1058
+ if (r === void 0) return !1;
1059
+ let D = null;
1060
+ if (typeof u == "number" && (D = u, u = this.stack[t--], r = this.stack[t--]), n && !n(r, u, D)) return !1;
1061
+ u = this.stack[t--], r = this.stack[t--];
1062
+ }
1063
+ return !0;
1064
+ }
1065
+ findAncestor(e) {
1066
+ for (let t of fe(this, z, Se).call(this)) if (e(t)) return t;
1067
+ }
1068
+ hasAncestor(e) {
1069
+ for (let t of fe(this, z, Se).call(this)) if (e(t)) return !0;
1070
+ return !1;
1071
+ }
1072
+ }, z = new WeakSet(), He = function(e) {
1073
+ let { stack: t } = this;
1074
+ for (let u = t.length - 1; u >= 0; u -= 2) if (!Array.isArray(t[u]) && --e < 0) return u;
1075
+ return -1;
1076
+ }, Se = function* () {
1077
+ let { stack: e } = this;
1078
+ for (let t = e.length - 3; t >= 0; t -= 2) {
1079
+ let u = e[t];
1080
+ Array.isArray(u) || (yield u);
1081
+ }
1082
+ }, Xt), fn = cn;
1083
+ function Fn(e) {
1084
+ return e !== null && typeof e == "object";
1085
+ }
1086
+ var ot = Fn;
1087
+ function Be(e) {
1088
+ return (t, u, r) => {
1089
+ let n = !!(r != null && r.backwards);
1090
+ if (u === !1) return !1;
1091
+ let { length: D } = t, a = u;
1092
+ for (; a >= 0 && a < D; ) {
1093
+ let o = t.charAt(a);
1094
+ if (e instanceof RegExp) {
1095
+ if (!e.test(o)) return a;
1096
+ } else if (!e.includes(o)) return a;
1097
+ n ? a-- : a++;
1098
+ }
1099
+ return a === -1 || a === D ? a : !1;
1100
+ };
1101
+ }
1102
+ var dn = Be(/\s/u), ee = Be(" "), su = Be(",; "), lu = Be(/[^\n\r]/u), Bt = (e) => e === `
1103
+ ` || e === "\r" || e === "\u2028" || e === "\u2029";
1104
+ function pn(e, t, u) {
1105
+ let r = !!(u != null && u.backwards);
1106
+ if (t === !1) return !1;
1107
+ let n = e.charAt(t);
1108
+ if (r) {
1109
+ if (e.charAt(t - 1) === "\r" && n === `
1110
+ `) return t - 2;
1111
+ if (Bt(n)) return t - 1;
1112
+ } else {
1113
+ if (n === "\r" && e.charAt(t + 1) === `
1114
+ `) return t + 2;
1115
+ if (Bt(n)) return t + 1;
1116
+ }
1117
+ return t;
1118
+ }
1119
+ var oe = pn;
1120
+ function hn(e, t, u = {}) {
1121
+ let r = ee(e, u.backwards ? t - 1 : t, u), n = oe(e, r, u);
1122
+ return r !== n;
1123
+ }
1124
+ var Z = hn;
1125
+ function Cn(e) {
1126
+ return Array.isArray(e) && e.length > 0;
1127
+ }
1128
+ var gn = Cn;
1129
+ function* Le(e, t) {
1130
+ let { getVisitorKeys: u, filter: r = () => !0 } = t, n = (D) => ot(D) && r(D);
1131
+ for (let D of u(e)) {
1132
+ let a = e[D];
1133
+ if (Array.isArray(a)) for (let o of a) n(o) && (yield o);
1134
+ else n(a) && (yield a);
1135
+ }
1136
+ }
1137
+ function* En(e, t) {
1138
+ let u = [e];
1139
+ for (let r = 0; r < u.length; r++) {
1140
+ let n = u[r];
1141
+ for (let D of Le(n, t)) yield D, u.push(D);
1142
+ }
1143
+ }
1144
+ function mn(e, t) {
1145
+ return Le(e, t).next().done;
1146
+ }
1147
+ function cu(e, t, u) {
1148
+ var s;
1149
+ let { cache: r } = u;
1150
+ if (r.has(e)) return r.get(e);
1151
+ let { filter: n } = u;
1152
+ if (!n) return [];
1153
+ let D, a = (((s = u.getChildren) == null ? void 0 : s.call(u, e, u)) ?? [...Le(e, { getVisitorKeys: u.getVisitorKeys })]).flatMap((l) => (D ?? (D = [e, ...t]), n(l, D) ? [l] : cu(l, D, u))), { locStart: o, locEnd: i } = u;
1154
+ return a.sort((l, f) => o(l) - o(f) || i(l) - i(f)), r.set(e, a), a;
1155
+ }
1156
+ var fu = cu;
1157
+ function yn(e) {
1158
+ let t = e.type || e.kind || "(unknown type)", u = String(e.name || e.id && (typeof e.id == "object" ? e.id.name : e.id) || e.key && (typeof e.key == "object" ? e.key.name : e.key) || e.value && (typeof e.value == "object" ? "" : String(e.value)) || e.operator || "");
1159
+ return u.length > 20 && (u = u.slice(0, 19) + "…"), t + (u ? " " + u : "");
1160
+ }
1161
+ function it(e, t) {
1162
+ (e.comments ?? (e.comments = [])).push(t), t.printed = !1, t.nodeDescription = yn(e);
1163
+ }
1164
+ function me(e, t) {
1165
+ t.leading = !0, t.trailing = !1, it(e, t);
1166
+ }
1167
+ function ne(e, t, u) {
1168
+ t.leading = !1, t.trailing = !1, u && (t.marker = u), it(e, t);
1169
+ }
1170
+ function ye(e, t) {
1171
+ t.leading = !1, t.trailing = !0, it(e, t);
1172
+ }
1173
+ var Fu = /* @__PURE__ */ new WeakMap();
1174
+ function du(e, t, u, r, n = []) {
1175
+ let { locStart: D, locEnd: a } = u, o = D(t), i = a(t), s = fu(e, n, { cache: Fu, locStart: D, locEnd: a, getVisitorKeys: u.getVisitorKeys, filter: u.printer.canAttachComment, getChildren: u.printer.getCommentChildNodes }), l, f, c = 0, F = s.length;
1176
+ for (; c < F; ) {
1177
+ let d = c + F >> 1, p = s[d], E = D(p), g = a(p);
1178
+ if (E <= o && i <= g) return du(p, t, u, p, [p, ...n]);
1179
+ if (g <= o) {
1180
+ l = p, c = d + 1;
1181
+ continue;
1182
+ }
1183
+ if (i <= E) {
1184
+ f = p, F = d;
1185
+ continue;
1186
+ }
1187
+ throw new Error("Comment location overlaps with node location");
1188
+ }
1189
+ if ((r == null ? void 0 : r.type) === "TemplateLiteral") {
1190
+ let { quasis: d } = r, p = Re(d, t, u);
1191
+ l && Re(d, l, u) !== p && (l = null), f && Re(d, f, u) !== p && (f = null);
1192
+ }
1193
+ return { enclosingNode: r, precedingNode: l, followingNode: f };
1194
+ }
1195
+ var Je = () => !1;
1196
+ function vn(e, t) {
1197
+ let { comments: u } = e;
1198
+ if (delete e.comments, !gn(u) || !t.printer.canAttachComment) return;
1199
+ let r = [], { printer: { features: { experimental_avoidAstMutation: n }, handleComments: D = {} }, originalText: a } = t, { ownLine: o = Je, endOfLine: i = Je, remaining: s = Je } = D, l = u.map((f, c) => ({ ...du(e, f, t), comment: f, text: a, options: t, ast: e, isLastComment: u.length - 1 === c }));
1200
+ for (let [f, c] of l.entries()) {
1201
+ let { comment: F, precedingNode: d, enclosingNode: p, followingNode: E, text: g, options: m, ast: b, isLastComment: C } = c, y;
1202
+ if (n ? y = [c] : (F.enclosingNode = p, F.precedingNode = d, F.followingNode = E, y = [F, g, m, b, C]), Bn(g, m, l, f)) F.placement = "ownLine", o(...y) || (E ? me(E, F) : d ? ye(d, F) : ne(p || b, F));
1203
+ else if (bn(g, m, l, f)) F.placement = "endOfLine", i(...y) || (d ? ye(d, F) : E ? me(E, F) : ne(p || b, F));
1204
+ else if (F.placement = "remaining", !s(...y)) if (d && E) {
1205
+ let w = r.length;
1206
+ w > 0 && r[w - 1].followingNode !== E && bt(r, m), r.push(c);
1207
+ } else d ? ye(d, F) : E ? me(E, F) : ne(p || b, F);
1208
+ }
1209
+ if (bt(r, t), !n) for (let f of u) delete f.precedingNode, delete f.enclosingNode, delete f.followingNode;
1210
+ }
1211
+ var pu = (e) => !/[\S\n\u2028\u2029]/u.test(e);
1212
+ function Bn(e, t, u, r) {
1213
+ let { comment: n, precedingNode: D } = u[r], { locStart: a, locEnd: o } = t, i = a(n);
1214
+ if (D) for (let s = r - 1; s >= 0; s--) {
1215
+ let { comment: l, precedingNode: f } = u[s];
1216
+ if (f !== D || !pu(e.slice(o(l), i))) break;
1217
+ i = a(l);
1218
+ }
1219
+ return Z(e, i, { backwards: !0 });
1220
+ }
1221
+ function bn(e, t, u, r) {
1222
+ let { comment: n, followingNode: D } = u[r], { locStart: a, locEnd: o } = t, i = o(n);
1223
+ if (D) for (let s = r + 1; s < u.length; s++) {
1224
+ let { comment: l, followingNode: f } = u[s];
1225
+ if (f !== D || !pu(e.slice(i, a(l)))) break;
1226
+ i = o(l);
1227
+ }
1228
+ return Z(e, i);
1229
+ }
1230
+ function bt(e, t) {
1231
+ var o, i;
1232
+ let u = e.length;
1233
+ if (u === 0) return;
1234
+ let { precedingNode: r, followingNode: n } = e[0], D = t.locStart(n), a;
1235
+ for (a = u; a > 0; --a) {
1236
+ let { comment: s, precedingNode: l, followingNode: f } = e[a - 1], c = t.originalText.slice(t.locEnd(s), D);
1237
+ if (((i = (o = t.printer).isGap) == null ? void 0 : i.call(o, c, t)) ?? /^[\s(]*$/u.test(c)) D = t.locStart(s);
1238
+ else break;
1239
+ }
1240
+ for (let [s, { comment: l }] of e.entries()) s < a ? ye(r, l) : me(n, l);
1241
+ for (let s of [r, n]) s.comments && s.comments.length > 1 && s.comments.sort((l, f) => t.locStart(l) - t.locStart(f));
1242
+ e.length = 0;
1243
+ }
1244
+ function Re(e, t, u) {
1245
+ let r = u.locStart(t) - 1;
1246
+ for (let n = 1; n < e.length; ++n) if (r < u.locStart(e[n])) return n - 1;
1247
+ return 0;
1248
+ }
1249
+ function An(e, t) {
1250
+ let u = t - 1;
1251
+ u = ee(e, u, { backwards: !0 }), u = oe(e, u, { backwards: !0 }), u = ee(e, u, { backwards: !0 });
1252
+ let r = oe(e, u, { backwards: !0 });
1253
+ return u !== r;
1254
+ }
1255
+ var st = An;
1256
+ function hu(e, t) {
1257
+ let u = e.node;
1258
+ return u.printed = !0, t.printer.printComment(e, t);
1259
+ }
1260
+ function wn(e, t) {
1261
+ var s;
1262
+ let u = e.node, r = [hu(e, t)], { printer: n, originalText: D, locStart: a, locEnd: o } = t;
1263
+ if ((s = n.isBlockComment) != null && s.call(n, u)) {
1264
+ let l = Z(D, o(u)) ? Z(D, a(u), { backwards: !0 }) ? K : ru : " ";
1265
+ r.push(l);
1266
+ } else r.push(K);
1267
+ let i = oe(D, ee(D, o(u)));
1268
+ return i !== !1 && Z(D, i) && r.push(K), r;
1269
+ }
1270
+ function kn(e, t, u) {
1271
+ var s;
1272
+ let r = e.node, n = hu(e, t), { printer: D, originalText: a, locStart: o } = t, i = (s = D.isBlockComment) == null ? void 0 : s.call(D, r);
1273
+ if (u != null && u.hasLineSuffix && !(u != null && u.isBlock) || Z(a, o(r), { backwards: !0 })) {
1274
+ let l = st(a, o(r));
1275
+ return { doc: Ue([K, l ? K : "", n]), isBlock: i, hasLineSuffix: !0 };
1276
+ }
1277
+ return !i || u != null && u.hasLineSuffix ? { doc: [Ue([" ", n]), Pe], isBlock: i, hasLineSuffix: !0 } : { doc: [" ", n], isBlock: i, hasLineSuffix: !1 };
1278
+ }
1279
+ function xn(e, t) {
1280
+ let u = e.node;
1281
+ if (!u) return {};
1282
+ let r = t[Symbol.for("printedComments")];
1283
+ if ((u.comments || []).filter((o) => !r.has(o)).length === 0) return { leading: "", trailing: "" };
1284
+ let n = [], D = [], a;
1285
+ return e.each(() => {
1286
+ let o = e.node;
1287
+ if (r != null && r.has(o)) return;
1288
+ let { leading: i, trailing: s } = o;
1289
+ i ? n.push(wn(e, t)) : s && (a = kn(e, t, a), D.push(a.doc));
1290
+ }, "comments"), { leading: n, trailing: D };
1291
+ }
1292
+ function Sn(e, t, u) {
1293
+ let { leading: r, trailing: n } = xn(e, u);
1294
+ return !r && !n ? t : xe(t, (D) => [r, D, n]);
1295
+ }
1296
+ function In(e) {
1297
+ let { [Symbol.for("comments")]: t, [Symbol.for("printedComments")]: u } = e;
1298
+ for (let r of t) {
1299
+ if (!r.printed && !u.has(r)) throw new Error('Comment "' + r.value.trim() + '" was not printed. Please report this error!');
1300
+ delete r.printed;
1301
+ }
1302
+ }
1303
+ var Cu = class extends Error {
1304
+ constructor() {
1305
+ super(...arguments);
1306
+ Ae(this, "name", "ConfigError");
1307
+ }
1308
+ }, At = class extends Error {
1309
+ constructor() {
1310
+ super(...arguments);
1311
+ Ae(this, "name", "UndefinedParserError");
1312
+ }
1313
+ }, Nn = { checkIgnorePragma: { category: "Special", type: "boolean", default: !1, description: "Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.", cliCategory: "Other" }, cursorOffset: { category: "Special", type: "int", default: -1, range: { start: -1, end: 1 / 0, step: 1 }, description: "Print (to stderr) where a cursor at the given position would move to after formatting.", cliCategory: "Editor" }, endOfLine: { category: "Global", type: "choice", default: "lf", description: "Which end of line characters to apply.", choices: [{ value: "lf", description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" }, { value: "crlf", description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows" }, { value: "cr", description: "Carriage Return character only (\\r), used very rarely" }, { value: "auto", description: `Maintain existing
1314
+ (mixed values within one file are normalised by looking at what's used after the first line)` }] }, filepath: { category: "Special", type: "path", description: "Specify the input filepath. This will be used to do parser inference.", cliName: "stdin-filepath", cliCategory: "Other", cliDescription: "Path to the file to pretend that stdin comes from." }, insertPragma: { category: "Special", type: "boolean", default: !1, description: "Insert @format pragma into file's first docblock comment.", cliCategory: "Other" }, parser: { category: "Global", type: "choice", default: void 0, description: "Which parser to use.", exception: (e) => typeof e == "string" || typeof e == "function", choices: [{ value: "flow", description: "Flow" }, { value: "babel", description: "JavaScript" }, { value: "babel-flow", description: "Flow" }, { value: "babel-ts", description: "TypeScript" }, { value: "typescript", description: "TypeScript" }, { value: "acorn", description: "JavaScript" }, { value: "espree", description: "JavaScript" }, { value: "meriyah", description: "JavaScript" }, { value: "css", description: "CSS" }, { value: "less", description: "Less" }, { value: "scss", description: "SCSS" }, { value: "json", description: "JSON" }, { value: "json5", description: "JSON5" }, { value: "jsonc", description: "JSON with Comments" }, { value: "json-stringify", description: "JSON.stringify" }, { value: "graphql", description: "GraphQL" }, { value: "markdown", description: "Markdown" }, { value: "mdx", description: "MDX" }, { value: "vue", description: "Vue" }, { value: "yaml", description: "YAML" }, { value: "glimmer", description: "Ember / Handlebars" }, { value: "html", description: "HTML" }, { value: "angular", description: "Angular" }, { value: "lwc", description: "Lightning Web Components" }, { value: "mjml", description: "MJML" }] }, plugins: { type: "path", array: !0, default: [{ value: [] }], category: "Global", description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", exception: (e) => typeof e == "string" || typeof e == "object", cliName: "plugin", cliCategory: "Config" }, printWidth: { category: "Global", type: "int", default: 80, description: "The line length where Prettier will try wrap.", range: { start: 0, end: 1 / 0, step: 1 } }, rangeEnd: { category: "Special", type: "int", default: 1 / 0, range: { start: 0, end: 1 / 0, step: 1 }, description: `Format code ending at a given character offset (exclusive).
1315
+ The range will extend forwards to the end of the selected statement.`, cliCategory: "Editor" }, rangeStart: { category: "Special", type: "int", default: 0, range: { start: 0, end: 1 / 0, step: 1 }, description: `Format code starting at a given character offset.
1316
+ The range will extend backwards to the start of the first line containing the selected statement.`, cliCategory: "Editor" }, requirePragma: { category: "Special", type: "boolean", default: !1, description: "Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.", cliCategory: "Other" }, tabWidth: { type: "int", category: "Global", default: 2, description: "Number of spaces per indentation level.", range: { start: 0, end: 1 / 0, step: 1 } }, useTabs: { category: "Global", type: "boolean", default: !1, description: "Indent with tabs instead of spaces." }, embeddedLanguageFormatting: { category: "Global", type: "choice", default: "auto", description: "Control how Prettier formats quoted code embedded in the file.", choices: [{ value: "auto", description: "Format embedded code if Prettier can automatically identify it." }, { value: "off", description: "Never automatically format embedded code." }] } };
1317
+ function gu({ plugins: e = [], showDeprecated: t = !1 } = {}) {
1318
+ let u = e.flatMap((n) => n.languages ?? []), r = [];
1319
+ for (let n of _n(Object.assign({}, ...e.map(({ options: D }) => D), Nn))) !t && n.deprecated || (Array.isArray(n.choices) && (t || (n.choices = n.choices.filter((D) => !D.deprecated)), n.name === "parser" && (n.choices = [...n.choices, ...On(n.choices, u, e)])), n.pluginDefaults = Object.fromEntries(e.filter((D) => {
1320
+ var a;
1321
+ return ((a = D.defaultOptions) == null ? void 0 : a[n.name]) !== void 0;
1322
+ }).map((D) => [D.name, D.defaultOptions[n.name]])), r.push(n));
1323
+ return { languages: u, options: r };
1324
+ }
1325
+ function* On(e, t, u) {
1326
+ let r = new Set(e.map((n) => n.value));
1327
+ for (let n of t) if (n.parsers) {
1328
+ for (let D of n.parsers) if (!r.has(D)) {
1329
+ r.add(D);
1330
+ let a = u.find((i) => i.parsers && Object.prototype.hasOwnProperty.call(i.parsers, D)), o = n.name;
1331
+ a != null && a.name && (o += ` (plugin: ${a.name})`), yield { value: D, description: o };
1332
+ }
1333
+ }
1334
+ }
1335
+ function _n(e) {
1336
+ let t = [];
1337
+ for (let [u, r] of Object.entries(e)) {
1338
+ let n = { name: u, ...r };
1339
+ Array.isArray(n.default) && (n.default = S(0, n.default, -1).value), t.push(n);
1340
+ }
1341
+ return t;
1342
+ }
1343
+ var Tn = Array.prototype.toReversed ?? function() {
1344
+ return [...this].reverse();
1345
+ }, Pn = ve("toReversed", function() {
1346
+ if (Array.isArray(this)) return Tn;
1347
+ }), jn = Pn;
1348
+ function Ln() {
1349
+ var u, r, n, D, a, o;
1350
+ let e = globalThis, t = (r = (u = e.Deno) == null ? void 0 : u.build) == null ? void 0 : r.os;
1351
+ return typeof t == "string" ? t === "windows" : ((D = (n = e.navigator) == null ? void 0 : n.platform) == null ? void 0 : D.startsWith("Win")) ?? ((o = (a = e.process) == null ? void 0 : a.platform) == null ? void 0 : o.startsWith("win")) ?? !1;
1352
+ }
1353
+ var $n = Ln();
1354
+ function Eu(e) {
1355
+ if (e = e instanceof URL ? e : new URL(e), e.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);
1356
+ return e;
1357
+ }
1358
+ function Jn(e) {
1359
+ return e = Eu(e), decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
1360
+ }
1361
+ function Rn(e) {
1362
+ e = Eu(e);
1363
+ let t = decodeURIComponent(e.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
1364
+ return e.hostname !== "" && (t = `\\\\${e.hostname}${t}`), t;
1365
+ }
1366
+ function Mn(e) {
1367
+ return $n ? Rn(e) : Jn(e);
1368
+ }
1369
+ var Vn = (e) => String(e).split(/[/\\]/u).pop(), Wn = (e) => String(e).startsWith("file:");
1370
+ function wt(e, t) {
1371
+ if (!t) return;
1372
+ let u = Vn(t).toLowerCase();
1373
+ return e.find(({ filenames: r }) => r == null ? void 0 : r.some((n) => n.toLowerCase() === u)) ?? e.find(({ extensions: r }) => r == null ? void 0 : r.some((n) => u.endsWith(n)));
1374
+ }
1375
+ function Kn(e, t) {
1376
+ if (t) return e.find(({ name: u }) => u.toLowerCase() === t) ?? e.find(({ aliases: u }) => u == null ? void 0 : u.includes(t)) ?? e.find(({ extensions: u }) => u == null ? void 0 : u.includes(`.${t}`));
1377
+ }
1378
+ var Me = void 0;
1379
+ function kt(e, t) {
1380
+ if (t) {
1381
+ if (Wn(t)) try {
1382
+ t = Mn(t);
1383
+ } catch {
1384
+ return;
1385
+ }
1386
+ if (typeof t == "string") return e.find(({ isSupported: u }) => u == null ? void 0 : u({ filepath: t }));
1387
+ }
1388
+ }
1389
+ function zn(e, t) {
1390
+ var r;
1391
+ let u = jn(0, e.plugins).flatMap((n) => n.languages ?? []);
1392
+ return (r = Kn(u, t.language) ?? wt(u, t.physicalFile) ?? wt(u, t.file) ?? kt(u, t.physicalFile) ?? kt(u, t.file) ?? (Me == null ? void 0 : Me(u, t.physicalFile))) == null ? void 0 : r.parsers[0];
1393
+ }
1394
+ var mu = zn, de = { key: (e) => /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e) ? e : JSON.stringify(e), value(e) {
1395
+ if (e === null || typeof e != "object") return JSON.stringify(e);
1396
+ if (Array.isArray(e)) return `[${e.map((u) => de.value(u)).join(", ")}]`;
1397
+ let t = Object.keys(e);
1398
+ return t.length === 0 ? "{}" : `{ ${t.map((u) => `${de.key(u)}: ${de.value(e[u])}`).join(", ")} }`;
1399
+ }, pair: ({ key: e, value: t }) => de.value({ [e]: t }) }, lt = new Proxy(String, { get: () => lt }), R = lt, yu = () => lt, Xn = (e, t, { descriptor: u }) => {
1400
+ let r = [`${R.yellow(typeof e == "string" ? u.key(e) : u.pair(e))} is deprecated`];
1401
+ return t && r.push(`we now treat it as ${R.blue(typeof t == "string" ? u.key(t) : u.pair(t))}`), r.join("; ") + ".";
1402
+ }, vu = Symbol.for("vnopts.VALUE_NOT_EXIST"), Ie = Symbol.for("vnopts.VALUE_UNCHANGED"), xt = " ".repeat(2), Un = (e, t, u) => {
1403
+ let { text: r, list: n } = u.normalizeExpectedResult(u.schemas[e].expected(u)), D = [];
1404
+ return r && D.push(St(e, t, r, u.descriptor)), n && D.push([St(e, t, n.title, u.descriptor)].concat(n.values.map((a) => Bu(a, u.loggerPrintWidth))).join(`
1405
+ `)), bu(D, u.loggerPrintWidth);
1406
+ };
1407
+ function St(e, t, u, r) {
1408
+ return [`Invalid ${R.red(r.key(e))} value.`, `Expected ${R.blue(u)},`, `but received ${t === vu ? R.gray("nothing") : R.red(r.value(t))}.`].join(" ");
1409
+ }
1410
+ function Bu({ text: e, list: t }, u) {
1411
+ let r = [];
1412
+ return e && r.push(`- ${R.blue(e)}`), t && r.push([`- ${R.blue(t.title)}:`].concat(t.values.map((n) => Bu(n, u - xt.length).replace(/^|\n/g, `$&${xt}`))).join(`
1413
+ `)), bu(r, u);
1414
+ }
1415
+ function bu(e, t) {
1416
+ if (e.length === 1) return e[0];
1417
+ let [u, r] = e, [n, D] = e.map((a) => a.split(`
1418
+ `, 1)[0].length);
1419
+ return n > t && n > D ? r : u;
1420
+ }
1421
+ var Fe = [], Ve = [];
1422
+ function We(e, t, u) {
1423
+ if (e === t) return 0;
1424
+ let r = u == null ? void 0 : u.maxDistance, n = e;
1425
+ e.length > t.length && (e = t, t = n);
1426
+ let D = e.length, a = t.length;
1427
+ for (; D > 0 && e.charCodeAt(~-D) === t.charCodeAt(~-a); ) D--, a--;
1428
+ let o = 0;
1429
+ for (; o < D && e.charCodeAt(o) === t.charCodeAt(o); ) o++;
1430
+ if (D -= o, a -= o, r !== void 0 && a - D > r) return r;
1431
+ if (D === 0) return r !== void 0 && a > r ? r : a;
1432
+ let i, s, l, f, c = 0, F = 0;
1433
+ for (; c < D; ) Ve[c] = e.charCodeAt(o + c), Fe[c] = ++c;
1434
+ for (; F < a; ) {
1435
+ for (i = t.charCodeAt(o + F), l = F++, s = F, c = 0; c < D; c++) f = i === Ve[c] ? l : l + 1, l = Fe[c], s = Fe[c] = l > s ? f > s ? s + 1 : f : f > l ? l + 1 : f;
1436
+ if (r !== void 0) {
1437
+ let d = s;
1438
+ for (c = 0; c < D; c++) Fe[c] < d && (d = Fe[c]);
1439
+ if (d > r) return r;
1440
+ }
1441
+ }
1442
+ return Fe.length = D, Ve.length = D, r !== void 0 && s > r ? r : s;
1443
+ }
1444
+ function qn(e, t, u) {
1445
+ if (!Array.isArray(t) || t.length === 0) return;
1446
+ let r = u == null ? void 0 : u.maxDistance, n = e.length;
1447
+ for (let i of t) if (i === e) return i;
1448
+ let D, a = Number.POSITIVE_INFINITY, o = /* @__PURE__ */ new Set();
1449
+ for (let i of t) {
1450
+ if (o.has(i)) continue;
1451
+ o.add(i);
1452
+ let s = Math.abs(i.length - n);
1453
+ if (s >= a || s > r) continue;
1454
+ let l = Number.isFinite(a) ? Math.min(a, r) : r, f = l === void 0 ? We(e, i) : We(e, i, { maxDistance: l });
1455
+ if (f > r) continue;
1456
+ let c = f;
1457
+ if (l !== void 0 && f === l && l === r && (c = We(e, i)), c < a && (a = c, D = i, a === 0)) break;
1458
+ }
1459
+ if (!(a > r)) return D;
1460
+ }
1461
+ var Au = (e, t, { descriptor: u, logger: r, schemas: n }) => {
1462
+ let D = [`Ignored unknown option ${R.yellow(u.pair({ key: e, value: t }))}.`], a = qn(e, Object.keys(n), { maxDistance: 3 });
1463
+ a && D.push(`Did you mean ${R.blue(u.key(a))}?`), r.warn(D.join(" "));
1464
+ }, Hn = ["default", "expected", "validate", "deprecated", "forward", "redirect", "overlap", "preprocess", "postprocess"];
1465
+ function Gn(e, t) {
1466
+ let u = new e(t), r = Object.create(u);
1467
+ for (let n of Hn) n in t && (r[n] = Yn(t[n], u, ue.prototype[n].length));
1468
+ return r;
1469
+ }
1470
+ var ue = class {
1471
+ static create(e) {
1472
+ return Gn(this, e);
1473
+ }
1474
+ constructor(e) {
1475
+ this.name = e.name;
1476
+ }
1477
+ default(e) {
1478
+ }
1479
+ expected(e) {
1480
+ return "nothing";
1481
+ }
1482
+ validate(e, t) {
1483
+ return !1;
1484
+ }
1485
+ deprecated(e, t) {
1486
+ return !1;
1487
+ }
1488
+ forward(e, t) {
1489
+ }
1490
+ redirect(e, t) {
1491
+ }
1492
+ overlap(e, t, u) {
1493
+ return e;
1494
+ }
1495
+ preprocess(e, t) {
1496
+ return e;
1497
+ }
1498
+ postprocess(e, t) {
1499
+ return Ie;
1500
+ }
1501
+ };
1502
+ function Yn(e, t, u) {
1503
+ return typeof e == "function" ? (...r) => e(...r.slice(0, u - 1), t, ...r.slice(u - 1)) : () => e;
1504
+ }
1505
+ var Qn = class extends ue {
1506
+ constructor(e) {
1507
+ super(e), this._sourceName = e.sourceName;
1508
+ }
1509
+ expected(e) {
1510
+ return e.schemas[this._sourceName].expected(e);
1511
+ }
1512
+ validate(e, t) {
1513
+ return t.schemas[this._sourceName].validate(e, t);
1514
+ }
1515
+ redirect(e, t) {
1516
+ return this._sourceName;
1517
+ }
1518
+ }, Zn = class extends ue {
1519
+ expected() {
1520
+ return "anything";
1521
+ }
1522
+ validate() {
1523
+ return !0;
1524
+ }
1525
+ }, eD = class extends ue {
1526
+ constructor({ valueSchema: e, name: t = e.name, ...u }) {
1527
+ super({ ...u, name: t }), this._valueSchema = e;
1528
+ }
1529
+ expected(e) {
1530
+ let { text: t, list: u } = e.normalizeExpectedResult(this._valueSchema.expected(e));
1531
+ return { text: t && `an array of ${t}`, list: u && { title: "an array of the following values", values: [{ list: u }] } };
1532
+ }
1533
+ validate(e, t) {
1534
+ if (!Array.isArray(e)) return !1;
1535
+ let u = [];
1536
+ for (let r of e) {
1537
+ let n = t.normalizeValidateResult(this._valueSchema.validate(r, t), r);
1538
+ n !== !0 && u.push(n.value);
1539
+ }
1540
+ return u.length === 0 ? !0 : { value: u };
1541
+ }
1542
+ deprecated(e, t) {
1543
+ let u = [];
1544
+ for (let r of e) {
1545
+ let n = t.normalizeDeprecatedResult(this._valueSchema.deprecated(r, t), r);
1546
+ n !== !1 && u.push(...n.map(({ value: D }) => ({ value: [D] })));
1547
+ }
1548
+ return u;
1549
+ }
1550
+ forward(e, t) {
1551
+ let u = [];
1552
+ for (let r of e) {
1553
+ let n = t.normalizeForwardResult(this._valueSchema.forward(r, t), r);
1554
+ u.push(...n.map(It));
1555
+ }
1556
+ return u;
1557
+ }
1558
+ redirect(e, t) {
1559
+ let u = [], r = [];
1560
+ for (let n of e) {
1561
+ let D = t.normalizeRedirectResult(this._valueSchema.redirect(n, t), n);
1562
+ "remain" in D && u.push(D.remain), r.push(...D.redirect.map(It));
1563
+ }
1564
+ return u.length === 0 ? { redirect: r } : { redirect: r, remain: u };
1565
+ }
1566
+ overlap(e, t) {
1567
+ return e.concat(t);
1568
+ }
1569
+ };
1570
+ function It({ from: e, to: t }) {
1571
+ return { from: [e], to: t };
1572
+ }
1573
+ var tD = class extends ue {
1574
+ expected() {
1575
+ return "true or false";
1576
+ }
1577
+ validate(e) {
1578
+ return typeof e == "boolean";
1579
+ }
1580
+ };
1581
+ function uD(e, t) {
1582
+ let u = /* @__PURE__ */ Object.create(null);
1583
+ for (let r of e) {
1584
+ let n = r[t];
1585
+ if (u[n]) throw new Error(`Duplicate ${t} ${JSON.stringify(n)}`);
1586
+ u[n] = r;
1587
+ }
1588
+ return u;
1589
+ }
1590
+ function rD(e, t) {
1591
+ let u = /* @__PURE__ */ new Map();
1592
+ for (let r of e) {
1593
+ let n = r[t];
1594
+ if (u.has(n)) throw new Error(`Duplicate ${t} ${JSON.stringify(n)}`);
1595
+ u.set(n, r);
1596
+ }
1597
+ return u;
1598
+ }
1599
+ function nD() {
1600
+ let e = /* @__PURE__ */ Object.create(null);
1601
+ return (t) => {
1602
+ let u = JSON.stringify(t);
1603
+ return e[u] ? !0 : (e[u] = !0, !1);
1604
+ };
1605
+ }
1606
+ function DD(e, t) {
1607
+ let u = [], r = [];
1608
+ for (let n of e) t(n) ? u.push(n) : r.push(n);
1609
+ return [u, r];
1610
+ }
1611
+ function aD(e) {
1612
+ return e === Math.floor(e);
1613
+ }
1614
+ function oD(e, t) {
1615
+ if (e === t) return 0;
1616
+ let u = typeof e, r = typeof t, n = ["undefined", "object", "boolean", "number", "string"];
1617
+ return u !== r ? n.indexOf(u) - n.indexOf(r) : u !== "string" ? Number(e) - Number(t) : e.localeCompare(t);
1618
+ }
1619
+ function iD(e) {
1620
+ return (...t) => {
1621
+ let u = e(...t);
1622
+ return typeof u == "string" ? new Error(u) : u;
1623
+ };
1624
+ }
1625
+ function Nt(e) {
1626
+ return e === void 0 ? {} : e;
1627
+ }
1628
+ function wu(e) {
1629
+ if (typeof e == "string") return { text: e };
1630
+ let { text: t, list: u } = e;
1631
+ return sD((t || u) !== void 0, "Unexpected `expected` result, there should be at least one field."), u ? { text: t, list: { title: u.title, values: u.values.map(wu) } } : { text: t };
1632
+ }
1633
+ function Ot(e, t) {
1634
+ return e === !0 ? !0 : e === !1 ? { value: t } : e;
1635
+ }
1636
+ function _t(e, t, u = !1) {
1637
+ return e === !1 ? !1 : e === !0 ? u ? !0 : [{ value: t }] : "value" in e ? [e] : e.length === 0 ? !1 : e;
1638
+ }
1639
+ function Tt(e, t) {
1640
+ return typeof e == "string" || "key" in e ? { from: t, to: e } : "from" in e ? { from: e.from, to: e.to } : { from: t, to: e.to };
1641
+ }
1642
+ function Ge(e, t) {
1643
+ return e === void 0 ? [] : Array.isArray(e) ? e.map((u) => Tt(u, t)) : [Tt(e, t)];
1644
+ }
1645
+ function Pt(e, t) {
1646
+ let u = Ge(typeof e == "object" && "redirect" in e ? e.redirect : e, t);
1647
+ return u.length === 0 ? { remain: t, redirect: u } : typeof e == "object" && "remain" in e ? { remain: e.remain, redirect: u } : { redirect: u };
1648
+ }
1649
+ function sD(e, t) {
1650
+ if (!e) throw new Error(t);
1651
+ }
1652
+ var lD = class extends ue {
1653
+ constructor(e) {
1654
+ super(e), this._choices = rD(e.choices.map((t) => t && typeof t == "object" ? t : { value: t }), "value");
1655
+ }
1656
+ expected({ descriptor: e }) {
1657
+ let t = Array.from(this._choices.keys()).map((n) => this._choices.get(n)).filter(({ hidden: n }) => !n).map((n) => n.value).sort(oD).map(e.value), u = t.slice(0, -2), r = t.slice(-2);
1658
+ return { text: u.concat(r.join(" or ")).join(", "), list: { title: "one of the following values", values: t } };
1659
+ }
1660
+ validate(e) {
1661
+ return this._choices.has(e);
1662
+ }
1663
+ deprecated(e) {
1664
+ let t = this._choices.get(e);
1665
+ return t && t.deprecated ? { value: e } : !1;
1666
+ }
1667
+ forward(e) {
1668
+ let t = this._choices.get(e);
1669
+ return t ? t.forward : void 0;
1670
+ }
1671
+ redirect(e) {
1672
+ let t = this._choices.get(e);
1673
+ return t ? t.redirect : void 0;
1674
+ }
1675
+ }, cD = class extends ue {
1676
+ expected() {
1677
+ return "a number";
1678
+ }
1679
+ validate(e, t) {
1680
+ return typeof e == "number";
1681
+ }
1682
+ }, fD = class extends cD {
1683
+ expected() {
1684
+ return "an integer";
1685
+ }
1686
+ validate(e, t) {
1687
+ return t.normalizeValidateResult(super.validate(e, t), e) === !0 && aD(e);
1688
+ }
1689
+ }, jt = class extends ue {
1690
+ expected() {
1691
+ return "a string";
1692
+ }
1693
+ validate(e) {
1694
+ return typeof e == "string";
1695
+ }
1696
+ }, FD = de, dD = Au, pD = Un, hD = Xn, CD = class {
1697
+ constructor(e, t) {
1698
+ let { logger: u = console, loggerPrintWidth: r = 80, descriptor: n = FD, unknown: D = dD, invalid: a = pD, deprecated: o = hD, missing: i = () => !1, required: s = () => !1, preprocess: l = (c) => c, postprocess: f = () => Ie } = t || {};
1699
+ this._utils = { descriptor: n, logger: u || { warn: () => {
1700
+ } }, loggerPrintWidth: r, schemas: uD(e, "name"), normalizeDefaultResult: Nt, normalizeExpectedResult: wu, normalizeDeprecatedResult: _t, normalizeForwardResult: Ge, normalizeRedirectResult: Pt, normalizeValidateResult: Ot }, this._unknownHandler = D, this._invalidHandler = iD(a), this._deprecatedHandler = o, this._identifyMissing = (c, F) => !(c in F) || i(c, F), this._identifyRequired = s, this._preprocess = l, this._postprocess = f, this.cleanHistory();
1701
+ }
1702
+ cleanHistory() {
1703
+ this._hasDeprecationWarned = nD();
1704
+ }
1705
+ normalize(e) {
1706
+ let t = {}, u = [this._preprocess(e, this._utils)], r = () => {
1707
+ for (; u.length !== 0; ) {
1708
+ let n = u.shift(), D = this._applyNormalization(n, t);
1709
+ u.push(...D);
1710
+ }
1711
+ };
1712
+ r();
1713
+ for (let n of Object.keys(this._utils.schemas)) {
1714
+ let D = this._utils.schemas[n];
1715
+ if (!(n in t)) {
1716
+ let a = Nt(D.default(this._utils));
1717
+ "value" in a && u.push({ [n]: a.value });
1718
+ }
1719
+ }
1720
+ r();
1721
+ for (let n of Object.keys(this._utils.schemas)) {
1722
+ if (!(n in t)) continue;
1723
+ let D = this._utils.schemas[n], a = t[n], o = D.postprocess(a, this._utils);
1724
+ o !== Ie && (this._applyValidation(o, n, D), t[n] = o);
1725
+ }
1726
+ return this._applyPostprocess(t), this._applyRequiredCheck(t), t;
1727
+ }
1728
+ _applyNormalization(e, t) {
1729
+ let u = [], { knownKeys: r, unknownKeys: n } = this._partitionOptionKeys(e);
1730
+ for (let D of r) {
1731
+ let a = this._utils.schemas[D], o = a.preprocess(e[D], this._utils);
1732
+ this._applyValidation(o, D, a);
1733
+ let i = ({ from: f, to: c }) => {
1734
+ u.push(typeof c == "string" ? { [c]: f } : { [c.key]: c.value });
1735
+ }, s = ({ value: f, redirectTo: c }) => {
1736
+ let F = _t(a.deprecated(f, this._utils), o, !0);
1737
+ if (F !== !1) if (F === !0) this._hasDeprecationWarned(D) || this._utils.logger.warn(this._deprecatedHandler(D, c, this._utils));
1738
+ else for (let { value: d } of F) {
1739
+ let p = { key: D, value: d };
1740
+ if (!this._hasDeprecationWarned(p)) {
1741
+ let E = typeof c == "string" ? { key: c, value: d } : c;
1742
+ this._utils.logger.warn(this._deprecatedHandler(p, E, this._utils));
1743
+ }
1744
+ }
1745
+ };
1746
+ Ge(a.forward(o, this._utils), o).forEach(i);
1747
+ let l = Pt(a.redirect(o, this._utils), o);
1748
+ if (l.redirect.forEach(i), "remain" in l) {
1749
+ let f = l.remain;
1750
+ t[D] = D in t ? a.overlap(t[D], f, this._utils) : f, s({ value: f });
1751
+ }
1752
+ for (let { from: f, to: c } of l.redirect) s({ value: f, redirectTo: c });
1753
+ }
1754
+ for (let D of n) {
1755
+ let a = e[D];
1756
+ this._applyUnknownHandler(D, a, t, (o, i) => {
1757
+ u.push({ [o]: i });
1758
+ });
1759
+ }
1760
+ return u;
1761
+ }
1762
+ _applyRequiredCheck(e) {
1763
+ for (let t of Object.keys(this._utils.schemas)) if (this._identifyMissing(t, e) && this._identifyRequired(t)) throw this._invalidHandler(t, vu, this._utils);
1764
+ }
1765
+ _partitionOptionKeys(e) {
1766
+ let [t, u] = DD(Object.keys(e).filter((r) => !this._identifyMissing(r, e)), (r) => r in this._utils.schemas);
1767
+ return { knownKeys: t, unknownKeys: u };
1768
+ }
1769
+ _applyValidation(e, t, u) {
1770
+ let r = Ot(u.validate(e, this._utils), e);
1771
+ if (r !== !0) throw this._invalidHandler(t, r.value, this._utils);
1772
+ }
1773
+ _applyUnknownHandler(e, t, u, r) {
1774
+ let n = this._unknownHandler(e, t, this._utils);
1775
+ if (n) for (let D of Object.keys(n)) {
1776
+ if (this._identifyMissing(D, n)) continue;
1777
+ let a = n[D];
1778
+ D in this._utils.schemas ? r(D, a) : u[D] = a;
1779
+ }
1780
+ }
1781
+ _applyPostprocess(e) {
1782
+ let t = this._postprocess(e, this._utils);
1783
+ if (t !== Ie) {
1784
+ if (t.delete) for (let u of t.delete) delete e[u];
1785
+ if (t.override) {
1786
+ let { knownKeys: u, unknownKeys: r } = this._partitionOptionKeys(t.override);
1787
+ for (let n of u) {
1788
+ let D = t.override[n];
1789
+ this._applyValidation(D, n, this._utils.schemas[n]), e[n] = D;
1790
+ }
1791
+ for (let n of r) {
1792
+ let D = t.override[n];
1793
+ this._applyUnknownHandler(n, D, e, (a, o) => {
1794
+ let i = this._utils.schemas[a];
1795
+ this._applyValidation(o, a, i), e[a] = o;
1796
+ });
1797
+ }
1798
+ }
1799
+ }
1800
+ }
1801
+ }, Ke;
1802
+ function gD(e, t, { logger: u = !1, isCLI: r = !1, passThrough: n = !1, FlagSchema: D, descriptor: a } = {}) {
1803
+ if (r) {
1804
+ if (!D) throw new Error("'FlagSchema' option is required.");
1805
+ if (!a) throw new Error("'descriptor' option is required.");
1806
+ } else a = de;
1807
+ let o = n ? Array.isArray(n) ? (c, F) => n.includes(c) ? { [c]: F } : void 0 : (c, F) => ({ [c]: F }) : (c, F, d) => {
1808
+ let { _: p, ...E } = d.schemas;
1809
+ return Au(c, F, { ...d, schemas: E });
1810
+ }, i = ED(t, { isCLI: r, FlagSchema: D }), s = new CD(i, { logger: u, unknown: o, descriptor: a }), l = u !== !1;
1811
+ l && Ke && (s._hasDeprecationWarned = Ke);
1812
+ let f = s.normalize(e);
1813
+ return l && (Ke = s._hasDeprecationWarned), f;
1814
+ }
1815
+ function ED(e, { isCLI: t, FlagSchema: u }) {
1816
+ let r = [];
1817
+ t && r.push(Zn.create({ name: "_" }));
1818
+ for (let n of e) r.push(mD(n, { isCLI: t, optionInfos: e, FlagSchema: u })), n.alias && t && r.push(Qn.create({ name: n.alias, sourceName: n.name }));
1819
+ return r;
1820
+ }
1821
+ function mD(e, { isCLI: t, optionInfos: u, FlagSchema: r }) {
1822
+ let { name: n } = e, D = { name: n }, a, o = {};
1823
+ switch (e.type) {
1824
+ case "int":
1825
+ a = fD, t && (D.preprocess = Number);
1826
+ break;
1827
+ case "string":
1828
+ a = jt;
1829
+ break;
1830
+ case "choice":
1831
+ a = lD, D.choices = e.choices.map((i) => i != null && i.redirect ? { ...i, redirect: { to: { key: e.name, value: i.redirect } } } : i);
1832
+ break;
1833
+ case "boolean":
1834
+ a = tD;
1835
+ break;
1836
+ case "flag":
1837
+ a = r, D.flags = u.flatMap((i) => [i.alias, i.description && i.name, i.oppositeDescription && `no-${i.name}`].filter(Boolean));
1838
+ break;
1839
+ case "path":
1840
+ a = jt;
1841
+ break;
1842
+ default:
1843
+ throw new Error(`Unexpected type ${e.type}`);
1844
+ }
1845
+ if (e.exception ? D.validate = (i, s, l) => e.exception(i) || s.validate(i, l) : D.validate = (i, s, l) => i === void 0 || s.validate(i, l), e.redirect && (o.redirect = (i) => i ? { to: typeof e.redirect == "string" ? e.redirect : { key: e.redirect.option, value: e.redirect.value } } : void 0), e.deprecated && (o.deprecated = !0), t && !e.array) {
1846
+ let i = D.preprocess || ((s) => s);
1847
+ D.preprocess = (s, l, f) => l.preprocess(i(Array.isArray(s) ? S(0, s, -1) : s), f);
1848
+ }
1849
+ return e.array ? eD.create({ ...t ? { preprocess: (i) => Array.isArray(i) ? i : [i] } : {}, ...o, valueSchema: a.create(D) }) : a.create({ ...D, ...o });
1850
+ }
1851
+ var yD = gD, vD = Array.prototype.findLast ?? function(e) {
1852
+ for (let t = this.length - 1; t >= 0; t--) {
1853
+ let u = this[t];
1854
+ if (e(u, t, this)) return u;
1855
+ }
1856
+ }, BD = ve("findLast", function() {
1857
+ if (Array.isArray(this)) return vD;
1858
+ }), ku = BD, bD = Symbol.for("PRETTIER_IS_FRONT_MATTER"), AD = [];
1859
+ function wD(e) {
1860
+ return !!(e != null && e[bD]);
1861
+ }
1862
+ var ct = wD, xu = /* @__PURE__ */ new Set(["yaml", "toml"]), Su = ({ node: e }) => ct(e) && xu.has(e.language);
1863
+ async function kD(e, t, u, r) {
1864
+ let { node: n } = u, { language: D } = n;
1865
+ if (!xu.has(D)) return;
1866
+ let a = n.value.trim(), o;
1867
+ if (a) {
1868
+ let i = D === "yaml" ? D : mu(r, { language: D });
1869
+ if (!i) return;
1870
+ o = a ? await e(a, { parser: i }) : "";
1871
+ } else o = a;
1872
+ return Zt([n.startDelimiter, n.explicitLanguage ?? "", K, o, o ? K : "", n.endDelimiter]);
1873
+ }
1874
+ function xD(e, t) {
1875
+ return Su({ node: e }) && (delete t.end, delete t.raw, delete t.value), t;
1876
+ }
1877
+ var SD = xD;
1878
+ function ID({ node: e }) {
1879
+ return e.raw;
1880
+ }
1881
+ var ND = ID, Iu = /* @__PURE__ */ new Set(["tokens", "comments", "parent", "enclosingNode", "precedingNode", "followingNode"]), OD = (e) => Object.keys(e).filter((t) => !Iu.has(t));
1882
+ function _D(e, t) {
1883
+ let u = e ? (r) => e(r, Iu) : OD;
1884
+ return t ? new Proxy(u, { apply: (r, n, D) => ct(D[0]) ? AD : Reflect.apply(r, n, D) }) : u;
1885
+ }
1886
+ var Lt = _D;
1887
+ function Nu(e, t) {
1888
+ if (!t) throw new Error("parserName is required.");
1889
+ let u = ku(0, e, (n) => n.parsers && Object.prototype.hasOwnProperty.call(n.parsers, t));
1890
+ if (u) return u;
1891
+ let r = `Couldn't resolve parser "${t}".`;
1892
+ throw r += " Plugins must be explicitly added to the standalone bundle.", new Cu(r);
1893
+ }
1894
+ function TD(e, t) {
1895
+ if (!t) throw new Error("astFormat is required.");
1896
+ let u = ku(0, e, (n) => n.printers && Object.prototype.hasOwnProperty.call(n.printers, t));
1897
+ if (u) return u;
1898
+ let r = `Couldn't find plugin for AST format "${t}".`;
1899
+ throw r += " Plugins must be explicitly added to the standalone bundle.", new Cu(r);
1900
+ }
1901
+ function ft({ plugins: e, parser: t }) {
1902
+ let u = Nu(e, t);
1903
+ return Ou(u, t);
1904
+ }
1905
+ function Ou(e, t) {
1906
+ let u = e.parsers[t];
1907
+ return typeof u == "function" ? u() : u;
1908
+ }
1909
+ async function PD(e, t) {
1910
+ let u = e.printers[t], r = typeof u == "function" ? await u() : u;
1911
+ return jD(r);
1912
+ }
1913
+ var ze = /* @__PURE__ */ new WeakMap();
1914
+ function jD(e) {
1915
+ if (ze.has(e)) return ze.get(e);
1916
+ let { features: t, getVisitorKeys: u, embed: r, massageAstNode: n, print: D, ...a } = e;
1917
+ t = RD(t);
1918
+ let o = t.experimental_frontMatterSupport;
1919
+ u = Lt(u, o.massageAstNode || o.embed || o.print);
1920
+ let i = n;
1921
+ n && o.massageAstNode && (i = new Proxy(n, { apply(c, F, d) {
1922
+ return SD(...d), Reflect.apply(c, F, d);
1923
+ } }));
1924
+ let s = r;
1925
+ if (r) {
1926
+ let c;
1927
+ s = new Proxy(r, { get(F, d, p) {
1928
+ return d === "getVisitorKeys" ? (c ?? (c = r.getVisitorKeys ? Lt(r.getVisitorKeys, o.massageAstNode || o.embed) : u), c) : Reflect.get(F, d, p);
1929
+ }, apply: (F, d, p) => o.embed && Su(...p) ? kD : Reflect.apply(F, d, p) });
1930
+ }
1931
+ let l = D;
1932
+ o.print && (l = new Proxy(D, { apply(c, F, d) {
1933
+ let [p] = d;
1934
+ return ct(p.node) ? ND(p) : Reflect.apply(c, F, d);
1935
+ } }));
1936
+ let f = { features: t, getVisitorKeys: u, embed: s, massageAstNode: i, print: l, ...a };
1937
+ return ze.set(e, f), f;
1938
+ }
1939
+ var LD = ["clean", "embed", "print"], $D = Object.fromEntries(LD.map((e) => [e, !1]));
1940
+ function JD(e) {
1941
+ return { ...$D, ...e };
1942
+ }
1943
+ function RD(e) {
1944
+ return { experimental_avoidAstMutation: !1, ...e, experimental_frontMatterSupport: JD(e == null ? void 0 : e.experimental_frontMatterSupport) };
1945
+ }
1946
+ var $t = { astFormat: "estree", printer: {}, originalText: void 0, locStart: null, locEnd: null, getVisitorKeys: null };
1947
+ async function MD(e, t = {}) {
1948
+ var f;
1949
+ let u = { ...e };
1950
+ if (!u.parser) if (u.filepath) {
1951
+ if (u.parser = mu(u, { physicalFile: u.filepath }), !u.parser) throw new At(`No parser could be inferred for file "${u.filepath}".`);
1952
+ } else throw new At("No parser and no file path given, couldn't infer a parser.");
1953
+ let r = gu({ plugins: e.plugins, showDeprecated: !0 }).options, n = { ...$t, ...Object.fromEntries(r.filter((c) => c.default !== void 0).map((c) => [c.name, c.default])) }, D = Nu(u.plugins, u.parser), a = await Ou(D, u.parser);
1954
+ u.astFormat = a.astFormat, u.locEnd = a.locEnd, u.locStart = a.locStart;
1955
+ let o = (f = D.printers) != null && f[a.astFormat] ? D : TD(u.plugins, a.astFormat), i = await PD(o, a.astFormat);
1956
+ u.printer = i, u.getVisitorKeys = i.getVisitorKeys;
1957
+ let s = o.defaultOptions ? Object.fromEntries(Object.entries(o.defaultOptions).filter(([, c]) => c !== void 0)) : {}, l = { ...n, ...s };
1958
+ for (let [c, F] of Object.entries(l)) (u[c] === null || u[c] === void 0) && (u[c] = F);
1959
+ return u.parser === "json" && (u.trailingComma = "none"), yD(u, r, { passThrough: Object.keys($t), ...t });
1960
+ }
1961
+ var Ce = MD;
1962
+ rr(nr());
1963
+ var Ft = { keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], strictBind: ["eval", "arguments"] };
1964
+ new Set(Ft.keyword);
1965
+ new Set(Ft.strict);
1966
+ new Set(Ft.strictBind);
1967
+ var ke = (e, t) => (u) => e(t(u));
1968
+ function _u(e) {
1969
+ return { keyword: e.cyan, capitalized: e.yellow, jsxIdentifier: e.yellow, punctuator: e.yellow, number: e.magenta, string: e.green, regex: e.magenta, comment: e.gray, invalid: ke(ke(e.white, e.bgRed), e.bold), gutter: e.gray, marker: ke(e.red, e.bold), message: ke(e.red, e.bold), reset: e.reset };
1970
+ }
1971
+ _u(yu());
1972
+ _u(yu());
1973
+ function VD() {
1974
+ return new Proxy({}, { get: () => (e) => e });
1975
+ }
1976
+ var Jt = /\r\n|[\n\r\u2028\u2029]/;
1977
+ function WD(e, t, u) {
1978
+ let r = Object.assign({ column: 0, line: -1 }, e.start), n = Object.assign({}, r, e.end), { linesAbove: D = 2, linesBelow: a = 3 } = u || {}, o = r.line, i = r.column, s = n.line, l = n.column, f = Math.max(o - (D + 1), 0), c = Math.min(t.length, s + a);
1979
+ o === -1 && (f = 0), s === -1 && (c = t.length);
1980
+ let F = s - o, d = {};
1981
+ if (F) for (let p = 0; p <= F; p++) {
1982
+ let E = p + o;
1983
+ if (!i) d[E] = !0;
1984
+ else if (p === 0) {
1985
+ let g = t[E - 1].length;
1986
+ d[E] = [i, g - i + 1];
1987
+ } else if (p === F) d[E] = [0, l];
1988
+ else {
1989
+ let g = t[E - p].length;
1990
+ d[E] = [0, g];
1991
+ }
1992
+ }
1993
+ else i === l ? i ? d[o] = [i, 0] : d[o] = !0 : d[o] = [i, l - i];
1994
+ return { start: f, end: c, markerLines: d };
1995
+ }
1996
+ function KD(e, t, u = {}) {
1997
+ let r = VD(), n = e.split(Jt), { start: D, end: a, markerLines: o } = WD(t, n, u), i = t.start && typeof t.start.column == "number", s = String(a).length, l = e.split(Jt, a).slice(D, a).map((f, c) => {
1998
+ let F = D + 1 + c, d = ` ${` ${F}`.slice(-s)} |`, p = o[F], E = !o[F + 1];
1999
+ if (p) {
2000
+ let g = "";
2001
+ if (Array.isArray(p)) {
2002
+ let m = f.slice(0, Math.max(p[0] - 1, 0)).replace(/[^\t]/g, " "), b = p[1] || 1;
2003
+ g = [`
2004
+ `, r.gutter(d.replace(/\d/g, " ")), " ", m, r.marker("^").repeat(b)].join(""), E && u.message && (g += " " + r.message(u.message));
2005
+ }
2006
+ return [r.marker(">"), r.gutter(d), f.length > 0 ? ` ${f}` : "", g].join("");
2007
+ } else return ` ${r.gutter(d)}${f.length > 0 ? ` ${f}` : ""}`;
2008
+ }).join(`
2009
+ `);
2010
+ return u.message && !i && (l = `${" ".repeat(s + 1)}${u.message}
2011
+ ${l}`), l;
2012
+ }
2013
+ async function zD(e, t) {
2014
+ let u = await ft(t), r = u.preprocess ? await u.preprocess(e, t) : e;
2015
+ t.originalText = r;
2016
+ let n;
2017
+ try {
2018
+ n = await u.parse(r, t, t);
2019
+ } catch (D) {
2020
+ XD(D, e);
2021
+ }
2022
+ return { text: r, ast: n };
2023
+ }
2024
+ function XD(e, t) {
2025
+ let { loc: u } = e;
2026
+ if (u) {
2027
+ let r = KD(t, u, {});
2028
+ throw e.message += `
2029
+ ` + r, e.codeFrame = r, e;
2030
+ }
2031
+ throw e;
2032
+ }
2033
+ var be = zD;
2034
+ async function UD(e, t, u, r, n) {
2035
+ if (u.embeddedLanguageFormatting !== "auto") return;
2036
+ let { printer: D } = u, { embed: a } = D;
2037
+ if (!a) return;
2038
+ if (a.length > 2) throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");
2039
+ let { hasPrettierIgnore: o } = D, { getVisitorKeys: i } = a, s = [];
2040
+ c();
2041
+ let l = e.stack;
2042
+ for (let { print: F, node: d, pathStack: p } of s) try {
2043
+ e.stack = p;
2044
+ let E = await F(f, t, e, u);
2045
+ E && n.set(d, E);
2046
+ } catch (E) {
2047
+ if (globalThis.PRETTIER_DEBUG) throw E;
2048
+ }
2049
+ e.stack = l;
2050
+ function f(F, d) {
2051
+ return qD(F, d, u, r);
2052
+ }
2053
+ function c() {
2054
+ let { node: F } = e;
2055
+ if (F === null || typeof F != "object" || o != null && o(e)) return;
2056
+ for (let p of i(F)) Array.isArray(F[p]) ? e.each(c, p) : e.call(c, p);
2057
+ let d = a(e, u);
2058
+ if (d) {
2059
+ if (typeof d == "function") {
2060
+ s.push({ print: d, node: F, pathStack: [...e.stack] });
2061
+ return;
2062
+ }
2063
+ n.set(F, d);
2064
+ }
2065
+ }
2066
+ }
2067
+ async function qD(e, t, u, r) {
2068
+ let n = await Ce({ ...u, ...t, parentParser: u.parser, originalText: e, cursorOffset: void 0, rangeStart: void 0, rangeEnd: void 0 }, { passThrough: !0 }), { ast: D } = await be(e, n), a = await r(D, n);
2069
+ return Qt(a);
2070
+ }
2071
+ function HD(e, t, u, r) {
2072
+ let { originalText: n, [Symbol.for("comments")]: D, locStart: a, locEnd: o, [Symbol.for("printedComments")]: i } = t, { node: s } = e, l = a(s), f = o(s);
2073
+ for (let F of D) a(F) >= l && o(F) <= f && i.add(F);
2074
+ let { printPrettierIgnored: c } = t.printer;
2075
+ return c ? c(e, t, u, r) : n.slice(l, f);
2076
+ }
2077
+ var GD = HD;
2078
+ async function $e(e, t) {
2079
+ ({ ast: e } = await Tu(e, t));
2080
+ let u = /* @__PURE__ */ new Map(), r = new fn(e), n = /* @__PURE__ */ new Map();
2081
+ await UD(r, a, t, $e, n);
2082
+ let D = await Rt(r, t, a, void 0, n);
2083
+ if (In(t), t.cursorOffset >= 0) {
2084
+ if (t.nodeAfterCursor && !t.nodeBeforeCursor) return [ae, D];
2085
+ if (t.nodeBeforeCursor && !t.nodeAfterCursor) return [D, ae];
2086
+ }
2087
+ return D;
2088
+ function a(i, s) {
2089
+ return i === void 0 || i === r ? o(s) : Array.isArray(i) ? r.call(() => o(s), ...i) : r.call(() => o(s), i);
2090
+ }
2091
+ function o(i) {
2092
+ let s = r.node;
2093
+ if (s == null) return "";
2094
+ let l = ot(s) && i === void 0;
2095
+ if (l && u.has(s)) return u.get(s);
2096
+ let f = Rt(r, t, a, i, n);
2097
+ return l && u.set(s, f), f;
2098
+ }
2099
+ }
2100
+ function Rt(e, t, u, r, n) {
2101
+ var i, s;
2102
+ let { node: D } = e, { printer: a } = t, o;
2103
+ switch ((i = a.hasPrettierIgnore) != null && i.call(a, e) ? o = GD(e, t, u, r) : n.has(D) ? o = n.get(D) : o = a.print(e, t, u, r), D) {
2104
+ case t.cursorNode:
2105
+ o = xe(o, (l) => [ae, l, ae]);
2106
+ break;
2107
+ case t.nodeBeforeCursor:
2108
+ o = xe(o, (l) => [l, ae]);
2109
+ break;
2110
+ case t.nodeAfterCursor:
2111
+ o = xe(o, (l) => [ae, l]);
2112
+ break;
2113
+ }
2114
+ return a.printComment && !((s = a.willPrintOwnComments) != null && s.call(a, e, t)) && (o = Sn(e, o, t)), o;
2115
+ }
2116
+ async function Tu(e, t) {
2117
+ let u = e.comments ?? [];
2118
+ t[Symbol.for("comments")] = u, t[Symbol.for("printedComments")] = /* @__PURE__ */ new Set(), vn(e, t);
2119
+ let { printer: { preprocess: r } } = t;
2120
+ return e = r ? await r(e, t) : e, { ast: e, comments: u };
2121
+ }
2122
+ function YD(e, t) {
2123
+ let { cursorOffset: u, locStart: r, locEnd: n, getVisitorKeys: D } = t, a = (F) => r(F) <= u && n(F) >= u, o = e, i = [e];
2124
+ for (let F of En(e, { getVisitorKeys: D, filter: a })) i.push(F), o = F;
2125
+ if (mn(o, { getVisitorKeys: D })) return { cursorNode: o };
2126
+ let s, l, f = -1, c = Number.POSITIVE_INFINITY;
2127
+ for (; i.length > 0 && (s === void 0 || l === void 0); ) {
2128
+ o = i.pop();
2129
+ let F = s !== void 0, d = l !== void 0;
2130
+ for (let p of Le(o, { getVisitorKeys: D })) {
2131
+ if (!F) {
2132
+ let E = n(p);
2133
+ E <= u && E > f && (s = p, f = E);
2134
+ }
2135
+ if (!d) {
2136
+ let E = r(p);
2137
+ E >= u && E < c && (l = p, c = E);
2138
+ }
2139
+ }
2140
+ }
2141
+ return { nodeBeforeCursor: s, nodeAfterCursor: l };
2142
+ }
2143
+ var Pu = YD;
2144
+ function QD(e, t) {
2145
+ let { printer: u } = t, r = u.massageAstNode;
2146
+ if (!r) return e;
2147
+ let { getVisitorKeys: n } = u, { ignoredProperties: D } = r;
2148
+ return a(e);
2149
+ function a(o, i) {
2150
+ if (!ot(o)) return o;
2151
+ if (Array.isArray(o)) return o.map((c) => a(c, i)).filter(Boolean);
2152
+ let s = {}, l = new Set(n(o));
2153
+ for (let c in o) !Object.prototype.hasOwnProperty.call(o, c) || D != null && D.has(c) || (l.has(c) ? s[c] = a(o[c], o) : s[c] = o[c]);
2154
+ let f = r(o, s, i);
2155
+ if (f !== null) return f ?? s;
2156
+ }
2157
+ }
2158
+ var ZD = QD, ea = Array.prototype.findLastIndex ?? function(e) {
2159
+ for (let t = this.length - 1; t >= 0; t--) {
2160
+ let u = this[t];
2161
+ if (e(u, t, this)) return t;
2162
+ }
2163
+ return -1;
2164
+ }, ta = ve("findLastIndex", function() {
2165
+ if (Array.isArray(this)) return ea;
2166
+ }), ua = ta, ra = ({ parser: e }) => e === "json" || e === "json5" || e === "jsonc" || e === "json-stringify";
2167
+ function na(e, t) {
2168
+ return t = new Set(t), e.find((u) => ju.has(u.type) && t.has(u));
2169
+ }
2170
+ function Mt(e) {
2171
+ let t = ua(0, e, (u) => u.type !== "Program" && u.type !== "File");
2172
+ return t === -1 ? e : e.slice(0, t + 1);
2173
+ }
2174
+ function Da(e, t, { locStart: u, locEnd: r }) {
2175
+ let [n, ...D] = e, [a, ...o] = t;
2176
+ if (n === a) return [n, a];
2177
+ let i = u(n);
2178
+ for (let l of Mt(o)) if (u(l) >= i) a = l;
2179
+ else break;
2180
+ let s = r(a);
2181
+ for (let l of Mt(D)) {
2182
+ if (r(l) <= s) n = l;
2183
+ else break;
2184
+ if (n === a) break;
2185
+ }
2186
+ return [n, a];
2187
+ }
2188
+ function Ye(e, t, u, r, n = [], D) {
2189
+ let { locStart: a, locEnd: o } = u, i = a(e), s = o(e);
2190
+ if (t > s || t < i || D === "rangeEnd" && t === i || D === "rangeStart" && t === s) return;
2191
+ let l = [e, ...n], f = fu(e, l, { cache: Fu, locStart: a, locEnd: o, getVisitorKeys: u.getVisitorKeys, filter: u.printer.canAttachComment, getChildren: u.printer.getCommentChildNodes });
2192
+ for (let c of f) {
2193
+ let F = Ye(c, t, u, r, l, D);
2194
+ if (F) return F;
2195
+ }
2196
+ if (r(e, n[0])) return l;
2197
+ }
2198
+ function aa(e, t) {
2199
+ return t !== "DeclareExportDeclaration" && e !== "TypeParameterDeclaration" && (e === "Directive" || e === "TypeAlias" || e === "TSExportAssignment" || e.startsWith("Declare") || e.startsWith("TSDeclare") || e.endsWith("Statement") || e.endsWith("Declaration"));
2200
+ }
2201
+ var ju = /* @__PURE__ */ new Set(["JsonRoot", "ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral", "UnaryExpression", "TemplateLiteral"]), oa = /* @__PURE__ */ new Set(["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"]);
2202
+ function Vt(e, t, u) {
2203
+ if (!t) return !1;
2204
+ switch (e.parser) {
2205
+ case "flow":
2206
+ case "hermes":
2207
+ case "babel":
2208
+ case "babel-flow":
2209
+ case "babel-ts":
2210
+ case "typescript":
2211
+ case "acorn":
2212
+ case "espree":
2213
+ case "meriyah":
2214
+ case "oxc":
2215
+ case "oxc-ts":
2216
+ case "__babel_estree":
2217
+ return aa(t.type, u == null ? void 0 : u.type);
2218
+ case "json":
2219
+ case "json5":
2220
+ case "jsonc":
2221
+ case "json-stringify":
2222
+ return ju.has(t.type);
2223
+ case "graphql":
2224
+ return oa.has(t.kind);
2225
+ case "vue":
2226
+ return t.tag !== "root";
2227
+ }
2228
+ return !1;
2229
+ }
2230
+ function ia(e, t, u) {
2231
+ let { rangeStart: r, rangeEnd: n, locStart: D, locEnd: a } = t, o = e.slice(r, n).search(/\S/u), i = o === -1;
2232
+ if (!i) for (r += o; n > r && !/\S/u.test(e[n - 1]); --n) ;
2233
+ let s = Ye(u, r, t, (F, d) => Vt(t, F, d), [], "rangeStart");
2234
+ if (!s) return;
2235
+ let l = i ? s : Ye(u, n, t, (F) => Vt(t, F), [], "rangeEnd");
2236
+ if (!l) return;
2237
+ let f, c;
2238
+ if (ra(t)) {
2239
+ let F = na(s, l);
2240
+ f = F, c = F;
2241
+ } else [f, c] = Da(s, l, t);
2242
+ return [Math.min(D(f), D(c)), Math.max(a(f), a(c))];
2243
+ }
2244
+ var Lu = "\uFEFF", Wt = Symbol("cursor");
2245
+ async function $u(e, t, u = 0) {
2246
+ if (!e || e.trim().length === 0) return { formatted: "", cursorOffset: -1, comments: [] };
2247
+ let { ast: r, text: n } = await be(e, t);
2248
+ t.cursorOffset >= 0 && (t = { ...t, ...Pu(r, t) });
2249
+ let D = await $e(r, t);
2250
+ u > 0 && (D = eu([K, D], u, t.tabWidth));
2251
+ let a = je(D, t);
2252
+ if (u > 0) {
2253
+ let i = a.formatted.trim();
2254
+ a.cursorNodeStart !== void 0 && (a.cursorNodeStart -= a.formatted.indexOf(i), a.cursorNodeStart < 0 && (a.cursorNodeStart = 0, a.cursorNodeText = a.cursorNodeText.trimStart()), a.cursorNodeStart + a.cursorNodeText.length > i.length && (a.cursorNodeText = a.cursorNodeText.trimEnd())), a.formatted = i + tt(t.endOfLine);
2255
+ }
2256
+ let o = t[Symbol.for("comments")];
2257
+ if (t.cursorOffset >= 0) {
2258
+ let i, s, l, f;
2259
+ if ((t.cursorNode || t.nodeBeforeCursor || t.nodeAfterCursor) && a.cursorNodeText) if (l = a.cursorNodeStart, f = a.cursorNodeText, t.cursorNode) i = t.locStart(t.cursorNode), s = n.slice(i, t.locEnd(t.cursorNode));
2260
+ else {
2261
+ if (!t.nodeBeforeCursor && !t.nodeAfterCursor) throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");
2262
+ i = t.nodeBeforeCursor ? t.locEnd(t.nodeBeforeCursor) : 0;
2263
+ let g = t.nodeAfterCursor ? t.locStart(t.nodeAfterCursor) : n.length;
2264
+ s = n.slice(i, g);
2265
+ }
2266
+ else i = 0, s = n, l = 0, f = a.formatted;
2267
+ let c = t.cursorOffset - i;
2268
+ if (s === f) return { formatted: a.formatted, cursorOffset: l + c, comments: o };
2269
+ let F = s.split("");
2270
+ F.splice(c, 0, Wt);
2271
+ let d = f.split(""), p = cr(F, d), E = l;
2272
+ for (let g of p) if (g.removed) {
2273
+ if (g.value.includes(Wt)) break;
2274
+ } else E += g.count;
2275
+ return { formatted: a.formatted, cursorOffset: E, comments: o };
2276
+ }
2277
+ return { formatted: a.formatted, cursorOffset: -1, comments: o };
2278
+ }
2279
+ async function sa(e, t) {
2280
+ let { ast: u, text: r } = await be(e, t), [n, D] = ia(r, t, u) ?? [0, 0], a = r.slice(n, D), o = Math.min(n, r.lastIndexOf(`
2281
+ `, n) + 1), i = r.slice(o, n).match(/^\s*/u)[0], s = at(i, t.tabWidth), l = await $u(a, { ...t, rangeStart: 0, rangeEnd: Number.POSITIVE_INFINITY, cursorOffset: t.cursorOffset > n && t.cursorOffset <= D ? t.cursorOffset - n : -1, endOfLine: "lf" }, s), f = l.formatted.trimEnd(), { cursorOffset: c } = t;
2282
+ c > D ? c += f.length - a.length : l.cursorOffset >= 0 && (c = l.cursorOffset + n);
2283
+ let F = r.slice(0, n) + f + r.slice(D);
2284
+ if (t.endOfLine !== "lf") {
2285
+ let d = tt(t.endOfLine);
2286
+ c >= 0 && d === `\r
2287
+ ` && (c += Gt(F.slice(0, c), `
2288
+ `)), F = Oe(0, F, `
2289
+ `, d);
2290
+ }
2291
+ return { formatted: F, cursorOffset: c, comments: l.comments };
2292
+ }
2293
+ function Xe(e, t, u) {
2294
+ return typeof t != "number" || Number.isNaN(t) || t < 0 || t > e.length ? u : t;
2295
+ }
2296
+ function Kt(e, t) {
2297
+ let { cursorOffset: u, rangeStart: r, rangeEnd: n } = t;
2298
+ return u = Xe(e, u, -1), r = Xe(e, r, 0), n = Xe(e, n, e.length), { ...t, cursorOffset: u, rangeStart: r, rangeEnd: n };
2299
+ }
2300
+ function Ju(e, t) {
2301
+ let { cursorOffset: u, rangeStart: r, rangeEnd: n, endOfLine: D } = Kt(e, t), a = e.charAt(0) === Lu;
2302
+ if (a && (e = e.slice(1), u--, r--, n--), D === "auto" && (D = Cr(e)), e.includes("\r")) {
2303
+ let o = (i) => Gt(e.slice(0, Math.max(i, 0)), `\r
2304
+ `);
2305
+ u -= o(u), r -= o(r), n -= o(n), e = mr(e);
2306
+ }
2307
+ return { hasBOM: a, text: e, options: Kt(e, { ...t, cursorOffset: u, rangeStart: r, rangeEnd: n, endOfLine: D }) };
2308
+ }
2309
+ async function zt(e, t) {
2310
+ let u = await ft(t);
2311
+ return !u.hasPragma || u.hasPragma(e);
2312
+ }
2313
+ async function la(e, t) {
2314
+ var u, r;
2315
+ return (r = (u = await ft(t)).hasIgnorePragma) == null ? void 0 : r.call(u, e);
2316
+ }
2317
+ async function Ru(e, t) {
2318
+ let { hasBOM: u, text: r, options: n } = Ju(e, await Ce(t));
2319
+ if (n.rangeStart >= n.rangeEnd && r !== "" || n.requirePragma && !await zt(r, n) || n.checkIgnorePragma && await la(r, n)) return { formatted: e, cursorOffset: t.cursorOffset, comments: [] };
2320
+ let D;
2321
+ return n.rangeStart > 0 || n.rangeEnd < r.length ? D = await sa(r, n) : (!n.requirePragma && n.insertPragma && n.printer.insertPragma && !await zt(r, n) && (r = n.printer.insertPragma(r)), D = await $u(r, n)), u && (D.formatted = Lu + D.formatted, D.cursorOffset >= 0 && D.cursorOffset++), D;
2322
+ }
2323
+ async function ca(e, t, u) {
2324
+ let { text: r, options: n } = Ju(e, await Ce(t)), D = await be(r, n);
2325
+ return u && (u.preprocessForPrint && (D.ast = await Tu(D.ast, n)), u.massage && (D.ast = ZD(D.ast, n))), D;
2326
+ }
2327
+ async function fa(e, t) {
2328
+ t = await Ce(t);
2329
+ let u = await $e(e, t);
2330
+ return je(u, t);
2331
+ }
2332
+ async function Fa(e, t) {
2333
+ let u = Gr(e), { formatted: r } = await Ru(u, { ...t, parser: "__js_expression" });
2334
+ return r;
2335
+ }
2336
+ async function da(e, t) {
2337
+ t = await Ce(t);
2338
+ let { ast: u } = await be(e, t);
2339
+ return t.cursorOffset >= 0 && (t = { ...t, ...Pu(u, t) }), $e(u, t);
2340
+ }
2341
+ async function pa(e, t) {
2342
+ return je(e, await Ce(t));
2343
+ }
2344
+ var Mu = {};
2345
+ Ze(Mu, { builders: () => ha, printer: () => Ca, utils: () => ga });
2346
+ var ha = { join: uu, line: ru, softline: Ur, hardline: K, literalline: Du, group: tu, conditionalGroup: Wr, fill: Vr, lineSuffix: Ue, lineSuffixBoundary: qr, cursor: ae, breakParent: Pe, ifBreak: Kr, trim: Hr, indent: Ne, indentIfBreak: zr, align: he, addAlignmentToDoc: eu, markAsRoot: Zt, dedentToRoot: Rr, dedent: Mr, hardlineWithoutBreakParent: nt, literallineWithoutBreakParent: nu, label: Xr, concat: (e) => e }, Ca = { printDocToString: je }, ga = { willBreak: Ir, traverseDoc: ut, findInDoc: rt, mapDoc: Te, removeLines: _r, stripTrailingHardline: Qt, replaceEndOfLine: jr, canBreak: $r }, Ea = "3.7.4", Vu = {};
2347
+ Ze(Vu, { addDanglingComment: () => ne, addLeadingComment: () => me, addTrailingComment: () => ye, getAlignmentSize: () => at, getIndentSize: () => Aa, getMaxContinuousCount: () => xa, getNextNonSpaceNonCommentCharacter: () => Ia, getNextNonSpaceNonCommentCharacterIndex: () => Ra, getPreferredQuote: () => Ta, getStringWidth: () => Dt, hasNewline: () => Z, hasNewlineInRange: () => ja, hasSpaces: () => $a, isNextLineEmpty: () => za, isNextLineEmptyAfterIndex: () => Ct, isPreviousLineEmpty: () => Va, makeString: () => Ka, skip: () => Be, skipEverythingButNewLine: () => lu, skipInlineComment: () => dt, skipNewline: () => oe, skipSpaces: () => ee, skipToLineEnd: () => su, skipTrailingComment: () => pt, skipWhitespace: () => dn });
2348
+ function ma(e, t) {
2349
+ if (t === !1) return !1;
2350
+ if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
2351
+ for (let u = t + 2; u < e.length; ++u) if (e.charAt(u) === "*" && e.charAt(u + 1) === "/") return u + 2;
2352
+ }
2353
+ return t;
2354
+ }
2355
+ var dt = ma;
2356
+ function ya(e, t) {
2357
+ return t === !1 ? !1 : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? lu(e, t) : t;
2358
+ }
2359
+ var pt = ya;
2360
+ function va(e, t) {
2361
+ let u = null, r = t;
2362
+ for (; r !== u; ) u = r, r = ee(e, r), r = dt(e, r), r = pt(e, r), r = oe(e, r);
2363
+ return r;
2364
+ }
2365
+ var ht = va;
2366
+ function Ba(e, t) {
2367
+ let u = null, r = t;
2368
+ for (; r !== u; ) u = r, r = su(e, r), r = dt(e, r), r = ee(e, r);
2369
+ return r = pt(e, r), r = oe(e, r), r !== !1 && Z(e, r);
2370
+ }
2371
+ var Ct = Ba;
2372
+ function ba(e, t) {
2373
+ let u = e.lastIndexOf(`
2374
+ `);
2375
+ return u === -1 ? 0 : at(e.slice(u + 1).match(/^[\t ]*/u)[0], t);
2376
+ }
2377
+ var Aa = ba;
2378
+ function wa(e) {
2379
+ if (typeof e != "string") throw new TypeError("Expected a string");
2380
+ return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
2381
+ }
2382
+ function ka(e, t) {
2383
+ let u = e.matchAll(new RegExp(`(?:${wa(t)})+`, "gu"));
2384
+ return u.reduce || (u = [...u]), u.reduce((r, [n]) => Math.max(r, n.length), 0) / t.length;
2385
+ }
2386
+ var xa = ka;
2387
+ function Sa(e, t) {
2388
+ let u = ht(e, t);
2389
+ return u === !1 ? "" : e.charAt(u);
2390
+ }
2391
+ var Ia = Sa, Wu = Object.freeze({ character: "'", codePoint: 39 }), Ku = Object.freeze({ character: '"', codePoint: 34 }), Na = Object.freeze({ preferred: Wu, alternate: Ku }), Oa = Object.freeze({ preferred: Ku, alternate: Wu });
2392
+ function _a(e, t) {
2393
+ let { preferred: u, alternate: r } = t === !0 || t === "'" ? Na : Oa, { length: n } = e, D = 0, a = 0;
2394
+ for (let o = 0; o < n; o++) {
2395
+ let i = e.charCodeAt(o);
2396
+ i === u.codePoint ? D++ : i === r.codePoint && a++;
2397
+ }
2398
+ return (D > a ? r : u).character;
2399
+ }
2400
+ var Ta = _a;
2401
+ function Pa(e, t, u) {
2402
+ for (let r = t; r < u; ++r) if (e.charAt(r) === `
2403
+ `) return !0;
2404
+ return !1;
2405
+ }
2406
+ var ja = Pa;
2407
+ function La(e, t, u = {}) {
2408
+ return ee(e, u.backwards ? t - 1 : t, u) !== t;
2409
+ }
2410
+ var $a = La;
2411
+ function Ja(e, t, u) {
2412
+ return ht(e, u(t));
2413
+ }
2414
+ function Ra(e, t) {
2415
+ return arguments.length === 2 || typeof t == "number" ? ht(e, t) : Ja(...arguments);
2416
+ }
2417
+ function Ma(e, t, u) {
2418
+ return st(e, u(t));
2419
+ }
2420
+ function Va(e, t) {
2421
+ return arguments.length === 2 || typeof t == "number" ? st(e, t) : Ma(...arguments);
2422
+ }
2423
+ function Wa(e, t, u) {
2424
+ return Ct(e, u(t));
2425
+ }
2426
+ function Ka(e, t, u) {
2427
+ let r = t === '"' ? "'" : '"', n = Oe(0, e, /\\(.)|(["'])/gsu, (D, a, o) => a === r ? a : o === t ? "\\" + o : o || (u && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(a) ? a : "\\" + a));
2428
+ return t + n + t;
2429
+ }
2430
+ function za(e, t) {
2431
+ return arguments.length === 2 || typeof t == "number" ? Ct(e, t) : Wa(...arguments);
2432
+ }
2433
+ function De(e, t = 1) {
2434
+ return async (...u) => {
2435
+ let r = u[t] ?? {}, n = r.plugins ?? [];
2436
+ return u[t] = { ...r, plugins: Array.isArray(n) ? n : Object.values(n) }, e(...u);
2437
+ };
2438
+ }
2439
+ var zu = De(Ru);
2440
+ async function Xu(e, t) {
2441
+ let { formatted: u } = await zu(e, { ...t, cursorOffset: -1 });
2442
+ return u;
2443
+ }
2444
+ async function Xa(e, t) {
2445
+ return await Xu(e, t) === e;
2446
+ }
2447
+ var Ua = De(gu, 0), qa = { parse: De(ca), formatAST: De(fa), formatDoc: De(Fa), printToDoc: De(da), printDocToString: De(pa) };
2448
+ export {
2449
+ qa as __debug,
2450
+ Xa as check,
2451
+ Dr as default,
2452
+ Mu as doc,
2453
+ Xu as format,
2454
+ zu as formatWithCursor,
2455
+ Ua as getSupportInfo,
2456
+ Vu as util,
2457
+ Ea as version
2458
+ };