@builtbystack/sq-shopify-theme-sdk 0.0.22 → 0.0.23

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.
@@ -64,13 +64,13 @@ function pe(e, t) {
64
64
  };
65
65
  }
66
66
  function nt(e) {
67
- return Oe(
67
+ return Se(
68
68
  e.source,
69
69
  pe(e.source, e.start)
70
70
  );
71
71
  }
72
- function Oe(e, t) {
73
- const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = 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}
72
+ function Se(e, t) {
73
+ const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, c = t.line === 1 ? n : 0, h = t.column + c, p = `${e.name}:${o}:${h}
74
74
  `, m = r.split(/\r\n|[\n\r]/g), y = m[i];
75
75
  if (y.length > 120) {
76
76
  const C = Math.floor(h / 80), T = h % 80, g = [];
@@ -148,14 +148,14 @@ class Ee extends Error {
148
148
  */
149
149
  constructor(t, ...n) {
150
150
  var r, i, s;
151
- const { nodes: o, source: u, positions: h, path: p, originalError: m, extensions: y } = rt(n);
151
+ const { nodes: o, source: c, positions: h, path: p, originalError: m, extensions: y } = rt(n);
152
152
  super(t), this.name = "GraphQLError", this.path = p ?? void 0, this.originalError = m ?? void 0, this.nodes = Ne(
153
153
  Array.isArray(o) ? o : o ? [o] : void 0
154
154
  );
155
155
  const C = Ne(
156
156
  (r = this.nodes) === null || r === void 0 ? void 0 : r.map((g) => g.loc).filter((g) => g != null)
157
157
  );
158
- this.source = u ?? (C == null || (i = C[0]) === null || i === void 0 ? void 0 : i.source), this.positions = h ?? (C == null ? void 0 : C.map((g) => g.start)), this.locations = h && u ? h.map((g) => pe(u, g)) : C == null ? void 0 : C.map((g) => pe(g.source, g.start));
158
+ this.source = c ?? (C == null || (i = C[0]) === null || i === void 0 ? void 0 : i.source), this.positions = h ?? (C == null ? void 0 : C.map((g) => g.start)), this.locations = h && c ? h.map((g) => pe(c, g)) : C == null ? void 0 : C.map((g) => pe(g.source, g.start));
159
159
  const T = Ze(
160
160
  m == null ? void 0 : m.extensions
161
161
  ) ? m == null ? void 0 : m.extensions : void 0;
@@ -203,7 +203,7 @@ class Ee extends Error {
203
203
  for (const n of this.locations)
204
204
  t += `
205
205
 
206
- ` + Oe(this.source, n);
206
+ ` + Se(this.source, n);
207
207
  return t;
208
208
  }
209
209
  toJSON() {
@@ -251,7 +251,7 @@ class it {
251
251
  };
252
252
  }
253
253
  }
254
- class Re {
254
+ class De {
255
255
  /**
256
256
  * The kind of Token.
257
257
  */
@@ -390,37 +390,37 @@ function me(e) {
390
390
  function Y(e) {
391
391
  return e >= 48 && e <= 57;
392
392
  }
393
- function _e(e) {
393
+ function Pe(e) {
394
394
  return e >= 97 && e <= 122 || // A-Z
395
395
  e >= 65 && e <= 90;
396
396
  }
397
- function Pe(e) {
398
- return _e(e) || e === 95;
397
+ function _e(e) {
398
+ return Pe(e) || e === 95;
399
399
  }
400
400
  function ot(e) {
401
- return _e(e) || Y(e) || e === 95;
401
+ return Pe(e) || Y(e) || e === 95;
402
402
  }
403
403
  function at(e) {
404
404
  var t;
405
405
  let n = Number.MAX_SAFE_INTEGER, r = null, i = -1;
406
406
  for (let o = 0; o < e.length; ++o) {
407
407
  var s;
408
- const u = e[o], h = ct(u);
409
- h !== u.length && (r = (s = r) !== null && s !== void 0 ? s : o, i = o, o !== 0 && h < n && (n = h));
408
+ const c = e[o], h = ut(c);
409
+ h !== c.length && (r = (s = r) !== null && s !== void 0 ? s : o, i = o, o !== 0 && h < n && (n = h));
410
410
  }
411
- return e.map((o, u) => u === 0 ? o : o.slice(n)).slice(
411
+ return e.map((o, c) => c === 0 ? o : o.slice(n)).slice(
412
412
  (t = r) !== null && t !== void 0 ? t : 0,
413
413
  i + 1
414
414
  );
415
415
  }
416
- function ct(e) {
416
+ function ut(e) {
417
417
  let t = 0;
418
418
  for (; t < e.length && me(e.charCodeAt(t)); )
419
419
  ++t;
420
420
  return t;
421
421
  }
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((T) => T.length === 0 || me(T.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
422
+ function ct(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((T) => T.length === 0 || me(T.charCodeAt(0))), o = n.endsWith('\\"""'), c = e.endsWith('"') && !o, h = e.endsWith("\\"), p = c || h, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
424
424
  (!i || e.length > 70 || p || s || o);
425
425
  let y = "";
426
426
  const C = i && me(e.charCodeAt(0));
@@ -428,10 +428,10 @@ function ut(e, t) {
428
428
  `), y += n, (m || p) && (y += `
429
429
  `), '"""' + y + '"""';
430
430
  }
431
- var c;
431
+ var u;
432
432
  (function(e) {
433
433
  e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
434
- })(c || (c = {}));
434
+ })(u || (u = {}));
435
435
  class lt {
436
436
  /**
437
437
  * The previously focused non-ignored token.
@@ -446,7 +446,7 @@ class lt {
446
446
  * The character offset at which the current line begins.
447
447
  */
448
448
  constructor(t) {
449
- const n = new Re(c.SOF, 0, 0, 0, 0);
449
+ const n = new De(u.SOF, 0, 0, 0, 0);
450
450
  this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
451
451
  }
452
452
  get [Symbol.toStringTag]() {
@@ -464,7 +464,7 @@ class lt {
464
464
  */
465
465
  lookahead() {
466
466
  let t = this.token;
467
- if (t.kind !== c.EOF)
467
+ if (t.kind !== u.EOF)
468
468
  do
469
469
  if (t.next)
470
470
  t = t.next;
@@ -472,12 +472,12 @@ class lt {
472
472
  const n = ht(this, t.end);
473
473
  t.next = n, n.prev = t, t = n;
474
474
  }
475
- while (t.kind === c.COMMENT);
475
+ while (t.kind === u.COMMENT);
476
476
  return t;
477
477
  }
478
478
  }
479
479
  function dt(e) {
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;
480
+ return e === u.BANG || e === u.DOLLAR || e === u.AMP || e === u.PAREN_L || e === u.PAREN_R || e === u.SPREAD || e === u.COLON || e === u.EQUALS || e === u.AT || e === u.BRACKET_L || e === u.BRACKET_R || e === u.BRACE_L || e === u.PIPE || e === u.BRACE_R;
481
481
  }
482
482
  function V(e) {
483
483
  return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
@@ -494,7 +494,7 @@ function we(e) {
494
494
  function F(e, t) {
495
495
  const n = e.source.body.codePointAt(t);
496
496
  if (n === void 0)
497
- return c.EOF;
497
+ return u.EOF;
498
498
  if (n >= 32 && n <= 126) {
499
499
  const r = String.fromCodePoint(n);
500
500
  return r === '"' ? `'"'` : `"${r}"`;
@@ -503,7 +503,7 @@ function F(e, t) {
503
503
  }
504
504
  function I(e, t, n, r, i) {
505
505
  const s = e.line, o = 1 + n - e.lineStart;
506
- return new Re(t, n, r, s, o, i);
506
+ return new De(t, n, r, s, o, i);
507
507
  }
508
508
  function ht(e, t) {
509
509
  const n = e.source.body, r = n.length;
@@ -526,41 +526,41 @@ function ht(e, t) {
526
526
  case 35:
527
527
  return pt(e, i);
528
528
  case 33:
529
- return I(e, c.BANG, i, i + 1);
529
+ return I(e, u.BANG, i, i + 1);
530
530
  case 36:
531
- return I(e, c.DOLLAR, i, i + 1);
531
+ return I(e, u.DOLLAR, i, i + 1);
532
532
  case 38:
533
- return I(e, c.AMP, i, i + 1);
533
+ return I(e, u.AMP, i, i + 1);
534
534
  case 40:
535
- return I(e, c.PAREN_L, i, i + 1);
535
+ return I(e, u.PAREN_L, i, i + 1);
536
536
  case 41:
537
- return I(e, c.PAREN_R, i, i + 1);
537
+ return I(e, u.PAREN_R, i, i + 1);
538
538
  case 46:
539
539
  if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46)
540
- return I(e, c.SPREAD, i, i + 3);
540
+ return I(e, u.SPREAD, i, i + 3);
541
541
  break;
542
542
  case 58:
543
- return I(e, c.COLON, i, i + 1);
543
+ return I(e, u.COLON, i, i + 1);
544
544
  case 61:
545
- return I(e, c.EQUALS, i, i + 1);
545
+ return I(e, u.EQUALS, i, i + 1);
546
546
  case 64:
547
- return I(e, c.AT, i, i + 1);
547
+ return I(e, u.AT, i, i + 1);
548
548
  case 91:
549
- return I(e, c.BRACKET_L, i, i + 1);
549
+ return I(e, u.BRACKET_L, i, i + 1);
550
550
  case 93:
551
- return I(e, c.BRACKET_R, i, i + 1);
551
+ return I(e, u.BRACKET_R, i, i + 1);
552
552
  case 123:
553
- return I(e, c.BRACE_L, i, i + 1);
553
+ return I(e, u.BRACE_L, i, i + 1);
554
554
  case 124:
555
- return I(e, c.PIPE, i, i + 1);
555
+ return I(e, u.PIPE, i, i + 1);
556
556
  case 125:
557
- return I(e, c.BRACE_R, i, i + 1);
557
+ return I(e, u.BRACE_R, i, i + 1);
558
558
  case 34:
559
559
  return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? Et(e, i) : mt(e, i);
560
560
  }
561
561
  if (Y(s) || s === 45)
562
562
  return ft(e, i, s);
563
- if (Pe(s))
563
+ if (_e(s))
564
564
  return vt(e, i);
565
565
  throw b(
566
566
  e.source,
@@ -568,7 +568,7 @@ function ht(e, t) {
568
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)}.`
569
569
  );
570
570
  }
571
- return I(e, c.EOF, r, r);
571
+ return I(e, u.EOF, r, r);
572
572
  }
573
573
  function pt(e, t) {
574
574
  const n = e.source.body, r = n.length;
@@ -586,7 +586,7 @@ function pt(e, t) {
586
586
  }
587
587
  return I(
588
588
  e,
589
- c.COMMENT,
589
+ u.COMMENT,
590
590
  t,
591
591
  i,
592
592
  n.slice(t + 1, i)
@@ -606,8 +606,8 @@ function ft(e, t, n) {
606
606
  )}.`
607
607
  );
608
608
  } else
609
- i = ue(e, i, s), s = r.charCodeAt(i);
610
- if (s === 46 && (o = !0, s = r.charCodeAt(++i), i = ue(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (o = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ue(e, i, s), s = r.charCodeAt(i)), s === 46 || Pe(s))
609
+ i = ce(e, i, s), s = r.charCodeAt(i);
610
+ if (s === 46 && (o = !0, s = r.charCodeAt(++i), i = ce(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (o = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ce(e, i, s), s = r.charCodeAt(i)), s === 46 || _e(s))
611
611
  throw b(
612
612
  e.source,
613
613
  i,
@@ -618,13 +618,13 @@ function ft(e, t, n) {
618
618
  );
619
619
  return I(
620
620
  e,
621
- o ? c.FLOAT : c.INT,
621
+ o ? u.FLOAT : u.INT,
622
622
  t,
623
623
  i,
624
624
  r.slice(t, i)
625
625
  );
626
626
  }
627
- function ue(e, t, n) {
627
+ function ce(e, t, n) {
628
628
  if (!Y(n))
629
629
  throw b(
630
630
  e.source,
@@ -644,18 +644,18 @@ function mt(e, t) {
644
644
  const n = e.source.body, r = n.length;
645
645
  let i = t + 1, s = i, o = "";
646
646
  for (; i < r; ) {
647
- const u = n.charCodeAt(i);
648
- if (u === 34)
649
- return o += n.slice(s, i), I(e, c.STRING, t, i + 1, o);
650
- if (u === 92) {
647
+ const c = n.charCodeAt(i);
648
+ if (c === 34)
649
+ return o += n.slice(s, i), I(e, u.STRING, t, i + 1, o);
650
+ if (c === 92) {
651
651
  o += n.slice(s, i);
652
652
  const h = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? gt(e, i) : yt(e, i) : Ct(e, i);
653
653
  o += h.value, i += h.size, s = i;
654
654
  continue;
655
655
  }
656
- if (u === 10 || u === 13)
656
+ if (c === 10 || c === 13)
657
657
  break;
658
- if (V(u))
658
+ if (V(c))
659
659
  ++i;
660
660
  else if (se(n, i))
661
661
  i += 2;
@@ -684,7 +684,7 @@ function gt(e, t) {
684
684
  size: i
685
685
  };
686
686
  }
687
- if (r = r << 4 | G(s), r < 0)
687
+ if (r = r << 4 | j(s), r < 0)
688
688
  break;
689
689
  }
690
690
  throw b(
@@ -718,9 +718,9 @@ function yt(e, t) {
718
718
  );
719
719
  }
720
720
  function be(e, t) {
721
- return G(e.charCodeAt(t)) << 12 | G(e.charCodeAt(t + 1)) << 8 | G(e.charCodeAt(t + 2)) << 4 | G(e.charCodeAt(t + 3));
721
+ return j(e.charCodeAt(t)) << 12 | j(e.charCodeAt(t + 1)) << 8 | j(e.charCodeAt(t + 2)) << 4 | j(e.charCodeAt(t + 3));
722
722
  }
723
- function G(e) {
723
+ function j(e) {
724
724
  return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
725
725
  }
726
726
  function Ct(e, t) {
@@ -779,15 +779,15 @@ function Ct(e, t) {
779
779
  }
780
780
  function Et(e, t) {
781
781
  const n = e.source.body, r = n.length;
782
- let i = e.lineStart, s = t + 3, o = s, u = "";
782
+ let i = e.lineStart, s = t + 3, o = s, c = "";
783
783
  const h = [];
784
784
  for (; s < r; ) {
785
785
  const p = n.charCodeAt(s);
786
786
  if (p === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
787
- u += n.slice(o, s), h.push(u);
787
+ c += n.slice(o, s), h.push(c);
788
788
  const m = I(
789
789
  e,
790
- c.BLOCK_STRING,
790
+ u.BLOCK_STRING,
791
791
  t,
792
792
  s + 3,
793
793
  // Return a string of the lines joined with U+000A.
@@ -797,11 +797,11 @@ function Et(e, t) {
797
797
  return e.line += h.length - 1, e.lineStart = i, m;
798
798
  }
799
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;
800
+ c += n.slice(o, s), o = s + 1, s += 4;
801
801
  continue;
802
802
  }
803
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, i = s;
804
+ c += n.slice(o, s), h.push(c), p === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, c = "", o = s, i = s;
805
805
  continue;
806
806
  }
807
807
  if (V(p))
@@ -832,7 +832,7 @@ function vt(e, t) {
832
832
  }
833
833
  return I(
834
834
  e,
835
- c.NAME,
835
+ u.NAME,
836
836
  t,
837
837
  i,
838
838
  n.slice(t, i)
@@ -896,7 +896,7 @@ function xt(e) {
896
896
  }
897
897
  return t;
898
898
  }
899
- const St = (
899
+ const Rt = (
900
900
  /* c8 ignore next 6 */
901
901
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
902
902
  globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function(t, n) {
@@ -946,22 +946,22 @@ class Be {
946
946
  return "Source";
947
947
  }
948
948
  }
949
- function Dt(e) {
950
- return St(e, Be);
949
+ function Ot(e) {
950
+ return Rt(e, Be);
951
951
  }
952
952
  function Ue(e, t) {
953
- return new Ot(e, t).parseDocument();
953
+ return new St(e, t).parseDocument();
954
954
  }
955
- class Ot {
955
+ class St {
956
956
  constructor(t, n = {}) {
957
- const r = Dt(t) ? t : new Be(t);
957
+ const r = Ot(t) ? t : new Be(t);
958
958
  this._lexer = new lt(r), this._options = n, this._tokenCounter = 0;
959
959
  }
960
960
  /**
961
961
  * Converts a name lex token into a name parse node.
962
962
  */
963
963
  parseName() {
964
- const t = this.expectToken(c.NAME);
964
+ const t = this.expectToken(u.NAME);
965
965
  return this.node(t, {
966
966
  kind: f.NAME,
967
967
  value: t.value
@@ -975,9 +975,9 @@ class Ot {
975
975
  return this.node(this._lexer.token, {
976
976
  kind: f.DOCUMENT,
977
977
  definitions: this.many(
978
- c.SOF,
978
+ u.SOF,
979
979
  this.parseDefinition,
980
- c.EOF
980
+ u.EOF
981
981
  )
982
982
  });
983
983
  }
@@ -1005,10 +1005,10 @@ class Ot {
1005
1005
  * - InputObjectTypeDefinition
1006
1006
  */
1007
1007
  parseDefinition() {
1008
- if (this.peek(c.BRACE_L))
1008
+ if (this.peek(u.BRACE_L))
1009
1009
  return this.parseOperationDefinition();
1010
1010
  const t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
1011
- if (n.kind === c.NAME) {
1011
+ if (n.kind === u.NAME) {
1012
1012
  switch (n.value) {
1013
1013
  case "schema":
1014
1014
  return this.parseSchemaDefinition();
@@ -1054,7 +1054,7 @@ class Ot {
1054
1054
  */
1055
1055
  parseOperationDefinition() {
1056
1056
  const t = this._lexer.token;
1057
- if (this.peek(c.BRACE_L))
1057
+ if (this.peek(u.BRACE_L))
1058
1058
  return this.node(t, {
1059
1059
  kind: f.OPERATION_DEFINITION,
1060
1060
  operation: M.QUERY,
@@ -1065,7 +1065,7 @@ class Ot {
1065
1065
  });
1066
1066
  const n = this.parseOperationType();
1067
1067
  let r;
1068
- return this.peek(c.NAME) && (r = this.parseName()), this.node(t, {
1068
+ return this.peek(u.NAME) && (r = this.parseName()), this.node(t, {
1069
1069
  kind: f.OPERATION_DEFINITION,
1070
1070
  operation: n,
1071
1071
  name: r,
@@ -1078,7 +1078,7 @@ class Ot {
1078
1078
  * OperationType : one of query mutation subscription
1079
1079
  */
1080
1080
  parseOperationType() {
1081
- const t = this.expectToken(c.NAME);
1081
+ const t = this.expectToken(u.NAME);
1082
1082
  switch (t.value) {
1083
1083
  case "query":
1084
1084
  return M.QUERY;
@@ -1094,9 +1094,9 @@ class Ot {
1094
1094
  */
1095
1095
  parseVariableDefinitions() {
1096
1096
  return this.optionalMany(
1097
- c.PAREN_L,
1097
+ u.PAREN_L,
1098
1098
  this.parseVariableDefinition,
1099
- c.PAREN_R
1099
+ u.PAREN_R
1100
1100
  );
1101
1101
  }
1102
1102
  /**
@@ -1106,8 +1106,8 @@ class Ot {
1106
1106
  return this.node(this._lexer.token, {
1107
1107
  kind: f.VARIABLE_DEFINITION,
1108
1108
  variable: this.parseVariable(),
1109
- type: (this.expectToken(c.COLON), this.parseTypeReference()),
1110
- defaultValue: this.expectOptionalToken(c.EQUALS) ? this.parseConstValueLiteral() : void 0,
1109
+ type: (this.expectToken(u.COLON), this.parseTypeReference()),
1110
+ defaultValue: this.expectOptionalToken(u.EQUALS) ? this.parseConstValueLiteral() : void 0,
1111
1111
  directives: this.parseConstDirectives()
1112
1112
  });
1113
1113
  }
@@ -1116,7 +1116,7 @@ class Ot {
1116
1116
  */
1117
1117
  parseVariable() {
1118
1118
  const t = this._lexer.token;
1119
- return this.expectToken(c.DOLLAR), this.node(t, {
1119
+ return this.expectToken(u.DOLLAR), this.node(t, {
1120
1120
  kind: f.VARIABLE,
1121
1121
  name: this.parseName()
1122
1122
  });
@@ -1130,9 +1130,9 @@ class Ot {
1130
1130
  return this.node(this._lexer.token, {
1131
1131
  kind: f.SELECTION_SET,
1132
1132
  selections: this.many(
1133
- c.BRACE_L,
1133
+ u.BRACE_L,
1134
1134
  this.parseSelection,
1135
- c.BRACE_R
1135
+ u.BRACE_R
1136
1136
  )
1137
1137
  });
1138
1138
  }
@@ -1143,7 +1143,7 @@ class Ot {
1143
1143
  * - InlineFragment
1144
1144
  */
1145
1145
  parseSelection() {
1146
- return this.peek(c.SPREAD) ? this.parseFragment() : this.parseField();
1146
+ return this.peek(u.SPREAD) ? this.parseFragment() : this.parseField();
1147
1147
  }
1148
1148
  /**
1149
1149
  * Field : Alias? Name Arguments? Directives? SelectionSet?
@@ -1153,13 +1153,13 @@ class Ot {
1153
1153
  parseField() {
1154
1154
  const t = this._lexer.token, n = this.parseName();
1155
1155
  let r, i;
1156
- return this.expectOptionalToken(c.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
1156
+ return this.expectOptionalToken(u.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
1157
1157
  kind: f.FIELD,
1158
1158
  alias: r,
1159
1159
  name: i,
1160
1160
  arguments: this.parseArguments(!1),
1161
1161
  directives: this.parseDirectives(!1),
1162
- selectionSet: this.peek(c.BRACE_L) ? this.parseSelectionSet() : void 0
1162
+ selectionSet: this.peek(u.BRACE_L) ? this.parseSelectionSet() : void 0
1163
1163
  });
1164
1164
  }
1165
1165
  /**
@@ -1167,14 +1167,14 @@ class Ot {
1167
1167
  */
1168
1168
  parseArguments(t) {
1169
1169
  const n = t ? this.parseConstArgument : this.parseArgument;
1170
- return this.optionalMany(c.PAREN_L, n, c.PAREN_R);
1170
+ return this.optionalMany(u.PAREN_L, n, u.PAREN_R);
1171
1171
  }
1172
1172
  /**
1173
1173
  * Argument[Const] : Name : Value[?Const]
1174
1174
  */
1175
1175
  parseArgument(t = !1) {
1176
1176
  const n = this._lexer.token, r = this.parseName();
1177
- return this.expectToken(c.COLON), this.node(n, {
1177
+ return this.expectToken(u.COLON), this.node(n, {
1178
1178
  kind: f.ARGUMENT,
1179
1179
  name: r,
1180
1180
  value: this.parseValueLiteral(t)
@@ -1193,9 +1193,9 @@ class Ot {
1193
1193
  */
1194
1194
  parseFragment() {
1195
1195
  const t = this._lexer.token;
1196
- this.expectToken(c.SPREAD);
1196
+ this.expectToken(u.SPREAD);
1197
1197
  const n = this.expectOptionalKeyword("on");
1198
- return !n && this.peek(c.NAME) ? this.node(t, {
1198
+ return !n && this.peek(u.NAME) ? this.node(t, {
1199
1199
  kind: f.FRAGMENT_SPREAD,
1200
1200
  name: this.parseFragmentName(),
1201
1201
  directives: this.parseDirectives(!1)
@@ -1259,24 +1259,24 @@ class Ot {
1259
1259
  parseValueLiteral(t) {
1260
1260
  const n = this._lexer.token;
1261
1261
  switch (n.kind) {
1262
- case c.BRACKET_L:
1262
+ case u.BRACKET_L:
1263
1263
  return this.parseList(t);
1264
- case c.BRACE_L:
1264
+ case u.BRACE_L:
1265
1265
  return this.parseObject(t);
1266
- case c.INT:
1266
+ case u.INT:
1267
1267
  return this.advanceLexer(), this.node(n, {
1268
1268
  kind: f.INT,
1269
1269
  value: n.value
1270
1270
  });
1271
- case c.FLOAT:
1271
+ case u.FLOAT:
1272
1272
  return this.advanceLexer(), this.node(n, {
1273
1273
  kind: f.FLOAT,
1274
1274
  value: n.value
1275
1275
  });
1276
- case c.STRING:
1277
- case c.BLOCK_STRING:
1276
+ case u.STRING:
1277
+ case u.BLOCK_STRING:
1278
1278
  return this.parseStringLiteral();
1279
- case c.NAME:
1279
+ case u.NAME:
1280
1280
  switch (this.advanceLexer(), n.value) {
1281
1281
  case "true":
1282
1282
  return this.node(n, {
@@ -1298,9 +1298,9 @@ class Ot {
1298
1298
  value: n.value
1299
1299
  });
1300
1300
  }
1301
- case c.DOLLAR:
1301
+ case u.DOLLAR:
1302
1302
  if (t)
1303
- if (this.expectToken(c.DOLLAR), this._lexer.token.kind === c.NAME) {
1303
+ if (this.expectToken(u.DOLLAR), this._lexer.token.kind === u.NAME) {
1304
1304
  const r = this._lexer.token.value;
1305
1305
  throw b(
1306
1306
  this._lexer.source,
@@ -1322,7 +1322,7 @@ class Ot {
1322
1322
  return this.advanceLexer(), this.node(t, {
1323
1323
  kind: f.STRING,
1324
1324
  value: t.value,
1325
- block: t.kind === c.BLOCK_STRING
1325
+ block: t.kind === u.BLOCK_STRING
1326
1326
  });
1327
1327
  }
1328
1328
  /**
@@ -1334,7 +1334,7 @@ class Ot {
1334
1334
  const n = () => this.parseValueLiteral(t);
1335
1335
  return this.node(this._lexer.token, {
1336
1336
  kind: f.LIST,
1337
- values: this.any(c.BRACKET_L, n, c.BRACKET_R)
1337
+ values: this.any(u.BRACKET_L, n, u.BRACKET_R)
1338
1338
  });
1339
1339
  }
1340
1340
  /**
@@ -1348,7 +1348,7 @@ class Ot {
1348
1348
  const n = () => this.parseObjectField(t);
1349
1349
  return this.node(this._lexer.token, {
1350
1350
  kind: f.OBJECT,
1351
- fields: this.any(c.BRACE_L, n, c.BRACE_R)
1351
+ fields: this.any(u.BRACE_L, n, u.BRACE_R)
1352
1352
  });
1353
1353
  }
1354
1354
  /**
@@ -1356,7 +1356,7 @@ class Ot {
1356
1356
  */
1357
1357
  parseObjectField(t) {
1358
1358
  const n = this._lexer.token, r = this.parseName();
1359
- return this.expectToken(c.COLON), this.node(n, {
1359
+ return this.expectToken(u.COLON), this.node(n, {
1360
1360
  kind: f.OBJECT_FIELD,
1361
1361
  name: r,
1362
1362
  value: this.parseValueLiteral(t)
@@ -1368,7 +1368,7 @@ class Ot {
1368
1368
  */
1369
1369
  parseDirectives(t) {
1370
1370
  const n = [];
1371
- for (; this.peek(c.AT); )
1371
+ for (; this.peek(u.AT); )
1372
1372
  n.push(this.parseDirective(t));
1373
1373
  return n;
1374
1374
  }
@@ -1382,7 +1382,7 @@ class Ot {
1382
1382
  */
1383
1383
  parseDirective(t) {
1384
1384
  const n = this._lexer.token;
1385
- return this.expectToken(c.AT), this.node(n, {
1385
+ return this.expectToken(u.AT), this.node(n, {
1386
1386
  kind: f.DIRECTIVE,
1387
1387
  name: this.parseName(),
1388
1388
  arguments: this.parseArguments(t)
@@ -1398,15 +1398,15 @@ class Ot {
1398
1398
  parseTypeReference() {
1399
1399
  const t = this._lexer.token;
1400
1400
  let n;
1401
- if (this.expectOptionalToken(c.BRACKET_L)) {
1401
+ if (this.expectOptionalToken(u.BRACKET_L)) {
1402
1402
  const r = this.parseTypeReference();
1403
- this.expectToken(c.BRACKET_R), n = this.node(t, {
1403
+ this.expectToken(u.BRACKET_R), n = this.node(t, {
1404
1404
  kind: f.LIST_TYPE,
1405
1405
  type: r
1406
1406
  });
1407
1407
  } else
1408
1408
  n = this.parseNamedType();
1409
- return this.expectOptionalToken(c.BANG) ? this.node(t, {
1409
+ return this.expectOptionalToken(u.BANG) ? this.node(t, {
1410
1410
  kind: f.NON_NULL_TYPE,
1411
1411
  type: n
1412
1412
  }) : n;
@@ -1422,7 +1422,7 @@ class Ot {
1422
1422
  }
1423
1423
  // Implements the parsing rules in the Type Definition section.
1424
1424
  peekDescription() {
1425
- return this.peek(c.STRING) || this.peek(c.BLOCK_STRING);
1425
+ return this.peek(u.STRING) || this.peek(u.BLOCK_STRING);
1426
1426
  }
1427
1427
  /**
1428
1428
  * Description : StringValue
@@ -1440,9 +1440,9 @@ class Ot {
1440
1440
  const t = this._lexer.token, n = this.parseDescription();
1441
1441
  this.expectKeyword("schema");
1442
1442
  const r = this.parseConstDirectives(), i = this.many(
1443
- c.BRACE_L,
1443
+ u.BRACE_L,
1444
1444
  this.parseOperationTypeDefinition,
1445
- c.BRACE_R
1445
+ u.BRACE_R
1446
1446
  );
1447
1447
  return this.node(t, {
1448
1448
  kind: f.SCHEMA_DEFINITION,
@@ -1456,7 +1456,7 @@ class Ot {
1456
1456
  */
1457
1457
  parseOperationTypeDefinition() {
1458
1458
  const t = this._lexer.token, n = this.parseOperationType();
1459
- this.expectToken(c.COLON);
1459
+ this.expectToken(u.COLON);
1460
1460
  const r = this.parseNamedType();
1461
1461
  return this.node(t, {
1462
1462
  kind: f.OPERATION_TYPE_DEFINITION,
@@ -1502,7 +1502,7 @@ class Ot {
1502
1502
  * - ImplementsInterfaces & NamedType
1503
1503
  */
1504
1504
  parseImplementsInterfaces() {
1505
- return this.expectOptionalKeyword("implements") ? this.delimitedMany(c.AMP, this.parseNamedType) : [];
1505
+ return this.expectOptionalKeyword("implements") ? this.delimitedMany(u.AMP, this.parseNamedType) : [];
1506
1506
  }
1507
1507
  /**
1508
1508
  * ```
@@ -1511,9 +1511,9 @@ class Ot {
1511
1511
  */
1512
1512
  parseFieldsDefinition() {
1513
1513
  return this.optionalMany(
1514
- c.BRACE_L,
1514
+ u.BRACE_L,
1515
1515
  this.parseFieldDefinition,
1516
- c.BRACE_R
1516
+ u.BRACE_R
1517
1517
  );
1518
1518
  }
1519
1519
  /**
@@ -1522,7 +1522,7 @@ class Ot {
1522
1522
  */
1523
1523
  parseFieldDefinition() {
1524
1524
  const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs();
1525
- this.expectToken(c.COLON);
1525
+ this.expectToken(u.COLON);
1526
1526
  const s = this.parseTypeReference(), o = this.parseConstDirectives();
1527
1527
  return this.node(t, {
1528
1528
  kind: f.FIELD_DEFINITION,
@@ -1538,9 +1538,9 @@ class Ot {
1538
1538
  */
1539
1539
  parseArgumentDefs() {
1540
1540
  return this.optionalMany(
1541
- c.PAREN_L,
1541
+ u.PAREN_L,
1542
1542
  this.parseInputValueDef,
1543
- c.PAREN_R
1543
+ u.PAREN_R
1544
1544
  );
1545
1545
  }
1546
1546
  /**
@@ -1549,10 +1549,10 @@ class Ot {
1549
1549
  */
1550
1550
  parseInputValueDef() {
1551
1551
  const t = this._lexer.token, n = this.parseDescription(), r = this.parseName();
1552
- this.expectToken(c.COLON);
1552
+ this.expectToken(u.COLON);
1553
1553
  const i = this.parseTypeReference();
1554
1554
  let s;
1555
- this.expectOptionalToken(c.EQUALS) && (s = this.parseConstValueLiteral());
1555
+ this.expectOptionalToken(u.EQUALS) && (s = this.parseConstValueLiteral());
1556
1556
  const o = this.parseConstDirectives();
1557
1557
  return this.node(t, {
1558
1558
  kind: f.INPUT_VALUE_DEFINITION,
@@ -1602,7 +1602,7 @@ class Ot {
1602
1602
  * - UnionMemberTypes | NamedType
1603
1603
  */
1604
1604
  parseUnionMemberTypes() {
1605
- return this.expectOptionalToken(c.EQUALS) ? this.delimitedMany(c.PIPE, this.parseNamedType) : [];
1605
+ return this.expectOptionalToken(u.EQUALS) ? this.delimitedMany(u.PIPE, this.parseNamedType) : [];
1606
1606
  }
1607
1607
  /**
1608
1608
  * EnumTypeDefinition :
@@ -1627,9 +1627,9 @@ class Ot {
1627
1627
  */
1628
1628
  parseEnumValuesDefinition() {
1629
1629
  return this.optionalMany(
1630
- c.BRACE_L,
1630
+ u.BRACE_L,
1631
1631
  this.parseEnumValueDefinition,
1632
- c.BRACE_R
1632
+ u.BRACE_R
1633
1633
  );
1634
1634
  }
1635
1635
  /**
@@ -1681,9 +1681,9 @@ class Ot {
1681
1681
  */
1682
1682
  parseInputFieldsDefinition() {
1683
1683
  return this.optionalMany(
1684
- c.BRACE_L,
1684
+ u.BRACE_L,
1685
1685
  this.parseInputValueDef,
1686
- c.BRACE_R
1686
+ u.BRACE_R
1687
1687
  );
1688
1688
  }
1689
1689
  /**
@@ -1701,7 +1701,7 @@ class Ot {
1701
1701
  */
1702
1702
  parseTypeSystemExtension() {
1703
1703
  const t = this._lexer.lookahead();
1704
- if (t.kind === c.NAME)
1704
+ if (t.kind === u.NAME)
1705
1705
  switch (t.value) {
1706
1706
  case "schema":
1707
1707
  return this.parseSchemaExtension();
@@ -1731,9 +1731,9 @@ class Ot {
1731
1731
  const t = this._lexer.token;
1732
1732
  this.expectKeyword("extend"), this.expectKeyword("schema");
1733
1733
  const n = this.parseConstDirectives(), r = this.optionalMany(
1734
- c.BRACE_L,
1734
+ u.BRACE_L,
1735
1735
  this.parseOperationTypeDefinition,
1736
- c.BRACE_R
1736
+ u.BRACE_R
1737
1737
  );
1738
1738
  if (n.length === 0 && r.length === 0)
1739
1739
  throw this.unexpected();
@@ -1861,7 +1861,7 @@ class Ot {
1861
1861
  */
1862
1862
  parseDirectiveDefinition() {
1863
1863
  const t = this._lexer.token, n = this.parseDescription();
1864
- this.expectKeyword("directive"), this.expectToken(c.AT);
1864
+ this.expectKeyword("directive"), this.expectToken(u.AT);
1865
1865
  const r = this.parseName(), i = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1866
1866
  this.expectKeyword("on");
1867
1867
  const o = this.parseDirectiveLocations();
@@ -1880,7 +1880,7 @@ class Ot {
1880
1880
  * - DirectiveLocations | DirectiveLocation
1881
1881
  */
1882
1882
  parseDirectiveLocations() {
1883
- return this.delimitedMany(c.PIPE, this.parseDirectiveLocation);
1883
+ return this.delimitedMany(u.PIPE, this.parseDirectiveLocation);
1884
1884
  }
1885
1885
  /*
1886
1886
  * DirectiveLocation :
@@ -1961,7 +1961,7 @@ class Ot {
1961
1961
  */
1962
1962
  expectKeyword(t) {
1963
1963
  const n = this._lexer.token;
1964
- if (n.kind === c.NAME && n.value === t)
1964
+ if (n.kind === u.NAME && n.value === t)
1965
1965
  this.advanceLexer();
1966
1966
  else
1967
1967
  throw b(
@@ -1976,7 +1976,7 @@ class Ot {
1976
1976
  */
1977
1977
  expectOptionalKeyword(t) {
1978
1978
  const n = this._lexer.token;
1979
- return n.kind === c.NAME && n.value === t ? (this.advanceLexer(), !0) : !1;
1979
+ return n.kind === u.NAME && n.value === t ? (this.advanceLexer(), !0) : !1;
1980
1980
  }
1981
1981
  /**
1982
1982
  * Helper function for creating an error when an unexpected lexed token is encountered.
@@ -2045,7 +2045,7 @@ class Ot {
2045
2045
  }
2046
2046
  advanceLexer() {
2047
2047
  const { maxTokens: t } = this._options, n = this._lexer.advance();
2048
- if (t !== void 0 && n.kind !== c.EOF && (++this._tokenCounter, this._tokenCounter > t))
2048
+ if (t !== void 0 && n.kind !== u.EOF && (++this._tokenCounter, this._tokenCounter > t))
2049
2049
  throw b(
2050
2050
  this._lexer.source,
2051
2051
  n.start,
@@ -2060,14 +2060,14 @@ function W(e) {
2060
2060
  function Me(e) {
2061
2061
  return dt(e) ? `"${e}"` : e;
2062
2062
  }
2063
- function Rt(e) {
2064
- return `"${e.replace(kt, _t)}"`;
2063
+ function Dt(e) {
2064
+ return `"${e.replace(kt, Pt)}"`;
2065
2065
  }
2066
2066
  const kt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
2067
- function _t(e) {
2068
- return Pt[e.charCodeAt(0)];
2067
+ function Pt(e) {
2068
+ return _t[e.charCodeAt(0)];
2069
2069
  }
2070
- const Pt = [
2070
+ const _t = [
2071
2071
  "\\u0000",
2072
2072
  "\\u0001",
2073
2073
  "\\u0002",
@@ -2236,14 +2236,14 @@ const Pt = [
2236
2236
  ], Lt = Object.freeze({});
2237
2237
  function wt(e, t, n = ke) {
2238
2238
  const r = /* @__PURE__ */ new Map();
2239
- for (const R of Object.values(f))
2240
- r.set(R, Ft(t, R));
2241
- let i, s = Array.isArray(e), o = [e], u = -1, h = [], p = e, m, y;
2239
+ for (const D of Object.values(f))
2240
+ r.set(D, Ft(t, D));
2241
+ let i, s = Array.isArray(e), o = [e], c = -1, h = [], p = e, m, y;
2242
2242
  const C = [], T = [];
2243
2243
  do {
2244
- u++;
2245
- const R = u === o.length, z = R && h.length !== 0;
2246
- if (R) {
2244
+ c++;
2245
+ const D = c === o.length, z = D && h.length !== 0;
2246
+ if (D) {
2247
2247
  if (m = T.length === 0 ? void 0 : C[C.length - 1], p = y, y = T.pop(), z)
2248
2248
  if (s) {
2249
2249
  p = p.slice();
@@ -2260,43 +2260,43 @@ function wt(e, t, n = ke) {
2260
2260
  for (const [k, B] of h)
2261
2261
  p[k] = B;
2262
2262
  }
2263
- u = i.index, o = i.keys, h = i.edits, s = i.inArray, i = i.prev;
2263
+ c = i.index, o = i.keys, h = i.edits, s = i.inArray, i = i.prev;
2264
2264
  } else if (y) {
2265
- if (m = s ? u : o[u], p = y[m], p == null)
2265
+ if (m = s ? c : o[c], p = y[m], p == null)
2266
2266
  continue;
2267
2267
  C.push(m);
2268
2268
  }
2269
- let P;
2269
+ let _;
2270
2270
  if (!Array.isArray(p)) {
2271
2271
  var g, N;
2272
2272
  Ie(p) || K(!1, `Invalid AST Node: ${ve(p)}.`);
2273
- const k = R ? (g = r.get(p.kind)) === null || g === void 0 ? void 0 : g.leave : (N = r.get(p.kind)) === null || N === void 0 ? void 0 : N.enter;
2274
- if (P = k == null ? void 0 : k.call(t, p, m, y, C, T), P === Lt)
2273
+ const k = D ? (g = r.get(p.kind)) === null || g === void 0 ? void 0 : g.leave : (N = r.get(p.kind)) === null || N === void 0 ? void 0 : N.enter;
2274
+ if (_ = k == null ? void 0 : k.call(t, p, m, y, C, T), _ === Lt)
2275
2275
  break;
2276
- if (P === !1) {
2277
- if (!R) {
2276
+ if (_ === !1) {
2277
+ if (!D) {
2278
2278
  C.pop();
2279
2279
  continue;
2280
2280
  }
2281
- } else if (P !== void 0 && (h.push([m, P]), !R))
2282
- if (Ie(P))
2283
- p = P;
2281
+ } else if (_ !== void 0 && (h.push([m, _]), !D))
2282
+ if (Ie(_))
2283
+ p = _;
2284
2284
  else {
2285
2285
  C.pop();
2286
2286
  continue;
2287
2287
  }
2288
2288
  }
2289
- if (P === void 0 && z && h.push([m, p]), R)
2289
+ if (_ === void 0 && z && h.push([m, p]), D)
2290
2290
  C.pop();
2291
2291
  else {
2292
- var D;
2292
+ var S;
2293
2293
  i = {
2294
2294
  inArray: s,
2295
- index: u,
2295
+ index: c,
2296
2296
  keys: o,
2297
2297
  edits: h,
2298
2298
  prev: i
2299
- }, s = Array.isArray(p), o = s ? p : (D = n[p.kind]) !== null && D !== void 0 ? D : [], u = -1, h = [], y && T.push(y), y = p;
2299
+ }, s = Array.isArray(p), o = s ? p : (S = n[p.kind]) !== null && S !== void 0 ? S : [], c = -1, h = [], y && T.push(y), y = p;
2300
2300
  }
2301
2301
  } while (i !== void 0);
2302
2302
  return h.length !== 0 ? h[h.length - 1][1] : e;
@@ -2344,7 +2344,7 @@ const Ut = 80, Mt = {
2344
2344
  leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + v(" = ", n) + v(" ", d(r, " "))
2345
2345
  },
2346
2346
  SelectionSet: {
2347
- leave: ({ selections: e }) => _(e)
2347
+ leave: ({ selections: e }) => P(e)
2348
2348
  },
2349
2349
  Field: {
2350
2350
  leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) {
@@ -2388,7 +2388,7 @@ const Ut = 80, Mt = {
2388
2388
  leave: ({ value: e }) => e
2389
2389
  },
2390
2390
  StringValue: {
2391
- leave: ({ value: e, block: t }) => t ? ut(e) : Rt(e)
2391
+ leave: ({ value: e, block: t }) => t ? ct(e) : Dt(e)
2392
2392
  },
2393
2393
  BooleanValue: {
2394
2394
  leave: ({ value: e }) => e ? "true" : "false"
@@ -2425,7 +2425,7 @@ const Ut = 80, Mt = {
2425
2425
  // Type System Definitions
2426
2426
  SchemaDefinition: {
2427
2427
  leave: ({ description: e, directives: t, operationTypes: n }) => v("", e, `
2428
- `) + d(["schema", d(t, " "), _(n)], " ")
2428
+ `) + d(["schema", d(t, " "), P(n)], " ")
2429
2429
  },
2430
2430
  OperationTypeDefinition: {
2431
2431
  leave: ({ operation: e, type: t }) => e + ": " + t
@@ -2442,7 +2442,7 @@ const Ut = 80, Mt = {
2442
2442
  t,
2443
2443
  v("implements ", d(n, " & ")),
2444
2444
  d(r, " "),
2445
- _(i)
2445
+ P(i)
2446
2446
  ],
2447
2447
  " "
2448
2448
  )
@@ -2469,7 +2469,7 @@ const Ut = 80, Mt = {
2469
2469
  t,
2470
2470
  v("implements ", d(n, " & ")),
2471
2471
  d(r, " "),
2472
- _(i)
2472
+ P(i)
2473
2473
  ],
2474
2474
  " "
2475
2475
  )
@@ -2483,7 +2483,7 @@ const Ut = 80, Mt = {
2483
2483
  },
2484
2484
  EnumTypeDefinition: {
2485
2485
  leave: ({ description: e, name: t, directives: n, values: r }) => v("", e, `
2486
- `) + d(["enum", t, d(n, " "), _(r)], " ")
2486
+ `) + d(["enum", t, d(n, " "), P(r)], " ")
2487
2487
  },
2488
2488
  EnumValueDefinition: {
2489
2489
  leave: ({ description: e, name: t, directives: n }) => v("", e, `
@@ -2491,7 +2491,7 @@ const Ut = 80, Mt = {
2491
2491
  },
2492
2492
  InputObjectTypeDefinition: {
2493
2493
  leave: ({ description: e, name: t, directives: n, fields: r }) => v("", e, `
2494
- `) + d(["input", t, d(n, " "), _(r)], " ")
2494
+ `) + d(["input", t, d(n, " "), P(r)], " ")
2495
2495
  },
2496
2496
  DirectiveDefinition: {
2497
2497
  leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => v("", e, `
@@ -2502,7 +2502,7 @@ const Ut = 80, Mt = {
2502
2502
  },
2503
2503
  SchemaExtension: {
2504
2504
  leave: ({ directives: e, operationTypes: t }) => d(
2505
- ["extend schema", d(e, " "), _(t)],
2505
+ ["extend schema", d(e, " "), P(t)],
2506
2506
  " "
2507
2507
  )
2508
2508
  },
@@ -2516,7 +2516,7 @@ const Ut = 80, Mt = {
2516
2516
  e,
2517
2517
  v("implements ", d(t, " & ")),
2518
2518
  d(n, " "),
2519
- _(r)
2519
+ P(r)
2520
2520
  ],
2521
2521
  " "
2522
2522
  )
@@ -2528,7 +2528,7 @@ const Ut = 80, Mt = {
2528
2528
  e,
2529
2529
  v("implements ", d(t, " & ")),
2530
2530
  d(n, " "),
2531
- _(r)
2531
+ P(r)
2532
2532
  ],
2533
2533
  " "
2534
2534
  )
@@ -2545,17 +2545,17 @@ const Ut = 80, Mt = {
2545
2545
  )
2546
2546
  },
2547
2547
  EnumTypeExtension: {
2548
- leave: ({ name: e, directives: t, values: n }) => d(["extend enum", e, d(t, " "), _(n)], " ")
2548
+ leave: ({ name: e, directives: t, values: n }) => d(["extend enum", e, d(t, " "), P(n)], " ")
2549
2549
  },
2550
2550
  InputObjectTypeExtension: {
2551
- leave: ({ name: e, directives: t, fields: n }) => d(["extend input", e, d(t, " "), _(n)], " ")
2551
+ leave: ({ name: e, directives: t, fields: n }) => d(["extend input", e, d(t, " "), P(n)], " ")
2552
2552
  }
2553
2553
  };
2554
2554
  function d(e, t = "") {
2555
2555
  var n;
2556
2556
  return (n = e == null ? void 0 : e.filter((r) => r).join(t)) !== null && n !== void 0 ? n : "";
2557
2557
  }
2558
- function _(e) {
2558
+ function P(e) {
2559
2559
  return v(`{
2560
2560
  `, Z(d(e, `
2561
2561
  `)), `
@@ -2573,7 +2573,7 @@ function xe(e) {
2573
2573
  return (t = e == null ? void 0 : e.some((n) => n.includes(`
2574
2574
  `))) !== null && t !== void 0 ? t : !1;
2575
2575
  }
2576
- const Se = (e) => {
2576
+ const Re = (e) => {
2577
2577
  var r, i;
2578
2578
  let t;
2579
2579
  const n = e.definitions.filter((s) => s.kind === "OperationDefinition");
@@ -2583,12 +2583,12 @@ const Se = (e) => {
2583
2583
  let n;
2584
2584
  try {
2585
2585
  const r = Ue(e);
2586
- n = Se(r);
2586
+ n = Re(r);
2587
2587
  } catch {
2588
2588
  }
2589
2589
  return { query: e, operationName: n };
2590
2590
  }
2591
- const t = Se(e);
2591
+ const t = Re(e);
2592
2592
  return { query: Bt(e), operationName: t };
2593
2593
  };
2594
2594
  class H extends Error {
@@ -2618,7 +2618,7 @@ var ge = { exports: {} };
2618
2618
  }();
2619
2619
  (function(s) {
2620
2620
  (function(o) {
2621
- var u = {
2621
+ var c = {
2622
2622
  searchParams: "URLSearchParams" in s,
2623
2623
  iterable: "Symbol" in s && "iterator" in Symbol,
2624
2624
  blob: "FileReader" in s && "Blob" in s && function() {
@@ -2634,7 +2634,7 @@ var ge = { exports: {} };
2634
2634
  function h(a) {
2635
2635
  return a && DataView.prototype.isPrototypeOf(a);
2636
2636
  }
2637
- if (u.arrayBuffer)
2637
+ if (c.arrayBuffer)
2638
2638
  var p = [
2639
2639
  "[object Int8Array]",
2640
2640
  "[object Uint8Array]",
@@ -2663,7 +2663,7 @@ var ge = { exports: {} };
2663
2663
  return { done: E === void 0, value: E };
2664
2664
  }
2665
2665
  };
2666
- return u.iterable && (l[Symbol.iterator] = function() {
2666
+ return c.iterable && (l[Symbol.iterator] = function() {
2667
2667
  return l;
2668
2668
  }), l;
2669
2669
  }
@@ -2706,13 +2706,13 @@ var ge = { exports: {} };
2706
2706
  return this.forEach(function(l, E) {
2707
2707
  a.push([E, l]);
2708
2708
  }), T(a);
2709
- }, u.iterable && (g.prototype[Symbol.iterator] = g.prototype.entries);
2709
+ }, c.iterable && (g.prototype[Symbol.iterator] = g.prototype.entries);
2710
2710
  function N(a) {
2711
2711
  if (a.bodyUsed)
2712
2712
  return Promise.reject(new TypeError("Already read"));
2713
2713
  a.bodyUsed = !0;
2714
2714
  }
2715
- function D(a) {
2715
+ function S(a) {
2716
2716
  return new Promise(function(l, E) {
2717
2717
  a.onload = function() {
2718
2718
  l(a.result);
@@ -2721,17 +2721,17 @@ var ge = { exports: {} };
2721
2721
  };
2722
2722
  });
2723
2723
  }
2724
- function R(a) {
2725
- var l = new FileReader(), E = D(l);
2724
+ function D(a) {
2725
+ var l = new FileReader(), E = S(l);
2726
2726
  return l.readAsArrayBuffer(a), E;
2727
2727
  }
2728
2728
  function z(a) {
2729
- var l = new FileReader(), E = D(l);
2729
+ var l = new FileReader(), E = S(l);
2730
2730
  return l.readAsText(a), E;
2731
2731
  }
2732
- function P(a) {
2733
- for (var l = new Uint8Array(a), E = new Array(l.length), S = 0; S < l.length; S++)
2734
- E[S] = String.fromCharCode(l[S]);
2732
+ function _(a) {
2733
+ for (var l = new Uint8Array(a), E = new Array(l.length), R = 0; R < l.length; R++)
2734
+ E[R] = String.fromCharCode(l[R]);
2735
2735
  return E.join("");
2736
2736
  }
2737
2737
  function k(a) {
@@ -2742,8 +2742,8 @@ var ge = { exports: {} };
2742
2742
  }
2743
2743
  function B() {
2744
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
- }, u.blob && (this.blob = function() {
2745
+ this._bodyInit = a, a ? typeof a == "string" ? this._bodyText = a : c.blob && Blob.prototype.isPrototypeOf(a) ? this._bodyBlob = a : c.formData && FormData.prototype.isPrototypeOf(a) ? this._bodyFormData = a : c.searchParams && URLSearchParams.prototype.isPrototypeOf(a) ? this._bodyText = a.toString() : c.arrayBuffer && c.blob && h(a) ? (this._bodyArrayBuffer = k(a.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : c.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) : c.searchParams && URLSearchParams.prototype.isPrototypeOf(a) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
2746
+ }, c.blob && (this.blob = function() {
2747
2747
  var a = N(this);
2748
2748
  if (a)
2749
2749
  return a;
@@ -2755,7 +2755,7 @@ var ge = { 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 ? N(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(R);
2758
+ return this._bodyArrayBuffer ? N(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(D);
2759
2759
  }), this.text = function() {
2760
2760
  var a = N(this);
2761
2761
  if (a)
@@ -2763,12 +2763,12 @@ var ge = { exports: {} };
2763
2763
  if (this._bodyBlob)
2764
2764
  return z(this._bodyBlob);
2765
2765
  if (this._bodyArrayBuffer)
2766
- return Promise.resolve(P(this._bodyArrayBuffer));
2766
+ return Promise.resolve(_(this._bodyArrayBuffer));
2767
2767
  if (this._bodyFormData)
2768
2768
  throw new Error("could not read FormData body as text");
2769
2769
  return Promise.resolve(this._bodyText);
2770
- }, u.formData && (this.formData = function() {
2771
- return this.text().then($e);
2770
+ }, c.formData && (this.formData = function() {
2771
+ return this.text().then(Ge);
2772
2772
  }), this.json = function() {
2773
2773
  return this.text().then(JSON.parse);
2774
2774
  }, this;
@@ -2794,19 +2794,19 @@ var ge = { exports: {} };
2794
2794
  w.prototype.clone = function() {
2795
2795
  return new w(this, { body: this._bodyInit });
2796
2796
  };
2797
- function $e(a) {
2797
+ function Ge(a) {
2798
2798
  var l = new FormData();
2799
2799
  return a.trim().split("&").forEach(function(E) {
2800
2800
  if (E) {
2801
- var S = E.split("="), x = S.shift().replace(/\+/g, " "), A = S.join("=").replace(/\+/g, " ");
2801
+ var R = E.split("="), x = R.shift().replace(/\+/g, " "), A = R.join("=").replace(/\+/g, " ");
2802
2802
  l.append(decodeURIComponent(x), decodeURIComponent(A));
2803
2803
  }
2804
2804
  }), l;
2805
2805
  }
2806
- function je(a) {
2806
+ function $e(a) {
2807
2807
  var l = new g(), E = a.replace(/\r?\n[\t ]+/g, " ");
2808
- return E.split(/\r?\n/).forEach(function(S) {
2809
- var x = S.split(":"), A = x.shift().trim();
2808
+ return E.split(/\r?\n/).forEach(function(R) {
2809
+ var x = R.split(":"), A = x.shift().trim();
2810
2810
  if (A) {
2811
2811
  var X = x.join(":").trim();
2812
2812
  l.append(A, X);
@@ -2828,9 +2828,9 @@ var ge = { exports: {} };
2828
2828
  var a = new L(null, { status: 0, statusText: "" });
2829
2829
  return a.type = "error", a;
2830
2830
  };
2831
- var Ge = [301, 302, 303, 307, 308];
2831
+ var je = [301, 302, 303, 307, 308];
2832
2832
  L.redirect = function(a, l) {
2833
- if (Ge.indexOf(l) === -1)
2833
+ if (je.indexOf(l) === -1)
2834
2834
  throw new RangeError("Invalid status code");
2835
2835
  return new L(null, { status: l, headers: { location: a } });
2836
2836
  }, o.DOMException = s.DOMException;
@@ -2839,36 +2839,36 @@ var ge = { exports: {} };
2839
2839
  } catch {
2840
2840
  o.DOMException = function(l, E) {
2841
2841
  this.message = l, this.name = E;
2842
- var S = Error(l);
2843
- this.stack = S.stack;
2842
+ var R = Error(l);
2843
+ this.stack = R.stack;
2844
2844
  }, o.DOMException.prototype = Object.create(Error.prototype), o.DOMException.prototype.constructor = o.DOMException;
2845
2845
  }
2846
2846
  function ae(a, l) {
2847
- return new Promise(function(E, S) {
2847
+ return new Promise(function(E, R) {
2848
2848
  var x = new w(a, l);
2849
2849
  if (x.signal && x.signal.aborted)
2850
- return S(new o.DOMException("Aborted", "AbortError"));
2850
+ return R(new o.DOMException("Aborted", "AbortError"));
2851
2851
  var A = new XMLHttpRequest();
2852
2852
  function X() {
2853
2853
  A.abort();
2854
2854
  }
2855
2855
  A.onload = function() {
2856
- var $ = {
2856
+ var G = {
2857
2857
  status: A.status,
2858
2858
  statusText: A.statusText,
2859
- headers: je(A.getAllResponseHeaders() || "")
2859
+ headers: $e(A.getAllResponseHeaders() || "")
2860
2860
  };
2861
- $.url = "responseURL" in A ? A.responseURL : $.headers.get("X-Request-URL");
2862
- var ce = "response" in A ? A.response : A.responseText;
2863
- E(new L(ce, $));
2861
+ G.url = "responseURL" in A ? A.responseURL : G.headers.get("X-Request-URL");
2862
+ var ue = "response" in A ? A.response : A.responseText;
2863
+ E(new L(ue, G));
2864
2864
  }, A.onerror = function() {
2865
- S(new TypeError("Network request failed"));
2865
+ R(new TypeError("Network request failed"));
2866
2866
  }, A.ontimeout = function() {
2867
- S(new TypeError("Network request failed"));
2867
+ R(new TypeError("Network request failed"));
2868
2868
  }, A.onabort = function() {
2869
- S(new o.DOMException("Aborted", "AbortError"));
2870
- }, A.open(x.method, x.url, !0), x.credentials === "include" ? A.withCredentials = !0 : x.credentials === "omit" && (A.withCredentials = !1), "responseType" in A && u.blob && (A.responseType = "blob"), x.headers.forEach(function($, ce) {
2871
- A.setRequestHeader(ce, $);
2869
+ R(new o.DOMException("Aborted", "AbortError"));
2870
+ }, A.open(x.method, x.url, !0), x.credentials === "include" ? A.withCredentials = !0 : x.credentials === "omit" && (A.withCredentials = !1), "responseType" in A && c.blob && (A.responseType = "blob"), x.headers.forEach(function(G, ue) {
2871
+ A.setRequestHeader(ue, G);
2872
2872
  }), x.signal && (x.signal.addEventListener("abort", X), A.onreadystatechange = function() {
2873
2873
  A.readyState === 4 && x.signal.removeEventListener("abort", X);
2874
2874
  }), A.send(typeof x._bodyInit > "u" ? null : x._bodyInit);
@@ -2881,74 +2881,74 @@ var ge = { exports: {} };
2881
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;
2882
2882
  })(ge, ge.exports);
2883
2883
  var ne = ge.exports;
2884
- const ee = /* @__PURE__ */ Vt(ne), $t = /* @__PURE__ */ ze({
2884
+ const ee = /* @__PURE__ */ Vt(ne), Gt = /* @__PURE__ */ ze({
2885
2885
  __proto__: null,
2886
2886
  default: ee
2887
2887
  }, [ne]), U = (e) => {
2888
2888
  let t = {};
2889
- return e && (typeof Headers < "u" && e instanceof Headers || $t && ne.Headers && e instanceof ne.Headers ? t = Je(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
2889
+ return e && (typeof Headers < "u" && e instanceof Headers || Gt && ne.Headers && e instanceof ne.Headers ? t = Je(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
2890
2890
  n && r !== void 0 && (t[n] = r);
2891
2891
  }) : t = e), t;
2892
- }, De = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), jt = (e) => {
2892
+ }, Oe = (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))}`];
2894
+ const r = e, i = [`query=${encodeURIComponent(Oe(r.query))}`];
2895
2895
  return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.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
2899
  const t = e, n = e.query.reduce((r, i, s) => (r.push({
2900
- query: De(i),
2900
+ query: Oe(i),
2901
2901
  variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0
2902
2902
  }), r), []);
2903
2903
  return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
2904
- }, Gt = (e) => async (t) => {
2905
- const { url: n, query: r, variables: i, operationName: s, fetch: o, fetchOptions: u, middleware: h } = t, p = { ...t.headers };
2904
+ }, jt = (e) => async (t) => {
2905
+ const { url: n, query: r, variables: i, operationName: s, fetch: o, fetchOptions: c, middleware: h } = t, p = { ...t.headers };
2906
2906
  let m = "", y;
2907
- e === "POST" ? (y = Yt(r, i, s, u.jsonSerializer), typeof y == "string" && (p["Content-Type"] = "application/json")) : m = jt({
2907
+ e === "POST" ? (y = Yt(r, i, s, c.jsonSerializer), typeof y == "string" && (p["Content-Type"] = "application/json")) : m = $t({
2908
2908
  query: r,
2909
2909
  variables: i,
2910
2910
  operationName: s,
2911
- jsonSerializer: u.jsonSerializer ?? Ce
2911
+ jsonSerializer: c.jsonSerializer ?? Ce
2912
2912
  });
2913
2913
  const C = {
2914
2914
  method: e,
2915
2915
  headers: p,
2916
2916
  body: y,
2917
- ...u
2917
+ ...c
2918
2918
  };
2919
2919
  let T = n, g = C;
2920
2920
  if (h) {
2921
- const N = await Promise.resolve(h({ ...C, url: n, operationName: s, variables: i })), { url: D, ...R } = N;
2922
- T = D, g = R;
2921
+ const N = await Promise.resolve(h({ ...C, url: n, operationName: s, variables: i })), { url: S, ...D } = N;
2922
+ T = S, g = D;
2923
2923
  }
2924
2924
  return m && (T = `${T}?${m}`), await o(T, g);
2925
2925
  };
2926
2926
  class Ht {
2927
2927
  constructor(t, n = {}) {
2928
2928
  this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => {
2929
- const [i, s, o] = r, u = We(i, s, o), { headers: h, fetch: p = ee, method: m = "POST", requestMiddleware: y, responseMiddleware: C, ...T } = this.requestConfig, { url: g } = this;
2930
- u.signal !== void 0 && (T.signal = u.signal);
2931
- const { operationName: N } = le(u.query);
2929
+ const [i, s, o] = r, c = We(i, s, o), { headers: h, fetch: p = ee, method: m = "POST", requestMiddleware: y, responseMiddleware: C, ...T } = this.requestConfig, { url: g } = this;
2930
+ c.signal !== void 0 && (T.signal = c.signal);
2931
+ const { operationName: N } = le(c.query);
2932
2932
  return de({
2933
2933
  url: g,
2934
- query: u.query,
2935
- variables: u.variables,
2934
+ query: c.query,
2935
+ variables: c.variables,
2936
2936
  headers: {
2937
2937
  ...U(he(h)),
2938
- ...U(u.requestHeaders)
2938
+ ...U(c.requestHeaders)
2939
2939
  },
2940
2940
  operationName: N,
2941
2941
  fetch: p,
2942
2942
  method: m,
2943
2943
  fetchOptions: T,
2944
2944
  middleware: y
2945
- }).then((D) => (C && C(D), D)).catch((D) => {
2946
- throw C && C(D), D;
2945
+ }).then((S) => (C && C(S), S)).catch((S) => {
2946
+ throw C && C(S), S;
2947
2947
  });
2948
2948
  };
2949
2949
  }
2950
2950
  async request(t, ...n) {
2951
- const [r, i] = n, s = Xe(t, r, i), { headers: o, fetch: u = ee, method: h = "POST", requestMiddleware: p, responseMiddleware: m, ...y } = this.requestConfig, { url: C } = this;
2951
+ const [r, i] = n, s = Xe(t, r, i), { headers: o, fetch: c = ee, method: h = "POST", requestMiddleware: p, responseMiddleware: m, ...y } = this.requestConfig, { url: C } = this;
2952
2952
  s.signal !== void 0 && (y.signal = s.signal);
2953
2953
  const { query: T, operationName: g } = le(s.document);
2954
2954
  return de({
@@ -2960,7 +2960,7 @@ class Ht {
2960
2960
  ...U(s.requestHeaders)
2961
2961
  },
2962
2962
  operationName: g,
2963
- fetch: u,
2963
+ fetch: c,
2964
2964
  method: h,
2965
2965
  fetchOptions: y,
2966
2966
  middleware: p
@@ -2972,12 +2972,12 @@ class Ht {
2972
2972
  batchRequests(t, n) {
2973
2973
  const r = Ke(t, n), { headers: i, ...s } = this.requestConfig;
2974
2974
  r.signal !== void 0 && (s.signal = r.signal);
2975
- const o = r.documents.map(({ document: h }) => le(h).query), u = r.documents.map(({ variables: h }) => h);
2975
+ const o = r.documents.map(({ document: h }) => le(h).query), c = r.documents.map(({ variables: h }) => h);
2976
2976
  return de({
2977
2977
  url: this.url,
2978
2978
  query: o,
2979
2979
  // @ts-expect-error TODO reconcile batch variables into system.
2980
- variables: u,
2980
+ variables: c,
2981
2981
  headers: {
2982
2982
  ...U(he(i)),
2983
2983
  ...U(r.requestHeaders)
@@ -3009,18 +3009,18 @@ class Ht {
3009
3009
  }
3010
3010
  }
3011
3011
  const de = async (e) => {
3012
- const { query: t, variables: n, fetchOptions: r } = e, i = Gt(Qe(e.method ?? "post")), s = Array.isArray(e.query), o = await i(e), u = await zt(o, r.jsonSerializer ?? Ce), h = Array.isArray(u) ? !u.some(({ data: m }) => !m) : !!u.data, p = Array.isArray(u) || !u.errors || Array.isArray(u.errors) && !u.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
3012
+ const { query: t, variables: n, fetchOptions: r } = e, i = jt(Qe(e.method ?? "post")), s = Array.isArray(e.query), o = await i(e), c = await zt(o, r.jsonSerializer ?? Ce), h = Array.isArray(c) ? !c.some(({ data: m }) => !m) : !!c.data, p = Array.isArray(c) || !c.errors || Array.isArray(c.errors) && !c.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
3013
3013
  if (o.ok && p && h) {
3014
- const { errors: m, ...y } = (Array.isArray(u), u), C = r.errorPolicy === "ignore" ? y : u;
3014
+ const { errors: m, ...y } = (Array.isArray(c), c), C = r.errorPolicy === "ignore" ? y : c;
3015
3015
  return {
3016
3016
  ...s ? { data: C } : C,
3017
3017
  headers: o.headers,
3018
3018
  status: o.status
3019
3019
  };
3020
3020
  } else {
3021
- const m = typeof u == "string" ? {
3022
- error: u
3023
- } : u;
3021
+ const m = typeof c == "string" ? {
3022
+ error: c
3023
+ } : c;
3024
3024
  throw new H(
3025
3025
  // @ts-expect-error TODO
3026
3026
  { ...m, status: o.status, headers: o.headers },
@@ -3033,7 +3033,7 @@ const de = async (e) => {
3033
3033
  return i.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((o, u, h) => (o.push({ query: u, variables: t ? t[h] : void 0 }), o), []);
3036
+ const s = e.reduce((o, c, h) => (o.push({ query: c, variables: t ? t[h] : void 0 }), o), []);
3037
3037
  return i.stringify(s);
3038
3038
  }, zt = async (e, t) => {
3039
3039
  let n;
@@ -3115,7 +3115,7 @@ function en() {
3115
3115
  function tn() {
3116
3116
  ie = !1;
3117
3117
  }
3118
- var j = {
3118
+ var $ = {
3119
3119
  gql: q,
3120
3120
  resetCaches: Kt,
3121
3121
  disableFragmentWarnings: Zt,
@@ -3123,7 +3123,7 @@ var j = {
3123
3123
  disableExperimentalFragmentVariables: tn
3124
3124
  };
3125
3125
  (function(e) {
3126
- e.gql = j.gql, e.resetCaches = j.resetCaches, e.disableFragmentWarnings = j.disableFragmentWarnings, e.enableExperimentalFragmentVariables = j.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = j.disableExperimentalFragmentVariables;
3126
+ e.gql = $.gql, e.resetCaches = $.resetCaches, e.disableFragmentWarnings = $.disableFragmentWarnings, e.enableExperimentalFragmentVariables = $.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = $.disableExperimentalFragmentVariables;
3127
3127
  })(q || (q = {}));
3128
3128
  q.default = q;
3129
3129
  const O = q, nn = O`
@@ -3243,7 +3243,7 @@ const O = q, nn = O`
3243
3243
  }
3244
3244
  }
3245
3245
  }
3246
- `, cn = O`
3246
+ `, un = O`
3247
3247
  query GetPurchasingCustomerDiscounts($first: Int, $after: String, $isReverse: Boolean! = false) {
3248
3248
  purchasingCustomer {
3249
3249
  id
@@ -3272,7 +3272,7 @@ const O = q, nn = O`
3272
3272
  }
3273
3273
  }
3274
3274
  }
3275
- `, un = O`
3275
+ `, cn = O`
3276
3276
  query GetPurchasingCustomerDiscountCodeCount {
3277
3277
  purchasingCustomer {
3278
3278
  id
@@ -3435,6 +3435,17 @@ const O = q, nn = O`
3435
3435
  }
3436
3436
  }
3437
3437
  `, mn = O`
3438
+ query GetPointCampaignOrderRuleTargetCustomerRank {
3439
+ pointCampaignOrderRuleTargetCustomerRank {
3440
+ pointCampaignOrderRule {
3441
+ id
3442
+ title
3443
+ }
3444
+ multiplier
3445
+ fixedPoint
3446
+ }
3447
+ }
3448
+ `, gn = O`
3438
3449
  mutation PurchasingCustomerSendCustomerSharingActivationCode {
3439
3450
  purchasingCustomerSendCustomerSharingActivationCode {
3440
3451
  purchasingCustomer {
@@ -3450,7 +3461,7 @@ const O = q, nn = O`
3450
3461
  }
3451
3462
  }
3452
3463
  }
3453
- `, gn = O`
3464
+ `, yn = O`
3454
3465
  mutation PurchasingCustomerActivateCustomerSharing($email: String!, $activationCode: String!) {
3455
3466
  purchasingCustomerActivateCustomerSharing(
3456
3467
  input: {email: $email, activationCode: $activationCode}
@@ -3465,8 +3476,8 @@ const O = q, nn = O`
3465
3476
  }
3466
3477
  }
3467
3478
  }
3468
- `, yn = (e, t, n, r) => e();
3469
- function Cn(e, t = yn) {
3479
+ `, Cn = (e, t, n, r) => e();
3480
+ function En(e, t = Cn) {
3470
3481
  return {
3471
3482
  GetLocationAvailabilities(n, r) {
3472
3483
  return t((i) => e.request(nn, n, { ...r, ...i }), "GetLocationAvailabilities", "query", n);
@@ -3484,10 +3495,10 @@ function Cn(e, t = yn) {
3484
3495
  return t((i) => e.request(an, n, { ...r, ...i }), "GetLocations", "query", n);
3485
3496
  },
3486
3497
  GetPurchasingCustomerDiscounts(n, r) {
3487
- return t((i) => e.request(cn, n, { ...r, ...i }), "GetPurchasingCustomerDiscounts", "query", n);
3498
+ return t((i) => e.request(un, n, { ...r, ...i }), "GetPurchasingCustomerDiscounts", "query", n);
3488
3499
  },
3489
3500
  GetPurchasingCustomerDiscountCodeCount(n, r) {
3490
- return t((i) => e.request(un, n, { ...r, ...i }), "GetPurchasingCustomerDiscountCodeCount", "query", n);
3501
+ return t((i) => e.request(cn, n, { ...r, ...i }), "GetPurchasingCustomerDiscountCodeCount", "query", n);
3491
3502
  },
3492
3503
  GetPurchasingCustomerPointChangeActivities(n, r) {
3493
3504
  return t((i) => e.request(ln, n, { ...r, ...i }), "GetPurchasingCustomerPointChangeActivities", "query", n);
@@ -3504,18 +3515,21 @@ function Cn(e, t = yn) {
3504
3515
  GetProduct(n, r) {
3505
3516
  return t((i) => e.request(fn, n, { ...r, ...i }), "GetProduct", "query", n);
3506
3517
  },
3518
+ GetPointCampaignOrderRuleTargetCustomerRank(n, r) {
3519
+ return t((i) => e.request(mn, n, { ...r, ...i }), "GetPointCampaignOrderRuleTargetCustomerRank", "query", n);
3520
+ },
3507
3521
  PurchasingCustomerSendCustomerSharingActivationCode(n, r) {
3508
- return t((i) => e.request(mn, n, { ...r, ...i }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
3522
+ return t((i) => e.request(gn, n, { ...r, ...i }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
3509
3523
  },
3510
3524
  PurchasingCustomerActivateCustomerSharing(n, r) {
3511
- return t((i) => e.request(gn, n, { ...r, ...i }), "PurchasingCustomerActivateCustomerSharing", "mutation", n);
3525
+ return t((i) => e.request(yn, n, { ...r, ...i }), "PurchasingCustomerActivateCustomerSharing", "mutation", n);
3512
3526
  }
3513
3527
  };
3514
3528
  }
3515
- class vn {
3529
+ class An {
3516
3530
  constructor(t) {
3517
3531
  Ae(this, "api");
3518
- this.api = Cn(
3532
+ this.api = En(
3519
3533
  new Ht(`${t}/apps/sq-api`, {
3520
3534
  headers: {
3521
3535
  "X-SQ-CLIENT": "ShopifyAppProxy"
@@ -3630,22 +3644,22 @@ class vn {
3630
3644
  async getLocations(t, n, r, i, s) {
3631
3645
  const o = await this.api.GetLocations({ tag: t, provinceCodes: n, first: r, after: i, isReverse: s });
3632
3646
  return {
3633
- nodes: o.locations.nodes.map((u) => ({
3634
- id: u.id,
3635
- name: u.name,
3636
- phone: u.phone,
3637
- mapURL: u.mapURL,
3638
- tags: u.tags,
3639
- address: u.address ? {
3640
- id: u.address.id,
3641
- countryCode: u.address.countryCode,
3642
- country: u.address.country,
3643
- postalCode: u.address.postalCode,
3644
- provinceCode: u.address.provinceCode,
3645
- province: u.address.province,
3646
- city: u.address.city,
3647
- address1: u.address.address1,
3648
- address2: u.address.address2
3647
+ nodes: o.locations.nodes.map((c) => ({
3648
+ id: c.id,
3649
+ name: c.name,
3650
+ phone: c.phone,
3651
+ mapURL: c.mapURL,
3652
+ tags: c.tags,
3653
+ address: c.address ? {
3654
+ id: c.address.id,
3655
+ countryCode: c.address.countryCode,
3656
+ country: c.address.country,
3657
+ postalCode: c.address.postalCode,
3658
+ provinceCode: c.address.provinceCode,
3659
+ province: c.address.province,
3660
+ city: c.address.city,
3661
+ address1: c.address.address1,
3662
+ address2: c.address.address2
3649
3663
  } : void 0
3650
3664
  })) ?? [],
3651
3665
  pageInfo: o.locations.pageInfo ?? null
@@ -3843,14 +3857,14 @@ class vn {
3843
3857
  isLocalPickupAvailable: o.productByProductShopifyLegacyResourceID.isLocalPickupAvailable,
3844
3858
  variants: {
3845
3859
  nodes: o.productByProductShopifyLegacyResourceID.productVariants.nodes.map(
3846
- (u) => ({
3847
- id: u.id,
3848
- title: u.title,
3849
- isBackOrderEnable: u.isBackOrderEnable,
3850
- isLocalPickupAvailable: u.isLocalPickupAvailable,
3860
+ (c) => ({
3861
+ id: c.id,
3862
+ title: c.title,
3863
+ isBackOrderEnable: c.isBackOrderEnable,
3864
+ isLocalPickupAvailable: c.isLocalPickupAvailable,
3851
3865
  inventoryItem: {
3852
- id: u.inventoryItem.id,
3853
- sku: u.inventoryItem.sku
3866
+ id: c.inventoryItem.id,
3867
+ sku: c.inventoryItem.sku
3854
3868
  }
3855
3869
  })
3856
3870
  ),
@@ -3858,6 +3872,17 @@ class vn {
3858
3872
  }
3859
3873
  } : null;
3860
3874
  }
3875
+ async getPointCampaignOrderRuleTargetCustomerRank() {
3876
+ const t = await this.api.GetPointCampaignOrderRuleTargetCustomerRank();
3877
+ return t.pointCampaignOrderRuleTargetCustomerRank ? {
3878
+ pointCampaignOrderRule: {
3879
+ id: t.pointCampaignOrderRuleTargetCustomerRank.pointCampaignOrderRule.id,
3880
+ title: t.pointCampaignOrderRuleTargetCustomerRank.pointCampaignOrderRule.title
3881
+ },
3882
+ multiplier: t.pointCampaignOrderRuleTargetCustomerRank.multiplier ? t.pointCampaignOrderRuleTargetCustomerRank.multiplier : void 0,
3883
+ fixedPoint: t.pointCampaignOrderRuleTargetCustomerRank.fixedPoint ? t.pointCampaignOrderRuleTargetCustomerRank.fixedPoint : void 0
3884
+ } : null;
3885
+ }
3861
3886
  /**
3862
3887
  * purchasingCustomerSendCustomerSharingActivationCode はログインしているアカウントのメールアドレスに顧客情報共有のためのアクティベーションコードを送信します。
3863
3888
  */
@@ -3898,5 +3923,5 @@ class vn {
3898
3923
  }
3899
3924
  }
3900
3925
  export {
3901
- vn as SDK
3926
+ An as SDK
3902
3927
  };