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