@prismicio/cli 0.0.1 → 0.0.2-alpha.xru-fix-npx-install-warnings.2

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 (91) hide show
  1. package/dist/acorn-CCr8VihG.js +3019 -0
  2. package/dist/acorn-CCr8VihG.js.map +1 -0
  3. package/dist/angular-B-6Sdz-P.js +2737 -0
  4. package/dist/angular-B-6Sdz-P.js.map +1 -0
  5. package/dist/babel-DSSzU6fH.js +7175 -0
  6. package/dist/babel-DSSzU6fH.js.map +1 -0
  7. package/dist/cli-NVpkXC9F.js +150015 -0
  8. package/dist/cli-NVpkXC9F.js.map +1 -0
  9. package/dist/cli.js +3 -144
  10. package/dist/cli.js.map +1 -1
  11. package/dist/estree-DHLJIae3.js +4486 -0
  12. package/dist/estree-DHLJIae3.js.map +1 -0
  13. package/dist/flow-DVd4L7fO.js +27426 -0
  14. package/dist/flow-DVd4L7fO.js.map +1 -0
  15. package/dist/glimmer-ffe_QHPj.js +2696 -0
  16. package/dist/glimmer-ffe_QHPj.js.map +1 -0
  17. package/dist/graphql-Cx6A4xbM.js +1241 -0
  18. package/dist/graphql-Cx6A4xbM.js.map +1 -0
  19. package/dist/html-Cp0WeaDh.js +2794 -0
  20. package/dist/html-Cp0WeaDh.js.map +1 -0
  21. package/dist/index-CAoPVwid.js +397 -0
  22. package/dist/index-CAoPVwid.js.map +1 -0
  23. package/dist/index-CqzxeUkd.js +835 -0
  24. package/dist/index-CqzxeUkd.js.map +1 -0
  25. package/dist/index-D3Z7xY3-.js +323 -0
  26. package/dist/index-D3Z7xY3-.js.map +1 -0
  27. package/dist/index-D80unpFN.js +3003 -0
  28. package/dist/index-D80unpFN.js.map +1 -0
  29. package/dist/index-DA8FlEll.js +35 -0
  30. package/dist/index-DA8FlEll.js.map +1 -0
  31. package/dist/index-DVTRroeB.js +189 -0
  32. package/dist/index-DVTRroeB.js.map +1 -0
  33. package/dist/index.js +2 -2
  34. package/dist/markdown-B2nQpAgl.js +3380 -0
  35. package/dist/markdown-B2nQpAgl.js.map +1 -0
  36. package/dist/meriyah-oMgd23nK.js +2640 -0
  37. package/dist/meriyah-oMgd23nK.js.map +1 -0
  38. package/dist/multipart-parser-jkRZKgYV.js +354 -0
  39. package/dist/multipart-parser-jkRZKgYV.js.map +1 -0
  40. package/dist/postcss-4okJ6bzF.js +4943 -0
  41. package/dist/postcss-4okJ6bzF.js.map +1 -0
  42. package/dist/typescript-eHDX_fq8.js +12974 -0
  43. package/dist/typescript-eHDX_fq8.js.map +1 -0
  44. package/dist/yaml-CoPGVzvb.js +4165 -0
  45. package/dist/yaml-CoPGVzvb.js.map +1 -0
  46. package/package.json +16 -17
  47. package/src/utils/sentry.ts +2 -0
  48. package/dist/_node_modules/meow/build/dependencies.js +0 -9040
  49. package/dist/_node_modules/meow/build/dependencies.js.map +0 -1
  50. package/dist/_node_modules/meow/build/index.js +0 -80
  51. package/dist/_node_modules/meow/build/index.js.map +0 -1
  52. package/dist/_node_modules/meow/build/options.js +0 -86
  53. package/dist/_node_modules/meow/build/options.js.map +0 -1
  54. package/dist/_node_modules/meow/build/parser.js +0 -61
  55. package/dist/_node_modules/meow/build/parser.js.map +0 -1
  56. package/dist/_node_modules/meow/build/utils.js +0 -8
  57. package/dist/_node_modules/meow/build/utils.js.map +0 -1
  58. package/dist/_node_modules/meow/build/validate.js +0 -102
  59. package/dist/_node_modules/meow/build/validate.js.map +0 -1
  60. package/dist/commands/init.js +0 -34
  61. package/dist/commands/init.js.map +0 -1
  62. package/dist/commands/sync.js +0 -32
  63. package/dist/commands/sync.js.map +0 -1
  64. package/dist/core/auth.js +0 -72
  65. package/dist/core/auth.js.map +0 -1
  66. package/dist/core/customType.js +0 -43
  67. package/dist/core/customType.js.map +0 -1
  68. package/dist/core/framework.js +0 -128
  69. package/dist/core/framework.js.map +0 -1
  70. package/dist/core/project.js +0 -92
  71. package/dist/core/project.js.map +0 -1
  72. package/dist/core/repository.js +0 -33
  73. package/dist/core/repository.js.map +0 -1
  74. package/dist/core/slices.js +0 -47
  75. package/dist/core/slices.js.map +0 -1
  76. package/dist/core/version.js +0 -27
  77. package/dist/core/version.js.map +0 -1
  78. package/dist/packages/cli/package.json.js +0 -63
  79. package/dist/packages/cli/package.json.js.map +0 -1
  80. package/dist/utils/error.js +0 -18
  81. package/dist/utils/error.js.map +0 -1
  82. package/dist/utils/listr.js +0 -12
  83. package/dist/utils/listr.js.map +0 -1
  84. package/dist/utils/output.js +0 -34
  85. package/dist/utils/output.js.map +0 -1
  86. package/dist/utils/package.js +0 -20
  87. package/dist/utils/package.js.map +0 -1
  88. package/dist/utils/sentry.js +0 -62
  89. package/dist/utils/sentry.js.map +0 -1
  90. package/dist/utils/telemetry.js +0 -42
  91. package/dist/utils/telemetry.js.map +0 -1
