@builtbystack/sq-shopify-theme-sdk 0.0.6 → 0.0.8

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.
@@ -1,16 +1,16 @@
1
1
  var He = Object.defineProperty;
2
2
  var Ye = (e, t, n) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Ae = (e, t, n) => (Ye(e, typeof t != "symbol" ? t + "" : t, n), n);
3
+ var Ce = (e, t, n) => (Ye(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  function ze(e, t) {
5
5
  for (var n = 0; n < t.length; n++) {
6
- const r = t[n];
7
- if (typeof r != "string" && !Array.isArray(r)) {
8
- for (const i in r)
9
- if (i !== "default" && !(i in e)) {
10
- const s = Object.getOwnPropertyDescriptor(r, i);
11
- s && Object.defineProperty(e, i, s.get ? s : {
6
+ const i = t[n];
7
+ if (typeof i != "string" && !Array.isArray(i)) {
8
+ for (const r in i)
9
+ if (r !== "default" && !(r in e)) {
10
+ const s = Object.getOwnPropertyDescriptor(i, r);
11
+ s && Object.defineProperty(e, r, s.get ? s : {
12
12
  enumerable: !0,
13
- get: () => r[i]
13
+ get: () => i[r]
14
14
  });
15
15
  }
16
16
  }
@@ -19,8 +19,8 @@ function ze(e, t) {
19
19
  }
20
20
  const ge = JSON, Qe = (e) => e.toUpperCase(), Je = (e) => {
21
21
  const t = {};
22
- return e.forEach((n, r) => {
23
- t[r] = n;
22
+ return e.forEach((n, i) => {
23
+ t[i] = n;
24
24
  }), t;
25
25
  }, Xe = (e, t, n) => e.document ? e : {
26
26
  document: e,
@@ -51,52 +51,52 @@ function et(e, t) {
51
51
  );
52
52
  }
53
53
  const tt = /\r\n|[\n\r]/g;
54
- function de(e, t) {
55
- let n = 0, r = 1;
56
- for (const i of e.body.matchAll(tt)) {
57
- if (typeof i.index == "number" || et(!1), i.index >= t)
54
+ function pe(e, t) {
55
+ let n = 0, i = 1;
56
+ for (const r of e.body.matchAll(tt)) {
57
+ if (typeof r.index == "number" || et(!1), r.index >= t)
58
58
  break;
59
- n = i.index + i[0].length, r += 1;
59
+ n = r.index + r[0].length, i += 1;
60
60
  }
61
61
  return {
62
- line: r,
62
+ line: i,
63
63
  column: t + 1 - n
64
64
  };
65
65
  }
66
66
  function nt(e) {
67
67
  return _e(
68
68
  e.source,
69
- de(e.source, e.start)
69
+ pe(e.source, e.start)
70
70
  );
71
71
  }
72
72
  function _e(e, t) {
73
- const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, u = t.line === 1 ? n : 0, p = t.column + u, d = `${e.name}:${a}:${p}
74
- `, m = r.split(/\r\n|[\n\r]/g), E = m[i];
73
+ const n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, u = t.line === 1 ? n : 0, h = t.column + u, p = `${e.name}:${o}:${h}
74
+ `, m = i.split(/\r\n|[\n\r]/g), E = m[r];
75
75
  if (E.length > 120) {
76
- const g = Math.floor(p / 80), N = p % 80, y = [];
77
- for (let C = 0; C < E.length; C += 80)
78
- y.push(E.slice(C, C + 80));
79
- return d + Ne([
80
- [`${a} |`, y[0]],
81
- ...y.slice(1, g + 1).map((C) => ["|", C]),
82
- ["|", "^".padStart(N)],
76
+ const g = Math.floor(h / 80), A = h % 80, y = [];
77
+ for (let N = 0; N < E.length; N += 80)
78
+ y.push(E.slice(N, N + 80));
79
+ return p + Ae([
80
+ [`${o} |`, y[0]],
81
+ ...y.slice(1, g + 1).map((N) => ["|", N]),
82
+ ["|", "^".padStart(A)],
83
83
  ["|", y[g + 1]]
84
84
  ]);
85
85
  }
86
- return d + Ne([
86
+ return p + Ae([
87
87
  // Lines specified like this: ["prefix", "string"],
88
- [`${a - 1} |`, m[i - 1]],
89
- [`${a} |`, E],
90
- ["|", "^".padStart(p)],
91
- [`${a + 1} |`, m[i + 1]]
88
+ [`${o - 1} |`, m[r - 1]],
89
+ [`${o} |`, E],
90
+ ["|", "^".padStart(h)],
91
+ [`${o + 1} |`, m[r + 1]]
92
92
  ]);
93
93
  }
94
- function Ne(e) {
95
- const t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length));
96
- return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(`
94
+ function Ae(e) {
95
+ const t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
96
+ return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
97
97
  `);
98
98
  }
99
- function it(e) {
99
+ function rt(e) {
100
100
  const t = e[0];
101
101
  return t == null || "kind" in t || "length" in t ? {
102
102
  nodes: t,
@@ -107,7 +107,7 @@ function it(e) {
107
107
  extensions: e[5]
108
108
  } : t;
109
109
  }
110
- class Te extends Error {
110
+ class ve extends Error {
111
111
  /**
112
112
  * An array of `{ line, column }` locations within the source GraphQL document
113
113
  * which correspond to this error.
@@ -147,19 +147,19 @@ class Te extends Error {
147
147
  * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
148
148
  */
149
149
  constructor(t, ...n) {
150
- var r, i, s;
151
- const { nodes: a, source: u, positions: p, path: d, originalError: m, extensions: E } = it(n);
152
- super(t), this.name = "GraphQLError", this.path = d ?? void 0, this.originalError = m ?? void 0, this.nodes = Ce(
153
- Array.isArray(a) ? a : a ? [a] : void 0
150
+ var i, r, s;
151
+ const { nodes: o, source: u, positions: h, path: p, originalError: m, extensions: E } = rt(n);
152
+ super(t), this.name = "GraphQLError", this.path = p ?? void 0, this.originalError = m ?? void 0, this.nodes = Ne(
153
+ Array.isArray(o) ? o : o ? [o] : void 0
154
154
  );
155
- const g = Ce(
156
- (r = this.nodes) === null || r === void 0 ? void 0 : r.map((y) => y.loc).filter((y) => y != null)
155
+ const g = Ne(
156
+ (i = this.nodes) === null || i === void 0 ? void 0 : i.map((y) => y.loc).filter((y) => y != null)
157
157
  );
158
- this.source = u ?? (g == null || (i = g[0]) === null || i === void 0 ? void 0 : i.source), this.positions = p ?? (g == null ? void 0 : g.map((y) => y.start)), this.locations = p && u ? p.map((y) => de(u, y)) : g == null ? void 0 : g.map((y) => de(y.source, y.start));
159
- const N = Ke(
158
+ this.source = u ?? (g == null || (r = g[0]) === null || r === void 0 ? void 0 : r.source), this.positions = h ?? (g == null ? void 0 : g.map((y) => y.start)), this.locations = h && u ? h.map((y) => pe(u, y)) : g == null ? void 0 : g.map((y) => pe(y.source, y.start));
159
+ const A = Ke(
160
160
  m == null ? void 0 : m.extensions
161
161
  ) ? m == null ? void 0 : m.extensions : void 0;
162
- this.extensions = (s = E ?? N) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
162
+ this.extensions = (s = E ?? A) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
163
163
  message: {
164
164
  writable: !0,
165
165
  enumerable: !0
@@ -183,7 +183,7 @@ class Te extends Error {
183
183
  value: m.stack,
184
184
  writable: !0,
185
185
  configurable: !0
186
- }) : Error.captureStackTrace ? Error.captureStackTrace(this, Te) : Object.defineProperty(this, "stack", {
186
+ }) : Error.captureStackTrace ? Error.captureStackTrace(this, ve) : Object.defineProperty(this, "stack", {
187
187
  value: Error().stack,
188
188
  writable: !0,
189
189
  configurable: !0
@@ -213,16 +213,16 @@ class Te extends Error {
213
213
  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;
214
214
  }
215
215
  }
216
- function Ce(e) {
216
+ function Ne(e) {
217
217
  return e === void 0 || e.length === 0 ? void 0 : e;
218
218
  }
219
219
  function b(e, t, n) {
220
- return new Te(`Syntax Error: ${n}`, {
220
+ return new ve(`Syntax Error: ${n}`, {
221
221
  source: e,
222
222
  positions: [t]
223
223
  });
224
224
  }
225
- class rt {
225
+ class it {
226
226
  /**
227
227
  * The character offset at which this Node begins.
228
228
  */
@@ -238,8 +238,8 @@ class rt {
238
238
  /**
239
239
  * The Source document the AST represents.
240
240
  */
241
- constructor(t, n, r) {
242
- this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = r;
241
+ constructor(t, n, i) {
242
+ this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
243
243
  }
244
244
  get [Symbol.toStringTag]() {
245
245
  return "Location";
@@ -278,8 +278,8 @@ class ke {
278
278
  * including ignored tokens. <SOF> is always the first node and <EOF>
279
279
  * the last.
280
280
  */
281
- constructor(t, n, r, i, s, a) {
282
- this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = a, this.prev = null, this.next = null;
281
+ constructor(t, n, i, r, s, o) {
282
+ this.kind = t, this.start = n, this.end = i, this.line = r, this.column = s, this.value = o, this.prev = null, this.next = null;
283
283
  }
284
284
  get [Symbol.toStringTag]() {
285
285
  return "Token";
@@ -372,10 +372,10 @@ function xe(e) {
372
372
  const t = e == null ? void 0 : e.kind;
373
373
  return typeof t == "string" && st.has(t);
374
374
  }
375
- var M;
375
+ var U;
376
376
  (function(e) {
377
377
  e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
378
- })(M || (M = {}));
378
+ })(U || (U = {}));
379
379
  var fe;
380
380
  (function(e) {
381
381
  e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
@@ -402,15 +402,15 @@ function ot(e) {
402
402
  }
403
403
  function at(e) {
404
404
  var t;
405
- let n = Number.MAX_SAFE_INTEGER, r = null, i = -1;
406
- for (let a = 0; a < e.length; ++a) {
405
+ let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
406
+ for (let o = 0; o < e.length; ++o) {
407
407
  var s;
408
- const u = e[a], p = ct(u);
409
- p !== u.length && (r = (s = r) !== null && s !== void 0 ? s : a, i = a, a !== 0 && p < n && (n = p));
408
+ const u = e[o], h = ct(u);
409
+ h !== u.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && h < n && (n = h));
410
410
  }
411
- return e.map((a, u) => u === 0 ? a : a.slice(n)).slice(
412
- (t = r) !== null && t !== void 0 ? t : 0,
413
- i + 1
411
+ return e.map((o, u) => u === 0 ? o : o.slice(n)).slice(
412
+ (t = i) !== null && t !== void 0 ? t : 0,
413
+ r + 1
414
414
  );
415
415
  }
416
416
  function ct(e) {
@@ -420,12 +420,12 @@ function ct(e) {
420
420
  return t;
421
421
  }
422
422
  function ut(e, t) {
423
- const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((N) => N.length === 0 || me(N.charCodeAt(0))), a = n.endsWith('\\"""'), u = e.endsWith('"') && !a, p = e.endsWith("\\"), d = u || p, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
424
- (!i || e.length > 70 || d || s || a);
423
+ const n = e.replace(/"""/g, '\\"""'), i = n.split(/\r\n|[\n\r]/g), r = i.length === 1, s = i.length > 1 && i.slice(1).every((A) => A.length === 0 || me(A.charCodeAt(0))), o = n.endsWith('\\"""'), u = e.endsWith('"') && !o, h = e.endsWith("\\"), p = u || h, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
424
+ (!r || e.length > 70 || p || s || o);
425
425
  let E = "";
426
- const g = i && me(e.charCodeAt(0));
426
+ const g = r && me(e.charCodeAt(0));
427
427
  return (m && !g || s) && (E += `
428
- `), E += n, (m || d) && (E += `
428
+ `), E += n, (m || p) && (E += `
429
429
  `), '"""' + E + '"""';
430
430
  }
431
431
  var c;
@@ -469,14 +469,14 @@ class lt {
469
469
  if (t.next)
470
470
  t = t.next;
471
471
  else {
472
- const n = pt(this, t.end);
472
+ const n = ht(this, t.end);
473
473
  t.next = n, n.prev = t, t = n;
474
474
  }
475
475
  while (t.kind === c.COMMENT);
476
476
  return t;
477
477
  }
478
478
  }
479
- function ht(e) {
479
+ function dt(e) {
480
480
  return e === c.BANG || e === c.DOLLAR || e === c.AMP || e === c.PAREN_L || e === c.PAREN_R || e === c.SPREAD || e === c.COLON || e === c.EQUALS || e === c.AT || e === c.BRACKET_L || e === c.BRACKET_R || e === c.BRACE_L || e === c.PIPE || e === c.BRACE_R;
481
481
  }
482
482
  function V(e) {
@@ -496,91 +496,91 @@ function F(e, t) {
496
496
  if (n === void 0)
497
497
  return c.EOF;
498
498
  if (n >= 32 && n <= 126) {
499
- const r = String.fromCodePoint(n);
500
- return r === '"' ? `'"'` : `"${r}"`;
499
+ const i = String.fromCodePoint(n);
500
+ return i === '"' ? `'"'` : `"${i}"`;
501
501
  }
502
502
  return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
503
503
  }
504
- function x(e, t, n, r, i) {
505
- const s = e.line, a = 1 + n - e.lineStart;
506
- return new ke(t, n, r, s, a, i);
504
+ function x(e, t, n, i, r) {
505
+ const s = e.line, o = 1 + n - e.lineStart;
506
+ return new ke(t, n, i, s, o, r);
507
507
  }
508
- function pt(e, t) {
509
- const n = e.source.body, r = n.length;
510
- let i = t;
511
- for (; i < r; ) {
512
- const s = n.charCodeAt(i);
508
+ function ht(e, t) {
509
+ const n = e.source.body, i = n.length;
510
+ let r = t;
511
+ for (; r < i; ) {
512
+ const s = n.charCodeAt(r);
513
513
  switch (s) {
514
514
  case 65279:
515
515
  case 9:
516
516
  case 32:
517
517
  case 44:
518
- ++i;
518
+ ++r;
519
519
  continue;
520
520
  case 10:
521
- ++i, ++e.line, e.lineStart = i;
521
+ ++r, ++e.line, e.lineStart = r;
522
522
  continue;
523
523
  case 13:
524
- n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i;
524
+ n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
525
525
  continue;
526
526
  case 35:
527
- return dt(e, i);
527
+ return pt(e, r);
528
528
  case 33:
529
- return x(e, c.BANG, i, i + 1);
529
+ return x(e, c.BANG, r, r + 1);
530
530
  case 36:
531
- return x(e, c.DOLLAR, i, i + 1);
531
+ return x(e, c.DOLLAR, r, r + 1);
532
532
  case 38:
533
- return x(e, c.AMP, i, i + 1);
533
+ return x(e, c.AMP, r, r + 1);
534
534
  case 40:
535
- return x(e, c.PAREN_L, i, i + 1);
535
+ return x(e, c.PAREN_L, r, r + 1);
536
536
  case 41:
537
- return x(e, c.PAREN_R, i, i + 1);
537
+ return x(e, c.PAREN_R, r, r + 1);
538
538
  case 46:
539
- if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46)
540
- return x(e, c.SPREAD, i, i + 3);
539
+ if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46)
540
+ return x(e, c.SPREAD, r, r + 3);
541
541
  break;
542
542
  case 58:
543
- return x(e, c.COLON, i, i + 1);
543
+ return x(e, c.COLON, r, r + 1);
544
544
  case 61:
545
- return x(e, c.EQUALS, i, i + 1);
545
+ return x(e, c.EQUALS, r, r + 1);
546
546
  case 64:
547
- return x(e, c.AT, i, i + 1);
547
+ return x(e, c.AT, r, r + 1);
548
548
  case 91:
549
- return x(e, c.BRACKET_L, i, i + 1);
549
+ return x(e, c.BRACKET_L, r, r + 1);
550
550
  case 93:
551
- return x(e, c.BRACKET_R, i, i + 1);
551
+ return x(e, c.BRACKET_R, r, r + 1);
552
552
  case 123:
553
- return x(e, c.BRACE_L, i, i + 1);
553
+ return x(e, c.BRACE_L, r, r + 1);
554
554
  case 124:
555
- return x(e, c.PIPE, i, i + 1);
555
+ return x(e, c.PIPE, r, r + 1);
556
556
  case 125:
557
- return x(e, c.BRACE_R, i, i + 1);
557
+ return x(e, c.BRACE_R, r, r + 1);
558
558
  case 34:
559
- return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? Tt(e, i) : mt(e, i);
559
+ return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? vt(e, r) : mt(e, r);
560
560
  }
561
561
  if (Y(s) || s === 45)
562
- return ft(e, i, s);
562
+ return ft(e, r, s);
563
563
  if (we(s))
564
- return vt(e, i);
564
+ return Tt(e, r);
565
565
  throw b(
566
566
  e.source,
567
- i,
568
- s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : V(s) || se(n, i) ? `Unexpected character: ${F(e, i)}.` : `Invalid character: ${F(e, i)}.`
567
+ r,
568
+ s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : V(s) || se(n, r) ? `Unexpected character: ${F(e, r)}.` : `Invalid character: ${F(e, r)}.`
569
569
  );
570
570
  }
571
- return x(e, c.EOF, r, r);
571
+ return x(e, c.EOF, i, i);
572
572
  }
573
- function dt(e, t) {
574
- const n = e.source.body, r = n.length;
575
- let i = t + 1;
576
- for (; i < r; ) {
577
- const s = n.charCodeAt(i);
573
+ function pt(e, t) {
574
+ const n = e.source.body, i = n.length;
575
+ let r = t + 1;
576
+ for (; r < i; ) {
577
+ const s = n.charCodeAt(r);
578
578
  if (s === 10 || s === 13)
579
579
  break;
580
580
  if (V(s))
581
- ++i;
582
- else if (se(n, i))
583
- i += 2;
581
+ ++r;
582
+ else if (se(n, r))
583
+ r += 2;
584
584
  else
585
585
  break;
586
586
  }
@@ -588,40 +588,40 @@ function dt(e, t) {
588
588
  e,
589
589
  c.COMMENT,
590
590
  t,
591
- i,
592
- n.slice(t + 1, i)
591
+ r,
592
+ n.slice(t + 1, r)
593
593
  );
594
594
  }
595
595
  function ft(e, t, n) {
596
- const r = e.source.body;
597
- let i = t, s = n, a = !1;
598
- if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
599
- if (s = r.charCodeAt(++i), Y(s))
596
+ const i = e.source.body;
597
+ let r = t, s = n, o = !1;
598
+ if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
599
+ if (s = i.charCodeAt(++r), Y(s))
600
600
  throw b(
601
601
  e.source,
602
- i,
602
+ r,
603
603
  `Invalid number, unexpected digit after 0: ${F(
604
604
  e,
605
- i
605
+ r
606
606
  )}.`
607
607
  );
608
608
  } else
609
- i = ue(e, i, s), s = r.charCodeAt(i);
610
- if (s === 46 && (a = !0, s = r.charCodeAt(++i), i = ue(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (a = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ue(e, i, s), s = r.charCodeAt(i)), s === 46 || we(s))
609
+ r = ue(e, r, s), s = i.charCodeAt(r);
610
+ if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = ue(e, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (o = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = ue(e, r, s), s = i.charCodeAt(r)), s === 46 || we(s))
611
611
  throw b(
612
612
  e.source,
613
- i,
613
+ r,
614
614
  `Invalid number, expected digit but got: ${F(
615
615
  e,
616
- i
616
+ r
617
617
  )}.`
618
618
  );
619
619
  return x(
620
620
  e,
621
- a ? c.FLOAT : c.INT,
621
+ o ? c.FLOAT : c.INT,
622
622
  t,
623
- i,
624
- r.slice(t, i)
623
+ r,
624
+ i.slice(t, r)
625
625
  );
626
626
  }
627
627
  function ue(e, t, n) {
@@ -634,57 +634,57 @@ function ue(e, t, n) {
634
634
  t
635
635
  )}.`
636
636
  );
637
- const r = e.source.body;
638
- let i = t + 1;
639
- for (; Y(r.charCodeAt(i)); )
640
- ++i;
641
- return i;
637
+ const i = e.source.body;
638
+ let r = t + 1;
639
+ for (; Y(i.charCodeAt(r)); )
640
+ ++r;
641
+ return r;
642
642
  }
643
643
  function mt(e, t) {
644
- const n = e.source.body, r = n.length;
645
- let i = t + 1, s = i, a = "";
646
- for (; i < r; ) {
647
- const u = n.charCodeAt(i);
644
+ const n = e.source.body, i = n.length;
645
+ let r = t + 1, s = r, o = "";
646
+ for (; r < i; ) {
647
+ const u = n.charCodeAt(r);
648
648
  if (u === 34)
649
- return a += n.slice(s, i), x(e, c.STRING, t, i + 1, a);
649
+ return o += n.slice(s, r), x(e, c.STRING, t, r + 1, o);
650
650
  if (u === 92) {
651
- a += n.slice(s, i);
652
- const p = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? yt(e, i) : Et(e, i) : gt(e, i);
653
- a += p.value, i += p.size, s = i;
651
+ o += n.slice(s, r);
652
+ const h = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? yt(e, r) : Et(e, r) : gt(e, r);
653
+ o += h.value, r += h.size, s = r;
654
654
  continue;
655
655
  }
656
656
  if (u === 10 || u === 13)
657
657
  break;
658
658
  if (V(u))
659
- ++i;
660
- else if (se(n, i))
661
- i += 2;
659
+ ++r;
660
+ else if (se(n, r))
661
+ r += 2;
662
662
  else
663
663
  throw b(
664
664
  e.source,
665
- i,
665
+ r,
666
666
  `Invalid character within String: ${F(
667
667
  e,
668
- i
668
+ r
669
669
  )}.`
670
670
  );
671
671
  }
672
- throw b(e.source, i, "Unterminated string.");
672
+ throw b(e.source, r, "Unterminated string.");
673
673
  }
674
674
  function yt(e, t) {
675
675
  const n = e.source.body;
676
- let r = 0, i = 3;
677
- for (; i < 12; ) {
678
- const s = n.charCodeAt(t + i++);
676
+ let i = 0, r = 3;
677
+ for (; r < 12; ) {
678
+ const s = n.charCodeAt(t + r++);
679
679
  if (s === 125) {
680
- if (i < 5 || !V(r))
680
+ if (r < 5 || !V(i))
681
681
  break;
682
682
  return {
683
- value: String.fromCodePoint(r),
684
- size: i
683
+ value: String.fromCodePoint(i),
684
+ size: r
685
685
  };
686
686
  }
687
- if (r = r << 4 | G(s), r < 0)
687
+ if (i = i << 4 | G(s), i < 0)
688
688
  break;
689
689
  }
690
690
  throw b(
@@ -692,22 +692,22 @@ function yt(e, t) {
692
692
  t,
693
693
  `Invalid Unicode escape sequence: "${n.slice(
694
694
  t,
695
- t + i
695
+ t + r
696
696
  )}".`
697
697
  );
698
698
  }
699
699
  function Et(e, t) {
700
- const n = e.source.body, r = be(n, t + 2);
701
- if (V(r))
700
+ const n = e.source.body, i = be(n, t + 2);
701
+ if (V(i))
702
702
  return {
703
- value: String.fromCodePoint(r),
703
+ value: String.fromCodePoint(i),
704
704
  size: 6
705
705
  };
706
- if (Pe(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
707
- const i = be(n, t + 8);
708
- if (Le(i))
706
+ if (Pe(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
707
+ const r = be(n, t + 8);
708
+ if (Le(r))
709
709
  return {
710
- value: String.fromCodePoint(r, i),
710
+ value: String.fromCodePoint(i, r),
711
711
  size: 12
712
712
  };
713
713
  }
@@ -777,34 +777,34 @@ function gt(e, t) {
777
777
  )}".`
778
778
  );
779
779
  }
780
- function Tt(e, t) {
781
- const n = e.source.body, r = n.length;
782
- let i = e.lineStart, s = t + 3, a = s, u = "";
783
- const p = [];
784
- for (; s < r; ) {
785
- const d = n.charCodeAt(s);
786
- if (d === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
787
- u += n.slice(a, s), p.push(u);
780
+ function vt(e, t) {
781
+ const n = e.source.body, i = n.length;
782
+ let r = e.lineStart, s = t + 3, o = s, u = "";
783
+ const h = [];
784
+ for (; s < i; ) {
785
+ const p = n.charCodeAt(s);
786
+ if (p === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
787
+ u += n.slice(o, s), h.push(u);
788
788
  const m = x(
789
789
  e,
790
790
  c.BLOCK_STRING,
791
791
  t,
792
792
  s + 3,
793
793
  // Return a string of the lines joined with U+000A.
794
- at(p).join(`
794
+ at(h).join(`
795
795
  `)
796
796
  );
797
- return e.line += p.length - 1, e.lineStart = i, m;
797
+ return e.line += h.length - 1, e.lineStart = r, m;
798
798
  }
799
- if (d === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
800
- u += n.slice(a, s), a = s + 1, s += 4;
799
+ if (p === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
800
+ u += n.slice(o, s), o = s + 1, s += 4;
801
801
  continue;
802
802
  }
803
- if (d === 10 || d === 13) {
804
- u += n.slice(a, s), p.push(u), d === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", a = s, i = s;
803
+ if (p === 10 || p === 13) {
804
+ u += n.slice(o, s), h.push(u), p === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", o = s, r = s;
805
805
  continue;
806
806
  }
807
- if (V(d))
807
+ if (V(p))
808
808
  ++s;
809
809
  else if (se(n, s))
810
810
  s += 2;
@@ -820,13 +820,13 @@ function Tt(e, t) {
820
820
  }
821
821
  throw b(e.source, s, "Unterminated string.");
822
822
  }
823
- function vt(e, t) {
824
- const n = e.source.body, r = n.length;
825
- let i = t + 1;
826
- for (; i < r; ) {
827
- const s = n.charCodeAt(i);
823
+ function Tt(e, t) {
824
+ const n = e.source.body, i = n.length;
825
+ let r = t + 1;
826
+ for (; r < i; ) {
827
+ const s = n.charCodeAt(r);
828
828
  if (ot(s))
829
- ++i;
829
+ ++r;
830
830
  else
831
831
  break;
832
832
  }
@@ -834,12 +834,12 @@ function vt(e, t) {
834
834
  e,
835
835
  c.NAME,
836
836
  t,
837
- i,
838
- n.slice(t, i)
837
+ r,
838
+ n.slice(t, r)
839
839
  );
840
840
  }
841
- const At = 10, Fe = 2;
842
- function ve(e) {
841
+ const Ct = 10, Fe = 2;
842
+ function Te(e) {
843
843
  return oe(e, []);
844
844
  }
845
845
  function oe(e, t) {
@@ -849,32 +849,32 @@ function oe(e, t) {
849
849
  case "function":
850
850
  return e.name ? `[function ${e.name}]` : "[function]";
851
851
  case "object":
852
- return Nt(e, t);
852
+ return At(e, t);
853
853
  default:
854
854
  return String(e);
855
855
  }
856
856
  }
857
- function Nt(e, t) {
857
+ function At(e, t) {
858
858
  if (e === null)
859
859
  return "null";
860
860
  if (t.includes(e))
861
861
  return "[Circular]";
862
862
  const n = [...t, e];
863
- if (Ct(e)) {
864
- const r = e.toJSON();
865
- if (r !== e)
866
- return typeof r == "string" ? r : oe(r, n);
863
+ if (Nt(e)) {
864
+ const i = e.toJSON();
865
+ if (i !== e)
866
+ return typeof i == "string" ? i : oe(i, n);
867
867
  } else if (Array.isArray(e))
868
868
  return bt(e, n);
869
869
  return xt(e, n);
870
870
  }
871
- function Ct(e) {
871
+ function Nt(e) {
872
872
  return typeof e.toJSON == "function";
873
873
  }
874
874
  function xt(e, t) {
875
875
  const n = Object.entries(e);
876
876
  return n.length === 0 ? "{}" : t.length > Fe ? "[" + It(e) + "]" : "{ " + n.map(
877
- ([i, s]) => i + ": " + oe(s, t)
877
+ ([r, s]) => r + ": " + oe(s, t)
878
878
  ).join(", ") + " }";
879
879
  }
880
880
  function bt(e, t) {
@@ -882,10 +882,10 @@ function bt(e, t) {
882
882
  return "[]";
883
883
  if (t.length > Fe)
884
884
  return "[Array]";
885
- const n = Math.min(At, e.length), r = e.length - n, i = [];
885
+ const n = Math.min(Ct, e.length), i = e.length - n, r = [];
886
886
  for (let s = 0; s < n; ++s)
887
- i.push(oe(e[s], t));
888
- return r === 1 ? i.push("... 1 more item") : r > 1 && i.push(`... ${r} more items`), "[" + i.join(", ") + "]";
887
+ r.push(oe(e[s], t));
888
+ return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
889
889
  }
890
890
  function It(e) {
891
891
  const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
@@ -905,14 +905,14 @@ const Ot = (
905
905
  if (t instanceof n)
906
906
  return !0;
907
907
  if (typeof t == "object" && t !== null) {
908
- var r;
909
- const i = n.prototype[Symbol.toStringTag], s = (
908
+ var i;
909
+ const r = n.prototype[Symbol.toStringTag], s = (
910
910
  // We still need to support constructor's name to detect conflicts with older versions of this library.
911
- Symbol.toStringTag in t ? t[Symbol.toStringTag] : (r = t.constructor) === null || r === void 0 ? void 0 : r.name
911
+ Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name
912
912
  );
913
- if (i === s) {
914
- const a = ve(t);
915
- throw new Error(`Cannot use ${i} "${a}" from another module or realm.
913
+ if (r === s) {
914
+ const o = Te(t);
915
+ throw new Error(`Cannot use ${r} "${o}" from another module or realm.
916
916
 
917
917
  Ensure that there is only one instance of "graphql" in the node_modules
918
918
  directory. If different versions of "graphql" are the dependencies of other
@@ -930,11 +930,11 @@ spurious results.`);
930
930
  }
931
931
  );
932
932
  class Be {
933
- constructor(t, n = "GraphQL request", r = {
933
+ constructor(t, n = "GraphQL request", i = {
934
934
  line: 1,
935
935
  column: 1
936
936
  }) {
937
- typeof t == "string" || Z(!1, `Body must be a string. Received: ${ve(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || Z(
937
+ typeof t == "string" || Z(!1, `Body must be a string. Received: ${Te(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || Z(
938
938
  !1,
939
939
  "line in locationOffset is 1-indexed and must be positive."
940
940
  ), this.locationOffset.column > 0 || Z(
@@ -949,13 +949,13 @@ class Be {
949
949
  function Dt(e) {
950
950
  return Ot(e, Be);
951
951
  }
952
- function Ue(e, t) {
952
+ function Me(e, t) {
953
953
  return new _t(e, t).parseDocument();
954
954
  }
955
955
  class _t {
956
956
  constructor(t, n = {}) {
957
- const r = Dt(t) ? t : new Be(t);
958
- this._lexer = new lt(r), this._options = n, this._tokenCounter = 0;
957
+ const i = Dt(t) ? t : new Be(t);
958
+ this._lexer = new lt(i), this._options = n, this._tokenCounter = 0;
959
959
  }
960
960
  /**
961
961
  * Converts a name lex token into a name parse node.
@@ -1057,18 +1057,18 @@ class _t {
1057
1057
  if (this.peek(c.BRACE_L))
1058
1058
  return this.node(t, {
1059
1059
  kind: f.OPERATION_DEFINITION,
1060
- operation: M.QUERY,
1060
+ operation: U.QUERY,
1061
1061
  name: void 0,
1062
1062
  variableDefinitions: [],
1063
1063
  directives: [],
1064
1064
  selectionSet: this.parseSelectionSet()
1065
1065
  });
1066
1066
  const n = this.parseOperationType();
1067
- let r;
1068
- return this.peek(c.NAME) && (r = this.parseName()), this.node(t, {
1067
+ let i;
1068
+ return this.peek(c.NAME) && (i = this.parseName()), this.node(t, {
1069
1069
  kind: f.OPERATION_DEFINITION,
1070
1070
  operation: n,
1071
- name: r,
1071
+ name: i,
1072
1072
  variableDefinitions: this.parseVariableDefinitions(),
1073
1073
  directives: this.parseDirectives(!1),
1074
1074
  selectionSet: this.parseSelectionSet()
@@ -1081,11 +1081,11 @@ class _t {
1081
1081
  const t = this.expectToken(c.NAME);
1082
1082
  switch (t.value) {
1083
1083
  case "query":
1084
- return M.QUERY;
1084
+ return U.QUERY;
1085
1085
  case "mutation":
1086
- return M.MUTATION;
1086
+ return U.MUTATION;
1087
1087
  case "subscription":
1088
- return M.SUBSCRIPTION;
1088
+ return U.SUBSCRIPTION;
1089
1089
  }
1090
1090
  throw this.unexpected(t);
1091
1091
  }
@@ -1152,11 +1152,11 @@ class _t {
1152
1152
  */
1153
1153
  parseField() {
1154
1154
  const t = this._lexer.token, n = this.parseName();
1155
- let r, i;
1156
- return this.expectOptionalToken(c.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
1155
+ let i, r;
1156
+ return this.expectOptionalToken(c.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
1157
1157
  kind: f.FIELD,
1158
- alias: r,
1159
- name: i,
1158
+ alias: i,
1159
+ name: r,
1160
1160
  arguments: this.parseArguments(!1),
1161
1161
  directives: this.parseDirectives(!1),
1162
1162
  selectionSet: this.peek(c.BRACE_L) ? this.parseSelectionSet() : void 0
@@ -1173,10 +1173,10 @@ class _t {
1173
1173
  * Argument[Const] : Name : Value[?Const]
1174
1174
  */
1175
1175
  parseArgument(t = !1) {
1176
- const n = this._lexer.token, r = this.parseName();
1176
+ const n = this._lexer.token, i = this.parseName();
1177
1177
  return this.expectToken(c.COLON), this.node(n, {
1178
1178
  kind: f.ARGUMENT,
1179
- name: r,
1179
+ name: i,
1180
1180
  value: this.parseValueLiteral(t)
1181
1181
  });
1182
1182
  }
@@ -1301,11 +1301,11 @@ class _t {
1301
1301
  case c.DOLLAR:
1302
1302
  if (t)
1303
1303
  if (this.expectToken(c.DOLLAR), this._lexer.token.kind === c.NAME) {
1304
- const r = this._lexer.token.value;
1304
+ const i = this._lexer.token.value;
1305
1305
  throw b(
1306
1306
  this._lexer.source,
1307
1307
  n.start,
1308
- `Unexpected variable "$${r}" in constant value.`
1308
+ `Unexpected variable "$${i}" in constant value.`
1309
1309
  );
1310
1310
  } else
1311
1311
  throw this.unexpected(n);
@@ -1355,10 +1355,10 @@ class _t {
1355
1355
  * ObjectField[Const] : Name : Value[?Const]
1356
1356
  */
1357
1357
  parseObjectField(t) {
1358
- const n = this._lexer.token, r = this.parseName();
1358
+ const n = this._lexer.token, i = this.parseName();
1359
1359
  return this.expectToken(c.COLON), this.node(n, {
1360
1360
  kind: f.OBJECT_FIELD,
1361
- name: r,
1361
+ name: i,
1362
1362
  value: this.parseValueLiteral(t)
1363
1363
  });
1364
1364
  }
@@ -1399,10 +1399,10 @@ class _t {
1399
1399
  const t = this._lexer.token;
1400
1400
  let n;
1401
1401
  if (this.expectOptionalToken(c.BRACKET_L)) {
1402
- const r = this.parseTypeReference();
1402
+ const i = this.parseTypeReference();
1403
1403
  this.expectToken(c.BRACKET_R), n = this.node(t, {
1404
1404
  kind: f.LIST_TYPE,
1405
- type: r
1405
+ type: i
1406
1406
  });
1407
1407
  } else
1408
1408
  n = this.parseNamedType();
@@ -1439,7 +1439,7 @@ class _t {
1439
1439
  parseSchemaDefinition() {
1440
1440
  const t = this._lexer.token, n = this.parseDescription();
1441
1441
  this.expectKeyword("schema");
1442
- const r = this.parseConstDirectives(), i = this.many(
1442
+ const i = this.parseConstDirectives(), r = this.many(
1443
1443
  c.BRACE_L,
1444
1444
  this.parseOperationTypeDefinition,
1445
1445
  c.BRACE_R
@@ -1447,8 +1447,8 @@ class _t {
1447
1447
  return this.node(t, {
1448
1448
  kind: f.SCHEMA_DEFINITION,
1449
1449
  description: n,
1450
- directives: r,
1451
- operationTypes: i
1450
+ directives: i,
1451
+ operationTypes: r
1452
1452
  });
1453
1453
  }
1454
1454
  /**
@@ -1457,11 +1457,11 @@ class _t {
1457
1457
  parseOperationTypeDefinition() {
1458
1458
  const t = this._lexer.token, n = this.parseOperationType();
1459
1459
  this.expectToken(c.COLON);
1460
- const r = this.parseNamedType();
1460
+ const i = this.parseNamedType();
1461
1461
  return this.node(t, {
1462
1462
  kind: f.OPERATION_TYPE_DEFINITION,
1463
1463
  operation: n,
1464
- type: r
1464
+ type: i
1465
1465
  });
1466
1466
  }
1467
1467
  /**
@@ -1470,12 +1470,12 @@ class _t {
1470
1470
  parseScalarTypeDefinition() {
1471
1471
  const t = this._lexer.token, n = this.parseDescription();
1472
1472
  this.expectKeyword("scalar");
1473
- const r = this.parseName(), i = this.parseConstDirectives();
1473
+ const i = this.parseName(), r = this.parseConstDirectives();
1474
1474
  return this.node(t, {
1475
1475
  kind: f.SCALAR_TYPE_DEFINITION,
1476
1476
  description: n,
1477
- name: r,
1478
- directives: i
1477
+ name: i,
1478
+ directives: r
1479
1479
  });
1480
1480
  }
1481
1481
  /**
@@ -1486,14 +1486,14 @@ class _t {
1486
1486
  parseObjectTypeDefinition() {
1487
1487
  const t = this._lexer.token, n = this.parseDescription();
1488
1488
  this.expectKeyword("type");
1489
- const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1489
+ const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1490
1490
  return this.node(t, {
1491
1491
  kind: f.OBJECT_TYPE_DEFINITION,
1492
1492
  description: n,
1493
- name: r,
1494
- interfaces: i,
1493
+ name: i,
1494
+ interfaces: r,
1495
1495
  directives: s,
1496
- fields: a
1496
+ fields: o
1497
1497
  });
1498
1498
  }
1499
1499
  /**
@@ -1521,16 +1521,16 @@ class _t {
1521
1521
  * - Description? Name ArgumentsDefinition? : Type Directives[Const]?
1522
1522
  */
1523
1523
  parseFieldDefinition() {
1524
- const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs();
1524
+ const t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1525
1525
  this.expectToken(c.COLON);
1526
- const s = this.parseTypeReference(), a = this.parseConstDirectives();
1526
+ const s = this.parseTypeReference(), o = this.parseConstDirectives();
1527
1527
  return this.node(t, {
1528
1528
  kind: f.FIELD_DEFINITION,
1529
1529
  description: n,
1530
- name: r,
1531
- arguments: i,
1530
+ name: i,
1531
+ arguments: r,
1532
1532
  type: s,
1533
- directives: a
1533
+ directives: o
1534
1534
  });
1535
1535
  }
1536
1536
  /**
@@ -1548,19 +1548,19 @@ class _t {
1548
1548
  * - Description? Name : Type DefaultValue? Directives[Const]?
1549
1549
  */
1550
1550
  parseInputValueDef() {
1551
- const t = this._lexer.token, n = this.parseDescription(), r = this.parseName();
1551
+ const t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
1552
1552
  this.expectToken(c.COLON);
1553
- const i = this.parseTypeReference();
1553
+ const r = this.parseTypeReference();
1554
1554
  let s;
1555
1555
  this.expectOptionalToken(c.EQUALS) && (s = this.parseConstValueLiteral());
1556
- const a = this.parseConstDirectives();
1556
+ const o = this.parseConstDirectives();
1557
1557
  return this.node(t, {
1558
1558
  kind: f.INPUT_VALUE_DEFINITION,
1559
1559
  description: n,
1560
- name: r,
1561
- type: i,
1560
+ name: i,
1561
+ type: r,
1562
1562
  defaultValue: s,
1563
- directives: a
1563
+ directives: o
1564
1564
  });
1565
1565
  }
1566
1566
  /**
@@ -1570,14 +1570,14 @@ class _t {
1570
1570
  parseInterfaceTypeDefinition() {
1571
1571
  const t = this._lexer.token, n = this.parseDescription();
1572
1572
  this.expectKeyword("interface");
1573
- const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1573
+ const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1574
1574
  return this.node(t, {
1575
1575
  kind: f.INTERFACE_TYPE_DEFINITION,
1576
1576
  description: n,
1577
- name: r,
1578
- interfaces: i,
1577
+ name: i,
1578
+ interfaces: r,
1579
1579
  directives: s,
1580
- fields: a
1580
+ fields: o
1581
1581
  });
1582
1582
  }
1583
1583
  /**
@@ -1587,12 +1587,12 @@ class _t {
1587
1587
  parseUnionTypeDefinition() {
1588
1588
  const t = this._lexer.token, n = this.parseDescription();
1589
1589
  this.expectKeyword("union");
1590
- const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1590
+ const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1591
1591
  return this.node(t, {
1592
1592
  kind: f.UNION_TYPE_DEFINITION,
1593
1593
  description: n,
1594
- name: r,
1595
- directives: i,
1594
+ name: i,
1595
+ directives: r,
1596
1596
  types: s
1597
1597
  });
1598
1598
  }
@@ -1611,12 +1611,12 @@ class _t {
1611
1611
  parseEnumTypeDefinition() {
1612
1612
  const t = this._lexer.token, n = this.parseDescription();
1613
1613
  this.expectKeyword("enum");
1614
- const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1614
+ const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1615
1615
  return this.node(t, {
1616
1616
  kind: f.ENUM_TYPE_DEFINITION,
1617
1617
  description: n,
1618
- name: r,
1619
- directives: i,
1618
+ name: i,
1619
+ directives: r,
1620
1620
  values: s
1621
1621
  });
1622
1622
  }
@@ -1636,12 +1636,12 @@ class _t {
1636
1636
  * EnumValueDefinition : Description? EnumValue Directives[Const]?
1637
1637
  */
1638
1638
  parseEnumValueDefinition() {
1639
- const t = this._lexer.token, n = this.parseDescription(), r = this.parseEnumValueName(), i = this.parseConstDirectives();
1639
+ const t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1640
1640
  return this.node(t, {
1641
1641
  kind: f.ENUM_VALUE_DEFINITION,
1642
1642
  description: n,
1643
- name: r,
1644
- directives: i
1643
+ name: i,
1644
+ directives: r
1645
1645
  });
1646
1646
  }
1647
1647
  /**
@@ -1665,12 +1665,12 @@ class _t {
1665
1665
  parseInputObjectTypeDefinition() {
1666
1666
  const t = this._lexer.token, n = this.parseDescription();
1667
1667
  this.expectKeyword("input");
1668
- const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1668
+ const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1669
1669
  return this.node(t, {
1670
1670
  kind: f.INPUT_OBJECT_TYPE_DEFINITION,
1671
1671
  description: n,
1672
- name: r,
1673
- directives: i,
1672
+ name: i,
1673
+ directives: r,
1674
1674
  fields: s
1675
1675
  });
1676
1676
  }
@@ -1730,17 +1730,17 @@ class _t {
1730
1730
  parseSchemaExtension() {
1731
1731
  const t = this._lexer.token;
1732
1732
  this.expectKeyword("extend"), this.expectKeyword("schema");
1733
- const n = this.parseConstDirectives(), r = this.optionalMany(
1733
+ const n = this.parseConstDirectives(), i = this.optionalMany(
1734
1734
  c.BRACE_L,
1735
1735
  this.parseOperationTypeDefinition,
1736
1736
  c.BRACE_R
1737
1737
  );
1738
- if (n.length === 0 && r.length === 0)
1738
+ if (n.length === 0 && i.length === 0)
1739
1739
  throw this.unexpected();
1740
1740
  return this.node(t, {
1741
1741
  kind: f.SCHEMA_EXTENSION,
1742
1742
  directives: n,
1743
- operationTypes: r
1743
+ operationTypes: i
1744
1744
  });
1745
1745
  }
1746
1746
  /**
@@ -1750,13 +1750,13 @@ class _t {
1750
1750
  parseScalarTypeExtension() {
1751
1751
  const t = this._lexer.token;
1752
1752
  this.expectKeyword("extend"), this.expectKeyword("scalar");
1753
- const n = this.parseName(), r = this.parseConstDirectives();
1754
- if (r.length === 0)
1753
+ const n = this.parseName(), i = this.parseConstDirectives();
1754
+ if (i.length === 0)
1755
1755
  throw this.unexpected();
1756
1756
  return this.node(t, {
1757
1757
  kind: f.SCALAR_TYPE_EXTENSION,
1758
1758
  name: n,
1759
- directives: r
1759
+ directives: i
1760
1760
  });
1761
1761
  }
1762
1762
  /**
@@ -1768,14 +1768,14 @@ class _t {
1768
1768
  parseObjectTypeExtension() {
1769
1769
  const t = this._lexer.token;
1770
1770
  this.expectKeyword("extend"), this.expectKeyword("type");
1771
- const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1772
- if (r.length === 0 && i.length === 0 && s.length === 0)
1771
+ const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1772
+ if (i.length === 0 && r.length === 0 && s.length === 0)
1773
1773
  throw this.unexpected();
1774
1774
  return this.node(t, {
1775
1775
  kind: f.OBJECT_TYPE_EXTENSION,
1776
1776
  name: n,
1777
- interfaces: r,
1778
- directives: i,
1777
+ interfaces: i,
1778
+ directives: r,
1779
1779
  fields: s
1780
1780
  });
1781
1781
  }
@@ -1788,14 +1788,14 @@ class _t {
1788
1788
  parseInterfaceTypeExtension() {
1789
1789
  const t = this._lexer.token;
1790
1790
  this.expectKeyword("extend"), this.expectKeyword("interface");
1791
- const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1792
- if (r.length === 0 && i.length === 0 && s.length === 0)
1791
+ const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1792
+ if (i.length === 0 && r.length === 0 && s.length === 0)
1793
1793
  throw this.unexpected();
1794
1794
  return this.node(t, {
1795
1795
  kind: f.INTERFACE_TYPE_EXTENSION,
1796
1796
  name: n,
1797
- interfaces: r,
1798
- directives: i,
1797
+ interfaces: i,
1798
+ directives: r,
1799
1799
  fields: s
1800
1800
  });
1801
1801
  }
@@ -1807,14 +1807,14 @@ class _t {
1807
1807
  parseUnionTypeExtension() {
1808
1808
  const t = this._lexer.token;
1809
1809
  this.expectKeyword("extend"), this.expectKeyword("union");
1810
- const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseUnionMemberTypes();
1811
- if (r.length === 0 && i.length === 0)
1810
+ const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1811
+ if (i.length === 0 && r.length === 0)
1812
1812
  throw this.unexpected();
1813
1813
  return this.node(t, {
1814
1814
  kind: f.UNION_TYPE_EXTENSION,
1815
1815
  name: n,
1816
- directives: r,
1817
- types: i
1816
+ directives: i,
1817
+ types: r
1818
1818
  });
1819
1819
  }
1820
1820
  /**
@@ -1825,14 +1825,14 @@ class _t {
1825
1825
  parseEnumTypeExtension() {
1826
1826
  const t = this._lexer.token;
1827
1827
  this.expectKeyword("extend"), this.expectKeyword("enum");
1828
- const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseEnumValuesDefinition();
1829
- if (r.length === 0 && i.length === 0)
1828
+ const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1829
+ if (i.length === 0 && r.length === 0)
1830
1830
  throw this.unexpected();
1831
1831
  return this.node(t, {
1832
1832
  kind: f.ENUM_TYPE_EXTENSION,
1833
1833
  name: n,
1834
- directives: r,
1835
- values: i
1834
+ directives: i,
1835
+ values: r
1836
1836
  });
1837
1837
  }
1838
1838
  /**
@@ -1843,14 +1843,14 @@ class _t {
1843
1843
  parseInputObjectTypeExtension() {
1844
1844
  const t = this._lexer.token;
1845
1845
  this.expectKeyword("extend"), this.expectKeyword("input");
1846
- const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseInputFieldsDefinition();
1847
- if (r.length === 0 && i.length === 0)
1846
+ const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1847
+ if (i.length === 0 && r.length === 0)
1848
1848
  throw this.unexpected();
1849
1849
  return this.node(t, {
1850
1850
  kind: f.INPUT_OBJECT_TYPE_EXTENSION,
1851
1851
  name: n,
1852
- directives: r,
1853
- fields: i
1852
+ directives: i,
1853
+ fields: r
1854
1854
  });
1855
1855
  }
1856
1856
  /**
@@ -1862,16 +1862,16 @@ class _t {
1862
1862
  parseDirectiveDefinition() {
1863
1863
  const t = this._lexer.token, n = this.parseDescription();
1864
1864
  this.expectKeyword("directive"), this.expectToken(c.AT);
1865
- const r = this.parseName(), i = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1865
+ const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1866
1866
  this.expectKeyword("on");
1867
- const a = this.parseDirectiveLocations();
1867
+ const o = this.parseDirectiveLocations();
1868
1868
  return this.node(t, {
1869
1869
  kind: f.DIRECTIVE_DEFINITION,
1870
1870
  description: n,
1871
- name: r,
1872
- arguments: i,
1871
+ name: i,
1872
+ arguments: r,
1873
1873
  repeatable: s,
1874
- locations: a
1874
+ locations: o
1875
1875
  });
1876
1876
  }
1877
1877
  /**
@@ -1922,7 +1922,7 @@ class _t {
1922
1922
  * given parsed object.
1923
1923
  */
1924
1924
  node(t, n) {
1925
- return this._options.noLocation !== !0 && (n.loc = new rt(
1925
+ return this._options.noLocation !== !0 && (n.loc = new it(
1926
1926
  t,
1927
1927
  this._lexer.lastToken,
1928
1928
  this._lexer.source
@@ -1945,7 +1945,7 @@ class _t {
1945
1945
  throw b(
1946
1946
  this._lexer.source,
1947
1947
  n.start,
1948
- `Expected ${Me(t)}, found ${W(n)}.`
1948
+ `Expected ${Ue(t)}, found ${W(n)}.`
1949
1949
  );
1950
1950
  }
1951
1951
  /**
@@ -1994,12 +1994,12 @@ class _t {
1994
1994
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
1995
1995
  * Advances the parser to the next lex token after the closing token.
1996
1996
  */
1997
- any(t, n, r) {
1997
+ any(t, n, i) {
1998
1998
  this.expectToken(t);
1999
- const i = [];
2000
- for (; !this.expectOptionalToken(r); )
2001
- i.push(n.call(this));
2002
- return i;
1999
+ const r = [];
2000
+ for (; !this.expectOptionalToken(i); )
2001
+ r.push(n.call(this));
2002
+ return r;
2003
2003
  }
2004
2004
  /**
2005
2005
  * Returns a list of parse nodes, determined by the parseFn.
@@ -2007,13 +2007,13 @@ class _t {
2007
2007
  * that begins with a lex token of openKind and ends with a lex token of closeKind.
2008
2008
  * Advances the parser to the next lex token after the closing token.
2009
2009
  */
2010
- optionalMany(t, n, r) {
2010
+ optionalMany(t, n, i) {
2011
2011
  if (this.expectOptionalToken(t)) {
2012
- const i = [];
2012
+ const r = [];
2013
2013
  do
2014
- i.push(n.call(this));
2015
- while (!this.expectOptionalToken(r));
2016
- return i;
2014
+ r.push(n.call(this));
2015
+ while (!this.expectOptionalToken(i));
2016
+ return r;
2017
2017
  }
2018
2018
  return [];
2019
2019
  }
@@ -2022,13 +2022,13 @@ class _t {
2022
2022
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2023
2023
  * Advances the parser to the next lex token after the closing token.
2024
2024
  */
2025
- many(t, n, r) {
2025
+ many(t, n, i) {
2026
2026
  this.expectToken(t);
2027
- const i = [];
2027
+ const r = [];
2028
2028
  do
2029
- i.push(n.call(this));
2030
- while (!this.expectOptionalToken(r));
2031
- return i;
2029
+ r.push(n.call(this));
2030
+ while (!this.expectOptionalToken(i));
2031
+ return r;
2032
2032
  }
2033
2033
  /**
2034
2034
  * Returns a non-empty list of parse nodes, determined by the parseFn.
@@ -2037,11 +2037,11 @@ class _t {
2037
2037
  */
2038
2038
  delimitedMany(t, n) {
2039
2039
  this.expectOptionalToken(t);
2040
- const r = [];
2040
+ const i = [];
2041
2041
  do
2042
- r.push(n.call(this));
2042
+ i.push(n.call(this));
2043
2043
  while (this.expectOptionalToken(t));
2044
- return r;
2044
+ return i;
2045
2045
  }
2046
2046
  advanceLexer() {
2047
2047
  const { maxTokens: t } = this._options, n = this._lexer.advance();
@@ -2055,10 +2055,10 @@ class _t {
2055
2055
  }
2056
2056
  function W(e) {
2057
2057
  const t = e.value;
2058
- return Me(e.kind) + (t != null ? ` "${t}"` : "");
2058
+ return Ue(e.kind) + (t != null ? ` "${t}"` : "");
2059
2059
  }
2060
- function Me(e) {
2061
- return ht(e) ? `"${e}"` : e;
2060
+ function Ue(e) {
2061
+ return dt(e) ? `"${e}"` : e;
2062
2062
  }
2063
2063
  function kt(e) {
2064
2064
  return `"${e.replace(Rt, St)}"`;
@@ -2235,71 +2235,71 @@ const wt = [
2235
2235
  "\\u009F"
2236
2236
  ], Pt = Object.freeze({});
2237
2237
  function Lt(e, t, n = Re) {
2238
- const r = /* @__PURE__ */ new Map();
2238
+ const i = /* @__PURE__ */ new Map();
2239
2239
  for (const _ of Object.values(f))
2240
- r.set(_, Ft(t, _));
2241
- let i, s = Array.isArray(e), a = [e], u = -1, p = [], d = e, m, E;
2242
- const g = [], N = [];
2240
+ i.set(_, Ft(t, _));
2241
+ let r, s = Array.isArray(e), o = [e], u = -1, h = [], p = e, m, E;
2242
+ const g = [], A = [];
2243
2243
  do {
2244
2244
  u++;
2245
- const _ = u === a.length, z = _ && p.length !== 0;
2245
+ const _ = u === o.length, z = _ && h.length !== 0;
2246
2246
  if (_) {
2247
- if (m = N.length === 0 ? void 0 : g[g.length - 1], d = E, E = N.pop(), z)
2247
+ if (m = A.length === 0 ? void 0 : g[g.length - 1], p = E, E = A.pop(), z)
2248
2248
  if (s) {
2249
- d = d.slice();
2249
+ p = p.slice();
2250
2250
  let k = 0;
2251
- for (const [B, Q] of p) {
2251
+ for (const [B, Q] of h) {
2252
2252
  const J = B - k;
2253
- Q === null ? (d.splice(J, 1), k++) : d[J] = Q;
2253
+ Q === null ? (p.splice(J, 1), k++) : p[J] = Q;
2254
2254
  }
2255
2255
  } else {
2256
- d = Object.defineProperties(
2256
+ p = Object.defineProperties(
2257
2257
  {},
2258
- Object.getOwnPropertyDescriptors(d)
2258
+ Object.getOwnPropertyDescriptors(p)
2259
2259
  );
2260
- for (const [k, B] of p)
2261
- d[k] = B;
2260
+ for (const [k, B] of h)
2261
+ p[k] = B;
2262
2262
  }
2263
- u = i.index, a = i.keys, p = i.edits, s = i.inArray, i = i.prev;
2263
+ u = r.index, o = r.keys, h = r.edits, s = r.inArray, r = r.prev;
2264
2264
  } else if (E) {
2265
- if (m = s ? u : a[u], d = E[m], d == null)
2265
+ if (m = s ? u : o[u], p = E[m], p == null)
2266
2266
  continue;
2267
2267
  g.push(m);
2268
2268
  }
2269
2269
  let S;
2270
- if (!Array.isArray(d)) {
2271
- var y, C;
2272
- xe(d) || Z(!1, `Invalid AST Node: ${ve(d)}.`);
2273
- const k = _ ? (y = r.get(d.kind)) === null || y === void 0 ? void 0 : y.leave : (C = r.get(d.kind)) === null || C === void 0 ? void 0 : C.enter;
2274
- if (S = k == null ? void 0 : k.call(t, d, m, E, g, N), S === Pt)
2270
+ if (!Array.isArray(p)) {
2271
+ var y, N;
2272
+ xe(p) || Z(!1, `Invalid AST Node: ${Te(p)}.`);
2273
+ const k = _ ? (y = i.get(p.kind)) === null || y === void 0 ? void 0 : y.leave : (N = i.get(p.kind)) === null || N === void 0 ? void 0 : N.enter;
2274
+ if (S = k == null ? void 0 : k.call(t, p, m, E, g, A), S === Pt)
2275
2275
  break;
2276
2276
  if (S === !1) {
2277
2277
  if (!_) {
2278
2278
  g.pop();
2279
2279
  continue;
2280
2280
  }
2281
- } else if (S !== void 0 && (p.push([m, S]), !_))
2281
+ } else if (S !== void 0 && (h.push([m, S]), !_))
2282
2282
  if (xe(S))
2283
- d = S;
2283
+ p = S;
2284
2284
  else {
2285
2285
  g.pop();
2286
2286
  continue;
2287
2287
  }
2288
2288
  }
2289
- if (S === void 0 && z && p.push([m, d]), _)
2289
+ if (S === void 0 && z && h.push([m, p]), _)
2290
2290
  g.pop();
2291
2291
  else {
2292
2292
  var D;
2293
- i = {
2293
+ r = {
2294
2294
  inArray: s,
2295
2295
  index: u,
2296
- keys: a,
2297
- edits: p,
2298
- prev: i
2299
- }, s = Array.isArray(d), a = s ? d : (D = n[d.kind]) !== null && D !== void 0 ? D : [], u = -1, p = [], E && N.push(E), E = d;
2296
+ keys: o,
2297
+ edits: h,
2298
+ prev: r
2299
+ }, s = Array.isArray(p), o = s ? p : (D = n[p.kind]) !== null && D !== void 0 ? D : [], u = -1, h = [], E && A.push(E), E = p;
2300
2300
  }
2301
- } while (i !== void 0);
2302
- return p.length !== 0 ? p[p.length - 1][1] : e;
2301
+ } while (r !== void 0);
2302
+ return h.length !== 0 ? h[h.length - 1][1] : e;
2303
2303
  }
2304
2304
  function Ft(e, t) {
2305
2305
  const n = e[t];
@@ -2312,9 +2312,9 @@ function Ft(e, t) {
2312
2312
  };
2313
2313
  }
2314
2314
  function Bt(e) {
2315
- return Lt(e, Mt);
2315
+ return Lt(e, Ut);
2316
2316
  }
2317
- const Ut = 80, Mt = {
2317
+ const Mt = 80, Ut = {
2318
2318
  Name: {
2319
2319
  leave: (e) => e.value
2320
2320
  },
@@ -2323,17 +2323,17 @@ const Ut = 80, Mt = {
2323
2323
  },
2324
2324
  // Document
2325
2325
  Document: {
2326
- leave: (e) => h(e.definitions, `
2326
+ leave: (e) => d(e.definitions, `
2327
2327
 
2328
2328
  `)
2329
2329
  },
2330
2330
  OperationDefinition: {
2331
2331
  leave(e) {
2332
- const t = v("(", h(e.variableDefinitions, ", "), ")"), n = h(
2332
+ const t = T("(", d(e.variableDefinitions, ", "), ")"), n = d(
2333
2333
  [
2334
2334
  e.operation,
2335
- h([e.name, t]),
2336
- h(e.directives, " ")
2335
+ d([e.name, t]),
2336
+ d(e.directives, " ")
2337
2337
  ],
2338
2338
  " "
2339
2339
  );
@@ -2341,19 +2341,19 @@ const Ut = 80, Mt = {
2341
2341
  }
2342
2342
  },
2343
2343
  VariableDefinition: {
2344
- leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + v(" = ", n) + v(" ", h(r, " "))
2344
+ leave: ({ variable: e, type: t, defaultValue: n, directives: i }) => e + ": " + t + T(" = ", n) + T(" ", d(i, " "))
2345
2345
  },
2346
2346
  SelectionSet: {
2347
2347
  leave: ({ selections: e }) => R(e)
2348
2348
  },
2349
2349
  Field: {
2350
- leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) {
2351
- const s = v("", e, ": ") + t;
2352
- let a = s + v("(", h(n, ", "), ")");
2353
- return a.length > Ut && (a = s + v(`(
2354
- `, K(h(n, `
2350
+ leave({ alias: e, name: t, arguments: n, directives: i, selectionSet: r }) {
2351
+ const s = T("", e, ": ") + t;
2352
+ let o = s + T("(", d(n, ", "), ")");
2353
+ return o.length > Mt && (o = s + T(`(
2354
+ `, K(d(n, `
2355
2355
  `)), `
2356
- )`)), h([a, h(r, " "), i], " ");
2356
+ )`)), d([o, d(i, " "), r], " ");
2357
2357
  }
2358
2358
  },
2359
2359
  Argument: {
@@ -2361,23 +2361,23 @@ const Ut = 80, Mt = {
2361
2361
  },
2362
2362
  // Fragments
2363
2363
  FragmentSpread: {
2364
- leave: ({ name: e, directives: t }) => "..." + e + v(" ", h(t, " "))
2364
+ leave: ({ name: e, directives: t }) => "..." + e + T(" ", d(t, " "))
2365
2365
  },
2366
2366
  InlineFragment: {
2367
- leave: ({ typeCondition: e, directives: t, selectionSet: n }) => h(
2367
+ leave: ({ typeCondition: e, directives: t, selectionSet: n }) => d(
2368
2368
  [
2369
2369
  "...",
2370
- v("on ", e),
2371
- h(t, " "),
2370
+ T("on ", e),
2371
+ d(t, " "),
2372
2372
  n
2373
2373
  ],
2374
2374
  " "
2375
2375
  )
2376
2376
  },
2377
2377
  FragmentDefinition: {
2378
- leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: r, selectionSet: i }) => (
2378
+ leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: i, selectionSet: r }) => (
2379
2379
  // or removed in the future.
2380
- `fragment ${e}${v("(", h(n, ", "), ")")} on ${t} ${v("", h(r, " "), " ")}` + i
2380
+ `fragment ${e}${T("(", d(n, ", "), ")")} on ${t} ${T("", d(i, " "), " ")}` + r
2381
2381
  )
2382
2382
  },
2383
2383
  // Value
@@ -2400,17 +2400,17 @@ const Ut = 80, Mt = {
2400
2400
  leave: ({ value: e }) => e
2401
2401
  },
2402
2402
  ListValue: {
2403
- leave: ({ values: e }) => "[" + h(e, ", ") + "]"
2403
+ leave: ({ values: e }) => "[" + d(e, ", ") + "]"
2404
2404
  },
2405
2405
  ObjectValue: {
2406
- leave: ({ fields: e }) => "{" + h(e, ", ") + "}"
2406
+ leave: ({ fields: e }) => "{" + d(e, ", ") + "}"
2407
2407
  },
2408
2408
  ObjectField: {
2409
2409
  leave: ({ name: e, value: t }) => e + ": " + t
2410
2410
  },
2411
2411
  // Directive
2412
2412
  Directive: {
2413
- leave: ({ name: e, arguments: t }) => "@" + e + v("(", h(t, ", "), ")")
2413
+ leave: ({ name: e, arguments: t }) => "@" + e + T("(", d(t, ", "), ")")
2414
2414
  },
2415
2415
  // Type
2416
2416
  NamedType: {
@@ -2424,148 +2424,148 @@ const Ut = 80, Mt = {
2424
2424
  },
2425
2425
  // Type System Definitions
2426
2426
  SchemaDefinition: {
2427
- leave: ({ description: e, directives: t, operationTypes: n }) => v("", e, `
2428
- `) + h(["schema", h(t, " "), R(n)], " ")
2427
+ leave: ({ description: e, directives: t, operationTypes: n }) => T("", e, `
2428
+ `) + d(["schema", d(t, " "), R(n)], " ")
2429
2429
  },
2430
2430
  OperationTypeDefinition: {
2431
2431
  leave: ({ operation: e, type: t }) => e + ": " + t
2432
2432
  },
2433
2433
  ScalarTypeDefinition: {
2434
- leave: ({ description: e, name: t, directives: n }) => v("", e, `
2435
- `) + h(["scalar", t, h(n, " ")], " ")
2434
+ leave: ({ description: e, name: t, directives: n }) => T("", e, `
2435
+ `) + d(["scalar", t, d(n, " ")], " ")
2436
2436
  },
2437
2437
  ObjectTypeDefinition: {
2438
- leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, `
2439
- `) + h(
2438
+ leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => T("", e, `
2439
+ `) + d(
2440
2440
  [
2441
2441
  "type",
2442
2442
  t,
2443
- v("implements ", h(n, " & ")),
2444
- h(r, " "),
2445
- R(i)
2443
+ T("implements ", d(n, " & ")),
2444
+ d(i, " "),
2445
+ R(r)
2446
2446
  ],
2447
2447
  " "
2448
2448
  )
2449
2449
  },
2450
2450
  FieldDefinition: {
2451
- leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => v("", e, `
2452
- `) + t + (Ie(n) ? v(`(
2453
- `, K(h(n, `
2451
+ leave: ({ description: e, name: t, arguments: n, type: i, directives: r }) => T("", e, `
2452
+ `) + t + (Ie(n) ? T(`(
2453
+ `, K(d(n, `
2454
2454
  `)), `
2455
- )`) : v("(", h(n, ", "), ")")) + ": " + r + v(" ", h(i, " "))
2455
+ )`) : T("(", d(n, ", "), ")")) + ": " + i + T(" ", d(r, " "))
2456
2456
  },
2457
2457
  InputValueDefinition: {
2458
- leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => v("", e, `
2459
- `) + h(
2460
- [t + ": " + n, v("= ", r), h(i, " ")],
2458
+ leave: ({ description: e, name: t, type: n, defaultValue: i, directives: r }) => T("", e, `
2459
+ `) + d(
2460
+ [t + ": " + n, T("= ", i), d(r, " ")],
2461
2461
  " "
2462
2462
  )
2463
2463
  },
2464
2464
  InterfaceTypeDefinition: {
2465
- leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, `
2466
- `) + h(
2465
+ leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => T("", e, `
2466
+ `) + d(
2467
2467
  [
2468
2468
  "interface",
2469
2469
  t,
2470
- v("implements ", h(n, " & ")),
2471
- h(r, " "),
2472
- R(i)
2470
+ T("implements ", d(n, " & ")),
2471
+ d(i, " "),
2472
+ R(r)
2473
2473
  ],
2474
2474
  " "
2475
2475
  )
2476
2476
  },
2477
2477
  UnionTypeDefinition: {
2478
- leave: ({ description: e, name: t, directives: n, types: r }) => v("", e, `
2479
- `) + h(
2480
- ["union", t, h(n, " "), v("= ", h(r, " | "))],
2478
+ leave: ({ description: e, name: t, directives: n, types: i }) => T("", e, `
2479
+ `) + d(
2480
+ ["union", t, d(n, " "), T("= ", d(i, " | "))],
2481
2481
  " "
2482
2482
  )
2483
2483
  },
2484
2484
  EnumTypeDefinition: {
2485
- leave: ({ description: e, name: t, directives: n, values: r }) => v("", e, `
2486
- `) + h(["enum", t, h(n, " "), R(r)], " ")
2485
+ leave: ({ description: e, name: t, directives: n, values: i }) => T("", e, `
2486
+ `) + d(["enum", t, d(n, " "), R(i)], " ")
2487
2487
  },
2488
2488
  EnumValueDefinition: {
2489
- leave: ({ description: e, name: t, directives: n }) => v("", e, `
2490
- `) + h([t, h(n, " ")], " ")
2489
+ leave: ({ description: e, name: t, directives: n }) => T("", e, `
2490
+ `) + d([t, d(n, " ")], " ")
2491
2491
  },
2492
2492
  InputObjectTypeDefinition: {
2493
- leave: ({ description: e, name: t, directives: n, fields: r }) => v("", e, `
2494
- `) + h(["input", t, h(n, " "), R(r)], " ")
2493
+ leave: ({ description: e, name: t, directives: n, fields: i }) => T("", e, `
2494
+ `) + d(["input", t, d(n, " "), R(i)], " ")
2495
2495
  },
2496
2496
  DirectiveDefinition: {
2497
- leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => v("", e, `
2498
- `) + "directive @" + t + (Ie(n) ? v(`(
2499
- `, K(h(n, `
2497
+ leave: ({ description: e, name: t, arguments: n, repeatable: i, locations: r }) => T("", e, `
2498
+ `) + "directive @" + t + (Ie(n) ? T(`(
2499
+ `, K(d(n, `
2500
2500
  `)), `
2501
- )`) : v("(", h(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + h(i, " | ")
2501
+ )`) : T("(", d(n, ", "), ")")) + (i ? " repeatable" : "") + " on " + d(r, " | ")
2502
2502
  },
2503
2503
  SchemaExtension: {
2504
- leave: ({ directives: e, operationTypes: t }) => h(
2505
- ["extend schema", h(e, " "), R(t)],
2504
+ leave: ({ directives: e, operationTypes: t }) => d(
2505
+ ["extend schema", d(e, " "), R(t)],
2506
2506
  " "
2507
2507
  )
2508
2508
  },
2509
2509
  ScalarTypeExtension: {
2510
- leave: ({ name: e, directives: t }) => h(["extend scalar", e, h(t, " ")], " ")
2510
+ leave: ({ name: e, directives: t }) => d(["extend scalar", e, d(t, " ")], " ")
2511
2511
  },
2512
2512
  ObjectTypeExtension: {
2513
- leave: ({ name: e, interfaces: t, directives: n, fields: r }) => h(
2513
+ leave: ({ name: e, interfaces: t, directives: n, fields: i }) => d(
2514
2514
  [
2515
2515
  "extend type",
2516
2516
  e,
2517
- v("implements ", h(t, " & ")),
2518
- h(n, " "),
2519
- R(r)
2517
+ T("implements ", d(t, " & ")),
2518
+ d(n, " "),
2519
+ R(i)
2520
2520
  ],
2521
2521
  " "
2522
2522
  )
2523
2523
  },
2524
2524
  InterfaceTypeExtension: {
2525
- leave: ({ name: e, interfaces: t, directives: n, fields: r }) => h(
2525
+ leave: ({ name: e, interfaces: t, directives: n, fields: i }) => d(
2526
2526
  [
2527
2527
  "extend interface",
2528
2528
  e,
2529
- v("implements ", h(t, " & ")),
2530
- h(n, " "),
2531
- R(r)
2529
+ T("implements ", d(t, " & ")),
2530
+ d(n, " "),
2531
+ R(i)
2532
2532
  ],
2533
2533
  " "
2534
2534
  )
2535
2535
  },
2536
2536
  UnionTypeExtension: {
2537
- leave: ({ name: e, directives: t, types: n }) => h(
2537
+ leave: ({ name: e, directives: t, types: n }) => d(
2538
2538
  [
2539
2539
  "extend union",
2540
2540
  e,
2541
- h(t, " "),
2542
- v("= ", h(n, " | "))
2541
+ d(t, " "),
2542
+ T("= ", d(n, " | "))
2543
2543
  ],
2544
2544
  " "
2545
2545
  )
2546
2546
  },
2547
2547
  EnumTypeExtension: {
2548
- leave: ({ name: e, directives: t, values: n }) => h(["extend enum", e, h(t, " "), R(n)], " ")
2548
+ leave: ({ name: e, directives: t, values: n }) => d(["extend enum", e, d(t, " "), R(n)], " ")
2549
2549
  },
2550
2550
  InputObjectTypeExtension: {
2551
- leave: ({ name: e, directives: t, fields: n }) => h(["extend input", e, h(t, " "), R(n)], " ")
2551
+ leave: ({ name: e, directives: t, fields: n }) => d(["extend input", e, d(t, " "), R(n)], " ")
2552
2552
  }
2553
2553
  };
2554
- function h(e, t = "") {
2554
+ function d(e, t = "") {
2555
2555
  var n;
2556
- return (n = e == null ? void 0 : e.filter((r) => r).join(t)) !== null && n !== void 0 ? n : "";
2556
+ return (n = e == null ? void 0 : e.filter((i) => i).join(t)) !== null && n !== void 0 ? n : "";
2557
2557
  }
2558
2558
  function R(e) {
2559
- return v(`{
2560
- `, K(h(e, `
2559
+ return T(`{
2560
+ `, K(d(e, `
2561
2561
  `)), `
2562
2562
  }`);
2563
2563
  }
2564
- function v(e, t, n = "") {
2564
+ function T(e, t, n = "") {
2565
2565
  return t != null && t !== "" ? e + t + n : "";
2566
2566
  }
2567
2567
  function K(e) {
2568
- return v(" ", e.replace(/\n/g, `
2568
+ return T(" ", e.replace(/\n/g, `
2569
2569
  `));
2570
2570
  }
2571
2571
  function Ie(e) {
@@ -2574,16 +2574,16 @@ function Ie(e) {
2574
2574
  `))) !== null && t !== void 0 ? t : !1;
2575
2575
  }
2576
2576
  const Oe = (e) => {
2577
- var r, i;
2577
+ var i, r;
2578
2578
  let t;
2579
2579
  const n = e.definitions.filter((s) => s.kind === "OperationDefinition");
2580
- return n.length === 1 && (t = (i = (r = n[0]) == null ? void 0 : r.name) == null ? void 0 : i.value), t;
2580
+ return n.length === 1 && (t = (r = (i = n[0]) == null ? void 0 : i.name) == null ? void 0 : r.value), t;
2581
2581
  }, le = (e) => {
2582
2582
  if (typeof e == "string") {
2583
2583
  let n;
2584
2584
  try {
2585
- const r = Ue(e);
2586
- n = Oe(r);
2585
+ const i = Me(e);
2586
+ n = Oe(i);
2587
2587
  } catch {
2588
2588
  }
2589
2589
  return { query: e, operationName: n };
@@ -2593,15 +2593,15 @@ const Oe = (e) => {
2593
2593
  };
2594
2594
  class H extends Error {
2595
2595
  constructor(t, n) {
2596
- const r = `${H.extractMessage(t)}: ${JSON.stringify({
2596
+ const i = `${H.extractMessage(t)}: ${JSON.stringify({
2597
2597
  response: t,
2598
2598
  request: n
2599
2599
  })}`;
2600
- super(r), Object.setPrototypeOf(this, H.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, H);
2600
+ super(i), Object.setPrototypeOf(this, H.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, H);
2601
2601
  }
2602
2602
  static extractMessage(t) {
2603
- var n, r;
2604
- return ((r = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : r.message) ?? `GraphQL Error (Code: ${t.status})`;
2603
+ var n, i;
2604
+ return ((i = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : i.message) ?? `GraphQL Error (Code: ${t.status})`;
2605
2605
  }
2606
2606
  }
2607
2607
  var qt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -2610,14 +2610,14 @@ function Vt(e) {
2610
2610
  }
2611
2611
  var ye = { exports: {} };
2612
2612
  (function(e, t) {
2613
- var n = typeof self < "u" ? self : qt, r = function() {
2613
+ var n = typeof self < "u" ? self : qt, i = function() {
2614
2614
  function s() {
2615
2615
  this.fetch = !1, this.DOMException = n.DOMException;
2616
2616
  }
2617
2617
  return s.prototype = n, new s();
2618
2618
  }();
2619
2619
  (function(s) {
2620
- (function(a) {
2620
+ (function(o) {
2621
2621
  var u = {
2622
2622
  searchParams: "URLSearchParams" in s,
2623
2623
  iterable: "Symbol" in s && "iterator" in Symbol,
@@ -2631,11 +2631,11 @@ var ye = { exports: {} };
2631
2631
  formData: "FormData" in s,
2632
2632
  arrayBuffer: "ArrayBuffer" in s
2633
2633
  };
2634
- function p(o) {
2635
- return o && DataView.prototype.isPrototypeOf(o);
2634
+ function h(a) {
2635
+ return a && DataView.prototype.isPrototypeOf(a);
2636
2636
  }
2637
2637
  if (u.arrayBuffer)
2638
- var d = [
2638
+ var p = [
2639
2639
  "[object Int8Array]",
2640
2640
  "[object Uint8Array]",
2641
2641
  "[object Uint8ClampedArray]",
@@ -2645,108 +2645,108 @@ var ye = { exports: {} };
2645
2645
  "[object Uint32Array]",
2646
2646
  "[object Float32Array]",
2647
2647
  "[object Float64Array]"
2648
- ], m = ArrayBuffer.isView || function(o) {
2649
- return o && d.indexOf(Object.prototype.toString.call(o)) > -1;
2648
+ ], m = ArrayBuffer.isView || function(a) {
2649
+ return a && p.indexOf(Object.prototype.toString.call(a)) > -1;
2650
2650
  };
2651
- function E(o) {
2652
- if (typeof o != "string" && (o = String(o)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(o))
2651
+ function E(a) {
2652
+ if (typeof a != "string" && (a = String(a)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(a))
2653
2653
  throw new TypeError("Invalid character in header field name");
2654
- return o.toLowerCase();
2654
+ return a.toLowerCase();
2655
2655
  }
2656
- function g(o) {
2657
- return typeof o != "string" && (o = String(o)), o;
2656
+ function g(a) {
2657
+ return typeof a != "string" && (a = String(a)), a;
2658
2658
  }
2659
- function N(o) {
2659
+ function A(a) {
2660
2660
  var l = {
2661
2661
  next: function() {
2662
- var T = o.shift();
2663
- return { done: T === void 0, value: T };
2662
+ var v = a.shift();
2663
+ return { done: v === void 0, value: v };
2664
2664
  }
2665
2665
  };
2666
2666
  return u.iterable && (l[Symbol.iterator] = function() {
2667
2667
  return l;
2668
2668
  }), l;
2669
2669
  }
2670
- function y(o) {
2671
- this.map = {}, o instanceof y ? o.forEach(function(l, T) {
2672
- this.append(T, l);
2673
- }, this) : Array.isArray(o) ? o.forEach(function(l) {
2670
+ function y(a) {
2671
+ this.map = {}, a instanceof y ? a.forEach(function(l, v) {
2672
+ this.append(v, l);
2673
+ }, this) : Array.isArray(a) ? a.forEach(function(l) {
2674
2674
  this.append(l[0], l[1]);
2675
- }, this) : o && Object.getOwnPropertyNames(o).forEach(function(l) {
2676
- this.append(l, o[l]);
2675
+ }, this) : a && Object.getOwnPropertyNames(a).forEach(function(l) {
2676
+ this.append(l, a[l]);
2677
2677
  }, this);
2678
2678
  }
2679
- y.prototype.append = function(o, l) {
2680
- o = E(o), l = g(l);
2681
- var T = this.map[o];
2682
- this.map[o] = T ? T + ", " + l : l;
2683
- }, y.prototype.delete = function(o) {
2684
- delete this.map[E(o)];
2685
- }, y.prototype.get = function(o) {
2686
- return o = E(o), this.has(o) ? this.map[o] : null;
2687
- }, y.prototype.has = function(o) {
2688
- return this.map.hasOwnProperty(E(o));
2689
- }, y.prototype.set = function(o, l) {
2690
- this.map[E(o)] = g(l);
2691
- }, y.prototype.forEach = function(o, l) {
2692
- for (var T in this.map)
2693
- this.map.hasOwnProperty(T) && o.call(l, this.map[T], T, this);
2679
+ y.prototype.append = function(a, l) {
2680
+ a = E(a), l = g(l);
2681
+ var v = this.map[a];
2682
+ this.map[a] = v ? v + ", " + l : l;
2683
+ }, y.prototype.delete = function(a) {
2684
+ delete this.map[E(a)];
2685
+ }, y.prototype.get = function(a) {
2686
+ return a = E(a), this.has(a) ? this.map[a] : null;
2687
+ }, y.prototype.has = function(a) {
2688
+ return this.map.hasOwnProperty(E(a));
2689
+ }, y.prototype.set = function(a, l) {
2690
+ this.map[E(a)] = g(l);
2691
+ }, y.prototype.forEach = function(a, l) {
2692
+ for (var v in this.map)
2693
+ this.map.hasOwnProperty(v) && a.call(l, this.map[v], v, this);
2694
2694
  }, y.prototype.keys = function() {
2695
- var o = [];
2696
- return this.forEach(function(l, T) {
2697
- o.push(T);
2698
- }), N(o);
2695
+ var a = [];
2696
+ return this.forEach(function(l, v) {
2697
+ a.push(v);
2698
+ }), A(a);
2699
2699
  }, y.prototype.values = function() {
2700
- var o = [];
2700
+ var a = [];
2701
2701
  return this.forEach(function(l) {
2702
- o.push(l);
2703
- }), N(o);
2702
+ a.push(l);
2703
+ }), A(a);
2704
2704
  }, y.prototype.entries = function() {
2705
- var o = [];
2706
- return this.forEach(function(l, T) {
2707
- o.push([T, l]);
2708
- }), N(o);
2705
+ var a = [];
2706
+ return this.forEach(function(l, v) {
2707
+ a.push([v, l]);
2708
+ }), A(a);
2709
2709
  }, u.iterable && (y.prototype[Symbol.iterator] = y.prototype.entries);
2710
- function C(o) {
2711
- if (o.bodyUsed)
2710
+ function N(a) {
2711
+ if (a.bodyUsed)
2712
2712
  return Promise.reject(new TypeError("Already read"));
2713
- o.bodyUsed = !0;
2713
+ a.bodyUsed = !0;
2714
2714
  }
2715
- function D(o) {
2716
- return new Promise(function(l, T) {
2717
- o.onload = function() {
2718
- l(o.result);
2719
- }, o.onerror = function() {
2720
- T(o.error);
2715
+ function D(a) {
2716
+ return new Promise(function(l, v) {
2717
+ a.onload = function() {
2718
+ l(a.result);
2719
+ }, a.onerror = function() {
2720
+ v(a.error);
2721
2721
  };
2722
2722
  });
2723
2723
  }
2724
- function _(o) {
2725
- var l = new FileReader(), T = D(l);
2726
- return l.readAsArrayBuffer(o), T;
2724
+ function _(a) {
2725
+ var l = new FileReader(), v = D(l);
2726
+ return l.readAsArrayBuffer(a), v;
2727
2727
  }
2728
- function z(o) {
2729
- var l = new FileReader(), T = D(l);
2730
- return l.readAsText(o), T;
2728
+ function z(a) {
2729
+ var l = new FileReader(), v = D(l);
2730
+ return l.readAsText(a), v;
2731
2731
  }
2732
- function S(o) {
2733
- for (var l = new Uint8Array(o), T = new Array(l.length), O = 0; O < l.length; O++)
2734
- T[O] = String.fromCharCode(l[O]);
2735
- return T.join("");
2732
+ function S(a) {
2733
+ for (var l = new Uint8Array(a), v = new Array(l.length), O = 0; O < l.length; O++)
2734
+ v[O] = String.fromCharCode(l[O]);
2735
+ return v.join("");
2736
2736
  }
2737
- function k(o) {
2738
- if (o.slice)
2739
- return o.slice(0);
2740
- var l = new Uint8Array(o.byteLength);
2741
- return l.set(new Uint8Array(o)), l.buffer;
2737
+ function k(a) {
2738
+ if (a.slice)
2739
+ return a.slice(0);
2740
+ var l = new Uint8Array(a.byteLength);
2741
+ return l.set(new Uint8Array(a)), l.buffer;
2742
2742
  }
2743
2743
  function B() {
2744
- return this.bodyUsed = !1, this._initBody = function(o) {
2745
- this._bodyInit = o, o ? typeof o == "string" ? this._bodyText = o : u.blob && Blob.prototype.isPrototypeOf(o) ? this._bodyBlob = o : u.formData && FormData.prototype.isPrototypeOf(o) ? this._bodyFormData = o : u.searchParams && URLSearchParams.prototype.isPrototypeOf(o) ? this._bodyText = o.toString() : u.arrayBuffer && u.blob && p(o) ? (this._bodyArrayBuffer = k(o.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : u.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(o) || m(o)) ? this._bodyArrayBuffer = k(o) : this._bodyText = o = Object.prototype.toString.call(o) : this._bodyText = "", this.headers.get("content-type") || (typeof o == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : u.searchParams && URLSearchParams.prototype.isPrototypeOf(o) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
2744
+ return this.bodyUsed = !1, this._initBody = function(a) {
2745
+ this._bodyInit = a, a ? typeof a == "string" ? this._bodyText = a : u.blob && Blob.prototype.isPrototypeOf(a) ? this._bodyBlob = a : u.formData && FormData.prototype.isPrototypeOf(a) ? this._bodyFormData = a : u.searchParams && URLSearchParams.prototype.isPrototypeOf(a) ? this._bodyText = a.toString() : u.arrayBuffer && u.blob && h(a) ? (this._bodyArrayBuffer = k(a.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : u.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(a) || m(a)) ? this._bodyArrayBuffer = k(a) : this._bodyText = a = Object.prototype.toString.call(a) : this._bodyText = "", this.headers.get("content-type") || (typeof a == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : u.searchParams && URLSearchParams.prototype.isPrototypeOf(a) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
2746
2746
  }, u.blob && (this.blob = function() {
2747
- var o = C(this);
2748
- if (o)
2749
- return o;
2747
+ var a = N(this);
2748
+ if (a)
2749
+ return a;
2750
2750
  if (this._bodyBlob)
2751
2751
  return Promise.resolve(this._bodyBlob);
2752
2752
  if (this._bodyArrayBuffer)
@@ -2755,11 +2755,11 @@ var ye = { exports: {} };
2755
2755
  throw new Error("could not read FormData body as blob");
2756
2756
  return Promise.resolve(new Blob([this._bodyText]));
2757
2757
  }, this.arrayBuffer = function() {
2758
- return this._bodyArrayBuffer ? C(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(_);
2758
+ return this._bodyArrayBuffer ? N(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(_);
2759
2759
  }), this.text = function() {
2760
- var o = C(this);
2761
- if (o)
2762
- return o;
2760
+ var a = N(this);
2761
+ if (a)
2762
+ return a;
2763
2763
  if (this._bodyBlob)
2764
2764
  return z(this._bodyBlob);
2765
2765
  if (this._bodyArrayBuffer)
@@ -2774,48 +2774,48 @@ var ye = { exports: {} };
2774
2774
  }, this;
2775
2775
  }
2776
2776
  var Q = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
2777
- function J(o) {
2778
- var l = o.toUpperCase();
2779
- return Q.indexOf(l) > -1 ? l : o;
2777
+ function J(a) {
2778
+ var l = a.toUpperCase();
2779
+ return Q.indexOf(l) > -1 ? l : a;
2780
2780
  }
2781
- function L(o, l) {
2781
+ function L(a, l) {
2782
2782
  l = l || {};
2783
- var T = l.body;
2784
- if (o instanceof L) {
2785
- if (o.bodyUsed)
2783
+ var v = l.body;
2784
+ if (a instanceof L) {
2785
+ if (a.bodyUsed)
2786
2786
  throw new TypeError("Already read");
2787
- this.url = o.url, this.credentials = o.credentials, l.headers || (this.headers = new y(o.headers)), this.method = o.method, this.mode = o.mode, this.signal = o.signal, !T && o._bodyInit != null && (T = o._bodyInit, o.bodyUsed = !0);
2787
+ this.url = a.url, this.credentials = a.credentials, l.headers || (this.headers = new y(a.headers)), this.method = a.method, this.mode = a.mode, this.signal = a.signal, !v && a._bodyInit != null && (v = a._bodyInit, a.bodyUsed = !0);
2788
2788
  } else
2789
- this.url = String(o);
2790
- if (this.credentials = l.credentials || this.credentials || "same-origin", (l.headers || !this.headers) && (this.headers = new y(l.headers)), this.method = J(l.method || this.method || "GET"), this.mode = l.mode || this.mode || null, this.signal = l.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && T)
2789
+ this.url = String(a);
2790
+ if (this.credentials = l.credentials || this.credentials || "same-origin", (l.headers || !this.headers) && (this.headers = new y(l.headers)), this.method = J(l.method || this.method || "GET"), this.mode = l.mode || this.mode || null, this.signal = l.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && v)
2791
2791
  throw new TypeError("Body not allowed for GET or HEAD requests");
2792
- this._initBody(T);
2792
+ this._initBody(v);
2793
2793
  }
2794
2794
  L.prototype.clone = function() {
2795
2795
  return new L(this, { body: this._bodyInit });
2796
2796
  };
2797
- function je(o) {
2797
+ function je(a) {
2798
2798
  var l = new FormData();
2799
- return o.trim().split("&").forEach(function(T) {
2800
- if (T) {
2801
- var O = T.split("="), I = O.shift().replace(/\+/g, " "), A = O.join("=").replace(/\+/g, " ");
2802
- l.append(decodeURIComponent(I), decodeURIComponent(A));
2799
+ return a.trim().split("&").forEach(function(v) {
2800
+ if (v) {
2801
+ var O = v.split("="), I = O.shift().replace(/\+/g, " "), C = O.join("=").replace(/\+/g, " ");
2802
+ l.append(decodeURIComponent(I), decodeURIComponent(C));
2803
2803
  }
2804
2804
  }), l;
2805
2805
  }
2806
- function $e(o) {
2807
- var l = new y(), T = o.replace(/\r?\n[\t ]+/g, " ");
2808
- return T.split(/\r?\n/).forEach(function(O) {
2809
- var I = O.split(":"), A = I.shift().trim();
2810
- if (A) {
2806
+ function $e(a) {
2807
+ var l = new y(), v = a.replace(/\r?\n[\t ]+/g, " ");
2808
+ return v.split(/\r?\n/).forEach(function(O) {
2809
+ var I = O.split(":"), C = I.shift().trim();
2810
+ if (C) {
2811
2811
  var X = I.join(":").trim();
2812
- l.append(A, X);
2812
+ l.append(C, X);
2813
2813
  }
2814
2814
  }), l;
2815
2815
  }
2816
2816
  B.call(L.prototype);
2817
- function w(o, l) {
2818
- l || (l = {}), this.type = "default", this.status = l.status === void 0 ? 200 : l.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in l ? l.statusText : "OK", this.headers = new y(l.headers), this.url = l.url || "", this._initBody(o);
2817
+ function w(a, l) {
2818
+ l || (l = {}), this.type = "default", this.status = l.status === void 0 ? 200 : l.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in l ? l.statusText : "OK", this.headers = new y(l.headers), this.url = l.url || "", this._initBody(a);
2819
2819
  }
2820
2820
  B.call(w.prototype), w.prototype.clone = function() {
2821
2821
  return new w(this._bodyInit, {
@@ -2825,122 +2825,122 @@ var ye = { exports: {} };
2825
2825
  url: this.url
2826
2826
  });
2827
2827
  }, w.error = function() {
2828
- var o = new w(null, { status: 0, statusText: "" });
2829
- return o.type = "error", o;
2828
+ var a = new w(null, { status: 0, statusText: "" });
2829
+ return a.type = "error", a;
2830
2830
  };
2831
2831
  var Ge = [301, 302, 303, 307, 308];
2832
- w.redirect = function(o, l) {
2832
+ w.redirect = function(a, l) {
2833
2833
  if (Ge.indexOf(l) === -1)
2834
2834
  throw new RangeError("Invalid status code");
2835
- return new w(null, { status: l, headers: { location: o } });
2836
- }, a.DOMException = s.DOMException;
2835
+ return new w(null, { status: l, headers: { location: a } });
2836
+ }, o.DOMException = s.DOMException;
2837
2837
  try {
2838
- new a.DOMException();
2838
+ new o.DOMException();
2839
2839
  } catch {
2840
- a.DOMException = function(l, T) {
2841
- this.message = l, this.name = T;
2840
+ o.DOMException = function(l, v) {
2841
+ this.message = l, this.name = v;
2842
2842
  var O = Error(l);
2843
2843
  this.stack = O.stack;
2844
- }, a.DOMException.prototype = Object.create(Error.prototype), a.DOMException.prototype.constructor = a.DOMException;
2844
+ }, o.DOMException.prototype = Object.create(Error.prototype), o.DOMException.prototype.constructor = o.DOMException;
2845
2845
  }
2846
- function ae(o, l) {
2847
- return new Promise(function(T, O) {
2848
- var I = new L(o, l);
2846
+ function ae(a, l) {
2847
+ return new Promise(function(v, O) {
2848
+ var I = new L(a, l);
2849
2849
  if (I.signal && I.signal.aborted)
2850
- return O(new a.DOMException("Aborted", "AbortError"));
2851
- var A = new XMLHttpRequest();
2850
+ return O(new o.DOMException("Aborted", "AbortError"));
2851
+ var C = new XMLHttpRequest();
2852
2852
  function X() {
2853
- A.abort();
2853
+ C.abort();
2854
2854
  }
2855
- A.onload = function() {
2855
+ C.onload = function() {
2856
2856
  var j = {
2857
- status: A.status,
2858
- statusText: A.statusText,
2859
- headers: $e(A.getAllResponseHeaders() || "")
2857
+ status: C.status,
2858
+ statusText: C.statusText,
2859
+ headers: $e(C.getAllResponseHeaders() || "")
2860
2860
  };
2861
- j.url = "responseURL" in A ? A.responseURL : j.headers.get("X-Request-URL");
2862
- var ce = "response" in A ? A.response : A.responseText;
2863
- T(new w(ce, j));
2864
- }, A.onerror = function() {
2861
+ j.url = "responseURL" in C ? C.responseURL : j.headers.get("X-Request-URL");
2862
+ var ce = "response" in C ? C.response : C.responseText;
2863
+ v(new w(ce, j));
2864
+ }, C.onerror = function() {
2865
2865
  O(new TypeError("Network request failed"));
2866
- }, A.ontimeout = function() {
2866
+ }, C.ontimeout = function() {
2867
2867
  O(new TypeError("Network request failed"));
2868
- }, A.onabort = function() {
2869
- O(new a.DOMException("Aborted", "AbortError"));
2870
- }, A.open(I.method, I.url, !0), I.credentials === "include" ? A.withCredentials = !0 : I.credentials === "omit" && (A.withCredentials = !1), "responseType" in A && u.blob && (A.responseType = "blob"), I.headers.forEach(function(j, ce) {
2871
- A.setRequestHeader(ce, j);
2872
- }), I.signal && (I.signal.addEventListener("abort", X), A.onreadystatechange = function() {
2873
- A.readyState === 4 && I.signal.removeEventListener("abort", X);
2874
- }), A.send(typeof I._bodyInit > "u" ? null : I._bodyInit);
2868
+ }, C.onabort = function() {
2869
+ O(new o.DOMException("Aborted", "AbortError"));
2870
+ }, C.open(I.method, I.url, !0), I.credentials === "include" ? C.withCredentials = !0 : I.credentials === "omit" && (C.withCredentials = !1), "responseType" in C && u.blob && (C.responseType = "blob"), I.headers.forEach(function(j, ce) {
2871
+ C.setRequestHeader(ce, j);
2872
+ }), I.signal && (I.signal.addEventListener("abort", X), C.onreadystatechange = function() {
2873
+ C.readyState === 4 && I.signal.removeEventListener("abort", X);
2874
+ }), C.send(typeof I._bodyInit > "u" ? null : I._bodyInit);
2875
2875
  });
2876
2876
  }
2877
- return ae.polyfill = !0, s.fetch || (s.fetch = ae, s.Headers = y, s.Request = L, s.Response = w), a.Headers = y, a.Request = L, a.Response = w, a.fetch = ae, Object.defineProperty(a, "__esModule", { value: !0 }), a;
2877
+ return ae.polyfill = !0, s.fetch || (s.fetch = ae, s.Headers = y, s.Request = L, s.Response = w), o.Headers = y, o.Request = L, o.Response = w, o.fetch = ae, Object.defineProperty(o, "__esModule", { value: !0 }), o;
2878
2878
  })({});
2879
- })(r), r.fetch.ponyfill = !0, delete r.fetch.polyfill;
2880
- var i = r;
2881
- t = i.fetch, t.default = i.fetch, t.fetch = i.fetch, t.Headers = i.Headers, t.Request = i.Request, t.Response = i.Response, e.exports = t;
2879
+ })(i), i.fetch.ponyfill = !0, delete i.fetch.polyfill;
2880
+ var r = i;
2881
+ t = r.fetch, t.default = r.fetch, t.fetch = r.fetch, t.Headers = r.Headers, t.Request = r.Request, t.Response = r.Response, e.exports = t;
2882
2882
  })(ye, ye.exports);
2883
2883
  var ne = ye.exports;
2884
2884
  const ee = /* @__PURE__ */ Vt(ne), jt = /* @__PURE__ */ ze({
2885
2885
  __proto__: null,
2886
2886
  default: ee
2887
- }, [ne]), U = (e) => {
2887
+ }, [ne]), M = (e) => {
2888
2888
  let t = {};
2889
- return e && (typeof Headers < "u" && e instanceof Headers || jt && ne.Headers && e instanceof ne.Headers ? t = Je(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
2890
- n && r !== void 0 && (t[n] = r);
2889
+ return e && (typeof Headers < "u" && e instanceof Headers || jt && ne.Headers && e instanceof ne.Headers ? t = Je(e) : Array.isArray(e) ? e.forEach(([n, i]) => {
2890
+ n && i !== void 0 && (t[n] = i);
2891
2891
  }) : t = e), t;
2892
2892
  }, De = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), $t = (e) => {
2893
2893
  if (!Array.isArray(e.query)) {
2894
- const r = e, i = [`query=${encodeURIComponent(De(r.query))}`];
2895
- return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.join("&");
2894
+ const i = e, r = [`query=${encodeURIComponent(De(i.query))}`];
2895
+ return e.variables && r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`), i.operationName && r.push(`operationName=${encodeURIComponent(i.operationName)}`), r.join("&");
2896
2896
  }
2897
2897
  if (typeof e.variables < "u" && !Array.isArray(e.variables))
2898
2898
  throw new Error("Cannot create query with given variable type, array expected");
2899
- const t = e, n = e.query.reduce((r, i, s) => (r.push({
2900
- query: De(i),
2899
+ const t = e, n = e.query.reduce((i, r, s) => (i.push({
2900
+ query: De(r),
2901
2901
  variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0
2902
- }), r), []);
2902
+ }), i), []);
2903
2903
  return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
2904
2904
  }, Gt = (e) => async (t) => {
2905
- const { url: n, query: r, variables: i, operationName: s, fetch: a, fetchOptions: u, middleware: p } = t, d = { ...t.headers };
2905
+ const { url: n, query: i, variables: r, operationName: s, fetch: o, fetchOptions: u, middleware: h } = t, p = { ...t.headers };
2906
2906
  let m = "", E;
2907
- e === "POST" ? (E = Yt(r, i, s, u.jsonSerializer), typeof E == "string" && (d["Content-Type"] = "application/json")) : m = $t({
2908
- query: r,
2909
- variables: i,
2907
+ e === "POST" ? (E = Yt(i, r, s, u.jsonSerializer), typeof E == "string" && (p["Content-Type"] = "application/json")) : m = $t({
2908
+ query: i,
2909
+ variables: r,
2910
2910
  operationName: s,
2911
2911
  jsonSerializer: u.jsonSerializer ?? ge
2912
2912
  });
2913
2913
  const g = {
2914
2914
  method: e,
2915
- headers: d,
2915
+ headers: p,
2916
2916
  body: E,
2917
2917
  ...u
2918
2918
  };
2919
- let N = n, y = g;
2920
- if (p) {
2921
- const C = await Promise.resolve(p({ ...g, url: n, operationName: s, variables: i })), { url: D, ..._ } = C;
2922
- N = D, y = _;
2919
+ let A = n, y = g;
2920
+ if (h) {
2921
+ const N = await Promise.resolve(h({ ...g, url: n, operationName: s, variables: r })), { url: D, ..._ } = N;
2922
+ A = D, y = _;
2923
2923
  }
2924
- return m && (N = `${N}?${m}`), await a(N, y);
2924
+ return m && (A = `${A}?${m}`), await o(A, y);
2925
2925
  };
2926
2926
  class Ht {
2927
2927
  constructor(t, n = {}) {
2928
- this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => {
2929
- const [i, s, a] = r, u = We(i, s, a), { headers: p, fetch: d = ee, method: m = "POST", requestMiddleware: E, responseMiddleware: g, ...N } = this.requestConfig, { url: y } = this;
2930
- u.signal !== void 0 && (N.signal = u.signal);
2931
- const { operationName: C } = le(u.query);
2932
- return he({
2928
+ this.url = t, this.requestConfig = n, this.rawRequest = async (...i) => {
2929
+ const [r, s, o] = i, u = We(r, s, o), { headers: h, fetch: p = ee, method: m = "POST", requestMiddleware: E, responseMiddleware: g, ...A } = this.requestConfig, { url: y } = this;
2930
+ u.signal !== void 0 && (A.signal = u.signal);
2931
+ const { operationName: N } = le(u.query);
2932
+ return de({
2933
2933
  url: y,
2934
2934
  query: u.query,
2935
2935
  variables: u.variables,
2936
2936
  headers: {
2937
- ...U(pe(p)),
2938
- ...U(u.requestHeaders)
2937
+ ...M(he(h)),
2938
+ ...M(u.requestHeaders)
2939
2939
  },
2940
- operationName: C,
2941
- fetch: d,
2940
+ operationName: N,
2941
+ fetch: p,
2942
2942
  method: m,
2943
- fetchOptions: N,
2943
+ fetchOptions: A,
2944
2944
  middleware: E
2945
2945
  }).then((D) => (g && g(D), D)).catch((D) => {
2946
2946
  throw g && g(D), D;
@@ -2948,47 +2948,47 @@ class Ht {
2948
2948
  };
2949
2949
  }
2950
2950
  async request(t, ...n) {
2951
- const [r, i] = n, s = Xe(t, r, i), { headers: a, fetch: u = ee, method: p = "POST", requestMiddleware: d, responseMiddleware: m, ...E } = this.requestConfig, { url: g } = this;
2951
+ const [i, r] = n, s = Xe(t, i, r), { headers: o, fetch: u = ee, method: h = "POST", requestMiddleware: p, responseMiddleware: m, ...E } = this.requestConfig, { url: g } = this;
2952
2952
  s.signal !== void 0 && (E.signal = s.signal);
2953
- const { query: N, operationName: y } = le(s.document);
2954
- return he({
2953
+ const { query: A, operationName: y } = le(s.document);
2954
+ return de({
2955
2955
  url: g,
2956
- query: N,
2956
+ query: A,
2957
2957
  variables: s.variables,
2958
2958
  headers: {
2959
- ...U(pe(a)),
2960
- ...U(s.requestHeaders)
2959
+ ...M(he(o)),
2960
+ ...M(s.requestHeaders)
2961
2961
  },
2962
2962
  operationName: y,
2963
2963
  fetch: u,
2964
- method: p,
2964
+ method: h,
2965
2965
  fetchOptions: E,
2966
- middleware: d
2967
- }).then((C) => (m && m(C), C.data)).catch((C) => {
2968
- throw m && m(C), C;
2966
+ middleware: p
2967
+ }).then((N) => (m && m(N), N.data)).catch((N) => {
2968
+ throw m && m(N), N;
2969
2969
  });
2970
2970
  }
2971
2971
  // prettier-ignore
2972
2972
  batchRequests(t, n) {
2973
- const r = Ze(t, n), { headers: i, ...s } = this.requestConfig;
2974
- r.signal !== void 0 && (s.signal = r.signal);
2975
- const a = r.documents.map(({ document: p }) => le(p).query), u = r.documents.map(({ variables: p }) => p);
2976
- return he({
2973
+ const i = Ze(t, n), { headers: r, ...s } = this.requestConfig;
2974
+ i.signal !== void 0 && (s.signal = i.signal);
2975
+ const o = i.documents.map(({ document: h }) => le(h).query), u = i.documents.map(({ variables: h }) => h);
2976
+ return de({
2977
2977
  url: this.url,
2978
- query: a,
2978
+ query: o,
2979
2979
  // @ts-expect-error TODO reconcile batch variables into system.
2980
2980
  variables: u,
2981
2981
  headers: {
2982
- ...U(pe(i)),
2983
- ...U(r.requestHeaders)
2982
+ ...M(he(r)),
2983
+ ...M(i.requestHeaders)
2984
2984
  },
2985
2985
  operationName: void 0,
2986
2986
  fetch: this.requestConfig.fetch ?? ee,
2987
2987
  method: this.requestConfig.method || "POST",
2988
2988
  fetchOptions: s,
2989
2989
  middleware: this.requestConfig.requestMiddleware
2990
- }).then((p) => (this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(p), p.data)).catch((p) => {
2991
- throw this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(p), p;
2990
+ }).then((h) => (this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(h), h.data)).catch((h) => {
2991
+ throw this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(h), h;
2992
2992
  });
2993
2993
  }
2994
2994
  setHeaders(t) {
@@ -2998,8 +2998,8 @@ class Ht {
2998
2998
  * Attach a header to the client. All subsequent requests will have this header.
2999
2999
  */
3000
3000
  setHeader(t, n) {
3001
- const { headers: r } = this.requestConfig;
3002
- return r ? r[t] = n : this.requestConfig.headers = { [t]: n }, this;
3001
+ const { headers: i } = this.requestConfig;
3002
+ return i ? i[t] = n : this.requestConfig.headers = { [t]: n }, this;
3003
3003
  }
3004
3004
  /**
3005
3005
  * Change the client endpoint. All subsequent requests will send to this endpoint.
@@ -3008,14 +3008,14 @@ class Ht {
3008
3008
  return this.url = t, this;
3009
3009
  }
3010
3010
  }
3011
- const he = async (e) => {
3012
- const { query: t, variables: n, fetchOptions: r } = e, i = Gt(Qe(e.method ?? "post")), s = Array.isArray(e.query), a = await i(e), u = await zt(a, r.jsonSerializer ?? ge), p = Array.isArray(u) ? !u.some(({ data: m }) => !m) : !!u.data, d = Array.isArray(u) || !u.errors || Array.isArray(u.errors) && !u.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
3013
- if (a.ok && d && p) {
3014
- const { errors: m, ...E } = (Array.isArray(u), u), g = r.errorPolicy === "ignore" ? E : u;
3011
+ const de = async (e) => {
3012
+ const { query: t, variables: n, fetchOptions: i } = e, r = Gt(Qe(e.method ?? "post")), s = Array.isArray(e.query), o = await r(e), u = await zt(o, i.jsonSerializer ?? ge), h = Array.isArray(u) ? !u.some(({ data: m }) => !m) : !!u.data, p = Array.isArray(u) || !u.errors || Array.isArray(u.errors) && !u.errors.length || i.errorPolicy === "all" || i.errorPolicy === "ignore";
3013
+ if (o.ok && p && h) {
3014
+ const { errors: m, ...E } = (Array.isArray(u), u), g = i.errorPolicy === "ignore" ? E : u;
3015
3015
  return {
3016
3016
  ...s ? { data: g } : g,
3017
- headers: a.headers,
3018
- status: a.status
3017
+ headers: o.headers,
3018
+ status: o.status
3019
3019
  };
3020
3020
  } else {
3021
3021
  const m = typeof u == "string" ? {
@@ -3023,35 +3023,35 @@ const he = async (e) => {
3023
3023
  } : u;
3024
3024
  throw new H(
3025
3025
  // @ts-expect-error TODO
3026
- { ...m, status: a.status, headers: a.headers },
3026
+ { ...m, status: o.status, headers: o.headers },
3027
3027
  { query: t, variables: n }
3028
3028
  );
3029
3029
  }
3030
- }, Yt = (e, t, n, r) => {
3031
- const i = r ?? ge;
3030
+ }, Yt = (e, t, n, i) => {
3031
+ const r = i ?? ge;
3032
3032
  if (!Array.isArray(e))
3033
- return i.stringify({ query: e, variables: t, operationName: n });
3033
+ return r.stringify({ query: e, variables: t, operationName: n });
3034
3034
  if (typeof t < "u" && !Array.isArray(t))
3035
3035
  throw new Error("Cannot create request body with given variable type, array expected");
3036
- const s = e.reduce((a, u, p) => (a.push({ query: u, variables: t ? t[p] : void 0 }), a), []);
3037
- return i.stringify(s);
3036
+ const s = e.reduce((o, u, h) => (o.push({ query: u, variables: t ? t[h] : void 0 }), o), []);
3037
+ return r.stringify(s);
3038
3038
  }, zt = async (e, t) => {
3039
3039
  let n;
3040
- return e.headers.forEach((r, i) => {
3041
- i.toLowerCase() === "content-type" && (n = r);
3040
+ return e.headers.forEach((i, r) => {
3041
+ r.toLowerCase() === "content-type" && (n = i);
3042
3042
  }), n && (n.toLowerCase().startsWith("application/json") || n.toLowerCase().startsWith("application/graphql+json") || n.toLowerCase().startsWith("application/graphql-response+json")) ? t.parse(await e.text()) : e.text();
3043
- }, pe = (e) => typeof e == "function" ? e() : e;
3044
- var ie = function() {
3045
- return ie = Object.assign || function(t) {
3046
- for (var n, r = 1, i = arguments.length; r < i; r++) {
3047
- n = arguments[r];
3043
+ }, he = (e) => typeof e == "function" ? e() : e;
3044
+ var re = function() {
3045
+ return re = Object.assign || function(t) {
3046
+ for (var n, i = 1, r = arguments.length; i < r; i++) {
3047
+ n = arguments[i];
3048
3048
  for (var s in n)
3049
3049
  Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
3050
3050
  }
3051
3051
  return t;
3052
- }, ie.apply(this, arguments);
3052
+ }, re.apply(this, arguments);
3053
3053
  };
3054
- var te = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Map(), qe = !0, re = !1;
3054
+ var te = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Map(), qe = !0, ie = !1;
3055
3055
  function Ve(e) {
3056
3056
  return e.replace(/[\s,]+/g, " ").trim();
3057
3057
  }
@@ -3060,21 +3060,21 @@ function Qt(e) {
3060
3060
  }
3061
3061
  function Jt(e) {
3062
3062
  var t = /* @__PURE__ */ new Set(), n = [];
3063
- return e.definitions.forEach(function(r) {
3064
- if (r.kind === "FragmentDefinition") {
3065
- var i = r.name.value, s = Qt(r.loc), a = Ee.get(i);
3066
- a && !a.has(s) ? qe && console.warn("Warning: fragment with name " + i + ` already exists.
3063
+ return e.definitions.forEach(function(i) {
3064
+ if (i.kind === "FragmentDefinition") {
3065
+ var r = i.name.value, s = Qt(i.loc), o = Ee.get(r);
3066
+ o && !o.has(s) ? qe && console.warn("Warning: fragment with name " + r + ` already exists.
3067
3067
  graphql-tag enforces all fragment names across your application to be unique; read more about
3068
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : a || Ee.set(i, a = /* @__PURE__ */ new Set()), a.add(s), t.has(s) || (t.add(s), n.push(r));
3068
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || Ee.set(r, o = /* @__PURE__ */ new Set()), o.add(s), t.has(s) || (t.add(s), n.push(i));
3069
3069
  } else
3070
- n.push(r);
3071
- }), ie(ie({}, e), { definitions: n });
3070
+ n.push(i);
3071
+ }), re(re({}, e), { definitions: n });
3072
3072
  }
3073
3073
  function Xt(e) {
3074
3074
  var t = new Set(e.definitions);
3075
- t.forEach(function(r) {
3076
- r.loc && delete r.loc, Object.keys(r).forEach(function(i) {
3077
- var s = r[i];
3075
+ t.forEach(function(i) {
3076
+ i.loc && delete i.loc, Object.keys(i).forEach(function(r) {
3077
+ var s = i[r];
3078
3078
  s && typeof s == "object" && t.add(s);
3079
3079
  });
3080
3080
  });
@@ -3084,9 +3084,9 @@ function Xt(e) {
3084
3084
  function Wt(e) {
3085
3085
  var t = Ve(e);
3086
3086
  if (!te.has(t)) {
3087
- var n = Ue(e, {
3088
- experimentalFragmentVariables: re,
3089
- allowLegacyFragmentVariables: re
3087
+ var n = Me(e, {
3088
+ experimentalFragmentVariables: ie,
3089
+ allowLegacyFragmentVariables: ie
3090
3090
  });
3091
3091
  if (!n || n.kind !== "Document")
3092
3092
  throw new Error("Not a valid GraphQL document.");
@@ -3098,10 +3098,10 @@ function q(e) {
3098
3098
  for (var t = [], n = 1; n < arguments.length; n++)
3099
3099
  t[n - 1] = arguments[n];
3100
3100
  typeof e == "string" && (e = [e]);
3101
- var r = e[0];
3102
- return t.forEach(function(i, s) {
3103
- i && i.kind === "Document" ? r += i.loc.source.body : r += i, r += e[s + 1];
3104
- }), Wt(r);
3101
+ var i = e[0];
3102
+ return t.forEach(function(r, s) {
3103
+ r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += e[s + 1];
3104
+ }), Wt(i);
3105
3105
  }
3106
3106
  function Zt() {
3107
3107
  te.clear(), Ee.clear();
@@ -3110,10 +3110,10 @@ function Kt() {
3110
3110
  qe = !1;
3111
3111
  }
3112
3112
  function en() {
3113
- re = !0;
3113
+ ie = !0;
3114
3114
  }
3115
3115
  function tn() {
3116
- re = !1;
3116
+ ie = !1;
3117
3117
  }
3118
3118
  var $ = {
3119
3119
  gql: q,
@@ -3138,6 +3138,20 @@ const P = q, nn = P`
3138
3138
  location {
3139
3139
  id
3140
3140
  name
3141
+ phone
3142
+ address {
3143
+ id
3144
+ countryCode
3145
+ country
3146
+ postalCode
3147
+ provinceCode
3148
+ province
3149
+ city
3150
+ address1
3151
+ address2
3152
+ updatedAt
3153
+ createdAt
3154
+ }
3141
3155
  }
3142
3156
  inventoryQuantity
3143
3157
  }
@@ -3155,6 +3169,20 @@ const P = q, nn = P`
3155
3169
  location {
3156
3170
  id
3157
3171
  name
3172
+ phone
3173
+ address {
3174
+ id
3175
+ countryCode
3176
+ country
3177
+ postalCode
3178
+ provinceCode
3179
+ province
3180
+ city
3181
+ address1
3182
+ address2
3183
+ updatedAt
3184
+ createdAt
3185
+ }
3158
3186
  }
3159
3187
  inventoryQuantity
3160
3188
  }
@@ -3181,6 +3209,20 @@ const P = q, nn = P`
3181
3209
  nodes {
3182
3210
  id
3183
3211
  name
3212
+ phone
3213
+ address {
3214
+ id
3215
+ countryCode
3216
+ country
3217
+ postalCode
3218
+ provinceCode
3219
+ province
3220
+ city
3221
+ address1
3222
+ address2
3223
+ updatedAt
3224
+ createdAt
3225
+ }
3184
3226
  }
3185
3227
  pageInfo {
3186
3228
  startCursor
@@ -3271,46 +3313,57 @@ const P = q, nn = P`
3271
3313
  earnedPoint
3272
3314
  purchasePrice
3273
3315
  }
3316
+ pointMultiplier {
3317
+ id
3318
+ customerRankRule {
3319
+ id
3320
+ name
3321
+ threshold
3322
+ }
3323
+ multiplier
3324
+ }
3274
3325
  }
3275
3326
  }
3276
3327
  }
3277
- `, hn = (e, t, n, r) => e();
3278
- function pn(e, t = hn) {
3328
+ `, dn = (e, t, n, i) => e();
3329
+ function hn(e, t = dn) {
3279
3330
  return {
3280
- GetLocationAvailabilities(n, r) {
3281
- return t((i) => e.request(nn, n, { ...r, ...i }), "GetLocationAvailabilities", "query", n);
3331
+ GetLocationAvailabilities(n, i) {
3332
+ return t((r) => e.request(nn, n, { ...i, ...r }), "GetLocationAvailabilities", "query", n);
3282
3333
  },
3283
- GetLocationAvailability(n, r) {
3284
- return t((i) => e.request(rn, n, { ...r, ...i }), "GetLocationAvailability", "query", n);
3334
+ GetLocationAvailability(n, i) {
3335
+ return t((r) => e.request(rn, n, { ...i, ...r }), "GetLocationAvailability", "query", n);
3285
3336
  },
3286
- GetPurchasingCustomerMetafield(n, r) {
3287
- return t((i) => e.request(sn, n, { ...r, ...i }), "GetPurchasingCustomerMetafield", "query", n);
3337
+ GetPurchasingCustomerMetafield(n, i) {
3338
+ return t((r) => e.request(sn, n, { ...i, ...r }), "GetPurchasingCustomerMetafield", "query", n);
3288
3339
  },
3289
- GetPoints(n, r) {
3290
- return t((i) => e.request(on, n, { ...r, ...i }), "GetPoints", "query", n);
3340
+ GetPoints(n, i) {
3341
+ return t((r) => e.request(on, n, { ...i, ...r }), "GetPoints", "query", n);
3291
3342
  },
3292
- GetLocations(n, r) {
3293
- return t((i) => e.request(an, n, { ...r, ...i }), "GetLocations", "query", n);
3343
+ GetLocations(n, i) {
3344
+ return t((r) => e.request(an, n, { ...i, ...r }), "GetLocations", "query", n);
3294
3345
  },
3295
- GetPurchasingCustomerDiscounts(n, r) {
3296
- return t((i) => e.request(cn, n, { ...r, ...i }), "GetPurchasingCustomerDiscounts", "query", n);
3346
+ GetPurchasingCustomerDiscounts(n, i) {
3347
+ return t((r) => e.request(cn, n, { ...i, ...r }), "GetPurchasingCustomerDiscounts", "query", n);
3297
3348
  },
3298
- GetPurchasingCustomerPointChangeActivities(n, r) {
3299
- return t((i) => e.request(un, n, { ...r, ...i }), "GetPurchasingCustomerPointChangeActivities", "query", n);
3349
+ GetPurchasingCustomerPointChangeActivities(n, i) {
3350
+ return t((r) => e.request(un, n, { ...i, ...r }), "GetPurchasingCustomerPointChangeActivities", "query", n);
3300
3351
  },
3301
- GetPurchasingCustomerRank(n, r) {
3302
- return t((i) => e.request(ln, n, { ...r, ...i }), "GetPurchasingCustomerRank", "query", n);
3352
+ GetPurchasingCustomerRank(n, i) {
3353
+ return t((r) => e.request(ln, n, { ...i, ...r }), "GetPurchasingCustomerRank", "query", n);
3303
3354
  }
3304
3355
  };
3305
3356
  }
3306
3357
  class fn {
3307
3358
  constructor(t) {
3308
- Ae(this, "api");
3309
- this.api = pn(new Ht(`${t}/apps/sq-api`, {
3310
- headers: {
3311
- "X-SQ-CLIENT": "ShopifyAppProxy"
3312
- }
3313
- }));
3359
+ Ce(this, "api");
3360
+ this.api = hn(
3361
+ new Ht(`${t}/apps/sq-api`, {
3362
+ headers: {
3363
+ "X-SQ-CLIENT": "ShopifyAppProxy"
3364
+ }
3365
+ })
3366
+ );
3314
3367
  }
3315
3368
  /**
3316
3369
  * getLocationAvailabilities は渡されたSKUの各ロケーションにおける残り在庫の一覧を返します。
@@ -3320,15 +3373,35 @@ class fn {
3320
3373
  * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
3321
3374
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
3322
3375
  */
3323
- async getLocationAvailabilities(t, n, r, i) {
3324
- const s = await this.api.GetLocationAvailabilities({ sku: t, first: n, after: r, isReverse: i });
3376
+ async getLocationAvailabilities(t, n, i, r) {
3377
+ const s = await this.api.GetLocationAvailabilities({
3378
+ sku: t,
3379
+ first: n,
3380
+ after: i,
3381
+ isReverse: r
3382
+ });
3325
3383
  return {
3326
- nodes: s.locationAvailabilities.nodes.map((a) => ({
3327
- location: {
3328
- name: a.location.name
3329
- },
3330
- inventoryQuantity: a.inventoryQuantity
3331
- })) ?? [],
3384
+ nodes: s.locationAvailabilities.nodes.map(
3385
+ (o) => ({
3386
+ location: {
3387
+ id: o.location.id,
3388
+ name: o.location.name,
3389
+ phone: o.location.phone,
3390
+ address: o.location.address ? {
3391
+ id: o.location.address.id,
3392
+ countryCode: o.location.address.countryCode,
3393
+ country: o.location.address.country,
3394
+ postalCode: o.location.address.postalCode,
3395
+ provinceCode: o.location.address.provinceCode,
3396
+ province: o.location.address.province,
3397
+ city: o.location.address.city,
3398
+ address1: o.location.address.address1,
3399
+ address2: o.location.address.address2
3400
+ } : void 0
3401
+ },
3402
+ inventoryQuantity: o.inventoryQuantity
3403
+ })
3404
+ ) ?? [],
3332
3405
  pageInfo: s.locationAvailabilities.pageInfo ?? null
3333
3406
  };
3334
3407
  }
@@ -3338,12 +3411,25 @@ class fn {
3338
3411
  * @param {string} locationID 在庫情報を取得したいLocationのID。
3339
3412
  */
3340
3413
  async getLocationAvailability(t, n) {
3341
- const r = await this.api.GetLocationAvailability({ sku: t, locationID: n });
3414
+ const i = await this.api.GetLocationAvailability({ sku: t, locationID: n });
3342
3415
  return {
3343
3416
  location: {
3344
- name: r.locationAvailability.location.name
3417
+ id: i.locationAvailability.location.id,
3418
+ name: i.locationAvailability.location.name,
3419
+ phone: i.locationAvailability.location.phone,
3420
+ address: i.locationAvailability.location.address ? {
3421
+ id: i.locationAvailability.location.address.id,
3422
+ countryCode: i.locationAvailability.location.address.countryCode,
3423
+ country: i.locationAvailability.location.address.country,
3424
+ postalCode: i.locationAvailability.location.address.postalCode,
3425
+ provinceCode: i.locationAvailability.location.address.provinceCode,
3426
+ province: i.locationAvailability.location.address.province,
3427
+ city: i.locationAvailability.location.address.city,
3428
+ address1: i.locationAvailability.location.address.address1,
3429
+ address2: i.locationAvailability.location.address.address2
3430
+ } : void 0
3345
3431
  },
3346
- inventoryQuantity: r.locationAvailability.inventoryQuantity
3432
+ inventoryQuantity: i.locationAvailability.inventoryQuantity
3347
3433
  };
3348
3434
  }
3349
3435
  /**
@@ -3354,7 +3440,10 @@ class fn {
3354
3440
  * @param {string} key 取得したいメタフィールドのkey。
3355
3441
  */
3356
3442
  async getPurchasingCustomerMetafield(t, n) {
3357
- return (await this.api.GetPurchasingCustomerMetafield({ namespace: t, key: n })).purchasingCustomerMetafield ?? null;
3443
+ return (await this.api.GetPurchasingCustomerMetafield({
3444
+ namespace: t,
3445
+ key: n
3446
+ })).purchasingCustomerMetafield ?? null;
3358
3447
  }
3359
3448
  /**
3360
3449
  * getPoints は、現在の保有ポイントと、獲得予定ポイントを返します。
@@ -3374,14 +3463,26 @@ class fn {
3374
3463
  * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
3375
3464
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
3376
3465
  */
3377
- async getLocations(t, n, r) {
3378
- const i = await this.api.GetLocations({ first: t, after: n, isReverse: r });
3466
+ async getLocations(t, n, i) {
3467
+ const r = await this.api.GetLocations({ first: t, after: n, isReverse: i });
3379
3468
  return {
3380
- nodes: i.locations.nodes.map((s) => ({
3469
+ nodes: r.locations.nodes.map((s) => ({
3381
3470
  id: s.id,
3382
- name: s.name
3471
+ name: s.name,
3472
+ phone: s.phone,
3473
+ address: s.address ? {
3474
+ id: s.address.id,
3475
+ countryCode: s.address.countryCode,
3476
+ country: s.address.country,
3477
+ postalCode: s.address.postalCode,
3478
+ provinceCode: s.address.provinceCode,
3479
+ province: s.address.province,
3480
+ city: s.address.city,
3481
+ address1: s.address.address1,
3482
+ address2: s.address.address2
3483
+ } : void 0
3383
3484
  })) ?? [],
3384
- pageInfo: i.locations.pageInfo ?? null
3485
+ pageInfo: r.locations.pageInfo ?? null
3385
3486
  };
3386
3487
  }
3387
3488
  /**
@@ -3391,19 +3492,25 @@ class fn {
3391
3492
  * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
3392
3493
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
3393
3494
  */
3394
- async getPurchasingCustomerDiscounts(t, n, r) {
3395
- const i = await this.api.GetPurchasingCustomerDiscounts({ first: t, after: n, isReverse: r });
3396
- return i.purchasingCustomer ? {
3397
- id: i.purchasingCustomer.id,
3398
- nodes: i.purchasingCustomer.discounts.nodes.map((s) => ({
3399
- id: s.id,
3400
- title: s.title,
3401
- description: s.description,
3402
- code: s.code,
3403
- createdAt: new Date(s.createdAt),
3404
- updatedAt: new Date(s.updatedAt)
3405
- })) ?? [],
3406
- pageInfo: i.purchasingCustomer.discounts.pageInfo ?? null
3495
+ async getPurchasingCustomerDiscounts(t, n, i) {
3496
+ const r = await this.api.GetPurchasingCustomerDiscounts({
3497
+ first: t,
3498
+ after: n,
3499
+ isReverse: i
3500
+ });
3501
+ return r.purchasingCustomer ? {
3502
+ id: r.purchasingCustomer.id,
3503
+ nodes: r.purchasingCustomer.discounts.nodes.map(
3504
+ (s) => ({
3505
+ id: s.id,
3506
+ title: s.title,
3507
+ description: s.description,
3508
+ code: s.code,
3509
+ createdAt: new Date(s.createdAt),
3510
+ updatedAt: new Date(s.updatedAt)
3511
+ })
3512
+ ) ?? [],
3513
+ pageInfo: r.purchasingCustomer.discounts.pageInfo ?? null
3407
3514
  } : null;
3408
3515
  }
3409
3516
  /**
@@ -3414,22 +3521,31 @@ class fn {
3414
3521
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
3415
3522
  * @param {PointChangeActivitySortKey} [sortKeys] ソートキー。CREATED_ATかPOINT_CHANGE_CREATED_ATを渡す。デフォルトはCREATED_AT。
3416
3523
  */
3417
- async getPointChangeActivities(t, n, r, i) {
3418
- const s = await this.api.GetPurchasingCustomerPointChangeActivities({ first: t, after: n, isReverse: r, sortKeys: i });
3524
+ async getPointChangeActivities(t, n, i, r) {
3525
+ const s = await this.api.GetPurchasingCustomerPointChangeActivities({
3526
+ first: t,
3527
+ after: n,
3528
+ isReverse: i,
3529
+ sortKeys: r
3530
+ });
3419
3531
  return s.purchasingCustomer ? {
3420
- nodes: s.purchasingCustomer.pointChangeActivities.nodes.map((a) => ({
3421
- id: a.id,
3422
- title: a.title,
3423
- pointChange: {
3424
- id: a.pointChange.id,
3425
- delta: a.pointChange.delta,
3426
- availableAt: a.pointChange.availableAt ? new Date(a.pointChange.availableAt) : void 0,
3427
- availableUntil: a.pointChange.availableUntil ? new Date(a.pointChange.availableUntil) : void 0,
3428
- expiresDate: a.pointChange.expiresDate ? new Date(a.pointChange.expiresDate) : void 0,
3429
- pointChangeCreatedAt: new Date(a.pointChange.pointChangeCreatedAt),
3430
- createdAt: new Date(a.pointChange.createdAt)
3431
- }
3432
- })),
3532
+ nodes: s.purchasingCustomer.pointChangeActivities.nodes.map(
3533
+ (o) => ({
3534
+ id: o.id,
3535
+ title: o.title,
3536
+ pointChange: {
3537
+ id: o.pointChange.id,
3538
+ delta: o.pointChange.delta,
3539
+ availableAt: o.pointChange.availableAt ? new Date(o.pointChange.availableAt) : void 0,
3540
+ availableUntil: o.pointChange.availableUntil ? new Date(o.pointChange.availableUntil) : void 0,
3541
+ expiresDate: o.pointChange.expiresDate ? new Date(o.pointChange.expiresDate) : void 0,
3542
+ pointChangeCreatedAt: new Date(
3543
+ o.pointChange.pointChangeCreatedAt
3544
+ ),
3545
+ createdAt: new Date(o.pointChange.createdAt)
3546
+ }
3547
+ })
3548
+ ),
3433
3549
  pageInfo: s.purchasingCustomer.pointChangeActivities.pageInfo
3434
3550
  } : null;
3435
3551
  }
@@ -3444,8 +3560,12 @@ class fn {
3444
3560
  name: t.purchasingCustomer.currentCustomerRank.name,
3445
3561
  calculationCondition: {
3446
3562
  customerRankCalculationPeriod: t.purchasingCustomer.currentCustomerRank.calculationCondition.customerRankCalculationPeriod ? {
3447
- start: new Date(t.purchasingCustomer.currentCustomerRank.calculationCondition.customerRankCalculationPeriod.start),
3448
- end: new Date(t.purchasingCustomer.currentCustomerRank.calculationCondition.customerRankCalculationPeriod.end)
3563
+ start: new Date(
3564
+ t.purchasingCustomer.currentCustomerRank.calculationCondition.customerRankCalculationPeriod.start
3565
+ ),
3566
+ end: new Date(
3567
+ t.purchasingCustomer.currentCustomerRank.calculationCondition.customerRankCalculationPeriod.end
3568
+ )
3449
3569
  } : void 0,
3450
3570
  earnedPoint: t.purchasingCustomer.currentCustomerRank.calculationCondition.earnedPoint,
3451
3571
  purchasePrice: t.purchasingCustomer.currentCustomerRank.calculationCondition.purchasePrice
@@ -3462,7 +3582,16 @@ class fn {
3462
3582
  threshold: t.purchasingCustomer.currentCustomerRank.lowerRank.threshold
3463
3583
  } : void 0,
3464
3584
  purchasePriceToRankUp: t.purchasingCustomer.currentCustomerRank.purchasePriceToRankUp,
3465
- threshold: t.purchasingCustomer.currentCustomerRank.threshold
3585
+ threshold: t.purchasingCustomer.currentCustomerRank.threshold,
3586
+ pointMultiplier: t.purchasingCustomer.currentCustomerRank.pointMultiplier ? {
3587
+ id: t.purchasingCustomer.currentCustomerRank.pointMultiplier.id,
3588
+ customerRankRule: {
3589
+ id: t.purchasingCustomer.currentCustomerRank.pointMultiplier.customerRankRule.id,
3590
+ name: t.purchasingCustomer.currentCustomerRank.pointMultiplier.customerRankRule.name,
3591
+ threshold: t.purchasingCustomer.currentCustomerRank.pointMultiplier.customerRankRule.threshold
3592
+ },
3593
+ multiplier: t.purchasingCustomer.currentCustomerRank.pointMultiplier.multiplier
3594
+ } : void 0
3466
3595
  } : null;
3467
3596
  }
3468
3597
  }