oxfmt 0.57.0 → 0.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/configuration_schema.json +3 -3
  2. package/dist/{acorn-LGWopQvF.js → acorn-Dxp-n4ed.js} +1984 -1801
  3. package/dist/{angular-BbAuvH72.js → angular-Clx-wbm6.js} +1750 -995
  4. package/dist/{apis-CvFX8LhR.js → apis-D299uPBa.js} +4 -4
  5. package/dist/babel-7tfAjQas.js +10005 -0
  6. package/dist/{bindings-Cj_GMsoO.js → bindings-CjOHPMBU.js} +26 -26
  7. package/dist/{chunk-DSjvVL_1-DllBg9tc.js → chunk-DSjvVL_1-Do0Iorfu.js} +1 -1
  8. package/dist/cli-worker.d.ts +21 -27
  9. package/dist/cli-worker.js +1 -1
  10. package/dist/cli.js +3 -2
  11. package/dist/{dist-BKyxiMdj.js → dist-Byfj_1s9.js} +17 -17
  12. package/dist/estree-CyQu6pff.js +8006 -0
  13. package/dist/flow-BH5imzwC.js +9164 -0
  14. package/dist/{glimmer-Ba_8Z2bG.js → glimmer-B5hfTXAX.js} +295 -213
  15. package/dist/{graphql-CZ7EPWgo.js → graphql-DQB_nHt9.js} +968 -818
  16. package/dist/{html-DblM11Xw.js → html--849eFzc.js} +1531 -1318
  17. package/dist/index.d.ts +7 -3
  18. package/dist/index.js +3 -3
  19. package/dist/{jiti-Bb1dT6Cw-0c6As3U-.js → jiti-Bb1dT6Cw-cY1yrK9n.js} +2 -2
  20. package/dist/markdown-B1lBrqaF.js +14043 -0
  21. package/dist/{meriyah-DafjRZfO.js → meriyah-B5wbO5kj.js} +1568 -1445
  22. package/dist/{migrate-prettier-DrYAkU3F.js → migrate-prettier-CbxtU9AG.js} +49 -42
  23. package/dist/{plugin-BuVceHGR.js → plugin-D1B0s0iv.js} +16 -12
  24. package/dist/{postcss-CkhtwsAS.js → postcss-DuOoF7OX.js} +2243 -2013
  25. package/dist/{prettier-DKAx5A83.js → prettier-CEZwFZsY.js} +5673 -5038
  26. package/dist/{sorter-BZkvDMjt-C8qUPUh2.js → sorter-BZkvDMjt-DFTeIPU-.js} +7 -7
  27. package/dist/{sorter-DSVZH4kF.js → sorter-Cm0Z2eGI.js} +1 -1
  28. package/dist/{typescript-DaxiA0nr.js → typescript-Cvdwz3-D.js} +10574 -10254
  29. package/dist/{v3-D-mr2VVh-Ch8a-2Ce.js → v3-D-mr2VVh-C_WUxELf.js} +6 -5
  30. package/dist/{v4-C-HWEQJm-DheWK34Z.js → v4-C-HWEQJm-C0ut0NwJ.js} +108 -30
  31. package/dist/yaml-Dd4aShtG.js +6210 -0
  32. package/package.json +20 -20
  33. package/dist/babel-DLjwvkt5.js +0 -9884
  34. package/dist/estree-DbmUPhmV.js +0 -7269
  35. package/dist/flow-CJbpv7JL.js +0 -52916
  36. package/dist/markdown-B5hFVJKQ.js +0 -6880
  37. package/dist/yaml-BC7gw7un.js +0 -5280
@@ -1,125 +1,167 @@
1
1
  import { n as __esmMin } from "./rolldown-runtime-CE-6LUnI.js";