@@ -0,0 +1,1241 @@
1
+ var pt = Object.defineProperty;
2
+ var de = (e2, t) => {
3
+ for (var n in t) pt(e2, n, { get: t[n], enumerable: true });
4
+ };
5
+ var ut = {};
6
+ de(ut, { languages: () => Ye, options: () => $e, parsers: () => he, printers: () => nn });
7
+ var me = (e2, t) => (n, i, ...r) => n | 1 && i == null ? void 0 : (t.call(i) ?? i[e2]).apply(i, r);
8
+ var lt = String.prototype.replaceAll ?? function(e2, t) {
9
+ return e2.global ? this.replace(e2, t) : this.split(e2).join(t);
10
+ }, ft = me("replaceAll", function() {
11
+ if (typeof this == "string") return lt;
12
+ }), U = ft;
13
+ var ht = () => {
14
+ }, ie = ht;
15
+ var Ee = "indent";
16
+ var Te = "group";
17
+ var Ne = "if-break";
18
+ var G = "line";
19
+ var xe = "break-parent";
20
+ var Y = ie;
21
+ function x(e2) {
22
+ return { type: Ee, contents: e2 };
23
+ }
24
+ var _e = { type: xe };
25
+ function y(e2, t = {}) {
26
+ return Y(t.expandedStates), { type: Te, id: t.id, contents: e2, break: !!t.shouldBreak, expandedStates: t.expandedStates };
27
+ }
28
+ function I(e2, t = "", n = {}) {
29
+ return { type: Ne, breakContents: e2, flatContents: t, groupId: n.groupId };
30
+ }
31
+ function E(e2, t) {
32
+ let n = [];
33
+ for (let i = 0; i < t.length; i++) i !== 0 && n.push(e2), n.push(t[i]);
34
+ return n;
35
+ }
36
+ var k = { type: G }, l = { type: G, soft: true }, dt = { type: G, hard: true }, f = [dt, _e];
37
+ function j(e2) {
38
+ return (t, n, i) => {
39
+ let r = !!i?.backwards;
40
+ if (n === false) return false;
41
+ let { length: s } = t, a = n;
42
+ for (; a >= 0 && a < s; ) {
43
+ let u = t.charAt(a);
44
+ if (e2 instanceof RegExp) {
45
+ if (!e2.test(u)) return a;
46
+ } else if (!e2.includes(u)) return a;
47
+ r ? a-- : a++;
48
+ }
49
+ return a === -1 || a === s ? a : false;
50
+ };
51
+ }
52
+ var $ = j(" "), ye = j(",; "), Ae = j(/[^\n\r]/u);
53
+ var Oe = (e2) => e2 === `
54
+ ` || e2 === "\r" || e2 === "\u2028" || e2 === "\u2029";
55
+ function mt(e2, t, n) {
56
+ let i = !!n?.backwards;
57
+ if (t === false) return false;
58
+ let r = e2.charAt(t);
59
+ if (i) {
60
+ if (e2.charAt(t - 1) === "\r" && r === `
61
+ `) return t - 2;
62
+ if (Oe(r)) return t - 1;
63
+ } else {
64
+ if (r === "\r" && e2.charAt(t + 1) === `
65
+ `) return t + 2;
66
+ if (Oe(r)) return t + 1;
67
+ }
68
+ return t;
69
+ }
70
+ var X = mt;
71
+ function Et(e2, t, n = {}) {
72
+ let i = $(e2, n.backwards ? t - 1 : t, n), r = X(e2, i, n);
73
+ return i !== r;
74
+ }
75
+ var Ie = Et;
76
+ function Tt(e2, t) {
77
+ if (t === false) return false;
78
+ if (e2.charAt(t) === "/" && e2.charAt(t + 1) === "*") {
79
+ for (let n = t + 2; n < e2.length; ++n) if (e2.charAt(n) === "*" && e2.charAt(n + 1) === "/") return n + 2;
80
+ }
81
+ return t;
82
+ }
83
+ var De = Tt;
84
+ function Nt(e2, t) {
85
+ return t === false ? false : e2.charAt(t) === "/" && e2.charAt(t + 1) === "/" ? Ae(e2, t) : t;
86
+ }
87
+ var ge = Nt;
88
+ function xt(e2, t) {
89
+ let n = null, i = t;
90
+ for (; i !== n; ) n = i, i = ye(e2, i), i = De(e2, i), i = $(e2, i);
91
+ return i = ge(e2, i), i = X(e2, i), i !== false && Ie(e2, i);
92
+ }
93
+ var Se = xt;
94
+ function _t(e2) {
95
+ return Array.isArray(e2) && e2.length > 0;
96
+ }
97
+ var se = _t;
98
+ var oe = class extends Error {
99
+ name = "UnexpectedNodeError";
100
+ constructor(t, n, i = "type") {
101
+ super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`), this.node = t;
102
+ }
103
+ }, ke = oe;
104
+ var P = null;
105
+ function w(e2) {
106
+ if (P !== null && typeof P.property) {
107
+ let t = P;
108
+ return P = w.prototype = null, t;
109
+ }
110
+ return P = w.prototype = e2 ?? /* @__PURE__ */ Object.create(null), new w();
111
+ }
112
+ var yt = 10;
113
+ for (let e2 = 0; e2 <= yt; e2++) w();
114
+ function ae(e2) {
115
+ return w(e2);
116
+ }
117
+ function At(e2, t = "type") {
118
+ ae(e2);
119
+ function n(i) {
120
+ let r = i[t], s = e2[r];
121
+ if (!Array.isArray(s)) throw Object.assign(new Error(`Missing visitor keys for '${r}'.`), { node: i });
122
+ return s;
123
+ }
124
+ return n;
125
+ }
126
+ var Ce = At;
127
+ var H = class {
128
+ constructor(t, n, i) {
129
+ this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
130
+ }
131
+ get [Symbol.toStringTag]() {
132
+ return "Location";
133
+ }
134
+ toJSON() {
135
+ return { start: this.start, end: this.end };
136
+ }
137
+ }, F = class {
138
+ constructor(t, n, i, r, s, a) {
139
+ this.kind = t, this.start = n, this.end = i, this.line = r, this.column = s, this.value = a, this.prev = null, this.next = null;
140
+ }
141
+ get [Symbol.toStringTag]() {
142
+ return "Token";
143
+ }
144
+ toJSON() {
145
+ return { kind: this.kind, value: this.value, line: this.line, column: this.column };
146
+ }
147
+ }, ce = { Name: [], Document: ["definitions"], OperationDefinition: ["description", "name", "variableDefinitions", "directives", "selectionSet"], VariableDefinition: ["description", "variable", "type", "defaultValue", "directives"], Variable: ["name"], SelectionSet: ["selections"], Field: ["alias", "name", "arguments", "directives", "selectionSet"], Argument: ["name", "value"], FragmentSpread: ["name", "directives"], InlineFragment: ["typeCondition", "directives", "selectionSet"], FragmentDefinition: ["description", "name", "variableDefinitions", "typeCondition", "directives", "selectionSet"], IntValue: [], FloatValue: [], StringValue: [], BooleanValue: [], NullValue: [], EnumValue: [], ListValue: ["values"], ObjectValue: ["fields"], ObjectField: ["name", "value"], Directive: ["name", "arguments"], NamedType: ["name"], ListType: ["type"], NonNullType: ["type"], SchemaDefinition: ["description", "directives", "operationTypes"], OperationTypeDefinition: ["type"], ScalarTypeDefinition: ["description", "name", "directives"], ObjectTypeDefinition: ["description", "name", "interfaces", "directives", "fields"], FieldDefinition: ["description", "name", "arguments", "type", "directives"], InputValueDefinition: ["description", "name", "type", "defaultValue", "directives"], InterfaceTypeDefinition: ["description", "name", "interfaces", "directives", "fields"], UnionTypeDefinition: ["description", "name", "directives", "types"], EnumTypeDefinition: ["description", "name", "directives", "values"], EnumValueDefinition: ["description", "name", "directives"], InputObjectTypeDefinition: ["description", "name", "directives", "fields"], DirectiveDefinition: ["description", "name", "arguments", "locations"], SchemaExtension: ["directives", "operationTypes"], ScalarTypeExtension: ["name", "directives"], ObjectTypeExtension: ["name", "interfaces", "directives", "fields"], InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"], UnionTypeExtension: ["name", "directives", "types"], EnumTypeExtension: ["name", "directives", "values"], InputObjectTypeExtension: ["name", "directives", "fields"], TypeCoordinate: ["name"], MemberCoordinate: ["name", "memberName"], ArgumentCoordinate: ["name", "fieldName", "argumentName"], DirectiveCoordinate: ["name"], DirectiveArgumentCoordinate: ["name", "argumentName"] };
148
+ new Set(Object.keys(ce));
149
+ var C;
150
+ (function(e2) {
151
+ e2.QUERY = "query", e2.MUTATION = "mutation", e2.SUBSCRIPTION = "subscription";
152
+ })(C || (C = {}));
153
+ var Re = { ...ce };
154
+ for (let e2 of ["ArgumentCoordinate", "DirectiveArgumentCoordinate", "DirectiveCoordinate", "MemberCoordinate", "TypeCoordinate"]) delete Re[e2];
155
+ var ve = Re;
156
+ var Ot = Ce(ve, "kind"), be = Ot;
157
+ var J = (e2) => e2.loc.start, q = (e2) => e2.loc.end;
158
+ var Le = "format", Pe = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u, we = /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u;
159
+ var Fe = (e2) => we.test(e2), Me = (e2) => Pe.test(e2), Ve = (e2) => `# @${Le}
160
+
161
+ ${e2}`;
162
+ function It(e2, t, n) {
163
+ let { node: i } = e2;
164
+ if (!i.description) return "";
165
+ let r = [n("description")];
166
+ return i.kind === "InputValueDefinition" && !i.description.block ? r.push(k) : r.push(f), r;
167
+ }
168
+ var A = It;
169
+ function Dt(e2, t, n) {
170
+ let { node: i } = e2;
171
+ switch (i.kind) {
172
+ case "Document":
173
+ return [...E(f, g(e2, t, n, "definitions")), f];
174
+ case "OperationDefinition": {
175
+ let r = t.originalText[J(i)] !== "{", s = !!i.name;
176
+ return [A(e2, t, n), r ? i.operation : "", r && s ? [" ", n("name")] : "", r && !s && se(i.variableDefinitions) ? " " : "", Be(e2, n), _(e2, n, i), !r && !s ? "" : " ", n("selectionSet")];
177
+ }
178
+ case "FragmentDefinition":
179
+ return [A(e2, t, n), "fragment ", n("name"), Be(e2, n), " on ", n("typeCondition"), _(e2, n, i), " ", n("selectionSet")];
180
+ case "SelectionSet":
181
+ return ["{", x([f, E(f, g(e2, t, n, "selections"))]), f, "}"];
182
+ case "Field":
183
+ return y([i.alias ? [n("alias"), ": "] : "", n("name"), i.arguments.length > 0 ? y(["(", x([l, E([I("", ", "), l], g(e2, t, n, "arguments"))]), l, ")"]) : "", _(e2, n, i), i.selectionSet ? " " : "", n("selectionSet")]);
184
+ case "Name":
185
+ return i.value;
186
+ case "StringValue":
187
+ if (i.block) {
188
+ let r = U(0, i.value, '"""', '\\"""').split(`
189
+ `);
190
+ return r.length === 1 && (r[0] = r[0].trim()), r.every((s) => s === "") && (r.length = 0), E(f, ['"""', ...r, '"""']);
191
+ }
192
+ return ['"', U(0, U(0, i.value, /["\\]/gu, "\\$&"), `
193
+ `, "\\n"), '"'];
194
+ case "IntValue":
195
+ case "FloatValue":
196
+ case "EnumValue":
197
+ return i.value;
198
+ case "BooleanValue":
199
+ return i.value ? "true" : "false";
200
+ case "NullValue":
201
+ return "null";
202
+ case "Variable":
203
+ return ["$", n("name")];
204
+ case "ListValue":
205
+ return y(["[", x([l, E([I("", ", "), l], e2.map(n, "values"))]), l, "]"]);
206
+ case "ObjectValue": {
207
+ let r = t.bracketSpacing && i.fields.length > 0 ? " " : "";
208
+ return y(["{", r, x([l, E([I("", ", "), l], e2.map(n, "fields"))]), l, I("", r), "}"]);
209
+ }
210
+ case "ObjectField":
211
+ case "Argument":
212
+ return [n("name"), ": ", n("value")];
213
+ case "Directive":
214
+ return ["@", n("name"), i.arguments.length > 0 ? y(["(", x([l, E([I("", ", "), l], g(e2, t, n, "arguments"))]), l, ")"]) : ""];
215
+ case "NamedType":
216
+ return n("name");
217
+ case "VariableDefinition":
218
+ return [A(e2, t, n), n("variable"), ": ", n("type"), i.defaultValue ? [" = ", n("defaultValue")] : "", _(e2, n, i)];
219
+ case "ObjectTypeExtension":
220
+ case "ObjectTypeDefinition":
221
+ case "InputObjectTypeExtension":
222
+ case "InputObjectTypeDefinition":
223
+ case "InterfaceTypeExtension":
224
+ case "InterfaceTypeDefinition": {
225
+ let { kind: r } = i, s = [];
226
+ return r.endsWith("TypeDefinition") ? s.push(A(e2, 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(e2, t, n)), s.push(_(e2, n, i)), i.fields.length > 0 && s.push([" {", x([f, E(f, g(e2, t, n, "fields"))]), f, "}"]), s;
227
+ }
228
+ case "FieldDefinition":
229
+ return [A(e2, t, n), n("name"), i.arguments.length > 0 ? y(["(", x([l, E([I("", ", "), l], g(e2, t, n, "arguments"))]), l, ")"]) : "", ": ", n("type"), _(e2, n, i)];
230
+ case "DirectiveDefinition":
231
+ return [A(e2, t, n), "directive ", "@", n("name"), i.arguments.length > 0 ? y(["(", x([l, E([I("", ", "), l], g(e2, t, n, "arguments"))]), l, ")"]) : "", i.repeatable ? " repeatable" : "", " on ", ...E(" | ", e2.map(n, "locations"))];
232
+ case "EnumTypeExtension":
233
+ case "EnumTypeDefinition":
234
+ return [A(e2, t, n), i.kind === "EnumTypeExtension" ? "extend " : "", "enum ", n("name"), _(e2, n, i), i.values.length > 0 ? [" {", x([f, E(f, g(e2, t, n, "values"))]), f, "}"] : ""];
235
+ case "EnumValueDefinition":
236
+ return [A(e2, t, n), n("name"), _(e2, n, i)];
237
+ case "InputValueDefinition":
238
+ return [A(e2, t, n), n("name"), ": ", n("type"), i.defaultValue ? [" = ", n("defaultValue")] : "", _(e2, n, i)];
239
+ case "SchemaExtension":
240
+ return ["extend schema", _(e2, n, i), ...i.operationTypes.length > 0 ? [" {", x([f, E(f, g(e2, t, n, "operationTypes"))]), f, "}"] : []];
241
+ case "SchemaDefinition":
242
+ return [A(e2, t, n), "schema", _(e2, n, i), " {", i.operationTypes.length > 0 ? x([f, E(f, g(e2, t, n, "operationTypes"))]) : "", f, "}"];
243
+ case "OperationTypeDefinition":
244
+ return [i.operation, ": ", n("type")];
245
+ case "FragmentSpread":
246
+ return ["...", n("name"), _(e2, n, i)];
247
+ case "InlineFragment":
248
+ return ["...", i.typeCondition ? [" on ", n("typeCondition")] : "", _(e2, n, i), " ", n("selectionSet")];
249
+ case "UnionTypeExtension":
250
+ case "UnionTypeDefinition":
251
+ return y([A(e2, t, n), y([i.kind === "UnionTypeExtension" ? "extend " : "", "union ", n("name"), _(e2, n, i), i.types.length > 0 ? [" =", I("", " "), x([I([k, "| "]), E([k, "| "], e2.map(n, "types"))])] : ""])]);
252
+ case "ScalarTypeExtension":
253
+ case "ScalarTypeDefinition":
254
+ return [A(e2, t, n), i.kind === "ScalarTypeExtension" ? "extend " : "", "scalar ", n("name"), _(e2, n, i)];
255
+ case "NonNullType":
256
+ return [n("type"), "!"];
257
+ case "ListType":
258
+ return ["[", n("type"), "]"];
259
+ default:
260
+ throw new ke(i, "Graphql", "kind");
261
+ }
262
+ }
263
+ function _(e2, t, n) {
264
+ if (n.directives.length === 0) return "";
265
+ let i = E(k, e2.map(t, "directives"));
266
+ return n.kind === "FragmentDefinition" || n.kind === "OperationDefinition" ? y([k, i]) : [" ", y(x([l, i]))];
267
+ }
268
+ function g(e2, t, n, i) {
269
+ return e2.map(({ isLast: r, node: s }) => {
270
+ let a = n();
271
+ return !r && Se(t.originalText, q(s)) ? [a, f] : a;
272
+ }, i);
273
+ }
274
+ function gt(e2) {
275
+ return e2.kind !== "Comment";
276
+ }
277
+ function St({ node: e2 }) {
278
+ if (e2.kind === "Comment") return "#" + e2.value.trimEnd();
279
+ throw new Error("Not a comment: " + JSON.stringify(e2));
280
+ }
281
+ function kt(e2, t, n) {
282
+ let { node: i } = e2, r = [], { interfaces: s } = i, a = e2.map(n, "interfaces");
283
+ for (let u = 0; u < s.length; u++) {
284
+ let p = s[u];
285
+ r.push(a[u]);
286
+ let T = s[u + 1];
287
+ if (T) {
288
+ let D = t.originalText.slice(p.loc.end, T.loc.start).includes("#");
289
+ r.push(" &", D ? k : " ");
290
+ }
291
+ }
292
+ return r;
293
+ }
294
+ function Be(e2, t) {
295
+ let { node: n } = e2;
296
+ return se(n.variableDefinitions) ? y(["(", x([l, E([I("", ", "), l], e2.map(t, "variableDefinitions"))]), l, ")"]) : "";
297
+ }
298
+ function Ue(e2, t) {
299
+ e2.kind === "StringValue" && e2.block && !e2.value.includes(`
300
+ `) && (t.value = e2.value.trim());
301
+ }
302
+ Ue.ignoredProperties = /* @__PURE__ */ new Set(["loc", "comments"]);
303
+ function Ct(e2) {
304
+ let { node: t } = e2;
305
+ return t?.comments?.some((n) => n.value.trim() === "prettier-ignore");
306
+ }
307
+ var Rt = { print: Dt, massageAstNode: Ue, hasPrettierIgnore: Ct, insertPragma: Ve, printComment: St, canAttachComment: gt, getVisitorKeys: be }, Ge = Rt;
308
+ var Ye = [{ name: "GraphQL", type: "data", aceMode: "graphqlschema", extensions: [".graphql", ".gql", ".graphqls"], tmScope: "source.graphql", parsers: ["graphql"], vscodeLanguageIds: ["graphql"], linguistLanguageId: 139 }];
309
+ var je = { bracketSpacing: { category: "Common", type: "boolean", default: true, description: "Print spaces between brackets.", oppositeDescription: "Do not print spaces between brackets." } };
310
+ var vt = { bracketSpacing: je.bracketSpacing }, $e = vt;
311
+ var he = {};
312
+ de(he, { graphql: () => tn });
313
+ function Xe(e2) {
314
+ return typeof e2 == "object" && e2 !== null;
315
+ }
316
+ function He(e2, t) {
317
+ throw new Error("Unexpected invariant triggered.");
318
+ }
319
+ var bt = /\r\n|[\n\r]/g;
320
+ function M(e2, t) {
321
+ let n = 0, i = 1;
322
+ for (let r of e2.body.matchAll(bt)) {
323
+ if (typeof r.index == "number" || He(), r.index >= t) break;
324
+ n = r.index + r[0].length, i += 1;
325
+ }
326
+ return { line: i, column: t + 1 - n };
327
+ }
328
+ function qe(e2) {
329
+ return ue(e2.source, M(e2.source, e2.start));
330
+ }
331
+ function ue(e2, t) {
332
+ let n = e2.locationOffset.column - 1, i = "".padStart(n) + e2.body, r = t.line - 1, s = e2.locationOffset.line - 1, a = t.line + s, u = t.line === 1 ? n : 0, p = t.column + u, T = `${e2.name}:${a}:${p}
333
+ `, d = i.split(/\r\n|[\n\r]/g), D = d[r];
334
+ if (D.length > 120) {
335
+ let O = Math.floor(p / 80), re = p % 80, N = [];
336
+ for (let v = 0; v < D.length; v += 80) N.push(D.slice(v, v + 80));
337
+ return T + Je([[`${a} |`, N[0]], ...N.slice(1, O + 1).map((v) => ["|", v]), ["|", "^".padStart(re)], ["|", N[O + 1]]]);
338
+ }
339
+ return T + Je([[`${a - 1} |`, d[r - 1]], [`${a} |`, D], ["|", "^".padStart(p)], [`${a + 1} |`, d[r + 1]]]);
340
+ }
341
+ function Je(e2) {
342
+ let t = e2.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
343
+ return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
344
+ `);
345
+ }
346
+ function Lt(e2) {
347
+ let t = e2[0];
348
+ return t == null || "kind" in t || "length" in t ? { nodes: t, source: e2[1], positions: e2[2], path: e2[3], originalError: e2[4], extensions: e2[5] } : t;
349
+ }
350
+ var Q = class e extends Error {
351
+ constructor(t, ...n) {
352
+ var i, r, s;
353
+ let { nodes: a, source: u, positions: p, path: T, originalError: d, extensions: D } = Lt(n);
354
+ 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);
355
+ let O = Qe((i = this.nodes) === null || i === void 0 ? void 0 : i.map((N) => N.loc).filter((N) => N != null));
356
+ 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));
357
+ let re = Xe(d?.extensions) ? d?.extensions : void 0;
358
+ this.extensions = (s = D ?? re) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, { message: { writable: true, enumerable: true }, name: { enumerable: false }, nodes: { enumerable: false }, source: { enumerable: false }, positions: { enumerable: false }, originalError: { enumerable: false } }), d != null && d.stack ? Object.defineProperty(this, "stack", { value: d.stack, writable: true, configurable: true }) : Error.captureStackTrace ? Error.captureStackTrace(this, e) : Object.defineProperty(this, "stack", { value: Error().stack, writable: true, configurable: true });
359
+ }
360
+ get [Symbol.toStringTag]() {
361
+ return "GraphQLError";
362
+ }
363
+ toString() {
364
+ let t = this.message;
365
+ if (this.nodes) for (let n of this.nodes) n.loc && (t += `
366
+
367
+ ` + qe(n.loc));
368
+ else if (this.source && this.locations) for (let n of this.locations) t += `
369
+
370
+ ` + ue(this.source, n);
371
+ return t;
372
+ }
373
+ toJSON() {
374
+ let t = { message: this.message };
375
+ 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;
376
+ }
377
+ };
378
+ function Qe(e2) {
379
+ return e2 === void 0 || e2.length === 0 ? void 0 : e2;
380
+ }
381
+ function h(e2, t, n) {
382
+ return new Q(`Syntax Error: ${n}`, { source: e2, positions: [t] });
383
+ }
384
+ var W;
385
+ (function(e2) {
386
+ e2.QUERY = "QUERY", e2.MUTATION = "MUTATION", e2.SUBSCRIPTION = "SUBSCRIPTION", e2.FIELD = "FIELD", e2.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e2.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e2.INLINE_FRAGMENT = "INLINE_FRAGMENT", e2.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e2.SCHEMA = "SCHEMA", e2.SCALAR = "SCALAR", e2.OBJECT = "OBJECT", e2.FIELD_DEFINITION = "FIELD_DEFINITION", e2.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e2.INTERFACE = "INTERFACE", e2.UNION = "UNION", e2.ENUM = "ENUM", e2.ENUM_VALUE = "ENUM_VALUE", e2.INPUT_OBJECT = "INPUT_OBJECT", e2.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
387
+ })(W || (W = {}));
388
+ var c;
389
+ (function(e2) {
390
+ e2.NAME = "Name", e2.DOCUMENT = "Document", e2.OPERATION_DEFINITION = "OperationDefinition", e2.VARIABLE_DEFINITION = "VariableDefinition", e2.SELECTION_SET = "SelectionSet", e2.FIELD = "Field", e2.ARGUMENT = "Argument", e2.FRAGMENT_SPREAD = "FragmentSpread", e2.INLINE_FRAGMENT = "InlineFragment", e2.FRAGMENT_DEFINITION = "FragmentDefinition", e2.VARIABLE = "Variable", e2.INT = "IntValue", e2.FLOAT = "FloatValue", e2.STRING = "StringValue", e2.BOOLEAN = "BooleanValue", e2.NULL = "NullValue", e2.ENUM = "EnumValue", e2.LIST = "ListValue", e2.OBJECT = "ObjectValue", e2.OBJECT_FIELD = "ObjectField", e2.DIRECTIVE = "Directive", e2.NAMED_TYPE = "NamedType", e2.LIST_TYPE = "ListType", e2.NON_NULL_TYPE = "NonNullType", e2.SCHEMA_DEFINITION = "SchemaDefinition", e2.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e2.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e2.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e2.FIELD_DEFINITION = "FieldDefinition", e2.INPUT_VALUE_DEFINITION = "InputValueDefinition", e2.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e2.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e2.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e2.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e2.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e2.DIRECTIVE_DEFINITION = "DirectiveDefinition", e2.SCHEMA_EXTENSION = "SchemaExtension", e2.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e2.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e2.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e2.UNION_TYPE_EXTENSION = "UnionTypeExtension", e2.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e2.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension", e2.TYPE_COORDINATE = "TypeCoordinate", e2.MEMBER_COORDINATE = "MemberCoordinate", e2.ARGUMENT_COORDINATE = "ArgumentCoordinate", e2.DIRECTIVE_COORDINATE = "DirectiveCoordinate", e2.DIRECTIVE_ARGUMENT_COORDINATE = "DirectiveArgumentCoordinate";
391
+ })(c || (c = {}));
392
+ function We(e2) {
393
+ return e2 === 9 || e2 === 32;
394
+ }
395
+ function b(e2) {
396
+ return e2 >= 48 && e2 <= 57;
397
+ }
398
+ function ze(e2) {
399
+ return e2 >= 97 && e2 <= 122 || e2 >= 65 && e2 <= 90;
400
+ }
401
+ function pe(e2) {
402
+ return ze(e2) || e2 === 95;
403
+ }
404
+ function Ke(e2) {
405
+ return ze(e2) || b(e2) || e2 === 95;
406
+ }
407
+ function Ze(e2) {
408
+ var t;
409
+ let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
410
+ for (let a = 0; a < e2.length; ++a) {
411
+ var s;
412
+ let u = e2[a], p = Pt(u);
413
+ p !== u.length && (i = (s = i) !== null && s !== void 0 ? s : a, r = a, a !== 0 && p < n && (n = p));
414
+ }
415
+ return e2.map((a, u) => u === 0 ? a : a.slice(n)).slice((t = i) !== null && t !== void 0 ? t : 0, r + 1);
416
+ }
417
+ function Pt(e2) {
418
+ let t = 0;
419
+ for (; t < e2.length && We(e2.charCodeAt(t)); ) ++t;
420
+ return t;
421
+ }
422
+ var o;
423
+ (function(e2) {
424
+ e2.SOF = "<SOF>", e2.EOF = "<EOF>", e2.BANG = "!", e2.DOLLAR = "$", e2.AMP = "&", e2.PAREN_L = "(", e2.PAREN_R = ")", e2.DOT = ".", e2.SPREAD = "...", e2.COLON = ":", e2.EQUALS = "=", e2.AT = "@", e2.BRACKET_L = "[", e2.BRACKET_R = "]", e2.BRACE_L = "{", e2.PIPE = "|", e2.BRACE_R = "}", e2.NAME = "Name", e2.INT = "Int", e2.FLOAT = "Float", e2.STRING = "String", e2.BLOCK_STRING = "BlockString", e2.COMMENT = "Comment";
425
+ })(o || (o = {}));
426
+ var z = class {
427
+ constructor(t) {
428
+ let n = new F(o.SOF, 0, 0, 0, 0);
429
+ this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
430
+ }
431
+ get [Symbol.toStringTag]() {
432
+ return "Lexer";
433
+ }
434
+ advance() {
435
+ return this.lastToken = this.token, this.token = this.lookahead();
436
+ }
437
+ lookahead() {
438
+ let t = this.token;
439
+ if (t.kind !== o.EOF) do
440
+ if (t.next) t = t.next;
441
+ else {
442
+ let n = wt(this, t.end);
443
+ t.next = n, n.prev = t, t = n;
444
+ }
445
+ while (t.kind === o.COMMENT);
446
+ return t;
447
+ }
448
+ };
449
+ function tt(e2) {
450
+ return e2 === o.BANG || e2 === o.DOLLAR || e2 === o.AMP || e2 === o.PAREN_L || e2 === o.PAREN_R || e2 === o.DOT || e2 === o.SPREAD || e2 === o.COLON || e2 === o.EQUALS || e2 === o.AT || e2 === o.BRACKET_L || e2 === o.BRACKET_R || e2 === o.BRACE_L || e2 === o.PIPE || e2 === o.BRACE_R;
451
+ }
452
+ function L(e2) {
453
+ return e2 >= 0 && e2 <= 55295 || e2 >= 57344 && e2 <= 1114111;
454
+ }
455
+ function K(e2, t) {
456
+ return nt(e2.charCodeAt(t)) && rt(e2.charCodeAt(t + 1));
457
+ }
458
+ function nt(e2) {
459
+ return e2 >= 55296 && e2 <= 56319;
460
+ }
461
+ function rt(e2) {
462
+ return e2 >= 56320 && e2 <= 57343;
463
+ }
464
+ function R(e2, t) {
465
+ let n = e2.source.body.codePointAt(t);
466
+ if (n === void 0) return o.EOF;
467
+ if (n >= 32 && n <= 126) {
468
+ let i = String.fromCodePoint(n);
469
+ return i === '"' ? `'"'` : `"${i}"`;
470
+ }
471
+ return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
472
+ }
473
+ function m(e2, t, n, i, r) {
474
+ let s = e2.line, a = 1 + n - e2.lineStart;
475
+ return new F(t, n, i, s, a, r);
476
+ }
477
+ function wt(e2, t) {
478
+ let n = e2.source.body, i = n.length, r = t;
479
+ for (; r < i; ) {
480
+ let s = n.charCodeAt(r);
481
+ switch (s) {
482
+ case 65279:
483
+ case 9:
484
+ case 32:
485
+ case 44:
486
+ ++r;
487
+ continue;
488
+ case 10:
489
+ ++r, ++e2.line, e2.lineStart = r;
490
+ continue;
491
+ case 13:
492
+ n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e2.line, e2.lineStart = r;
493
+ continue;
494
+ case 35:
495
+ return Ft(e2, r);
496
+ case 33:
497
+ return m(e2, o.BANG, r, r + 1);
498
+ case 36:
499
+ return m(e2, o.DOLLAR, r, r + 1);
500
+ case 38:
501
+ return m(e2, o.AMP, r, r + 1);
502
+ case 40:
503
+ return m(e2, o.PAREN_L, r, r + 1);
504
+ case 41:
505
+ return m(e2, o.PAREN_R, r, r + 1);
506
+ case 46:
507
+ if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46) return m(e2, o.SPREAD, r, r + 3);
508
+ break;
509
+ case 58:
510
+ return m(e2, o.COLON, r, r + 1);
511
+ case 61:
512
+ return m(e2, o.EQUALS, r, r + 1);
513
+ case 64:
514
+ return m(e2, o.AT, r, r + 1);
515
+ case 91:
516
+ return m(e2, o.BRACKET_L, r, r + 1);
517
+ case 93:
518
+ return m(e2, o.BRACKET_R, r, r + 1);
519
+ case 123:
520
+ return m(e2, o.BRACE_L, r, r + 1);
521
+ case 124:
522
+ return m(e2, o.PIPE, r, r + 1);
523
+ case 125:
524
+ return m(e2, o.BRACE_R, r, r + 1);
525
+ case 34:
526
+ return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? Yt(e2, r) : Vt(e2, r);
527
+ }
528
+ if (b(s) || s === 45) return Mt(e2, r, s);
529
+ if (pe(s)) return jt(e2, r);
530
+ throw h(e2.source, r, s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : L(s) || K(n, r) ? `Unexpected character: ${R(e2, r)}.` : `Invalid character: ${R(e2, r)}.`);
531
+ }
532
+ return m(e2, o.EOF, i, i);
533
+ }
534
+ function Ft(e2, t) {
535
+ let n = e2.source.body, i = n.length, r = t + 1;
536
+ for (; r < i; ) {
537
+ let s = n.charCodeAt(r);
538
+ if (s === 10 || s === 13) break;
539
+ if (L(s)) ++r;
540
+ else if (K(n, r)) r += 2;
541
+ else break;
542
+ }
543
+ return m(e2, o.COMMENT, t, r, n.slice(t + 1, r));
544
+ }
545
+ function Mt(e2, t, n) {
546
+ let i = e2.source.body, r = t, s = n, a = false;
547
+ if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
548
+ if (s = i.charCodeAt(++r), b(s)) throw h(e2.source, r, `Invalid number, unexpected digit after 0: ${R(e2, r)}.`);
549
+ } else r = le(e2, r, s), s = i.charCodeAt(r);
550
+ if (s === 46 && (a = true, s = i.charCodeAt(++r), r = le(e2, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (a = true, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = le(e2, r, s), s = i.charCodeAt(r)), s === 46 || pe(s)) throw h(e2.source, r, `Invalid number, expected digit but got: ${R(e2, r)}.`);
551
+ return m(e2, a ? o.FLOAT : o.INT, t, r, i.slice(t, r));
552
+ }
553
+ function le(e2, t, n) {
554
+ if (!b(n)) throw h(e2.source, t, `Invalid number, expected digit but got: ${R(e2, t)}.`);
555
+ let i = e2.source.body, r = t + 1;
556
+ for (; b(i.charCodeAt(r)); ) ++r;
557
+ return r;
558
+ }
559
+ function Vt(e2, t) {
560
+ let n = e2.source.body, i = n.length, r = t + 1, s = r, a = "";
561
+ for (; r < i; ) {
562
+ let u = n.charCodeAt(r);
563
+ if (u === 34) return a += n.slice(s, r), m(e2, o.STRING, t, r + 1, a);
564
+ if (u === 92) {
565
+ a += n.slice(s, r);
566
+ let p = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? Bt(e2, r) : Ut(e2, r) : Gt(e2, r);
567
+ a += p.value, r += p.size, s = r;
568
+ continue;
569
+ }
570
+ if (u === 10 || u === 13) break;
571
+ if (L(u)) ++r;
572
+ else if (K(n, r)) r += 2;
573
+ else throw h(e2.source, r, `Invalid character within String: ${R(e2, r)}.`);
574
+ }
575
+ throw h(e2.source, r, "Unterminated string.");
576
+ }
577
+ function Bt(e2, t) {
578
+ let n = e2.source.body, i = 0, r = 3;
579
+ for (; r < 12; ) {
580
+ let s = n.charCodeAt(t + r++);
581
+ if (s === 125) {
582
+ if (r < 5 || !L(i)) break;
583
+ return { value: String.fromCodePoint(i), size: r };
584
+ }
585
+ if (i = i << 4 | V(s), i < 0) break;
586
+ }
587
+ throw h(e2.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + r)}".`);
588
+ }
589
+ function Ut(e2, t) {
590
+ let n = e2.source.body, i = et(n, t + 2);
591
+ if (L(i)) return { value: String.fromCodePoint(i), size: 6 };
592
+ if (nt(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
593
+ let r = et(n, t + 8);
594
+ if (rt(r)) return { value: String.fromCodePoint(i, r), size: 12 };
595
+ }
596
+ throw h(e2.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`);
597
+ }
598
+ function et(e2, t) {
599
+ return V(e2.charCodeAt(t)) << 12 | V(e2.charCodeAt(t + 1)) << 8 | V(e2.charCodeAt(t + 2)) << 4 | V(e2.charCodeAt(t + 3));
600
+ }
601
+ function V(e2) {
602
+ return e2 >= 48 && e2 <= 57 ? e2 - 48 : e2 >= 65 && e2 <= 70 ? e2 - 55 : e2 >= 97 && e2 <= 102 ? e2 - 87 : -1;
603
+ }
604
+ function Gt(e2, t) {
605
+ let n = e2.source.body;
606
+ switch (n.charCodeAt(t + 1)) {
607
+ case 34:
608
+ return { value: '"', size: 2 };
609
+ case 92:
610
+ return { value: "\\", size: 2 };
611
+ case 47:
612
+ return { value: "/", size: 2 };
613
+ case 98:
614
+ return { value: "\b", size: 2 };
615
+ case 102:
616
+ return { value: "\f", size: 2 };
617
+ case 110:
618
+ return { value: `
619
+ `, size: 2 };
620
+ case 114:
621
+ return { value: "\r", size: 2 };
622
+ case 116:
623
+ return { value: " ", size: 2 };
624
+ }
625
+ throw h(e2.source, t, `Invalid character escape sequence: "${n.slice(t, t + 2)}".`);
626
+ }
627
+ function Yt(e2, t) {
628
+ let n = e2.source.body, i = n.length, r = e2.lineStart, s = t + 3, a = s, u = "", p = [];
629
+ for (; s < i; ) {
630
+ let T = n.charCodeAt(s);
631
+ if (T === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
632
+ u += n.slice(a, s), p.push(u);
633
+ let d = m(e2, o.BLOCK_STRING, t, s + 3, Ze(p).join(`
634
+ `));
635
+ return e2.line += p.length - 1, e2.lineStart = r, d;
636
+ }
637
+ if (T === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
638
+ u += n.slice(a, s), a = s + 1, s += 4;
639
+ continue;
640
+ }
641
+ if (T === 10 || T === 13) {
642
+ u += n.slice(a, s), p.push(u), T === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", a = s, r = s;
643
+ continue;
644
+ }
645
+ if (L(T)) ++s;
646
+ else if (K(n, s)) s += 2;
647
+ else throw h(e2.source, s, `Invalid character within String: ${R(e2, s)}.`);
648
+ }
649
+ throw h(e2.source, s, "Unterminated string.");
650
+ }
651
+ function jt(e2, t) {
652
+ let n = e2.source.body, i = n.length, r = t + 1;
653
+ for (; r < i; ) {
654
+ let s = n.charCodeAt(r);
655
+ if (Ke(s)) ++r;
656
+ else break;
657
+ }
658
+ return m(e2, o.NAME, t, r, n.slice(t, r));
659
+ }
660
+ function Z(e2, t) {
661
+ throw new Error(t);
662
+ }
663
+ function ee(e2) {
664
+ return te(e2, []);
665
+ }
666
+ function te(e2, t) {
667
+ switch (typeof e2) {
668
+ case "string":
669
+ return JSON.stringify(e2);
670
+ case "function":
671
+ return e2.name ? `[function ${e2.name}]` : "[function]";
672
+ case "object":
673
+ return $t(e2, t);
674
+ default:
675
+ return String(e2);
676
+ }
677
+ }
678
+ function $t(e2, t) {
679
+ if (e2 === null) return "null";
680
+ if (t.includes(e2)) return "[Circular]";
681
+ let n = [...t, e2];
682
+ if (Xt(e2)) {
683
+ let i = e2.toJSON();
684
+ if (i !== e2) return typeof i == "string" ? i : te(i, n);
685
+ } else if (Array.isArray(e2)) return Jt(e2, n);
686
+ return Ht(e2, n);
687
+ }
688
+ function Xt(e2) {
689
+ return typeof e2.toJSON == "function";
690
+ }
691
+ function Ht(e2, t) {
692
+ let n = Object.entries(e2);
693
+ return n.length === 0 ? "{}" : t.length > 2 ? "[" + qt(e2) + "]" : "{ " + n.map(([r, s]) => r + ": " + te(s, t)).join(", ") + " }";
694
+ }
695
+ function Jt(e2, t) {
696
+ if (e2.length === 0) return "[]";
697
+ if (t.length > 2) return "[Array]";
698
+ let n = Math.min(10, e2.length), i = e2.length - n, r = [];
699
+ for (let s = 0; s < n; ++s) r.push(te(e2[s], t));
700
+ return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
701
+ }
702
+ function qt(e2) {
703
+ let t = Object.prototype.toString.call(e2).replace(/^\[object /, "").replace(/]$/, "");
704
+ if (t === "Object" && typeof e2.constructor == "function") {
705
+ let n = e2.constructor.name;
706
+ if (typeof n == "string" && n !== "") return n;
707
+ }
708
+ return t;
709
+ }
710
+ var Qt = globalThis.process && true, it = Qt ? function(t, n) {
711
+ return t instanceof n;
712
+ } : function(t, n) {
713
+ if (t instanceof n) return true;
714
+ if (typeof t == "object" && t !== null) {
715
+ var i;
716
+ 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;
717
+ if (r === s) {
718
+ let a = ee(t);
719
+ throw new Error(`Cannot use ${r} "${a}" from another module or realm.
720
+
721
+ Ensure that there is only one instance of "graphql" in the node_modules
722
+ directory. If different versions of "graphql" are the dependencies of other
723
+ relied on modules, use "resolutions" to ensure only one version is installed.
724
+
725
+ https://yarnpkg.com/en/docs/selective-version-resolutions
726
+
727
+ Duplicate "graphql" modules cannot be used at the same time since different
728
+ versions may have different capabilities and behavior. The data from one
729
+ version used in the function from another could produce confusing and
730
+ spurious results.`);
731
+ }
732
+ }
733
+ return false;
734
+ };
735
+ var B = class {
736
+ constructor(t, n = "GraphQL request", i = { line: 1, column: 1 }) {
737
+ typeof t == "string" || Z(false, `Body must be a string. Received: ${ee(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || Z(false, "line in locationOffset is 1-indexed and must be positive."), this.locationOffset.column > 0 || Z(false, "column in locationOffset is 1-indexed and must be positive.");
738
+ }
739
+ get [Symbol.toStringTag]() {
740
+ return "Source";
741
+ }
742
+ };
743
+ function st(e2) {
744
+ return it(e2, B);
745
+ }
746
+ function ot(e2, t) {
747
+ let n = new fe(e2, t), i = n.parseDocument();
748
+ return Object.defineProperty(i, "tokenCount", { enumerable: false, value: n.tokenCount }), i;
749
+ }
750
+ var fe = class {
751
+ constructor(t, n = {}) {
752
+ let { lexer: i, ...r } = n;
753
+ if (i) this._lexer = i;
754
+ else {
755
+ let s = st(t) ? t : new B(t);
756
+ this._lexer = new z(s);
757
+ }
758
+ this._options = r, this._tokenCounter = 0;
759
+ }
760
+ get tokenCount() {
761
+ return this._tokenCounter;
762
+ }
763
+ parseName() {
764
+ let t = this.expectToken(o.NAME);
765
+ return this.node(t, { kind: c.NAME, value: t.value });
766
+ }
767
+ parseDocument() {
768
+ return this.node(this._lexer.token, { kind: c.DOCUMENT, definitions: this.many(o.SOF, this.parseDefinition, o.EOF) });
769
+ }
770
+ parseDefinition() {
771
+ if (this.peek(o.BRACE_L)) return this.parseOperationDefinition();
772
+ let t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
773
+ 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.");
774
+ if (n.kind === o.NAME) {
775
+ switch (n.value) {
776
+ case "schema":
777
+ return this.parseSchemaDefinition();
778
+ case "scalar":
779
+ return this.parseScalarTypeDefinition();
780
+ case "type":
781
+ return this.parseObjectTypeDefinition();
782
+ case "interface":
783
+ return this.parseInterfaceTypeDefinition();
784
+ case "union":
785
+ return this.parseUnionTypeDefinition();
786
+ case "enum":
787
+ return this.parseEnumTypeDefinition();
788
+ case "input":
789
+ return this.parseInputObjectTypeDefinition();
790
+ case "directive":
791
+ return this.parseDirectiveDefinition();
792
+ }
793
+ switch (n.value) {
794
+ case "query":
795
+ case "mutation":
796
+ case "subscription":
797
+ return this.parseOperationDefinition();
798
+ case "fragment":
799
+ return this.parseFragmentDefinition();
800
+ }
801
+ if (t) throw h(this._lexer.source, this._lexer.token.start, "Unexpected description, only GraphQL definitions support descriptions.");
802
+ switch (n.value) {
803
+ case "extend":
804
+ return this.parseTypeSystemExtension();
805
+ }
806
+ }
807
+ throw this.unexpected(n);
808
+ }
809
+ parseOperationDefinition() {
810
+ let t = this._lexer.token;
811
+ if (this.peek(o.BRACE_L)) return this.node(t, { kind: c.OPERATION_DEFINITION, operation: C.QUERY, description: void 0, name: void 0, variableDefinitions: [], directives: [], selectionSet: this.parseSelectionSet() });
812
+ let n = this.parseDescription(), i = this.parseOperationType(), r;
813
+ return this.peek(o.NAME) && (r = this.parseName()), this.node(t, { kind: c.OPERATION_DEFINITION, operation: i, description: n, name: r, variableDefinitions: this.parseVariableDefinitions(), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet() });
814
+ }
815
+ parseOperationType() {
816
+ let t = this.expectToken(o.NAME);
817
+ switch (t.value) {
818
+ case "query":
819
+ return C.QUERY;
820
+ case "mutation":
821
+ return C.MUTATION;
822
+ case "subscription":
823
+ return C.SUBSCRIPTION;
824
+ }
825
+ throw this.unexpected(t);
826
+ }
827
+ parseVariableDefinitions() {
828
+ return this.optionalMany(o.PAREN_L, this.parseVariableDefinition, o.PAREN_R);
829
+ }
830
+ parseVariableDefinition() {
831
+ return this.node(this._lexer.token, { kind: c.VARIABLE_DEFINITION, description: this.parseDescription(), variable: this.parseVariable(), type: (this.expectToken(o.COLON), this.parseTypeReference()), defaultValue: this.expectOptionalToken(o.EQUALS) ? this.parseConstValueLiteral() : void 0, directives: this.parseConstDirectives() });
832
+ }
833
+ parseVariable() {
834
+ let t = this._lexer.token;
835
+ return this.expectToken(o.DOLLAR), this.node(t, { kind: c.VARIABLE, name: this.parseName() });
836
+ }
837
+ parseSelectionSet() {
838
+ return this.node(this._lexer.token, { kind: c.SELECTION_SET, selections: this.many(o.BRACE_L, this.parseSelection, o.BRACE_R) });
839
+ }
840
+ parseSelection() {
841
+ return this.peek(o.SPREAD) ? this.parseFragment() : this.parseField();
842
+ }
843
+ parseField() {
844
+ let t = this._lexer.token, n = this.parseName(), i, r;
845
+ return this.expectOptionalToken(o.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, { kind: c.FIELD, alias: i, name: r, arguments: this.parseArguments(false), directives: this.parseDirectives(false), selectionSet: this.peek(o.BRACE_L) ? this.parseSelectionSet() : void 0 });
846
+ }
847
+ parseArguments(t) {
848
+ let n = t ? this.parseConstArgument : this.parseArgument;
849
+ return this.optionalMany(o.PAREN_L, n, o.PAREN_R);
850
+ }
851
+ parseArgument(t = false) {
852
+ let n = this._lexer.token, i = this.parseName();
853
+ return this.expectToken(o.COLON), this.node(n, { kind: c.ARGUMENT, name: i, value: this.parseValueLiteral(t) });
854
+ }
855
+ parseConstArgument() {
856
+ return this.parseArgument(true);
857
+ }
858
+ parseFragment() {
859
+ let t = this._lexer.token;
860
+ this.expectToken(o.SPREAD);
861
+ let n = this.expectOptionalKeyword("on");
862
+ return !n && this.peek(o.NAME) ? this.node(t, { kind: c.FRAGMENT_SPREAD, name: this.parseFragmentName(), directives: this.parseDirectives(false) }) : this.node(t, { kind: c.INLINE_FRAGMENT, typeCondition: n ? this.parseNamedType() : void 0, directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet() });
863
+ }
864
+ parseFragmentDefinition() {
865
+ let t = this._lexer.token, n = this.parseDescription();
866
+ return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === true ? this.node(t, { kind: c.FRAGMENT_DEFINITION, description: n, name: this.parseFragmentName(), variableDefinitions: this.parseVariableDefinitions(), typeCondition: (this.expectKeyword("on"), this.parseNamedType()), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet() }) : this.node(t, { kind: c.FRAGMENT_DEFINITION, description: n, name: this.parseFragmentName(), typeCondition: (this.expectKeyword("on"), this.parseNamedType()), directives: this.parseDirectives(false), selectionSet: this.parseSelectionSet() });
867
+ }
868
+ parseFragmentName() {
869
+ if (this._lexer.token.value === "on") throw this.unexpected();
870
+ return this.parseName();
871
+ }
872
+ parseValueLiteral(t) {
873
+ let n = this._lexer.token;
874
+ switch (n.kind) {
875
+ case o.BRACKET_L:
876
+ return this.parseList(t);
877
+ case o.BRACE_L:
878
+ return this.parseObject(t);
879
+ case o.INT:
880
+ return this.advanceLexer(), this.node(n, { kind: c.INT, value: n.value });
881
+ case o.FLOAT:
882
+ return this.advanceLexer(), this.node(n, { kind: c.FLOAT, value: n.value });
883
+ case o.STRING:
884
+ case o.BLOCK_STRING:
885
+ return this.parseStringLiteral();
886
+ case o.NAME:
887
+ switch (this.advanceLexer(), n.value) {
888
+ case "true":
889
+ return this.node(n, { kind: c.BOOLEAN, value: true });
890
+ case "false":
891
+ return this.node(n, { kind: c.BOOLEAN, value: false });
892
+ case "null":
893
+ return this.node(n, { kind: c.NULL });
894
+ default:
895
+ return this.node(n, { kind: c.ENUM, value: n.value });
896
+ }
897
+ case o.DOLLAR:
898
+ if (t) if (this.expectToken(o.DOLLAR), this._lexer.token.kind === o.NAME) {
899
+ let i = this._lexer.token.value;
900
+ throw h(this._lexer.source, n.start, `Unexpected variable "$${i}" in constant value.`);
901
+ } else throw this.unexpected(n);
902
+ return this.parseVariable();
903
+ default:
904
+ throw this.unexpected();
905
+ }
906
+ }
907
+ parseConstValueLiteral() {
908
+ return this.parseValueLiteral(true);
909
+ }
910
+ parseStringLiteral() {
911
+ let t = this._lexer.token;
912
+ return this.advanceLexer(), this.node(t, { kind: c.STRING, value: t.value, block: t.kind === o.BLOCK_STRING });
913
+ }
914
+ parseList(t) {
915
+ let n = () => this.parseValueLiteral(t);
916
+ return this.node(this._lexer.token, { kind: c.LIST, values: this.any(o.BRACKET_L, n, o.BRACKET_R) });
917
+ }
918
+ parseObject(t) {
919
+ let n = () => this.parseObjectField(t);
920
+ return this.node(this._lexer.token, { kind: c.OBJECT, fields: this.any(o.BRACE_L, n, o.BRACE_R) });
921
+ }
922
+ parseObjectField(t) {
923
+ let n = this._lexer.token, i = this.parseName();
924
+ return this.expectToken(o.COLON), this.node(n, { kind: c.OBJECT_FIELD, name: i, value: this.parseValueLiteral(t) });
925
+ }
926
+ parseDirectives(t) {
927
+ let n = [];
928
+ for (; this.peek(o.AT); ) n.push(this.parseDirective(t));
929
+ return n;
930
+ }
931
+ parseConstDirectives() {
932
+ return this.parseDirectives(true);
933
+ }
934
+ parseDirective(t) {
935
+ let n = this._lexer.token;
936
+ return this.expectToken(o.AT), this.node(n, { kind: c.DIRECTIVE, name: this.parseName(), arguments: this.parseArguments(t) });
937
+ }
938
+ parseTypeReference() {
939
+ let t = this._lexer.token, n;
940
+ if (this.expectOptionalToken(o.BRACKET_L)) {
941
+ let i = this.parseTypeReference();
942
+ this.expectToken(o.BRACKET_R), n = this.node(t, { kind: c.LIST_TYPE, type: i });
943
+ } else n = this.parseNamedType();
944
+ return this.expectOptionalToken(o.BANG) ? this.node(t, { kind: c.NON_NULL_TYPE, type: n }) : n;
945
+ }
946
+ parseNamedType() {
947
+ return this.node(this._lexer.token, { kind: c.NAMED_TYPE, name: this.parseName() });
948
+ }
949
+ peekDescription() {
950
+ return this.peek(o.STRING) || this.peek(o.BLOCK_STRING);
951
+ }
952
+ parseDescription() {
953
+ if (this.peekDescription()) return this.parseStringLiteral();
954
+ }
955
+ parseSchemaDefinition() {
956
+ let t = this._lexer.token, n = this.parseDescription();
957
+ this.expectKeyword("schema");
958
+ let i = this.parseConstDirectives(), r = this.many(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
959
+ return this.node(t, { kind: c.SCHEMA_DEFINITION, description: n, directives: i, operationTypes: r });
960
+ }
961
+ parseOperationTypeDefinition() {
962
+ let t = this._lexer.token, n = this.parseOperationType();
963
+ this.expectToken(o.COLON);
964
+ let i = this.parseNamedType();
965
+ return this.node(t, { kind: c.OPERATION_TYPE_DEFINITION, operation: n, type: i });
966
+ }
967
+ parseScalarTypeDefinition() {
968
+ let t = this._lexer.token, n = this.parseDescription();
969
+ this.expectKeyword("scalar");
970
+ let i = this.parseName(), r = this.parseConstDirectives();
971
+ return this.node(t, { kind: c.SCALAR_TYPE_DEFINITION, description: n, name: i, directives: r });
972
+ }
973
+ parseObjectTypeDefinition() {
974
+ let t = this._lexer.token, n = this.parseDescription();
975
+ this.expectKeyword("type");
976
+ let i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
977
+ return this.node(t, { kind: c.OBJECT_TYPE_DEFINITION, description: n, name: i, interfaces: r, directives: s, fields: a });
978
+ }
979
+ parseImplementsInterfaces() {
980
+ return this.expectOptionalKeyword("implements") ? this.delimitedMany(o.AMP, this.parseNamedType) : [];
981
+ }
982
+ parseFieldsDefinition() {
983
+ return this.optionalMany(o.BRACE_L, this.parseFieldDefinition, o.BRACE_R);
984
+ }
985
+ parseFieldDefinition() {
986
+ let t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
987
+ this.expectToken(o.COLON);
988
+ let s = this.parseTypeReference(), a = this.parseConstDirectives();
989
+ return this.node(t, { kind: c.FIELD_DEFINITION, description: n, name: i, arguments: r, type: s, directives: a });
990
+ }
991
+ parseArgumentDefs() {
992
+ return this.optionalMany(o.PAREN_L, this.parseInputValueDef, o.PAREN_R);
993
+ }
994
+ parseInputValueDef() {
995
+ let t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
996
+ this.expectToken(o.COLON);
997
+ let r = this.parseTypeReference(), s;
998
+ this.expectOptionalToken(o.EQUALS) && (s = this.parseConstValueLiteral());
999
+ let a = this.parseConstDirectives();
1000
+ return this.node(t, { kind: c.INPUT_VALUE_DEFINITION, description: n, name: i, type: r, defaultValue: s, directives: a });
1001
+ }
1002
+ parseInterfaceTypeDefinition() {
1003
+ let t = this._lexer.token, n = this.parseDescription();
1004
+ this.expectKeyword("interface");
1005
+ let i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1006
+ return this.node(t, { kind: c.INTERFACE_TYPE_DEFINITION, description: n, name: i, interfaces: r, directives: s, fields: a });
1007
+ }
1008
+ parseUnionTypeDefinition() {
1009
+ let t = this._lexer.token, n = this.parseDescription();
1010
+ this.expectKeyword("union");
1011
+ let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1012
+ return this.node(t, { kind: c.UNION_TYPE_DEFINITION, description: n, name: i, directives: r, types: s });
1013
+ }
1014
+ parseUnionMemberTypes() {
1015
+ return this.expectOptionalToken(o.EQUALS) ? this.delimitedMany(o.PIPE, this.parseNamedType) : [];
1016
+ }
1017
+ parseEnumTypeDefinition() {
1018
+ let t = this._lexer.token, n = this.parseDescription();
1019
+ this.expectKeyword("enum");
1020
+ let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1021
+ return this.node(t, { kind: c.ENUM_TYPE_DEFINITION, description: n, name: i, directives: r, values: s });
1022
+ }
1023
+ parseEnumValuesDefinition() {
1024
+ return this.optionalMany(o.BRACE_L, this.parseEnumValueDefinition, o.BRACE_R);
1025
+ }
1026
+ parseEnumValueDefinition() {
1027
+ let t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1028
+ return this.node(t, { kind: c.ENUM_VALUE_DEFINITION, description: n, name: i, directives: r });
1029
+ }
1030
+ parseEnumValueName() {
1031
+ 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.`);
1032
+ return this.parseName();
1033
+ }
1034
+ parseInputObjectTypeDefinition() {
1035
+ let t = this._lexer.token, n = this.parseDescription();
1036
+ this.expectKeyword("input");
1037
+ let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1038
+ return this.node(t, { kind: c.INPUT_OBJECT_TYPE_DEFINITION, description: n, name: i, directives: r, fields: s });
1039
+ }
1040
+ parseInputFieldsDefinition() {
1041
+ return this.optionalMany(o.BRACE_L, this.parseInputValueDef, o.BRACE_R);
1042
+ }
1043
+ parseTypeSystemExtension() {
1044
+ let t = this._lexer.lookahead();
1045
+ if (t.kind === o.NAME) switch (t.value) {
1046
+ case "schema":
1047
+ return this.parseSchemaExtension();
1048
+ case "scalar":
1049
+ return this.parseScalarTypeExtension();
1050
+ case "type":
1051
+ return this.parseObjectTypeExtension();
1052
+ case "interface":
1053
+ return this.parseInterfaceTypeExtension();
1054
+ case "union":
1055
+ return this.parseUnionTypeExtension();
1056
+ case "enum":
1057
+ return this.parseEnumTypeExtension();
1058
+ case "input":
1059
+ return this.parseInputObjectTypeExtension();
1060
+ }
1061
+ throw this.unexpected(t);
1062
+ }
1063
+ parseSchemaExtension() {
1064
+ let t = this._lexer.token;
1065
+ this.expectKeyword("extend"), this.expectKeyword("schema");
1066
+ let n = this.parseConstDirectives(), i = this.optionalMany(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
1067
+ if (n.length === 0 && i.length === 0) throw this.unexpected();
1068
+ return this.node(t, { kind: c.SCHEMA_EXTENSION, directives: n, operationTypes: i });
1069
+ }
1070
+ parseScalarTypeExtension() {
1071
+ let t = this._lexer.token;
1072
+ this.expectKeyword("extend"), this.expectKeyword("scalar");
1073
+ let n = this.parseName(), i = this.parseConstDirectives();
1074
+ if (i.length === 0) throw this.unexpected();
1075
+ return this.node(t, { kind: c.SCALAR_TYPE_EXTENSION, name: n, directives: i });
1076
+ }
1077
+ parseObjectTypeExtension() {
1078
+ let t = this._lexer.token;
1079
+ this.expectKeyword("extend"), this.expectKeyword("type");
1080
+ let n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1081
+ if (i.length === 0 && r.length === 0 && s.length === 0) throw this.unexpected();
1082
+ return this.node(t, { kind: c.OBJECT_TYPE_EXTENSION, name: n, interfaces: i, directives: r, fields: s });
1083
+ }
1084
+ parseInterfaceTypeExtension() {
1085
+ let t = this._lexer.token;
1086
+ this.expectKeyword("extend"), this.expectKeyword("interface");
1087
+ let n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1088
+ if (i.length === 0 && r.length === 0 && s.length === 0) throw this.unexpected();
1089
+ return this.node(t, { kind: c.INTERFACE_TYPE_EXTENSION, name: n, interfaces: i, directives: r, fields: s });
1090
+ }
1091
+ parseUnionTypeExtension() {
1092
+ let t = this._lexer.token;
1093
+ this.expectKeyword("extend"), this.expectKeyword("union");
1094
+ let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1095
+ if (i.length === 0 && r.length === 0) throw this.unexpected();
1096
+ return this.node(t, { kind: c.UNION_TYPE_EXTENSION, name: n, directives: i, types: r });
1097
+ }
1098
+ parseEnumTypeExtension() {
1099
+ let t = this._lexer.token;
1100
+ this.expectKeyword("extend"), this.expectKeyword("enum");
1101
+ let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1102
+ if (i.length === 0 && r.length === 0) throw this.unexpected();
1103
+ return this.node(t, { kind: c.ENUM_TYPE_EXTENSION, name: n, directives: i, values: r });
1104
+ }
1105
+ parseInputObjectTypeExtension() {
1106
+ let t = this._lexer.token;
1107
+ this.expectKeyword("extend"), this.expectKeyword("input");
1108
+ let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1109
+ if (i.length === 0 && r.length === 0) throw this.unexpected();
1110
+ return this.node(t, { kind: c.INPUT_OBJECT_TYPE_EXTENSION, name: n, directives: i, fields: r });
1111
+ }
1112
+ parseDirectiveDefinition() {
1113
+ let t = this._lexer.token, n = this.parseDescription();
1114
+ this.expectKeyword("directive"), this.expectToken(o.AT);
1115
+ let i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1116
+ this.expectKeyword("on");
1117
+ let a = this.parseDirectiveLocations();
1118
+ return this.node(t, { kind: c.DIRECTIVE_DEFINITION, description: n, name: i, arguments: r, repeatable: s, locations: a });
1119
+ }
1120
+ parseDirectiveLocations() {
1121
+ return this.delimitedMany(o.PIPE, this.parseDirectiveLocation);
1122
+ }
1123
+ parseDirectiveLocation() {
1124
+ let t = this._lexer.token, n = this.parseName();
1125
+ if (Object.prototype.hasOwnProperty.call(W, n.value)) return n;
1126
+ throw this.unexpected(t);
1127
+ }
1128
+ parseSchemaCoordinate() {
1129
+ let t = this._lexer.token, n = this.expectOptionalToken(o.AT), i = this.parseName(), r;
1130
+ !n && this.expectOptionalToken(o.DOT) && (r = this.parseName());
1131
+ let s;
1132
+ 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, { kind: c.DIRECTIVE_ARGUMENT_COORDINATE, name: i, argumentName: s }) : this.node(t, { kind: c.DIRECTIVE_COORDINATE, name: i }) : r ? s ? this.node(t, { kind: c.ARGUMENT_COORDINATE, name: i, fieldName: r, argumentName: s }) : this.node(t, { kind: c.MEMBER_COORDINATE, name: i, memberName: r }) : this.node(t, { kind: c.TYPE_COORDINATE, name: i });
1133
+ }
1134
+ node(t, n) {
1135
+ return this._options.noLocation !== true && (n.loc = new H(t, this._lexer.lastToken, this._lexer.source)), n;
1136
+ }
1137
+ peek(t) {
1138
+ return this._lexer.token.kind === t;
1139
+ }
1140
+ expectToken(t) {
1141
+ let n = this._lexer.token;
1142
+ if (n.kind === t) return this.advanceLexer(), n;
1143
+ throw h(this._lexer.source, n.start, `Expected ${at(t)}, found ${ne(n)}.`);
1144
+ }
1145
+ expectOptionalToken(t) {
1146
+ return this._lexer.token.kind === t ? (this.advanceLexer(), true) : false;
1147
+ }
1148
+ expectKeyword(t) {
1149
+ let n = this._lexer.token;
1150
+ if (n.kind === o.NAME && n.value === t) this.advanceLexer();
1151
+ else throw h(this._lexer.source, n.start, `Expected "${t}", found ${ne(n)}.`);
1152
+ }
1153
+ expectOptionalKeyword(t) {
1154
+ let n = this._lexer.token;
1155
+ return n.kind === o.NAME && n.value === t ? (this.advanceLexer(), true) : false;
1156
+ }
1157
+ unexpected(t) {
1158
+ let n = t ?? this._lexer.token;
1159
+ return h(this._lexer.source, n.start, `Unexpected ${ne(n)}.`);
1160
+ }
1161
+ any(t, n, i) {
1162
+ this.expectToken(t);
1163
+ let r = [];
1164
+ for (; !this.expectOptionalToken(i); ) r.push(n.call(this));
1165
+ return r;
1166
+ }
1167
+ optionalMany(t, n, i) {
1168
+ if (this.expectOptionalToken(t)) {
1169
+ let r = [];
1170
+ do
1171
+ r.push(n.call(this));
1172
+ while (!this.expectOptionalToken(i));
1173
+ return r;
1174
+ }
1175
+ return [];
1176
+ }
1177
+ many(t, n, i) {
1178
+ this.expectToken(t);
1179
+ let r = [];
1180
+ do
1181
+ r.push(n.call(this));
1182
+ while (!this.expectOptionalToken(i));
1183
+ return r;
1184
+ }
1185
+ delimitedMany(t, n) {
1186
+ this.expectOptionalToken(t);
1187
+ let i = [];
1188
+ do
1189
+ i.push(n.call(this));
1190
+ while (this.expectOptionalToken(t));
1191
+ return i;
1192
+ }
1193
+ advanceLexer() {
1194
+ let { maxTokens: t } = this._options, n = this._lexer.advance();
1195
+ 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.`);
1196
+ }
1197
+ };
1198
+ function ne(e2) {
1199
+ let t = e2.value;
1200
+ return at(e2.kind) + (t != null ? ` "${t}"` : "");
1201
+ }
1202
+ function at(e2) {
1203
+ return tt(e2) ? `"${e2}"` : e2;
1204
+ }
1205
+ function Wt(e2, t) {
1206
+ let n = new SyntaxError(e2 + " (" + t.loc.start.line + ":" + t.loc.start.column + ")");
1207
+ return Object.assign(n, t);
1208
+ }
1209
+ var ct = Wt;
1210
+ function zt(e2) {
1211
+ let t = [], { startToken: n, endToken: i } = e2.loc;
1212
+ for (let r = n; r !== i; r = r.next) r.kind === "Comment" && t.push({ ...r, loc: { start: r.start, end: r.end } });
1213
+ return t;
1214
+ }
1215
+ var Kt = { allowLegacyFragmentVariables: true };
1216
+ function Zt(e2) {
1217
+ if (e2?.name === "GraphQLError") {
1218
+ let { message: t, locations: [n] } = e2;
1219
+ return ct(t, { loc: { start: n }, cause: e2 });
1220
+ }
1221
+ return e2;
1222
+ }
1223
+ function en(e2) {
1224
+ let t;
1225
+ try {
1226
+ t = ot(e2, Kt);
1227
+ } catch (n) {
1228
+ throw Zt(n);
1229
+ }
1230
+ return t.comments = zt(t), t;
1231
+ }
1232
+ var tn = { parse: en, astFormat: "graphql", hasPragma: Fe, hasIgnorePragma: Me, locStart: J, locEnd: q };
1233
+ var nn = { graphql: Ge };
1234
+ export {
1235
+ ut as default,
1236
+ Ye as languages,
1237
+ $e as options,
1238
+ he as parsers,
1239
+ nn as printers
1240
+ };
1241
+ //# sourceMappingURL=graphql-Cx6A4xbM.js.map