@kubb/core 3.17.1 → 3.18.1

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