dorian 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +15 -0
- data/.github/workflows/ci.yml +38 -0
- data/.gitignore +30 -0
- data/.node-version +1 -0
- data/.prettierignore +2 -0
- data/.rubocop.yml +129 -0
- data/.ruby-version +1 -0
- data/.tool-versions +3 -0
- data/Gemfile +20 -0
- data/Gemfile.lock +186 -0
- data/LICENSE +19 -0
- data/README.md +24 -0
- data/VERSION +1 -1
- data/bin/bundle +123 -0
- data/bin/bundle-audit +31 -0
- data/bin/bundler-audit +31 -0
- data/bin/rspec +31 -0
- data/bin/rubocop +31 -0
- data/dorian.gemspec +35 -0
- data/lib/dorian/bin.rb +739 -81
- data/package-lock.json +39 -0
- data/package.json +11 -0
- data/samples/books.json +33 -0
- data/samples/books.jsonl +3 -0
- data/samples/config.yml +27 -0
- data/samples/config_2.yml +22 -0
- data/samples/maths.js +1 -0
- data/samples/numbers.raw +10 -0
- data/samples/people.csv +6 -0
- data/samples/people.yml +28 -0
- data/samples/query.sql +7 -0
- data/samples/user.json +31 -0
- data/spec/dorian_spec.rb +276 -0
- data/spec/spec_helper.rb +3 -0
- data/vendor/groovy-beautify/LICENSE.MD +21 -0
- data/vendor/groovy-beautify/README.md +65 -0
- data/vendor/groovy-beautify/dist/__tests__/index.test.d.ts +1 -0
- data/vendor/groovy-beautify/dist/cjs/index.js +573 -0
- data/vendor/groovy-beautify/dist/cjs/package.json +3 -0
- data/vendor/groovy-beautify/dist/es/index.js +682 -0
- data/vendor/groovy-beautify/dist/es/package.json +3 -0
- data/vendor/groovy-beautify/dist/formatter/FormatRule.d.ts +14 -0
- data/vendor/groovy-beautify/dist/formatter/Formatter.d.ts +11 -0
- data/vendor/groovy-beautify/dist/formatter/GroovyFormatRules.d.ts +3 -0
- data/vendor/groovy-beautify/dist/formatter/__tests__/formatter.test.d.ts +1 -0
- data/vendor/groovy-beautify/dist/index.d.ts +5 -0
- data/vendor/groovy-beautify/dist/parser/GroovyParseRules.d.ts +3 -0
- data/vendor/groovy-beautify/dist/parser/ParseRule.d.ts +23 -0
- data/vendor/groovy-beautify/dist/parser/Parser.d.ts +29 -0
- data/vendor/groovy-beautify/dist/parser/__tests__/parser.test.d.ts +1 -0
- data/vendor/groovy-beautify/dist/parser/types.d.ts +6 -0
- data/vendor/groovy-beautify/dist/utils/text.d.ts +4 -0
- data/vendor/groovy-beautify/package.json +55 -0
- data/vendor/prettier/LICENSE +4379 -0
- data/vendor/prettier/README.md +109 -0
- data/vendor/prettier/bin/prettier.cjs +71 -0
- data/vendor/prettier/doc.d.ts +243 -0
- data/vendor/prettier/doc.js +1545 -0
- data/vendor/prettier/doc.mjs +1503 -0
- data/vendor/prettier/index.cjs +825 -0
- data/vendor/prettier/index.d.ts +941 -0
- data/vendor/prettier/index.mjs +25899 -0
- data/vendor/prettier/internal/cli.mjs +4366 -0
- data/vendor/prettier/package.json +198 -0
- data/vendor/prettier/plugins/acorn.d.ts +6 -0
- data/vendor/prettier/plugins/acorn.js +6618 -0
- data/vendor/prettier/plugins/acorn.mjs +6456 -0
- data/vendor/prettier/plugins/angular.d.ts +8 -0
- data/vendor/prettier/plugins/angular.js +2435 -0
- data/vendor/prettier/plugins/angular.mjs +2375 -0
- data/vendor/prettier/plugins/babel.d.ts +18 -0
- data/vendor/prettier/plugins/babel.js +14271 -0
- data/vendor/prettier/plugins/babel.mjs +13986 -0
- data/vendor/prettier/plugins/estree.d.ts +1 -0
- data/vendor/prettier/plugins/estree.js +9487 -0
- data/vendor/prettier/plugins/estree.mjs +9279 -0
- data/vendor/prettier/plugins/flow.d.ts +5 -0
- data/vendor/prettier/plugins/flow.js +51477 -0
- data/vendor/prettier/plugins/flow.mjs +51219 -0
- data/vendor/prettier/plugins/glimmer.d.ts +5 -0
- data/vendor/prettier/plugins/glimmer.js +8534 -0
- data/vendor/prettier/plugins/glimmer.mjs +8421 -0
- data/vendor/prettier/plugins/graphql.d.ts +5 -0
- data/vendor/prettier/plugins/graphql.js +2421 -0
- data/vendor/prettier/plugins/graphql.mjs +2347 -0
- data/vendor/prettier/plugins/html.d.ts +8 -0
- data/vendor/prettier/plugins/html.js +8182 -0
- data/vendor/prettier/plugins/html.mjs +8077 -0
- data/vendor/prettier/plugins/markdown.d.ts +7 -0
- data/vendor/prettier/plugins/markdown.js +9068 -0
- data/vendor/prettier/plugins/markdown.mjs +8977 -0
- data/vendor/prettier/plugins/meriyah.d.ts +5 -0
- data/vendor/prettier/plugins/meriyah.js +5953 -0
- data/vendor/prettier/plugins/meriyah.mjs +5800 -0
- data/vendor/prettier/plugins/postcss.d.ts +7 -0
- data/vendor/prettier/plugins/postcss.js +9244 -0
- data/vendor/prettier/plugins/postcss.mjs +9046 -0
- data/vendor/prettier/plugins/typescript.d.ts +5 -0
- data/vendor/prettier/plugins/typescript.js +38058 -0
- data/vendor/prettier/plugins/typescript.mjs +37732 -0
- data/vendor/prettier/plugins/yaml.d.ts +5 -0
- data/vendor/prettier/plugins/yaml.js +7425 -0
- data/vendor/prettier/plugins/yaml.mjs +7329 -0
- data/vendor/prettier/standalone.d.ts +33 -0
- data/vendor/prettier/standalone.js +3984 -0
- data/vendor/prettier/standalone.mjs +3938 -0
- data/vendor/sql-formatter.js +18762 -0
- metadata +205 -2
@@ -0,0 +1,3938 @@
|
|
1
|
+
var yu = Object.create;
|
2
|
+
var He = Object.defineProperty;
|
3
|
+
var Au = Object.getOwnPropertyDescriptor;
|
4
|
+
var Bu = Object.getOwnPropertyNames;
|
5
|
+
var wu = Object.getPrototypeOf,
|
6
|
+
xu = Object.prototype.hasOwnProperty;
|
7
|
+
var sr = (e) => {
|
8
|
+
throw TypeError(e);
|
9
|
+
};
|
10
|
+
var _u = (e, t) => () => (e && (t = e((e = 0))), t);
|
11
|
+
var At = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports),
|
12
|
+
We = (e, t) => {
|
13
|
+
for (var r in t) He(e, r, { get: t[r], enumerable: !0 });
|
14
|
+
},
|
15
|
+
ar = (e, t, r, n) => {
|
16
|
+
if ((t && typeof t == "object") || typeof t == "function")
|
17
|
+
for (let o of Bu(t))
|
18
|
+
!xu.call(e, o) &&
|
19
|
+
o !== r &&
|
20
|
+
He(e, o, {
|
21
|
+
get: () => t[o],
|
22
|
+
enumerable: !(n = Au(t, o)) || n.enumerable,
|
23
|
+
});
|
24
|
+
return e;
|
25
|
+
};
|
26
|
+
var Me = (e, t, r) => (
|
27
|
+
(r = e != null ? yu(wu(e)) : {}),
|
28
|
+
ar(
|
29
|
+
t || !e || !e.__esModule
|
30
|
+
? He(r, "default", { value: e, enumerable: !0 })
|
31
|
+
: r,
|
32
|
+
e,
|
33
|
+
)
|
34
|
+
),
|
35
|
+
vu = (e) => ar(He({}, "__esModule", { value: !0 }), e);
|
36
|
+
var bu = (e, t, r) => t.has(e) || sr("Cannot " + r);
|
37
|
+
var Dr = (e, t, r) =>
|
38
|
+
t.has(e)
|
39
|
+
? sr("Cannot add the same private member more than once")
|
40
|
+
: t instanceof WeakSet
|
41
|
+
? t.add(e)
|
42
|
+
: t.set(e, r);
|
43
|
+
var pe = (e, t, r) => (bu(e, t, "access private method"), r);
|
44
|
+
var it = At((ia, sn) => {
|
45
|
+
"use strict";
|
46
|
+
var on = new Proxy(String, { get: () => on });
|
47
|
+
sn.exports = on;
|
48
|
+
});
|
49
|
+
var Tn = {};
|
50
|
+
We(Tn, { default: () => _o, shouldHighlight: () => xo });
|
51
|
+
var xo,
|
52
|
+
_o,
|
53
|
+
kn = _u(() => {
|
54
|
+
(xo = () => !1), (_o = String);
|
55
|
+
});
|
56
|
+
var Pn = At((bD, Xt) => {
|
57
|
+
var g = String,
|
58
|
+
Ln = function () {
|
59
|
+
return {
|
60
|
+
isColorSupported: !1,
|
61
|
+
reset: g,
|
62
|
+
bold: g,
|
63
|
+
dim: g,
|
64
|
+
italic: g,
|
65
|
+
underline: g,
|
66
|
+
inverse: g,
|
67
|
+
hidden: g,
|
68
|
+
strikethrough: g,
|
69
|
+
black: g,
|
70
|
+
red: g,
|
71
|
+
green: g,
|
72
|
+
yellow: g,
|
73
|
+
blue: g,
|
74
|
+
magenta: g,
|
75
|
+
cyan: g,
|
76
|
+
white: g,
|
77
|
+
gray: g,
|
78
|
+
bgBlack: g,
|
79
|
+
bgRed: g,
|
80
|
+
bgGreen: g,
|
81
|
+
bgYellow: g,
|
82
|
+
bgBlue: g,
|
83
|
+
bgMagenta: g,
|
84
|
+
bgCyan: g,
|
85
|
+
bgWhite: g,
|
86
|
+
};
|
87
|
+
};
|
88
|
+
Xt.exports = Ln();
|
89
|
+
Xt.exports.createColors = Ln;
|
90
|
+
});
|
91
|
+
var $n = At((Ct) => {
|
92
|
+
"use strict";
|
93
|
+
Object.defineProperty(Ct, "__esModule", { value: !0 });
|
94
|
+
Ct.codeFrameColumns = Mn;
|
95
|
+
Ct.default = To;
|
96
|
+
var In = (kn(), vu(Tn)),
|
97
|
+
Hn = vo(Pn(), !0);
|
98
|
+
function Wn(e) {
|
99
|
+
if (typeof WeakMap != "function") return null;
|
100
|
+
var t = new WeakMap(),
|
101
|
+
r = new WeakMap();
|
102
|
+
return (Wn = function (n) {
|
103
|
+
return n ? r : t;
|
104
|
+
})(e);
|
105
|
+
}
|
106
|
+
function vo(e, t) {
|
107
|
+
if (!t && e && e.__esModule) return e;
|
108
|
+
if (e === null || (typeof e != "object" && typeof e != "function"))
|
109
|
+
return { default: e };
|
110
|
+
var r = Wn(t);
|
111
|
+
if (r && r.has(e)) return r.get(e);
|
112
|
+
var n = { __proto__: null },
|
113
|
+
o = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
114
|
+
for (var u in e)
|
115
|
+
if (u !== "default" && {}.hasOwnProperty.call(e, u)) {
|
116
|
+
var i = o ? Object.getOwnPropertyDescriptor(e, u) : null;
|
117
|
+
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]);
|
118
|
+
}
|
119
|
+
return (n.default = e), r && r.set(e, n), n;
|
120
|
+
}
|
121
|
+
var bo = Hn.default,
|
122
|
+
Rn = (e, t) => (r) => e(t(r)),
|
123
|
+
Zt;
|
124
|
+
function Oo(e) {
|
125
|
+
if (e) {
|
126
|
+
var t;
|
127
|
+
return (t = Zt) != null || (Zt = (0, Hn.createColors)(!0)), Zt;
|
128
|
+
}
|
129
|
+
return bo;
|
130
|
+
}
|
131
|
+
var Yn = !1;
|
132
|
+
function So(e) {
|
133
|
+
return {
|
134
|
+
gutter: e.gray,
|
135
|
+
marker: Rn(e.red, e.bold),
|
136
|
+
message: Rn(e.red, e.bold),
|
137
|
+
};
|
138
|
+
}
|
139
|
+
var jn = /\r\n|[\n\r\u2028\u2029]/;
|
140
|
+
function No(e, t, r) {
|
141
|
+
let n = Object.assign({ column: 0, line: -1 }, e.start),
|
142
|
+
o = Object.assign({}, n, e.end),
|
143
|
+
{ linesAbove: u = 2, linesBelow: i = 3 } = r || {},
|
144
|
+
s = n.line,
|
145
|
+
a = n.column,
|
146
|
+
D = o.line,
|
147
|
+
l = o.column,
|
148
|
+
d = Math.max(s - (u + 1), 0),
|
149
|
+
f = Math.min(t.length, D + i);
|
150
|
+
s === -1 && (d = 0), D === -1 && (f = t.length);
|
151
|
+
let p = D - s,
|
152
|
+
c = {};
|
153
|
+
if (p)
|
154
|
+
for (let F = 0; F <= p; F++) {
|
155
|
+
let m = F + s;
|
156
|
+
if (!a) c[m] = !0;
|
157
|
+
else if (F === 0) {
|
158
|
+
let E = t[m - 1].length;
|
159
|
+
c[m] = [a, E - a + 1];
|
160
|
+
} else if (F === p) c[m] = [0, l];
|
161
|
+
else {
|
162
|
+
let E = t[m - F].length;
|
163
|
+
c[m] = [0, E];
|
164
|
+
}
|
165
|
+
}
|
166
|
+
else a === l ? (a ? (c[s] = [a, 0]) : (c[s] = !0)) : (c[s] = [a, l - a]);
|
167
|
+
return { start: d, end: f, markerLines: c };
|
168
|
+
}
|
169
|
+
function Mn(e, t, r = {}) {
|
170
|
+
let n = (r.highlightCode || r.forceColor) && (0, In.shouldHighlight)(r),
|
171
|
+
o = Oo(r.forceColor),
|
172
|
+
u = So(o),
|
173
|
+
i = (F, m) => (n ? F(m) : m),
|
174
|
+
s = e.split(jn),
|
175
|
+
{ start: a, end: D, markerLines: l } = No(t, s, r),
|
176
|
+
d = t.start && typeof t.start.column == "number",
|
177
|
+
f = String(D).length,
|
178
|
+
c = (n ? (0, In.default)(e, r) : e)
|
179
|
+
.split(jn, D)
|
180
|
+
.slice(a, D)
|
181
|
+
.map((F, m) => {
|
182
|
+
let E = a + 1 + m,
|
183
|
+
w = ` ${` ${E}`.slice(-f)} |`,
|
184
|
+
h = l[E],
|
185
|
+
C = !l[E + 1];
|
186
|
+
if (h) {
|
187
|
+
let k = "";
|
188
|
+
if (Array.isArray(h)) {
|
189
|
+
let v = F.slice(0, Math.max(h[0] - 1, 0)).replace(/[^\t]/g, " "),
|
190
|
+
$ = h[1] || 1;
|
191
|
+
(k = [
|
192
|
+
`
|
193
|
+
`,
|
194
|
+
i(u.gutter, w.replace(/\d/g, " ")),
|
195
|
+
" ",
|
196
|
+
v,
|
197
|
+
i(u.marker, "^").repeat($),
|
198
|
+
].join("")),
|
199
|
+
C && r.message && (k += " " + i(u.message, r.message));
|
200
|
+
}
|
201
|
+
return [
|
202
|
+
i(u.marker, ">"),
|
203
|
+
i(u.gutter, w),
|
204
|
+
F.length > 0 ? ` ${F}` : "",
|
205
|
+
k,
|
206
|
+
].join("");
|
207
|
+
} else return ` ${i(u.gutter, w)}${F.length > 0 ? ` ${F}` : ""}`;
|
208
|
+
}).join(`
|
209
|
+
`);
|
210
|
+
return (
|
211
|
+
r.message &&
|
212
|
+
!d &&
|
213
|
+
(c = `${" ".repeat(f + 1)}${r.message}
|
214
|
+
${c}`),
|
215
|
+
n ? o.reset(c) : c
|
216
|
+
);
|
217
|
+
}
|
218
|
+
function To(e, t, r, n = {}) {
|
219
|
+
if (!Yn) {
|
220
|
+
Yn = !0;
|
221
|
+
let u =
|
222
|
+
"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
|
223
|
+
{
|
224
|
+
let i = new Error(u);
|
225
|
+
(i.name = "DeprecationWarning"), console.warn(new Error(u));
|
226
|
+
}
|
227
|
+
}
|
228
|
+
return (r = Math.max(r, 0)), Mn(e, { start: { column: r, line: t } }, n);
|
229
|
+
}
|
230
|
+
});
|
231
|
+
var ir = {};
|
232
|
+
We(ir, {
|
233
|
+
__debug: () => di,
|
234
|
+
check: () => fi,
|
235
|
+
doc: () => nr,
|
236
|
+
format: () => gu,
|
237
|
+
formatWithCursor: () => Cu,
|
238
|
+
getSupportInfo: () => pi,
|
239
|
+
util: () => or,
|
240
|
+
version: () => fu,
|
241
|
+
});
|
242
|
+
var Ou = (e, t, r, n) => {
|
243
|
+
if (!(e && t == null))
|
244
|
+
return t.replaceAll
|
245
|
+
? t.replaceAll(r, n)
|
246
|
+
: r.global
|
247
|
+
? t.replace(r, n)
|
248
|
+
: t.split(r).join(n);
|
249
|
+
},
|
250
|
+
ne = Ou;
|
251
|
+
function Z() {}
|
252
|
+
Z.prototype = {
|
253
|
+
diff: function (t, r) {
|
254
|
+
var n,
|
255
|
+
o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
|
256
|
+
u = o.callback;
|
257
|
+
typeof o == "function" && ((u = o), (o = {})), (this.options = o);
|
258
|
+
var i = this;
|
259
|
+
function s(h) {
|
260
|
+
return u
|
261
|
+
? (setTimeout(function () {
|
262
|
+
u(void 0, h);
|
263
|
+
}, 0),
|
264
|
+
!0)
|
265
|
+
: h;
|
266
|
+
}
|
267
|
+
(t = this.castInput(t)),
|
268
|
+
(r = this.castInput(r)),
|
269
|
+
(t = this.removeEmpty(this.tokenize(t))),
|
270
|
+
(r = this.removeEmpty(this.tokenize(r)));
|
271
|
+
var a = r.length,
|
272
|
+
D = t.length,
|
273
|
+
l = 1,
|
274
|
+
d = a + D;
|
275
|
+
o.maxEditLength && (d = Math.min(d, o.maxEditLength));
|
276
|
+
var f = (n = o.timeout) !== null && n !== void 0 ? n : 1 / 0,
|
277
|
+
p = Date.now() + f,
|
278
|
+
c = [{ oldPos: -1, lastComponent: void 0 }],
|
279
|
+
F = this.extractCommon(c[0], r, t, 0);
|
280
|
+
if (c[0].oldPos + 1 >= D && F + 1 >= a)
|
281
|
+
return s([{ value: this.join(r), count: r.length }]);
|
282
|
+
var m = -1 / 0,
|
283
|
+
E = 1 / 0;
|
284
|
+
function A() {
|
285
|
+
for (var h = Math.max(m, -l); h <= Math.min(E, l); h += 2) {
|
286
|
+
var C = void 0,
|
287
|
+
k = c[h - 1],
|
288
|
+
v = c[h + 1];
|
289
|
+
k && (c[h - 1] = void 0);
|
290
|
+
var $ = !1;
|
291
|
+
if (v) {
|
292
|
+
var ye = v.oldPos - h;
|
293
|
+
$ = v && 0 <= ye && ye < a;
|
294
|
+
}
|
295
|
+
var yt = k && k.oldPos + 1 < D;
|
296
|
+
if (!$ && !yt) {
|
297
|
+
c[h] = void 0;
|
298
|
+
continue;
|
299
|
+
}
|
300
|
+
if (
|
301
|
+
(!yt || ($ && k.oldPos + 1 < v.oldPos)
|
302
|
+
? (C = i.addToPath(v, !0, void 0, 0))
|
303
|
+
: (C = i.addToPath(k, void 0, !0, 1)),
|
304
|
+
(F = i.extractCommon(C, r, t, h)),
|
305
|
+
C.oldPos + 1 >= D && F + 1 >= a)
|
306
|
+
)
|
307
|
+
return s(Su(i, C.lastComponent, r, t, i.useLongestToken));
|
308
|
+
(c[h] = C),
|
309
|
+
C.oldPos + 1 >= D && (E = Math.min(E, h - 1)),
|
310
|
+
F + 1 >= a && (m = Math.max(m, h + 1));
|
311
|
+
}
|
312
|
+
l++;
|
313
|
+
}
|
314
|
+
if (u)
|
315
|
+
(function h() {
|
316
|
+
setTimeout(function () {
|
317
|
+
if (l > d || Date.now() > p) return u();
|
318
|
+
A() || h();
|
319
|
+
}, 0);
|
320
|
+
})();
|
321
|
+
else
|
322
|
+
for (; l <= d && Date.now() <= p; ) {
|
323
|
+
var w = A();
|
324
|
+
if (w) return w;
|
325
|
+
}
|
326
|
+
},
|
327
|
+
addToPath: function (t, r, n, o) {
|
328
|
+
var u = t.lastComponent;
|
329
|
+
return u && u.added === r && u.removed === n
|
330
|
+
? {
|
331
|
+
oldPos: t.oldPos + o,
|
332
|
+
lastComponent: {
|
333
|
+
count: u.count + 1,
|
334
|
+
added: r,
|
335
|
+
removed: n,
|
336
|
+
previousComponent: u.previousComponent,
|
337
|
+
},
|
338
|
+
}
|
339
|
+
: {
|
340
|
+
oldPos: t.oldPos + o,
|
341
|
+
lastComponent: {
|
342
|
+
count: 1,
|
343
|
+
added: r,
|
344
|
+
removed: n,
|
345
|
+
previousComponent: u,
|
346
|
+
},
|
347
|
+
};
|
348
|
+
},
|
349
|
+
extractCommon: function (t, r, n, o) {
|
350
|
+
for (
|
351
|
+
var u = r.length, i = n.length, s = t.oldPos, a = s - o, D = 0;
|
352
|
+
a + 1 < u && s + 1 < i && this.equals(r[a + 1], n[s + 1]);
|
353
|
+
|
354
|
+
)
|
355
|
+
a++, s++, D++;
|
356
|
+
return (
|
357
|
+
D && (t.lastComponent = { count: D, previousComponent: t.lastComponent }),
|
358
|
+
(t.oldPos = s),
|
359
|
+
a
|
360
|
+
);
|
361
|
+
},
|
362
|
+
equals: function (t, r) {
|
363
|
+
return this.options.comparator
|
364
|
+
? this.options.comparator(t, r)
|
365
|
+
: t === r ||
|
366
|
+
(this.options.ignoreCase && t.toLowerCase() === r.toLowerCase());
|
367
|
+
},
|
368
|
+
removeEmpty: function (t) {
|
369
|
+
for (var r = [], n = 0; n < t.length; n++) t[n] && r.push(t[n]);
|
370
|
+
return r;
|
371
|
+
},
|
372
|
+
castInput: function (t) {
|
373
|
+
return t;
|
374
|
+
},
|
375
|
+
tokenize: function (t) {
|
376
|
+
return t.split("");
|
377
|
+
},
|
378
|
+
join: function (t) {
|
379
|
+
return t.join("");
|
380
|
+
},
|
381
|
+
};
|
382
|
+
function Su(e, t, r, n, o) {
|
383
|
+
for (var u = [], i; t; )
|
384
|
+
u.push(t), (i = t.previousComponent), delete t.previousComponent, (t = i);
|
385
|
+
u.reverse();
|
386
|
+
for (var s = 0, a = u.length, D = 0, l = 0; s < a; s++) {
|
387
|
+
var d = u[s];
|
388
|
+
if (d.removed) {
|
389
|
+
if (
|
390
|
+
((d.value = e.join(n.slice(l, l + d.count))),
|
391
|
+
(l += d.count),
|
392
|
+
s && u[s - 1].added)
|
393
|
+
) {
|
394
|
+
var p = u[s - 1];
|
395
|
+
(u[s - 1] = u[s]), (u[s] = p);
|
396
|
+
}
|
397
|
+
} else {
|
398
|
+
if (!d.added && o) {
|
399
|
+
var f = r.slice(D, D + d.count);
|
400
|
+
(f = f.map(function (F, m) {
|
401
|
+
var E = n[l + m];
|
402
|
+
return E.length > F.length ? E : F;
|
403
|
+
})),
|
404
|
+
(d.value = e.join(f));
|
405
|
+
} else d.value = e.join(r.slice(D, D + d.count));
|
406
|
+
(D += d.count), d.added || (l += d.count);
|
407
|
+
}
|
408
|
+
}
|
409
|
+
var c = u[a - 1];
|
410
|
+
return (
|
411
|
+
a > 1 &&
|
412
|
+
typeof c.value == "string" &&
|
413
|
+
(c.added || c.removed) &&
|
414
|
+
e.equals("", c.value) &&
|
415
|
+
((u[a - 2].value += c.value), u.pop()),
|
416
|
+
u
|
417
|
+
);
|
418
|
+
}
|
419
|
+
var hi = new Z();
|
420
|
+
var lr = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,
|
421
|
+
cr = /\S/,
|
422
|
+
fr = new Z();
|
423
|
+
fr.equals = function (e, t) {
|
424
|
+
return (
|
425
|
+
this.options.ignoreCase && ((e = e.toLowerCase()), (t = t.toLowerCase())),
|
426
|
+
e === t || (this.options.ignoreWhitespace && !cr.test(e) && !cr.test(t))
|
427
|
+
);
|
428
|
+
};
|
429
|
+
fr.tokenize = function (e) {
|
430
|
+
for (
|
431
|
+
var t = e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/), r = 0;
|
432
|
+
r < t.length - 1;
|
433
|
+
r++
|
434
|
+
)
|
435
|
+
!t[r + 1] &&
|
436
|
+
t[r + 2] &&
|
437
|
+
lr.test(t[r]) &&
|
438
|
+
lr.test(t[r + 2]) &&
|
439
|
+
((t[r] += t[r + 2]), t.splice(r + 1, 2), r--);
|
440
|
+
return t;
|
441
|
+
};
|
442
|
+
var pr = new Z();
|
443
|
+
pr.tokenize = function (e) {
|
444
|
+
this.options.stripTrailingCr &&
|
445
|
+
(e = e.replace(
|
446
|
+
/\r\n/g,
|
447
|
+
`
|
448
|
+
`,
|
449
|
+
));
|
450
|
+
var t = [],
|
451
|
+
r = e.split(/(\n|\r\n)/);
|
452
|
+
r[r.length - 1] || r.pop();
|
453
|
+
for (var n = 0; n < r.length; n++) {
|
454
|
+
var o = r[n];
|
455
|
+
n % 2 && !this.options.newlineIsToken
|
456
|
+
? (t[t.length - 1] += o)
|
457
|
+
: (this.options.ignoreWhitespace && (o = o.trim()), t.push(o));
|
458
|
+
}
|
459
|
+
return t;
|
460
|
+
};
|
461
|
+
var Nu = new Z();
|
462
|
+
Nu.tokenize = function (e) {
|
463
|
+
return e.split(/(\S.+?[.!?])(?=\s+|$)/);
|
464
|
+
};
|
465
|
+
var Tu = new Z();
|
466
|
+
Tu.tokenize = function (e) {
|
467
|
+
return e.split(/([{}:;,]|\s+)/);
|
468
|
+
};
|
469
|
+
function $e(e) {
|
470
|
+
"@babel/helpers - typeof";
|
471
|
+
return (
|
472
|
+
typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
|
473
|
+
? ($e = function (t) {
|
474
|
+
return typeof t;
|
475
|
+
})
|
476
|
+
: ($e = function (t) {
|
477
|
+
return t &&
|
478
|
+
typeof Symbol == "function" &&
|
479
|
+
t.constructor === Symbol &&
|
480
|
+
t !== Symbol.prototype
|
481
|
+
? "symbol"
|
482
|
+
: typeof t;
|
483
|
+
}),
|
484
|
+
$e(e)
|
485
|
+
);
|
486
|
+
}
|
487
|
+
var ku = Object.prototype.toString,
|
488
|
+
Ae = new Z();
|
489
|
+
Ae.useLongestToken = !0;
|
490
|
+
Ae.tokenize = pr.tokenize;
|
491
|
+
Ae.castInput = function (e) {
|
492
|
+
var t = this.options,
|
493
|
+
r = t.undefinedReplacement,
|
494
|
+
n = t.stringifyReplacer,
|
495
|
+
o =
|
496
|
+
n === void 0
|
497
|
+
? function (u, i) {
|
498
|
+
return typeof i > "u" ? r : i;
|
499
|
+
}
|
500
|
+
: n;
|
501
|
+
return typeof e == "string"
|
502
|
+
? e
|
503
|
+
: JSON.stringify(Bt(e, null, null, o), o, " ");
|
504
|
+
};
|
505
|
+
Ae.equals = function (e, t) {
|
506
|
+
return Z.prototype.equals.call(
|
507
|
+
Ae,
|
508
|
+
e.replace(/,([\r\n])/g, "$1"),
|
509
|
+
t.replace(/,([\r\n])/g, "$1"),
|
510
|
+
);
|
511
|
+
};
|
512
|
+
function Bt(e, t, r, n, o) {
|
513
|
+
(t = t || []), (r = r || []), n && (e = n(o, e));
|
514
|
+
var u;
|
515
|
+
for (u = 0; u < t.length; u += 1) if (t[u] === e) return r[u];
|
516
|
+
var i;
|
517
|
+
if (ku.call(e) === "[object Array]") {
|
518
|
+
for (
|
519
|
+
t.push(e), i = new Array(e.length), r.push(i), u = 0;
|
520
|
+
u < e.length;
|
521
|
+
u += 1
|
522
|
+
)
|
523
|
+
i[u] = Bt(e[u], t, r, n, o);
|
524
|
+
return t.pop(), r.pop(), i;
|
525
|
+
}
|
526
|
+
if ((e && e.toJSON && (e = e.toJSON()), $e(e) === "object" && e !== null)) {
|
527
|
+
t.push(e), (i = {}), r.push(i);
|
528
|
+
var s = [],
|
529
|
+
a;
|
530
|
+
for (a in e) e.hasOwnProperty(a) && s.push(a);
|
531
|
+
for (s.sort(), u = 0; u < s.length; u += 1)
|
532
|
+
(a = s[u]), (i[a] = Bt(e[a], t, r, n, a));
|
533
|
+
t.pop(), r.pop();
|
534
|
+
} else i = e;
|
535
|
+
return i;
|
536
|
+
}
|
537
|
+
var Ve = new Z();
|
538
|
+
Ve.tokenize = function (e) {
|
539
|
+
return e.slice();
|
540
|
+
};
|
541
|
+
Ve.join = Ve.removeEmpty = function (e) {
|
542
|
+
return e;
|
543
|
+
};
|
544
|
+
function dr(e, t, r) {
|
545
|
+
return Ve.diff(e, t, r);
|
546
|
+
}
|
547
|
+
function Fr(e) {
|
548
|
+
let t = e.indexOf("\r");
|
549
|
+
return t >= 0
|
550
|
+
? e.charAt(t + 1) ===
|
551
|
+
`
|
552
|
+
`
|
553
|
+
? "crlf"
|
554
|
+
: "cr"
|
555
|
+
: "lf";
|
556
|
+
}
|
557
|
+
function Be(e) {
|
558
|
+
switch (e) {
|
559
|
+
case "cr":
|
560
|
+
return "\r";
|
561
|
+
case "crlf":
|
562
|
+
return `\r
|
563
|
+
`;
|
564
|
+
default:
|
565
|
+
return `
|
566
|
+
`;
|
567
|
+
}
|
568
|
+
}
|
569
|
+
function wt(e, t) {
|
570
|
+
let r;
|
571
|
+
switch (t) {
|
572
|
+
case `
|
573
|
+
`:
|
574
|
+
r = /\n/gu;
|
575
|
+
break;
|
576
|
+
case "\r":
|
577
|
+
r = /\r/gu;
|
578
|
+
break;
|
579
|
+
case `\r
|
580
|
+
`:
|
581
|
+
r = /\r\n/gu;
|
582
|
+
break;
|
583
|
+
default:
|
584
|
+
throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`);
|
585
|
+
}
|
586
|
+
let n = e.match(r);
|
587
|
+
return n ? n.length : 0;
|
588
|
+
}
|
589
|
+
function mr(e) {
|
590
|
+
return ne(
|
591
|
+
!1,
|
592
|
+
e,
|
593
|
+
/\r\n?/gu,
|
594
|
+
`
|
595
|
+
`,
|
596
|
+
);
|
597
|
+
}
|
598
|
+
var U = "string",
|
599
|
+
W = "array",
|
600
|
+
z = "cursor",
|
601
|
+
L = "indent",
|
602
|
+
P = "align",
|
603
|
+
I = "trim",
|
604
|
+
x = "group",
|
605
|
+
S = "fill",
|
606
|
+
_ = "if-break",
|
607
|
+
R = "indent-if-break",
|
608
|
+
Y = "line-suffix",
|
609
|
+
j = "line-suffix-boundary",
|
610
|
+
B = "line",
|
611
|
+
N = "label",
|
612
|
+
b = "break-parent",
|
613
|
+
Ue = new Set([z, L, P, I, x, S, _, R, Y, j, B, N, b]);
|
614
|
+
function Lu(e) {
|
615
|
+
if (typeof e == "string") return U;
|
616
|
+
if (Array.isArray(e)) return W;
|
617
|
+
if (!e) return;
|
618
|
+
let { type: t } = e;
|
619
|
+
if (Ue.has(t)) return t;
|
620
|
+
}
|
621
|
+
var G = Lu;
|
622
|
+
var Pu = (e) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(e);
|
623
|
+
function Iu(e) {
|
624
|
+
let t = e === null ? "null" : typeof e;
|
625
|
+
if (t !== "string" && t !== "object")
|
626
|
+
return `Unexpected doc '${t}',
|
627
|
+
Expected it to be 'string' or 'object'.`;
|
628
|
+
if (G(e)) throw new Error("doc is valid.");
|
629
|
+
let r = Object.prototype.toString.call(e);
|
630
|
+
if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
|
631
|
+
let n = Pu([...Ue].map((o) => `'${o}'`));
|
632
|
+
return `Unexpected doc.type '${e.type}'.
|
633
|
+
Expected it to be ${n}.`;
|
634
|
+
}
|
635
|
+
var xt = class extends Error {
|
636
|
+
name = "InvalidDocError";
|
637
|
+
constructor(t) {
|
638
|
+
super(Iu(t)), (this.doc = t);
|
639
|
+
}
|
640
|
+
},
|
641
|
+
Q = xt;
|
642
|
+
var Er = {};
|
643
|
+
function Ru(e, t, r, n) {
|
644
|
+
let o = [e];
|
645
|
+
for (; o.length > 0; ) {
|
646
|
+
let u = o.pop();
|
647
|
+
if (u === Er) {
|
648
|
+
r(o.pop());
|
649
|
+
continue;
|
650
|
+
}
|
651
|
+
r && o.push(u, Er);
|
652
|
+
let i = G(u);
|
653
|
+
if (!i) throw new Q(u);
|
654
|
+
if ((t == null ? void 0 : t(u)) !== !1)
|
655
|
+
switch (i) {
|
656
|
+
case W:
|
657
|
+
case S: {
|
658
|
+
let s = i === W ? u : u.parts;
|
659
|
+
for (let a = s.length, D = a - 1; D >= 0; --D) o.push(s[D]);
|
660
|
+
break;
|
661
|
+
}
|
662
|
+
case _:
|
663
|
+
o.push(u.flatContents, u.breakContents);
|
664
|
+
break;
|
665
|
+
case x:
|
666
|
+
if (n && u.expandedStates)
|
667
|
+
for (let s = u.expandedStates.length, a = s - 1; a >= 0; --a)
|
668
|
+
o.push(u.expandedStates[a]);
|
669
|
+
else o.push(u.contents);
|
670
|
+
break;
|
671
|
+
case P:
|
672
|
+
case L:
|
673
|
+
case R:
|
674
|
+
case N:
|
675
|
+
case Y:
|
676
|
+
o.push(u.contents);
|
677
|
+
break;
|
678
|
+
case U:
|
679
|
+
case z:
|
680
|
+
case I:
|
681
|
+
case j:
|
682
|
+
case B:
|
683
|
+
case b:
|
684
|
+
break;
|
685
|
+
default:
|
686
|
+
throw new Q(u);
|
687
|
+
}
|
688
|
+
}
|
689
|
+
}
|
690
|
+
var we = Ru;
|
691
|
+
var hr = () => {},
|
692
|
+
K = hr,
|
693
|
+
ze = hr;
|
694
|
+
function De(e) {
|
695
|
+
return K(e), { type: L, contents: e };
|
696
|
+
}
|
697
|
+
function ae(e, t) {
|
698
|
+
return K(t), { type: P, contents: t, n: e };
|
699
|
+
}
|
700
|
+
function _t(e, t = {}) {
|
701
|
+
return (
|
702
|
+
K(e),
|
703
|
+
ze(t.expandedStates, !0),
|
704
|
+
{
|
705
|
+
type: x,
|
706
|
+
id: t.id,
|
707
|
+
contents: e,
|
708
|
+
break: !!t.shouldBreak,
|
709
|
+
expandedStates: t.expandedStates,
|
710
|
+
}
|
711
|
+
);
|
712
|
+
}
|
713
|
+
function Cr(e) {
|
714
|
+
return ae(Number.NEGATIVE_INFINITY, e);
|
715
|
+
}
|
716
|
+
function gr(e) {
|
717
|
+
return ae({ type: "root" }, e);
|
718
|
+
}
|
719
|
+
function yr(e) {
|
720
|
+
return ae(-1, e);
|
721
|
+
}
|
722
|
+
function Ar(e, t) {
|
723
|
+
return _t(e[0], { ...t, expandedStates: e });
|
724
|
+
}
|
725
|
+
function Ge(e) {
|
726
|
+
return ze(e), { type: S, parts: e };
|
727
|
+
}
|
728
|
+
function Br(e, t = "", r = {}) {
|
729
|
+
return (
|
730
|
+
K(e),
|
731
|
+
t !== "" && K(t),
|
732
|
+
{ type: _, breakContents: e, flatContents: t, groupId: r.groupId }
|
733
|
+
);
|
734
|
+
}
|
735
|
+
function wr(e, t) {
|
736
|
+
return K(e), { type: R, contents: e, groupId: t.groupId, negate: t.negate };
|
737
|
+
}
|
738
|
+
function xe(e) {
|
739
|
+
return K(e), { type: Y, contents: e };
|
740
|
+
}
|
741
|
+
var xr = { type: j },
|
742
|
+
de = { type: b },
|
743
|
+
_r = { type: I },
|
744
|
+
_e = { type: B, hard: !0 },
|
745
|
+
vt = { type: B, hard: !0, literal: !0 },
|
746
|
+
Ke = { type: B },
|
747
|
+
vr = { type: B, soft: !0 },
|
748
|
+
q = [_e, de],
|
749
|
+
qe = [vt, de],
|
750
|
+
ve = { type: z };
|
751
|
+
function be(e, t) {
|
752
|
+
K(e), ze(t);
|
753
|
+
let r = [];
|
754
|
+
for (let n = 0; n < t.length; n++) n !== 0 && r.push(e), r.push(t[n]);
|
755
|
+
return r;
|
756
|
+
}
|
757
|
+
function Je(e, t, r) {
|
758
|
+
K(e);
|
759
|
+
let n = e;
|
760
|
+
if (t > 0) {
|
761
|
+
for (let o = 0; o < Math.floor(t / r); ++o) n = De(n);
|
762
|
+
(n = ae(t % r, n)), (n = ae(Number.NEGATIVE_INFINITY, n));
|
763
|
+
}
|
764
|
+
return n;
|
765
|
+
}
|
766
|
+
function br(e, t) {
|
767
|
+
return K(t), e ? { type: N, label: e, contents: t } : t;
|
768
|
+
}
|
769
|
+
function ee(e) {
|
770
|
+
var t;
|
771
|
+
if (!e) return "";
|
772
|
+
if (Array.isArray(e)) {
|
773
|
+
let r = [];
|
774
|
+
for (let n of e)
|
775
|
+
if (Array.isArray(n)) r.push(...ee(n));
|
776
|
+
else {
|
777
|
+
let o = ee(n);
|
778
|
+
o !== "" && r.push(o);
|
779
|
+
}
|
780
|
+
return r;
|
781
|
+
}
|
782
|
+
return e.type === _
|
783
|
+
? {
|
784
|
+
...e,
|
785
|
+
breakContents: ee(e.breakContents),
|
786
|
+
flatContents: ee(e.flatContents),
|
787
|
+
}
|
788
|
+
: e.type === x
|
789
|
+
? {
|
790
|
+
...e,
|
791
|
+
contents: ee(e.contents),
|
792
|
+
expandedStates: (t = e.expandedStates) == null ? void 0 : t.map(ee),
|
793
|
+
}
|
794
|
+
: e.type === S
|
795
|
+
? { type: "fill", parts: e.parts.map(ee) }
|
796
|
+
: e.contents
|
797
|
+
? { ...e, contents: ee(e.contents) }
|
798
|
+
: e;
|
799
|
+
}
|
800
|
+
function Or(e) {
|
801
|
+
let t = Object.create(null),
|
802
|
+
r = new Set();
|
803
|
+
return n(ee(e));
|
804
|
+
function n(u, i, s) {
|
805
|
+
var a, D;
|
806
|
+
if (typeof u == "string") return JSON.stringify(u);
|
807
|
+
if (Array.isArray(u)) {
|
808
|
+
let l = u.map(n).filter(Boolean);
|
809
|
+
return l.length === 1 ? l[0] : `[${l.join(", ")}]`;
|
810
|
+
}
|
811
|
+
if (u.type === B) {
|
812
|
+
let l =
|
813
|
+
((a = s == null ? void 0 : s[i + 1]) == null ? void 0 : a.type) === b;
|
814
|
+
return u.literal
|
815
|
+
? l
|
816
|
+
? "literalline"
|
817
|
+
: "literallineWithoutBreakParent"
|
818
|
+
: u.hard
|
819
|
+
? l
|
820
|
+
? "hardline"
|
821
|
+
: "hardlineWithoutBreakParent"
|
822
|
+
: u.soft
|
823
|
+
? "softline"
|
824
|
+
: "line";
|
825
|
+
}
|
826
|
+
if (u.type === b)
|
827
|
+
return ((D = s == null ? void 0 : s[i - 1]) == null ? void 0 : D.type) ===
|
828
|
+
B && s[i - 1].hard
|
829
|
+
? void 0
|
830
|
+
: "breakParent";
|
831
|
+
if (u.type === I) return "trim";
|
832
|
+
if (u.type === L) return "indent(" + n(u.contents) + ")";
|
833
|
+
if (u.type === P)
|
834
|
+
return u.n === Number.NEGATIVE_INFINITY
|
835
|
+
? "dedentToRoot(" + n(u.contents) + ")"
|
836
|
+
: u.n < 0
|
837
|
+
? "dedent(" + n(u.contents) + ")"
|
838
|
+
: u.n.type === "root"
|
839
|
+
? "markAsRoot(" + n(u.contents) + ")"
|
840
|
+
: "align(" + JSON.stringify(u.n) + ", " + n(u.contents) + ")";
|
841
|
+
if (u.type === _)
|
842
|
+
return (
|
843
|
+
"ifBreak(" +
|
844
|
+
n(u.breakContents) +
|
845
|
+
(u.flatContents ? ", " + n(u.flatContents) : "") +
|
846
|
+
(u.groupId
|
847
|
+
? (u.flatContents ? "" : ', ""') + `, { groupId: ${o(u.groupId)} }`
|
848
|
+
: "") +
|
849
|
+
")"
|
850
|
+
);
|
851
|
+
if (u.type === R) {
|
852
|
+
let l = [];
|
853
|
+
u.negate && l.push("negate: true"),
|
854
|
+
u.groupId && l.push(`groupId: ${o(u.groupId)}`);
|
855
|
+
let d = l.length > 0 ? `, { ${l.join(", ")} }` : "";
|
856
|
+
return `indentIfBreak(${n(u.contents)}${d})`;
|
857
|
+
}
|
858
|
+
if (u.type === x) {
|
859
|
+
let l = [];
|
860
|
+
u.break && u.break !== "propagated" && l.push("shouldBreak: true"),
|
861
|
+
u.id && l.push(`id: ${o(u.id)}`);
|
862
|
+
let d = l.length > 0 ? `, { ${l.join(", ")} }` : "";
|
863
|
+
return u.expandedStates
|
864
|
+
? `conditionalGroup([${u.expandedStates.map((f) => n(f)).join(",")}]${d})`
|
865
|
+
: `group(${n(u.contents)}${d})`;
|
866
|
+
}
|
867
|
+
if (u.type === S) return `fill([${u.parts.map((l) => n(l)).join(", ")}])`;
|
868
|
+
if (u.type === Y) return "lineSuffix(" + n(u.contents) + ")";
|
869
|
+
if (u.type === j) return "lineSuffixBoundary";
|
870
|
+
if (u.type === N)
|
871
|
+
return `label(${JSON.stringify(u.label)}, ${n(u.contents)})`;
|
872
|
+
throw new Error("Unknown doc type " + u.type);
|
873
|
+
}
|
874
|
+
function o(u) {
|
875
|
+
if (typeof u != "symbol") return JSON.stringify(String(u));
|
876
|
+
if (u in t) return t[u];
|
877
|
+
let i = u.description || "symbol";
|
878
|
+
for (let s = 0; ; s++) {
|
879
|
+
let a = i + (s > 0 ? ` #${s}` : "");
|
880
|
+
if (!r.has(a))
|
881
|
+
return r.add(a), (t[u] = `Symbol.for(${JSON.stringify(a)})`);
|
882
|
+
}
|
883
|
+
}
|
884
|
+
}
|
885
|
+
var Yu = (e, t, r) => {
|
886
|
+
if (!(e && t == null))
|
887
|
+
return Array.isArray(t) || typeof t == "string"
|
888
|
+
? t[r < 0 ? t.length + r : r]
|
889
|
+
: t.at(r);
|
890
|
+
},
|
891
|
+
y = Yu;
|
892
|
+
var Sr = () =>
|
893
|
+
/[#*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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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-\uDDF5\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\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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-\uDED7\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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\uDD3D\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-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\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]|\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\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]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\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;
|
894
|
+
function Nr(e) {
|
895
|
+
return (
|
896
|
+
e === 12288 || (e >= 65281 && e <= 65376) || (e >= 65504 && e <= 65510)
|
897
|
+
);
|
898
|
+
}
|
899
|
+
function Tr(e) {
|
900
|
+
return (
|
901
|
+
(e >= 4352 && e <= 4447) ||
|
902
|
+
e === 8986 ||
|
903
|
+
e === 8987 ||
|
904
|
+
e === 9001 ||
|
905
|
+
e === 9002 ||
|
906
|
+
(e >= 9193 && e <= 9196) ||
|
907
|
+
e === 9200 ||
|
908
|
+
e === 9203 ||
|
909
|
+
e === 9725 ||
|
910
|
+
e === 9726 ||
|
911
|
+
e === 9748 ||
|
912
|
+
e === 9749 ||
|
913
|
+
(e >= 9800 && e <= 9811) ||
|
914
|
+
e === 9855 ||
|
915
|
+
e === 9875 ||
|
916
|
+
e === 9889 ||
|
917
|
+
e === 9898 ||
|
918
|
+
e === 9899 ||
|
919
|
+
e === 9917 ||
|
920
|
+
e === 9918 ||
|
921
|
+
e === 9924 ||
|
922
|
+
e === 9925 ||
|
923
|
+
e === 9934 ||
|
924
|
+
e === 9940 ||
|
925
|
+
e === 9962 ||
|
926
|
+
e === 9970 ||
|
927
|
+
e === 9971 ||
|
928
|
+
e === 9973 ||
|
929
|
+
e === 9978 ||
|
930
|
+
e === 9981 ||
|
931
|
+
e === 9989 ||
|
932
|
+
e === 9994 ||
|
933
|
+
e === 9995 ||
|
934
|
+
e === 10024 ||
|
935
|
+
e === 10060 ||
|
936
|
+
e === 10062 ||
|
937
|
+
(e >= 10067 && e <= 10069) ||
|
938
|
+
e === 10071 ||
|
939
|
+
(e >= 10133 && e <= 10135) ||
|
940
|
+
e === 10160 ||
|
941
|
+
e === 10175 ||
|
942
|
+
e === 11035 ||
|
943
|
+
e === 11036 ||
|
944
|
+
e === 11088 ||
|
945
|
+
e === 11093 ||
|
946
|
+
(e >= 11904 && e <= 11929) ||
|
947
|
+
(e >= 11931 && e <= 12019) ||
|
948
|
+
(e >= 12032 && e <= 12245) ||
|
949
|
+
(e >= 12272 && e <= 12287) ||
|
950
|
+
(e >= 12289 && e <= 12350) ||
|
951
|
+
(e >= 12353 && e <= 12438) ||
|
952
|
+
(e >= 12441 && e <= 12543) ||
|
953
|
+
(e >= 12549 && e <= 12591) ||
|
954
|
+
(e >= 12593 && e <= 12686) ||
|
955
|
+
(e >= 12688 && e <= 12771) ||
|
956
|
+
(e >= 12783 && e <= 12830) ||
|
957
|
+
(e >= 12832 && e <= 12871) ||
|
958
|
+
(e >= 12880 && e <= 19903) ||
|
959
|
+
(e >= 19968 && e <= 42124) ||
|
960
|
+
(e >= 42128 && e <= 42182) ||
|
961
|
+
(e >= 43360 && e <= 43388) ||
|
962
|
+
(e >= 44032 && e <= 55203) ||
|
963
|
+
(e >= 63744 && e <= 64255) ||
|
964
|
+
(e >= 65040 && e <= 65049) ||
|
965
|
+
(e >= 65072 && e <= 65106) ||
|
966
|
+
(e >= 65108 && e <= 65126) ||
|
967
|
+
(e >= 65128 && e <= 65131) ||
|
968
|
+
(e >= 94176 && e <= 94180) ||
|
969
|
+
e === 94192 ||
|
970
|
+
e === 94193 ||
|
971
|
+
(e >= 94208 && e <= 100343) ||
|
972
|
+
(e >= 100352 && e <= 101589) ||
|
973
|
+
(e >= 101632 && e <= 101640) ||
|
974
|
+
(e >= 110576 && e <= 110579) ||
|
975
|
+
(e >= 110581 && e <= 110587) ||
|
976
|
+
e === 110589 ||
|
977
|
+
e === 110590 ||
|
978
|
+
(e >= 110592 && e <= 110882) ||
|
979
|
+
e === 110898 ||
|
980
|
+
(e >= 110928 && e <= 110930) ||
|
981
|
+
e === 110933 ||
|
982
|
+
(e >= 110948 && e <= 110951) ||
|
983
|
+
(e >= 110960 && e <= 111355) ||
|
984
|
+
e === 126980 ||
|
985
|
+
e === 127183 ||
|
986
|
+
e === 127374 ||
|
987
|
+
(e >= 127377 && e <= 127386) ||
|
988
|
+
(e >= 127488 && e <= 127490) ||
|
989
|
+
(e >= 127504 && e <= 127547) ||
|
990
|
+
(e >= 127552 && e <= 127560) ||
|
991
|
+
e === 127568 ||
|
992
|
+
e === 127569 ||
|
993
|
+
(e >= 127584 && e <= 127589) ||
|
994
|
+
(e >= 127744 && e <= 127776) ||
|
995
|
+
(e >= 127789 && e <= 127797) ||
|
996
|
+
(e >= 127799 && e <= 127868) ||
|
997
|
+
(e >= 127870 && e <= 127891) ||
|
998
|
+
(e >= 127904 && e <= 127946) ||
|
999
|
+
(e >= 127951 && e <= 127955) ||
|
1000
|
+
(e >= 127968 && e <= 127984) ||
|
1001
|
+
e === 127988 ||
|
1002
|
+
(e >= 127992 && e <= 128062) ||
|
1003
|
+
e === 128064 ||
|
1004
|
+
(e >= 128066 && e <= 128252) ||
|
1005
|
+
(e >= 128255 && e <= 128317) ||
|
1006
|
+
(e >= 128331 && e <= 128334) ||
|
1007
|
+
(e >= 128336 && e <= 128359) ||
|
1008
|
+
e === 128378 ||
|
1009
|
+
e === 128405 ||
|
1010
|
+
e === 128406 ||
|
1011
|
+
e === 128420 ||
|
1012
|
+
(e >= 128507 && e <= 128591) ||
|
1013
|
+
(e >= 128640 && e <= 128709) ||
|
1014
|
+
e === 128716 ||
|
1015
|
+
(e >= 128720 && e <= 128722) ||
|
1016
|
+
(e >= 128725 && e <= 128727) ||
|
1017
|
+
(e >= 128732 && e <= 128735) ||
|
1018
|
+
e === 128747 ||
|
1019
|
+
e === 128748 ||
|
1020
|
+
(e >= 128756 && e <= 128764) ||
|
1021
|
+
(e >= 128992 && e <= 129003) ||
|
1022
|
+
e === 129008 ||
|
1023
|
+
(e >= 129292 && e <= 129338) ||
|
1024
|
+
(e >= 129340 && e <= 129349) ||
|
1025
|
+
(e >= 129351 && e <= 129535) ||
|
1026
|
+
(e >= 129648 && e <= 129660) ||
|
1027
|
+
(e >= 129664 && e <= 129672) ||
|
1028
|
+
(e >= 129680 && e <= 129725) ||
|
1029
|
+
(e >= 129727 && e <= 129733) ||
|
1030
|
+
(e >= 129742 && e <= 129755) ||
|
1031
|
+
(e >= 129760 && e <= 129768) ||
|
1032
|
+
(e >= 129776 && e <= 129784) ||
|
1033
|
+
(e >= 131072 && e <= 196605) ||
|
1034
|
+
(e >= 196608 && e <= 262141)
|
1035
|
+
);
|
1036
|
+
}
|
1037
|
+
var kr = (e) => !(Nr(e) || Tr(e));
|
1038
|
+
var ju = /[^\x20-\x7F]/u;
|
1039
|
+
function Hu(e) {
|
1040
|
+
if (!e) return 0;
|
1041
|
+
if (!ju.test(e)) return e.length;
|
1042
|
+
e = e.replace(Sr(), " ");
|
1043
|
+
let t = 0;
|
1044
|
+
for (let r of e) {
|
1045
|
+
let n = r.codePointAt(0);
|
1046
|
+
n <= 31 ||
|
1047
|
+
(n >= 127 && n <= 159) ||
|
1048
|
+
(n >= 768 && n <= 879) ||
|
1049
|
+
(t += kr(n) ? 1 : 2);
|
1050
|
+
}
|
1051
|
+
return t;
|
1052
|
+
}
|
1053
|
+
var Oe = Hu;
|
1054
|
+
function Ne(e, t) {
|
1055
|
+
if (typeof e == "string") return t(e);
|
1056
|
+
let r = new Map();
|
1057
|
+
return n(e);
|
1058
|
+
function n(u) {
|
1059
|
+
if (r.has(u)) return r.get(u);
|
1060
|
+
let i = o(u);
|
1061
|
+
return r.set(u, i), i;
|
1062
|
+
}
|
1063
|
+
function o(u) {
|
1064
|
+
switch (G(u)) {
|
1065
|
+
case W:
|
1066
|
+
return t(u.map(n));
|
1067
|
+
case S:
|
1068
|
+
return t({ ...u, parts: u.parts.map(n) });
|
1069
|
+
case _:
|
1070
|
+
return t({
|
1071
|
+
...u,
|
1072
|
+
breakContents: n(u.breakContents),
|
1073
|
+
flatContents: n(u.flatContents),
|
1074
|
+
});
|
1075
|
+
case x: {
|
1076
|
+
let { expandedStates: i, contents: s } = u;
|
1077
|
+
return (
|
1078
|
+
i ? ((i = i.map(n)), (s = i[0])) : (s = n(s)),
|
1079
|
+
t({ ...u, contents: s, expandedStates: i })
|
1080
|
+
);
|
1081
|
+
}
|
1082
|
+
case P:
|
1083
|
+
case L:
|
1084
|
+
case R:
|
1085
|
+
case N:
|
1086
|
+
case Y:
|
1087
|
+
return t({ ...u, contents: n(u.contents) });
|
1088
|
+
case U:
|
1089
|
+
case z:
|
1090
|
+
case I:
|
1091
|
+
case j:
|
1092
|
+
case B:
|
1093
|
+
case b:
|
1094
|
+
return t(u);
|
1095
|
+
default:
|
1096
|
+
throw new Q(u);
|
1097
|
+
}
|
1098
|
+
}
|
1099
|
+
}
|
1100
|
+
function Xe(e, t, r) {
|
1101
|
+
let n = r,
|
1102
|
+
o = !1;
|
1103
|
+
function u(i) {
|
1104
|
+
if (o) return !1;
|
1105
|
+
let s = t(i);
|
1106
|
+
s !== void 0 && ((o = !0), (n = s));
|
1107
|
+
}
|
1108
|
+
return we(e, u), n;
|
1109
|
+
}
|
1110
|
+
function Wu(e) {
|
1111
|
+
if ((e.type === x && e.break) || (e.type === B && e.hard) || e.type === b)
|
1112
|
+
return !0;
|
1113
|
+
}
|
1114
|
+
function Ir(e) {
|
1115
|
+
return Xe(e, Wu, !1);
|
1116
|
+
}
|
1117
|
+
function Lr(e) {
|
1118
|
+
if (e.length > 0) {
|
1119
|
+
let t = y(!1, e, -1);
|
1120
|
+
!t.expandedStates && !t.break && (t.break = "propagated");
|
1121
|
+
}
|
1122
|
+
return null;
|
1123
|
+
}
|
1124
|
+
function Rr(e) {
|
1125
|
+
let t = new Set(),
|
1126
|
+
r = [];
|
1127
|
+
function n(u) {
|
1128
|
+
if ((u.type === b && Lr(r), u.type === x)) {
|
1129
|
+
if ((r.push(u), t.has(u))) return !1;
|
1130
|
+
t.add(u);
|
1131
|
+
}
|
1132
|
+
}
|
1133
|
+
function o(u) {
|
1134
|
+
u.type === x && r.pop().break && Lr(r);
|
1135
|
+
}
|
1136
|
+
we(e, n, o, !0);
|
1137
|
+
}
|
1138
|
+
function Mu(e) {
|
1139
|
+
return e.type === B && !e.hard
|
1140
|
+
? e.soft
|
1141
|
+
? ""
|
1142
|
+
: " "
|
1143
|
+
: e.type === _
|
1144
|
+
? e.flatContents
|
1145
|
+
: e;
|
1146
|
+
}
|
1147
|
+
function Yr(e) {
|
1148
|
+
return Ne(e, Mu);
|
1149
|
+
}
|
1150
|
+
function Pr(e) {
|
1151
|
+
for (
|
1152
|
+
e = [...e];
|
1153
|
+
e.length >= 2 && y(!1, e, -2).type === B && y(!1, e, -1).type === b;
|
1154
|
+
|
1155
|
+
)
|
1156
|
+
e.length -= 2;
|
1157
|
+
if (e.length > 0) {
|
1158
|
+
let t = Se(y(!1, e, -1));
|
1159
|
+
e[e.length - 1] = t;
|
1160
|
+
}
|
1161
|
+
return e;
|
1162
|
+
}
|
1163
|
+
function Se(e) {
|
1164
|
+
switch (G(e)) {
|
1165
|
+
case L:
|
1166
|
+
case R:
|
1167
|
+
case x:
|
1168
|
+
case Y:
|
1169
|
+
case N: {
|
1170
|
+
let t = Se(e.contents);
|
1171
|
+
return { ...e, contents: t };
|
1172
|
+
}
|
1173
|
+
case _:
|
1174
|
+
return {
|
1175
|
+
...e,
|
1176
|
+
breakContents: Se(e.breakContents),
|
1177
|
+
flatContents: Se(e.flatContents),
|
1178
|
+
};
|
1179
|
+
case S:
|
1180
|
+
return { ...e, parts: Pr(e.parts) };
|
1181
|
+
case W:
|
1182
|
+
return Pr(e);
|
1183
|
+
case U:
|
1184
|
+
return e.replace(/[\n\r]*$/u, "");
|
1185
|
+
case P:
|
1186
|
+
case z:
|
1187
|
+
case I:
|
1188
|
+
case j:
|
1189
|
+
case B:
|
1190
|
+
case b:
|
1191
|
+
break;
|
1192
|
+
default:
|
1193
|
+
throw new Q(e);
|
1194
|
+
}
|
1195
|
+
return e;
|
1196
|
+
}
|
1197
|
+
function Ze(e) {
|
1198
|
+
return Se(Vu(e));
|
1199
|
+
}
|
1200
|
+
function $u(e) {
|
1201
|
+
switch (G(e)) {
|
1202
|
+
case S:
|
1203
|
+
if (e.parts.every((t) => t === "")) return "";
|
1204
|
+
break;
|
1205
|
+
case x:
|
1206
|
+
if (!e.contents && !e.id && !e.break && !e.expandedStates) return "";
|
1207
|
+
if (
|
1208
|
+
e.contents.type === x &&
|
1209
|
+
e.contents.id === e.id &&
|
1210
|
+
e.contents.break === e.break &&
|
1211
|
+
e.contents.expandedStates === e.expandedStates
|
1212
|
+
)
|
1213
|
+
return e.contents;
|
1214
|
+
break;
|
1215
|
+
case P:
|
1216
|
+
case L:
|
1217
|
+
case R:
|
1218
|
+
case Y:
|
1219
|
+
if (!e.contents) return "";
|
1220
|
+
break;
|
1221
|
+
case _:
|
1222
|
+
if (!e.flatContents && !e.breakContents) return "";
|
1223
|
+
break;
|
1224
|
+
case W: {
|
1225
|
+
let t = [];
|
1226
|
+
for (let r of e) {
|
1227
|
+
if (!r) continue;
|
1228
|
+
let [n, ...o] = Array.isArray(r) ? r : [r];
|
1229
|
+
typeof n == "string" && typeof y(!1, t, -1) == "string"
|
1230
|
+
? (t[t.length - 1] += n)
|
1231
|
+
: t.push(n),
|
1232
|
+
t.push(...o);
|
1233
|
+
}
|
1234
|
+
return t.length === 0 ? "" : t.length === 1 ? t[0] : t;
|
1235
|
+
}
|
1236
|
+
case U:
|
1237
|
+
case z:
|
1238
|
+
case I:
|
1239
|
+
case j:
|
1240
|
+
case B:
|
1241
|
+
case N:
|
1242
|
+
case b:
|
1243
|
+
break;
|
1244
|
+
default:
|
1245
|
+
throw new Q(e);
|
1246
|
+
}
|
1247
|
+
return e;
|
1248
|
+
}
|
1249
|
+
function Vu(e) {
|
1250
|
+
return Ne(e, (t) => $u(t));
|
1251
|
+
}
|
1252
|
+
function jr(e, t = qe) {
|
1253
|
+
return Ne(e, (r) =>
|
1254
|
+
typeof r == "string"
|
1255
|
+
? be(
|
1256
|
+
t,
|
1257
|
+
r.split(`
|
1258
|
+
`),
|
1259
|
+
)
|
1260
|
+
: r,
|
1261
|
+
);
|
1262
|
+
}
|
1263
|
+
function Uu(e) {
|
1264
|
+
if (e.type === B) return !0;
|
1265
|
+
}
|
1266
|
+
function Hr(e) {
|
1267
|
+
return Xe(e, Uu, !1);
|
1268
|
+
}
|
1269
|
+
function Qe(e, t) {
|
1270
|
+
return e.type === N ? { ...e, contents: t(e.contents) } : t(e);
|
1271
|
+
}
|
1272
|
+
var H = Symbol("MODE_BREAK"),
|
1273
|
+
J = Symbol("MODE_FLAT"),
|
1274
|
+
Te = Symbol("cursor");
|
1275
|
+
function Wr() {
|
1276
|
+
return { value: "", length: 0, queue: [] };
|
1277
|
+
}
|
1278
|
+
function zu(e, t) {
|
1279
|
+
return bt(e, { type: "indent" }, t);
|
1280
|
+
}
|
1281
|
+
function Gu(e, t, r) {
|
1282
|
+
return t === Number.NEGATIVE_INFINITY
|
1283
|
+
? e.root || Wr()
|
1284
|
+
: t < 0
|
1285
|
+
? bt(e, { type: "dedent" }, r)
|
1286
|
+
: t
|
1287
|
+
? t.type === "root"
|
1288
|
+
? { ...e, root: e }
|
1289
|
+
: bt(
|
1290
|
+
e,
|
1291
|
+
{
|
1292
|
+
type: typeof t == "string" ? "stringAlign" : "numberAlign",
|
1293
|
+
n: t,
|
1294
|
+
},
|
1295
|
+
r,
|
1296
|
+
)
|
1297
|
+
: e;
|
1298
|
+
}
|
1299
|
+
function bt(e, t, r) {
|
1300
|
+
let n = t.type === "dedent" ? e.queue.slice(0, -1) : [...e.queue, t],
|
1301
|
+
o = "",
|
1302
|
+
u = 0,
|
1303
|
+
i = 0,
|
1304
|
+
s = 0;
|
1305
|
+
for (let c of n)
|
1306
|
+
switch (c.type) {
|
1307
|
+
case "indent":
|
1308
|
+
l(), r.useTabs ? a(1) : D(r.tabWidth);
|
1309
|
+
break;
|
1310
|
+
case "stringAlign":
|
1311
|
+
l(), (o += c.n), (u += c.n.length);
|
1312
|
+
break;
|
1313
|
+
case "numberAlign":
|
1314
|
+
(i += 1), (s += c.n);
|
1315
|
+
break;
|
1316
|
+
default:
|
1317
|
+
throw new Error(`Unexpected type '${c.type}'`);
|
1318
|
+
}
|
1319
|
+
return f(), { ...e, value: o, length: u, queue: n };
|
1320
|
+
function a(c) {
|
1321
|
+
(o += " ".repeat(c)), (u += r.tabWidth * c);
|
1322
|
+
}
|
1323
|
+
function D(c) {
|
1324
|
+
(o += " ".repeat(c)), (u += c);
|
1325
|
+
}
|
1326
|
+
function l() {
|
1327
|
+
r.useTabs ? d() : f();
|
1328
|
+
}
|
1329
|
+
function d() {
|
1330
|
+
i > 0 && a(i), p();
|
1331
|
+
}
|
1332
|
+
function f() {
|
1333
|
+
s > 0 && D(s), p();
|
1334
|
+
}
|
1335
|
+
function p() {
|
1336
|
+
(i = 0), (s = 0);
|
1337
|
+
}
|
1338
|
+
}
|
1339
|
+
function Ot(e) {
|
1340
|
+
let t = 0,
|
1341
|
+
r = 0,
|
1342
|
+
n = e.length;
|
1343
|
+
e: for (; n--; ) {
|
1344
|
+
let o = e[n];
|
1345
|
+
if (o === Te) {
|
1346
|
+
r++;
|
1347
|
+
continue;
|
1348
|
+
}
|
1349
|
+
for (let u = o.length - 1; u >= 0; u--) {
|
1350
|
+
let i = o[u];
|
1351
|
+
if (i === " " || i === " ") t++;
|
1352
|
+
else {
|
1353
|
+
e[n] = o.slice(0, u + 1);
|
1354
|
+
break e;
|
1355
|
+
}
|
1356
|
+
}
|
1357
|
+
}
|
1358
|
+
if (t > 0 || r > 0) for (e.length = n + 1; r-- > 0; ) e.push(Te);
|
1359
|
+
return t;
|
1360
|
+
}
|
1361
|
+
function et(e, t, r, n, o, u) {
|
1362
|
+
if (r === Number.POSITIVE_INFINITY) return !0;
|
1363
|
+
let i = t.length,
|
1364
|
+
s = [e],
|
1365
|
+
a = [];
|
1366
|
+
for (; r >= 0; ) {
|
1367
|
+
if (s.length === 0) {
|
1368
|
+
if (i === 0) return !0;
|
1369
|
+
s.push(t[--i]);
|
1370
|
+
continue;
|
1371
|
+
}
|
1372
|
+
let { mode: D, doc: l } = s.pop(),
|
1373
|
+
d = G(l);
|
1374
|
+
switch (d) {
|
1375
|
+
case U:
|
1376
|
+
a.push(l), (r -= Oe(l));
|
1377
|
+
break;
|
1378
|
+
case W:
|
1379
|
+
case S: {
|
1380
|
+
let f = d === W ? l : l.parts;
|
1381
|
+
for (let p = f.length - 1; p >= 0; p--) s.push({ mode: D, doc: f[p] });
|
1382
|
+
break;
|
1383
|
+
}
|
1384
|
+
case L:
|
1385
|
+
case P:
|
1386
|
+
case R:
|
1387
|
+
case N:
|
1388
|
+
s.push({ mode: D, doc: l.contents });
|
1389
|
+
break;
|
1390
|
+
case I:
|
1391
|
+
r += Ot(a);
|
1392
|
+
break;
|
1393
|
+
case x: {
|
1394
|
+
if (u && l.break) return !1;
|
1395
|
+
let f = l.break ? H : D,
|
1396
|
+
p =
|
1397
|
+
l.expandedStates && f === H
|
1398
|
+
? y(!1, l.expandedStates, -1)
|
1399
|
+
: l.contents;
|
1400
|
+
s.push({ mode: f, doc: p });
|
1401
|
+
break;
|
1402
|
+
}
|
1403
|
+
case _: {
|
1404
|
+
let p =
|
1405
|
+
(l.groupId ? o[l.groupId] || J : D) === H
|
1406
|
+
? l.breakContents
|
1407
|
+
: l.flatContents;
|
1408
|
+
p && s.push({ mode: D, doc: p });
|
1409
|
+
break;
|
1410
|
+
}
|
1411
|
+
case B:
|
1412
|
+
if (D === H || l.hard) return !0;
|
1413
|
+
l.soft || (a.push(" "), r--);
|
1414
|
+
break;
|
1415
|
+
case Y:
|
1416
|
+
n = !0;
|
1417
|
+
break;
|
1418
|
+
case j:
|
1419
|
+
if (n) return !1;
|
1420
|
+
break;
|
1421
|
+
}
|
1422
|
+
}
|
1423
|
+
return !1;
|
1424
|
+
}
|
1425
|
+
function Fe(e, t) {
|
1426
|
+
let r = {},
|
1427
|
+
n = t.printWidth,
|
1428
|
+
o = Be(t.endOfLine),
|
1429
|
+
u = 0,
|
1430
|
+
i = [{ ind: Wr(), mode: H, doc: e }],
|
1431
|
+
s = [],
|
1432
|
+
a = !1,
|
1433
|
+
D = [],
|
1434
|
+
l = 0;
|
1435
|
+
for (Rr(e); i.length > 0; ) {
|
1436
|
+
let { ind: f, mode: p, doc: c } = i.pop();
|
1437
|
+
switch (G(c)) {
|
1438
|
+
case U: {
|
1439
|
+
let F =
|
1440
|
+
o !==
|
1441
|
+
`
|
1442
|
+
`
|
1443
|
+
? ne(
|
1444
|
+
!1,
|
1445
|
+
c,
|
1446
|
+
`
|
1447
|
+
`,
|
1448
|
+
o,
|
1449
|
+
)
|
1450
|
+
: c;
|
1451
|
+
s.push(F), i.length > 0 && (u += Oe(F));
|
1452
|
+
break;
|
1453
|
+
}
|
1454
|
+
case W:
|
1455
|
+
for (let F = c.length - 1; F >= 0; F--)
|
1456
|
+
i.push({ ind: f, mode: p, doc: c[F] });
|
1457
|
+
break;
|
1458
|
+
case z:
|
1459
|
+
if (l >= 2) throw new Error("There are too many 'cursor' in doc.");
|
1460
|
+
s.push(Te), l++;
|
1461
|
+
break;
|
1462
|
+
case L:
|
1463
|
+
i.push({ ind: zu(f, t), mode: p, doc: c.contents });
|
1464
|
+
break;
|
1465
|
+
case P:
|
1466
|
+
i.push({ ind: Gu(f, c.n, t), mode: p, doc: c.contents });
|
1467
|
+
break;
|
1468
|
+
case I:
|
1469
|
+
u -= Ot(s);
|
1470
|
+
break;
|
1471
|
+
case x:
|
1472
|
+
switch (p) {
|
1473
|
+
case J:
|
1474
|
+
if (!a) {
|
1475
|
+
i.push({ ind: f, mode: c.break ? H : J, doc: c.contents });
|
1476
|
+
break;
|
1477
|
+
}
|
1478
|
+
case H: {
|
1479
|
+
a = !1;
|
1480
|
+
let F = { ind: f, mode: J, doc: c.contents },
|
1481
|
+
m = n - u,
|
1482
|
+
E = D.length > 0;
|
1483
|
+
if (!c.break && et(F, i, m, E, r)) i.push(F);
|
1484
|
+
else if (c.expandedStates) {
|
1485
|
+
let A = y(!1, c.expandedStates, -1);
|
1486
|
+
if (c.break) {
|
1487
|
+
i.push({ ind: f, mode: H, doc: A });
|
1488
|
+
break;
|
1489
|
+
} else
|
1490
|
+
for (let w = 1; w < c.expandedStates.length + 1; w++)
|
1491
|
+
if (w >= c.expandedStates.length) {
|
1492
|
+
i.push({ ind: f, mode: H, doc: A });
|
1493
|
+
break;
|
1494
|
+
} else {
|
1495
|
+
let h = c.expandedStates[w],
|
1496
|
+
C = { ind: f, mode: J, doc: h };
|
1497
|
+
if (et(C, i, m, E, r)) {
|
1498
|
+
i.push(C);
|
1499
|
+
break;
|
1500
|
+
}
|
1501
|
+
}
|
1502
|
+
} else i.push({ ind: f, mode: H, doc: c.contents });
|
1503
|
+
break;
|
1504
|
+
}
|
1505
|
+
}
|
1506
|
+
c.id && (r[c.id] = y(!1, i, -1).mode);
|
1507
|
+
break;
|
1508
|
+
case S: {
|
1509
|
+
let F = n - u,
|
1510
|
+
{ parts: m } = c;
|
1511
|
+
if (m.length === 0) break;
|
1512
|
+
let [E, A] = m,
|
1513
|
+
w = { ind: f, mode: J, doc: E },
|
1514
|
+
h = { ind: f, mode: H, doc: E },
|
1515
|
+
C = et(w, [], F, D.length > 0, r, !0);
|
1516
|
+
if (m.length === 1) {
|
1517
|
+
C ? i.push(w) : i.push(h);
|
1518
|
+
break;
|
1519
|
+
}
|
1520
|
+
let k = { ind: f, mode: J, doc: A },
|
1521
|
+
v = { ind: f, mode: H, doc: A };
|
1522
|
+
if (m.length === 2) {
|
1523
|
+
C ? i.push(k, w) : i.push(v, h);
|
1524
|
+
break;
|
1525
|
+
}
|
1526
|
+
m.splice(0, 2);
|
1527
|
+
let $ = { ind: f, mode: p, doc: Ge(m) },
|
1528
|
+
ye = m[0];
|
1529
|
+
et({ ind: f, mode: J, doc: [E, A, ye] }, [], F, D.length > 0, r, !0)
|
1530
|
+
? i.push($, k, w)
|
1531
|
+
: C
|
1532
|
+
? i.push($, v, w)
|
1533
|
+
: i.push($, v, h);
|
1534
|
+
break;
|
1535
|
+
}
|
1536
|
+
case _:
|
1537
|
+
case R: {
|
1538
|
+
let F = c.groupId ? r[c.groupId] : p;
|
1539
|
+
if (F === H) {
|
1540
|
+
let m =
|
1541
|
+
c.type === _
|
1542
|
+
? c.breakContents
|
1543
|
+
: c.negate
|
1544
|
+
? c.contents
|
1545
|
+
: De(c.contents);
|
1546
|
+
m && i.push({ ind: f, mode: p, doc: m });
|
1547
|
+
}
|
1548
|
+
if (F === J) {
|
1549
|
+
let m =
|
1550
|
+
c.type === _
|
1551
|
+
? c.flatContents
|
1552
|
+
: c.negate
|
1553
|
+
? De(c.contents)
|
1554
|
+
: c.contents;
|
1555
|
+
m && i.push({ ind: f, mode: p, doc: m });
|
1556
|
+
}
|
1557
|
+
break;
|
1558
|
+
}
|
1559
|
+
case Y:
|
1560
|
+
D.push({ ind: f, mode: p, doc: c.contents });
|
1561
|
+
break;
|
1562
|
+
case j:
|
1563
|
+
D.length > 0 && i.push({ ind: f, mode: p, doc: _e });
|
1564
|
+
break;
|
1565
|
+
case B:
|
1566
|
+
switch (p) {
|
1567
|
+
case J:
|
1568
|
+
if (c.hard) a = !0;
|
1569
|
+
else {
|
1570
|
+
c.soft || (s.push(" "), (u += 1));
|
1571
|
+
break;
|
1572
|
+
}
|
1573
|
+
case H:
|
1574
|
+
if (D.length > 0) {
|
1575
|
+
i.push({ ind: f, mode: p, doc: c }, ...D.reverse()),
|
1576
|
+
(D.length = 0);
|
1577
|
+
break;
|
1578
|
+
}
|
1579
|
+
c.literal
|
1580
|
+
? f.root
|
1581
|
+
? (s.push(o, f.root.value), (u = f.root.length))
|
1582
|
+
: (s.push(o), (u = 0))
|
1583
|
+
: ((u -= Ot(s)), s.push(o + f.value), (u = f.length));
|
1584
|
+
break;
|
1585
|
+
}
|
1586
|
+
break;
|
1587
|
+
case N:
|
1588
|
+
i.push({ ind: f, mode: p, doc: c.contents });
|
1589
|
+
break;
|
1590
|
+
case b:
|
1591
|
+
break;
|
1592
|
+
default:
|
1593
|
+
throw new Q(c);
|
1594
|
+
}
|
1595
|
+
i.length === 0 && D.length > 0 && (i.push(...D.reverse()), (D.length = 0));
|
1596
|
+
}
|
1597
|
+
let d = s.indexOf(Te);
|
1598
|
+
if (d !== -1) {
|
1599
|
+
let f = s.indexOf(Te, d + 1),
|
1600
|
+
p = s.slice(0, d).join(""),
|
1601
|
+
c = s.slice(d + 1, f).join(""),
|
1602
|
+
F = s.slice(f + 1).join("");
|
1603
|
+
return {
|
1604
|
+
formatted: p + c + F,
|
1605
|
+
cursorNodeStart: p.length,
|
1606
|
+
cursorNodeText: c,
|
1607
|
+
};
|
1608
|
+
}
|
1609
|
+
return { formatted: s.join("") };
|
1610
|
+
}
|
1611
|
+
function Ku(e, t, r = 0) {
|
1612
|
+
let n = 0;
|
1613
|
+
for (let o = r; o < e.length; ++o) e[o] === " " ? (n = n + t - (n % t)) : n++;
|
1614
|
+
return n;
|
1615
|
+
}
|
1616
|
+
var me = Ku;
|
1617
|
+
var te,
|
1618
|
+
Nt,
|
1619
|
+
tt,
|
1620
|
+
St = class {
|
1621
|
+
constructor(t) {
|
1622
|
+
Dr(this, te);
|
1623
|
+
this.stack = [t];
|
1624
|
+
}
|
1625
|
+
get key() {
|
1626
|
+
let { stack: t, siblings: r } = this;
|
1627
|
+
return y(!1, t, r === null ? -2 : -4) ?? null;
|
1628
|
+
}
|
1629
|
+
get index() {
|
1630
|
+
return this.siblings === null ? null : y(!1, this.stack, -2);
|
1631
|
+
}
|
1632
|
+
get node() {
|
1633
|
+
return y(!1, this.stack, -1);
|
1634
|
+
}
|
1635
|
+
get parent() {
|
1636
|
+
return this.getNode(1);
|
1637
|
+
}
|
1638
|
+
get grandparent() {
|
1639
|
+
return this.getNode(2);
|
1640
|
+
}
|
1641
|
+
get isInArray() {
|
1642
|
+
return this.siblings !== null;
|
1643
|
+
}
|
1644
|
+
get siblings() {
|
1645
|
+
let { stack: t } = this,
|
1646
|
+
r = y(!1, t, -3);
|
1647
|
+
return Array.isArray(r) ? r : null;
|
1648
|
+
}
|
1649
|
+
get next() {
|
1650
|
+
let { siblings: t } = this;
|
1651
|
+
return t === null ? null : t[this.index + 1];
|
1652
|
+
}
|
1653
|
+
get previous() {
|
1654
|
+
let { siblings: t } = this;
|
1655
|
+
return t === null ? null : t[this.index - 1];
|
1656
|
+
}
|
1657
|
+
get isFirst() {
|
1658
|
+
return this.index === 0;
|
1659
|
+
}
|
1660
|
+
get isLast() {
|
1661
|
+
let { siblings: t, index: r } = this;
|
1662
|
+
return t !== null && r === t.length - 1;
|
1663
|
+
}
|
1664
|
+
get isRoot() {
|
1665
|
+
return this.stack.length === 1;
|
1666
|
+
}
|
1667
|
+
get root() {
|
1668
|
+
return this.stack[0];
|
1669
|
+
}
|
1670
|
+
get ancestors() {
|
1671
|
+
return [...pe(this, te, tt).call(this)];
|
1672
|
+
}
|
1673
|
+
getName() {
|
1674
|
+
let { stack: t } = this,
|
1675
|
+
{ length: r } = t;
|
1676
|
+
return r > 1 ? y(!1, t, -2) : null;
|
1677
|
+
}
|
1678
|
+
getValue() {
|
1679
|
+
return y(!1, this.stack, -1);
|
1680
|
+
}
|
1681
|
+
getNode(t = 0) {
|
1682
|
+
let r = pe(this, te, Nt).call(this, t);
|
1683
|
+
return r === -1 ? null : this.stack[r];
|
1684
|
+
}
|
1685
|
+
getParentNode(t = 0) {
|
1686
|
+
return this.getNode(t + 1);
|
1687
|
+
}
|
1688
|
+
call(t, ...r) {
|
1689
|
+
let { stack: n } = this,
|
1690
|
+
{ length: o } = n,
|
1691
|
+
u = y(!1, n, -1);
|
1692
|
+
for (let i of r) (u = u[i]), n.push(i, u);
|
1693
|
+
try {
|
1694
|
+
return t(this);
|
1695
|
+
} finally {
|
1696
|
+
n.length = o;
|
1697
|
+
}
|
1698
|
+
}
|
1699
|
+
callParent(t, r = 0) {
|
1700
|
+
let n = pe(this, te, Nt).call(this, r + 1),
|
1701
|
+
o = this.stack.splice(n + 1);
|
1702
|
+
try {
|
1703
|
+
return t(this);
|
1704
|
+
} finally {
|
1705
|
+
this.stack.push(...o);
|
1706
|
+
}
|
1707
|
+
}
|
1708
|
+
each(t, ...r) {
|
1709
|
+
let { stack: n } = this,
|
1710
|
+
{ length: o } = n,
|
1711
|
+
u = y(!1, n, -1);
|
1712
|
+
for (let i of r) (u = u[i]), n.push(i, u);
|
1713
|
+
try {
|
1714
|
+
for (let i = 0; i < u.length; ++i)
|
1715
|
+
n.push(i, u[i]), t(this, i, u), (n.length -= 2);
|
1716
|
+
} finally {
|
1717
|
+
n.length = o;
|
1718
|
+
}
|
1719
|
+
}
|
1720
|
+
map(t, ...r) {
|
1721
|
+
let n = [];
|
1722
|
+
return (
|
1723
|
+
this.each(
|
1724
|
+
(o, u, i) => {
|
1725
|
+
n[u] = t(o, u, i);
|
1726
|
+
},
|
1727
|
+
...r,
|
1728
|
+
),
|
1729
|
+
n
|
1730
|
+
);
|
1731
|
+
}
|
1732
|
+
match(...t) {
|
1733
|
+
let r = this.stack.length - 1,
|
1734
|
+
n = null,
|
1735
|
+
o = this.stack[r--];
|
1736
|
+
for (let u of t) {
|
1737
|
+
if (o === void 0) return !1;
|
1738
|
+
let i = null;
|
1739
|
+
if (
|
1740
|
+
(typeof n == "number" &&
|
1741
|
+
((i = n), (n = this.stack[r--]), (o = this.stack[r--])),
|
1742
|
+
u && !u(o, n, i))
|
1743
|
+
)
|
1744
|
+
return !1;
|
1745
|
+
(n = this.stack[r--]), (o = this.stack[r--]);
|
1746
|
+
}
|
1747
|
+
return !0;
|
1748
|
+
}
|
1749
|
+
findAncestor(t) {
|
1750
|
+
for (let r of pe(this, te, tt).call(this)) if (t(r)) return r;
|
1751
|
+
}
|
1752
|
+
hasAncestor(t) {
|
1753
|
+
for (let r of pe(this, te, tt).call(this)) if (t(r)) return !0;
|
1754
|
+
return !1;
|
1755
|
+
}
|
1756
|
+
};
|
1757
|
+
(te = new WeakSet()),
|
1758
|
+
(Nt = function (t) {
|
1759
|
+
let { stack: r } = this;
|
1760
|
+
for (let n = r.length - 1; n >= 0; n -= 2)
|
1761
|
+
if (!Array.isArray(r[n]) && --t < 0) return n;
|
1762
|
+
return -1;
|
1763
|
+
}),
|
1764
|
+
(tt = function* () {
|
1765
|
+
let { stack: t } = this;
|
1766
|
+
for (let r = t.length - 3; r >= 0; r -= 2) {
|
1767
|
+
let n = t[r];
|
1768
|
+
Array.isArray(n) || (yield n);
|
1769
|
+
}
|
1770
|
+
});
|
1771
|
+
var Mr = St;
|
1772
|
+
var $r = new Proxy(() => {}, { get: () => $r }),
|
1773
|
+
ke = $r;
|
1774
|
+
function qu(e) {
|
1775
|
+
return e !== null && typeof e == "object";
|
1776
|
+
}
|
1777
|
+
var Vr = qu;
|
1778
|
+
function* Tt(e, t) {
|
1779
|
+
let { getVisitorKeys: r, filter: n = () => !0 } = t,
|
1780
|
+
o = (u) => Vr(u) && n(u);
|
1781
|
+
for (let u of r(e)) {
|
1782
|
+
let i = e[u];
|
1783
|
+
if (Array.isArray(i)) for (let s of i) o(s) && (yield s);
|
1784
|
+
else o(i) && (yield i);
|
1785
|
+
}
|
1786
|
+
}
|
1787
|
+
function* Ur(e, t) {
|
1788
|
+
let r = [e];
|
1789
|
+
for (let n = 0; n < r.length; n++) {
|
1790
|
+
let o = r[n];
|
1791
|
+
for (let u of Tt(o, t)) yield u, r.push(u);
|
1792
|
+
}
|
1793
|
+
}
|
1794
|
+
function Ee(e) {
|
1795
|
+
return (t, r, n) => {
|
1796
|
+
let o = !!(n != null && n.backwards);
|
1797
|
+
if (r === !1) return !1;
|
1798
|
+
let { length: u } = t,
|
1799
|
+
i = r;
|
1800
|
+
for (; i >= 0 && i < u; ) {
|
1801
|
+
let s = t.charAt(i);
|
1802
|
+
if (e instanceof RegExp) {
|
1803
|
+
if (!e.test(s)) return i;
|
1804
|
+
} else if (!e.includes(s)) return i;
|
1805
|
+
o ? i-- : i++;
|
1806
|
+
}
|
1807
|
+
return i === -1 || i === u ? i : !1;
|
1808
|
+
};
|
1809
|
+
}
|
1810
|
+
var zr = Ee(/\s/u),
|
1811
|
+
T = Ee(" "),
|
1812
|
+
rt = Ee(",; "),
|
1813
|
+
nt = Ee(/[^\n\r]/u);
|
1814
|
+
function Ju(e, t, r) {
|
1815
|
+
let n = !!(r != null && r.backwards);
|
1816
|
+
if (t === !1) return !1;
|
1817
|
+
let o = e.charAt(t);
|
1818
|
+
if (n) {
|
1819
|
+
if (
|
1820
|
+
e.charAt(t - 1) === "\r" &&
|
1821
|
+
o ===
|
1822
|
+
`
|
1823
|
+
`
|
1824
|
+
)
|
1825
|
+
return t - 2;
|
1826
|
+
if (
|
1827
|
+
o ===
|
1828
|
+
`
|
1829
|
+
` ||
|
1830
|
+
o === "\r" ||
|
1831
|
+
o === "\u2028" ||
|
1832
|
+
o === "\u2029"
|
1833
|
+
)
|
1834
|
+
return t - 1;
|
1835
|
+
} else {
|
1836
|
+
if (
|
1837
|
+
o === "\r" &&
|
1838
|
+
e.charAt(t + 1) ===
|
1839
|
+
`
|
1840
|
+
`
|
1841
|
+
)
|
1842
|
+
return t + 2;
|
1843
|
+
if (
|
1844
|
+
o ===
|
1845
|
+
`
|
1846
|
+
` ||
|
1847
|
+
o === "\r" ||
|
1848
|
+
o === "\u2028" ||
|
1849
|
+
o === "\u2029"
|
1850
|
+
)
|
1851
|
+
return t + 1;
|
1852
|
+
}
|
1853
|
+
return t;
|
1854
|
+
}
|
1855
|
+
var M = Ju;
|
1856
|
+
function Xu(e, t, r = {}) {
|
1857
|
+
let n = T(e, r.backwards ? t - 1 : t, r),
|
1858
|
+
o = M(e, n, r);
|
1859
|
+
return n !== o;
|
1860
|
+
}
|
1861
|
+
var V = Xu;
|
1862
|
+
function Zu(e) {
|
1863
|
+
return Array.isArray(e) && e.length > 0;
|
1864
|
+
}
|
1865
|
+
var kt = Zu;
|
1866
|
+
var Gr = new Set([
|
1867
|
+
"tokens",
|
1868
|
+
"comments",
|
1869
|
+
"parent",
|
1870
|
+
"enclosingNode",
|
1871
|
+
"precedingNode",
|
1872
|
+
"followingNode",
|
1873
|
+
]),
|
1874
|
+
Qu = (e) => Object.keys(e).filter((t) => !Gr.has(t));
|
1875
|
+
function eo(e) {
|
1876
|
+
return e ? (t) => e(t, Gr) : Qu;
|
1877
|
+
}
|
1878
|
+
var X = eo;
|
1879
|
+
function to(e) {
|
1880
|
+
let t = e.type || e.kind || "(unknown type)",
|
1881
|
+
r = String(
|
1882
|
+
e.name ||
|
1883
|
+
(e.id && (typeof e.id == "object" ? e.id.name : e.id)) ||
|
1884
|
+
(e.key && (typeof e.key == "object" ? e.key.name : e.key)) ||
|
1885
|
+
(e.value && (typeof e.value == "object" ? "" : String(e.value))) ||
|
1886
|
+
e.operator ||
|
1887
|
+
"",
|
1888
|
+
);
|
1889
|
+
return (
|
1890
|
+
r.length > 20 && (r = r.slice(0, 19) + "\u2026"), t + (r ? " " + r : "")
|
1891
|
+
);
|
1892
|
+
}
|
1893
|
+
function Lt(e, t) {
|
1894
|
+
(e.comments ?? (e.comments = [])).push(t),
|
1895
|
+
(t.printed = !1),
|
1896
|
+
(t.nodeDescription = to(e));
|
1897
|
+
}
|
1898
|
+
function ue(e, t) {
|
1899
|
+
(t.leading = !0), (t.trailing = !1), Lt(e, t);
|
1900
|
+
}
|
1901
|
+
function re(e, t, r) {
|
1902
|
+
(t.leading = !1), (t.trailing = !1), r && (t.marker = r), Lt(e, t);
|
1903
|
+
}
|
1904
|
+
function oe(e, t) {
|
1905
|
+
(t.leading = !1), (t.trailing = !0), Lt(e, t);
|
1906
|
+
}
|
1907
|
+
var Pt = new WeakMap();
|
1908
|
+
function ut(e, t) {
|
1909
|
+
if (Pt.has(e)) return Pt.get(e);
|
1910
|
+
let {
|
1911
|
+
printer: {
|
1912
|
+
getCommentChildNodes: r,
|
1913
|
+
canAttachComment: n,
|
1914
|
+
getVisitorKeys: o,
|
1915
|
+
},
|
1916
|
+
locStart: u,
|
1917
|
+
locEnd: i,
|
1918
|
+
} = t;
|
1919
|
+
if (!n) return [];
|
1920
|
+
let s = (
|
1921
|
+
(r == null ? void 0 : r(e, t)) ?? [...Tt(e, { getVisitorKeys: X(o) })]
|
1922
|
+
).flatMap((a) => (n(a) ? [a] : ut(a, t)));
|
1923
|
+
return s.sort((a, D) => u(a) - u(D) || i(a) - i(D)), Pt.set(e, s), s;
|
1924
|
+
}
|
1925
|
+
function qr(e, t, r, n) {
|
1926
|
+
let { locStart: o, locEnd: u } = r,
|
1927
|
+
i = o(t),
|
1928
|
+
s = u(t),
|
1929
|
+
a = ut(e, r),
|
1930
|
+
D,
|
1931
|
+
l,
|
1932
|
+
d = 0,
|
1933
|
+
f = a.length;
|
1934
|
+
for (; d < f; ) {
|
1935
|
+
let p = (d + f) >> 1,
|
1936
|
+
c = a[p],
|
1937
|
+
F = o(c),
|
1938
|
+
m = u(c);
|
1939
|
+
if (F <= i && s <= m) return qr(c, t, r, c);
|
1940
|
+
if (m <= i) {
|
1941
|
+
(D = c), (d = p + 1);
|
1942
|
+
continue;
|
1943
|
+
}
|
1944
|
+
if (s <= F) {
|
1945
|
+
(l = c), (f = p);
|
1946
|
+
continue;
|
1947
|
+
}
|
1948
|
+
throw new Error("Comment location overlaps with node location");
|
1949
|
+
}
|
1950
|
+
if ((n == null ? void 0 : n.type) === "TemplateLiteral") {
|
1951
|
+
let { quasis: p } = n,
|
1952
|
+
c = Rt(p, t, r);
|
1953
|
+
D && Rt(p, D, r) !== c && (D = null), l && Rt(p, l, r) !== c && (l = null);
|
1954
|
+
}
|
1955
|
+
return { enclosingNode: n, precedingNode: D, followingNode: l };
|
1956
|
+
}
|
1957
|
+
var It = () => !1;
|
1958
|
+
function Jr(e, t) {
|
1959
|
+
let { comments: r } = e;
|
1960
|
+
if ((delete e.comments, !kt(r) || !t.printer.canAttachComment)) return;
|
1961
|
+
let n = [],
|
1962
|
+
{
|
1963
|
+
locStart: o,
|
1964
|
+
locEnd: u,
|
1965
|
+
printer: {
|
1966
|
+
experimentalFeatures: { avoidAstMutation: i = !1 } = {},
|
1967
|
+
handleComments: s = {},
|
1968
|
+
},
|
1969
|
+
originalText: a,
|
1970
|
+
} = t,
|
1971
|
+
{ ownLine: D = It, endOfLine: l = It, remaining: d = It } = s,
|
1972
|
+
f = r.map((p, c) => ({
|
1973
|
+
...qr(e, p, t),
|
1974
|
+
comment: p,
|
1975
|
+
text: a,
|
1976
|
+
options: t,
|
1977
|
+
ast: e,
|
1978
|
+
isLastComment: r.length - 1 === c,
|
1979
|
+
}));
|
1980
|
+
for (let [p, c] of f.entries()) {
|
1981
|
+
let {
|
1982
|
+
comment: F,
|
1983
|
+
precedingNode: m,
|
1984
|
+
enclosingNode: E,
|
1985
|
+
followingNode: A,
|
1986
|
+
text: w,
|
1987
|
+
options: h,
|
1988
|
+
ast: C,
|
1989
|
+
isLastComment: k,
|
1990
|
+
} = c;
|
1991
|
+
if (
|
1992
|
+
h.parser === "json" ||
|
1993
|
+
h.parser === "json5" ||
|
1994
|
+
h.parser === "jsonc" ||
|
1995
|
+
h.parser === "__js_expression" ||
|
1996
|
+
h.parser === "__ts_expression" ||
|
1997
|
+
h.parser === "__vue_expression" ||
|
1998
|
+
h.parser === "__vue_ts_expression"
|
1999
|
+
) {
|
2000
|
+
if (o(F) - o(C) <= 0) {
|
2001
|
+
ue(C, F);
|
2002
|
+
continue;
|
2003
|
+
}
|
2004
|
+
if (u(F) - u(C) >= 0) {
|
2005
|
+
oe(C, F);
|
2006
|
+
continue;
|
2007
|
+
}
|
2008
|
+
}
|
2009
|
+
let v;
|
2010
|
+
if (
|
2011
|
+
(i
|
2012
|
+
? (v = [c])
|
2013
|
+
: ((F.enclosingNode = E),
|
2014
|
+
(F.precedingNode = m),
|
2015
|
+
(F.followingNode = A),
|
2016
|
+
(v = [F, w, h, C, k])),
|
2017
|
+
ro(w, h, f, p))
|
2018
|
+
)
|
2019
|
+
(F.placement = "ownLine"),
|
2020
|
+
D(...v) || (A ? ue(A, F) : m ? oe(m, F) : E ? re(E, F) : re(C, F));
|
2021
|
+
else if (no(w, h, f, p))
|
2022
|
+
(F.placement = "endOfLine"),
|
2023
|
+
l(...v) || (m ? oe(m, F) : A ? ue(A, F) : E ? re(E, F) : re(C, F));
|
2024
|
+
else if (((F.placement = "remaining"), !d(...v)))
|
2025
|
+
if (m && A) {
|
2026
|
+
let $ = n.length;
|
2027
|
+
$ > 0 && n[$ - 1].followingNode !== A && Kr(n, h), n.push(c);
|
2028
|
+
} else m ? oe(m, F) : A ? ue(A, F) : E ? re(E, F) : re(C, F);
|
2029
|
+
}
|
2030
|
+
if ((Kr(n, t), !i))
|
2031
|
+
for (let p of r)
|
2032
|
+
delete p.precedingNode, delete p.enclosingNode, delete p.followingNode;
|
2033
|
+
}
|
2034
|
+
var Xr = (e) => !/[\S\n\u2028\u2029]/u.test(e);
|
2035
|
+
function ro(e, t, r, n) {
|
2036
|
+
let { comment: o, precedingNode: u } = r[n],
|
2037
|
+
{ locStart: i, locEnd: s } = t,
|
2038
|
+
a = i(o);
|
2039
|
+
if (u)
|
2040
|
+
for (let D = n - 1; D >= 0; D--) {
|
2041
|
+
let { comment: l, precedingNode: d } = r[D];
|
2042
|
+
if (d !== u || !Xr(e.slice(s(l), a))) break;
|
2043
|
+
a = i(l);
|
2044
|
+
}
|
2045
|
+
return V(e, a, { backwards: !0 });
|
2046
|
+
}
|
2047
|
+
function no(e, t, r, n) {
|
2048
|
+
let { comment: o, followingNode: u } = r[n],
|
2049
|
+
{ locStart: i, locEnd: s } = t,
|
2050
|
+
a = s(o);
|
2051
|
+
if (u)
|
2052
|
+
for (let D = n + 1; D < r.length; D++) {
|
2053
|
+
let { comment: l, followingNode: d } = r[D];
|
2054
|
+
if (d !== u || !Xr(e.slice(a, i(l)))) break;
|
2055
|
+
a = s(l);
|
2056
|
+
}
|
2057
|
+
return V(e, a);
|
2058
|
+
}
|
2059
|
+
function Kr(e, t) {
|
2060
|
+
var s, a;
|
2061
|
+
let r = e.length;
|
2062
|
+
if (r === 0) return;
|
2063
|
+
let { precedingNode: n, followingNode: o } = e[0],
|
2064
|
+
u = t.locStart(o),
|
2065
|
+
i;
|
2066
|
+
for (i = r; i > 0; --i) {
|
2067
|
+
let { comment: D, precedingNode: l, followingNode: d } = e[i - 1];
|
2068
|
+
ke.strictEqual(l, n), ke.strictEqual(d, o);
|
2069
|
+
let f = t.originalText.slice(t.locEnd(D), u);
|
2070
|
+
if (
|
2071
|
+
((a = (s = t.printer).isGap) == null ? void 0 : a.call(s, f, t)) ??
|
2072
|
+
/^[\s(]*$/u.test(f)
|
2073
|
+
)
|
2074
|
+
u = t.locStart(D);
|
2075
|
+
else break;
|
2076
|
+
}
|
2077
|
+
for (let [D, { comment: l }] of e.entries()) D < i ? oe(n, l) : ue(o, l);
|
2078
|
+
for (let D of [n, o])
|
2079
|
+
D.comments &&
|
2080
|
+
D.comments.length > 1 &&
|
2081
|
+
D.comments.sort((l, d) => t.locStart(l) - t.locStart(d));
|
2082
|
+
e.length = 0;
|
2083
|
+
}
|
2084
|
+
function Rt(e, t, r) {
|
2085
|
+
let n = r.locStart(t) - 1;
|
2086
|
+
for (let o = 1; o < e.length; ++o) if (n < r.locStart(e[o])) return o - 1;
|
2087
|
+
return 0;
|
2088
|
+
}
|
2089
|
+
function uo(e, t) {
|
2090
|
+
let r = t - 1;
|
2091
|
+
(r = T(e, r, { backwards: !0 })),
|
2092
|
+
(r = M(e, r, { backwards: !0 })),
|
2093
|
+
(r = T(e, r, { backwards: !0 }));
|
2094
|
+
let n = M(e, r, { backwards: !0 });
|
2095
|
+
return r !== n;
|
2096
|
+
}
|
2097
|
+
var Le = uo;
|
2098
|
+
function Zr(e, t) {
|
2099
|
+
let r = e.node;
|
2100
|
+
return (r.printed = !0), t.printer.printComment(e, t);
|
2101
|
+
}
|
2102
|
+
function oo(e, t) {
|
2103
|
+
var l;
|
2104
|
+
let r = e.node,
|
2105
|
+
n = [Zr(e, t)],
|
2106
|
+
{ printer: o, originalText: u, locStart: i, locEnd: s } = t;
|
2107
|
+
if ((l = o.isBlockComment) == null ? void 0 : l.call(o, r)) {
|
2108
|
+
let d = V(u, s(r)) ? (V(u, i(r), { backwards: !0 }) ? q : Ke) : " ";
|
2109
|
+
n.push(d);
|
2110
|
+
} else n.push(q);
|
2111
|
+
let D = M(u, T(u, s(r)));
|
2112
|
+
return D !== !1 && V(u, D) && n.push(q), n;
|
2113
|
+
}
|
2114
|
+
function io(e, t, r) {
|
2115
|
+
var D;
|
2116
|
+
let n = e.node,
|
2117
|
+
o = Zr(e, t),
|
2118
|
+
{ printer: u, originalText: i, locStart: s } = t,
|
2119
|
+
a = (D = u.isBlockComment) == null ? void 0 : D.call(u, n);
|
2120
|
+
if (
|
2121
|
+
(r != null && r.hasLineSuffix && !(r != null && r.isBlock)) ||
|
2122
|
+
V(i, s(n), { backwards: !0 })
|
2123
|
+
) {
|
2124
|
+
let l = Le(i, s(n));
|
2125
|
+
return { doc: xe([q, l ? q : "", o]), isBlock: a, hasLineSuffix: !0 };
|
2126
|
+
}
|
2127
|
+
return !a || (r != null && r.hasLineSuffix)
|
2128
|
+
? { doc: [xe([" ", o]), de], isBlock: a, hasLineSuffix: !0 }
|
2129
|
+
: { doc: [" ", o], isBlock: a, hasLineSuffix: !1 };
|
2130
|
+
}
|
2131
|
+
function so(e, t) {
|
2132
|
+
let r = e.node;
|
2133
|
+
if (!r) return {};
|
2134
|
+
let n = t[Symbol.for("printedComments")];
|
2135
|
+
if ((r.comments || []).filter((a) => !n.has(a)).length === 0)
|
2136
|
+
return { leading: "", trailing: "" };
|
2137
|
+
let u = [],
|
2138
|
+
i = [],
|
2139
|
+
s;
|
2140
|
+
return (
|
2141
|
+
e.each(() => {
|
2142
|
+
let a = e.node;
|
2143
|
+
if (n != null && n.has(a)) return;
|
2144
|
+
let { leading: D, trailing: l } = a;
|
2145
|
+
D ? u.push(oo(e, t)) : l && ((s = io(e, t, s)), i.push(s.doc));
|
2146
|
+
}, "comments"),
|
2147
|
+
{ leading: u, trailing: i }
|
2148
|
+
);
|
2149
|
+
}
|
2150
|
+
function Qr(e, t, r) {
|
2151
|
+
let { leading: n, trailing: o } = so(e, r);
|
2152
|
+
return !n && !o ? t : Qe(t, (u) => [n, u, o]);
|
2153
|
+
}
|
2154
|
+
function en(e) {
|
2155
|
+
let { [Symbol.for("comments")]: t, [Symbol.for("printedComments")]: r } = e;
|
2156
|
+
for (let n of t) {
|
2157
|
+
if (!n.printed && !r.has(n))
|
2158
|
+
throw new Error(
|
2159
|
+
'Comment "' +
|
2160
|
+
n.value.trim() +
|
2161
|
+
'" was not printed. Please report this error!',
|
2162
|
+
);
|
2163
|
+
delete n.printed;
|
2164
|
+
}
|
2165
|
+
}
|
2166
|
+
function ao(e) {
|
2167
|
+
return () => {};
|
2168
|
+
}
|
2169
|
+
var tn = ao;
|
2170
|
+
var Pe = class extends Error {
|
2171
|
+
name = "ConfigError";
|
2172
|
+
},
|
2173
|
+
Ie = class extends Error {
|
2174
|
+
name = "UndefinedParserError";
|
2175
|
+
};
|
2176
|
+
var rn = {
|
2177
|
+
cursorOffset: {
|
2178
|
+
category: "Special",
|
2179
|
+
type: "int",
|
2180
|
+
default: -1,
|
2181
|
+
range: { start: -1, end: 1 / 0, step: 1 },
|
2182
|
+
description:
|
2183
|
+
"Print (to stderr) where a cursor at the given position would move to after formatting.",
|
2184
|
+
cliCategory: "Editor",
|
2185
|
+
},
|
2186
|
+
endOfLine: {
|
2187
|
+
category: "Global",
|
2188
|
+
type: "choice",
|
2189
|
+
default: "lf",
|
2190
|
+
description: "Which end of line characters to apply.",
|
2191
|
+
choices: [
|
2192
|
+
{
|
2193
|
+
value: "lf",
|
2194
|
+
description:
|
2195
|
+
"Line Feed only (\\n), common on Linux and macOS as well as inside git repos",
|
2196
|
+
},
|
2197
|
+
{
|
2198
|
+
value: "crlf",
|
2199
|
+
description:
|
2200
|
+
"Carriage Return + Line Feed characters (\\r\\n), common on Windows",
|
2201
|
+
},
|
2202
|
+
{
|
2203
|
+
value: "cr",
|
2204
|
+
description: "Carriage Return character only (\\r), used very rarely",
|
2205
|
+
},
|
2206
|
+
{
|
2207
|
+
value: "auto",
|
2208
|
+
description: `Maintain existing
|
2209
|
+
(mixed values within one file are normalised by looking at what's used after the first line)`,
|
2210
|
+
},
|
2211
|
+
],
|
2212
|
+
},
|
2213
|
+
filepath: {
|
2214
|
+
category: "Special",
|
2215
|
+
type: "path",
|
2216
|
+
description:
|
2217
|
+
"Specify the input filepath. This will be used to do parser inference.",
|
2218
|
+
cliName: "stdin-filepath",
|
2219
|
+
cliCategory: "Other",
|
2220
|
+
cliDescription: "Path to the file to pretend that stdin comes from.",
|
2221
|
+
},
|
2222
|
+
insertPragma: {
|
2223
|
+
category: "Special",
|
2224
|
+
type: "boolean",
|
2225
|
+
default: !1,
|
2226
|
+
description: "Insert @format pragma into file's first docblock comment.",
|
2227
|
+
cliCategory: "Other",
|
2228
|
+
},
|
2229
|
+
parser: {
|
2230
|
+
category: "Global",
|
2231
|
+
type: "choice",
|
2232
|
+
default: void 0,
|
2233
|
+
description: "Which parser to use.",
|
2234
|
+
exception: (e) => typeof e == "string" || typeof e == "function",
|
2235
|
+
choices: [
|
2236
|
+
{ value: "flow", description: "Flow" },
|
2237
|
+
{ value: "babel", description: "JavaScript" },
|
2238
|
+
{ value: "babel-flow", description: "Flow" },
|
2239
|
+
{ value: "babel-ts", description: "TypeScript" },
|
2240
|
+
{ value: "typescript", description: "TypeScript" },
|
2241
|
+
{ value: "acorn", description: "JavaScript" },
|
2242
|
+
{ value: "espree", description: "JavaScript" },
|
2243
|
+
{ value: "meriyah", description: "JavaScript" },
|
2244
|
+
{ value: "css", description: "CSS" },
|
2245
|
+
{ value: "less", description: "Less" },
|
2246
|
+
{ value: "scss", description: "SCSS" },
|
2247
|
+
{ value: "json", description: "JSON" },
|
2248
|
+
{ value: "json5", description: "JSON5" },
|
2249
|
+
{ value: "jsonc", description: "JSON with Comments" },
|
2250
|
+
{ value: "json-stringify", description: "JSON.stringify" },
|
2251
|
+
{ value: "graphql", description: "GraphQL" },
|
2252
|
+
{ value: "markdown", description: "Markdown" },
|
2253
|
+
{ value: "mdx", description: "MDX" },
|
2254
|
+
{ value: "vue", description: "Vue" },
|
2255
|
+
{ value: "yaml", description: "YAML" },
|
2256
|
+
{ value: "glimmer", description: "Ember / Handlebars" },
|
2257
|
+
{ value: "html", description: "HTML" },
|
2258
|
+
{ value: "angular", description: "Angular" },
|
2259
|
+
{ value: "lwc", description: "Lightning Web Components" },
|
2260
|
+
],
|
2261
|
+
},
|
2262
|
+
plugins: {
|
2263
|
+
type: "path",
|
2264
|
+
array: !0,
|
2265
|
+
default: [{ value: [] }],
|
2266
|
+
category: "Global",
|
2267
|
+
description:
|
2268
|
+
"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",
|
2269
|
+
exception: (e) => typeof e == "string" || typeof e == "object",
|
2270
|
+
cliName: "plugin",
|
2271
|
+
cliCategory: "Config",
|
2272
|
+
},
|
2273
|
+
printWidth: {
|
2274
|
+
category: "Global",
|
2275
|
+
type: "int",
|
2276
|
+
default: 80,
|
2277
|
+
description: "The line length where Prettier will try wrap.",
|
2278
|
+
range: { start: 0, end: 1 / 0, step: 1 },
|
2279
|
+
},
|
2280
|
+
rangeEnd: {
|
2281
|
+
category: "Special",
|
2282
|
+
type: "int",
|
2283
|
+
default: 1 / 0,
|
2284
|
+
range: { start: 0, end: 1 / 0, step: 1 },
|
2285
|
+
description: `Format code ending at a given character offset (exclusive).
|
2286
|
+
The range will extend forwards to the end of the selected statement.`,
|
2287
|
+
cliCategory: "Editor",
|
2288
|
+
},
|
2289
|
+
rangeStart: {
|
2290
|
+
category: "Special",
|
2291
|
+
type: "int",
|
2292
|
+
default: 0,
|
2293
|
+
range: { start: 0, end: 1 / 0, step: 1 },
|
2294
|
+
description: `Format code starting at a given character offset.
|
2295
|
+
The range will extend backwards to the start of the first line containing the selected statement.`,
|
2296
|
+
cliCategory: "Editor",
|
2297
|
+
},
|
2298
|
+
requirePragma: {
|
2299
|
+
category: "Special",
|
2300
|
+
type: "boolean",
|
2301
|
+
default: !1,
|
2302
|
+
description: `Require either '@prettier' or '@format' to be present in the file's first docblock comment
|
2303
|
+
in order for it to be formatted.`,
|
2304
|
+
cliCategory: "Other",
|
2305
|
+
},
|
2306
|
+
tabWidth: {
|
2307
|
+
type: "int",
|
2308
|
+
category: "Global",
|
2309
|
+
default: 2,
|
2310
|
+
description: "Number of spaces per indentation level.",
|
2311
|
+
range: { start: 0, end: 1 / 0, step: 1 },
|
2312
|
+
},
|
2313
|
+
useTabs: {
|
2314
|
+
category: "Global",
|
2315
|
+
type: "boolean",
|
2316
|
+
default: !1,
|
2317
|
+
description: "Indent with tabs instead of spaces.",
|
2318
|
+
},
|
2319
|
+
embeddedLanguageFormatting: {
|
2320
|
+
category: "Global",
|
2321
|
+
type: "choice",
|
2322
|
+
default: "auto",
|
2323
|
+
description:
|
2324
|
+
"Control how Prettier formats quoted code embedded in the file.",
|
2325
|
+
choices: [
|
2326
|
+
{
|
2327
|
+
value: "auto",
|
2328
|
+
description:
|
2329
|
+
"Format embedded code if Prettier can automatically identify it.",
|
2330
|
+
},
|
2331
|
+
{
|
2332
|
+
value: "off",
|
2333
|
+
description: "Never automatically format embedded code.",
|
2334
|
+
},
|
2335
|
+
],
|
2336
|
+
},
|
2337
|
+
};
|
2338
|
+
function ot({ plugins: e = [], showDeprecated: t = !1 } = {}) {
|
2339
|
+
let r = e.flatMap((o) => o.languages ?? []),
|
2340
|
+
n = [];
|
2341
|
+
for (let o of lo(Object.assign({}, ...e.map(({ options: u }) => u), rn)))
|
2342
|
+
(!t && o.deprecated) ||
|
2343
|
+
(Array.isArray(o.choices) &&
|
2344
|
+
(t || (o.choices = o.choices.filter((u) => !u.deprecated)),
|
2345
|
+
o.name === "parser" &&
|
2346
|
+
(o.choices = [...o.choices, ...Do(o.choices, r, e)])),
|
2347
|
+
(o.pluginDefaults = Object.fromEntries(
|
2348
|
+
e
|
2349
|
+
.filter((u) => {
|
2350
|
+
var i;
|
2351
|
+
return (
|
2352
|
+
((i = u.defaultOptions) == null ? void 0 : i[o.name]) !== void 0
|
2353
|
+
);
|
2354
|
+
})
|
2355
|
+
.map((u) => [u.name, u.defaultOptions[o.name]]),
|
2356
|
+
)),
|
2357
|
+
n.push(o));
|
2358
|
+
return { languages: r, options: n };
|
2359
|
+
}
|
2360
|
+
function* Do(e, t, r) {
|
2361
|
+
let n = new Set(e.map((o) => o.value));
|
2362
|
+
for (let o of t)
|
2363
|
+
if (o.parsers) {
|
2364
|
+
for (let u of o.parsers)
|
2365
|
+
if (!n.has(u)) {
|
2366
|
+
n.add(u);
|
2367
|
+
let i = r.find(
|
2368
|
+
(a) =>
|
2369
|
+
a.parsers && Object.prototype.hasOwnProperty.call(a.parsers, u),
|
2370
|
+
),
|
2371
|
+
s = o.name;
|
2372
|
+
i != null && i.name && (s += ` (plugin: ${i.name})`),
|
2373
|
+
yield { value: u, description: s };
|
2374
|
+
}
|
2375
|
+
}
|
2376
|
+
}
|
2377
|
+
function lo(e) {
|
2378
|
+
let t = [];
|
2379
|
+
for (let [r, n] of Object.entries(e)) {
|
2380
|
+
let o = { name: r, ...n };
|
2381
|
+
Array.isArray(o.default) && (o.default = y(!1, o.default, -1).value),
|
2382
|
+
t.push(o);
|
2383
|
+
}
|
2384
|
+
return t;
|
2385
|
+
}
|
2386
|
+
var co = (e) => String(e).split(/[/\\]/u).pop();
|
2387
|
+
function nn(e, t) {
|
2388
|
+
if (!t) return;
|
2389
|
+
let r = co(t).toLowerCase();
|
2390
|
+
return (
|
2391
|
+
e.find(({ filenames: n }) =>
|
2392
|
+
n == null ? void 0 : n.some((o) => o.toLowerCase() === r),
|
2393
|
+
) ??
|
2394
|
+
e.find(({ extensions: n }) =>
|
2395
|
+
n == null ? void 0 : n.some((o) => r.endsWith(o)),
|
2396
|
+
)
|
2397
|
+
);
|
2398
|
+
}
|
2399
|
+
function fo(e, t) {
|
2400
|
+
if (t)
|
2401
|
+
return (
|
2402
|
+
e.find(({ name: r }) => r.toLowerCase() === t) ??
|
2403
|
+
e.find(({ aliases: r }) => (r == null ? void 0 : r.includes(t))) ??
|
2404
|
+
e.find(({ extensions: r }) => (r == null ? void 0 : r.includes(`.${t}`)))
|
2405
|
+
);
|
2406
|
+
}
|
2407
|
+
function po(e, t) {
|
2408
|
+
let r = e.plugins.flatMap((o) => o.languages ?? []),
|
2409
|
+
n =
|
2410
|
+
fo(r, t.language) ??
|
2411
|
+
nn(r, t.physicalFile) ??
|
2412
|
+
nn(r, t.file) ??
|
2413
|
+
(t.physicalFile, void 0);
|
2414
|
+
return n == null ? void 0 : n.parsers[0];
|
2415
|
+
}
|
2416
|
+
var un = po;
|
2417
|
+
var ie = {
|
2418
|
+
key: (e) => (/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e) ? e : JSON.stringify(e)),
|
2419
|
+
value(e) {
|
2420
|
+
if (e === null || typeof e != "object") return JSON.stringify(e);
|
2421
|
+
if (Array.isArray(e)) return `[${e.map((r) => ie.value(r)).join(", ")}]`;
|
2422
|
+
let t = Object.keys(e);
|
2423
|
+
return t.length === 0
|
2424
|
+
? "{}"
|
2425
|
+
: `{ ${t.map((r) => `${ie.key(r)}: ${ie.value(e[r])}`).join(", ")} }`;
|
2426
|
+
},
|
2427
|
+
pair: ({ key: e, value: t }) => ie.value({ [e]: t }),
|
2428
|
+
};
|
2429
|
+
var Yt = Me(it(), 1),
|
2430
|
+
an = (e, t, { descriptor: r }) => {
|
2431
|
+
let n = [
|
2432
|
+
`${Yt.default.yellow(typeof e == "string" ? r.key(e) : r.pair(e))} is deprecated`,
|
2433
|
+
];
|
2434
|
+
return (
|
2435
|
+
t &&
|
2436
|
+
n.push(
|
2437
|
+
`we now treat it as ${Yt.default.blue(typeof t == "string" ? r.key(t) : r.pair(t))}`,
|
2438
|
+
),
|
2439
|
+
n.join("; ") + "."
|
2440
|
+
);
|
2441
|
+
};
|
2442
|
+
var le = Me(it(), 1);
|
2443
|
+
var st = Symbol.for("vnopts.VALUE_NOT_EXIST"),
|
2444
|
+
he = Symbol.for("vnopts.VALUE_UNCHANGED");
|
2445
|
+
var Dn = " ".repeat(2),
|
2446
|
+
cn = (e, t, r) => {
|
2447
|
+
let { text: n, list: o } = r.normalizeExpectedResult(
|
2448
|
+
r.schemas[e].expected(r),
|
2449
|
+
),
|
2450
|
+
u = [];
|
2451
|
+
return (
|
2452
|
+
n && u.push(ln(e, t, n, r.descriptor)),
|
2453
|
+
o &&
|
2454
|
+
u.push(
|
2455
|
+
[ln(e, t, o.title, r.descriptor)].concat(
|
2456
|
+
o.values.map((i) => fn(i, r.loggerPrintWidth)),
|
2457
|
+
).join(`
|
2458
|
+
`),
|
2459
|
+
),
|
2460
|
+
pn(u, r.loggerPrintWidth)
|
2461
|
+
);
|
2462
|
+
};
|
2463
|
+
function ln(e, t, r, n) {
|
2464
|
+
return [
|
2465
|
+
`Invalid ${le.default.red(n.key(e))} value.`,
|
2466
|
+
`Expected ${le.default.blue(r)},`,
|
2467
|
+
`but received ${t === st ? le.default.gray("nothing") : le.default.red(n.value(t))}.`,
|
2468
|
+
].join(" ");
|
2469
|
+
}
|
2470
|
+
function fn({ text: e, list: t }, r) {
|
2471
|
+
let n = [];
|
2472
|
+
return (
|
2473
|
+
e && n.push(`- ${le.default.blue(e)}`),
|
2474
|
+
t &&
|
2475
|
+
n.push(
|
2476
|
+
[`- ${le.default.blue(t.title)}:`].concat(
|
2477
|
+
t.values.map((o) => fn(o, r - Dn.length).replace(/^|\n/g, `$&${Dn}`)),
|
2478
|
+
).join(`
|
2479
|
+
`),
|
2480
|
+
),
|
2481
|
+
pn(n, r)
|
2482
|
+
);
|
2483
|
+
}
|
2484
|
+
function pn(e, t) {
|
2485
|
+
if (e.length === 1) return e[0];
|
2486
|
+
let [r, n] = e,
|
2487
|
+
[o, u] = e.map(
|
2488
|
+
(i) =>
|
2489
|
+
i.split(
|
2490
|
+
`
|
2491
|
+
`,
|
2492
|
+
1,
|
2493
|
+
)[0].length,
|
2494
|
+
);
|
2495
|
+
return o > t && o > u ? n : r;
|
2496
|
+
}
|
2497
|
+
var Wt = Me(it(), 1);
|
2498
|
+
var jt = [],
|
2499
|
+
dn = [];
|
2500
|
+
function Ht(e, t) {
|
2501
|
+
if (e === t) return 0;
|
2502
|
+
let r = e;
|
2503
|
+
e.length > t.length && ((e = t), (t = r));
|
2504
|
+
let n = e.length,
|
2505
|
+
o = t.length;
|
2506
|
+
for (; n > 0 && e.charCodeAt(~-n) === t.charCodeAt(~-o); ) n--, o--;
|
2507
|
+
let u = 0;
|
2508
|
+
for (; u < n && e.charCodeAt(u) === t.charCodeAt(u); ) u++;
|
2509
|
+
if (((n -= u), (o -= u), n === 0)) return o;
|
2510
|
+
let i,
|
2511
|
+
s,
|
2512
|
+
a,
|
2513
|
+
D,
|
2514
|
+
l = 0,
|
2515
|
+
d = 0;
|
2516
|
+
for (; l < n; ) (dn[l] = e.charCodeAt(u + l)), (jt[l] = ++l);
|
2517
|
+
for (; d < o; )
|
2518
|
+
for (i = t.charCodeAt(u + d), a = d++, s = d, l = 0; l < n; l++)
|
2519
|
+
(D = i === dn[l] ? a : a + 1),
|
2520
|
+
(a = jt[l]),
|
2521
|
+
(s = jt[l] = a > s ? (D > s ? s + 1 : D) : D > a ? a + 1 : D);
|
2522
|
+
return s;
|
2523
|
+
}
|
2524
|
+
var at = (e, t, { descriptor: r, logger: n, schemas: o }) => {
|
2525
|
+
let u = [
|
2526
|
+
`Ignored unknown option ${Wt.default.yellow(r.pair({ key: e, value: t }))}.`,
|
2527
|
+
],
|
2528
|
+
i = Object.keys(o)
|
2529
|
+
.sort()
|
2530
|
+
.find((s) => Ht(e, s) < 3);
|
2531
|
+
i && u.push(`Did you mean ${Wt.default.blue(r.key(i))}?`),
|
2532
|
+
n.warn(u.join(" "));
|
2533
|
+
};
|
2534
|
+
var Fo = [
|
2535
|
+
"default",
|
2536
|
+
"expected",
|
2537
|
+
"validate",
|
2538
|
+
"deprecated",
|
2539
|
+
"forward",
|
2540
|
+
"redirect",
|
2541
|
+
"overlap",
|
2542
|
+
"preprocess",
|
2543
|
+
"postprocess",
|
2544
|
+
];
|
2545
|
+
function mo(e, t) {
|
2546
|
+
let r = new e(t),
|
2547
|
+
n = Object.create(r);
|
2548
|
+
for (let o of Fo) o in t && (n[o] = Eo(t[o], r, O.prototype[o].length));
|
2549
|
+
return n;
|
2550
|
+
}
|
2551
|
+
var O = class {
|
2552
|
+
static create(t) {
|
2553
|
+
return mo(this, t);
|
2554
|
+
}
|
2555
|
+
constructor(t) {
|
2556
|
+
this.name = t.name;
|
2557
|
+
}
|
2558
|
+
default(t) {}
|
2559
|
+
expected(t) {
|
2560
|
+
return "nothing";
|
2561
|
+
}
|
2562
|
+
validate(t, r) {
|
2563
|
+
return !1;
|
2564
|
+
}
|
2565
|
+
deprecated(t, r) {
|
2566
|
+
return !1;
|
2567
|
+
}
|
2568
|
+
forward(t, r) {}
|
2569
|
+
redirect(t, r) {}
|
2570
|
+
overlap(t, r, n) {
|
2571
|
+
return t;
|
2572
|
+
}
|
2573
|
+
preprocess(t, r) {
|
2574
|
+
return t;
|
2575
|
+
}
|
2576
|
+
postprocess(t, r) {
|
2577
|
+
return he;
|
2578
|
+
}
|
2579
|
+
};
|
2580
|
+
function Eo(e, t, r) {
|
2581
|
+
return typeof e == "function"
|
2582
|
+
? (...n) => e(...n.slice(0, r - 1), t, ...n.slice(r - 1))
|
2583
|
+
: () => e;
|
2584
|
+
}
|
2585
|
+
var Dt = class extends O {
|
2586
|
+
constructor(t) {
|
2587
|
+
super(t), (this._sourceName = t.sourceName);
|
2588
|
+
}
|
2589
|
+
expected(t) {
|
2590
|
+
return t.schemas[this._sourceName].expected(t);
|
2591
|
+
}
|
2592
|
+
validate(t, r) {
|
2593
|
+
return r.schemas[this._sourceName].validate(t, r);
|
2594
|
+
}
|
2595
|
+
redirect(t, r) {
|
2596
|
+
return this._sourceName;
|
2597
|
+
}
|
2598
|
+
};
|
2599
|
+
var lt = class extends O {
|
2600
|
+
expected() {
|
2601
|
+
return "anything";
|
2602
|
+
}
|
2603
|
+
validate() {
|
2604
|
+
return !0;
|
2605
|
+
}
|
2606
|
+
};
|
2607
|
+
var ct = class extends O {
|
2608
|
+
constructor({ valueSchema: t, name: r = t.name, ...n }) {
|
2609
|
+
super({ ...n, name: r }), (this._valueSchema = t);
|
2610
|
+
}
|
2611
|
+
expected(t) {
|
2612
|
+
let { text: r, list: n } = t.normalizeExpectedResult(
|
2613
|
+
this._valueSchema.expected(t),
|
2614
|
+
);
|
2615
|
+
return {
|
2616
|
+
text: r && `an array of ${r}`,
|
2617
|
+
list: n && {
|
2618
|
+
title: "an array of the following values",
|
2619
|
+
values: [{ list: n }],
|
2620
|
+
},
|
2621
|
+
};
|
2622
|
+
}
|
2623
|
+
validate(t, r) {
|
2624
|
+
if (!Array.isArray(t)) return !1;
|
2625
|
+
let n = [];
|
2626
|
+
for (let o of t) {
|
2627
|
+
let u = r.normalizeValidateResult(this._valueSchema.validate(o, r), o);
|
2628
|
+
u !== !0 && n.push(u.value);
|
2629
|
+
}
|
2630
|
+
return n.length === 0 ? !0 : { value: n };
|
2631
|
+
}
|
2632
|
+
deprecated(t, r) {
|
2633
|
+
let n = [];
|
2634
|
+
for (let o of t) {
|
2635
|
+
let u = r.normalizeDeprecatedResult(
|
2636
|
+
this._valueSchema.deprecated(o, r),
|
2637
|
+
o,
|
2638
|
+
);
|
2639
|
+
u !== !1 && n.push(...u.map(({ value: i }) => ({ value: [i] })));
|
2640
|
+
}
|
2641
|
+
return n;
|
2642
|
+
}
|
2643
|
+
forward(t, r) {
|
2644
|
+
let n = [];
|
2645
|
+
for (let o of t) {
|
2646
|
+
let u = r.normalizeForwardResult(this._valueSchema.forward(o, r), o);
|
2647
|
+
n.push(...u.map(Fn));
|
2648
|
+
}
|
2649
|
+
return n;
|
2650
|
+
}
|
2651
|
+
redirect(t, r) {
|
2652
|
+
let n = [],
|
2653
|
+
o = [];
|
2654
|
+
for (let u of t) {
|
2655
|
+
let i = r.normalizeRedirectResult(this._valueSchema.redirect(u, r), u);
|
2656
|
+
"remain" in i && n.push(i.remain), o.push(...i.redirect.map(Fn));
|
2657
|
+
}
|
2658
|
+
return n.length === 0 ? { redirect: o } : { redirect: o, remain: n };
|
2659
|
+
}
|
2660
|
+
overlap(t, r) {
|
2661
|
+
return t.concat(r);
|
2662
|
+
}
|
2663
|
+
};
|
2664
|
+
function Fn({ from: e, to: t }) {
|
2665
|
+
return { from: [e], to: t };
|
2666
|
+
}
|
2667
|
+
var ft = class extends O {
|
2668
|
+
expected() {
|
2669
|
+
return "true or false";
|
2670
|
+
}
|
2671
|
+
validate(t) {
|
2672
|
+
return typeof t == "boolean";
|
2673
|
+
}
|
2674
|
+
};
|
2675
|
+
function En(e, t) {
|
2676
|
+
let r = Object.create(null);
|
2677
|
+
for (let n of e) {
|
2678
|
+
let o = n[t];
|
2679
|
+
if (r[o]) throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);
|
2680
|
+
r[o] = n;
|
2681
|
+
}
|
2682
|
+
return r;
|
2683
|
+
}
|
2684
|
+
function hn(e, t) {
|
2685
|
+
let r = new Map();
|
2686
|
+
for (let n of e) {
|
2687
|
+
let o = n[t];
|
2688
|
+
if (r.has(o)) throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);
|
2689
|
+
r.set(o, n);
|
2690
|
+
}
|
2691
|
+
return r;
|
2692
|
+
}
|
2693
|
+
function Cn() {
|
2694
|
+
let e = Object.create(null);
|
2695
|
+
return (t) => {
|
2696
|
+
let r = JSON.stringify(t);
|
2697
|
+
return e[r] ? !0 : ((e[r] = !0), !1);
|
2698
|
+
};
|
2699
|
+
}
|
2700
|
+
function gn(e, t) {
|
2701
|
+
let r = [],
|
2702
|
+
n = [];
|
2703
|
+
for (let o of e) t(o) ? r.push(o) : n.push(o);
|
2704
|
+
return [r, n];
|
2705
|
+
}
|
2706
|
+
function yn(e) {
|
2707
|
+
return e === Math.floor(e);
|
2708
|
+
}
|
2709
|
+
function An(e, t) {
|
2710
|
+
if (e === t) return 0;
|
2711
|
+
let r = typeof e,
|
2712
|
+
n = typeof t,
|
2713
|
+
o = ["undefined", "object", "boolean", "number", "string"];
|
2714
|
+
return r !== n
|
2715
|
+
? o.indexOf(r) - o.indexOf(n)
|
2716
|
+
: r !== "string"
|
2717
|
+
? Number(e) - Number(t)
|
2718
|
+
: e.localeCompare(t);
|
2719
|
+
}
|
2720
|
+
function Bn(e) {
|
2721
|
+
return (...t) => {
|
2722
|
+
let r = e(...t);
|
2723
|
+
return typeof r == "string" ? new Error(r) : r;
|
2724
|
+
};
|
2725
|
+
}
|
2726
|
+
function Mt(e) {
|
2727
|
+
return e === void 0 ? {} : e;
|
2728
|
+
}
|
2729
|
+
function $t(e) {
|
2730
|
+
if (typeof e == "string") return { text: e };
|
2731
|
+
let { text: t, list: r } = e;
|
2732
|
+
return (
|
2733
|
+
ho(
|
2734
|
+
(t || r) !== void 0,
|
2735
|
+
"Unexpected `expected` result, there should be at least one field.",
|
2736
|
+
),
|
2737
|
+
r
|
2738
|
+
? { text: t, list: { title: r.title, values: r.values.map($t) } }
|
2739
|
+
: { text: t }
|
2740
|
+
);
|
2741
|
+
}
|
2742
|
+
function Vt(e, t) {
|
2743
|
+
return e === !0 ? !0 : e === !1 ? { value: t } : e;
|
2744
|
+
}
|
2745
|
+
function Ut(e, t, r = !1) {
|
2746
|
+
return e === !1
|
2747
|
+
? !1
|
2748
|
+
: e === !0
|
2749
|
+
? r
|
2750
|
+
? !0
|
2751
|
+
: [{ value: t }]
|
2752
|
+
: "value" in e
|
2753
|
+
? [e]
|
2754
|
+
: e.length === 0
|
2755
|
+
? !1
|
2756
|
+
: e;
|
2757
|
+
}
|
2758
|
+
function mn(e, t) {
|
2759
|
+
return typeof e == "string" || "key" in e
|
2760
|
+
? { from: t, to: e }
|
2761
|
+
: "from" in e
|
2762
|
+
? { from: e.from, to: e.to }
|
2763
|
+
: { from: t, to: e.to };
|
2764
|
+
}
|
2765
|
+
function pt(e, t) {
|
2766
|
+
return e === void 0
|
2767
|
+
? []
|
2768
|
+
: Array.isArray(e)
|
2769
|
+
? e.map((r) => mn(r, t))
|
2770
|
+
: [mn(e, t)];
|
2771
|
+
}
|
2772
|
+
function zt(e, t) {
|
2773
|
+
let r = pt(typeof e == "object" && "redirect" in e ? e.redirect : e, t);
|
2774
|
+
return r.length === 0
|
2775
|
+
? { remain: t, redirect: r }
|
2776
|
+
: typeof e == "object" && "remain" in e
|
2777
|
+
? { remain: e.remain, redirect: r }
|
2778
|
+
: { redirect: r };
|
2779
|
+
}
|
2780
|
+
function ho(e, t) {
|
2781
|
+
if (!e) throw new Error(t);
|
2782
|
+
}
|
2783
|
+
var dt = class extends O {
|
2784
|
+
constructor(t) {
|
2785
|
+
super(t),
|
2786
|
+
(this._choices = hn(
|
2787
|
+
t.choices.map((r) => (r && typeof r == "object" ? r : { value: r })),
|
2788
|
+
"value",
|
2789
|
+
));
|
2790
|
+
}
|
2791
|
+
expected({ descriptor: t }) {
|
2792
|
+
let r = Array.from(this._choices.keys())
|
2793
|
+
.map((i) => this._choices.get(i))
|
2794
|
+
.filter(({ hidden: i }) => !i)
|
2795
|
+
.map((i) => i.value)
|
2796
|
+
.sort(An)
|
2797
|
+
.map(t.value),
|
2798
|
+
n = r.slice(0, -2),
|
2799
|
+
o = r.slice(-2);
|
2800
|
+
return {
|
2801
|
+
text: n.concat(o.join(" or ")).join(", "),
|
2802
|
+
list: { title: "one of the following values", values: r },
|
2803
|
+
};
|
2804
|
+
}
|
2805
|
+
validate(t) {
|
2806
|
+
return this._choices.has(t);
|
2807
|
+
}
|
2808
|
+
deprecated(t) {
|
2809
|
+
let r = this._choices.get(t);
|
2810
|
+
return r && r.deprecated ? { value: t } : !1;
|
2811
|
+
}
|
2812
|
+
forward(t) {
|
2813
|
+
let r = this._choices.get(t);
|
2814
|
+
return r ? r.forward : void 0;
|
2815
|
+
}
|
2816
|
+
redirect(t) {
|
2817
|
+
let r = this._choices.get(t);
|
2818
|
+
return r ? r.redirect : void 0;
|
2819
|
+
}
|
2820
|
+
};
|
2821
|
+
var Ft = class extends O {
|
2822
|
+
expected() {
|
2823
|
+
return "a number";
|
2824
|
+
}
|
2825
|
+
validate(t, r) {
|
2826
|
+
return typeof t == "number";
|
2827
|
+
}
|
2828
|
+
};
|
2829
|
+
var mt = class extends Ft {
|
2830
|
+
expected() {
|
2831
|
+
return "an integer";
|
2832
|
+
}
|
2833
|
+
validate(t, r) {
|
2834
|
+
return r.normalizeValidateResult(super.validate(t, r), t) === !0 && yn(t);
|
2835
|
+
}
|
2836
|
+
};
|
2837
|
+
var Re = class extends O {
|
2838
|
+
expected() {
|
2839
|
+
return "a string";
|
2840
|
+
}
|
2841
|
+
validate(t) {
|
2842
|
+
return typeof t == "string";
|
2843
|
+
}
|
2844
|
+
};
|
2845
|
+
var wn = ie,
|
2846
|
+
xn = at,
|
2847
|
+
_n = cn,
|
2848
|
+
vn = an;
|
2849
|
+
var Et = class {
|
2850
|
+
constructor(t, r) {
|
2851
|
+
let {
|
2852
|
+
logger: n = console,
|
2853
|
+
loggerPrintWidth: o = 80,
|
2854
|
+
descriptor: u = wn,
|
2855
|
+
unknown: i = xn,
|
2856
|
+
invalid: s = _n,
|
2857
|
+
deprecated: a = vn,
|
2858
|
+
missing: D = () => !1,
|
2859
|
+
required: l = () => !1,
|
2860
|
+
preprocess: d = (p) => p,
|
2861
|
+
postprocess: f = () => he,
|
2862
|
+
} = r || {};
|
2863
|
+
(this._utils = {
|
2864
|
+
descriptor: u,
|
2865
|
+
logger: n || { warn: () => {} },
|
2866
|
+
loggerPrintWidth: o,
|
2867
|
+
schemas: En(t, "name"),
|
2868
|
+
normalizeDefaultResult: Mt,
|
2869
|
+
normalizeExpectedResult: $t,
|
2870
|
+
normalizeDeprecatedResult: Ut,
|
2871
|
+
normalizeForwardResult: pt,
|
2872
|
+
normalizeRedirectResult: zt,
|
2873
|
+
normalizeValidateResult: Vt,
|
2874
|
+
}),
|
2875
|
+
(this._unknownHandler = i),
|
2876
|
+
(this._invalidHandler = Bn(s)),
|
2877
|
+
(this._deprecatedHandler = a),
|
2878
|
+
(this._identifyMissing = (p, c) => !(p in c) || D(p, c)),
|
2879
|
+
(this._identifyRequired = l),
|
2880
|
+
(this._preprocess = d),
|
2881
|
+
(this._postprocess = f),
|
2882
|
+
this.cleanHistory();
|
2883
|
+
}
|
2884
|
+
cleanHistory() {
|
2885
|
+
this._hasDeprecationWarned = Cn();
|
2886
|
+
}
|
2887
|
+
normalize(t) {
|
2888
|
+
let r = {},
|
2889
|
+
o = [this._preprocess(t, this._utils)],
|
2890
|
+
u = () => {
|
2891
|
+
for (; o.length !== 0; ) {
|
2892
|
+
let i = o.shift(),
|
2893
|
+
s = this._applyNormalization(i, r);
|
2894
|
+
o.push(...s);
|
2895
|
+
}
|
2896
|
+
};
|
2897
|
+
u();
|
2898
|
+
for (let i of Object.keys(this._utils.schemas)) {
|
2899
|
+
let s = this._utils.schemas[i];
|
2900
|
+
if (!(i in r)) {
|
2901
|
+
let a = Mt(s.default(this._utils));
|
2902
|
+
"value" in a && o.push({ [i]: a.value });
|
2903
|
+
}
|
2904
|
+
}
|
2905
|
+
u();
|
2906
|
+
for (let i of Object.keys(this._utils.schemas)) {
|
2907
|
+
if (!(i in r)) continue;
|
2908
|
+
let s = this._utils.schemas[i],
|
2909
|
+
a = r[i],
|
2910
|
+
D = s.postprocess(a, this._utils);
|
2911
|
+
D !== he && (this._applyValidation(D, i, s), (r[i] = D));
|
2912
|
+
}
|
2913
|
+
return this._applyPostprocess(r), this._applyRequiredCheck(r), r;
|
2914
|
+
}
|
2915
|
+
_applyNormalization(t, r) {
|
2916
|
+
let n = [],
|
2917
|
+
{ knownKeys: o, unknownKeys: u } = this._partitionOptionKeys(t);
|
2918
|
+
for (let i of o) {
|
2919
|
+
let s = this._utils.schemas[i],
|
2920
|
+
a = s.preprocess(t[i], this._utils);
|
2921
|
+
this._applyValidation(a, i, s);
|
2922
|
+
let D = ({ from: p, to: c }) => {
|
2923
|
+
n.push(typeof c == "string" ? { [c]: p } : { [c.key]: c.value });
|
2924
|
+
},
|
2925
|
+
l = ({ value: p, redirectTo: c }) => {
|
2926
|
+
let F = Ut(s.deprecated(p, this._utils), a, !0);
|
2927
|
+
if (F !== !1)
|
2928
|
+
if (F === !0)
|
2929
|
+
this._hasDeprecationWarned(i) ||
|
2930
|
+
this._utils.logger.warn(
|
2931
|
+
this._deprecatedHandler(i, c, this._utils),
|
2932
|
+
);
|
2933
|
+
else
|
2934
|
+
for (let { value: m } of F) {
|
2935
|
+
let E = { key: i, value: m };
|
2936
|
+
if (!this._hasDeprecationWarned(E)) {
|
2937
|
+
let A = typeof c == "string" ? { key: c, value: m } : c;
|
2938
|
+
this._utils.logger.warn(
|
2939
|
+
this._deprecatedHandler(E, A, this._utils),
|
2940
|
+
);
|
2941
|
+
}
|
2942
|
+
}
|
2943
|
+
};
|
2944
|
+
pt(s.forward(a, this._utils), a).forEach(D);
|
2945
|
+
let f = zt(s.redirect(a, this._utils), a);
|
2946
|
+
if ((f.redirect.forEach(D), "remain" in f)) {
|
2947
|
+
let p = f.remain;
|
2948
|
+
(r[i] = i in r ? s.overlap(r[i], p, this._utils) : p), l({ value: p });
|
2949
|
+
}
|
2950
|
+
for (let { from: p, to: c } of f.redirect) l({ value: p, redirectTo: c });
|
2951
|
+
}
|
2952
|
+
for (let i of u) {
|
2953
|
+
let s = t[i];
|
2954
|
+
this._applyUnknownHandler(i, s, r, (a, D) => {
|
2955
|
+
n.push({ [a]: D });
|
2956
|
+
});
|
2957
|
+
}
|
2958
|
+
return n;
|
2959
|
+
}
|
2960
|
+
_applyRequiredCheck(t) {
|
2961
|
+
for (let r of Object.keys(this._utils.schemas))
|
2962
|
+
if (this._identifyMissing(r, t) && this._identifyRequired(r))
|
2963
|
+
throw this._invalidHandler(r, st, this._utils);
|
2964
|
+
}
|
2965
|
+
_partitionOptionKeys(t) {
|
2966
|
+
let [r, n] = gn(
|
2967
|
+
Object.keys(t).filter((o) => !this._identifyMissing(o, t)),
|
2968
|
+
(o) => o in this._utils.schemas,
|
2969
|
+
);
|
2970
|
+
return { knownKeys: r, unknownKeys: n };
|
2971
|
+
}
|
2972
|
+
_applyValidation(t, r, n) {
|
2973
|
+
let o = Vt(n.validate(t, this._utils), t);
|
2974
|
+
if (o !== !0) throw this._invalidHandler(r, o.value, this._utils);
|
2975
|
+
}
|
2976
|
+
_applyUnknownHandler(t, r, n, o) {
|
2977
|
+
let u = this._unknownHandler(t, r, this._utils);
|
2978
|
+
if (u)
|
2979
|
+
for (let i of Object.keys(u)) {
|
2980
|
+
if (this._identifyMissing(i, u)) continue;
|
2981
|
+
let s = u[i];
|
2982
|
+
i in this._utils.schemas ? o(i, s) : (n[i] = s);
|
2983
|
+
}
|
2984
|
+
}
|
2985
|
+
_applyPostprocess(t) {
|
2986
|
+
let r = this._postprocess(t, this._utils);
|
2987
|
+
if (r !== he) {
|
2988
|
+
if (r.delete) for (let n of r.delete) delete t[n];
|
2989
|
+
if (r.override) {
|
2990
|
+
let { knownKeys: n, unknownKeys: o } = this._partitionOptionKeys(
|
2991
|
+
r.override,
|
2992
|
+
);
|
2993
|
+
for (let u of n) {
|
2994
|
+
let i = r.override[u];
|
2995
|
+
this._applyValidation(i, u, this._utils.schemas[u]), (t[u] = i);
|
2996
|
+
}
|
2997
|
+
for (let u of o) {
|
2998
|
+
let i = r.override[u];
|
2999
|
+
this._applyUnknownHandler(u, i, t, (s, a) => {
|
3000
|
+
let D = this._utils.schemas[s];
|
3001
|
+
this._applyValidation(a, s, D), (t[s] = a);
|
3002
|
+
});
|
3003
|
+
}
|
3004
|
+
}
|
3005
|
+
}
|
3006
|
+
}
|
3007
|
+
};
|
3008
|
+
var Gt;
|
3009
|
+
function go(
|
3010
|
+
e,
|
3011
|
+
t,
|
3012
|
+
{
|
3013
|
+
logger: r = !1,
|
3014
|
+
isCLI: n = !1,
|
3015
|
+
passThrough: o = !1,
|
3016
|
+
FlagSchema: u,
|
3017
|
+
descriptor: i,
|
3018
|
+
} = {},
|
3019
|
+
) {
|
3020
|
+
if (n) {
|
3021
|
+
if (!u) throw new Error("'FlagSchema' option is required.");
|
3022
|
+
if (!i) throw new Error("'descriptor' option is required.");
|
3023
|
+
} else i = ie;
|
3024
|
+
let s = o
|
3025
|
+
? Array.isArray(o)
|
3026
|
+
? (f, p) => (o.includes(f) ? { [f]: p } : void 0)
|
3027
|
+
: (f, p) => ({ [f]: p })
|
3028
|
+
: (f, p, c) => {
|
3029
|
+
let { _: F, ...m } = c.schemas;
|
3030
|
+
return at(f, p, { ...c, schemas: m });
|
3031
|
+
},
|
3032
|
+
a = yo(t, { isCLI: n, FlagSchema: u }),
|
3033
|
+
D = new Et(a, { logger: r, unknown: s, descriptor: i }),
|
3034
|
+
l = r !== !1;
|
3035
|
+
l && Gt && (D._hasDeprecationWarned = Gt);
|
3036
|
+
let d = D.normalize(e);
|
3037
|
+
return l && (Gt = D._hasDeprecationWarned), d;
|
3038
|
+
}
|
3039
|
+
function yo(e, { isCLI: t, FlagSchema: r }) {
|
3040
|
+
let n = [];
|
3041
|
+
t && n.push(lt.create({ name: "_" }));
|
3042
|
+
for (let o of e)
|
3043
|
+
n.push(Ao(o, { isCLI: t, optionInfos: e, FlagSchema: r })),
|
3044
|
+
o.alias && t && n.push(Dt.create({ name: o.alias, sourceName: o.name }));
|
3045
|
+
return n;
|
3046
|
+
}
|
3047
|
+
function Ao(e, { isCLI: t, optionInfos: r, FlagSchema: n }) {
|
3048
|
+
let { name: o } = e,
|
3049
|
+
u = { name: o },
|
3050
|
+
i,
|
3051
|
+
s = {};
|
3052
|
+
switch (e.type) {
|
3053
|
+
case "int":
|
3054
|
+
(i = mt), t && (u.preprocess = Number);
|
3055
|
+
break;
|
3056
|
+
case "string":
|
3057
|
+
i = Re;
|
3058
|
+
break;
|
3059
|
+
case "choice":
|
3060
|
+
(i = dt),
|
3061
|
+
(u.choices = e.choices.map((a) =>
|
3062
|
+
a != null && a.redirect
|
3063
|
+
? { ...a, redirect: { to: { key: e.name, value: a.redirect } } }
|
3064
|
+
: a,
|
3065
|
+
));
|
3066
|
+
break;
|
3067
|
+
case "boolean":
|
3068
|
+
i = ft;
|
3069
|
+
break;
|
3070
|
+
case "flag":
|
3071
|
+
(i = n),
|
3072
|
+
(u.flags = r.flatMap((a) =>
|
3073
|
+
[
|
3074
|
+
a.alias,
|
3075
|
+
a.description && a.name,
|
3076
|
+
a.oppositeDescription && `no-${a.name}`,
|
3077
|
+
].filter(Boolean),
|
3078
|
+
));
|
3079
|
+
break;
|
3080
|
+
case "path":
|
3081
|
+
i = Re;
|
3082
|
+
break;
|
3083
|
+
default:
|
3084
|
+
throw new Error(`Unexpected type ${e.type}`);
|
3085
|
+
}
|
3086
|
+
if (
|
3087
|
+
(e.exception
|
3088
|
+
? (u.validate = (a, D, l) => e.exception(a) || D.validate(a, l))
|
3089
|
+
: (u.validate = (a, D, l) => a === void 0 || D.validate(a, l)),
|
3090
|
+
e.redirect &&
|
3091
|
+
(s.redirect = (a) =>
|
3092
|
+
a
|
3093
|
+
? {
|
3094
|
+
to:
|
3095
|
+
typeof e.redirect == "string"
|
3096
|
+
? e.redirect
|
3097
|
+
: { key: e.redirect.option, value: e.redirect.value },
|
3098
|
+
}
|
3099
|
+
: void 0),
|
3100
|
+
e.deprecated && (s.deprecated = !0),
|
3101
|
+
t && !e.array)
|
3102
|
+
) {
|
3103
|
+
let a = u.preprocess || ((D) => D);
|
3104
|
+
u.preprocess = (D, l, d) =>
|
3105
|
+
l.preprocess(a(Array.isArray(D) ? y(!1, D, -1) : D), d);
|
3106
|
+
}
|
3107
|
+
return e.array
|
3108
|
+
? ct.create({
|
3109
|
+
...(t ? { preprocess: (a) => (Array.isArray(a) ? a : [a]) } : {}),
|
3110
|
+
...s,
|
3111
|
+
valueSchema: i.create(u),
|
3112
|
+
})
|
3113
|
+
: i.create({ ...u, ...s });
|
3114
|
+
}
|
3115
|
+
var bn = go;
|
3116
|
+
var Bo = (e, t, r) => {
|
3117
|
+
if (!(e && t == null)) {
|
3118
|
+
if (t.findLast) return t.findLast(r);
|
3119
|
+
for (let n = t.length - 1; n >= 0; n--) {
|
3120
|
+
let o = t[n];
|
3121
|
+
if (r(o, n, t)) return o;
|
3122
|
+
}
|
3123
|
+
}
|
3124
|
+
},
|
3125
|
+
Kt = Bo;
|
3126
|
+
function qt(e, t) {
|
3127
|
+
if (!t) throw new Error("parserName is required.");
|
3128
|
+
let r = Kt(
|
3129
|
+
!1,
|
3130
|
+
e,
|
3131
|
+
(o) => o.parsers && Object.prototype.hasOwnProperty.call(o.parsers, t),
|
3132
|
+
);
|
3133
|
+
if (r) return r;
|
3134
|
+
let n = `Couldn't resolve parser "${t}".`;
|
3135
|
+
throw (
|
3136
|
+
((n += " Plugins must be explicitly added to the standalone bundle."),
|
3137
|
+
new Pe(n))
|
3138
|
+
);
|
3139
|
+
}
|
3140
|
+
function On(e, t) {
|
3141
|
+
if (!t) throw new Error("astFormat is required.");
|
3142
|
+
let r = Kt(
|
3143
|
+
!1,
|
3144
|
+
e,
|
3145
|
+
(o) => o.printers && Object.prototype.hasOwnProperty.call(o.printers, t),
|
3146
|
+
);
|
3147
|
+
if (r) return r;
|
3148
|
+
let n = `Couldn't find plugin for AST format "${t}".`;
|
3149
|
+
throw (
|
3150
|
+
((n += " Plugins must be explicitly added to the standalone bundle."),
|
3151
|
+
new Pe(n))
|
3152
|
+
);
|
3153
|
+
}
|
3154
|
+
function ht({ plugins: e, parser: t }) {
|
3155
|
+
let r = qt(e, t);
|
3156
|
+
return Jt(r, t);
|
3157
|
+
}
|
3158
|
+
function Jt(e, t) {
|
3159
|
+
let r = e.parsers[t];
|
3160
|
+
return typeof r == "function" ? r() : r;
|
3161
|
+
}
|
3162
|
+
function Sn(e, t) {
|
3163
|
+
let r = e.printers[t];
|
3164
|
+
return typeof r == "function" ? r() : r;
|
3165
|
+
}
|
3166
|
+
var Nn = {
|
3167
|
+
astFormat: "estree",
|
3168
|
+
printer: {},
|
3169
|
+
originalText: void 0,
|
3170
|
+
locStart: null,
|
3171
|
+
locEnd: null,
|
3172
|
+
};
|
3173
|
+
async function wo(e, t = {}) {
|
3174
|
+
var d;
|
3175
|
+
let r = { ...e };
|
3176
|
+
if (!r.parser)
|
3177
|
+
if (r.filepath) {
|
3178
|
+
if (((r.parser = un(r, { physicalFile: r.filepath })), !r.parser))
|
3179
|
+
throw new Ie(`No parser could be inferred for file "${r.filepath}".`);
|
3180
|
+
} else
|
3181
|
+
throw new Ie(
|
3182
|
+
"No parser and no file path given, couldn't infer a parser.",
|
3183
|
+
);
|
3184
|
+
let n = ot({ plugins: e.plugins, showDeprecated: !0 }).options,
|
3185
|
+
o = {
|
3186
|
+
...Nn,
|
3187
|
+
...Object.fromEntries(
|
3188
|
+
n.filter((f) => f.default !== void 0).map((f) => [f.name, f.default]),
|
3189
|
+
),
|
3190
|
+
},
|
3191
|
+
u = qt(r.plugins, r.parser),
|
3192
|
+
i = await Jt(u, r.parser);
|
3193
|
+
(r.astFormat = i.astFormat), (r.locEnd = i.locEnd), (r.locStart = i.locStart);
|
3194
|
+
let s =
|
3195
|
+
(d = u.printers) != null && d[i.astFormat]
|
3196
|
+
? u
|
3197
|
+
: On(r.plugins, i.astFormat),
|
3198
|
+
a = await Sn(s, i.astFormat);
|
3199
|
+
r.printer = a;
|
3200
|
+
let D = s.defaultOptions
|
3201
|
+
? Object.fromEntries(
|
3202
|
+
Object.entries(s.defaultOptions).filter(([, f]) => f !== void 0),
|
3203
|
+
)
|
3204
|
+
: {},
|
3205
|
+
l = { ...o, ...D };
|
3206
|
+
for (let [f, p] of Object.entries(l))
|
3207
|
+
(r[f] === null || r[f] === void 0) && (r[f] = p);
|
3208
|
+
return (
|
3209
|
+
r.parser === "json" && (r.trailingComma = "none"),
|
3210
|
+
bn(r, n, { passThrough: Object.keys(Nn), ...t })
|
3211
|
+
);
|
3212
|
+
}
|
3213
|
+
var se = wo;
|
3214
|
+
var Vn = Me($n(), 1);
|
3215
|
+
async function ko(e, t) {
|
3216
|
+
let r = await ht(t),
|
3217
|
+
n = r.preprocess ? r.preprocess(e, t) : e;
|
3218
|
+
t.originalText = n;
|
3219
|
+
let o;
|
3220
|
+
try {
|
3221
|
+
o = await r.parse(n, t, t);
|
3222
|
+
} catch (u) {
|
3223
|
+
Lo(u, e);
|
3224
|
+
}
|
3225
|
+
return { text: n, ast: o };
|
3226
|
+
}
|
3227
|
+
function Lo(e, t) {
|
3228
|
+
let { loc: r } = e;
|
3229
|
+
if (r) {
|
3230
|
+
let n = (0, Vn.codeFrameColumns)(t, r, { highlightCode: !0 });
|
3231
|
+
throw (
|
3232
|
+
((e.message +=
|
3233
|
+
`
|
3234
|
+
` + n),
|
3235
|
+
(e.codeFrame = n),
|
3236
|
+
e)
|
3237
|
+
);
|
3238
|
+
}
|
3239
|
+
throw e;
|
3240
|
+
}
|
3241
|
+
var ce = ko;
|
3242
|
+
async function Un(e, t, r, n, o) {
|
3243
|
+
let {
|
3244
|
+
embeddedLanguageFormatting: u,
|
3245
|
+
printer: { embed: i, hasPrettierIgnore: s = () => !1, getVisitorKeys: a },
|
3246
|
+
} = r;
|
3247
|
+
if (!i || u !== "auto") return;
|
3248
|
+
if (i.length > 2)
|
3249
|
+
throw new Error(
|
3250
|
+
"printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed",
|
3251
|
+
);
|
3252
|
+
let D = X(i.getVisitorKeys ?? a),
|
3253
|
+
l = [];
|
3254
|
+
p();
|
3255
|
+
let d = e.stack;
|
3256
|
+
for (let { print: c, node: F, pathStack: m } of l)
|
3257
|
+
try {
|
3258
|
+
e.stack = m;
|
3259
|
+
let E = await c(f, t, e, r);
|
3260
|
+
E && o.set(F, E);
|
3261
|
+
} catch (E) {
|
3262
|
+
if (globalThis.PRETTIER_DEBUG) throw E;
|
3263
|
+
}
|
3264
|
+
e.stack = d;
|
3265
|
+
function f(c, F) {
|
3266
|
+
return Po(c, F, r, n);
|
3267
|
+
}
|
3268
|
+
function p() {
|
3269
|
+
let { node: c } = e;
|
3270
|
+
if (c === null || typeof c != "object" || s(e)) return;
|
3271
|
+
for (let m of D(c)) Array.isArray(c[m]) ? e.each(p, m) : e.call(p, m);
|
3272
|
+
let F = i(e, r);
|
3273
|
+
if (F) {
|
3274
|
+
if (typeof F == "function") {
|
3275
|
+
l.push({ print: F, node: c, pathStack: [...e.stack] });
|
3276
|
+
return;
|
3277
|
+
}
|
3278
|
+
o.set(c, F);
|
3279
|
+
}
|
3280
|
+
}
|
3281
|
+
}
|
3282
|
+
async function Po(e, t, r, n) {
|
3283
|
+
let o = await se(
|
3284
|
+
{ ...r, ...t, parentParser: r.parser, originalText: e },
|
3285
|
+
{ passThrough: !0 },
|
3286
|
+
),
|
3287
|
+
{ ast: u } = await ce(e, o),
|
3288
|
+
i = await n(u, o);
|
3289
|
+
return Ze(i);
|
3290
|
+
}
|
3291
|
+
function Io(e, t) {
|
3292
|
+
let {
|
3293
|
+
originalText: r,
|
3294
|
+
[Symbol.for("comments")]: n,
|
3295
|
+
locStart: o,
|
3296
|
+
locEnd: u,
|
3297
|
+
[Symbol.for("printedComments")]: i,
|
3298
|
+
} = t,
|
3299
|
+
{ node: s } = e,
|
3300
|
+
a = o(s),
|
3301
|
+
D = u(s);
|
3302
|
+
for (let l of n) o(l) >= a && u(l) <= D && i.add(l);
|
3303
|
+
return r.slice(a, D);
|
3304
|
+
}
|
3305
|
+
var zn = Io;
|
3306
|
+
async function Ye(e, t) {
|
3307
|
+
({ ast: e } = await Qt(e, t));
|
3308
|
+
let r = new Map(),
|
3309
|
+
n = new Mr(e),
|
3310
|
+
o = tn(t),
|
3311
|
+
u = new Map();
|
3312
|
+
await Un(n, s, t, Ye, u);
|
3313
|
+
let i = await Gn(n, t, s, void 0, u);
|
3314
|
+
return en(t), i;
|
3315
|
+
function s(D, l) {
|
3316
|
+
return D === void 0 || D === n
|
3317
|
+
? a(l)
|
3318
|
+
: Array.isArray(D)
|
3319
|
+
? n.call(() => a(l), ...D)
|
3320
|
+
: n.call(() => a(l), D);
|
3321
|
+
}
|
3322
|
+
function a(D) {
|
3323
|
+
o(n);
|
3324
|
+
let l = n.node;
|
3325
|
+
if (l == null) return "";
|
3326
|
+
let d = l && typeof l == "object" && D === void 0;
|
3327
|
+
if (d && r.has(l)) return r.get(l);
|
3328
|
+
let f = Gn(n, t, s, D, u);
|
3329
|
+
return d && r.set(l, f), f;
|
3330
|
+
}
|
3331
|
+
}
|
3332
|
+
function Gn(e, t, r, n, o) {
|
3333
|
+
var a;
|
3334
|
+
let { node: u } = e,
|
3335
|
+
{ printer: i } = t,
|
3336
|
+
s;
|
3337
|
+
return (
|
3338
|
+
(a = i.hasPrettierIgnore) != null && a.call(i, e)
|
3339
|
+
? (s = zn(e, t))
|
3340
|
+
: o.has(u)
|
3341
|
+
? (s = o.get(u))
|
3342
|
+
: (s = i.print(e, t, r, n)),
|
3343
|
+
u === t.cursorNode && (s = Qe(s, (D) => [ve, D, ve])),
|
3344
|
+
i.printComment &&
|
3345
|
+
(!i.willPrintOwnComments || !i.willPrintOwnComments(e, t)) &&
|
3346
|
+
(s = Qr(e, s, t)),
|
3347
|
+
s
|
3348
|
+
);
|
3349
|
+
}
|
3350
|
+
async function Qt(e, t) {
|
3351
|
+
let r = e.comments ?? [];
|
3352
|
+
(t[Symbol.for("comments")] = r),
|
3353
|
+
(t[Symbol.for("tokens")] = e.tokens ?? []),
|
3354
|
+
(t[Symbol.for("printedComments")] = new Set()),
|
3355
|
+
Jr(e, t);
|
3356
|
+
let {
|
3357
|
+
printer: { preprocess: n },
|
3358
|
+
} = t;
|
3359
|
+
return (e = n ? await n(e, t) : e), { ast: e, comments: r };
|
3360
|
+
}
|
3361
|
+
function Ro(e, t) {
|
3362
|
+
let { cursorOffset: r, locStart: n, locEnd: o } = t,
|
3363
|
+
u = X(t.printer.getVisitorKeys),
|
3364
|
+
i = (a) => n(a) <= r && o(a) >= r,
|
3365
|
+
s = e;
|
3366
|
+
for (let a of Ur(e, { getVisitorKeys: u, filter: i })) s = a;
|
3367
|
+
return s;
|
3368
|
+
}
|
3369
|
+
var Kn = Ro;
|
3370
|
+
function Yo(e, t) {
|
3371
|
+
let {
|
3372
|
+
printer: { massageAstNode: r, getVisitorKeys: n },
|
3373
|
+
} = t;
|
3374
|
+
if (!r) return e;
|
3375
|
+
let o = X(n),
|
3376
|
+
u = r.ignoredProperties ?? new Set();
|
3377
|
+
return i(e);
|
3378
|
+
function i(s, a) {
|
3379
|
+
if (!(s !== null && typeof s == "object")) return s;
|
3380
|
+
if (Array.isArray(s)) return s.map((f) => i(f, a)).filter(Boolean);
|
3381
|
+
let D = {},
|
3382
|
+
l = new Set(o(s));
|
3383
|
+
for (let f in s)
|
3384
|
+
!Object.prototype.hasOwnProperty.call(s, f) ||
|
3385
|
+
u.has(f) ||
|
3386
|
+
(l.has(f) ? (D[f] = i(s[f], s)) : (D[f] = s[f]));
|
3387
|
+
let d = r(s, D, a);
|
3388
|
+
if (d !== null) return d ?? D;
|
3389
|
+
}
|
3390
|
+
}
|
3391
|
+
var qn = Yo;
|
3392
|
+
var jo = (e, t, r) => {
|
3393
|
+
if (!(e && t == null)) {
|
3394
|
+
if (t.findLastIndex) return t.findLastIndex(r);
|
3395
|
+
for (let n = t.length - 1; n >= 0; n--) {
|
3396
|
+
let o = t[n];
|
3397
|
+
if (r(o, n, t)) return n;
|
3398
|
+
}
|
3399
|
+
return -1;
|
3400
|
+
}
|
3401
|
+
},
|
3402
|
+
Jn = jo;
|
3403
|
+
var Ho = ({ parser: e }) =>
|
3404
|
+
e === "json" || e === "json5" || e === "jsonc" || e === "json-stringify";
|
3405
|
+
function Wo(e, t) {
|
3406
|
+
let r = [e.node, ...e.parentNodes],
|
3407
|
+
n = new Set([t.node, ...t.parentNodes]);
|
3408
|
+
return r.find((o) => Qn.has(o.type) && n.has(o));
|
3409
|
+
}
|
3410
|
+
function Xn(e) {
|
3411
|
+
let t = Jn(!1, e, (r) => r.type !== "Program" && r.type !== "File");
|
3412
|
+
return t === -1 ? e : e.slice(0, t + 1);
|
3413
|
+
}
|
3414
|
+
function Mo(e, t, { locStart: r, locEnd: n }) {
|
3415
|
+
let o = e.node,
|
3416
|
+
u = t.node;
|
3417
|
+
if (o === u) return { startNode: o, endNode: u };
|
3418
|
+
let i = r(e.node);
|
3419
|
+
for (let a of Xn(t.parentNodes))
|
3420
|
+
if (r(a) >= i) u = a;
|
3421
|
+
else break;
|
3422
|
+
let s = n(t.node);
|
3423
|
+
for (let a of Xn(e.parentNodes)) {
|
3424
|
+
if (n(a) <= s) o = a;
|
3425
|
+
else break;
|
3426
|
+
if (o === u) break;
|
3427
|
+
}
|
3428
|
+
return { startNode: o, endNode: u };
|
3429
|
+
}
|
3430
|
+
function er(e, t, r, n, o = [], u) {
|
3431
|
+
let { locStart: i, locEnd: s } = r,
|
3432
|
+
a = i(e),
|
3433
|
+
D = s(e);
|
3434
|
+
if (
|
3435
|
+
!(
|
3436
|
+
t > D ||
|
3437
|
+
t < a ||
|
3438
|
+
(u === "rangeEnd" && t === a) ||
|
3439
|
+
(u === "rangeStart" && t === D)
|
3440
|
+
)
|
3441
|
+
) {
|
3442
|
+
for (let l of ut(e, r)) {
|
3443
|
+
let d = er(l, t, r, n, [e, ...o], u);
|
3444
|
+
if (d) return d;
|
3445
|
+
}
|
3446
|
+
if (!n || n(e, o[0])) return { node: e, parentNodes: o };
|
3447
|
+
}
|
3448
|
+
}
|
3449
|
+
function $o(e, t) {
|
3450
|
+
return (
|
3451
|
+
t !== "DeclareExportDeclaration" &&
|
3452
|
+
e !== "TypeParameterDeclaration" &&
|
3453
|
+
(e === "Directive" ||
|
3454
|
+
e === "TypeAlias" ||
|
3455
|
+
e === "TSExportAssignment" ||
|
3456
|
+
e.startsWith("Declare") ||
|
3457
|
+
e.startsWith("TSDeclare") ||
|
3458
|
+
e.endsWith("Statement") ||
|
3459
|
+
e.endsWith("Declaration"))
|
3460
|
+
);
|
3461
|
+
}
|
3462
|
+
var Qn = new Set([
|
3463
|
+
"JsonRoot",
|
3464
|
+
"ObjectExpression",
|
3465
|
+
"ArrayExpression",
|
3466
|
+
"StringLiteral",
|
3467
|
+
"NumericLiteral",
|
3468
|
+
"BooleanLiteral",
|
3469
|
+
"NullLiteral",
|
3470
|
+
"UnaryExpression",
|
3471
|
+
"TemplateLiteral",
|
3472
|
+
]),
|
3473
|
+
Vo = new Set([
|
3474
|
+
"OperationDefinition",
|
3475
|
+
"FragmentDefinition",
|
3476
|
+
"VariableDefinition",
|
3477
|
+
"TypeExtensionDefinition",
|
3478
|
+
"ObjectTypeDefinition",
|
3479
|
+
"FieldDefinition",
|
3480
|
+
"DirectiveDefinition",
|
3481
|
+
"EnumTypeDefinition",
|
3482
|
+
"EnumValueDefinition",
|
3483
|
+
"InputValueDefinition",
|
3484
|
+
"InputObjectTypeDefinition",
|
3485
|
+
"SchemaDefinition",
|
3486
|
+
"OperationTypeDefinition",
|
3487
|
+
"InterfaceTypeDefinition",
|
3488
|
+
"UnionTypeDefinition",
|
3489
|
+
"ScalarTypeDefinition",
|
3490
|
+
]);
|
3491
|
+
function Zn(e, t, r) {
|
3492
|
+
if (!t) return !1;
|
3493
|
+
switch (e.parser) {
|
3494
|
+
case "flow":
|
3495
|
+
case "babel":
|
3496
|
+
case "babel-flow":
|
3497
|
+
case "babel-ts":
|
3498
|
+
case "typescript":
|
3499
|
+
case "acorn":
|
3500
|
+
case "espree":
|
3501
|
+
case "meriyah":
|
3502
|
+
case "__babel_estree":
|
3503
|
+
return $o(t.type, r == null ? void 0 : r.type);
|
3504
|
+
case "json":
|
3505
|
+
case "json5":
|
3506
|
+
case "jsonc":
|
3507
|
+
case "json-stringify":
|
3508
|
+
return Qn.has(t.type);
|
3509
|
+
case "graphql":
|
3510
|
+
return Vo.has(t.kind);
|
3511
|
+
case "vue":
|
3512
|
+
return t.tag !== "root";
|
3513
|
+
}
|
3514
|
+
return !1;
|
3515
|
+
}
|
3516
|
+
function eu(e, t, r) {
|
3517
|
+
let { rangeStart: n, rangeEnd: o, locStart: u, locEnd: i } = t;
|
3518
|
+
ke.ok(o > n);
|
3519
|
+
let s = e.slice(n, o).search(/\S/u),
|
3520
|
+
a = s === -1;
|
3521
|
+
if (!a) for (n += s; o > n && !/\S/u.test(e[o - 1]); --o);
|
3522
|
+
let D = er(r, n, t, (p, c) => Zn(t, p, c), [], "rangeStart"),
|
3523
|
+
l = a ? D : er(r, o, t, (p) => Zn(t, p), [], "rangeEnd");
|
3524
|
+
if (!D || !l) return { rangeStart: 0, rangeEnd: 0 };
|
3525
|
+
let d, f;
|
3526
|
+
if (Ho(t)) {
|
3527
|
+
let p = Wo(D, l);
|
3528
|
+
(d = p), (f = p);
|
3529
|
+
} else ({ startNode: d, endNode: f } = Mo(D, l, t));
|
3530
|
+
return { rangeStart: Math.min(u(d), u(f)), rangeEnd: Math.max(i(d), i(f)) };
|
3531
|
+
}
|
3532
|
+
var uu = "\uFEFF",
|
3533
|
+
tu = Symbol("cursor");
|
3534
|
+
async function ou(e, t, r = 0) {
|
3535
|
+
if (!e || e.trim().length === 0)
|
3536
|
+
return { formatted: "", cursorOffset: -1, comments: [] };
|
3537
|
+
let { ast: n, text: o } = await ce(e, t);
|
3538
|
+
t.cursorOffset >= 0 && (t.cursorNode = Kn(n, t));
|
3539
|
+
let u = await Ye(n, t, r);
|
3540
|
+
r > 0 && (u = Je([q, u], r, t.tabWidth));
|
3541
|
+
let i = Fe(u, t);
|
3542
|
+
if (r > 0) {
|
3543
|
+
let a = i.formatted.trim();
|
3544
|
+
i.cursorNodeStart !== void 0 &&
|
3545
|
+
(i.cursorNodeStart -= i.formatted.indexOf(a)),
|
3546
|
+
(i.formatted = a + Be(t.endOfLine));
|
3547
|
+
}
|
3548
|
+
let s = t[Symbol.for("comments")];
|
3549
|
+
if (t.cursorOffset >= 0) {
|
3550
|
+
let a, D, l, d, f;
|
3551
|
+
if (
|
3552
|
+
(t.cursorNode && i.cursorNodeText
|
3553
|
+
? ((a = t.locStart(t.cursorNode)),
|
3554
|
+
(D = o.slice(a, t.locEnd(t.cursorNode))),
|
3555
|
+
(l = t.cursorOffset - a),
|
3556
|
+
(d = i.cursorNodeStart),
|
3557
|
+
(f = i.cursorNodeText))
|
3558
|
+
: ((a = 0), (D = o), (l = t.cursorOffset), (d = 0), (f = i.formatted)),
|
3559
|
+
D === f)
|
3560
|
+
)
|
3561
|
+
return { formatted: i.formatted, cursorOffset: d + l, comments: s };
|
3562
|
+
let p = D.split("");
|
3563
|
+
p.splice(l, 0, tu);
|
3564
|
+
let c = f.split(""),
|
3565
|
+
F = dr(p, c),
|
3566
|
+
m = d;
|
3567
|
+
for (let E of F)
|
3568
|
+
if (E.removed) {
|
3569
|
+
if (E.value.includes(tu)) break;
|
3570
|
+
} else m += E.count;
|
3571
|
+
return { formatted: i.formatted, cursorOffset: m, comments: s };
|
3572
|
+
}
|
3573
|
+
return { formatted: i.formatted, cursorOffset: -1, comments: s };
|
3574
|
+
}
|
3575
|
+
async function Uo(e, t) {
|
3576
|
+
let { ast: r, text: n } = await ce(e, t),
|
3577
|
+
{ rangeStart: o, rangeEnd: u } = eu(n, t, r),
|
3578
|
+
i = n.slice(o, u),
|
3579
|
+
s = Math.min(
|
3580
|
+
o,
|
3581
|
+
n.lastIndexOf(
|
3582
|
+
`
|
3583
|
+
`,
|
3584
|
+
o,
|
3585
|
+
) + 1,
|
3586
|
+
),
|
3587
|
+
a = n.slice(s, o).match(/^\s*/u)[0],
|
3588
|
+
D = me(a, t.tabWidth),
|
3589
|
+
l = await ou(
|
3590
|
+
i,
|
3591
|
+
{
|
3592
|
+
...t,
|
3593
|
+
rangeStart: 0,
|
3594
|
+
rangeEnd: Number.POSITIVE_INFINITY,
|
3595
|
+
cursorOffset:
|
3596
|
+
t.cursorOffset > o && t.cursorOffset <= u ? t.cursorOffset - o : -1,
|
3597
|
+
endOfLine: "lf",
|
3598
|
+
},
|
3599
|
+
D,
|
3600
|
+
),
|
3601
|
+
d = l.formatted.trimEnd(),
|
3602
|
+
{ cursorOffset: f } = t;
|
3603
|
+
f > u
|
3604
|
+
? (f += d.length - i.length)
|
3605
|
+
: l.cursorOffset >= 0 && (f = l.cursorOffset + o);
|
3606
|
+
let p = n.slice(0, o) + d + n.slice(u);
|
3607
|
+
if (t.endOfLine !== "lf") {
|
3608
|
+
let c = Be(t.endOfLine);
|
3609
|
+
f >= 0 &&
|
3610
|
+
c ===
|
3611
|
+
`\r
|
3612
|
+
` &&
|
3613
|
+
(f += wt(
|
3614
|
+
p.slice(0, f),
|
3615
|
+
`
|
3616
|
+
`,
|
3617
|
+
)),
|
3618
|
+
(p = ne(
|
3619
|
+
!1,
|
3620
|
+
p,
|
3621
|
+
`
|
3622
|
+
`,
|
3623
|
+
c,
|
3624
|
+
));
|
3625
|
+
}
|
3626
|
+
return { formatted: p, cursorOffset: f, comments: l.comments };
|
3627
|
+
}
|
3628
|
+
function tr(e, t, r) {
|
3629
|
+
return typeof t != "number" || Number.isNaN(t) || t < 0 || t > e.length
|
3630
|
+
? r
|
3631
|
+
: t;
|
3632
|
+
}
|
3633
|
+
function ru(e, t) {
|
3634
|
+
let { cursorOffset: r, rangeStart: n, rangeEnd: o } = t;
|
3635
|
+
return (
|
3636
|
+
(r = tr(e, r, -1)),
|
3637
|
+
(n = tr(e, n, 0)),
|
3638
|
+
(o = tr(e, o, e.length)),
|
3639
|
+
{ ...t, cursorOffset: r, rangeStart: n, rangeEnd: o }
|
3640
|
+
);
|
3641
|
+
}
|
3642
|
+
function iu(e, t) {
|
3643
|
+
let { cursorOffset: r, rangeStart: n, rangeEnd: o, endOfLine: u } = ru(e, t),
|
3644
|
+
i = e.charAt(0) === uu;
|
3645
|
+
if (
|
3646
|
+
(i && ((e = e.slice(1)), r--, n--, o--),
|
3647
|
+
u === "auto" && (u = Fr(e)),
|
3648
|
+
e.includes("\r"))
|
3649
|
+
) {
|
3650
|
+
let s = (a) =>
|
3651
|
+
wt(
|
3652
|
+
e.slice(0, Math.max(a, 0)),
|
3653
|
+
`\r
|
3654
|
+
`,
|
3655
|
+
);
|
3656
|
+
(r -= s(r)), (n -= s(n)), (o -= s(o)), (e = mr(e));
|
3657
|
+
}
|
3658
|
+
return {
|
3659
|
+
hasBOM: i,
|
3660
|
+
text: e,
|
3661
|
+
options: ru(e, {
|
3662
|
+
...t,
|
3663
|
+
cursorOffset: r,
|
3664
|
+
rangeStart: n,
|
3665
|
+
rangeEnd: o,
|
3666
|
+
endOfLine: u,
|
3667
|
+
}),
|
3668
|
+
};
|
3669
|
+
}
|
3670
|
+
async function nu(e, t) {
|
3671
|
+
let r = await ht(t);
|
3672
|
+
return !r.hasPragma || r.hasPragma(e);
|
3673
|
+
}
|
3674
|
+
async function rr(e, t) {
|
3675
|
+
let { hasBOM: r, text: n, options: o } = iu(e, await se(t));
|
3676
|
+
if (
|
3677
|
+
(o.rangeStart >= o.rangeEnd && n !== "") ||
|
3678
|
+
(o.requirePragma && !(await nu(n, o)))
|
3679
|
+
)
|
3680
|
+
return { formatted: e, cursorOffset: t.cursorOffset, comments: [] };
|
3681
|
+
let u;
|
3682
|
+
return (
|
3683
|
+
o.rangeStart > 0 || o.rangeEnd < n.length
|
3684
|
+
? (u = await Uo(n, o))
|
3685
|
+
: (!o.requirePragma &&
|
3686
|
+
o.insertPragma &&
|
3687
|
+
o.printer.insertPragma &&
|
3688
|
+
!(await nu(n, o)) &&
|
3689
|
+
(n = o.printer.insertPragma(n)),
|
3690
|
+
(u = await ou(n, o))),
|
3691
|
+
r &&
|
3692
|
+
((u.formatted = uu + u.formatted),
|
3693
|
+
u.cursorOffset >= 0 && u.cursorOffset++),
|
3694
|
+
u
|
3695
|
+
);
|
3696
|
+
}
|
3697
|
+
async function su(e, t, r) {
|
3698
|
+
let { text: n, options: o } = iu(e, await se(t)),
|
3699
|
+
u = await ce(n, o);
|
3700
|
+
return (
|
3701
|
+
r &&
|
3702
|
+
(r.preprocessForPrint && (u.ast = await Qt(u.ast, o)),
|
3703
|
+
r.massage && (u.ast = qn(u.ast, o))),
|
3704
|
+
u
|
3705
|
+
);
|
3706
|
+
}
|
3707
|
+
async function au(e, t) {
|
3708
|
+
t = await se(t);
|
3709
|
+
let r = await Ye(e, t);
|
3710
|
+
return Fe(r, t);
|
3711
|
+
}
|
3712
|
+
async function Du(e, t) {
|
3713
|
+
let r = Or(e),
|
3714
|
+
{ formatted: n } = await rr(r, { ...t, parser: "__js_expression" });
|
3715
|
+
return n;
|
3716
|
+
}
|
3717
|
+
async function lu(e, t) {
|
3718
|
+
t = await se(t);
|
3719
|
+
let { ast: r } = await ce(e, t);
|
3720
|
+
return Ye(r, t);
|
3721
|
+
}
|
3722
|
+
async function cu(e, t) {
|
3723
|
+
return Fe(e, await se(t));
|
3724
|
+
}
|
3725
|
+
var nr = {};
|
3726
|
+
We(nr, { builders: () => Go, printer: () => Ko, utils: () => qo });
|
3727
|
+
var Go = {
|
3728
|
+
join: be,
|
3729
|
+
line: Ke,
|
3730
|
+
softline: vr,
|
3731
|
+
hardline: q,
|
3732
|
+
literalline: qe,
|
3733
|
+
group: _t,
|
3734
|
+
conditionalGroup: Ar,
|
3735
|
+
fill: Ge,
|
3736
|
+
lineSuffix: xe,
|
3737
|
+
lineSuffixBoundary: xr,
|
3738
|
+
cursor: ve,
|
3739
|
+
breakParent: de,
|
3740
|
+
ifBreak: Br,
|
3741
|
+
trim: _r,
|
3742
|
+
indent: De,
|
3743
|
+
indentIfBreak: wr,
|
3744
|
+
align: ae,
|
3745
|
+
addAlignmentToDoc: Je,
|
3746
|
+
markAsRoot: gr,
|
3747
|
+
dedentToRoot: Cr,
|
3748
|
+
dedent: yr,
|
3749
|
+
hardlineWithoutBreakParent: _e,
|
3750
|
+
literallineWithoutBreakParent: vt,
|
3751
|
+
label: br,
|
3752
|
+
concat: (e) => e,
|
3753
|
+
},
|
3754
|
+
Ko = { printDocToString: Fe },
|
3755
|
+
qo = {
|
3756
|
+
willBreak: Ir,
|
3757
|
+
traverseDoc: we,
|
3758
|
+
findInDoc: Xe,
|
3759
|
+
mapDoc: Ne,
|
3760
|
+
removeLines: Yr,
|
3761
|
+
stripTrailingHardline: Ze,
|
3762
|
+
replaceEndOfLine: jr,
|
3763
|
+
canBreak: Hr,
|
3764
|
+
};
|
3765
|
+
var fu = "3.3.3";
|
3766
|
+
var or = {};
|
3767
|
+
We(or, {
|
3768
|
+
addDanglingComment: () => re,
|
3769
|
+
addLeadingComment: () => ue,
|
3770
|
+
addTrailingComment: () => oe,
|
3771
|
+
getAlignmentSize: () => me,
|
3772
|
+
getIndentSize: () => pu,
|
3773
|
+
getMaxContinuousCount: () => du,
|
3774
|
+
getNextNonSpaceNonCommentCharacter: () => Fu,
|
3775
|
+
getNextNonSpaceNonCommentCharacterIndex: () => si,
|
3776
|
+
getStringWidth: () => Oe,
|
3777
|
+
hasNewline: () => V,
|
3778
|
+
hasNewlineInRange: () => mu,
|
3779
|
+
hasSpaces: () => Eu,
|
3780
|
+
isNextLineEmpty: () => ci,
|
3781
|
+
isNextLineEmptyAfterIndex: () => gt,
|
3782
|
+
isPreviousLineEmpty: () => Di,
|
3783
|
+
makeString: () => hu,
|
3784
|
+
skip: () => Ee,
|
3785
|
+
skipEverythingButNewLine: () => nt,
|
3786
|
+
skipInlineComment: () => Ce,
|
3787
|
+
skipNewline: () => M,
|
3788
|
+
skipSpaces: () => T,
|
3789
|
+
skipToLineEnd: () => rt,
|
3790
|
+
skipTrailingComment: () => ge,
|
3791
|
+
skipWhitespace: () => zr,
|
3792
|
+
});
|
3793
|
+
function Jo(e, t) {
|
3794
|
+
if (t === !1) return !1;
|
3795
|
+
if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
|
3796
|
+
for (let r = t + 2; r < e.length; ++r)
|
3797
|
+
if (e.charAt(r) === "*" && e.charAt(r + 1) === "/") return r + 2;
|
3798
|
+
}
|
3799
|
+
return t;
|
3800
|
+
}
|
3801
|
+
var Ce = Jo;
|
3802
|
+
function Xo(e, t) {
|
3803
|
+
return t === !1
|
3804
|
+
? !1
|
3805
|
+
: e.charAt(t) === "/" && e.charAt(t + 1) === "/"
|
3806
|
+
? nt(e, t)
|
3807
|
+
: t;
|
3808
|
+
}
|
3809
|
+
var ge = Xo;
|
3810
|
+
function Zo(e, t) {
|
3811
|
+
let r = null,
|
3812
|
+
n = t;
|
3813
|
+
for (; n !== r; )
|
3814
|
+
(r = n), (n = T(e, n)), (n = Ce(e, n)), (n = ge(e, n)), (n = M(e, n));
|
3815
|
+
return n;
|
3816
|
+
}
|
3817
|
+
var je = Zo;
|
3818
|
+
function Qo(e, t) {
|
3819
|
+
let r = null,
|
3820
|
+
n = t;
|
3821
|
+
for (; n !== r; ) (r = n), (n = rt(e, n)), (n = Ce(e, n)), (n = T(e, n));
|
3822
|
+
return (n = ge(e, n)), (n = M(e, n)), n !== !1 && V(e, n);
|
3823
|
+
}
|
3824
|
+
var gt = Qo;
|
3825
|
+
function ei(e, t) {
|
3826
|
+
let r = e.lastIndexOf(`
|
3827
|
+
`);
|
3828
|
+
return r === -1 ? 0 : me(e.slice(r + 1).match(/^[\t ]*/u)[0], t);
|
3829
|
+
}
|
3830
|
+
var pu = ei;
|
3831
|
+
function ur(e) {
|
3832
|
+
if (typeof e != "string") throw new TypeError("Expected a string");
|
3833
|
+
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
3834
|
+
}
|
3835
|
+
function ti(e, t) {
|
3836
|
+
let r = e.match(new RegExp(`(${ur(t)})+`, "gu"));
|
3837
|
+
return r === null
|
3838
|
+
? 0
|
3839
|
+
: r.reduce((n, o) => Math.max(n, o.length / t.length), 0);
|
3840
|
+
}
|
3841
|
+
var du = ti;
|
3842
|
+
function ri(e, t) {
|
3843
|
+
let r = je(e, t);
|
3844
|
+
return r === !1 ? "" : e.charAt(r);
|
3845
|
+
}
|
3846
|
+
var Fu = ri;
|
3847
|
+
function ni(e, t, r) {
|
3848
|
+
for (let n = t; n < r; ++n)
|
3849
|
+
if (
|
3850
|
+
e.charAt(n) ===
|
3851
|
+
`
|
3852
|
+
`
|
3853
|
+
)
|
3854
|
+
return !0;
|
3855
|
+
return !1;
|
3856
|
+
}
|
3857
|
+
var mu = ni;
|
3858
|
+
function ui(e, t, r = {}) {
|
3859
|
+
return T(e, r.backwards ? t - 1 : t, r) !== t;
|
3860
|
+
}
|
3861
|
+
var Eu = ui;
|
3862
|
+
function oi(e, t, r) {
|
3863
|
+
let n = t === '"' ? "'" : '"',
|
3864
|
+
u = ne(!1, e, /\\(.)|(["'])/gsu, (i, s, a) =>
|
3865
|
+
s === n
|
3866
|
+
? s
|
3867
|
+
: a === t
|
3868
|
+
? "\\" + a
|
3869
|
+
: a ||
|
3870
|
+
(r && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(s)
|
3871
|
+
? s
|
3872
|
+
: "\\" + s),
|
3873
|
+
);
|
3874
|
+
return t + u + t;
|
3875
|
+
}
|
3876
|
+
var hu = oi;
|
3877
|
+
function ii(e, t, r) {
|
3878
|
+
return je(e, r(t));
|
3879
|
+
}
|
3880
|
+
function si(e, t) {
|
3881
|
+
return arguments.length === 2 || typeof t == "number"
|
3882
|
+
? je(e, t)
|
3883
|
+
: ii(...arguments);
|
3884
|
+
}
|
3885
|
+
function ai(e, t, r) {
|
3886
|
+
return Le(e, r(t));
|
3887
|
+
}
|
3888
|
+
function Di(e, t) {
|
3889
|
+
return arguments.length === 2 || typeof t == "number"
|
3890
|
+
? Le(e, t)
|
3891
|
+
: ai(...arguments);
|
3892
|
+
}
|
3893
|
+
function li(e, t, r) {
|
3894
|
+
return gt(e, r(t));
|
3895
|
+
}
|
3896
|
+
function ci(e, t) {
|
3897
|
+
return arguments.length === 2 || typeof t == "number"
|
3898
|
+
? gt(e, t)
|
3899
|
+
: li(...arguments);
|
3900
|
+
}
|
3901
|
+
function fe(e, t = 1) {
|
3902
|
+
return async (...r) => {
|
3903
|
+
let n = r[t] ?? {},
|
3904
|
+
o = n.plugins ?? [];
|
3905
|
+
return (
|
3906
|
+
(r[t] = { ...n, plugins: Array.isArray(o) ? o : Object.values(o) }),
|
3907
|
+
e(...r)
|
3908
|
+
);
|
3909
|
+
};
|
3910
|
+
}
|
3911
|
+
var Cu = fe(rr);
|
3912
|
+
async function gu(e, t) {
|
3913
|
+
let { formatted: r } = await Cu(e, { ...t, cursorOffset: -1 });
|
3914
|
+
return r;
|
3915
|
+
}
|
3916
|
+
async function fi(e, t) {
|
3917
|
+
return (await gu(e, t)) === e;
|
3918
|
+
}
|
3919
|
+
var pi = fe(ot, 0),
|
3920
|
+
di = {
|
3921
|
+
parse: fe(su),
|
3922
|
+
formatAST: fe(au),
|
3923
|
+
formatDoc: fe(Du),
|
3924
|
+
printToDoc: fe(lu),
|
3925
|
+
printDocToString: fe(cu),
|
3926
|
+
};
|
3927
|
+
var fc = ir;
|
3928
|
+
export {
|
3929
|
+
di as __debug,
|
3930
|
+
fi as check,
|
3931
|
+
fc as default,
|
3932
|
+
nr as doc,
|
3933
|
+
gu as format,
|
3934
|
+
Cu as formatWithCursor,
|
3935
|
+
pi as getSupportInfo,
|
3936
|
+
or as util,
|
3937
|
+
fu as version,
|
3938
|
+
};
|