2
- //#region ../../node_modules/.pnpm/prettier@3.8.4/node_modules/prettier/plugins/graphql.mjs
3
- function x(e) {
4
- return S(e), {
5
- type: Ee,
2
+ //#region ../../node_modules/.pnpm/prettier@3.9.5/node_modules/prettier/plugins/graphql.mjs
3
+ function m(e) {
4
+ return O(e), {
5
+ type: Ie,
6
6
  contents: e
7
7
  };
8
8
  }
9
- function y(e, t = {}) {
10
- return S(e), Y(t.expandedStates, !0), {
11
- type: Te,
9
+ function N(e, t = {}) {
10
+ return O(e), J(t.expandedStates, !0), {
11
+ type: ge,
12
12
  id: t.id,
13
13
  contents: e,
14
14
  break: !!t.shouldBreak,
15
15
  expandedStates: t.expandedStates
16
16
  };
17
17
  }
18
- function I(e, t = "", n = {}) {
19
- return S(e), t !== "" && S(t), {
20
- type: Ne,
18
+ function _(e, t = "", n = {}) {
19
+ return O(e), t !== "" && O(t), {
20
+ type: Se,
21
21
  breakContents: e,
22
22
  flatContents: t,
23
23
  groupId: n.groupId
24
24
  };
25
25
  }
26
- function E(e, t) {
27
- S(e), Y(t);
26
+ function d(e, t) {
27
+ O(e), J(t);
28
28
  let n = [];
29
- for (let i = 0; i < t.length; i++) i !== 0 && n.push(e), n.push(t[i]);
29
+ for (let r = 0; r < t.length; r++) r !== 0 && n.push(e), n.push(t[r]);
30
30
  return n;
31
31
  }
32
- function j(e) {
33
- return (t, n, i) => {
34
- let r = !!i?.backwards;
32
+ function W(e) {
33
+ return (t, n, r) => {
35
34
  if (n === !1) return !1;
36
- let { length: s } = t, a = n;
35
+ let i = !!r?.backwards, { length: s } = t, a = n;
37
36
  for (; a >= 0 && a < s;) {
38
- let u = t.charAt(a);
37
+ let p = t.charAt(a);
39
38
  if (e instanceof RegExp) {
40
- if (!e.test(u)) return a;
41
- } else if (!e.includes(u)) return a;
42
- r ? a-- : a++;
39
+ if (!e.test(p)) return a;
40
+ } else if (!e.includes(p)) return a;
41
+ i ? a-- : a++;
43
42
  }
44
43
  return a === -1 || a === s ? a : !1;
45
44
  };
46
45
  }
47
- function mt(e, t, n) {
48
- let i = !!n?.backwards;
46
+ function Dt(e, t, n) {
49
47
  if (t === !1) return !1;
50
- let r = e.charAt(t);
51
- if (i) {
52
- if (e.charAt(t - 1) === "\r" && r === `
48
+ let r = !!n?.backwards, i = e.charAt(t);
49
+ if (r) {
50
+ if (e.charAt(t - 1) === "\r" && i === `
53
51
  `) return t - 2;
54
- if (Oe(r)) return t - 1;
52
+ if (Ce(i)) return t - 1;
55
53
  } else {
56
- if (r === "\r" && e.charAt(t + 1) === `
54
+ if (i === "\r" && e.charAt(t + 1) === `
57
55
  `) return t + 2;
58
- if (Oe(r)) return t + 1;
56
+ if (Ce(i)) return t + 1;
59
57
  }
60
58
  return t;
61
59
  }
62
- function Et(e, t, n = {}) {
63
- let i = $(e, n.backwards ? t - 1 : t, n);
64
- return i !== X(e, i, n);
60
+ function _t(e, t, n = {}) {
61
+ let r = z(e, n.backwards ? t - 1 : t, n);
62
+ return r !== Z(e, r, n);
63
+ }
64
+ function It(e, t) {
65
+ let n = e.node;
66
+ return n.printed = !0, t.printer.printComment(e, t);
67
+ }
68
+ function ue(e, t, n = {}) {
69
+ let { indent: r = !1, marker: i, filter: s = At } = n, a = new Set(e.node?.comments?.filter((x) => !(x.leading || x.trailing || x.marker !== i || !s(x))));
70
+ if (a.size === 0) return "";
71
+ let E = d(l, e.map(({ node: x }) => a.has(x) ? It(e, t) : "", "comments").filter(Boolean));
72
+ return r ? m([l, E]) : E;
73
+ }
74
+ function gt(e) {
75
+ return Array.isArray(e) && e.length > 0;
76
+ }
77
+ function j(e) {
78
+ if (K !== null && typeof K.property) {
79
+ let t = K;
80
+ return K = j.prototype = null, t;
81
+ }
82
+ return K = j.prototype = e ?? Object.create(null), new j();
83
+ }
84
+ function de(e) {
85
+ return j(e);
65
86
  }
66
- function Tt(e, t) {
87
+ function Ot(e, t = "type") {
88
+ de(e);
89
+ function n(r) {
90
+ let i = r[t], s = e[i];
91
+ if (!Array.isArray(s)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${i}'.`), { node: r });
92
+ return s;
93
+ }
94
+ return n;
95
+ }
96
+ function fe(e, t) {
97
+ e.kind === "StringValue" && e.block && !e.value.includes(`
98
+ `) && (t.value = e.value.trim());
99
+ }
100
+ function kt(e, t) {
67
101
  if (t === !1) return !1;
68
102
  if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
69
103
  for (let n = t + 2; n < e.length; ++n) if (e.charAt(n) === "*" && e.charAt(n + 1) === "/") return n + 2;
70
104
  }
71
105
  return t;
72
106
  }
73
- function Nt(e, t) {
74
- return t === !1 ? !1 : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? Ae(e, t) : t;
107
+ function Ct(e, t) {
108
+ return t === !1 ? !1 : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? ke(e, t) : t;
75
109
  }
76
- function xt(e, t) {
77
- let n = null, i = t;
78
- for (; i !== n;) n = i, i = ye(e, i), i = De(e, i), i = $(e, i);
79
- return i = ge(e, i), i = X(e, i), i !== !1 && Ie(e, i);
110
+ function Rt(e, t) {
111
+ let n = null, r = t;
112
+ for (; r !== n;) n = r, r = ve(e, r), r = Ke(e, r), r = z(e, r);
113
+ return r = je(e, r), r = Z(e, r), r !== !1 && Re(e, r);
80
114
  }
81
- function _t(e) {
82
- return Array.isArray(e) && e.length > 0;
115
+ function I(e, t, n, r) {
116
+ return e.map(({ isLast: i, node: s }) => {
117
+ let a = n();
118
+ return !i && Ye(t.originalText, te(s)) ? [a, l] : a;
119
+ }, r);
83
120
  }
84
- function w(e) {
85
- if (P !== null && typeof P.property) {
86
- let t = P;
87
- return P = w.prototype = null, t;
88
- }
89
- return P = w.prototype = e ?? Object.create(null), new w();
121
+ function me(e, t, n) {
122
+ let { node: r } = e;
123
+ return T(r.arguments) ? N([
124
+ "(",
125
+ m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
126
+ u,
127
+ ")"
128
+ ]) : "";
90
129
  }
91
- function ae(e) {
92
- return w(e);
130
+ function A(e, t, n) {
131
+ let { node: r } = e;
132
+ if (!r.description) return "";
133
+ let i = [n("description")];
134
+ return r.kind === "InputValueDefinition" && !r.description.block ? i.push(S) : i.push(l), i;
93
135
  }
94
- function At(e, t = "type") {
95
- ae(e);
96
- function n(i) {
97
- let r = i[t], s = e[r];
98
- if (!Array.isArray(s)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${r}'.`), { node: i });
99
- return s;
100
- }
101
- return n;
136
+ function y(e, t) {
137
+ let { node: n } = e;
138
+ if (!T(n.directives)) return "";
139
+ let r = d(S, e.map(t, "directives"));
140
+ return n.kind === "FragmentDefinition" || n.kind === "OperationDefinition" ? N([S, r]) : [" ", N(m([u, r]))];
102
141
  }
103
- function It(e, t, n) {
104
- let { node: i } = e;
105
- if (!i.description) return "";
106
- let r = [n("description")];
107
- return i.kind === "InputValueDefinition" && !i.description.block ? r.push(k) : r.push(f), r;
142
+ function he(e, t) {
143
+ let { node: n } = e;
144
+ return T(n.variableDefinitions) ? N([
145
+ "(",
146
+ m([u, d([_("", ", "), u], e.map(t, "variableDefinitions"))]),
147
+ u,
148
+ ")"
149
+ ]) : "";
108
150
  }
109
- function Dt(e, t, n) {
110
- let { node: i } = e;
111
- switch (i.kind) {
112
- case "Document": return [...E(f, g(e, t, n, "definitions")), f];
151
+ function Lt(e, t, n) {
152
+ let { node: r } = e;
153
+ switch (r.kind) {
154
+ case "Document": return [...d(l, I(e, t, n, "definitions")), l];
113
155
  case "OperationDefinition": {
114
- let r = t.originalText[J(i)] !== "{", s = !!i.name;
156
+ let i = t.originalText[ee(r)] !== "{", s = !!r.name;
115
157
  return [
116
158
  A(e, t, n),
117
- r ? i.operation : "",
118
- r && s ? [" ", n("name")] : "",
119
- r && !s && se(i.variableDefinitions) ? " " : "",
120
- Be(e, n),
121
- _(e, n, i),
122
- !r && !s ? "" : " ",
159
+ i ? r.operation : "",
160
+ i && s ? [" ", n("name")] : "",
161
+ i && !s && T(r.variableDefinitions) ? " " : "",
162
+ he(e, n),
163
+ y(e, n),
164
+ !i && !s ? "" : " ",
123
165
  n("selectionSet")
124
166
  ];
125
167
  }
@@ -127,74 +169,80 @@ function Dt(e, t, n) {
127
169
  A(e, t, n),
128
170
  "fragment ",
129
171
  n("name"),
130
- Be(e, n),
172
+ he(e, n),
131
173
  " on ",
132
174
  n("typeCondition"),
133
- _(e, n, i),
175
+ y(e, n),
134
176
  " ",
135
177
  n("selectionSet")
136
178
  ];
137
179
  case "SelectionSet": return [
138
180
  "{",
139
- x([f, E(f, g(e, t, n, "selections"))]),
140
- f,
181
+ m([l, d(l, I(e, t, n, "selections"))]),
182
+ l,
141
183
  "}"
142
184
  ];
143
- case "Field": return y([
144
- i.alias ? [n("alias"), ": "] : "",
185
+ case "Field": return N([
186
+ r.alias ? [n("alias"), ": "] : "",
145
187
  n("name"),
146
- i.arguments.length > 0 ? y([
188
+ T(r.arguments) ? N([
147
189
  "(",
148
- x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]),
149
- l,
190
+ m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
191
+ u,
150
192
  ")"
151
193
  ]) : "",
152
- _(e, n, i),
153
- i.selectionSet ? " " : "",
194
+ y(e, n),
195
+ r.selectionSet ? " " : "",
154
196
  n("selectionSet")
155
197
  ]);
156
- case "Name": return i.value;
198
+ case "Name": return r.value;
157
199
  case "StringValue":
158
- if (i.block) {
159
- let r = U(0, i.value, "\"\"\"", "\\\"\"\"").split(`
200
+ if (r.block) {
201
+ let i = X(0, r.value, "\"\"\"", "\\\"\"\"").split(`
160
202
  `);
161
- return r.length === 1 && (r[0] = r[0].trim()), r.every((s) => s === "") && (r.length = 0), E(f, [
203
+ return i.length === 1 && (i[0] = i[0].trim()), i.every((s) => s === "") && (i.length = 0), d(l, [
162
204
  "\"\"\"",
163
- ...r,
205
+ ...i,
164
206
  "\"\"\""
165
207
  ]);
166
208
  }
167
209
  return [
168
210
  "\"",
169
- U(0, U(0, i.value, /["\\]/gu, "\\$&"), `
211
+ X(0, X(0, r.value, /["\\]/g, "\\$&"), `
170
212
  `, "\\n"),
171
213
  "\""
172
214
  ];
173
215
  case "IntValue":
174
216
  case "FloatValue":
175
- case "EnumValue": return i.value;
176
- case "BooleanValue": return i.value ? "true" : "false";
217
+ case "EnumValue": return r.value;
218
+ case "BooleanValue": return r.value ? "true" : "false";
177
219
  case "NullValue": return "null";
178
220
  case "Variable": return ["$", n("name")];
179
- case "ListValue": return y([
180
- "[",
181
- x([l, E([I("", ", "), l], e.map(n, "values"))]),
182
- l,
183
- "]"
184
- ]);
221
+ case "ListValue": {
222
+ let i = !T(r.values);
223
+ return N([
224
+ "[",
225
+ ue(e, t, { indent: !0 }),
226
+ i ? "" : m([u, d([_("", ", "), u], e.map(n, "values"))]),
227
+ u,
228
+ "]"
229
+ ]);
230
+ }
185
231
  case "ObjectValue": {
186
- let r = t.bracketSpacing && i.fields.length > 0 ? " " : "";
187
- return y([
232
+ let i = !T(r.fields), s = t.bracketSpacing && !i ? " " : "";
233
+ return N([
188
234
  "{",
189
- r,
190
- x([l, E([I("", ", "), l], e.map(n, "fields"))]),
191
- l,
192
- I("", r),
235
+ s,
236
+ ue(e, t, { indent: !0 }),
237
+ i ? "" : [m([u, d([_("", ", "), u], e.map(n, "fields"))])],
238
+ u,
239
+ _("", s),
193
240
  "}"
194
241
  ]);
195
242
  }
196
243
  case "ObjectField":
197
- case "Argument": return [
244
+ case "Argument":
245
+ case "FragmentArgument": return [
198
246
  n("name"),
199
247
  ": ",
200
248
  n("value")
@@ -202,12 +250,7 @@ function Dt(e, t, n) {
202
250
  case "Directive": return [
203
251
  "@",
204
252
  n("name"),
205
- i.arguments.length > 0 ? y([
206
- "(",
207
- x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]),
208
- l,
209
- ")"
210
- ]) : ""
253
+ me(e, t, n)
211
254
  ];
212
255
  case "NamedType": return n("name");
213
256
  case "VariableDefinition": return [
@@ -215,8 +258,8 @@ function Dt(e, t, n) {
215
258
  n("variable"),
216
259
  ": ",
217
260
  n("type"),
218
- i.defaultValue ? [" = ", n("defaultValue")] : "",
219
- _(e, n, i)
261
+ r.defaultValue ? [" = ", n("defaultValue")] : "",
262
+ y(e, n)
220
263
  ];
221
264
  case "ObjectTypeExtension":
222
265
  case "ObjectTypeDefinition":
@@ -224,124 +267,131 @@ function Dt(e, t, n) {
224
267
  case "InputObjectTypeDefinition":
225
268
  case "InterfaceTypeExtension":
226
269
  case "InterfaceTypeDefinition": {
227
- let { kind: r } = i, s = [];
228
- return r.endsWith("TypeDefinition") ? s.push(A(e, t, n)) : s.push("extend "), r.startsWith("ObjectType") ? s.push("type") : r.startsWith("InputObjectType") ? s.push("input") : s.push("interface"), s.push(" ", n("name")), !r.startsWith("InputObjectType") && i.interfaces.length > 0 && s.push(" implements ", ...kt(e, t, n)), s.push(_(e, n, i)), i.fields.length > 0 && s.push([
270
+ let { kind: i } = r, s = [];
271
+ return i.endsWith("TypeDefinition") ? s.push(A(e, t, n)) : s.push("extend "), i.startsWith("ObjectType") ? s.push("type") : i.startsWith("InputObjectType") ? s.push("input") : s.push("interface"), s.push(" ", n("name")), !i.startsWith("InputObjectType") && T(r.interfaces) && s.push(" implements ", m([N([d([" &", S], e.map(n, "interfaces"))])])), s.push(y(e, n)), T(r.fields) && s.push([
229
272
  " {",
230
- x([f, E(f, g(e, t, n, "fields"))]),
231
- f,
273
+ m([l, d(l, I(e, t, n, "fields"))]),
274
+ l,
232
275
  "}"
233
276
  ]), s;
234
277
  }
235
278
  case "FieldDefinition": return [
236
279
  A(e, t, n),
237
280
  n("name"),
238
- i.arguments.length > 0 ? y([
281
+ T(r.arguments) ? N([
239
282
  "(",
240
- x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]),
241
- l,
283
+ m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
284
+ u,
242
285
  ")"
243
286
  ]) : "",
244
287
  ": ",
245
288
  n("type"),
246
- _(e, n, i)
289
+ y(e, n)
247
290
  ];
248
291
  case "DirectiveDefinition": return [
249
292
  A(e, t, n),
250
293
  "directive ",
251
294
  "@",
252
295
  n("name"),
253
- i.arguments.length > 0 ? y([
296
+ T(r.arguments) ? N([
254
297
  "(",
255
- x([l, E([I("", ", "), l], g(e, t, n, "arguments"))]),
256
- l,
298
+ m([u, d([_("", ", "), u], I(e, t, n, "arguments"))]),
299
+ u,
257
300
  ")"
258
301
  ]) : "",
259
- i.repeatable ? " repeatable" : "",
302
+ y(e, n),
303
+ r.repeatable ? " repeatable" : "",
260
304
  " on ",
261
- ...E(" | ", e.map(n, "locations"))
305
+ ...d(" | ", e.map(n, "locations"))
306
+ ];
307
+ case "DirectiveExtension": return [
308
+ "extend directive @",
309
+ n("name"),
310
+ y(e, n)
262
311
  ];
263
312
  case "EnumTypeExtension":
264
313
  case "EnumTypeDefinition": return [
265
314
  A(e, t, n),
266
- i.kind === "EnumTypeExtension" ? "extend " : "",
315
+ r.kind === "EnumTypeExtension" ? "extend " : "",
267
316
  "enum ",
268
317
  n("name"),
269
- _(e, n, i),
270
- i.values.length > 0 ? [
318
+ y(e, n),
319
+ T(r.values) ? [
271
320
  " {",
272
- x([f, E(f, g(e, t, n, "values"))]),
273
- f,
321
+ m([l, d(l, I(e, t, n, "values"))]),
322
+ l,
274
323
  "}"
275
324
  ] : ""
276
325
  ];
277
326
  case "EnumValueDefinition": return [
278
327
  A(e, t, n),
279
328
  n("name"),
280
- _(e, n, i)
329
+ y(e, n)
281
330
  ];
282
331
  case "InputValueDefinition": return [
283
332
  A(e, t, n),
284
333
  n("name"),
285
334
  ": ",
286
335
  n("type"),
287
- i.defaultValue ? [" = ", n("defaultValue")] : "",
288
- _(e, n, i)
336
+ r.defaultValue ? [" = ", n("defaultValue")] : "",
337
+ y(e, n)
289
338
  ];
290
339
  case "SchemaExtension": return [
291
340
  "extend schema",
292
- _(e, n, i),
293
- ...i.operationTypes.length > 0 ? [
341
+ y(e, n),
342
+ ...T(r.operationTypes) ? [
294
343
  " {",
295
- x([f, E(f, g(e, t, n, "operationTypes"))]),
296
- f,
344
+ m([l, d(l, I(e, t, n, "operationTypes"))]),
345
+ l,
297
346
  "}"
298
347
  ] : []
299
348
  ];
300
349
  case "SchemaDefinition": return [
301
350
  A(e, t, n),
302
351
  "schema",
303
- _(e, n, i),
352
+ y(e, n),
304
353
  " {",
305
- i.operationTypes.length > 0 ? x([f, E(f, g(e, t, n, "operationTypes"))]) : "",
306
- f,
354
+ T(r.operationTypes) ? m([l, d(l, I(e, t, n, "operationTypes"))]) : "",
355
+ l,
307
356
  "}"
308
357
  ];
309
358
  case "OperationTypeDefinition": return [
310
- i.operation,
359
+ r.operation,
311
360
  ": ",
312
361
  n("type")
313
362
  ];
314
363
  case "FragmentSpread": return [
315
364
  "...",
316
365
  n("name"),
317
- _(e, n, i)
366
+ me(e, t, n),
367
+ y(e, n)
318
368
  ];
319
369
  case "InlineFragment": return [
320
370
  "...",
321
- i.typeCondition ? [" on ", n("typeCondition")] : "",
322
- _(e, n, i),
371
+ r.typeCondition ? [" on ", n("typeCondition")] : "",
372
+ y(e, n),
323
373
  " ",
324
374
  n("selectionSet")
325
375
  ];
326
376
  case "UnionTypeExtension":
327
- case "UnionTypeDefinition": return y([A(e, t, n), y([
328
- i.kind === "UnionTypeExtension" ? "extend " : "",
377
+ case "UnionTypeDefinition": return N([A(e, t, n), N([
378
+ r.kind === "UnionTypeExtension" ? "extend " : "",
329
379
  "union ",
330
380
  n("name"),
331
- _(e, n, i),
332
- i.types.length > 0 ? [
381
+ y(e, n),
382
+ T(r.types) ? [
333
383
  " =",
334
- I("", " "),
335
- x([I([k, "| "]), E([k, "| "], e.map(n, "types"))])
384
+ _("", " "),
385
+ m([_([S, "| "]), d([S, "| "], e.map(n, "types"))])
336
386
  ] : ""
337
387
  ])]);
338
388
  case "ScalarTypeExtension":
339
389
  case "ScalarTypeDefinition": return [
340
390
  A(e, t, n),
341
- i.kind === "ScalarTypeExtension" ? "extend " : "",
391
+ r.kind === "ScalarTypeExtension" ? "extend " : "",
342
392
  "scalar ",
343
393
  n("name"),
344
- _(e, n, i)
394
+ y(e, n)
345
395
  ];
346
396
  case "NonNullType": return [n("type"), "!"];
347
397
  case "ListType": return [
@@ -349,302 +399,280 @@ function Dt(e, t, n) {
349
399
  n("type"),
350
400
  "]"
351
401
  ];
352
- default: throw new ke(i, "Graphql", "kind");
402
+ default: throw new Le(r, "Graphql", "kind");
353
403
  }
354
404
  }
355
- function _(e, t, n) {
356
- if (n.directives.length === 0) return "";
357
- let i = E(k, e.map(t, "directives"));
358
- return n.kind === "FragmentDefinition" || n.kind === "OperationDefinition" ? y([k, i]) : [" ", y(x([l, i]))];
359
- }
360
- function g(e, t, n, i) {
361
- return e.map(({ isLast: r, node: s }) => {
362
- let a = n();
363
- return !r && Se(t.originalText, q(s)) ? [a, f] : a;
364
- }, i);
365
- }
366
- function gt(e) {
405
+ function bt(e) {
367
406
  return e.kind !== "Comment";
368
407
  }
369
- function St({ node: e }) {
408
+ function Ft({ node: e }) {
370
409
  if (e.kind === "Comment") return "#" + e.value.trimEnd();
371
410
  throw new Error("Not a comment: " + JSON.stringify(e));
372
411
  }
373
- function kt(e, t, n) {
374
- let { node: i } = e, r = [], { interfaces: s } = i, a = e.map(n, "interfaces");
375
- for (let u = 0; u < s.length; u++) {
376
- let p = s[u];
377
- r.push(a[u]);
378
- let T = s[u + 1];
379
- if (T) {
380
- let D = t.originalText.slice(p.loc.end, T.loc.start).includes("#");
381
- r.push(" &", D ? k : " ");
382
- }
383
- }
384
- return r;
385
- }
386
- function Be(e, t) {
387
- let { node: n } = e;
388
- return se(n.variableDefinitions) ? y([
389
- "(",
390
- x([l, E([I("", ", "), l], e.map(t, "variableDefinitions"))]),
391
- l,
392
- ")"
393
- ]) : "";
394
- }
395
- function Ue(e, t) {
396
- e.kind === "StringValue" && e.block && !e.value.includes(`
397
- `) && (t.value = e.value.trim());
398
- }
399
- function Ct(e) {
412
+ function Pt(e) {
400
413
  let { node: t } = e;
401
414
  return t?.comments?.some((n) => n.value.trim() === "prettier-ignore");
402
415
  }
403
- function Xe(e) {
416
+ function Mt(e, t) {
417
+ return e?.__kind === t;
418
+ }
419
+ function Je(e) {
404
420
  return typeof e == "object" && e !== null;
405
421
  }
406
- function He(e, t) {
407
- if (!!!e) throw new Error(t ?? "Unexpected invariant triggered.");
422
+ function We(e, t) {
423
+ if (!e) throw new Error(t ?? "Unexpected invariant triggered.");
408
424
  }
409
- function M(e, t) {
410
- let n = 0, i = 1;
411
- for (let r of e.body.matchAll(bt)) {
412
- if (typeof r.index == "number" || He(!1), r.index >= t) break;
413
- n = r.index + r[0].length, i += 1;
425
+ function w(e, t) {
426
+ let n = 0, r = 1;
427
+ for (let i of e.body.matchAll(Ut)) {
428
+ if (typeof i.index != "number" && We(!1), i.index >= t) break;
429
+ n = i.index + i[0].length, r += 1;
414
430
  }
415
431
  return {
416
- line: i,
432
+ line: r,
417
433
  column: t + 1 - n
418
434
  };
419
435
  }
420
- function qe(e) {
421
- return ue(e.source, M(e.source, e.start));
422
- }
423
- function ue(e, t) {
424
- let n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, u = t.line === 1 ? n : 0, p = t.column + u, T = `${e.name}:${a}:${p}
425
- `, d = i.split(/\r\n|[\n\r]/g), D = d[r];
426
- if (D.length > 120) {
427
- let O = Math.floor(p / 80), re = p % 80, N = [];
428
- for (let v = 0; v < D.length; v += 80) N.push(D.slice(v, v + 80));
429
- return T + Je([
430
- [`${a} |`, N[0]],
431
- ...N.slice(1, O + 1).map((v) => ["|", v]),
432
- ["|", "^".padStart(re)],
433
- ["|", N[O + 1]]
436
+ function Ee(e) {
437
+ return ne(e.source, w(e.source, e.start));
438
+ }
439
+ function ne(e, t) {
440
+ let n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, p = t.line === 1 ? n : 0, E = t.column + p, x = `${e.name}:${a}:${E}
441
+ `, v = r.split(/\r\n|[\n\r]/g), P = v[i];
442
+ if (P.length > 120) {
443
+ let $ = Math.floor(E / 80), G = E % 80, k = [];
444
+ for (let C = 0; C < P.length; C += 80) k.push(P.slice(C, C + 80));
445
+ return x + ze([
446
+ [`${a} |`, k[0]],
447
+ ...k.slice(1, $ + 1).map((C) => ["|", C]),
448
+ ["|", "^".padStart(G)],
449
+ ["|", k[$ + 1]]
434
450
  ]);
435
451
  }
436
- return T + Je([
437
- [`${a - 1} |`, d[r - 1]],
438
- [`${a} |`, D],
439
- ["|", "^".padStart(p)],
440
- [`${a + 1} |`, d[r + 1]]
452
+ return x + ze([
453
+ [`${a - 1} |`, v[i - 1]],
454
+ [`${a} |`, P],
455
+ ["|", "^".padStart(E)],
456
+ [`${a + 1} |`, v[i + 1]]
441
457
  ]);
442
458
  }
443
- function Je(e) {
444
- let t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
445
- return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
459
+ function ze(e) {
460
+ let t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length));
461
+ return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(`
446
462
  `);
447
463
  }
448
- function Lt(e) {
449
- let t = e[0];
450
- return t == null || "kind" in t || "length" in t ? {
451
- nodes: t,
452
- source: e[1],
453
- positions: e[2],
454
- path: e[3],
455
- originalError: e[4],
456
- extensions: e[5]
457
- } : t;
458
- }
459
- function Qe(e) {
464
+ function Ze(e) {
460
465
  return e === void 0 || e.length === 0 ? void 0 : e;
461
466
  }
462
- function h(e, t, n) {
463
- return new Q(`Syntax Error: ${n}`, {
464
- source: e,
465
- positions: [t]
466
- });
467
+ function Te(e, t) {
468
+ if (!e) throw new Error(t);
467
469
  }
468
- function We(e) {
470
+ function tt(e) {
469
471
  return e === 9 || e === 32;
470
472
  }
471
- function b(e) {
473
+ function L(e) {
472
474
  return e >= 48 && e <= 57;
473
475
  }
474
- function ze(e) {
476
+ function nt(e) {
475
477
  return e >= 97 && e <= 122 || e >= 65 && e <= 90;
476
478
  }
477
- function pe(e) {
478
- return ze(e) || e === 95;
479
+ function xe(e) {
480
+ return nt(e) || e === 95;
479
481
  }
480
- function Ke(e) {
481
- return ze(e) || b(e) || e === 95;
482
+ function it(e) {
483
+ return nt(e) || L(e) || e === 95;
482
484
  }
483
- function Ze(e) {
484
- var t;
485
- let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
486
- for (let a = 0; a < e.length; ++a) {
487
- var s;
488
- let u = e[a], p = Pt(u);
489
- p !== u.length && (i = (s = i) !== null && s !== void 0 ? s : a, r = a, a !== 0 && p < n && (n = p));
485
+ function rt(e) {
486
+ let t = Number.MAX_SAFE_INTEGER, n = null, r = -1;
487
+ for (let i = 0; i < e.length; ++i) {
488
+ let s = e[i], a = Mn(s);
489
+ a !== s.length && (n ?? (n = i), r = i, i !== 0 && a < t && (t = a));
490
490
  }
491
- return e.map((a, u) => u === 0 ? a : a.slice(n)).slice((t = i) !== null && t !== void 0 ? t : 0, r + 1);
491
+ return e.map((i, s) => s === 0 ? i : i.slice(t)).slice(n ?? 0, r + 1);
492
492
  }
493
- function Pt(e) {
493
+ function Mn(e) {
494
494
  let t = 0;
495
- for (; t < e.length && We(e.charCodeAt(t));) ++t;
495
+ for (; t < e.length && tt(e.charCodeAt(t));) ++t;
496
496
  return t;
497
497
  }
498
- function tt(e) {
498
+ function f(e, t, n) {
499
+ return new R(`Syntax Error: ${n}`, {
500
+ source: e,
501
+ positions: [t]
502
+ });
503
+ }
504
+ function Un() {
505
+ let e;
506
+ try {
507
+ let t = globalThis.process;
508
+ typeof t?.getBuiltinModule == "function" && (e = t.getBuiltinModule("node:diagnostics_channel"));
509
+ } catch {}
510
+ return e;
511
+ }
512
+ function st(e) {
513
+ if (e == null) return !1;
514
+ let t = e.hasSubscribers;
515
+ if (t !== void 0) return t;
516
+ for (let n of Bn) if (e[n].hasSubscribers) return !0;
517
+ return !1;
518
+ }
519
+ function at(e) {
499
520
  return e === o.BANG || e === o.DOLLAR || e === o.AMP || e === o.PAREN_L || e === o.PAREN_R || e === o.DOT || e === o.SPREAD || e === o.COLON || e === o.EQUALS || e === o.AT || e === o.BRACKET_L || e === o.BRACKET_R || e === o.BRACE_L || e === o.PIPE || e === o.BRACE_R;
500
521
  }
501
- function L(e) {
522
+ function U(e) {
502
523
  return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
503
524
  }
504
- function K(e, t) {
505
- return nt(e.charCodeAt(t)) && rt(e.charCodeAt(t + 1));
525
+ function re(e, t) {
526
+ return ct(e.charCodeAt(t)) && pt(e.charCodeAt(t + 1));
506
527
  }
507
- function nt(e) {
528
+ function ct(e) {
508
529
  return e >= 55296 && e <= 56319;
509
530
  }
510
- function rt(e) {
531
+ function pt(e) {
511
532
  return e >= 56320 && e <= 57343;
512
533
  }
513
- function R(e, t) {
534
+ function F(e, t) {
514
535
  let n = e.source.body.codePointAt(t);
515
536
  if (n === void 0) return o.EOF;
516
537
  if (n >= 32 && n <= 126) {
517
- let i = String.fromCodePoint(n);
518
- return i === "\"" ? `'"'` : `"${i}"`;
538
+ let r = String.fromCodePoint(n);
539
+ return r === "\"" ? `'"'` : `"${r}"`;
519
540
  }
520
541
  return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
521
542
  }
522
- function m(e, t, n, i, r) {
543
+ function h(e, t, n, r, i) {
523
544
  let s = e.line;
524
- return new F(t, n, i, s, 1 + n - e.lineStart, r);
545
+ return new V(t, n, r, s, 1 + n - e.lineStart, i);
525
546
  }
526
- function wt(e, t) {
527
- let n = e.source.body, i = n.length, r = t;
528
- for (; r < i;) {
529
- let s = n.charCodeAt(r);
547
+ function Gn(e, t) {
548
+ let n = e.source.body, r = n.length, i = t;
549
+ for (; i < r;) {
550
+ let s = n.charCodeAt(i);
530
551
  switch (s) {
531
552
  case 65279:
532
553
  case 9:
533
554
  case 32:
534
555
  case 44:
535
- ++r;
556
+ ++i;
536
557
  continue;
537
558
  case 10:
538
- ++r, ++e.line, e.lineStart = r;
559
+ ++i, ++e.line, e.lineStart = i;
539
560
  continue;
540
561
  case 13:
541
- n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
562
+ n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i;
542
563
  continue;
543
- case 35: return Ft(e, r);
544
- case 33: return m(e, o.BANG, r, r + 1);
545
- case 36: return m(e, o.DOLLAR, r, r + 1);
546
- case 38: return m(e, o.AMP, r, r + 1);
547
- case 40: return m(e, o.PAREN_L, r, r + 1);
548
- case 41: return m(e, o.PAREN_R, r, r + 1);
549
- case 46:
550
- if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46) return m(e, o.SPREAD, r, r + 3);
564
+ case 35: return Kn(e, i);
565
+ case 33: return h(e, o.BANG, i, i + 1);
566
+ case 36: return h(e, o.DOLLAR, i, i + 1);
567
+ case 38: return h(e, o.AMP, i, i + 1);
568
+ case 40: return h(e, o.PAREN_L, i, i + 1);
569
+ case 41: return h(e, o.PAREN_R, i, i + 1);
570
+ case 46: {
571
+ let a = n.charCodeAt(i + 1);
572
+ if (a === 46 && n.charCodeAt(i + 2) === 46) return h(e, o.SPREAD, i, i + 3);
573
+ if (a === 46) throw f(e.source, i, "Unexpected \"..\", did you mean \"...\"?");
574
+ if (L(a)) {
575
+ let p = e.source.body.slice(i + 1, ie(e, i + 1, a));
576
+ throw f(e.source, i, `Invalid number, expected digit before ".", did you mean "0.${p}"?`);
577
+ }
551
578
  break;
552
- case 58: return m(e, o.COLON, r, r + 1);
553
- case 61: return m(e, o.EQUALS, r, r + 1);
554
- case 64: return m(e, o.AT, r, r + 1);
555
- case 91: return m(e, o.BRACKET_L, r, r + 1);
556
- case 93: return m(e, o.BRACKET_R, r, r + 1);
557
- case 123: return m(e, o.BRACE_L, r, r + 1);
558
- case 124: return m(e, o.PIPE, r, r + 1);
559
- case 125: return m(e, o.BRACE_R, r, r + 1);
560
- case 34: return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? Yt(e, r) : Vt(e, r);
561
- }
562
- if (b(s) || s === 45) return Mt(e, r, s);
563
- if (pe(s)) return jt(e, r);
564
- throw h(e.source, r, s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : L(s) || K(n, r) ? `Unexpected character: ${R(e, r)}.` : `Invalid character: ${R(e, r)}.`);
579
+ }
580
+ case 58: return h(e, o.COLON, i, i + 1);
581
+ case 61: return h(e, o.EQUALS, i, i + 1);
582
+ case 64: return h(e, o.AT, i, i + 1);
583
+ case 91: return h(e, o.BRACKET_L, i, i + 1);
584
+ case 93: return h(e, o.BRACKET_R, i, i + 1);
585
+ case 123: return h(e, o.BRACE_L, i, i + 1);
586
+ case 124: return h(e, o.PIPE, i, i + 1);
587
+ case 125: return h(e, o.BRACE_R, i, i + 1);
588
+ case 34: return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? Xn(e, i) : Yn(e, i);
589
+ }
590
+ if (L(s) || s === 45) return jn(e, i, s);
591
+ if (xe(s)) return Hn(e, i);
592
+ throw f(e.source, i, s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : U(s) || re(n, i) ? `Unexpected character: ${F(e, i)}.` : `Invalid character: ${F(e, i)}.`);
565
593
  }
566
- return m(e, o.EOF, i, i);
594
+ return h(e, o.EOF, r, r);
567
595
  }
568
- function Ft(e, t) {
569
- let n = e.source.body, i = n.length, r = t + 1;
570
- for (; r < i;) {
571
- let s = n.charCodeAt(r);
596
+ function Kn(e, t) {
597
+ let n = e.source.body, r = n.length, i = t + 1;
598
+ for (; i < r;) {
599
+ let s = n.charCodeAt(i);
572
600
  if (s === 10 || s === 13) break;
573
- if (L(s)) ++r;
574
- else if (K(n, r)) r += 2;
601
+ if (U(s)) ++i;
602
+ else if (re(n, i)) i += 2;
575
603
  else break;
576
604
  }
577
- return m(e, o.COMMENT, t, r, n.slice(t + 1, r));
578
- }
579
- function Mt(e, t, n) {
580
- let i = e.source.body, r = t, s = n, a = !1;
581
- if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
582
- if (s = i.charCodeAt(++r), b(s)) throw h(e.source, r, `Invalid number, unexpected digit after 0: ${R(e, r)}.`);
583
- } else r = le(e, r, s), s = i.charCodeAt(r);
584
- if (s === 46 && (a = !0, s = i.charCodeAt(++r), r = le(e, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (a = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = le(e, r, s), s = i.charCodeAt(r)), s === 46 || pe(s)) throw h(e.source, r, `Invalid number, expected digit but got: ${R(e, r)}.`);
585
- return m(e, a ? o.FLOAT : o.INT, t, r, i.slice(t, r));
586
- }
587
- function le(e, t, n) {
588
- if (!b(n)) throw h(e.source, t, `Invalid number, expected digit but got: ${R(e, t)}.`);
589
- let i = e.source.body, r = t + 1;
590
- for (; b(i.charCodeAt(r));) ++r;
591
- return r;
592
- }
593
- function Vt(e, t) {
594
- let n = e.source.body, i = n.length, r = t + 1, s = r, a = "";
595
- for (; r < i;) {
596
- let u = n.charCodeAt(r);
597
- if (u === 34) return a += n.slice(s, r), m(e, o.STRING, t, r + 1, a);
598
- if (u === 92) {
599
- a += n.slice(s, r);
600
- let p = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? Bt(e, r) : Ut(e, r) : Gt(e, r);
601
- a += p.value, r += p.size, s = r;
605
+ return h(e, o.COMMENT, t, i, n.slice(t + 1, i));
606
+ }
607
+ function jn(e, t, n) {
608
+ let r = e.source.body, i = t, s = n, a = !1;
609
+ if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
610
+ if (s = r.charCodeAt(++i), L(s)) throw f(e.source, i, `Invalid number, unexpected digit after 0: ${F(e, i)}.`);
611
+ } else i = ie(e, i, s), s = r.charCodeAt(i);
612
+ if (s === 46 && (a = !0, s = r.charCodeAt(++i), i = ie(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (a = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ie(e, i, s), s = r.charCodeAt(i)), s === 46 || xe(s)) throw f(e.source, i, `Invalid number, expected digit but got: ${F(e, i)}.`);
613
+ return h(e, a ? o.FLOAT : o.INT, t, i, r.slice(t, i));
614
+ }
615
+ function ie(e, t, n) {
616
+ if (!L(n)) throw f(e.source, t, `Invalid number, expected digit but got: ${F(e, t)}.`);
617
+ let r = e.source.body, i = t + 1;
618
+ for (; L(r.charCodeAt(i));) ++i;
619
+ return i;
620
+ }
621
+ function Yn(e, t) {
622
+ let n = e.source.body, r = n.length, i = t + 1, s = i, a = "";
623
+ for (; i < r;) {
624
+ let p = n.charCodeAt(i);
625
+ if (p === 34) return a += n.slice(s, i), h(e, o.STRING, t, i + 1, a);
626
+ if (p === 92) {
627
+ a += n.slice(s, i);
628
+ let E = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? qn(e, i) : Qn(e, i) : $n(e, i);
629
+ a += E.value, i += E.size, s = i;
602
630
  continue;
603
631
  }
604
- if (u === 10 || u === 13) break;
605
- if (L(u)) ++r;
606
- else if (K(n, r)) r += 2;
607
- else throw h(e.source, r, `Invalid character within String: ${R(e, r)}.`);
632
+ if (p === 10 || p === 13) break;
633
+ if (U(p)) ++i;
634
+ else if (re(n, i)) i += 2;
635
+ else throw f(e.source, i, `Invalid character within String: ${F(e, i)}.`);
608
636
  }
609
- throw h(e.source, r, "Unterminated string.");
637
+ throw f(e.source, i, "Unterminated string.");
610
638
  }
611
- function Bt(e, t) {
612
- let n = e.source.body, i = 0, r = 3;
613
- for (; r < 12;) {
614
- let s = n.charCodeAt(t + r++);
639
+ function qn(e, t) {
640
+ let n = e.source.body, r = 0, i = 3;
641
+ for (; i < 12;) {
642
+ let s = n.charCodeAt(t + i++);
615
643
  if (s === 125) {
616
- if (r < 5 || !L(i)) break;
644
+ if (i < 5 || !U(r)) break;
617
645
  return {
618
- value: String.fromCodePoint(i),
619
- size: r
646
+ value: String.fromCodePoint(r),
647
+ size: i
620
648
  };
621
649
  }
622
- if (i = i << 4 | V(s), i < 0) break;
650
+ if (r = r << 4 | q(s), r < 0) break;
623
651
  }
624
- throw h(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + r)}".`);
652
+ throw f(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + i)}".`);
625
653
  }
626
- function Ut(e, t) {
627
- let n = e.source.body, i = et(n, t + 2);
628
- if (L(i)) return {
629
- value: String.fromCodePoint(i),
654
+ function Qn(e, t) {
655
+ let n = e.source.body, r = ot(n, t + 2);
656
+ if (U(r)) return {
657
+ value: String.fromCodePoint(r),
630
658
  size: 6
631
659
  };
632
- if (nt(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
633
- let r = et(n, t + 8);
634
- if (rt(r)) return {
635
- value: String.fromCodePoint(i, r),
660
+ if (ct(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
661
+ let i = ot(n, t + 8);
662
+ if (pt(i)) return {
663
+ value: String.fromCodePoint(r, i),
636
664
  size: 12
637
665
  };
638
666
  }
639
- throw h(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`);
667
+ throw f(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`);
640
668
  }
641
- function et(e, t) {
642
- return V(e.charCodeAt(t)) << 12 | V(e.charCodeAt(t + 1)) << 8 | V(e.charCodeAt(t + 2)) << 4 | V(e.charCodeAt(t + 3));
669
+ function ot(e, t) {
670
+ return q(e.charCodeAt(t)) << 12 | q(e.charCodeAt(t + 1)) << 8 | q(e.charCodeAt(t + 2)) << 4 | q(e.charCodeAt(t + 3));
643
671
  }
644
- function V(e) {
672
+ function q(e) {
645
673
  return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
646
674
  }
647
- function Gt(e, t) {
675
+ function $n(e, t) {
648
676
  let n = e.source.body;
649
677
  switch (n.charCodeAt(t + 1)) {
650
678
  case 34: return {
@@ -681,220 +709,178 @@ function Gt(e, t) {
681
709
  size: 2
682
710
  };
683
711
  }
684
- throw h(e.source, t, `Invalid character escape sequence: "${n.slice(t, t + 2)}".`);
685
- }
686
- function Yt(e, t) {
687
- let n = e.source.body, i = n.length, r = e.lineStart, s = t + 3, a = s, u = "", p = [];
688
- for (; s < i;) {
689
- let T = n.charCodeAt(s);
690
- if (T === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
691
- u += n.slice(a, s), p.push(u);
692
- let d = m(e, o.BLOCK_STRING, t, s + 3, Ze(p).join(`
712
+ throw f(e.source, t, `Invalid character escape sequence: "${n.slice(t, t + 2)}".`);
713
+ }
714
+ function Xn(e, t) {
715
+ let n = e.source.body, r = n.length, i = e.lineStart, s = t + 3, a = s, p = "", E = [];
716
+ for (; s < r;) {
717
+ let x = n.charCodeAt(s);
718
+ if (x === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
719
+ p += n.slice(a, s), E.push(p);
720
+ let v = h(e, o.BLOCK_STRING, t, s + 3, rt(E).join(`
693
721
  `));
694
- return e.line += p.length - 1, e.lineStart = r, d;
722
+ return e.line += E.length - 1, e.lineStart = i, v;
695
723
  }
696
- if (T === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
697
- u += n.slice(a, s), a = s + 1, s += 4;
724
+ if (x === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
725
+ p += n.slice(a, s), a = s + 1, s += 4;
698
726
  continue;
699
727
  }
700
- if (T === 10 || T === 13) {
701
- u += n.slice(a, s), p.push(u), T === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", a = s, r = s;
728
+ if (x === 10 || x === 13) {
729
+ p += n.slice(a, s), E.push(p), x === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, p = "", a = s, i = s;
702
730
  continue;
703
731
  }
704
- if (L(T)) ++s;
705
- else if (K(n, s)) s += 2;
706
- else throw h(e.source, s, `Invalid character within String: ${R(e, s)}.`);
732
+ if (U(x)) ++s;
733
+ else if (re(n, s)) s += 2;
734
+ else throw f(e.source, s, `Invalid character within String: ${F(e, s)}.`);
707
735
  }
708
- throw h(e.source, s, "Unterminated string.");
736
+ throw f(e.source, s, "Unterminated string.");
709
737
  }
710
- function jt(e, t) {
711
- let n = e.source.body, i = n.length, r = t + 1;
712
- for (; r < i;) if (Ke(n.charCodeAt(r))) ++r;
738
+ function Hn(e, t) {
739
+ let n = e.source.body, r = n.length, i = t + 1;
740
+ for (; i < r;) if (it(n.charCodeAt(i))) ++i;
713
741
  else break;
714
- return m(e, o.NAME, t, r, n.slice(t, r));
715
- }
716
- function Z(e, t) {
717
- if (!!!e) throw new Error(t);
718
- }
719
- function ee(e) {
720
- return te(e, []);
721
- }
722
- function te(e, t) {
723
- switch (typeof e) {
724
- case "string": return JSON.stringify(e);
725
- case "function": return e.name ? `[function ${e.name}]` : "[function]";
726
- case "object": return $t(e, t);
727
- default: return String(e);
728
- }
742
+ return h(e, o.NAME, t, i, n.slice(t, i));
729
743
  }
730
- function $t(e, t) {
731
- if (e === null) return "null";
732
- if (t.includes(e)) return "[Circular]";
733
- let n = [...t, e];
734
- if (Xt(e)) {
735
- let i = e.toJSON();
736
- if (i !== e) return typeof i == "string" ? i : te(i, n);
737
- } else if (Array.isArray(e)) return Jt(e, n);
738
- return Ht(e, n);
739
- }
740
- function Xt(e) {
741
- return typeof e.toJSON == "function";
742
- }
743
- function Ht(e, t) {
744
- let n = Object.entries(e);
745
- return n.length === 0 ? "{}" : t.length > 2 ? "[" + qt(e) + "]" : "{ " + n.map(([r, s]) => r + ": " + te(s, t)).join(", ") + " }";
746
- }
747
- function Jt(e, t) {
748
- if (e.length === 0) return "[]";
749
- if (t.length > 2) return "[Array]";
750
- let n = Math.min(10, e.length), i = e.length - n, r = [];
751
- for (let s = 0; s < n; ++s) r.push(te(e[s], t));
752
- return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
753
- }
754
- function qt(e) {
755
- let t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
756
- if (t === "Object" && typeof e.constructor == "function") {
757
- let n = e.constructor.name;
758
- if (typeof n == "string" && n !== "") return n;
759
- }
760
- return t;
744
+ function lt(e) {
745
+ return He(e, ut, B);
761
746
  }
762
- function st(e) {
763
- return it(e, B);
747
+ function oe(e, t) {
748
+ return st(Ne) ? Ne.traceSync(() => dt(e, t), { source: e }) : dt(e, t);
764
749
  }
765
- function ot(e, t) {
766
- let n = new fe(e, t), i = n.parseDocument();
767
- return Object.defineProperty(i, "tokenCount", {
750
+ function dt(e, t) {
751
+ let n = new De(e, t), r = n.parseDocument();
752
+ return Object.defineProperty(r, "tokenCount", {
768
753
  enumerable: !1,
769
754
  value: n.tokenCount
770
- }), i;
755
+ }), r;
771
756
  }
772
- function ne(e) {
757
+ function se(e) {
773
758
  let t = e.value;
774
- return at(e.kind) + (t != null ? ` "${t}"` : "");
759
+ return ft(e.kind) + (t != null ? ` "${t}"` : "");
775
760
  }
776
- function at(e) {
777
- return tt(e) ? `"${e}"` : e;
761
+ function ft(e) {
762
+ return at(e) ? `"${e}"` : e;
778
763
  }
779
- function Wt(e, t) {
764
+ function ei(e, t) {
780
765
  let n = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")");
781
766
  return Object.assign(n, t);
782
767
  }
783
- function zt(e) {
784
- let t = [], { startToken: n, endToken: i } = e.loc;
785
- for (let r = n; r !== i; r = r.next) r.kind === "Comment" && t.push({
786
- ...r,
768
+ function ti(e) {
769
+ let t = [], { startToken: n, endToken: r } = e.loc;
770
+ for (let i = n; i !== r; i = i.next) i.kind === "Comment" && t.push({
771
+ ...i,
787
772
  loc: {
788
- start: r.start,
789
- end: r.end
773
+ start: i.start,
774
+ end: i.end
790
775
  }
791
776
  });
792
777
  return t;
793
778
  }
794
- function Zt(e) {
795
- if (e?.name === "GraphQLError") {
796
- let { message: t, locations: [n] } = e;
797
- return ct(t, {
798
- loc: { start: n },
799
- cause: e
800
- });
801
- }
802
- return e;
779
+ function ii(e) {
780
+ if (!(e instanceof R)) return e;
781
+ let { message: t, locations: [n] } = e;
782
+ return mt(t, {
783
+ loc: { start: n },
784
+ cause: e
785
+ });
803
786
  }
804
- function en(e) {
787
+ function ri(e) {
805
788
  let t;
806
789
  try {
807
- t = ot(e, Kt);
790
+ t = oe(e, ni);
808
791
  } catch (n) {
809
- throw Zt(n);
792
+ throw ii(n);
810
793
  }
811
- return t.comments = zt(t), t;
794
+ return t.comments = ti(t), t;
812
795
  }
813
- var pt, de, ut, me, lt, U, ht, ie, Ee, Te, Ne, G, xe, S, Y, _e, k, l, f, $, ye, Ae, Oe, X, Ie, De, ge, Se, se, oe, ke, P, yt, Ce, H, F, ce, C, Re, be, J, q, Le, Pe, we, Fe, Me, Ve, A, Ge, Ye, $e, he, bt, Q, W, c, o, z, it, B, fe, ct, Kt, tn, nn;
796
+ var Et, ae, ht, Ae, Tt, X, yt, ce, Ie, ge, Se, H, Oe, O, J, pe, S, u, l, z, ve, ke, Ce, Z, Re, At, T, le, Le, K, St, be, D, Pe, ee, te, we, Ve, Me, Ue, Be, Ge, Ke, je, Ye, qe, Qe, Xe, _e, He, Ut, R, et, Y, V, M, c, Gt, Kt, jt, Yt, qt, Qt, $t, Xt, Ht, Jt, Wt, zt, Zt, en, tn, nn, rn, sn, on, an, cn, pn, un, ln, dn, fn, mn, hn, En, Tn, xn, yn, Nn, Dn, _n, An, In, gn, Sn, On, vn, kn, Cn, Rn, Ln, bn, Fn, Pn, wn, Vn, ye, b, Ne, Bn, o, Q, ut, B, De, mt, ni, si, oi;
814
797
  //#endregion
815
798
  __esmMin((() => {
816
- pt = Object.defineProperty;
817
- de = (e, t) => {
818
- for (var n in t) pt(e, n, {
799
+ Et = Object.defineProperty;
800
+ ae = (e, t) => {
801
+ for (var n in t) Et(e, n, {
819
802
  get: t[n],
820
803
  enumerable: !0
821
804
  });
822
805
  };
823
- ut = {};
824
- de(ut, {
825
- languages: () => Ye,
826
- options: () => $e,
827
- parsers: () => he,
828
- printers: () => nn
806
+ ht = {};
807
+ ae(ht, {
808
+ languages: () => Qe,
809
+ options: () => Xe,
810
+ parsers: () => _e,
811
+ printers: () => oi
829
812
  });
830
- me = (e, t) => (n, i, ...r) => n | 1 && i == null ? void 0 : (t.call(i) ?? i[e]).apply(i, r);
831
- lt = String.prototype.replaceAll ?? function(e, t) {
813
+ Ae = (e, t) => (n, r, ...i) => n | 1 && r == null ? void 0 : (t.call(r) ?? r[e]).apply(r, i);
814
+ Tt = String.prototype.replaceAll ?? function(e, t) {
832
815
  return e.global ? this.replace(e, t) : this.split(e).join(t);
833
- }, U = me("replaceAll", function() {
834
- if (typeof this == "string") return lt;
816
+ };
817
+ X = Ae("replaceAll", function() {
818
+ if (typeof this == "string") return Tt;
835
819
  });
836
- ht = () => {}, ie = ht;
837
- Ee = "indent";
838
- Te = "group";
839
- Ne = "if-break";
840
- G = "line";
841
- xe = "break-parent";
842
- S = ie, Y = ie;
843
- _e = { type: xe };
844
- k = { type: G }, l = {
845
- type: G,
820
+ yt = () => {};
821
+ ce = yt;
822
+ Ie = "indent";
823
+ ge = "group";
824
+ Se = "if-break";
825
+ H = "line";
826
+ Oe = "break-parent";
827
+ O = ce;
828
+ J = ce;
829
+ pe = { type: Oe };
830
+ S = { type: H };
831
+ u = {
832
+ type: H,
846
833
  soft: !0
847
- }, f = [{
848
- type: G,
834
+ };
835
+ l = [{
836
+ type: H,
849
837
  hard: !0
850
- }, _e];
851
- $ = j(" "), ye = j(",; "), Ae = j(/[^\n\r]/u);
852
- Oe = (e) => e === `
838
+ }, pe];
839
+ z = W(" ");
840
+ ve = W(",; ");
841
+ ke = W(/[^\n\r]/);
842
+ Ce = (e) => e === `
853
843
  ` || e === "\r" || e === "\u2028" || e === "\u2029";
854
- X = mt;
855
- Ie = Et;
856
- De = Tt;
857
- ge = Nt;
858
- Se = xt;
859
- se = _t;
860
- oe = class extends Error {
844
+ Z = Dt;
845
+ Re = _t;
846
+ At = () => !0;
847
+ T = gt;
848
+ le = class extends Error {
861
849
  name = "UnexpectedNodeError";
862
- constructor(t, n, i = "type") {
863
- super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`), this.node = t;
864
- }
865
- }, ke = oe;
866
- P = null;
867
- yt = 10;
868
- for (let e = 0; e <= yt; e++) w();
869
- Ce = At, H = class {
870
- constructor(t, n, i) {
871
- this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
872
- }
873
- get [Symbol.toStringTag]() {
874
- return "Location";
850
+ constructor(t, n, r = "type") {
851
+ super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`), this.node = t;
875
852
  }
876
- toJSON() {
877
- return {
878
- start: this.start,
879
- end: this.end
880
- };
881
- }
882
- }, F = class {
883
- constructor(t, n, i, r, s, a) {
884
- this.kind = t, this.start = n, this.end = i, this.line = r, this.column = s, this.value = a, this.prev = null, this.next = null;
885
- }
886
- get [Symbol.toStringTag]() {
887
- return "Token";
888
- }
889
- toJSON() {
890
- return {
891
- kind: this.kind,
892
- value: this.value,
893
- line: this.line,
894
- column: this.column
895
- };
896
- }
897
- }, ce = {
853
+ };
854
+ Le = le;
855
+ K = null;
856
+ St = 10;
857
+ for (let e = 0; e <= St; e++) j();
858
+ be = Ot;
859
+ D = [
860
+ ["name"],
861
+ ["name", "value"],
862
+ ["type"],
863
+ [
864
+ "description",
865
+ "name",
866
+ "directives"
867
+ ],
868
+ [
869
+ "description",
870
+ "name",
871
+ "interfaces",
872
+ "directives",
873
+ "fields"
874
+ ],
875
+ ["name", "directives"],
876
+ [
877
+ "name",
878
+ "interfaces",
879
+ "directives",
880
+ "fields"
881
+ ]
882
+ ];
883
+ Pe = be({
898
884
  Name: [],
899
885
  Document: ["definitions"],
900
886
  OperationDefinition: [
@@ -911,7 +897,7 @@ __esmMin((() => {
911
897
  "defaultValue",
912
898
  "directives"
913
899
  ],
914
- Variable: ["name"],
900
+ Variable: D[0],
915
901
  SelectionSet: ["selections"],
916
902
  Field: [
917
903
  "alias",
@@ -920,8 +906,13 @@ __esmMin((() => {
920
906
  "directives",
921
907
  "selectionSet"
922
908
  ],
923
- Argument: ["name", "value"],
924
- FragmentSpread: ["name", "directives"],
909
+ Argument: D[1],
910
+ FragmentArgument: D[1],
911
+ FragmentSpread: [
912
+ "name",
913
+ "arguments",
914
+ "directives"
915
+ ],
925
916
  InlineFragment: [
926
917
  "typeCondition",
927
918
  "directives",
@@ -943,29 +934,19 @@ __esmMin((() => {
943
934
  EnumValue: [],
944
935
  ListValue: ["values"],
945
936
  ObjectValue: ["fields"],
946
- ObjectField: ["name", "value"],
937
+ ObjectField: D[1],
947
938
  Directive: ["name", "arguments"],
948
- NamedType: ["name"],
949
- ListType: ["type"],
950
- NonNullType: ["type"],
939
+ NamedType: D[0],
940
+ ListType: D[2],
941
+ NonNullType: D[2],
951
942
  SchemaDefinition: [
952
943
  "description",
953
944
  "directives",
954
945
  "operationTypes"
955
946
  ],
956
- OperationTypeDefinition: ["type"],
957
- ScalarTypeDefinition: [
958
- "description",
959
- "name",
960
- "directives"
961
- ],
962
- ObjectTypeDefinition: [
963
- "description",
964
- "name",
965
- "interfaces",
966
- "directives",
967
- "fields"
968
- ],
947
+ OperationTypeDefinition: D[2],
948
+ ScalarTypeDefinition: D[3],
949
+ ObjectTypeDefinition: D[4],
969
950
  FieldDefinition: [
970
951
  "description",
971
952
  "name",
@@ -980,13 +961,7 @@ __esmMin((() => {
980
961
  "defaultValue",
981
962
  "directives"
982
963
  ],
983
- InterfaceTypeDefinition: [
984
- "description",
985
- "name",
986
- "interfaces",
987
- "directives",
988
- "fields"
989
- ],
964
+ InterfaceTypeDefinition: D[4],
990
965
  UnionTypeDefinition: [
991
966
  "description",
992
967
  "name",
@@ -999,11 +974,7 @@ __esmMin((() => {
999
974
  "directives",
1000
975
  "values"
1001
976
  ],
1002
- EnumValueDefinition: [
1003
- "description",
1004
- "name",
1005
- "directives"
1006
- ],
977
+ EnumValueDefinition: D[3],
1007
978
  InputObjectTypeDefinition: [
1008
979
  "description",
1009
980
  "name",
@@ -1014,22 +985,14 @@ __esmMin((() => {
1014
985
  "description",
1015
986
  "name",
1016
987
  "arguments",
988
+ "directives",
1017
989
  "locations"
1018
990
  ],
1019
991
  SchemaExtension: ["directives", "operationTypes"],
1020
- ScalarTypeExtension: ["name", "directives"],
1021
- ObjectTypeExtension: [
1022
- "name",
1023
- "interfaces",
1024
- "directives",
1025
- "fields"
1026
- ],
1027
- InterfaceTypeExtension: [
1028
- "name",
1029
- "interfaces",
1030
- "directives",
1031
- "fields"
1032
- ],
992
+ DirectiveExtension: D[5],
993
+ ScalarTypeExtension: D[5],
994
+ ObjectTypeExtension: D[6],
995
+ InterfaceTypeExtension: D[6],
1033
996
  UnionTypeExtension: [
1034
997
  "name",
1035
998
  "directives",
@@ -1044,47 +1007,32 @@ __esmMin((() => {
1044
1007
  "name",
1045
1008
  "directives",
1046
1009
  "fields"
1047
- ],
1048
- TypeCoordinate: ["name"],
1049
- MemberCoordinate: ["name", "memberName"],
1050
- ArgumentCoordinate: [
1051
- "name",
1052
- "fieldName",
1053
- "argumentName"
1054
- ],
1055
- DirectiveCoordinate: ["name"],
1056
- DirectiveArgumentCoordinate: ["name", "argumentName"]
1057
- };
1058
- new Set(Object.keys(ce));
1059
- (function(e) {
1060
- e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
1061
- })(C || (C = {}));
1062
- Re = { ...ce };
1063
- for (let e of [
1064
- "ArgumentCoordinate",
1065
- "DirectiveArgumentCoordinate",
1066
- "DirectiveCoordinate",
1067
- "MemberCoordinate",
1068
- "TypeCoordinate"
1069
- ]) delete Re[e];
1070
- be = Ce(Re, "kind");
1071
- J = (e) => e.loc.start, q = (e) => e.loc.end;
1072
- Le = "format", Pe = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u, we = /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u;
1073
- Fe = (e) => we.test(e), Me = (e) => Pe.test(e), Ve = (e) => `# @${Le}
1010
+ ]
1011
+ }, "kind");
1012
+ ee = (e) => e.loc.start;
1013
+ te = (e) => e.loc.end;
1014
+ fe.ignoredProperties = /* @__PURE__ */ new Set(["loc", "comments"]);
1015
+ we = "format";
1016
+ Ve = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/;
1017
+ Me = /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/;
1018
+ Ue = (e) => Me.test(e);
1019
+ Be = (e) => Ve.test(e);
1020
+ Ge = (e) => `# @${we}
1074
1021
 
1075
1022
  ${e}`;
1076
- A = It;
1077
- Ue.ignoredProperties = /* @__PURE__ */ new Set(["loc", "comments"]);
1078
- Ge = {
1079
- print: Dt,
1080
- massageAstNode: Ue,
1081
- hasPrettierIgnore: Ct,
1082
- insertPragma: Ve,
1083
- printComment: St,
1084
- canAttachComment: gt,
1085
- getVisitorKeys: be
1023
+ Ke = kt;
1024
+ je = Ct;
1025
+ Ye = Rt;
1026
+ qe = {
1027
+ print: Lt,
1028
+ massageAstNode: fe,
1029
+ hasPrettierIgnore: Pt,
1030
+ insertPragma: Ge,
1031
+ printComment: Ft,
1032
+ canAttachComment: bt,
1033
+ getVisitorKeys: Pe
1086
1034
  };
1087
- Ye = [{
1035
+ Qe = [{
1088
1036
  name: "GraphQL",
1089
1037
  type: "data",
1090
1038
  aceMode: "graphqlschema",
@@ -1098,7 +1046,7 @@ ${e}`;
1098
1046
  vscodeLanguageIds: ["graphql"],
1099
1047
  linguistLanguageId: 139
1100
1048
  }];
1101
- $e = { bracketSpacing: {
1049
+ Xe = { bracketSpacing: {
1102
1050
  bracketSpacing: {
1103
1051
  category: "Common",
1104
1052
  type: "boolean",
@@ -1158,18 +1106,20 @@ ${e}`;
1158
1106
  description: "Enforce single attribute per line in HTML, Vue and JSX."
1159
1107
  }
1160
1108
  }.bracketSpacing };
1161
- he = {};
1162
- de(he, { graphql: () => tn });
1163
- bt = /\r\n|[\n\r]/g;
1164
- Q = class e extends Error {
1165
- constructor(t, ...n) {
1166
- var i, r, s;
1167
- let { nodes: a, source: u, positions: p, path: T, originalError: d, extensions: D } = Lt(n);
1168
- super(t), this.name = "GraphQLError", this.path = T ?? void 0, this.originalError = d ?? void 0, this.nodes = Qe(Array.isArray(a) ? a : a ? [a] : void 0);
1169
- let O = Qe((i = this.nodes) === null || i === void 0 ? void 0 : i.map((N) => N.loc).filter((N) => N != null));
1170
- this.source = u ?? (O == null || (r = O[0]) === null || r === void 0 ? void 0 : r.source), this.positions = p ?? O?.map((N) => N.start), this.locations = p && u ? p.map((N) => M(u, N)) : O?.map((N) => M(N.source, N.start));
1171
- let re = Xe(d?.extensions) ? d?.extensions : void 0;
1172
- this.extensions = (s = D ?? re) !== null && s !== void 0 ? s : Object.create(null), Object.defineProperties(this, {
1109
+ _e = {};
1110
+ ae(_e, { graphql: () => si });
1111
+ He = Mt;
1112
+ Ut = /\r\n|[\n\r]/g;
1113
+ R = class e extends Error {
1114
+ constructor(t, n = {}) {
1115
+ let { nodes: r, source: i, positions: s, path: a, originalError: p, cause: E, extensions: x } = n, v = "cause" in n;
1116
+ super(t, v || p != null ? { cause: v ? E : p } : void 0), this.name = "GraphQLError", this.path = a ?? void 0;
1117
+ let G = p ?? (E instanceof Error ? E : void 0);
1118
+ this.originalError = G, this.nodes = Ze(Array.isArray(r) ? r : r ? [r] : void 0);
1119
+ let k = Ze(this.nodes?.map((g) => g.loc).filter((g) => g != null));
1120
+ this.source = i ?? k?.[0]?.source, this.positions = s ?? k?.map((g) => g.start), this.locations = s && i ? s.map((g) => w(i, g)) : k?.map((g) => w(g.source, g.start));
1121
+ let C = Je(G?.extensions) ? G.extensions : void 0;
1122
+ this.extensions = x ?? C ?? Object.create(null), Object.defineProperties(this, {
1173
1123
  message: {
1174
1124
  writable: !0,
1175
1125
  enumerable: !0
@@ -1179,11 +1129,11 @@ ${e}`;
1179
1129
  source: { enumerable: !1 },
1180
1130
  positions: { enumerable: !1 },
1181
1131
  originalError: { enumerable: !1 }
1182
- }), d != null && d.stack ? Object.defineProperty(this, "stack", {
1183
- value: d.stack,
1132
+ }), p?.stack != null ? Object.defineProperty(this, "stack", {
1133
+ value: p.stack,
1184
1134
  writable: !0,
1185
1135
  configurable: !0
1186
- }) : Error.captureStackTrace ? Error.captureStackTrace(this, e) : Object.defineProperty(this, "stack", {
1136
+ }) : Error.captureStackTrace != null ? Error.captureStackTrace(this, e) : Object.defineProperty(this, "stack", {
1187
1137
  value: Error().stack,
1188
1138
  writable: !0,
1189
1139
  configurable: !0
@@ -1196,10 +1146,10 @@ ${e}`;
1196
1146
  let t = this.message;
1197
1147
  if (this.nodes) for (let n of this.nodes) n.loc && (t += `
1198
1148
 
1199
- ` + qe(n.loc));
1149
+ ` + Ee(n.loc));
1200
1150
  else if (this.source && this.locations) for (let n of this.locations) t += `
1201
1151
 
1202
- ` + ue(this.source, n);
1152
+ ` + ne(this.source, n);
1203
1153
  return t;
1204
1154
  }
1205
1155
  toJSON() {
@@ -1207,18 +1157,211 @@ ${e}`;
1207
1157
  return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
1208
1158
  }
1209
1159
  };
1210
- (function(e) {
1211
- e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
1212
- })(W || (W = {}));
1213
- (function(e) {
1214
- e.NAME = "Name", e.DOCUMENT = "Document", e.OPERATION_DEFINITION = "OperationDefinition", e.VARIABLE_DEFINITION = "VariableDefinition", e.SELECTION_SET = "SelectionSet", e.FIELD = "Field", e.ARGUMENT = "Argument", e.FRAGMENT_SPREAD = "FragmentSpread", e.INLINE_FRAGMENT = "InlineFragment", e.FRAGMENT_DEFINITION = "FragmentDefinition", e.VARIABLE = "Variable", e.INT = "IntValue", e.FLOAT = "FloatValue", e.STRING = "StringValue", e.BOOLEAN = "BooleanValue", e.NULL = "NullValue", e.ENUM = "EnumValue", e.LIST = "ListValue", e.OBJECT = "ObjectValue", e.OBJECT_FIELD = "ObjectField", e.DIRECTIVE = "Directive", e.NAMED_TYPE = "NamedType", e.LIST_TYPE = "ListType", e.NON_NULL_TYPE = "NonNullType", e.SCHEMA_DEFINITION = "SchemaDefinition", e.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e.FIELD_DEFINITION = "FieldDefinition", e.INPUT_VALUE_DEFINITION = "InputValueDefinition", e.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e.DIRECTIVE_DEFINITION = "DirectiveDefinition", e.SCHEMA_EXTENSION = "SchemaExtension", e.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e.UNION_TYPE_EXTENSION = "UnionTypeExtension", e.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension", e.TYPE_COORDINATE = "TypeCoordinate", e.MEMBER_COORDINATE = "MemberCoordinate", e.ARGUMENT_COORDINATE = "ArgumentCoordinate", e.DIRECTIVE_COORDINATE = "DirectiveCoordinate", e.DIRECTIVE_ARGUMENT_COORDINATE = "DirectiveArgumentCoordinate";
1215
- })(c || (c = {}));
1216
- (function(e) {
1217
- e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.DOT = ".", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
1218
- })(o || (o = {}));
1219
- z = class {
1160
+ et = Object.hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty);
1161
+ Y = class {
1162
+ constructor(t, n, r) {
1163
+ this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = r;
1164
+ }
1165
+ get [Symbol.toStringTag]() {
1166
+ return "Location";
1167
+ }
1168
+ toJSON() {
1169
+ return {
1170
+ start: this.start,
1171
+ end: this.end
1172
+ };
1173
+ }
1174
+ };
1175
+ V = class {
1176
+ constructor(t, n, r, i, s, a) {
1177
+ this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = a, this.prev = null, this.next = null;
1178
+ }
1179
+ get [Symbol.toStringTag]() {
1180
+ return "Token";
1181
+ }
1182
+ toJSON() {
1183
+ return {
1184
+ kind: this.kind,
1185
+ value: this.value,
1186
+ line: this.line,
1187
+ column: this.column
1188
+ };
1189
+ }
1190
+ };
1191
+ M = {
1192
+ QUERY: "query",
1193
+ MUTATION: "mutation",
1194
+ SUBSCRIPTION: "subscription"
1195
+ };
1196
+ c = {};
1197
+ ae(c, {
1198
+ ARGUMENT: () => $t,
1199
+ ARGUMENT_COORDINATE: () => Pn,
1200
+ BOOLEAN: () => nn,
1201
+ DIRECTIVE: () => pn,
1202
+ DIRECTIVE_ARGUMENT_COORDINATE: () => Vn,
1203
+ DIRECTIVE_COORDINATE: () => wn,
1204
+ DIRECTIVE_DEFINITION: () => In,
1205
+ DIRECTIVE_EXTENSION: () => Sn,
1206
+ DOCUMENT: () => Kt,
1207
+ ENUM: () => sn,
1208
+ ENUM_TYPE_DEFINITION: () => Dn,
1209
+ ENUM_TYPE_EXTENSION: () => Rn,
1210
+ ENUM_VALUE_DEFINITION: () => _n,
1211
+ FIELD: () => Qt,
1212
+ FIELD_DEFINITION: () => Tn,
1213
+ FLOAT: () => en,
1214
+ FRAGMENT_ARGUMENT: () => Xt,
1215
+ FRAGMENT_DEFINITION: () => Wt,
1216
+ FRAGMENT_SPREAD: () => Ht,
1217
+ INLINE_FRAGMENT: () => Jt,
1218
+ INPUT_OBJECT_TYPE_DEFINITION: () => An,
1219
+ INPUT_OBJECT_TYPE_EXTENSION: () => Ln,
1220
+ INPUT_VALUE_DEFINITION: () => xn,
1221
+ INT: () => Zt,
1222
+ INTERFACE_TYPE_DEFINITION: () => yn,
1223
+ INTERFACE_TYPE_EXTENSION: () => kn,
1224
+ LIST: () => on,
1225
+ LIST_TYPE: () => ln,
1226
+ MEMBER_COORDINATE: () => Fn,
1227
+ NAME: () => Gt,
1228
+ NAMED_TYPE: () => un,
1229
+ NON_NULL_TYPE: () => dn,
1230
+ NULL: () => rn,
1231
+ OBJECT: () => an,
1232
+ OBJECT_FIELD: () => cn,
1233
+ OBJECT_TYPE_DEFINITION: () => En,
1234
+ OBJECT_TYPE_EXTENSION: () => vn,
1235
+ OPERATION_DEFINITION: () => jt,
1236
+ OPERATION_TYPE_DEFINITION: () => mn,
1237
+ SCALAR_TYPE_DEFINITION: () => hn,
1238
+ SCALAR_TYPE_EXTENSION: () => On,
1239
+ SCHEMA_DEFINITION: () => fn,
1240
+ SCHEMA_EXTENSION: () => gn,
1241
+ SELECTION_SET: () => qt,
1242
+ STRING: () => tn,
1243
+ TYPE_COORDINATE: () => bn,
1244
+ UNION_TYPE_DEFINITION: () => Nn,
1245
+ UNION_TYPE_EXTENSION: () => Cn,
1246
+ VARIABLE: () => zt,
1247
+ VARIABLE_DEFINITION: () => Yt
1248
+ });
1249
+ Gt = "Name";
1250
+ Kt = "Document";
1251
+ jt = "OperationDefinition";
1252
+ Yt = "VariableDefinition";
1253
+ qt = "SelectionSet";
1254
+ Qt = "Field";
1255
+ $t = "Argument";
1256
+ Xt = "FragmentArgument";
1257
+ Ht = "FragmentSpread";
1258
+ Jt = "InlineFragment";
1259
+ Wt = "FragmentDefinition";
1260
+ zt = "Variable";
1261
+ Zt = "IntValue";
1262
+ en = "FloatValue";
1263
+ tn = "StringValue";
1264
+ nn = "BooleanValue";
1265
+ rn = "NullValue";
1266
+ sn = "EnumValue";
1267
+ on = "ListValue";
1268
+ an = "ObjectValue";
1269
+ cn = "ObjectField";
1270
+ pn = "Directive";
1271
+ un = "NamedType";
1272
+ ln = "ListType";
1273
+ dn = "NonNullType";
1274
+ fn = "SchemaDefinition";
1275
+ mn = "OperationTypeDefinition";
1276
+ hn = "ScalarTypeDefinition";
1277
+ En = "ObjectTypeDefinition";
1278
+ Tn = "FieldDefinition";
1279
+ xn = "InputValueDefinition";
1280
+ yn = "InterfaceTypeDefinition";
1281
+ Nn = "UnionTypeDefinition";
1282
+ Dn = "EnumTypeDefinition";
1283
+ _n = "EnumValueDefinition";
1284
+ An = "InputObjectTypeDefinition";
1285
+ In = "DirectiveDefinition";
1286
+ gn = "SchemaExtension";
1287
+ Sn = "DirectiveExtension";
1288
+ On = "ScalarTypeExtension";
1289
+ vn = "ObjectTypeExtension";
1290
+ kn = "InterfaceTypeExtension";
1291
+ Cn = "UnionTypeExtension";
1292
+ Rn = "EnumTypeExtension";
1293
+ Ln = "InputObjectTypeExtension";
1294
+ bn = "TypeCoordinate";
1295
+ Fn = "MemberCoordinate";
1296
+ Pn = "ArgumentCoordinate";
1297
+ wn = "DirectiveCoordinate";
1298
+ Vn = "DirectiveArgumentCoordinate";
1299
+ ye = {
1300
+ QUERY: "QUERY",
1301
+ MUTATION: "MUTATION",
1302
+ SUBSCRIPTION: "SUBSCRIPTION",
1303
+ FIELD: "FIELD",
1304
+ FRAGMENT_DEFINITION: "FRAGMENT_DEFINITION",
1305
+ FRAGMENT_SPREAD: "FRAGMENT_SPREAD",
1306
+ INLINE_FRAGMENT: "INLINE_FRAGMENT",
1307
+ VARIABLE_DEFINITION: "VARIABLE_DEFINITION",
1308
+ FRAGMENT_VARIABLE_DEFINITION: "FRAGMENT_VARIABLE_DEFINITION",
1309
+ SCHEMA: "SCHEMA",
1310
+ SCALAR: "SCALAR",
1311
+ OBJECT: "OBJECT",
1312
+ FIELD_DEFINITION: "FIELD_DEFINITION",
1313
+ ARGUMENT_DEFINITION: "ARGUMENT_DEFINITION",
1314
+ INTERFACE: "INTERFACE",
1315
+ UNION: "UNION",
1316
+ ENUM: "ENUM",
1317
+ ENUM_VALUE: "ENUM_VALUE",
1318
+ INPUT_OBJECT: "INPUT_OBJECT",
1319
+ INPUT_FIELD_DEFINITION: "INPUT_FIELD_DEFINITION",
1320
+ DIRECTIVE_DEFINITION: "DIRECTIVE_DEFINITION"
1321
+ };
1322
+ b = Un();
1323
+ Ne = b?.tracingChannel("graphql:parse");
1324
+ b?.tracingChannel("graphql:validate");
1325
+ b?.tracingChannel("graphql:execute");
1326
+ b?.tracingChannel("graphql:execute:variableCoercion");
1327
+ b?.tracingChannel("graphql:execute:rootSelectionSet");
1328
+ b?.tracingChannel("graphql:subscribe");
1329
+ b?.tracingChannel("graphql:resolve");
1330
+ Bn = [
1331
+ "start",
1332
+ "end",
1333
+ "asyncStart",
1334
+ "asyncEnd",
1335
+ "error"
1336
+ ];
1337
+ o = {
1338
+ SOF: "<SOF>",
1339
+ EOF: "<EOF>",
1340
+ BANG: "!",
1341
+ DOLLAR: "$",
1342
+ AMP: "&",
1343
+ PAREN_L: "(",
1344
+ PAREN_R: ")",
1345
+ DOT: ".",
1346
+ SPREAD: "...",
1347
+ COLON: ":",
1348
+ EQUALS: "=",
1349
+ AT: "@",
1350
+ BRACKET_L: "[",
1351
+ BRACKET_R: "]",
1352
+ BRACE_L: "{",
1353
+ PIPE: "|",
1354
+ BRACE_R: "}",
1355
+ NAME: "Name",
1356
+ INT: "Int",
1357
+ FLOAT: "Float",
1358
+ STRING: "String",
1359
+ BLOCK_STRING: "BlockString",
1360
+ COMMENT: "Comment"
1361
+ };
1362
+ Q = class {
1220
1363
  constructor(t) {
1221
- let n = new F(o.SOF, 0, 0, 0, 0);
1364
+ let n = new V(o.SOF, 0, 0, 0, 0);
1222
1365
  this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
1223
1366
  }
1224
1367
  get [Symbol.toStringTag]() {
@@ -1232,58 +1375,34 @@ ${e}`;
1232
1375
  if (t.kind !== o.EOF) do
1233
1376
  if (t.next) t = t.next;
1234
1377
  else {
1235
- let n = wt(this, t.end);
1378
+ let n = Gn(this, t.end);
1236
1379
  t.next = n, n.prev = t, t = n;
1237
1380
  }
1238
1381
  while (t.kind === o.COMMENT);
1239
1382
  return t;
1240
1383
  }
1241
1384
  };
1242
- it = globalThis.process && !0 ? function(t, n) {
1243
- return t instanceof n;
1244
- } : function(t, n) {
1245
- if (t instanceof n) return !0;
1246
- if (typeof t == "object" && t !== null) {
1247
- var i;
1248
- let r = n.prototype[Symbol.toStringTag];
1249
- if (r === (Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name)) {
1250
- let a = ee(t);
1251
- throw new Error(`Cannot use ${r} "${a}" from another module or realm.
1252
-
1253
- Ensure that there is only one instance of "graphql" in the node_modules
1254
- directory. If different versions of "graphql" are the dependencies of other
1255
- relied on modules, use "resolutions" to ensure only one version is installed.
1256
-
1257
- https://yarnpkg.com/en/docs/selective-version-resolutions
1258
-
1259
- Duplicate "graphql" modules cannot be used at the same time since different
1260
- versions may have different capabilities and behavior. The data from one
1261
- version used in the function from another could produce confusing and
1262
- spurious results.`);
1263
- }
1264
- }
1265
- return !1;
1266
- };
1385
+ ut = Symbol("Source");
1267
1386
  B = class {
1268
- constructor(t, n = "GraphQL request", i = {
1387
+ constructor(t, n = "GraphQL request", r = {
1269
1388
  line: 1,
1270
1389
  column: 1
1271
1390
  }) {
1272
- typeof t == "string" || Z(!1, `Body must be a string. Received: ${ee(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || Z(!1, "line in locationOffset is 1-indexed and must be positive."), this.locationOffset.column > 0 || Z(!1, "column in locationOffset is 1-indexed and must be positive.");
1391
+ this.__kind = ut, this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || Te(!1, "line in locationOffset is 1-indexed and must be positive."), this.locationOffset.column > 0 || Te(!1, "column in locationOffset is 1-indexed and must be positive.");
1273
1392
  }
1274
1393
  get [Symbol.toStringTag]() {
1275
1394
  return "Source";
1276
1395
  }
1277
1396
  };
1278
- fe = class {
1397
+ De = class {
1279
1398
  constructor(t, n = {}) {
1280
- let { lexer: i, ...r } = n;
1281
- if (i) this._lexer = i;
1399
+ let { lexer: r, ...i } = n;
1400
+ if (r) this._lexer = r;
1282
1401
  else {
1283
- let s = st(t) ? t : new B(t);
1284
- this._lexer = new z(s);
1402
+ let s = lt(t) ? t : new B(t);
1403
+ this._lexer = new Q(s);
1285
1404
  }
1286
- this._options = r, this._tokenCounter = 0;
1405
+ this._options = i, this._tokenCounter = 0;
1287
1406
  }
1288
1407
  get tokenCount() {
1289
1408
  return this._tokenCounter;
@@ -1304,7 +1423,7 @@ spurious results.`);
1304
1423
  parseDefinition() {
1305
1424
  if (this.peek(o.BRACE_L)) return this.parseOperationDefinition();
1306
1425
  let t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
1307
- if (t && n.kind === o.BRACE_L) throw h(this._lexer.source, this._lexer.token.start, "Unexpected description, descriptions are not supported on shorthand queries.");
1426
+ if (t && n.kind === o.BRACE_L) throw f(this._lexer.source, this._lexer.token.start, "Unexpected description, descriptions are not supported on shorthand queries.");
1308
1427
  if (n.kind === o.NAME) {
1309
1428
  switch (n.value) {
1310
1429
  case "schema": return this.parseSchemaDefinition();
@@ -1322,10 +1441,8 @@ spurious results.`);
1322
1441
  case "subscription": return this.parseOperationDefinition();
1323
1442
  case "fragment": return this.parseFragmentDefinition();
1324
1443
  }
1325
- if (t) throw h(this._lexer.source, this._lexer.token.start, "Unexpected description, only GraphQL definitions support descriptions.");
1326
- switch (n.value) {
1327
- case "extend": return this.parseTypeSystemExtension();
1328
- }
1444
+ if (t) throw f(this._lexer.source, this._lexer.token.start, "Unexpected description, only GraphQL definitions support descriptions.");
1445
+ if (n.value === "extend") return this.parseTypeSystemExtension();
1329
1446
  }
1330
1447
  throw this.unexpected(n);
1331
1448
  }
@@ -1333,19 +1450,19 @@ spurious results.`);
1333
1450
  let t = this._lexer.token;
1334
1451
  if (this.peek(o.BRACE_L)) return this.node(t, {
1335
1452
  kind: c.OPERATION_DEFINITION,
1336
- operation: C.QUERY,
1453
+ operation: M.QUERY,
1337
1454
  description: void 0,
1338
1455
  name: void 0,
1339
- variableDefinitions: [],
1340
- directives: [],
1456
+ variableDefinitions: void 0,
1457
+ directives: void 0,
1341
1458
  selectionSet: this.parseSelectionSet()
1342
1459
  });
1343
- let n = this.parseDescription(), i = this.parseOperationType(), r;
1344
- return this.peek(o.NAME) && (r = this.parseName()), this.node(t, {
1460
+ let n = this.parseDescription(), r = this.parseOperationType(), i;
1461
+ return this.peek(o.NAME) && (i = this.parseName()), this.node(t, {
1345
1462
  kind: c.OPERATION_DEFINITION,
1346
- operation: i,
1463
+ operation: r,
1347
1464
  description: n,
1348
- name: r,
1465
+ name: i,
1349
1466
  variableDefinitions: this.parseVariableDefinitions(),
1350
1467
  directives: this.parseDirectives(!1),
1351
1468
  selectionSet: this.parseSelectionSet()
@@ -1354,9 +1471,9 @@ spurious results.`);
1354
1471
  parseOperationType() {
1355
1472
  let t = this.expectToken(o.NAME);
1356
1473
  switch (t.value) {
1357
- case "query": return C.QUERY;
1358
- case "mutation": return C.MUTATION;
1359
- case "subscription": return C.SUBSCRIPTION;
1474
+ case "query": return M.QUERY;
1475
+ case "mutation": return M.MUTATION;
1476
+ case "subscription": return M.SUBSCRIPTION;
1360
1477
  }
1361
1478
  throw this.unexpected(t);
1362
1479
  }
@@ -1390,11 +1507,11 @@ spurious results.`);
1390
1507
  return this.peek(o.SPREAD) ? this.parseFragment() : this.parseField();
1391
1508
  }
1392
1509
  parseField() {
1393
- let t = this._lexer.token, n = this.parseName(), i, r;
1394
- return this.expectOptionalToken(o.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
1510
+ let t = this._lexer.token, n = this.parseName(), r, i;
1511
+ return this.expectOptionalToken(o.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
1395
1512
  kind: c.FIELD,
1396
- alias: i,
1397
- name: r,
1513
+ alias: r,
1514
+ name: i,
1398
1515
  arguments: this.parseArguments(!1),
1399
1516
  directives: this.parseDirectives(!1),
1400
1517
  selectionSet: this.peek(o.BRACE_L) ? this.parseSelectionSet() : void 0
@@ -1404,26 +1521,47 @@ spurious results.`);
1404
1521
  let n = t ? this.parseConstArgument : this.parseArgument;
1405
1522
  return this.optionalMany(o.PAREN_L, n, o.PAREN_R);
1406
1523
  }
1524
+ parseFragmentArguments() {
1525
+ let t = this.parseFragmentArgument;
1526
+ return this.optionalMany(o.PAREN_L, t, o.PAREN_R);
1527
+ }
1407
1528
  parseArgument(t = !1) {
1408
- let n = this._lexer.token, i = this.parseName();
1529
+ let n = this._lexer.token, r = this.parseName();
1409
1530
  return this.expectToken(o.COLON), this.node(n, {
1410
1531
  kind: c.ARGUMENT,
1411
- name: i,
1532
+ name: r,
1412
1533
  value: this.parseValueLiteral(t)
1413
1534
  });
1414
1535
  }
1415
1536
  parseConstArgument() {
1416
1537
  return this.parseArgument(!0);
1417
1538
  }
1539
+ parseFragmentArgument() {
1540
+ let t = this._lexer.token, n = this.parseName();
1541
+ return this.expectToken(o.COLON), this.node(t, {
1542
+ kind: c.FRAGMENT_ARGUMENT,
1543
+ name: n,
1544
+ value: this.parseValueLiteral(!1)
1545
+ });
1546
+ }
1418
1547
  parseFragment() {
1419
1548
  let t = this._lexer.token;
1420
1549
  this.expectToken(o.SPREAD);
1421
1550
  let n = this.expectOptionalKeyword("on");
1422
- return !n && this.peek(o.NAME) ? this.node(t, {
1423
- kind: c.FRAGMENT_SPREAD,
1424
- name: this.parseFragmentName(),
1425
- directives: this.parseDirectives(!1)
1426
- }) : this.node(t, {
1551
+ if (!n && this.peek(o.NAME)) {
1552
+ let r = this.parseFragmentName();
1553
+ return this.peek(o.PAREN_L) && this._options.experimentalFragmentArguments ? this.node(t, {
1554
+ kind: c.FRAGMENT_SPREAD,
1555
+ name: r,
1556
+ arguments: this.parseFragmentArguments(),
1557
+ directives: this.parseDirectives(!1)
1558
+ }) : this.node(t, {
1559
+ kind: c.FRAGMENT_SPREAD,
1560
+ name: r,
1561
+ directives: this.parseDirectives(!1)
1562
+ });
1563
+ }
1564
+ return this.node(t, {
1427
1565
  kind: c.INLINE_FRAGMENT,
1428
1566
  typeCondition: n ? this.parseNamedType() : void 0,
1429
1567
  directives: this.parseDirectives(!1),
@@ -1432,7 +1570,7 @@ spurious results.`);
1432
1570
  }
1433
1571
  parseFragmentDefinition() {
1434
1572
  let t = this._lexer.token, n = this.parseDescription();
1435
- return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(t, {
1573
+ return this.expectKeyword("fragment"), this._options.experimentalFragmentArguments === !0 ? this.node(t, {
1436
1574
  kind: c.FRAGMENT_DEFINITION,
1437
1575
  description: n,
1438
1576
  name: this.parseFragmentName(),
@@ -1485,8 +1623,8 @@ spurious results.`);
1485
1623
  }
1486
1624
  case o.DOLLAR:
1487
1625
  if (t) if (this.expectToken(o.DOLLAR), this._lexer.token.kind === o.NAME) {
1488
- let i = this._lexer.token.value;
1489
- throw h(this._lexer.source, n.start, `Unexpected variable "$${i}" in constant value.`);
1626
+ let r = this._lexer.token.value;
1627
+ throw f(this._lexer.source, n.start, `Unexpected variable "$${r}" in constant value.`);
1490
1628
  } else throw this.unexpected(n);
1491
1629
  return this.parseVariable();
1492
1630
  default: throw this.unexpected();
@@ -1518,17 +1656,17 @@ spurious results.`);
1518
1656
  });
1519
1657
  }
1520
1658
  parseObjectField(t) {
1521
- let n = this._lexer.token, i = this.parseName();
1659
+ let n = this._lexer.token, r = this.parseName();
1522
1660
  return this.expectToken(o.COLON), this.node(n, {
1523
1661
  kind: c.OBJECT_FIELD,
1524
- name: i,
1662
+ name: r,
1525
1663
  value: this.parseValueLiteral(t)
1526
1664
  });
1527
1665
  }
1528
1666
  parseDirectives(t) {
1529
1667
  let n = [];
1530
1668
  for (; this.peek(o.AT);) n.push(this.parseDirective(t));
1531
- return n;
1669
+ if (n.length) return n;
1532
1670
  }
1533
1671
  parseConstDirectives() {
1534
1672
  return this.parseDirectives(!0);
@@ -1544,10 +1682,10 @@ spurious results.`);
1544
1682
  parseTypeReference() {
1545
1683
  let t = this._lexer.token, n;
1546
1684
  if (this.expectOptionalToken(o.BRACKET_L)) {
1547
- let i = this.parseTypeReference();
1685
+ let r = this.parseTypeReference();
1548
1686
  this.expectToken(o.BRACKET_R), n = this.node(t, {
1549
1687
  kind: c.LIST_TYPE,
1550
- type: i
1688
+ type: r
1551
1689
  });
1552
1690
  } else n = this.parseNamedType();
1553
1691
  return this.expectOptionalToken(o.BANG) ? this.node(t, {
@@ -1570,63 +1708,63 @@ spurious results.`);
1570
1708
  parseSchemaDefinition() {
1571
1709
  let t = this._lexer.token, n = this.parseDescription();
1572
1710
  this.expectKeyword("schema");
1573
- let i = this.parseConstDirectives(), r = this.many(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
1711
+ let r = this.parseConstDirectives(), i = this.many(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
1574
1712
  return this.node(t, {
1575
1713
  kind: c.SCHEMA_DEFINITION,
1576
1714
  description: n,
1577
- directives: i,
1578
- operationTypes: r
1715
+ directives: r,
1716
+ operationTypes: i
1579
1717
  });
1580
1718
  }
1581
1719
  parseOperationTypeDefinition() {
1582
1720
  let t = this._lexer.token, n = this.parseOperationType();
1583
1721
  this.expectToken(o.COLON);
1584
- let i = this.parseNamedType();
1722
+ let r = this.parseNamedType();
1585
1723
  return this.node(t, {
1586
1724
  kind: c.OPERATION_TYPE_DEFINITION,
1587
1725
  operation: n,
1588
- type: i
1726
+ type: r
1589
1727
  });
1590
1728
  }
1591
1729
  parseScalarTypeDefinition() {
1592
1730
  let t = this._lexer.token, n = this.parseDescription();
1593
1731
  this.expectKeyword("scalar");
1594
- let i = this.parseName(), r = this.parseConstDirectives();
1732
+ let r = this.parseName(), i = this.parseConstDirectives();
1595
1733
  return this.node(t, {
1596
1734
  kind: c.SCALAR_TYPE_DEFINITION,
1597
1735
  description: n,
1598
- name: i,
1599
- directives: r
1736
+ name: r,
1737
+ directives: i
1600
1738
  });
1601
1739
  }
1602
1740
  parseObjectTypeDefinition() {
1603
1741
  let t = this._lexer.token, n = this.parseDescription();
1604
1742
  this.expectKeyword("type");
1605
- let i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1743
+ let r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1606
1744
  return this.node(t, {
1607
1745
  kind: c.OBJECT_TYPE_DEFINITION,
1608
1746
  description: n,
1609
- name: i,
1610
- interfaces: r,
1747
+ name: r,
1748
+ interfaces: i,
1611
1749
  directives: s,
1612
1750
  fields: a
1613
1751
  });
1614
1752
  }
1615
1753
  parseImplementsInterfaces() {
1616
- return this.expectOptionalKeyword("implements") ? this.delimitedMany(o.AMP, this.parseNamedType) : [];
1754
+ return this.expectOptionalKeyword("implements") ? this.delimitedMany(o.AMP, this.parseNamedType) : void 0;
1617
1755
  }
1618
1756
  parseFieldsDefinition() {
1619
1757
  return this.optionalMany(o.BRACE_L, this.parseFieldDefinition, o.BRACE_R);
1620
1758
  }
1621
1759
  parseFieldDefinition() {
1622
- let t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1760
+ let t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs();
1623
1761
  this.expectToken(o.COLON);
1624
1762
  let s = this.parseTypeReference(), a = this.parseConstDirectives();
1625
1763
  return this.node(t, {
1626
1764
  kind: c.FIELD_DEFINITION,
1627
1765
  description: n,
1628
- name: i,
1629
- arguments: r,
1766
+ name: r,
1767
+ arguments: i,
1630
1768
  type: s,
1631
1769
  directives: a
1632
1770
  });
@@ -1635,16 +1773,16 @@ spurious results.`);
1635
1773
  return this.optionalMany(o.PAREN_L, this.parseInputValueDef, o.PAREN_R);
1636
1774
  }
1637
1775
  parseInputValueDef() {
1638
- let t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
1776
+ let t = this._lexer.token, n = this.parseDescription(), r = this.parseName();
1639
1777
  this.expectToken(o.COLON);
1640
- let r = this.parseTypeReference(), s;
1778
+ let i = this.parseTypeReference(), s;
1641
1779
  this.expectOptionalToken(o.EQUALS) && (s = this.parseConstValueLiteral());
1642
1780
  let a = this.parseConstDirectives();
1643
1781
  return this.node(t, {
1644
1782
  kind: c.INPUT_VALUE_DEFINITION,
1645
1783
  description: n,
1646
- name: i,
1647
- type: r,
1784
+ name: r,
1785
+ type: i,
1648
1786
  defaultValue: s,
1649
1787
  directives: a
1650
1788
  });
@@ -1652,12 +1790,12 @@ spurious results.`);
1652
1790
  parseInterfaceTypeDefinition() {
1653
1791
  let t = this._lexer.token, n = this.parseDescription();
1654
1792
  this.expectKeyword("interface");
1655
- let i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1793
+ let r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1656
1794
  return this.node(t, {
1657
1795
  kind: c.INTERFACE_TYPE_DEFINITION,
1658
1796
  description: n,
1659
- name: i,
1660
- interfaces: r,
1797
+ name: r,
1798
+ interfaces: i,
1661
1799
  directives: s,
1662
1800
  fields: a
1663
1801
  });
@@ -1665,27 +1803,27 @@ spurious results.`);
1665
1803
  parseUnionTypeDefinition() {
1666
1804
  let t = this._lexer.token, n = this.parseDescription();
1667
1805
  this.expectKeyword("union");
1668
- let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1806
+ let r = this.parseName(), i = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1669
1807
  return this.node(t, {
1670
1808
  kind: c.UNION_TYPE_DEFINITION,
1671
1809
  description: n,
1672
- name: i,
1673
- directives: r,
1810
+ name: r,
1811
+ directives: i,
1674
1812
  types: s
1675
1813
  });
1676
1814
  }
1677
1815
  parseUnionMemberTypes() {
1678
- return this.expectOptionalToken(o.EQUALS) ? this.delimitedMany(o.PIPE, this.parseNamedType) : [];
1816
+ return this.expectOptionalToken(o.EQUALS) ? this.delimitedMany(o.PIPE, this.parseNamedType) : void 0;
1679
1817
  }
1680
1818
  parseEnumTypeDefinition() {
1681
1819
  let t = this._lexer.token, n = this.parseDescription();
1682
1820
  this.expectKeyword("enum");
1683
- let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1821
+ let r = this.parseName(), i = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1684
1822
  return this.node(t, {
1685
1823
  kind: c.ENUM_TYPE_DEFINITION,
1686
1824
  description: n,
1687
- name: i,
1688
- directives: r,
1825
+ name: r,
1826
+ directives: i,
1689
1827
  values: s
1690
1828
  });
1691
1829
  }
@@ -1693,27 +1831,27 @@ spurious results.`);
1693
1831
  return this.optionalMany(o.BRACE_L, this.parseEnumValueDefinition, o.BRACE_R);
1694
1832
  }
1695
1833
  parseEnumValueDefinition() {
1696
- let t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1834
+ let t = this._lexer.token, n = this.parseDescription(), r = this.parseEnumValueName(), i = this.parseConstDirectives();
1697
1835
  return this.node(t, {
1698
1836
  kind: c.ENUM_VALUE_DEFINITION,
1699
1837
  description: n,
1700
- name: i,
1701
- directives: r
1838
+ name: r,
1839
+ directives: i
1702
1840
  });
1703
1841
  }
1704
1842
  parseEnumValueName() {
1705
- if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") throw h(this._lexer.source, this._lexer.token.start, `${ne(this._lexer.token)} is reserved and cannot be used for an enum value.`);
1843
+ if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") throw f(this._lexer.source, this._lexer.token.start, `${se(this._lexer.token)} is reserved and cannot be used for an enum value.`);
1706
1844
  return this.parseName();
1707
1845
  }
1708
1846
  parseInputObjectTypeDefinition() {
1709
1847
  let t = this._lexer.token, n = this.parseDescription();
1710
1848
  this.expectKeyword("input");
1711
- let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1849
+ let r = this.parseName(), i = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1712
1850
  return this.node(t, {
1713
1851
  kind: c.INPUT_OBJECT_TYPE_DEFINITION,
1714
1852
  description: n,
1715
- name: i,
1716
- directives: r,
1853
+ name: r,
1854
+ directives: i,
1717
1855
  fields: s
1718
1856
  });
1719
1857
  }
@@ -1730,106 +1868,119 @@ spurious results.`);
1730
1868
  case "union": return this.parseUnionTypeExtension();
1731
1869
  case "enum": return this.parseEnumTypeExtension();
1732
1870
  case "input": return this.parseInputObjectTypeExtension();
1871
+ case "directive": return this.parseDirectiveExtension();
1733
1872
  }
1734
1873
  throw this.unexpected(t);
1735
1874
  }
1736
1875
  parseSchemaExtension() {
1737
1876
  let t = this._lexer.token;
1738
1877
  this.expectKeyword("extend"), this.expectKeyword("schema");
1739
- let n = this.parseConstDirectives(), i = this.optionalMany(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
1740
- if (n.length === 0 && i.length === 0) throw this.unexpected();
1878
+ let n = this.parseConstDirectives(), r = this.optionalMany(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
1879
+ if (n === void 0 && r === void 0) throw this.unexpected();
1741
1880
  return this.node(t, {
1742
1881
  kind: c.SCHEMA_EXTENSION,
1743
1882
  directives: n,
1744
- operationTypes: i
1883
+ operationTypes: r
1745
1884
  });
1746
1885
  }
1747
1886
  parseScalarTypeExtension() {
1748
1887
  let t = this._lexer.token;
1749
1888
  this.expectKeyword("extend"), this.expectKeyword("scalar");
1750
- let n = this.parseName(), i = this.parseConstDirectives();
1751
- if (i.length === 0) throw this.unexpected();
1889
+ let n = this.parseName(), r = this.parseConstDirectives();
1890
+ if (r === void 0) throw this.unexpected();
1752
1891
  return this.node(t, {
1753
1892
  kind: c.SCALAR_TYPE_EXTENSION,
1754
1893
  name: n,
1755
- directives: i
1894
+ directives: r
1756
1895
  });
1757
1896
  }
1758
1897
  parseObjectTypeExtension() {
1759
1898
  let t = this._lexer.token;
1760
1899
  this.expectKeyword("extend"), this.expectKeyword("type");
1761
- let n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1762
- if (i.length === 0 && r.length === 0 && s.length === 0) throw this.unexpected();
1900
+ let n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1901
+ if (r === void 0 && i === void 0 && s === void 0) throw this.unexpected();
1763
1902
  return this.node(t, {
1764
1903
  kind: c.OBJECT_TYPE_EXTENSION,
1765
1904
  name: n,
1766
- interfaces: i,
1767
- directives: r,
1905
+ interfaces: r,
1906
+ directives: i,
1768
1907
  fields: s
1769
1908
  });
1770
1909
  }
1771
1910
  parseInterfaceTypeExtension() {
1772
1911
  let t = this._lexer.token;
1773
1912
  this.expectKeyword("extend"), this.expectKeyword("interface");
1774
- let n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1775
- if (i.length === 0 && r.length === 0 && s.length === 0) throw this.unexpected();
1913
+ let n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1914
+ if (r === void 0 && i === void 0 && s === void 0) throw this.unexpected();
1776
1915
  return this.node(t, {
1777
1916
  kind: c.INTERFACE_TYPE_EXTENSION,
1778
1917
  name: n,
1779
- interfaces: i,
1780
- directives: r,
1918
+ interfaces: r,
1919
+ directives: i,
1781
1920
  fields: s
1782
1921
  });
1783
1922
  }
1784
1923
  parseUnionTypeExtension() {
1785
1924
  let t = this._lexer.token;
1786
1925
  this.expectKeyword("extend"), this.expectKeyword("union");
1787
- let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1788
- if (i.length === 0 && r.length === 0) throw this.unexpected();
1926
+ let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseUnionMemberTypes();
1927
+ if (r === void 0 && i === void 0) throw this.unexpected();
1789
1928
  return this.node(t, {
1790
1929
  kind: c.UNION_TYPE_EXTENSION,
1791
1930
  name: n,
1792
- directives: i,
1793
- types: r
1931
+ directives: r,
1932
+ types: i
1794
1933
  });
1795
1934
  }
1796
1935
  parseEnumTypeExtension() {
1797
1936
  let t = this._lexer.token;
1798
1937
  this.expectKeyword("extend"), this.expectKeyword("enum");
1799
- let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1800
- if (i.length === 0 && r.length === 0) throw this.unexpected();
1938
+ let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseEnumValuesDefinition();
1939
+ if (r === void 0 && i === void 0) throw this.unexpected();
1801
1940
  return this.node(t, {
1802
1941
  kind: c.ENUM_TYPE_EXTENSION,
1803
1942
  name: n,
1804
- directives: i,
1805
- values: r
1943
+ directives: r,
1944
+ values: i
1806
1945
  });
1807
1946
  }
1808
1947
  parseInputObjectTypeExtension() {
1809
1948
  let t = this._lexer.token;
1810
1949
  this.expectKeyword("extend"), this.expectKeyword("input");
1811
- let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1812
- if (i.length === 0 && r.length === 0) throw this.unexpected();
1950
+ let n = this.parseName(), r = this.parseConstDirectives(), i = this.parseInputFieldsDefinition();
1951
+ if (r === void 0 && i === void 0) throw this.unexpected();
1813
1952
  return this.node(t, {
1814
1953
  kind: c.INPUT_OBJECT_TYPE_EXTENSION,
1815
1954
  name: n,
1816
- directives: i,
1817
- fields: r
1955
+ directives: r,
1956
+ fields: i
1957
+ });
1958
+ }
1959
+ parseDirectiveExtension() {
1960
+ let t = this._lexer.token;
1961
+ this.expectKeyword("extend"), this.expectKeyword("directive"), this.expectToken(o.AT);
1962
+ let n = this.parseName(), r = this.parseConstDirectives();
1963
+ if (r === void 0) throw this.unexpected();
1964
+ return this.node(t, {
1965
+ kind: c.DIRECTIVE_EXTENSION,
1966
+ name: n,
1967
+ directives: r
1818
1968
  });
1819
1969
  }
1820
1970
  parseDirectiveDefinition() {
1821
1971
  let t = this._lexer.token, n = this.parseDescription();
1822
1972
  this.expectKeyword("directive"), this.expectToken(o.AT);
1823
- let i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1973
+ let r = this.parseName(), i = this.parseArgumentDefs(), s = this.parseConstDirectives(), a = this.expectOptionalKeyword("repeatable");
1824
1974
  this.expectKeyword("on");
1825
- let a = this.parseDirectiveLocations();
1975
+ let p = this.parseDirectiveLocations();
1826
1976
  return this.node(t, {
1827
1977
  kind: c.DIRECTIVE_DEFINITION,
1828
1978
  description: n,
1829
- name: i,
1830
- arguments: r,
1831
- repeatable: s,
1832
- locations: a
1979
+ name: r,
1980
+ arguments: i,
1981
+ directives: s,
1982
+ repeatable: a,
1983
+ locations: p
1833
1984
  });
1834
1985
  }
1835
1986
  parseDirectiveLocations() {
@@ -1837,36 +1988,36 @@ spurious results.`);
1837
1988
  }
1838
1989
  parseDirectiveLocation() {
1839
1990
  let t = this._lexer.token, n = this.parseName();
1840
- if (Object.prototype.hasOwnProperty.call(W, n.value)) return n;
1991
+ if (et(ye, n.value)) return n;
1841
1992
  throw this.unexpected(t);
1842
1993
  }
1843
1994
  parseSchemaCoordinate() {
1844
- let t = this._lexer.token, n = this.expectOptionalToken(o.AT), i = this.parseName(), r;
1845
- !n && this.expectOptionalToken(o.DOT) && (r = this.parseName());
1995
+ let t = this._lexer.token, n = this.expectOptionalToken(o.AT), r = this.parseName(), i;
1996
+ !n && this.expectOptionalToken(o.DOT) && (i = this.parseName());
1846
1997
  let s;
1847
- return (n || r) && this.expectOptionalToken(o.PAREN_L) && (s = this.parseName(), this.expectToken(o.COLON), this.expectToken(o.PAREN_R)), n ? s ? this.node(t, {
1998
+ return (n || i) && this.expectOptionalToken(o.PAREN_L) && (s = this.parseName(), this.expectToken(o.COLON), this.expectToken(o.PAREN_R)), n ? s ? this.node(t, {
1848
1999
  kind: c.DIRECTIVE_ARGUMENT_COORDINATE,
1849
- name: i,
2000
+ name: r,
1850
2001
  argumentName: s
1851
2002
  }) : this.node(t, {
1852
2003
  kind: c.DIRECTIVE_COORDINATE,
1853
- name: i
1854
- }) : r ? s ? this.node(t, {
2004
+ name: r
2005
+ }) : i ? s ? this.node(t, {
1855
2006
  kind: c.ARGUMENT_COORDINATE,
1856
- name: i,
1857
- fieldName: r,
2007
+ name: r,
2008
+ fieldName: i,
1858
2009
  argumentName: s
1859
2010
  }) : this.node(t, {
1860
2011
  kind: c.MEMBER_COORDINATE,
1861
- name: i,
1862
- memberName: r
2012
+ name: r,
2013
+ memberName: i
1863
2014
  }) : this.node(t, {
1864
2015
  kind: c.TYPE_COORDINATE,
1865
- name: i
2016
+ name: r
1866
2017
  });
1867
2018
  }
1868
2019
  node(t, n) {
1869
- return this._options.noLocation !== !0 && (n.loc = new H(t, this._lexer.lastToken, this._lexer.source)), n;
2020
+ return this._options.noLocation !== !0 && (n.loc = new Y(t, this._lexer.lastToken, this._lexer.source)), n;
1870
2021
  }
1871
2022
  peek(t) {
1872
2023
  return this._lexer.token.kind === t;
@@ -1874,7 +2025,7 @@ spurious results.`);
1874
2025
  expectToken(t) {
1875
2026
  let n = this._lexer.token;
1876
2027
  if (n.kind === t) return this.advanceLexer(), n;
1877
- throw h(this._lexer.source, n.start, `Expected ${at(t)}, found ${ne(n)}.`);
2028
+ throw f(this._lexer.source, n.start, `Expected ${ft(t)}, found ${se(n)}.`);
1878
2029
  }
1879
2030
  expectOptionalToken(t) {
1880
2031
  return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1;
@@ -1882,7 +2033,7 @@ spurious results.`);
1882
2033
  expectKeyword(t) {
1883
2034
  let n = this._lexer.token;
1884
2035
  if (n.kind === o.NAME && n.value === t) this.advanceLexer();
1885
- else throw h(this._lexer.source, n.start, `Expected "${t}", found ${ne(n)}.`);
2036
+ else throw f(this._lexer.source, n.start, `Expected "${t}", found ${se(n)}.`);
1886
2037
  }
1887
2038
  expectOptionalKeyword(t) {
1888
2039
  let n = this._lexer.token;
@@ -1890,55 +2041,54 @@ spurious results.`);
1890
2041
  }
1891
2042
  unexpected(t) {
1892
2043
  let n = t ?? this._lexer.token;
1893
- return h(this._lexer.source, n.start, `Unexpected ${ne(n)}.`);
2044
+ return f(this._lexer.source, n.start, `Unexpected ${se(n)}.`);
1894
2045
  }
1895
- any(t, n, i) {
2046
+ any(t, n, r) {
1896
2047
  this.expectToken(t);
1897
- let r = [];
1898
- for (; !this.expectOptionalToken(i);) r.push(n.call(this));
1899
- return r;
2048
+ let i = [];
2049
+ for (; !this.expectOptionalToken(r);) i.push(n.call(this));
2050
+ return i;
1900
2051
  }
1901
- optionalMany(t, n, i) {
2052
+ optionalMany(t, n, r) {
1902
2053
  if (this.expectOptionalToken(t)) {
1903
- let r = [];
2054
+ let i = [];
1904
2055
  do
1905
- r.push(n.call(this));
1906
- while (!this.expectOptionalToken(i));
1907
- return r;
2056
+ i.push(n.call(this));
2057
+ while (!this.expectOptionalToken(r));
2058
+ return i;
1908
2059
  }
1909
- return [];
1910
2060
  }
1911
- many(t, n, i) {
2061
+ many(t, n, r) {
1912
2062
  this.expectToken(t);
1913
- let r = [];
2063
+ let i = [];
1914
2064
  do
1915
- r.push(n.call(this));
1916
- while (!this.expectOptionalToken(i));
1917
- return r;
2065
+ i.push(n.call(this));
2066
+ while (!this.expectOptionalToken(r));
2067
+ return i;
1918
2068
  }
1919
2069
  delimitedMany(t, n) {
1920
2070
  this.expectOptionalToken(t);
1921
- let i = [];
2071
+ let r = [];
1922
2072
  do
1923
- i.push(n.call(this));
2073
+ r.push(n.call(this));
1924
2074
  while (this.expectOptionalToken(t));
1925
- return i;
2075
+ return r;
1926
2076
  }
1927
2077
  advanceLexer() {
1928
2078
  let { maxTokens: t } = this._options, n = this._lexer.advance();
1929
- if (n.kind !== o.EOF && (++this._tokenCounter, t !== void 0 && this._tokenCounter > t)) throw h(this._lexer.source, n.start, `Document contains more that ${t} tokens. Parsing aborted.`);
2079
+ if (n.kind !== o.EOF && (++this._tokenCounter, t !== void 0 && this._tokenCounter > t)) throw f(this._lexer.source, n.start, `Document contains more than ${t} tokens. Parsing aborted.`);
1930
2080
  }
1931
2081
  };
1932
- ct = Wt;
1933
- Kt = { allowLegacyFragmentVariables: !0 };
1934
- tn = {
1935
- parse: en,
2082
+ mt = ei;
2083
+ ni = { experimentalFragmentArguments: !0 };
2084
+ si = {
2085
+ parse: ri,
1936
2086
  astFormat: "graphql",
1937
- hasPragma: Fe,
1938
- hasIgnorePragma: Me,
1939
- locStart: J,
1940
- locEnd: q
2087
+ hasPragma: Ue,
2088
+ hasIgnorePragma: Be,
2089
+ locStart: ee,
2090
+ locEnd: te
1941
2091
  };
1942
- nn = { graphql: Ge };
2092
+ oi = { graphql: qe };
1943
2093
  }))();
1944
- export { ut as default, Ye as languages, $e as options, he as parsers, nn as printers };
2094
+ export { ht as default, Qe as languages, Xe as options, _e as parsers, oi as printers };