@ticketapp-dev/shop-sdk 1.0.78 → 1.0.80

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.
package/dist/index.js CHANGED
@@ -22,38 +22,38 @@ const ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22
22
  SortOrder: ee
23
23
  }, Symbol.toStringTag, { value: "Module" }));
24
24
  var w = function() {
25
- return w = Object.assign || function(t) {
26
- for (var n, i = 1, r = arguments.length; i < r; i++) {
27
- n = arguments[i];
28
- for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
25
+ return w = Object.assign || function(n) {
26
+ for (var t, i = 1, r = arguments.length; i < r; i++) {
27
+ t = arguments[i];
28
+ for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (n[s] = t[s]);
29
29
  }
30
- return t;
30
+ return n;
31
31
  }, w.apply(this, arguments);
32
32
  };
33
- function U(e, t) {
33
+ function V(e, n) {
34
34
  if (!!!e)
35
- throw new Error(t);
35
+ throw new Error(n);
36
36
  }
37
37
  function Ne(e) {
38
38
  return typeof e == "object" && e !== null;
39
39
  }
40
- function Pe(e, t) {
40
+ function Pe(e, n) {
41
41
  if (!!!e)
42
42
  throw new Error(
43
43
  "Unexpected invariant triggered."
44
44
  );
45
45
  }
46
46
  const be = /\r\n|[\n\r]/g;
47
- function M(e, t) {
48
- let n = 0, i = 1;
47
+ function M(e, n) {
48
+ let t = 0, i = 1;
49
49
  for (const r of e.body.matchAll(be)) {
50
- if (typeof r.index == "number" || Pe(!1), r.index >= t)
50
+ if (typeof r.index == "number" || Pe(!1), r.index >= n)
51
51
  break;
52
- n = r.index + r[0].length, i += 1;
52
+ t = r.index + r[0].length, i += 1;
53
53
  }
54
54
  return {
55
55
  line: i,
56
- column: t + 1 - n
56
+ column: n + 1 - t
57
57
  };
58
58
  }
59
59
  function xe(e) {
@@ -62,8 +62,8 @@ function xe(e) {
62
62
  M(e.source, e.start)
63
63
  );
64
64
  }
65
- function le(e, t) {
66
- const n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, l = t.line === 1 ? n : 0, h = t.column + l, I = `${e.name}:${o}:${h}
65
+ function le(e, n) {
66
+ const t = e.locationOffset.column - 1, i = "".padStart(t) + e.body, r = n.line - 1, s = e.locationOffset.line - 1, o = n.line + s, l = n.line === 1 ? t : 0, h = n.column + l, I = `${e.name}:${o}:${h}
67
67
  `, g = i.split(/\r\n|[\n\r]/g), k = g[r];
68
68
  if (k.length > 120) {
69
69
  const c = Math.floor(h / 80), E = h % 80, p = [];
@@ -85,20 +85,20 @@ function le(e, t) {
85
85
  ]);
86
86
  }
87
87
  function Q(e) {
88
- const t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
89
- return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
88
+ const n = e.filter(([i, r]) => r !== void 0), t = Math.max(...n.map(([i]) => i.length));
89
+ return n.map(([i, r]) => i.padStart(t) + (r ? " " + r : "")).join(`
90
90
  `);
91
91
  }
92
92
  function Se(e) {
93
- const t = e[0];
94
- return t == null || "kind" in t || "length" in t ? {
95
- nodes: t,
93
+ const n = e[0];
94
+ return n == null || "kind" in n || "length" in n ? {
95
+ nodes: n,
96
96
  source: e[1],
97
97
  positions: e[2],
98
98
  path: e[3],
99
99
  originalError: e[4],
100
100
  extensions: e[5]
101
- } : t;
101
+ } : n;
102
102
  }
103
103
  class G extends Error {
104
104
  /**
@@ -139,10 +139,10 @@ class G extends Error {
139
139
  /**
140
140
  * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
141
141
  */
142
- constructor(t, ...n) {
142
+ constructor(n, ...t) {
143
143
  var i, r, s;
144
- const { nodes: o, source: l, positions: h, path: I, originalError: g, extensions: k } = Se(n);
145
- super(t), this.name = "GraphQLError", this.path = I ?? void 0, this.originalError = g ?? void 0, this.nodes = X(
144
+ const { nodes: o, source: l, positions: h, path: I, originalError: g, extensions: k } = Se(t);
145
+ super(n), this.name = "GraphQLError", this.path = I ?? void 0, this.originalError = g ?? void 0, this.nodes = X(
146
146
  Array.isArray(o) ? o : o ? [o] : void 0
147
147
  );
148
148
  const c = X(
@@ -186,33 +186,33 @@ class G extends Error {
186
186
  return "GraphQLError";
187
187
  }
188
188
  toString() {
189
- let t = this.message;
189
+ let n = this.message;
190
190
  if (this.nodes)
191
- for (const n of this.nodes)
192
- n.loc && (t += `
191
+ for (const t of this.nodes)
192
+ t.loc && (n += `
193
193
 
194
- ` + xe(n.loc));
194
+ ` + xe(t.loc));
195
195
  else if (this.source && this.locations)
196
- for (const n of this.locations)
197
- t += `
196
+ for (const t of this.locations)
197
+ n += `
198
198
 
199
- ` + le(this.source, n);
200
- return t;
199
+ ` + le(this.source, t);
200
+ return n;
201
201
  }
202
202
  toJSON() {
203
- const t = {
203
+ const n = {
204
204
  message: this.message
205
205
  };
206
- 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;
206
+ return this.locations != null && (n.locations = this.locations), this.path != null && (n.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (n.extensions = this.extensions), n;
207
207
  }
208
208
  }
209
209
  function X(e) {
210
210
  return e === void 0 || e.length === 0 ? void 0 : e;
211
211
  }
212
- function f(e, t, n) {
213
- return new G(`Syntax Error: ${n}`, {
212
+ function f(e, n, t) {
213
+ return new G(`Syntax Error: ${t}`, {
214
214
  source: e,
215
- positions: [t]
215
+ positions: [n]
216
216
  });
217
217
  }
218
218
  class Ce {
@@ -231,8 +231,8 @@ class Ce {
231
231
  /**
232
232
  * The Source document the AST represents.
233
233
  */
234
- constructor(t, n, i) {
235
- this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
234
+ constructor(n, t, i) {
235
+ this.start = n.start, this.end = t.end, this.startToken = n, this.endToken = t, this.source = i;
236
236
  }
237
237
  get [Symbol.toStringTag]() {
238
238
  return "Location";
@@ -271,8 +271,8 @@ class he {
271
271
  * including ignored tokens. <SOF> is always the first node and <EOF>
272
272
  * the last.
273
273
  */
274
- constructor(t, n, i, r, s, o) {
275
- this.kind = t, this.start = n, this.end = i, this.line = r, this.column = s, this.value = o, this.prev = null, this.next = null;
274
+ constructor(n, t, i, r, s, o) {
275
+ this.kind = n, this.start = t, this.end = i, this.line = r, this.column = s, this.value = o, this.prev = null, this.next = null;
276
276
  }
277
277
  get [Symbol.toStringTag]() {
278
278
  return "Token";
@@ -404,23 +404,23 @@ function Re(e) {
404
404
  return pe(e) || S(e) || e === 95;
405
405
  }
406
406
  function we(e) {
407
- var t;
408
- let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
407
+ var n;
408
+ let t = Number.MAX_SAFE_INTEGER, i = null, r = -1;
409
409
  for (let o = 0; o < e.length; ++o) {
410
410
  var s;
411
411
  const l = e[o], h = Fe(l);
412
- h !== l.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && h < n && (n = h));
412
+ h !== l.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && h < t && (t = h));
413
413
  }
414
- return e.map((o, l) => l === 0 ? o : o.slice(n)).slice(
415
- (t = i) !== null && t !== void 0 ? t : 0,
414
+ return e.map((o, l) => l === 0 ? o : o.slice(t)).slice(
415
+ (n = i) !== null && n !== void 0 ? n : 0,
416
416
  r + 1
417
417
  );
418
418
  }
419
419
  function Fe(e) {
420
- let t = 0;
421
- for (; t < e.length && Le(e.charCodeAt(t)); )
422
- ++t;
423
- return t;
420
+ let n = 0;
421
+ for (; n < e.length && Le(e.charCodeAt(n)); )
422
+ ++n;
423
+ return n;
424
424
  }
425
425
  var a;
426
426
  (function(e) {
@@ -439,9 +439,9 @@ class $e {
439
439
  /**
440
440
  * The character offset at which the current line begins.
441
441
  */
442
- constructor(t) {
443
- const n = new he(a.SOF, 0, 0, 0, 0);
444
- this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
442
+ constructor(n) {
443
+ const t = new he(a.SOF, 0, 0, 0, 0);
444
+ this.source = n, this.lastToken = t, this.token = t, this.line = 1, this.lineStart = 0;
445
445
  }
446
446
  get [Symbol.toStringTag]() {
447
447
  return "Lexer";
@@ -457,17 +457,17 @@ class $e {
457
457
  * the state of Lexer.
458
458
  */
459
459
  lookahead() {
460
- let t = this.token;
461
- if (t.kind !== a.EOF)
460
+ let n = this.token;
461
+ if (n.kind !== a.EOF)
462
462
  do
463
- if (t.next)
464
- t = t.next;
463
+ if (n.next)
464
+ n = n.next;
465
465
  else {
466
- const n = Ue(this, t.end);
467
- t.next = n, n.prev = t, t = n;
466
+ const t = Ve(this, n.end);
467
+ n.next = t, t.prev = n, n = t;
468
468
  }
469
- while (t.kind === a.COMMENT);
470
- return t;
469
+ while (n.kind === a.COMMENT);
470
+ return n;
471
471
  }
472
472
  }
473
473
  function Be(e) {
@@ -476,8 +476,8 @@ function Be(e) {
476
476
  function P(e) {
477
477
  return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
478
478
  }
479
- function $(e, t) {
480
- return me(e.charCodeAt(t)) && fe(e.charCodeAt(t + 1));
479
+ function $(e, n) {
480
+ return me(e.charCodeAt(n)) && fe(e.charCodeAt(n + 1));
481
481
  }
482
482
  function me(e) {
483
483
  return e >= 55296 && e <= 56319;
@@ -485,25 +485,25 @@ function me(e) {
485
485
  function fe(e) {
486
486
  return e >= 56320 && e <= 57343;
487
487
  }
488
- function D(e, t) {
489
- const n = e.source.body.codePointAt(t);
490
- if (n === void 0)
488
+ function D(e, n) {
489
+ const t = e.source.body.codePointAt(n);
490
+ if (t === void 0)
491
491
  return a.EOF;
492
- if (n >= 32 && n <= 126) {
493
- const i = String.fromCodePoint(n);
492
+ if (t >= 32 && t <= 126) {
493
+ const i = String.fromCodePoint(t);
494
494
  return i === '"' ? `'"'` : `"${i}"`;
495
495
  }
496
- return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
496
+ return "U+" + t.toString(16).toUpperCase().padStart(4, "0");
497
497
  }
498
- function m(e, t, n, i, r) {
499
- const s = e.line, o = 1 + n - e.lineStart;
500
- return new he(t, n, i, s, o, r);
498
+ function m(e, n, t, i, r) {
499
+ const s = e.line, o = 1 + t - e.lineStart;
500
+ return new he(n, t, i, s, o, r);
501
501
  }
502
- function Ue(e, t) {
503
- const n = e.source.body, i = n.length;
504
- let r = t;
502
+ function Ve(e, n) {
503
+ const t = e.source.body, i = t.length;
504
+ let r = n;
505
505
  for (; r < i; ) {
506
- const s = n.charCodeAt(r);
506
+ const s = t.charCodeAt(r);
507
507
  switch (s) {
508
508
  // Ignored ::
509
509
  // - UnicodeBOM
@@ -536,11 +536,11 @@ function Ue(e, t) {
536
536
  ++r, ++e.line, e.lineStart = r;
537
537
  continue;
538
538
  case 13:
539
- n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
539
+ t.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
540
540
  continue;
541
541
  // Comment
542
542
  case 35:
543
- return Ve(e, r);
543
+ return Ue(e, r);
544
544
  // Token ::
545
545
  // - Punctuator
546
546
  // - Name
@@ -560,7 +560,7 @@ function Ue(e, t) {
560
560
  case 41:
561
561
  return m(e, a.PAREN_R, r, r + 1);
562
562
  case 46:
563
- if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46)
563
+ if (t.charCodeAt(r + 1) === 46 && t.charCodeAt(r + 2) === 46)
564
564
  return m(e, a.SPREAD, r, r + 3);
565
565
  break;
566
566
  case 58:
@@ -581,7 +581,7 @@ function Ue(e, t) {
581
581
  return m(e, a.BRACE_R, r, r + 1);
582
582
  // StringValue
583
583
  case 34:
584
- return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? He(e, r) : qe(e, r);
584
+ return t.charCodeAt(r + 1) === 34 && t.charCodeAt(r + 2) === 34 ? He(e, r) : qe(e, r);
585
585
  }
586
586
  if (S(s) || s === 45)
587
587
  return Me(e, r, s);
@@ -590,21 +590,21 @@ function Ue(e, t) {
590
590
  throw f(
591
591
  e.source,
592
592
  r,
593
- s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : P(s) || $(n, r) ? `Unexpected character: ${D(e, r)}.` : `Invalid character: ${D(e, r)}.`
593
+ s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : P(s) || $(t, r) ? `Unexpected character: ${D(e, r)}.` : `Invalid character: ${D(e, r)}.`
594
594
  );
595
595
  }
596
596
  return m(e, a.EOF, i, i);
597
597
  }
598
- function Ve(e, t) {
599
- const n = e.source.body, i = n.length;
600
- let r = t + 1;
598
+ function Ue(e, n) {
599
+ const t = e.source.body, i = t.length;
600
+ let r = n + 1;
601
601
  for (; r < i; ) {
602
- const s = n.charCodeAt(r);
602
+ const s = t.charCodeAt(r);
603
603
  if (s === 10 || s === 13)
604
604
  break;
605
605
  if (P(s))
606
606
  ++r;
607
- else if ($(n, r))
607
+ else if ($(t, r))
608
608
  r += 2;
609
609
  else
610
610
  break;
@@ -612,14 +612,14 @@ function Ve(e, t) {
612
612
  return m(
613
613
  e,
614
614
  a.COMMENT,
615
- t,
615
+ n,
616
616
  r,
617
- n.slice(t + 1, r)
617
+ t.slice(n + 1, r)
618
618
  );
619
619
  }
620
- function Me(e, t, n) {
620
+ function Me(e, n, t) {
621
621
  const i = e.source.body;
622
- let r = t, s = n, o = !1;
622
+ let r = n, s = t, o = !1;
623
623
  if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
624
624
  if (s = i.charCodeAt(++r), S(s))
625
625
  throw f(
@@ -631,8 +631,8 @@ function Me(e, t, n) {
631
631
  )}.`
632
632
  );
633
633
  } else
634
- r = V(e, r, s), s = i.charCodeAt(r);
635
- if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = V(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 = V(e, r, s), s = i.charCodeAt(r)), s === 46 || ge(s))
634
+ r = U(e, r, s), s = i.charCodeAt(r);
635
+ if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = U(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 = U(e, r, s), s = i.charCodeAt(r)), s === 46 || ge(s))
636
636
  throw f(
637
637
  e.source,
638
638
  r,
@@ -644,37 +644,37 @@ function Me(e, t, n) {
644
644
  return m(
645
645
  e,
646
646
  o ? a.FLOAT : a.INT,
647
- t,
647
+ n,
648
648
  r,
649
- i.slice(t, r)
649
+ i.slice(n, r)
650
650
  );
651
651
  }
652
- function V(e, t, n) {
653
- if (!S(n))
652
+ function U(e, n, t) {
653
+ if (!S(t))
654
654
  throw f(
655
655
  e.source,
656
- t,
656
+ n,
657
657
  `Invalid number, expected digit but got: ${D(
658
658
  e,
659
- t
659
+ n
660
660
  )}.`
661
661
  );
662
662
  const i = e.source.body;
663
- let r = t + 1;
663
+ let r = n + 1;
664
664
  for (; S(i.charCodeAt(r)); )
665
665
  ++r;
666
666
  return r;
667
667
  }
668
- function qe(e, t) {
669
- const n = e.source.body, i = n.length;
670
- let r = t + 1, s = r, o = "";
668
+ function qe(e, n) {
669
+ const t = e.source.body, i = t.length;
670
+ let r = n + 1, s = r, o = "";
671
671
  for (; r < i; ) {
672
- const l = n.charCodeAt(r);
672
+ const l = t.charCodeAt(r);
673
673
  if (l === 34)
674
- return o += n.slice(s, r), m(e, a.STRING, t, r + 1, o);
674
+ return o += t.slice(s, r), m(e, a.STRING, n, r + 1, o);
675
675
  if (l === 92) {
676
- o += n.slice(s, r);
677
- const h = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? ze(e, r) : Ge(e, r) : je(e, r);
676
+ o += t.slice(s, r);
677
+ const h = t.charCodeAt(r + 1) === 117 ? t.charCodeAt(r + 2) === 123 ? ze(e, r) : Ge(e, r) : je(e, r);
678
678
  o += h.value, r += h.size, s = r;
679
679
  continue;
680
680
  }
@@ -682,7 +682,7 @@ function qe(e, t) {
682
682
  break;
683
683
  if (P(l))
684
684
  ++r;
685
- else if ($(n, r))
685
+ else if ($(t, r))
686
686
  r += 2;
687
687
  else
688
688
  throw f(
@@ -696,11 +696,11 @@ function qe(e, t) {
696
696
  }
697
697
  throw f(e.source, r, "Unterminated string.");
698
698
  }
699
- function ze(e, t) {
700
- const n = e.source.body;
699
+ function ze(e, n) {
700
+ const t = e.source.body;
701
701
  let i = 0, r = 3;
702
702
  for (; r < 12; ) {
703
- const s = n.charCodeAt(t + r++);
703
+ const s = t.charCodeAt(n + r++);
704
704
  if (s === 125) {
705
705
  if (r < 5 || !P(i))
706
706
  break;
@@ -714,22 +714,22 @@ function ze(e, t) {
714
714
  }
715
715
  throw f(
716
716
  e.source,
717
- t,
718
- `Invalid Unicode escape sequence: "${n.slice(
719
- t,
720
- t + r
717
+ n,
718
+ `Invalid Unicode escape sequence: "${t.slice(
719
+ n,
720
+ n + r
721
721
  )}".`
722
722
  );
723
723
  }
724
- function Ge(e, t) {
725
- const n = e.source.body, i = J(n, t + 2);
724
+ function Ge(e, n) {
725
+ const t = e.source.body, i = J(t, n + 2);
726
726
  if (P(i))
727
727
  return {
728
728
  value: String.fromCodePoint(i),
729
729
  size: 6
730
730
  };
731
- if (me(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
732
- const r = J(n, t + 8);
731
+ if (me(i) && t.charCodeAt(n + 6) === 92 && t.charCodeAt(n + 7) === 117) {
732
+ const r = J(t, n + 8);
733
733
  if (fe(r))
734
734
  return {
735
735
  value: String.fromCodePoint(i, r),
@@ -738,19 +738,19 @@ function Ge(e, t) {
738
738
  }
739
739
  throw f(
740
740
  e.source,
741
- t,
742
- `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
741
+ n,
742
+ `Invalid Unicode escape sequence: "${t.slice(n, n + 6)}".`
743
743
  );
744
744
  }
745
- function J(e, t) {
746
- return x(e.charCodeAt(t)) << 12 | x(e.charCodeAt(t + 1)) << 8 | x(e.charCodeAt(t + 2)) << 4 | x(e.charCodeAt(t + 3));
745
+ function J(e, n) {
746
+ return x(e.charCodeAt(n)) << 12 | x(e.charCodeAt(n + 1)) << 8 | x(e.charCodeAt(n + 2)) << 4 | x(e.charCodeAt(n + 3));
747
747
  }
748
748
  function x(e) {
749
749
  return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
750
750
  }
751
- function je(e, t) {
752
- const n = e.source.body;
753
- switch (n.charCodeAt(t + 1)) {
751
+ function je(e, n) {
752
+ const t = e.source.body;
753
+ switch (t.charCodeAt(n + 1)) {
754
754
  case 34:
755
755
  return {
756
756
  value: '"',
@@ -795,25 +795,25 @@ function je(e, t) {
795
795
  }
796
796
  throw f(
797
797
  e.source,
798
- t,
799
- `Invalid character escape sequence: "${n.slice(
800
- t,
801
- t + 2
798
+ n,
799
+ `Invalid character escape sequence: "${t.slice(
800
+ n,
801
+ n + 2
802
802
  )}".`
803
803
  );
804
804
  }
805
- function He(e, t) {
806
- const n = e.source.body, i = n.length;
807
- let r = e.lineStart, s = t + 3, o = s, l = "";
805
+ function He(e, n) {
806
+ const t = e.source.body, i = t.length;
807
+ let r = e.lineStart, s = n + 3, o = s, l = "";
808
808
  const h = [];
809
809
  for (; s < i; ) {
810
- const I = n.charCodeAt(s);
811
- if (I === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
812
- l += n.slice(o, s), h.push(l);
810
+ const I = t.charCodeAt(s);
811
+ if (I === 34 && t.charCodeAt(s + 1) === 34 && t.charCodeAt(s + 2) === 34) {
812
+ l += t.slice(o, s), h.push(l);
813
813
  const g = m(
814
814
  e,
815
815
  a.BLOCK_STRING,
816
- t,
816
+ n,
817
817
  s + 3,
818
818
  // Return a string of the lines joined with U+000A.
819
819
  we(h).join(`
@@ -821,17 +821,17 @@ function He(e, t) {
821
821
  );
822
822
  return e.line += h.length - 1, e.lineStart = r, g;
823
823
  }
824
- if (I === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
825
- l += n.slice(o, s), o = s + 1, s += 4;
824
+ if (I === 92 && t.charCodeAt(s + 1) === 34 && t.charCodeAt(s + 2) === 34 && t.charCodeAt(s + 3) === 34) {
825
+ l += t.slice(o, s), o = s + 1, s += 4;
826
826
  continue;
827
827
  }
828
828
  if (I === 10 || I === 13) {
829
- l += n.slice(o, s), h.push(l), I === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, l = "", o = s, r = s;
829
+ l += t.slice(o, s), h.push(l), I === 13 && t.charCodeAt(s + 1) === 10 ? s += 2 : ++s, l = "", o = s, r = s;
830
830
  continue;
831
831
  }
832
832
  if (P(I))
833
833
  ++s;
834
- else if ($(n, s))
834
+ else if ($(t, s))
835
835
  s += 2;
836
836
  else
837
837
  throw f(
@@ -845,11 +845,11 @@ function He(e, t) {
845
845
  }
846
846
  throw f(e.source, s, "Unterminated string.");
847
847
  }
848
- function Ye(e, t) {
849
- const n = e.source.body, i = n.length;
850
- let r = t + 1;
848
+ function Ye(e, n) {
849
+ const t = e.source.body, i = t.length;
850
+ let r = n + 1;
851
851
  for (; r < i; ) {
852
- const s = n.charCodeAt(r);
852
+ const s = t.charCodeAt(r);
853
853
  if (Re(s))
854
854
  ++r;
855
855
  else
@@ -858,86 +858,86 @@ function Ye(e, t) {
858
858
  return m(
859
859
  e,
860
860
  a.NAME,
861
- t,
861
+ n,
862
862
  r,
863
- n.slice(t, r)
863
+ t.slice(n, r)
864
864
  );
865
865
  }
866
866
  const Qe = 10, Ie = 2;
867
867
  function Ee(e) {
868
868
  return B(e, []);
869
869
  }
870
- function B(e, t) {
870
+ function B(e, n) {
871
871
  switch (typeof e) {
872
872
  case "string":
873
873
  return JSON.stringify(e);
874
874
  case "function":
875
875
  return e.name ? `[function ${e.name}]` : "[function]";
876
876
  case "object":
877
- return Xe(e, t);
877
+ return Xe(e, n);
878
878
  default:
879
879
  return String(e);
880
880
  }
881
881
  }
882
- function Xe(e, t) {
882
+ function Xe(e, n) {
883
883
  if (e === null)
884
884
  return "null";
885
- if (t.includes(e))
885
+ if (n.includes(e))
886
886
  return "[Circular]";
887
- const n = [...t, e];
887
+ const t = [...n, e];
888
888
  if (Je(e)) {
889
889
  const i = e.toJSON();
890
890
  if (i !== e)
891
- return typeof i == "string" ? i : B(i, n);
891
+ return typeof i == "string" ? i : B(i, t);
892
892
  } else if (Array.isArray(e))
893
- return Ze(e, n);
894
- return We(e, n);
893
+ return Ze(e, t);
894
+ return We(e, t);
895
895
  }
896
896
  function Je(e) {
897
897
  return typeof e.toJSON == "function";
898
898
  }
899
- function We(e, t) {
900
- const n = Object.entries(e);
901
- return n.length === 0 ? "{}" : t.length > Ie ? "[" + Ke(e) + "]" : "{ " + n.map(
902
- ([r, s]) => r + ": " + B(s, t)
899
+ function We(e, n) {
900
+ const t = Object.entries(e);
901
+ return t.length === 0 ? "{}" : n.length > Ie ? "[" + Ke(e) + "]" : "{ " + t.map(
902
+ ([r, s]) => r + ": " + B(s, n)
903
903
  ).join(", ") + " }";
904
904
  }
905
- function Ze(e, t) {
905
+ function Ze(e, n) {
906
906
  if (e.length === 0)
907
907
  return "[]";
908
- if (t.length > Ie)
908
+ if (n.length > Ie)
909
909
  return "[Array]";
910
- const n = Math.min(Qe, e.length), i = e.length - n, r = [];
911
- for (let s = 0; s < n; ++s)
912
- r.push(B(e[s], t));
910
+ const t = Math.min(Qe, e.length), i = e.length - t, r = [];
911
+ for (let s = 0; s < t; ++s)
912
+ r.push(B(e[s], n));
913
913
  return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
914
914
  }
915
915
  function Ke(e) {
916
- const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
917
- if (t === "Object" && typeof e.constructor == "function") {
918
- const n = e.constructor.name;
919
- if (typeof n == "string" && n !== "")
920
- return n;
916
+ const n = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
917
+ if (n === "Object" && typeof e.constructor == "function") {
918
+ const t = e.constructor.name;
919
+ if (typeof t == "string" && t !== "")
920
+ return t;
921
921
  }
922
- return t;
922
+ return n;
923
923
  }
924
924
  const et = globalThis.process && // eslint-disable-next-line no-undef
925
925
  process.env.NODE_ENV === "production", tt = (
926
926
  /* c8 ignore next 6 */
927
927
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
928
- et ? function(t, n) {
929
- return t instanceof n;
930
- } : function(t, n) {
931
- if (t instanceof n)
928
+ et ? function(n, t) {
929
+ return n instanceof t;
930
+ } : function(n, t) {
931
+ if (n instanceof t)
932
932
  return !0;
933
- if (typeof t == "object" && t !== null) {
933
+ if (typeof n == "object" && n !== null) {
934
934
  var i;
935
- const r = n.prototype[Symbol.toStringTag], s = (
935
+ const r = t.prototype[Symbol.toStringTag], s = (
936
936
  // We still need to support constructor's name to detect conflicts with older versions of this library.
937
- Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name
937
+ Symbol.toStringTag in n ? n[Symbol.toStringTag] : (i = n.constructor) === null || i === void 0 ? void 0 : i.name
938
938
  );
939
939
  if (r === s) {
940
- const o = Ee(t);
940
+ const o = Ee(n);
941
941
  throw new Error(`Cannot use ${r} "${o}" from another module or realm.
942
942
 
943
943
  Ensure that there is only one instance of "graphql" in the node_modules
@@ -956,14 +956,14 @@ spurious results.`);
956
956
  }
957
957
  );
958
958
  class ye {
959
- constructor(t, n = "GraphQL request", i = {
959
+ constructor(n, t = "GraphQL request", i = {
960
960
  line: 1,
961
961
  column: 1
962
962
  }) {
963
- typeof t == "string" || U(!1, `Body must be a string. Received: ${Ee(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || U(
963
+ typeof n == "string" || V(!1, `Body must be a string. Received: ${Ee(n)}.`), this.body = n, this.name = t, this.locationOffset = i, this.locationOffset.line > 0 || V(
964
964
  !1,
965
965
  "line in locationOffset is 1-indexed and must be positive."
966
- ), this.locationOffset.column > 0 || U(
966
+ ), this.locationOffset.column > 0 || V(
967
967
  !1,
968
968
  "column in locationOffset is 1-indexed and must be positive."
969
969
  );
@@ -975,20 +975,20 @@ class ye {
975
975
  function nt(e) {
976
976
  return tt(e, ye);
977
977
  }
978
- function it(e, t) {
979
- const n = new rt(e, t), i = n.parseDocument();
978
+ function it(e, n) {
979
+ const t = new rt(e, n), i = t.parseDocument();
980
980
  return Object.defineProperty(i, "tokenCount", {
981
981
  enumerable: !1,
982
- value: n.tokenCount
982
+ value: t.tokenCount
983
983
  }), i;
984
984
  }
985
985
  class rt {
986
- constructor(t, n = {}) {
987
- const { lexer: i, ...r } = n;
986
+ constructor(n, t = {}) {
987
+ const { lexer: i, ...r } = t;
988
988
  if (i)
989
989
  this._lexer = i;
990
990
  else {
991
- const s = nt(t) ? t : new ye(t);
991
+ const s = nt(n) ? n : new ye(n);
992
992
  this._lexer = new $e(s);
993
993
  }
994
994
  this._options = r, this._tokenCounter = 0;
@@ -1000,10 +1000,10 @@ class rt {
1000
1000
  * Converts a name lex token into a name parse node.
1001
1001
  */
1002
1002
  parseName() {
1003
- const t = this.expectToken(a.NAME);
1004
- return this.node(t, {
1003
+ const n = this.expectToken(a.NAME);
1004
+ return this.node(n, {
1005
1005
  kind: d.NAME,
1006
- value: t.value
1006
+ value: n.value
1007
1007
  });
1008
1008
  }
1009
1009
  // Implements the parsing rules in the Document section.
@@ -1046,15 +1046,15 @@ class rt {
1046
1046
  parseDefinition() {
1047
1047
  if (this.peek(a.BRACE_L))
1048
1048
  return this.parseOperationDefinition();
1049
- const t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
1050
- if (t && n.kind === a.BRACE_L)
1049
+ const n = this.peekDescription(), t = n ? this._lexer.lookahead() : this._lexer.token;
1050
+ if (n && t.kind === a.BRACE_L)
1051
1051
  throw f(
1052
1052
  this._lexer.source,
1053
1053
  this._lexer.token.start,
1054
1054
  "Unexpected description, descriptions are not supported on shorthand queries."
1055
1055
  );
1056
- if (n.kind === a.NAME) {
1057
- switch (n.value) {
1056
+ if (t.kind === a.NAME) {
1057
+ switch (t.value) {
1058
1058
  case "schema":
1059
1059
  return this.parseSchemaDefinition();
1060
1060
  case "scalar":
@@ -1072,7 +1072,7 @@ class rt {
1072
1072
  case "directive":
1073
1073
  return this.parseDirectiveDefinition();
1074
1074
  }
1075
- switch (n.value) {
1075
+ switch (t.value) {
1076
1076
  case "query":
1077
1077
  case "mutation":
1078
1078
  case "subscription":
@@ -1080,16 +1080,16 @@ class rt {
1080
1080
  case "fragment":
1081
1081
  return this.parseFragmentDefinition();
1082
1082
  }
1083
- if (t)
1083
+ if (n)
1084
1084
  throw f(
1085
1085
  this._lexer.source,
1086
1086
  this._lexer.token.start,
1087
1087
  "Unexpected description, only GraphQL definitions support descriptions."
1088
1088
  );
1089
- if (n.value === "extend")
1089
+ if (t.value === "extend")
1090
1090
  return this.parseTypeSystemExtension();
1091
1091
  }
1092
- throw this.unexpected(n);
1092
+ throw this.unexpected(t);
1093
1093
  }
1094
1094
  // Implements the parsing rules in the Operations section.
1095
1095
  /**
@@ -1098,9 +1098,9 @@ class rt {
1098
1098
  * - OperationType Name? VariableDefinitions? Directives? SelectionSet
1099
1099
  */
1100
1100
  parseOperationDefinition() {
1101
- const t = this._lexer.token;
1101
+ const n = this._lexer.token;
1102
1102
  if (this.peek(a.BRACE_L))
1103
- return this.node(t, {
1103
+ return this.node(n, {
1104
1104
  kind: d.OPERATION_DEFINITION,
1105
1105
  operation: v.QUERY,
1106
1106
  description: void 0,
@@ -1109,12 +1109,12 @@ class rt {
1109
1109
  directives: [],
1110
1110
  selectionSet: this.parseSelectionSet()
1111
1111
  });
1112
- const n = this.parseDescription(), i = this.parseOperationType();
1112
+ const t = this.parseDescription(), i = this.parseOperationType();
1113
1113
  let r;
1114
- return this.peek(a.NAME) && (r = this.parseName()), this.node(t, {
1114
+ return this.peek(a.NAME) && (r = this.parseName()), this.node(n, {
1115
1115
  kind: d.OPERATION_DEFINITION,
1116
1116
  operation: i,
1117
- description: n,
1117
+ description: t,
1118
1118
  name: r,
1119
1119
  variableDefinitions: this.parseVariableDefinitions(),
1120
1120
  directives: this.parseDirectives(!1),
@@ -1125,8 +1125,8 @@ class rt {
1125
1125
  * OperationType : one of query mutation subscription
1126
1126
  */
1127
1127
  parseOperationType() {
1128
- const t = this.expectToken(a.NAME);
1129
- switch (t.value) {
1128
+ const n = this.expectToken(a.NAME);
1129
+ switch (n.value) {
1130
1130
  case "query":
1131
1131
  return v.QUERY;
1132
1132
  case "mutation":
@@ -1134,7 +1134,7 @@ class rt {
1134
1134
  case "subscription":
1135
1135
  return v.SUBSCRIPTION;
1136
1136
  }
1137
- throw this.unexpected(t);
1137
+ throw this.unexpected(n);
1138
1138
  }
1139
1139
  /**
1140
1140
  * VariableDefinitions : ( VariableDefinition+ )
@@ -1163,8 +1163,8 @@ class rt {
1163
1163
  * Variable : $ Name
1164
1164
  */
1165
1165
  parseVariable() {
1166
- const t = this._lexer.token;
1167
- return this.expectToken(a.DOLLAR), this.node(t, {
1166
+ const n = this._lexer.token;
1167
+ return this.expectToken(a.DOLLAR), this.node(n, {
1168
1168
  kind: d.VARIABLE,
1169
1169
  name: this.parseName()
1170
1170
  });
@@ -1199,9 +1199,9 @@ class rt {
1199
1199
  * Alias : Name :
1200
1200
  */
1201
1201
  parseField() {
1202
- const t = this._lexer.token, n = this.parseName();
1202
+ const n = this._lexer.token, t = this.parseName();
1203
1203
  let i, r;
1204
- return this.expectOptionalToken(a.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
1204
+ return this.expectOptionalToken(a.COLON) ? (i = t, r = this.parseName()) : r = t, this.node(n, {
1205
1205
  kind: d.FIELD,
1206
1206
  alias: i,
1207
1207
  name: r,
@@ -1213,19 +1213,19 @@ class rt {
1213
1213
  /**
1214
1214
  * Arguments[Const] : ( Argument[?Const]+ )
1215
1215
  */
1216
- parseArguments(t) {
1217
- const n = t ? this.parseConstArgument : this.parseArgument;
1218
- return this.optionalMany(a.PAREN_L, n, a.PAREN_R);
1216
+ parseArguments(n) {
1217
+ const t = n ? this.parseConstArgument : this.parseArgument;
1218
+ return this.optionalMany(a.PAREN_L, t, a.PAREN_R);
1219
1219
  }
1220
1220
  /**
1221
1221
  * Argument[Const] : Name : Value[?Const]
1222
1222
  */
1223
- parseArgument(t = !1) {
1224
- const n = this._lexer.token, i = this.parseName();
1225
- return this.expectToken(a.COLON), this.node(n, {
1223
+ parseArgument(n = !1) {
1224
+ const t = this._lexer.token, i = this.parseName();
1225
+ return this.expectToken(a.COLON), this.node(t, {
1226
1226
  kind: d.ARGUMENT,
1227
1227
  name: i,
1228
- value: this.parseValueLiteral(t)
1228
+ value: this.parseValueLiteral(n)
1229
1229
  });
1230
1230
  }
1231
1231
  parseConstArgument() {
@@ -1240,16 +1240,16 @@ class rt {
1240
1240
  * InlineFragment : ... TypeCondition? Directives? SelectionSet
1241
1241
  */
1242
1242
  parseFragment() {
1243
- const t = this._lexer.token;
1243
+ const n = this._lexer.token;
1244
1244
  this.expectToken(a.SPREAD);
1245
- const n = this.expectOptionalKeyword("on");
1246
- return !n && this.peek(a.NAME) ? this.node(t, {
1245
+ const t = this.expectOptionalKeyword("on");
1246
+ return !t && this.peek(a.NAME) ? this.node(n, {
1247
1247
  kind: d.FRAGMENT_SPREAD,
1248
1248
  name: this.parseFragmentName(),
1249
1249
  directives: this.parseDirectives(!1)
1250
- }) : this.node(t, {
1250
+ }) : this.node(n, {
1251
1251
  kind: d.INLINE_FRAGMENT,
1252
- typeCondition: n ? this.parseNamedType() : void 0,
1252
+ typeCondition: t ? this.parseNamedType() : void 0,
1253
1253
  directives: this.parseDirectives(!1),
1254
1254
  selectionSet: this.parseSelectionSet()
1255
1255
  });
@@ -1261,18 +1261,18 @@ class rt {
1261
1261
  * TypeCondition : NamedType
1262
1262
  */
1263
1263
  parseFragmentDefinition() {
1264
- const t = this._lexer.token, n = this.parseDescription();
1265
- return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(t, {
1264
+ const n = this._lexer.token, t = this.parseDescription();
1265
+ return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(n, {
1266
1266
  kind: d.FRAGMENT_DEFINITION,
1267
- description: n,
1267
+ description: t,
1268
1268
  name: this.parseFragmentName(),
1269
1269
  variableDefinitions: this.parseVariableDefinitions(),
1270
1270
  typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
1271
1271
  directives: this.parseDirectives(!1),
1272
1272
  selectionSet: this.parseSelectionSet()
1273
- }) : this.node(t, {
1273
+ }) : this.node(n, {
1274
1274
  kind: d.FRAGMENT_DEFINITION,
1275
- description: n,
1275
+ description: t,
1276
1276
  name: this.parseFragmentName(),
1277
1277
  typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
1278
1278
  directives: this.parseDirectives(!1),
@@ -1306,59 +1306,59 @@ class rt {
1306
1306
  *
1307
1307
  * EnumValue : Name but not `true`, `false` or `null`
1308
1308
  */
1309
- parseValueLiteral(t) {
1310
- const n = this._lexer.token;
1311
- switch (n.kind) {
1309
+ parseValueLiteral(n) {
1310
+ const t = this._lexer.token;
1311
+ switch (t.kind) {
1312
1312
  case a.BRACKET_L:
1313
- return this.parseList(t);
1313
+ return this.parseList(n);
1314
1314
  case a.BRACE_L:
1315
- return this.parseObject(t);
1315
+ return this.parseObject(n);
1316
1316
  case a.INT:
1317
- return this.advanceLexer(), this.node(n, {
1317
+ return this.advanceLexer(), this.node(t, {
1318
1318
  kind: d.INT,
1319
- value: n.value
1319
+ value: t.value
1320
1320
  });
1321
1321
  case a.FLOAT:
1322
- return this.advanceLexer(), this.node(n, {
1322
+ return this.advanceLexer(), this.node(t, {
1323
1323
  kind: d.FLOAT,
1324
- value: n.value
1324
+ value: t.value
1325
1325
  });
1326
1326
  case a.STRING:
1327
1327
  case a.BLOCK_STRING:
1328
1328
  return this.parseStringLiteral();
1329
1329
  case a.NAME:
1330
- switch (this.advanceLexer(), n.value) {
1330
+ switch (this.advanceLexer(), t.value) {
1331
1331
  case "true":
1332
- return this.node(n, {
1332
+ return this.node(t, {
1333
1333
  kind: d.BOOLEAN,
1334
1334
  value: !0
1335
1335
  });
1336
1336
  case "false":
1337
- return this.node(n, {
1337
+ return this.node(t, {
1338
1338
  kind: d.BOOLEAN,
1339
1339
  value: !1
1340
1340
  });
1341
1341
  case "null":
1342
- return this.node(n, {
1342
+ return this.node(t, {
1343
1343
  kind: d.NULL
1344
1344
  });
1345
1345
  default:
1346
- return this.node(n, {
1346
+ return this.node(t, {
1347
1347
  kind: d.ENUM,
1348
- value: n.value
1348
+ value: t.value
1349
1349
  });
1350
1350
  }
1351
1351
  case a.DOLLAR:
1352
- if (t)
1352
+ if (n)
1353
1353
  if (this.expectToken(a.DOLLAR), this._lexer.token.kind === a.NAME) {
1354
1354
  const i = this._lexer.token.value;
1355
1355
  throw f(
1356
1356
  this._lexer.source,
1357
- n.start,
1357
+ t.start,
1358
1358
  `Unexpected variable "$${i}" in constant value.`
1359
1359
  );
1360
1360
  } else
1361
- throw this.unexpected(n);
1361
+ throw this.unexpected(t);
1362
1362
  return this.parseVariable();
1363
1363
  default:
1364
1364
  throw this.unexpected();
@@ -1368,11 +1368,11 @@ class rt {
1368
1368
  return this.parseValueLiteral(!0);
1369
1369
  }
1370
1370
  parseStringLiteral() {
1371
- const t = this._lexer.token;
1372
- return this.advanceLexer(), this.node(t, {
1371
+ const n = this._lexer.token;
1372
+ return this.advanceLexer(), this.node(n, {
1373
1373
  kind: d.STRING,
1374
- value: t.value,
1375
- block: t.kind === a.BLOCK_STRING
1374
+ value: n.value,
1375
+ block: n.kind === a.BLOCK_STRING
1376
1376
  });
1377
1377
  }
1378
1378
  /**
@@ -1380,11 +1380,11 @@ class rt {
1380
1380
  * - [ ]
1381
1381
  * - [ Value[?Const]+ ]
1382
1382
  */
1383
- parseList(t) {
1384
- const n = () => this.parseValueLiteral(t);
1383
+ parseList(n) {
1384
+ const t = () => this.parseValueLiteral(n);
1385
1385
  return this.node(this._lexer.token, {
1386
1386
  kind: d.LIST,
1387
- values: this.any(a.BRACKET_L, n, a.BRACKET_R)
1387
+ values: this.any(a.BRACKET_L, t, a.BRACKET_R)
1388
1388
  });
1389
1389
  }
1390
1390
  /**
@@ -1394,33 +1394,33 @@ class rt {
1394
1394
  * - { ObjectField[?Const]+ }
1395
1395
  * ```
1396
1396
  */
1397
- parseObject(t) {
1398
- const n = () => this.parseObjectField(t);
1397
+ parseObject(n) {
1398
+ const t = () => this.parseObjectField(n);
1399
1399
  return this.node(this._lexer.token, {
1400
1400
  kind: d.OBJECT,
1401
- fields: this.any(a.BRACE_L, n, a.BRACE_R)
1401
+ fields: this.any(a.BRACE_L, t, a.BRACE_R)
1402
1402
  });
1403
1403
  }
1404
1404
  /**
1405
1405
  * ObjectField[Const] : Name : Value[?Const]
1406
1406
  */
1407
- parseObjectField(t) {
1408
- const n = this._lexer.token, i = this.parseName();
1409
- return this.expectToken(a.COLON), this.node(n, {
1407
+ parseObjectField(n) {
1408
+ const t = this._lexer.token, i = this.parseName();
1409
+ return this.expectToken(a.COLON), this.node(t, {
1410
1410
  kind: d.OBJECT_FIELD,
1411
1411
  name: i,
1412
- value: this.parseValueLiteral(t)
1412
+ value: this.parseValueLiteral(n)
1413
1413
  });
1414
1414
  }
1415
1415
  // Implements the parsing rules in the Directives section.
1416
1416
  /**
1417
1417
  * Directives[Const] : Directive[?Const]+
1418
1418
  */
1419
- parseDirectives(t) {
1420
- const n = [];
1419
+ parseDirectives(n) {
1420
+ const t = [];
1421
1421
  for (; this.peek(a.AT); )
1422
- n.push(this.parseDirective(t));
1423
- return n;
1422
+ t.push(this.parseDirective(n));
1423
+ return t;
1424
1424
  }
1425
1425
  parseConstDirectives() {
1426
1426
  return this.parseDirectives(!0);
@@ -1430,12 +1430,12 @@ class rt {
1430
1430
  * Directive[Const] : @ Name Arguments[?Const]?
1431
1431
  * ```
1432
1432
  */
1433
- parseDirective(t) {
1434
- const n = this._lexer.token;
1435
- return this.expectToken(a.AT), this.node(n, {
1433
+ parseDirective(n) {
1434
+ const t = this._lexer.token;
1435
+ return this.expectToken(a.AT), this.node(t, {
1436
1436
  kind: d.DIRECTIVE,
1437
1437
  name: this.parseName(),
1438
- arguments: this.parseArguments(t)
1438
+ arguments: this.parseArguments(n)
1439
1439
  });
1440
1440
  }
1441
1441
  // Implements the parsing rules in the Types section.
@@ -1446,20 +1446,20 @@ class rt {
1446
1446
  * - NonNullType
1447
1447
  */
1448
1448
  parseTypeReference() {
1449
- const t = this._lexer.token;
1450
- let n;
1449
+ const n = this._lexer.token;
1450
+ let t;
1451
1451
  if (this.expectOptionalToken(a.BRACKET_L)) {
1452
1452
  const i = this.parseTypeReference();
1453
- this.expectToken(a.BRACKET_R), n = this.node(t, {
1453
+ this.expectToken(a.BRACKET_R), t = this.node(n, {
1454
1454
  kind: d.LIST_TYPE,
1455
1455
  type: i
1456
1456
  });
1457
1457
  } else
1458
- n = this.parseNamedType();
1459
- return this.expectOptionalToken(a.BANG) ? this.node(t, {
1458
+ t = this.parseNamedType();
1459
+ return this.expectOptionalToken(a.BANG) ? this.node(n, {
1460
1460
  kind: d.NON_NULL_TYPE,
1461
- type: n
1462
- }) : n;
1461
+ type: t
1462
+ }) : t;
1463
1463
  }
1464
1464
  /**
1465
1465
  * NamedType : Name
@@ -1487,16 +1487,16 @@ class rt {
1487
1487
  * ```
1488
1488
  */
1489
1489
  parseSchemaDefinition() {
1490
- const t = this._lexer.token, n = this.parseDescription();
1490
+ const n = this._lexer.token, t = this.parseDescription();
1491
1491
  this.expectKeyword("schema");
1492
1492
  const i = this.parseConstDirectives(), r = this.many(
1493
1493
  a.BRACE_L,
1494
1494
  this.parseOperationTypeDefinition,
1495
1495
  a.BRACE_R
1496
1496
  );
1497
- return this.node(t, {
1497
+ return this.node(n, {
1498
1498
  kind: d.SCHEMA_DEFINITION,
1499
- description: n,
1499
+ description: t,
1500
1500
  directives: i,
1501
1501
  operationTypes: r
1502
1502
  });
@@ -1505,12 +1505,12 @@ class rt {
1505
1505
  * OperationTypeDefinition : OperationType : NamedType
1506
1506
  */
1507
1507
  parseOperationTypeDefinition() {
1508
- const t = this._lexer.token, n = this.parseOperationType();
1508
+ const n = this._lexer.token, t = this.parseOperationType();
1509
1509
  this.expectToken(a.COLON);
1510
1510
  const i = this.parseNamedType();
1511
- return this.node(t, {
1511
+ return this.node(n, {
1512
1512
  kind: d.OPERATION_TYPE_DEFINITION,
1513
- operation: n,
1513
+ operation: t,
1514
1514
  type: i
1515
1515
  });
1516
1516
  }
@@ -1518,12 +1518,12 @@ class rt {
1518
1518
  * ScalarTypeDefinition : Description? scalar Name Directives[Const]?
1519
1519
  */
1520
1520
  parseScalarTypeDefinition() {
1521
- const t = this._lexer.token, n = this.parseDescription();
1521
+ const n = this._lexer.token, t = this.parseDescription();
1522
1522
  this.expectKeyword("scalar");
1523
1523
  const i = this.parseName(), r = this.parseConstDirectives();
1524
- return this.node(t, {
1524
+ return this.node(n, {
1525
1525
  kind: d.SCALAR_TYPE_DEFINITION,
1526
- description: n,
1526
+ description: t,
1527
1527
  name: i,
1528
1528
  directives: r
1529
1529
  });
@@ -1534,12 +1534,12 @@ class rt {
1534
1534
  * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
1535
1535
  */
1536
1536
  parseObjectTypeDefinition() {
1537
- const t = this._lexer.token, n = this.parseDescription();
1537
+ const n = this._lexer.token, t = this.parseDescription();
1538
1538
  this.expectKeyword("type");
1539
1539
  const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1540
- return this.node(t, {
1540
+ return this.node(n, {
1541
1541
  kind: d.OBJECT_TYPE_DEFINITION,
1542
- description: n,
1542
+ description: t,
1543
1543
  name: i,
1544
1544
  interfaces: r,
1545
1545
  directives: s,
@@ -1571,12 +1571,12 @@ class rt {
1571
1571
  * - Description? Name ArgumentsDefinition? : Type Directives[Const]?
1572
1572
  */
1573
1573
  parseFieldDefinition() {
1574
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1574
+ const n = this._lexer.token, t = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1575
1575
  this.expectToken(a.COLON);
1576
1576
  const s = this.parseTypeReference(), o = this.parseConstDirectives();
1577
- return this.node(t, {
1577
+ return this.node(n, {
1578
1578
  kind: d.FIELD_DEFINITION,
1579
- description: n,
1579
+ description: t,
1580
1580
  name: i,
1581
1581
  arguments: r,
1582
1582
  type: s,
@@ -1598,15 +1598,15 @@ class rt {
1598
1598
  * - Description? Name : Type DefaultValue? Directives[Const]?
1599
1599
  */
1600
1600
  parseInputValueDef() {
1601
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
1601
+ const n = this._lexer.token, t = this.parseDescription(), i = this.parseName();
1602
1602
  this.expectToken(a.COLON);
1603
1603
  const r = this.parseTypeReference();
1604
1604
  let s;
1605
1605
  this.expectOptionalToken(a.EQUALS) && (s = this.parseConstValueLiteral());
1606
1606
  const o = this.parseConstDirectives();
1607
- return this.node(t, {
1607
+ return this.node(n, {
1608
1608
  kind: d.INPUT_VALUE_DEFINITION,
1609
- description: n,
1609
+ description: t,
1610
1610
  name: i,
1611
1611
  type: r,
1612
1612
  defaultValue: s,
@@ -1618,12 +1618,12 @@ class rt {
1618
1618
  * - Description? interface Name Directives[Const]? FieldsDefinition?
1619
1619
  */
1620
1620
  parseInterfaceTypeDefinition() {
1621
- const t = this._lexer.token, n = this.parseDescription();
1621
+ const n = this._lexer.token, t = this.parseDescription();
1622
1622
  this.expectKeyword("interface");
1623
1623
  const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1624
- return this.node(t, {
1624
+ return this.node(n, {
1625
1625
  kind: d.INTERFACE_TYPE_DEFINITION,
1626
- description: n,
1626
+ description: t,
1627
1627
  name: i,
1628
1628
  interfaces: r,
1629
1629
  directives: s,
@@ -1635,12 +1635,12 @@ class rt {
1635
1635
  * - Description? union Name Directives[Const]? UnionMemberTypes?
1636
1636
  */
1637
1637
  parseUnionTypeDefinition() {
1638
- const t = this._lexer.token, n = this.parseDescription();
1638
+ const n = this._lexer.token, t = this.parseDescription();
1639
1639
  this.expectKeyword("union");
1640
1640
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1641
- return this.node(t, {
1641
+ return this.node(n, {
1642
1642
  kind: d.UNION_TYPE_DEFINITION,
1643
- description: n,
1643
+ description: t,
1644
1644
  name: i,
1645
1645
  directives: r,
1646
1646
  types: s
@@ -1659,12 +1659,12 @@ class rt {
1659
1659
  * - Description? enum Name Directives[Const]? EnumValuesDefinition?
1660
1660
  */
1661
1661
  parseEnumTypeDefinition() {
1662
- const t = this._lexer.token, n = this.parseDescription();
1662
+ const n = this._lexer.token, t = this.parseDescription();
1663
1663
  this.expectKeyword("enum");
1664
1664
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1665
- return this.node(t, {
1665
+ return this.node(n, {
1666
1666
  kind: d.ENUM_TYPE_DEFINITION,
1667
- description: n,
1667
+ description: t,
1668
1668
  name: i,
1669
1669
  directives: r,
1670
1670
  values: s
@@ -1686,10 +1686,10 @@ class rt {
1686
1686
  * EnumValueDefinition : Description? EnumValue Directives[Const]?
1687
1687
  */
1688
1688
  parseEnumValueDefinition() {
1689
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1690
- return this.node(t, {
1689
+ const n = this._lexer.token, t = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1690
+ return this.node(n, {
1691
1691
  kind: d.ENUM_VALUE_DEFINITION,
1692
- description: n,
1692
+ description: t,
1693
1693
  name: i,
1694
1694
  directives: r
1695
1695
  });
@@ -1713,12 +1713,12 @@ class rt {
1713
1713
  * - Description? input Name Directives[Const]? InputFieldsDefinition?
1714
1714
  */
1715
1715
  parseInputObjectTypeDefinition() {
1716
- const t = this._lexer.token, n = this.parseDescription();
1716
+ const n = this._lexer.token, t = this.parseDescription();
1717
1717
  this.expectKeyword("input");
1718
1718
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1719
- return this.node(t, {
1719
+ return this.node(n, {
1720
1720
  kind: d.INPUT_OBJECT_TYPE_DEFINITION,
1721
- description: n,
1721
+ description: t,
1722
1722
  name: i,
1723
1723
  directives: r,
1724
1724
  fields: s
@@ -1750,9 +1750,9 @@ class rt {
1750
1750
  * - InputObjectTypeDefinition
1751
1751
  */
1752
1752
  parseTypeSystemExtension() {
1753
- const t = this._lexer.lookahead();
1754
- if (t.kind === a.NAME)
1755
- switch (t.value) {
1753
+ const n = this._lexer.lookahead();
1754
+ if (n.kind === a.NAME)
1755
+ switch (n.value) {
1756
1756
  case "schema":
1757
1757
  return this.parseSchemaExtension();
1758
1758
  case "scalar":
@@ -1768,7 +1768,7 @@ class rt {
1768
1768
  case "input":
1769
1769
  return this.parseInputObjectTypeExtension();
1770
1770
  }
1771
- throw this.unexpected(t);
1771
+ throw this.unexpected(n);
1772
1772
  }
1773
1773
  /**
1774
1774
  * ```
@@ -1778,18 +1778,18 @@ class rt {
1778
1778
  * ```
1779
1779
  */
1780
1780
  parseSchemaExtension() {
1781
- const t = this._lexer.token;
1781
+ const n = this._lexer.token;
1782
1782
  this.expectKeyword("extend"), this.expectKeyword("schema");
1783
- const n = this.parseConstDirectives(), i = this.optionalMany(
1783
+ const t = this.parseConstDirectives(), i = this.optionalMany(
1784
1784
  a.BRACE_L,
1785
1785
  this.parseOperationTypeDefinition,
1786
1786
  a.BRACE_R
1787
1787
  );
1788
- if (n.length === 0 && i.length === 0)
1788
+ if (t.length === 0 && i.length === 0)
1789
1789
  throw this.unexpected();
1790
- return this.node(t, {
1790
+ return this.node(n, {
1791
1791
  kind: d.SCHEMA_EXTENSION,
1792
- directives: n,
1792
+ directives: t,
1793
1793
  operationTypes: i
1794
1794
  });
1795
1795
  }
@@ -1798,14 +1798,14 @@ class rt {
1798
1798
  * - extend scalar Name Directives[Const]
1799
1799
  */
1800
1800
  parseScalarTypeExtension() {
1801
- const t = this._lexer.token;
1801
+ const n = this._lexer.token;
1802
1802
  this.expectKeyword("extend"), this.expectKeyword("scalar");
1803
- const n = this.parseName(), i = this.parseConstDirectives();
1803
+ const t = this.parseName(), i = this.parseConstDirectives();
1804
1804
  if (i.length === 0)
1805
1805
  throw this.unexpected();
1806
- return this.node(t, {
1806
+ return this.node(n, {
1807
1807
  kind: d.SCALAR_TYPE_EXTENSION,
1808
- name: n,
1808
+ name: t,
1809
1809
  directives: i
1810
1810
  });
1811
1811
  }
@@ -1816,14 +1816,14 @@ class rt {
1816
1816
  * - extend type Name ImplementsInterfaces
1817
1817
  */
1818
1818
  parseObjectTypeExtension() {
1819
- const t = this._lexer.token;
1819
+ const n = this._lexer.token;
1820
1820
  this.expectKeyword("extend"), this.expectKeyword("type");
1821
- const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1821
+ const t = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1822
1822
  if (i.length === 0 && r.length === 0 && s.length === 0)
1823
1823
  throw this.unexpected();
1824
- return this.node(t, {
1824
+ return this.node(n, {
1825
1825
  kind: d.OBJECT_TYPE_EXTENSION,
1826
- name: n,
1826
+ name: t,
1827
1827
  interfaces: i,
1828
1828
  directives: r,
1829
1829
  fields: s
@@ -1836,14 +1836,14 @@ class rt {
1836
1836
  * - extend interface Name ImplementsInterfaces
1837
1837
  */
1838
1838
  parseInterfaceTypeExtension() {
1839
- const t = this._lexer.token;
1839
+ const n = this._lexer.token;
1840
1840
  this.expectKeyword("extend"), this.expectKeyword("interface");
1841
- const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1841
+ const t = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1842
1842
  if (i.length === 0 && r.length === 0 && s.length === 0)
1843
1843
  throw this.unexpected();
1844
- return this.node(t, {
1844
+ return this.node(n, {
1845
1845
  kind: d.INTERFACE_TYPE_EXTENSION,
1846
- name: n,
1846
+ name: t,
1847
1847
  interfaces: i,
1848
1848
  directives: r,
1849
1849
  fields: s
@@ -1855,14 +1855,14 @@ class rt {
1855
1855
  * - extend union Name Directives[Const]
1856
1856
  */
1857
1857
  parseUnionTypeExtension() {
1858
- const t = this._lexer.token;
1858
+ const n = this._lexer.token;
1859
1859
  this.expectKeyword("extend"), this.expectKeyword("union");
1860
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1860
+ const t = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1861
1861
  if (i.length === 0 && r.length === 0)
1862
1862
  throw this.unexpected();
1863
- return this.node(t, {
1863
+ return this.node(n, {
1864
1864
  kind: d.UNION_TYPE_EXTENSION,
1865
- name: n,
1865
+ name: t,
1866
1866
  directives: i,
1867
1867
  types: r
1868
1868
  });
@@ -1873,14 +1873,14 @@ class rt {
1873
1873
  * - extend enum Name Directives[Const]
1874
1874
  */
1875
1875
  parseEnumTypeExtension() {
1876
- const t = this._lexer.token;
1876
+ const n = this._lexer.token;
1877
1877
  this.expectKeyword("extend"), this.expectKeyword("enum");
1878
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1878
+ const t = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1879
1879
  if (i.length === 0 && r.length === 0)
1880
1880
  throw this.unexpected();
1881
- return this.node(t, {
1881
+ return this.node(n, {
1882
1882
  kind: d.ENUM_TYPE_EXTENSION,
1883
- name: n,
1883
+ name: t,
1884
1884
  directives: i,
1885
1885
  values: r
1886
1886
  });
@@ -1891,14 +1891,14 @@ class rt {
1891
1891
  * - extend input Name Directives[Const]
1892
1892
  */
1893
1893
  parseInputObjectTypeExtension() {
1894
- const t = this._lexer.token;
1894
+ const n = this._lexer.token;
1895
1895
  this.expectKeyword("extend"), this.expectKeyword("input");
1896
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1896
+ const t = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1897
1897
  if (i.length === 0 && r.length === 0)
1898
1898
  throw this.unexpected();
1899
- return this.node(t, {
1899
+ return this.node(n, {
1900
1900
  kind: d.INPUT_OBJECT_TYPE_EXTENSION,
1901
- name: n,
1901
+ name: t,
1902
1902
  directives: i,
1903
1903
  fields: r
1904
1904
  });
@@ -1910,14 +1910,14 @@ class rt {
1910
1910
  * ```
1911
1911
  */
1912
1912
  parseDirectiveDefinition() {
1913
- const t = this._lexer.token, n = this.parseDescription();
1913
+ const n = this._lexer.token, t = this.parseDescription();
1914
1914
  this.expectKeyword("directive"), this.expectToken(a.AT);
1915
1915
  const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1916
1916
  this.expectKeyword("on");
1917
1917
  const o = this.parseDirectiveLocations();
1918
- return this.node(t, {
1918
+ return this.node(n, {
1919
1919
  kind: d.DIRECTIVE_DEFINITION,
1920
- description: n,
1920
+ description: t,
1921
1921
  name: i,
1922
1922
  arguments: r,
1923
1923
  repeatable: s,
@@ -1960,10 +1960,10 @@ class rt {
1960
1960
  * `INPUT_FIELD_DEFINITION`
1961
1961
  */
1962
1962
  parseDirectiveLocation() {
1963
- const t = this._lexer.token, n = this.parseName();
1964
- if (Object.prototype.hasOwnProperty.call(q, n.value))
1965
- return n;
1966
- throw this.unexpected(t);
1963
+ const n = this._lexer.token, t = this.parseName();
1964
+ if (Object.prototype.hasOwnProperty.call(q, t.value))
1965
+ return t;
1966
+ throw this.unexpected(n);
1967
1967
  }
1968
1968
  // Schema Coordinates
1969
1969
  /**
@@ -1975,27 +1975,27 @@ class rt {
1975
1975
  * - \@ Name ( Name : )
1976
1976
  */
1977
1977
  parseSchemaCoordinate() {
1978
- const t = this._lexer.token, n = this.expectOptionalToken(a.AT), i = this.parseName();
1978
+ const n = this._lexer.token, t = this.expectOptionalToken(a.AT), i = this.parseName();
1979
1979
  let r;
1980
- !n && this.expectOptionalToken(a.DOT) && (r = this.parseName());
1980
+ !t && this.expectOptionalToken(a.DOT) && (r = this.parseName());
1981
1981
  let s;
1982
- return (n || r) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), n ? s ? this.node(t, {
1982
+ return (t || r) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), t ? s ? this.node(n, {
1983
1983
  kind: d.DIRECTIVE_ARGUMENT_COORDINATE,
1984
1984
  name: i,
1985
1985
  argumentName: s
1986
- }) : this.node(t, {
1986
+ }) : this.node(n, {
1987
1987
  kind: d.DIRECTIVE_COORDINATE,
1988
1988
  name: i
1989
- }) : r ? s ? this.node(t, {
1989
+ }) : r ? s ? this.node(n, {
1990
1990
  kind: d.ARGUMENT_COORDINATE,
1991
1991
  name: i,
1992
1992
  fieldName: r,
1993
1993
  argumentName: s
1994
- }) : this.node(t, {
1994
+ }) : this.node(n, {
1995
1995
  kind: d.MEMBER_COORDINATE,
1996
1996
  name: i,
1997
1997
  memberName: r
1998
- }) : this.node(t, {
1998
+ }) : this.node(n, {
1999
1999
  kind: d.TYPE_COORDINATE,
2000
2000
  name: i
2001
2001
  });
@@ -2006,72 +2006,72 @@ class rt {
2006
2006
  * location object, used to identify the place in the source that created a
2007
2007
  * given parsed object.
2008
2008
  */
2009
- node(t, n) {
2010
- return this._options.noLocation !== !0 && (n.loc = new Ce(
2011
- t,
2009
+ node(n, t) {
2010
+ return this._options.noLocation !== !0 && (t.loc = new Ce(
2011
+ n,
2012
2012
  this._lexer.lastToken,
2013
2013
  this._lexer.source
2014
- )), n;
2014
+ )), t;
2015
2015
  }
2016
2016
  /**
2017
2017
  * Determines if the next token is of a given kind
2018
2018
  */
2019
- peek(t) {
2020
- return this._lexer.token.kind === t;
2019
+ peek(n) {
2020
+ return this._lexer.token.kind === n;
2021
2021
  }
2022
2022
  /**
2023
2023
  * If the next token is of the given kind, return that token after advancing the lexer.
2024
2024
  * Otherwise, do not change the parser state and throw an error.
2025
2025
  */
2026
- expectToken(t) {
2027
- const n = this._lexer.token;
2028
- if (n.kind === t)
2029
- return this.advanceLexer(), n;
2026
+ expectToken(n) {
2027
+ const t = this._lexer.token;
2028
+ if (t.kind === n)
2029
+ return this.advanceLexer(), t;
2030
2030
  throw f(
2031
2031
  this._lexer.source,
2032
- n.start,
2033
- `Expected ${ke(t)}, found ${_(n)}.`
2032
+ t.start,
2033
+ `Expected ${ke(n)}, found ${_(t)}.`
2034
2034
  );
2035
2035
  }
2036
2036
  /**
2037
2037
  * If the next token is of the given kind, return "true" after advancing the lexer.
2038
2038
  * Otherwise, do not change the parser state and return "false".
2039
2039
  */
2040
- expectOptionalToken(t) {
2041
- return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1;
2040
+ expectOptionalToken(n) {
2041
+ return this._lexer.token.kind === n ? (this.advanceLexer(), !0) : !1;
2042
2042
  }
2043
2043
  /**
2044
2044
  * If the next token is a given keyword, advance the lexer.
2045
2045
  * Otherwise, do not change the parser state and throw an error.
2046
2046
  */
2047
- expectKeyword(t) {
2048
- const n = this._lexer.token;
2049
- if (n.kind === a.NAME && n.value === t)
2047
+ expectKeyword(n) {
2048
+ const t = this._lexer.token;
2049
+ if (t.kind === a.NAME && t.value === n)
2050
2050
  this.advanceLexer();
2051
2051
  else
2052
2052
  throw f(
2053
2053
  this._lexer.source,
2054
- n.start,
2055
- `Expected "${t}", found ${_(n)}.`
2054
+ t.start,
2055
+ `Expected "${n}", found ${_(t)}.`
2056
2056
  );
2057
2057
  }
2058
2058
  /**
2059
2059
  * If the next token is a given keyword, return "true" after advancing the lexer.
2060
2060
  * Otherwise, do not change the parser state and return "false".
2061
2061
  */
2062
- expectOptionalKeyword(t) {
2063
- const n = this._lexer.token;
2064
- return n.kind === a.NAME && n.value === t ? (this.advanceLexer(), !0) : !1;
2062
+ expectOptionalKeyword(n) {
2063
+ const t = this._lexer.token;
2064
+ return t.kind === a.NAME && t.value === n ? (this.advanceLexer(), !0) : !1;
2065
2065
  }
2066
2066
  /**
2067
2067
  * Helper function for creating an error when an unexpected lexed token is encountered.
2068
2068
  */
2069
- unexpected(t) {
2070
- const n = t ?? this._lexer.token;
2069
+ unexpected(n) {
2070
+ const t = n ?? this._lexer.token;
2071
2071
  return f(
2072
2072
  this._lexer.source,
2073
- n.start,
2074
- `Unexpected ${_(n)}.`
2073
+ t.start,
2074
+ `Unexpected ${_(t)}.`
2075
2075
  );
2076
2076
  }
2077
2077
  /**
@@ -2079,11 +2079,11 @@ class rt {
2079
2079
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2080
2080
  * Advances the parser to the next lex token after the closing token.
2081
2081
  */
2082
- any(t, n, i) {
2083
- this.expectToken(t);
2082
+ any(n, t, i) {
2083
+ this.expectToken(n);
2084
2084
  const r = [];
2085
2085
  for (; !this.expectOptionalToken(i); )
2086
- r.push(n.call(this));
2086
+ r.push(t.call(this));
2087
2087
  return r;
2088
2088
  }
2089
2089
  /**
@@ -2092,11 +2092,11 @@ class rt {
2092
2092
  * that begins with a lex token of openKind and ends with a lex token of closeKind.
2093
2093
  * Advances the parser to the next lex token after the closing token.
2094
2094
  */
2095
- optionalMany(t, n, i) {
2096
- if (this.expectOptionalToken(t)) {
2095
+ optionalMany(n, t, i) {
2096
+ if (this.expectOptionalToken(n)) {
2097
2097
  const r = [];
2098
2098
  do
2099
- r.push(n.call(this));
2099
+ r.push(t.call(this));
2100
2100
  while (!this.expectOptionalToken(i));
2101
2101
  return r;
2102
2102
  }
@@ -2107,11 +2107,11 @@ class rt {
2107
2107
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2108
2108
  * Advances the parser to the next lex token after the closing token.
2109
2109
  */
2110
- many(t, n, i) {
2111
- this.expectToken(t);
2110
+ many(n, t, i) {
2111
+ this.expectToken(n);
2112
2112
  const r = [];
2113
2113
  do
2114
- r.push(n.call(this));
2114
+ r.push(t.call(this));
2115
2115
  while (!this.expectOptionalToken(i));
2116
2116
  return r;
2117
2117
  }
@@ -2120,27 +2120,27 @@ class rt {
2120
2120
  * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
2121
2121
  * Advances the parser to the next lex token after last item in the list.
2122
2122
  */
2123
- delimitedMany(t, n) {
2124
- this.expectOptionalToken(t);
2123
+ delimitedMany(n, t) {
2124
+ this.expectOptionalToken(n);
2125
2125
  const i = [];
2126
2126
  do
2127
- i.push(n.call(this));
2128
- while (this.expectOptionalToken(t));
2127
+ i.push(t.call(this));
2128
+ while (this.expectOptionalToken(n));
2129
2129
  return i;
2130
2130
  }
2131
2131
  advanceLexer() {
2132
- const { maxTokens: t } = this._options, n = this._lexer.advance();
2133
- if (n.kind !== a.EOF && (++this._tokenCounter, t !== void 0 && this._tokenCounter > t))
2132
+ const { maxTokens: n } = this._options, t = this._lexer.advance();
2133
+ if (t.kind !== a.EOF && (++this._tokenCounter, n !== void 0 && this._tokenCounter > n))
2134
2134
  throw f(
2135
2135
  this._lexer.source,
2136
- n.start,
2137
- `Document contains more that ${t} tokens. Parsing aborted.`
2136
+ t.start,
2137
+ `Document contains more that ${n} tokens. Parsing aborted.`
2138
2138
  );
2139
2139
  }
2140
2140
  }
2141
2141
  function _(e) {
2142
- const t = e.value;
2143
- return ke(e.kind) + (t != null ? ` "${t}"` : "");
2142
+ const n = e.value;
2143
+ return ke(e.kind) + (n != null ? ` "${n}"` : "");
2144
2144
  }
2145
2145
  function ke(e) {
2146
2146
  return Be(e) ? `"${e}"` : e;
@@ -2153,47 +2153,47 @@ function st(e) {
2153
2153
  return Oe(e.source.body.substring(e.start, e.end));
2154
2154
  }
2155
2155
  function at(e) {
2156
- var t = /* @__PURE__ */ new Set(), n = [];
2156
+ var n = /* @__PURE__ */ new Set(), t = [];
2157
2157
  return e.definitions.forEach(function(i) {
2158
2158
  if (i.kind === "FragmentDefinition") {
2159
2159
  var r = i.name.value, s = st(i.loc), o = z.get(r);
2160
2160
  o && !o.has(s) ? Ae && console.warn("Warning: fragment with name " + r + ` already exists.
2161
2161
  graphql-tag enforces all fragment names across your application to be unique; read more about
2162
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || z.set(r, o = /* @__PURE__ */ new Set()), o.add(s), t.has(s) || (t.add(s), n.push(i));
2162
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || z.set(r, o = /* @__PURE__ */ new Set()), o.add(s), n.has(s) || (n.add(s), t.push(i));
2163
2163
  } else
2164
- n.push(i);
2165
- }), w(w({}, e), { definitions: n });
2164
+ t.push(i);
2165
+ }), w(w({}, e), { definitions: t });
2166
2166
  }
2167
2167
  function ot(e) {
2168
- var t = new Set(e.definitions);
2169
- t.forEach(function(i) {
2168
+ var n = new Set(e.definitions);
2169
+ n.forEach(function(i) {
2170
2170
  i.loc && delete i.loc, Object.keys(i).forEach(function(r) {
2171
2171
  var s = i[r];
2172
- s && typeof s == "object" && t.add(s);
2172
+ s && typeof s == "object" && n.add(s);
2173
2173
  });
2174
2174
  });
2175
- var n = e.loc;
2176
- return n && (delete n.startToken, delete n.endToken), e;
2175
+ var t = e.loc;
2176
+ return t && (delete t.startToken, delete t.endToken), e;
2177
2177
  }
2178
2178
  function ct(e) {
2179
- var t = Oe(e);
2180
- if (!L.has(t)) {
2181
- var n = it(e, {
2179
+ var n = Oe(e);
2180
+ if (!L.has(n)) {
2181
+ var t = it(e, {
2182
2182
  experimentalFragmentVariables: F,
2183
2183
  allowLegacyFragmentVariables: F
2184
2184
  });
2185
- if (!n || n.kind !== "Document")
2185
+ if (!t || t.kind !== "Document")
2186
2186
  throw new Error("Not a valid GraphQL document.");
2187
- L.set(t, ot(at(n)));
2187
+ L.set(n, ot(at(t)));
2188
2188
  }
2189
- return L.get(t);
2189
+ return L.get(n);
2190
2190
  }
2191
2191
  function u(e) {
2192
- for (var t = [], n = 1; n < arguments.length; n++)
2193
- t[n - 1] = arguments[n];
2192
+ for (var n = [], t = 1; t < arguments.length; t++)
2193
+ n[t - 1] = arguments[t];
2194
2194
  typeof e == "string" && (e = [e]);
2195
2195
  var i = e[0];
2196
- return t.forEach(function(r, s) {
2196
+ return n.forEach(function(r, s) {
2197
2197
  r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += e[s + 1];
2198
2198
  }), ct(i);
2199
2199
  }
@@ -2420,113 +2420,113 @@ const pt = u`
2420
2420
  mutation deleteOrder($orderId: ID!) {
2421
2421
  cancelOrder(id: $orderId)
2422
2422
  }
2423
- `, Tt = (e, t, n, i) => e();
2424
- function Dt(e, t = Tt) {
2423
+ `, Tt = (e, n, t, i) => e();
2424
+ function Dt(e, n = Tt) {
2425
2425
  return {
2426
- findActiveOrderById(n, i, r) {
2427
- return t((s) => e.request({ document: pt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", n);
2426
+ findActiveOrderById(t, i, r) {
2427
+ return n((s) => e.request({ document: pt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", t);
2428
2428
  },
2429
- findOrderById(n, i, r) {
2430
- return t((s) => e.request({ document: gt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findOrderById", "query", n);
2429
+ findOrderById(t, i, r) {
2430
+ return n((s) => e.request({ document: gt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findOrderById", "query", t);
2431
2431
  },
2432
- addToOrder(n, i, r) {
2433
- return t((s) => e.request({ document: mt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", n);
2432
+ addToOrder(t, i, r) {
2433
+ return n((s) => e.request({ document: mt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", t);
2434
2434
  },
2435
- removeFromOrder(n, i, r) {
2436
- return t((s) => e.request({ document: ft, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", n);
2435
+ removeFromOrder(t, i, r) {
2436
+ return n((s) => e.request({ document: ft, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", t);
2437
2437
  },
2438
- configureDiscount(n, i, r) {
2439
- return t((s) => e.request({ document: It, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configureDiscount", "mutation", n);
2438
+ configureDiscount(t, i, r) {
2439
+ return n((s) => e.request({ document: It, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "configureDiscount", "mutation", t);
2440
2440
  },
2441
- configurePackage(n, i, r) {
2442
- return t((s) => e.request({ document: Et, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", n);
2441
+ configurePackage(t, i, r) {
2442
+ return n((s) => e.request({ document: Et, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", t);
2443
2443
  },
2444
- reserveAdditionalPackageItem(n, i, r) {
2445
- return t((s) => e.request({ document: yt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", n);
2444
+ reserveAdditionalPackageItem(t, i, r) {
2445
+ return n((s) => e.request({ document: yt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", t);
2446
2446
  },
2447
- configureOrderDeliveryOption(n, i, r) {
2448
- return t((s) => e.request({ document: kt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", n);
2447
+ configureOrderDeliveryOption(t, i, r) {
2448
+ return n((s) => e.request({ document: kt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", t);
2449
2449
  },
2450
- createOrderCustomer(n, i, r) {
2451
- return t((s) => e.request({ document: At, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", n);
2450
+ createOrderCustomer(t, i, r) {
2451
+ return n((s) => e.request({ document: At, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", t);
2452
2452
  },
2453
- deleteOrder(n, i, r) {
2454
- return t((s) => e.request({ document: Ot, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", n);
2453
+ deleteOrder(t, i, r) {
2454
+ return n((s) => e.request({ document: Ot, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", t);
2455
2455
  }
2456
2456
  };
2457
2457
  }
2458
2458
  class vt {
2459
2459
  config;
2460
2460
  sdk;
2461
- constructor(t) {
2462
- this.config = t, this.sdk = Dt(new T(t.apiUrl));
2461
+ constructor(n) {
2462
+ this.config = n, this.sdk = Dt(new T(n.apiUrl));
2463
2463
  }
2464
2464
  // Basket update functions
2465
- async addProduct(t, n, i) {
2465
+ async addProduct(n, t, i) {
2466
2466
  try {
2467
2467
  return this.debugLog("Adding product", {
2468
- productId: n.id,
2469
- orderId: t,
2470
- amount: n.amount,
2471
- seat: n.seat
2468
+ productId: t.id,
2469
+ orderId: n,
2470
+ amount: t.amount,
2471
+ seat: t.seat
2472
2472
  }), (await this.sdk.addToOrder({
2473
- productId: n.id,
2474
- orderId: t,
2475
- additionalData: n.seat ? {
2473
+ productId: t.id,
2474
+ orderId: n,
2475
+ additionalData: t.seat ? {
2476
2476
  seat: {
2477
- seatId: n.seat.id,
2478
- seatLabel: n.seat.label,
2479
- holdToken: n.seat.holdToken
2477
+ seatId: t.seat.id,
2478
+ seatLabel: t.seat.label,
2479
+ holdToken: t.seat.holdToken
2480
2480
  }
2481
2481
  } : null,
2482
2482
  trackerId: this.config.trackerId,
2483
2483
  shopId: i,
2484
- amount: n.amount
2484
+ amount: t.amount
2485
2485
  })).reserveProduct;
2486
2486
  } catch (r) {
2487
2487
  throw this.debugLog("Error adding product", r), this.handleError(r), r;
2488
2488
  }
2489
2489
  }
2490
- async removeProduct(t, n) {
2490
+ async removeProduct(n, t) {
2491
2491
  try {
2492
2492
  return this.debugLog("Removing product", {
2493
- productId: n.id,
2494
- orderId: t,
2495
- amount: n.amount
2493
+ productId: t.id,
2494
+ orderId: n,
2495
+ amount: t.amount
2496
2496
  }), (await this.sdk.removeFromOrder({
2497
- productId: n.id,
2498
- orderId: t,
2499
- additionalData: n.seat ? {
2497
+ productId: t.id,
2498
+ orderId: n,
2499
+ additionalData: t.seat ? {
2500
2500
  seat: {
2501
- seatId: n.seat.id,
2502
- seatLabel: n.seat.label
2501
+ seatId: t.seat.id,
2502
+ seatLabel: t.seat.label
2503
2503
  }
2504
2504
  } : null,
2505
- amount: n.amount
2505
+ amount: t.amount
2506
2506
  })).releaseProduct ?? null;
2507
2507
  } catch (i) {
2508
2508
  throw this.debugLog("Error removing product", i), this.handleError(i), i;
2509
2509
  }
2510
2510
  }
2511
- async configurePackage(t, n, i) {
2511
+ async configurePackage(n, t, i) {
2512
2512
  try {
2513
- const r = n.items.map((o) => ({
2513
+ const r = t.items.map((o) => ({
2514
2514
  packageItemId: o.packageItemId,
2515
2515
  eventId: o.eventId
2516
2516
  }));
2517
2517
  this.debugLog("Configuring package", {
2518
- packageId: n.id,
2519
- orderId: t,
2520
- amount: n.amount,
2518
+ packageId: t.id,
2519
+ orderId: n,
2520
+ amount: t.amount,
2521
2521
  items: r,
2522
2522
  shopId: i
2523
2523
  });
2524
2524
  const s = await this.sdk.configurePackage({
2525
2525
  trackerId: this.config.trackerId,
2526
2526
  shopId: i,
2527
- packageId: n.id,
2528
- orderId: t,
2529
- amount: n.amount,
2527
+ packageId: t.id,
2528
+ orderId: n,
2529
+ amount: t.amount,
2530
2530
  items: r
2531
2531
  });
2532
2532
  return this.debugLog("Configure package response"), s.configurePackage ?? null;
@@ -2534,45 +2534,45 @@ class vt {
2534
2534
  throw this.debugLog("Error configuring package", r), this.handleError(r), r;
2535
2535
  }
2536
2536
  }
2537
- async configureCustomer(t, n) {
2538
- this.debugLog("Creating/replacing customer", { orderId: t, email: n.email });
2537
+ async configureCustomer(n, t) {
2538
+ this.debugLog("Creating/replacing customer", { orderId: n, email: t.email });
2539
2539
  try {
2540
2540
  const i = await this.sdk.createOrderCustomer({
2541
- orderId: t,
2542
- customer: n
2541
+ orderId: n,
2542
+ customer: t
2543
2543
  });
2544
2544
  this.debugLog("Customer set successfully", i);
2545
2545
  } catch (i) {
2546
2546
  throw this.debugLog("Failed to set customer", i), new Error(`Failed to set customer: ${i.message}`);
2547
2547
  }
2548
2548
  }
2549
- async configureDelivery(t, n) {
2550
- this.debugLog("Creating/replacing delivery option", { orderId: t, productId: n });
2549
+ async configureDelivery(n, t) {
2550
+ this.debugLog("Creating/replacing delivery option", { orderId: n, productId: t });
2551
2551
  try {
2552
2552
  const i = await this.sdk.configureOrderDeliveryOption({
2553
- orderId: t,
2554
- productId: n
2553
+ orderId: n,
2554
+ productId: t
2555
2555
  });
2556
2556
  return this.debugLog("Delivery option set successfully", i), i.configureDeliveryOption ?? !1;
2557
2557
  } catch (i) {
2558
2558
  throw this.debugLog("Failed to set Delivery option", i), new Error(`Failed to set Delivery: ${i.message}`);
2559
2559
  }
2560
2560
  }
2561
- async reserveAdditionalPackageItem(t, n) {
2561
+ async reserveAdditionalPackageItem(n, t) {
2562
2562
  try {
2563
2563
  this.debugLog("reserve additional packageItem", {
2564
- orderId: t,
2565
- eventId: n.eventId,
2566
- amount: n.amount,
2567
- packageId: n.packageId,
2568
- packageItemId: n.packageItemId
2564
+ orderId: n,
2565
+ eventId: t.eventId,
2566
+ amount: t.amount,
2567
+ packageId: t.packageId,
2568
+ packageItemId: t.packageItemId
2569
2569
  });
2570
2570
  const i = await this.sdk.reserveAdditionalPackageItem({
2571
- orderId: t,
2572
- eventId: n.eventId,
2573
- amount: n.amount,
2574
- packageId: n.packageId,
2575
- packageItemId: n.packageItemId
2571
+ orderId: n,
2572
+ eventId: t.eventId,
2573
+ amount: t.amount,
2574
+ packageId: t.packageId,
2575
+ packageItemId: t.packageItemId
2576
2576
  });
2577
2577
  return this.debugLog("reserve additional packageItem"), i.reserveAdditionalPackageItem ?? null;
2578
2578
  } catch (i) {
@@ -2580,12 +2580,12 @@ class vt {
2580
2580
  }
2581
2581
  }
2582
2582
  // Cancel and clear order functions
2583
- async cancelOrder(t) {
2584
- t && (this.debugLog("Cancelling order", { orderId: t }), await this.sdk.deleteOrder({ orderId: t }), this.debugLog("Order cancelled successfully"));
2583
+ async cancelOrder(n) {
2584
+ n && (this.debugLog("Cancelling order", { orderId: n }), await this.sdk.deleteOrder({ orderId: n }), this.debugLog("Order cancelled successfully"));
2585
2585
  }
2586
- async findOrder(t, n) {
2586
+ async findOrder(n, t) {
2587
2587
  try {
2588
- const i = await this.sdk.findOrderById({ id: t, reference: n });
2588
+ const i = await this.sdk.findOrderById({ id: n, reference: t });
2589
2589
  return i.findOrder ? {
2590
2590
  id: i.findOrder.id,
2591
2591
  reference: i.findOrder.reference,
@@ -2611,26 +2611,26 @@ class vt {
2611
2611
  return this.debugLog("Error finding order", i), this.handleError(i), null;
2612
2612
  }
2613
2613
  }
2614
- async configureDiscountCode(t, n) {
2614
+ async configureDiscountCode(n, t) {
2615
2615
  try {
2616
2616
  return this.debugLog("Configuring discount", {
2617
- discountCode: n.code,
2618
- orderId: t
2617
+ discountCode: t.code,
2618
+ orderId: n
2619
2619
  }), await this.sdk.configureDiscount({
2620
- orderId: t,
2621
- discountCode: n.code
2620
+ orderId: n,
2621
+ discountCode: t.code
2622
2622
  }).then((i) => i.createOrderDiscount ?? null);
2623
2623
  } catch (i) {
2624
2624
  return this.debugLog("Error configuring discount", i), this.handleError(i), null;
2625
2625
  }
2626
2626
  }
2627
- async findActiveOrder(t) {
2628
- this.debugLog("Fetching order from server", { orderId: t });
2627
+ async findActiveOrder(n) {
2628
+ this.debugLog("Fetching order from server", { orderId: n });
2629
2629
  try {
2630
- const n = await this.sdk.findActiveOrderById({ id: t });
2631
- if (!n?.findOrder)
2630
+ const t = await this.sdk.findActiveOrderById({ id: n });
2631
+ if (!t?.findOrder)
2632
2632
  return null;
2633
- const i = n.findOrder;
2633
+ const i = t.findOrder;
2634
2634
  this.debugLog("Order fetched successfully", i);
2635
2635
  const r = i.items, s = r.filter((c) => c.product != null && c.amount > 0).map((c) => {
2636
2636
  let E = O.PRODUCT;
@@ -2728,21 +2728,21 @@ class vt {
2728
2728
  orderProtection: !1,
2729
2729
  discountCode: i.discount?.code
2730
2730
  };
2731
- } catch (n) {
2732
- throw this.debugLog("Error fetching order", n), n;
2731
+ } catch (t) {
2732
+ throw this.debugLog("Error fetching order", t), t;
2733
2733
  }
2734
2734
  }
2735
- debugLog(t, n) {
2736
- this.config.debug && console.log(`[BasketService] ${t}`, n || "");
2735
+ debugLog(n, t) {
2736
+ this.config.debug && console.log(`[BasketService] ${n}`, t || "");
2737
2737
  }
2738
- handleError(t) {
2739
- const n = t;
2740
- if (n.graphQLErrors && n.graphQLErrors.length > 0) {
2741
- const i = n.graphQLErrors[0];
2738
+ handleError(n) {
2739
+ const t = n;
2740
+ if (t.graphQLErrors && t.graphQLErrors.length > 0) {
2741
+ const i = t.graphQLErrors[0];
2742
2742
  i.extensions?.status === "RATE_LIMIT" && console.error("Rate Limit reached"), i.extensions?.status === "SOLD_OUT" && console.error("Product sold out");
2743
2743
  }
2744
- if (n.response?.errors && n.response.errors.length > 0) {
2745
- const i = n.response.errors[0];
2744
+ if (t.response?.errors && t.response.errors.length > 0) {
2745
+ const i = t.response.errors[0];
2746
2746
  console.error("GraphQL Error:", i.message), i.extensions?.code && console.error("Error Code:", i.extensions.code);
2747
2747
  }
2748
2748
  }
@@ -2902,62 +2902,62 @@ const Nt = u`
2902
2902
  groupAmount
2903
2903
  }
2904
2904
  }
2905
- `, St = (e, t, n, i) => e();
2906
- function Ct(e, t = St) {
2905
+ `, St = (e, n, t, i) => e();
2906
+ function Ct(e, n = St) {
2907
2907
  return {
2908
- EventOverviewPage(n, i, r) {
2909
- return t((s) => e.request({ document: Nt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", n);
2908
+ EventOverviewPage(t, i, r) {
2909
+ return n((s) => e.request({ document: Nt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", t);
2910
2910
  },
2911
- EventDetailPage(n, i, r) {
2912
- return t((s) => e.request({ document: Pt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", n);
2911
+ EventDetailPage(t, i, r) {
2912
+ return n((s) => e.request({ document: Pt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", t);
2913
2913
  },
2914
- FindPublicEventBySlug(n, i, r) {
2915
- return t((s) => e.request({ document: bt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "FindPublicEventBySlug", "query", n);
2914
+ FindPublicEventBySlug(t, i, r) {
2915
+ return n((s) => e.request({ document: bt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "FindPublicEventBySlug", "query", t);
2916
2916
  },
2917
- findProductsByEventId(n, i, r) {
2918
- return t((s) => e.request({ document: xt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", n);
2917
+ findProductsByEventId(t, i, r) {
2918
+ return n((s) => e.request({ document: xt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", t);
2919
2919
  }
2920
2920
  };
2921
2921
  }
2922
2922
  class _t {
2923
2923
  config;
2924
2924
  sdk;
2925
- constructor(t) {
2926
- this.config = t, this.sdk = Ct(new T(t.apiUrl));
2925
+ constructor(n) {
2926
+ this.config = n, this.sdk = Ct(new T(n.apiUrl));
2927
2927
  }
2928
- async getEvents(t, n) {
2928
+ async getEvents(n, t) {
2929
2929
  try {
2930
- t.page && (t.page = {
2931
- index: t.page.index ?? 0,
2932
- size: t.page.size ?? 20
2930
+ n.page && (n.page = {
2931
+ index: n.page.index ?? 0,
2932
+ size: n.page.size ?? 20
2933
2933
  }), this.debugLog("Fetching events with parameters", {
2934
- organizationId: this.config.organizationId ?? n ?? "",
2935
- hostingIds: t.hostingIds,
2936
- filterEventStatuses: t.statuses,
2937
- dateRange: t.dateRange,
2938
- page: t.page,
2939
- sorts: t.sorts,
2934
+ organizationId: this.config.organizationId ?? t ?? "",
2935
+ hostingIds: n.hostingIds,
2936
+ filterEventStatuses: n.statuses,
2937
+ dateRange: n.dateRange,
2938
+ page: n.page,
2939
+ sorts: n.sorts,
2940
2940
  trackerId: this.config.trackerId,
2941
- searchTerm: t.searchTerm,
2942
- priceRange: t.priceRange,
2943
- showDoorTickets: t.showDoorTickets
2941
+ searchTerm: n.searchTerm,
2942
+ priceRange: n.priceRange,
2943
+ showDoorTickets: n.showDoorTickets
2944
2944
  });
2945
2945
  const i = await this.sdk.EventOverviewPage({
2946
- organizationId: this.config.organizationId ?? n ?? "",
2947
- hostingIds: t.hostingIds,
2948
- locationIds: t.locationIds,
2949
- excludedEventIds: t.excludedEventIds,
2950
- filterEventStatuses: t.statuses,
2951
- dateRange: t.dateRange && t.dateRange.from && t.dateRange.till ? {
2952
- from: t.dateRange.from.toISO(),
2953
- till: t.dateRange.till.toISO()
2946
+ organizationId: this.config.organizationId ?? t ?? "",
2947
+ hostingIds: n.hostingIds,
2948
+ locationIds: n.locationIds,
2949
+ excludedEventIds: n.excludedEventIds,
2950
+ filterEventStatuses: n.statuses,
2951
+ dateRange: n.dateRange && n.dateRange.from && n.dateRange.till ? {
2952
+ from: n.dateRange.from.toISO(),
2953
+ till: n.dateRange.till.toISO()
2954
2954
  } : void 0,
2955
- page: t.page,
2956
- sorts: t.sorts,
2955
+ page: n.page,
2956
+ sorts: n.sorts,
2957
2957
  trackerId: this.config.trackerId,
2958
- searchTerm: t.searchTerm,
2959
- priceRange: t.priceRange,
2960
- showDoorTickets: t.showDoorTickets
2958
+ searchTerm: n.searchTerm,
2959
+ priceRange: n.priceRange,
2960
+ showDoorTickets: n.showDoorTickets
2961
2961
  });
2962
2962
  if (this.debugLog("Raw GraphQL response", i), i?.findAllPublicEventByOrganizationId?.data) {
2963
2963
  const r = i.findAllPublicEventByOrganizationId.data.map((s) => ({
@@ -2996,12 +2996,12 @@ class _t {
2996
2996
  throw this.debugLog("Error fetching events", i), i;
2997
2997
  }
2998
2998
  }
2999
- async getEvent(t) {
2999
+ async getEvent(n) {
3000
3000
  try {
3001
- this.debugLog("Fetching single event", { eventId: t });
3002
- const n = await this.sdk.EventDetailPage({ eventId: t });
3003
- if (this.debugLog("Raw GraphQL response", n), n?.findPublicEventById) {
3004
- const i = n.findPublicEventById, r = {
3001
+ this.debugLog("Fetching single event", { eventId: n });
3002
+ const t = await this.sdk.EventDetailPage({ eventId: n });
3003
+ if (this.debugLog("Raw GraphQL response", t), t?.findPublicEventById) {
3004
+ const i = t.findPublicEventById, r = {
3005
3005
  id: i.id,
3006
3006
  name: i.name,
3007
3007
  icon: i.icon,
@@ -3035,17 +3035,17 @@ class _t {
3035
3035
  };
3036
3036
  return this.debugLog("Processed single event", r), r;
3037
3037
  } else {
3038
- this.debugLog("No event found for id", t);
3038
+ this.debugLog("No event found for id", n);
3039
3039
  return;
3040
3040
  }
3041
- } catch (n) {
3042
- throw this.debugLog("Error fetching single event", n), n;
3041
+ } catch (t) {
3042
+ throw this.debugLog("Error fetching single event", t), t;
3043
3043
  }
3044
3044
  }
3045
- async getEventBySlug(t, n) {
3045
+ async getEventBySlug(n, t) {
3046
3046
  try {
3047
- this.debugLog("Fetching single event by slug", { organizationId: t, slug: n });
3048
- const i = await this.sdk.FindPublicEventBySlug({ organizationId: t, slug: n });
3047
+ this.debugLog("Fetching single event by slug", { organizationId: n, slug: t });
3048
+ const i = await this.sdk.FindPublicEventBySlug({ organizationId: n, slug: t });
3049
3049
  if (this.debugLog("Raw GraphQL response", i), i?.findPublicEventBySlug) {
3050
3050
  const r = i.findPublicEventBySlug, s = {
3051
3051
  id: r.id,
@@ -3082,26 +3082,26 @@ class _t {
3082
3082
  };
3083
3083
  return this.debugLog("Processed single event", s), s;
3084
3084
  } else {
3085
- this.debugLog("No event found for id by slug", { organizationId: t, slug: n });
3085
+ this.debugLog("No event found for id by slug", { organizationId: n, slug: t });
3086
3086
  return;
3087
3087
  }
3088
3088
  } catch (i) {
3089
3089
  throw this.debugLog("Error fetching single event", i), i;
3090
3090
  }
3091
3091
  }
3092
- async getProducts(t, n, i) {
3092
+ async getProducts(n, t, i) {
3093
3093
  try {
3094
3094
  this.debugLog("Fetching products for event", {
3095
- eventId: t,
3095
+ eventId: n,
3096
3096
  promoCode: i,
3097
3097
  trackerId: this.config.trackerId,
3098
- productTypes: n
3098
+ productTypes: t
3099
3099
  });
3100
3100
  const r = await this.sdk.findProductsByEventId({
3101
- eventId: t,
3101
+ eventId: n,
3102
3102
  promoCode: i,
3103
3103
  trackerId: this.config.trackerId,
3104
- productTypes: n
3104
+ productTypes: t
3105
3105
  });
3106
3106
  if (r?.findPublicProductsByEventId) {
3107
3107
  const s = r.findPublicProductsByEventId.map((o) => ({
@@ -3132,18 +3132,18 @@ class _t {
3132
3132
  groupAmount: o.groupAmount
3133
3133
  }));
3134
3134
  return this.debugLog("Products fetched", {
3135
- eventId: t,
3135
+ eventId: n,
3136
3136
  count: s.length,
3137
3137
  types: s.map((o) => o.type)
3138
3138
  }), s;
3139
3139
  }
3140
3140
  return;
3141
3141
  } catch (r) {
3142
- throw this.debugLog("Error fetching products", { eventId: t, error: r }), r;
3142
+ throw this.debugLog("Error fetching products", { eventId: n, error: r }), r;
3143
3143
  }
3144
3144
  }
3145
- debugLog(t, n) {
3146
- this.config.debug && console.log(`[EventService:${this.config.organizationId}] ${t}`, n || "");
3145
+ debugLog(n, t) {
3146
+ this.config.debug && console.log(`[EventService:${this.config.organizationId}] ${n}`, t || "");
3147
3147
  }
3148
3148
  }
3149
3149
  const Lt = u`
@@ -3180,36 +3180,36 @@ const Lt = u`
3180
3180
  mutation createDigitalPayment($input: CreateDigitalOrderPaymentInput!) {
3181
3181
  createDigitalOrderPayment(input: $input)
3182
3182
  }
3183
- `, wt = (e, t, n, i) => e();
3184
- function Ft(e, t = wt) {
3183
+ `, wt = (e, n, t, i) => e();
3184
+ function Ft(e, n = wt) {
3185
3185
  return {
3186
- findPaymentMethods(n, i, r) {
3187
- return t((s) => e.request({ document: Lt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", n);
3186
+ findPaymentMethods(t, i, r) {
3187
+ return n((s) => e.request({ document: Lt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", t);
3188
3188
  },
3189
- createDigitalPayment(n, i, r) {
3190
- return t((s) => e.request({ document: Rt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", n);
3189
+ createDigitalPayment(t, i, r) {
3190
+ return n((s) => e.request({ document: Rt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", t);
3191
3191
  }
3192
3192
  };
3193
3193
  }
3194
3194
  class $t {
3195
3195
  config;
3196
3196
  sdk;
3197
- constructor(t) {
3198
- this.config = t, this.sdk = Ft(new T(t.apiUrl));
3197
+ constructor(n) {
3198
+ this.config = n, this.sdk = Ft(new T(n.apiUrl));
3199
3199
  }
3200
- async getPaymentDetails(t) {
3201
- this.debugLog("Fetching payment methods", t);
3200
+ async getPaymentDetails(n) {
3201
+ this.debugLog("Fetching payment methods", n);
3202
3202
  try {
3203
- const n = await this.sdk.findPaymentMethods({
3204
- orderId: t.orderId,
3205
- orderItemId: t.orderItemId,
3206
- amountOfTickets: t.amountOfTickets,
3207
- paymentMethodId: t.paymentMethodId,
3208
- withTicketProtection: t.withTicketProtection
3203
+ const t = await this.sdk.findPaymentMethods({
3204
+ orderId: n.orderId,
3205
+ orderItemId: n.orderItemId,
3206
+ amountOfTickets: n.amountOfTickets,
3207
+ paymentMethodId: n.paymentMethodId,
3208
+ withTicketProtection: n.withTicketProtection
3209
3209
  });
3210
- if (!n?.findPaymentDetails)
3210
+ if (!t?.findPaymentDetails)
3211
3211
  throw this.debugLog("No payment details found"), new Error("No payment details found for this order");
3212
- const i = n.findPaymentDetails;
3212
+ const i = t.findPaymentDetails;
3213
3213
  return this.debugLog("Payment methods fetched successfully", {
3214
3214
  methodCount: i.methods?.length ?? 0,
3215
3215
  transactionPrice: i.transactionPrice,
@@ -3238,37 +3238,31 @@ class $t {
3238
3238
  })) ?? null
3239
3239
  })) ?? null
3240
3240
  };
3241
- } catch (n) {
3242
- throw this.debugLog("Error fetching payment methods", n), n;
3241
+ } catch (t) {
3242
+ throw this.debugLog("Error fetching payment methods", t), t;
3243
3243
  }
3244
3244
  }
3245
- async createPayment(t) {
3246
- this.debugLog("Creating payment", t);
3245
+ async createPayment(n) {
3246
+ this.debugLog("Creating payment", n);
3247
3247
  try {
3248
- const n = {
3249
- orderId: t.orderId,
3250
- paymentMethodId: t.paymentMethodId,
3251
- issuerId: t.issuerId,
3252
- redirectUrl: t.redirectUrl,
3253
- // For payment links this input in used
3254
- initiatedByUserId: t.initiatedByUserId,
3255
- initiatedByTeamId: t.initiatedByTeamId,
3256
- amountOfTickets: t.amountOfTickets,
3257
- orderItemId: t.orderItemId,
3258
- withTicketProtection: t.withTicketProtection
3248
+ const t = {
3249
+ orderId: n.orderId,
3250
+ redirectUrl: n.redirectUrl,
3251
+ paymentData: n.paymentData,
3252
+ withTicketProtection: n.withTicketProtection
3259
3253
  }, i = await this.sdk.createDigitalPayment({
3260
- input: n
3254
+ input: t
3261
3255
  });
3262
3256
  if (!i?.createDigitalOrderPayment)
3263
3257
  throw this.debugLog("Failed to create payment"), new Error("Failed to create payment for this order");
3264
3258
  const r = i.createDigitalOrderPayment;
3265
3259
  return this.debugLog("Payment created successfully", { paymentUrl: r }), { paymentUrl: r };
3266
- } catch (n) {
3267
- throw this.debugLog("Error creating payment", n), n;
3260
+ } catch (t) {
3261
+ throw this.debugLog("Error creating payment", t), t;
3268
3262
  }
3269
3263
  }
3270
- debugLog(t, n) {
3271
- this.config.debug && console.log(`[PaymentService] ${t}`, n || "");
3264
+ debugLog(n, t) {
3265
+ this.config.debug && console.log(`[PaymentService] ${n}`, t || "");
3272
3266
  }
3273
3267
  }
3274
3268
  const Bt = u`
@@ -3298,7 +3292,7 @@ const Bt = u`
3298
3292
  count
3299
3293
  }
3300
3294
  }
3301
- `, Ut = u`
3295
+ `, Vt = u`
3302
3296
  query findPublicPackageById($packageId: ID!) {
3303
3297
  findPublicPackageById(id: $packageId) {
3304
3298
  id
@@ -3326,7 +3320,7 @@ const Bt = u`
3326
3320
  amountOfDaysToPlanAhead
3327
3321
  }
3328
3322
  }
3329
- `, Vt = u`
3323
+ `, Ut = u`
3330
3324
  query findPublicPackageBySlug($organizationId: ID!, $slug: String!) {
3331
3325
  findPublicPackageBySlug(organizationId: $organizationId, slug: $slug) {
3332
3326
  id
@@ -3393,46 +3387,46 @@ const Bt = u`
3393
3387
  count
3394
3388
  }
3395
3389
  }
3396
- `, qt = (e, t, n, i) => e();
3397
- function zt(e, t = qt) {
3390
+ `, qt = (e, n, t, i) => e();
3391
+ function zt(e, n = qt) {
3398
3392
  return {
3399
- findAllPublicPackagesByOrganizationId(n, i, r) {
3400
- return t((s) => e.request({ document: Bt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", n);
3393
+ findAllPublicPackagesByOrganizationId(t, i, r) {
3394
+ return n((s) => e.request({ document: Bt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", t);
3401
3395
  },
3402
- findPublicPackageById(n, i, r) {
3403
- return t((s) => e.request({ document: Ut, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", n);
3396
+ findPublicPackageById(t, i, r) {
3397
+ return n((s) => e.request({ document: Vt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", t);
3404
3398
  },
3405
- findPublicPackageBySlug(n, i, r) {
3406
- return t((s) => e.request({ document: Vt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageBySlug", "query", n);
3399
+ findPublicPackageBySlug(t, i, r) {
3400
+ return n((s) => e.request({ document: Ut, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageBySlug", "query", t);
3407
3401
  },
3408
- findPublicItemsByPackageId(n, i, r) {
3409
- return t((s) => e.request({ document: Mt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", n);
3402
+ findPublicItemsByPackageId(t, i, r) {
3403
+ return n((s) => e.request({ document: Mt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", t);
3410
3404
  }
3411
3405
  };
3412
3406
  }
3413
3407
  class Gt {
3414
3408
  config;
3415
3409
  sdk;
3416
- constructor(t) {
3417
- this.config = t, this.sdk = zt(new T(t.apiUrl));
3410
+ constructor(n) {
3411
+ this.config = n, this.sdk = zt(new T(n.apiUrl));
3418
3412
  }
3419
- debugLog(t, n) {
3420
- this.config.debug && console.log(`[PackageService] ${t}`, n || "");
3413
+ debugLog(n, t) {
3414
+ this.config.debug && console.log(`[PackageService] ${n}`, t || "");
3421
3415
  }
3422
- async getPackages(t, n) {
3416
+ async getPackages(n, t) {
3423
3417
  try {
3424
3418
  let i;
3425
- t.page && (i = {
3426
- index: t.page.index ?? 0,
3427
- size: t.page.size ?? 20
3419
+ n.page && (i = {
3420
+ index: n.page.index ?? 0,
3421
+ size: n.page.size ?? 20
3428
3422
  }), this.debugLog("Fetching public packages", {
3429
- organizationId: this.config.organizationId ?? n ?? "",
3423
+ organizationId: this.config.organizationId ?? t ?? "",
3430
3424
  page: i,
3431
- tab: t.tab,
3432
- statuses: t.statuses
3425
+ tab: n.tab,
3426
+ statuses: n.statuses
3433
3427
  });
3434
3428
  const r = await this.sdk.findAllPublicPackagesByOrganizationId({
3435
- organizationId: this.config.organizationId ?? n ?? ""
3429
+ organizationId: this.config.organizationId ?? t ?? ""
3436
3430
  });
3437
3431
  if (r?.findAllPublicPackagesByOrganizationId) {
3438
3432
  const s = r.findAllPublicPackagesByOrganizationId;
@@ -3446,28 +3440,28 @@ class Gt {
3446
3440
  throw this.debugLog("Error fetching public packages", i), i;
3447
3441
  }
3448
3442
  }
3449
- async getPackage(t) {
3443
+ async getPackage(n) {
3450
3444
  try {
3451
3445
  this.debugLog("Fetching public packages", {
3452
- packageId: t
3446
+ packageId: n
3453
3447
  });
3454
- const n = await this.sdk.findPublicPackageById({ packageId: t });
3455
- if (n?.findPublicPackageById) {
3456
- const i = n.findPublicPackageById;
3448
+ const t = await this.sdk.findPublicPackageById({ packageId: n });
3449
+ if (t?.findPublicPackageById) {
3450
+ const i = t.findPublicPackageById;
3457
3451
  return this.debugLog("Public package fetched"), i;
3458
3452
  }
3459
3453
  return null;
3460
- } catch (n) {
3461
- throw this.debugLog("Error fetching public packages", n), n;
3454
+ } catch (t) {
3455
+ throw this.debugLog("Error fetching public packages", t), t;
3462
3456
  }
3463
3457
  }
3464
- async getPackageBySlug(t, n) {
3458
+ async getPackageBySlug(n, t) {
3465
3459
  try {
3466
3460
  this.debugLog("Fetching public packages by slug", {
3467
- organizationId: t,
3468
- slug: n
3461
+ organizationId: n,
3462
+ slug: t
3469
3463
  });
3470
- const i = await this.sdk.findPublicPackageBySlug({ organizationId: t, slug: n });
3464
+ const i = await this.sdk.findPublicPackageBySlug({ organizationId: n, slug: t });
3471
3465
  if (i?.findPublicPackageBySlug) {
3472
3466
  const r = i.findPublicPackageBySlug;
3473
3467
  return this.debugLog("Public package fetched"), r;
@@ -3477,12 +3471,12 @@ class Gt {
3477
3471
  throw this.debugLog("Error fetching public packages", i), i;
3478
3472
  }
3479
3473
  }
3480
- async getPackageItems(t, n = [N.Regular, N.AdditionalEvent]) {
3474
+ async getPackageItems(n, t = [N.Regular, N.AdditionalEvent]) {
3481
3475
  try {
3482
- this.debugLog("Fetching public package items", { packageId: t, types: n });
3476
+ this.debugLog("Fetching public package items", { packageId: n, types: t });
3483
3477
  const i = await this.sdk.findPublicItemsByPackageId({
3484
- packageId: t,
3485
- types: n,
3478
+ packageId: n,
3479
+ types: t,
3486
3480
  page: { index: 0, size: 100 }
3487
3481
  });
3488
3482
  if (i?.findPublicItemsByPackageId) {
@@ -3518,27 +3512,27 @@ const jt = u`
3518
3512
  count
3519
3513
  }
3520
3514
  }
3521
- `, Ht = (e, t, n, i) => e();
3522
- function Yt(e, t = Ht) {
3515
+ `, Ht = (e, n, t, i) => e();
3516
+ function Yt(e, n = Ht) {
3523
3517
  return {
3524
- findAllPublicCategoriesByOrganizationId(n, i, r) {
3525
- return t((s) => e.request({ document: jt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", n);
3518
+ findAllPublicCategoriesByOrganizationId(t, i, r) {
3519
+ return n((s) => e.request({ document: jt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", t);
3526
3520
  }
3527
3521
  };
3528
3522
  }
3529
3523
  class Qt {
3530
3524
  config;
3531
3525
  sdk;
3532
- constructor(t) {
3533
- this.config = t, this.sdk = Yt(new T(t.apiUrl));
3526
+ constructor(n) {
3527
+ this.config = n, this.sdk = Yt(new T(n.apiUrl));
3534
3528
  }
3535
- debugLog(t, n) {
3536
- this.config.debug && console.log(`[CategoryService] ${t}`, n || "");
3529
+ debugLog(n, t) {
3530
+ this.config.debug && console.log(`[CategoryService] ${n}`, t || "");
3537
3531
  }
3538
- async getCategories(t, n) {
3532
+ async getCategories(n, t) {
3539
3533
  try {
3540
3534
  this.debugLog("Fetching all categories", { organizationId: this.config.organizationId });
3541
- const i = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId ?? n ?? "", dateRange: t ?? null });
3535
+ const i = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId ?? t ?? "", dateRange: n ?? null });
3542
3536
  if (i?.findAllPublicHostingsByOrganizationId) {
3543
3537
  const r = i.findAllPublicHostingsByOrganizationId, s = i.findAllPublicLocationsByOrganizationId;
3544
3538
  return this.debugLog("Categories fetched", { count: r.count + s.count, dataLength: r.data.length + s.data.length }), [
@@ -3564,43 +3558,43 @@ const Xt = u`
3564
3558
  mutation CreatePackageView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
3565
3559
  createPackageView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
3566
3560
  }
3567
- `, Zt = (e, t, n, i) => e();
3568
- function Kt(e, t = Zt) {
3561
+ `, Zt = (e, n, t, i) => e();
3562
+ function Kt(e, n = Zt) {
3569
3563
  return {
3570
- CreateShopView(n, i, r) {
3571
- return t((s) => e.request({ document: Xt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreateShopView", "mutation", n);
3564
+ CreateShopView(t, i, r) {
3565
+ return n((s) => e.request({ document: Xt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "CreateShopView", "mutation", t);
3572
3566
  },
3573
- CreateEventView(n, i, r) {
3574
- return t((s) => e.request({ document: Jt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreateEventView", "mutation", n);
3567
+ CreateEventView(t, i, r) {
3568
+ return n((s) => e.request({ document: Jt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "CreateEventView", "mutation", t);
3575
3569
  },
3576
- CreatePackageView(n, i, r) {
3577
- return t((s) => e.request({ document: Wt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreatePackageView", "mutation", n);
3570
+ CreatePackageView(t, i, r) {
3571
+ return n((s) => e.request({ document: Wt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "CreatePackageView", "mutation", t);
3578
3572
  }
3579
3573
  };
3580
3574
  }
3581
3575
  class en {
3582
3576
  config;
3583
3577
  sdk;
3584
- constructor(t) {
3585
- this.config = t, this.sdk = Kt(new T(t.apiUrl));
3578
+ constructor(n) {
3579
+ this.config = n, this.sdk = Kt(new T(n.apiUrl));
3586
3580
  }
3587
- createMetric = async (t, n, i) => {
3588
- switch (!n && !i && await this.sdk.CreateShopView({
3589
- id: t,
3581
+ createMetric = async (n, t, i) => {
3582
+ switch (!t && !i && await this.sdk.CreateShopView({
3583
+ id: n,
3590
3584
  trackerLinkId: this.config.trackerId
3591
3585
  }), i) {
3592
3586
  case R.Event:
3593
3587
  await this.sdk.CreateEventView({
3594
- id: t,
3595
- shopId: n,
3588
+ id: n,
3589
+ shopId: t,
3596
3590
  trackerLinkId: this.config.trackerId
3597
3591
  });
3598
3592
  break;
3599
3593
  case R.Package:
3600
3594
  await this.sdk.CreatePackageView(
3601
3595
  {
3602
- id: t,
3603
- shopId: n,
3596
+ id: n,
3597
+ shopId: t,
3604
3598
  trackerLinkId: this.config.trackerId
3605
3599
  }
3606
3600
  );
@@ -3634,6 +3628,7 @@ const tn = u`
3634
3628
  google_tag
3635
3629
  seatsIoWorkspaceId
3636
3630
  withTicketProtection
3631
+ withApplePay
3637
3632
  }
3638
3633
  template(trackerId: $trackerLinkId) {
3639
3634
  type
@@ -3653,38 +3648,39 @@ const tn = u`
3653
3648
  blockedLanguages
3654
3649
  }
3655
3650
  }
3656
- `, nn = (e, t, n, i) => e();
3657
- function rn(e, t = nn) {
3651
+ `, nn = (e, n, t, i) => e();
3652
+ function rn(e, n = nn) {
3658
3653
  return {
3659
- getShopBySlug(n, i, r) {
3660
- return t((s) => e.request({ document: tn, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "getShopBySlug", "query", n);
3654
+ getShopBySlug(t, i, r) {
3655
+ return n((s) => e.request({ document: tn, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "getShopBySlug", "query", t);
3661
3656
  }
3662
3657
  };
3663
3658
  }
3664
3659
  class sn {
3665
3660
  config;
3666
3661
  sdk;
3667
- constructor(t) {
3668
- this.config = t, this.sdk = rn(new T(t.apiUrl));
3662
+ constructor(n) {
3663
+ this.config = n, this.sdk = rn(new T(n.apiUrl));
3669
3664
  }
3670
- async getShop(t) {
3665
+ async getShop(n) {
3671
3666
  try {
3672
- this.debugLog("Fetching shop", { slug: t });
3673
- const n = await this.sdk.getShopBySlug({ slug: t, trackerLinkId: this.config.trackerId });
3674
- if (this.debugLog("Raw GraphQL response", n), n?.findShopBySlug) {
3675
- const i = n.findShopBySlug;
3667
+ this.debugLog("Fetching shop", { slug: n });
3668
+ const t = await this.sdk.getShopBySlug({ slug: n, trackerLinkId: this.config.trackerId });
3669
+ if (this.debugLog("Raw GraphQL response", t), t?.findShopBySlug) {
3670
+ const i = t.findShopBySlug;
3676
3671
  return this.debugLog("Public Shop fetched"), {
3677
3672
  ...i,
3678
- enableTicketProtection: i.organization.withTicketProtection
3673
+ enableTicketProtection: i.organization.withTicketProtection,
3674
+ enableApplePay: i.organization.withApplePay
3679
3675
  };
3680
3676
  }
3681
3677
  return null;
3682
- } catch (n) {
3683
- throw this.debugLog("Error fetching single Shop", n), n;
3678
+ } catch (t) {
3679
+ throw this.debugLog("Error fetching single Shop", t), t;
3684
3680
  }
3685
3681
  }
3686
- debugLog(t, n) {
3687
- this.config.debug && console.log(`[ShopService] ${t}`, n || "");
3682
+ debugLog(n, t) {
3683
+ this.config.debug && console.log(`[ShopService] ${n}`, t || "");
3688
3684
  }
3689
3685
  }
3690
3686
  const an = u`
@@ -3706,34 +3702,34 @@ const an = u`
3706
3702
  confirm
3707
3703
  }
3708
3704
  }
3709
- `, on = (e, t, n, i) => e();
3710
- function cn(e, t = on) {
3705
+ `, on = (e, n, t, i) => e();
3706
+ function cn(e, n = on) {
3711
3707
  return {
3712
- findAllCustomFieldsByOrderId(n, i, r) {
3713
- return t((s) => e.request({ document: an, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllCustomFieldsByOrderId", "query", n);
3708
+ findAllCustomFieldsByOrderId(t, i, r) {
3709
+ return n((s) => e.request({ document: an, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findAllCustomFieldsByOrderId", "query", t);
3714
3710
  }
3715
3711
  };
3716
3712
  }
3717
3713
  class dn {
3718
3714
  config;
3719
3715
  sdk;
3720
- constructor(t) {
3721
- this.config = t, this.sdk = cn(new T(t.apiUrl));
3716
+ constructor(n) {
3717
+ this.config = n, this.sdk = cn(new T(n.apiUrl));
3722
3718
  }
3723
- async findByOrderId(t, n) {
3719
+ async findByOrderId(n, t) {
3724
3720
  try {
3725
- this.debugLog("Fetching custom fields for order", { orderId: t, salesLocations: n });
3721
+ this.debugLog("Fetching custom fields for order", { orderId: n, salesLocations: t });
3726
3722
  const i = await this.sdk.findAllCustomFieldsByOrderId({
3727
- orderId: t,
3728
- salesLocations: n || null
3723
+ orderId: n,
3724
+ salesLocations: t || null
3729
3725
  });
3730
3726
  return this.debugLog("Custom fields fetched successfully", i.findAllCustomFieldsByOrderId), i.findAllCustomFieldsByOrderId;
3731
3727
  } catch (i) {
3732
3728
  throw this.debugLog("Error fetching custom fields for order", i), i;
3733
3729
  }
3734
3730
  }
3735
- debugLog(t, n) {
3736
- this.config.debug && console.log(`[CustomFieldService] ${t}`, n || "");
3731
+ debugLog(n, t) {
3732
+ this.config.debug && console.log(`[CustomFieldService] ${n}`, t || "");
3737
3733
  }
3738
3734
  }
3739
3735
  const un = "https://api.ticketapp.com/graphql";
@@ -3748,9 +3744,9 @@ class pn {
3748
3744
  customField;
3749
3745
  // Attach selected public types to the SDK class
3750
3746
  static Types = ve;
3751
- constructor(t) {
3752
- const { organizationId: n, debug: i = !1, apiUrl: r = un } = t;
3753
- this.event = new _t({ organizationId: n, debug: i, apiUrl: r, trackerId: t.trackerId }), this.package = new Gt({ organizationId: n, debug: i, apiUrl: r }), this.category = new Qt({ organizationId: n, debug: i, apiUrl: r }), this.metric = new en({ apiUrl: r, trackerId: t.trackerId }), this.shop = new sn({ debug: i, apiUrl: r, trackerId: t.trackerId }), this.customField = new dn({ debug: i, apiUrl: r }), this.basket = new vt({ debug: i, apiUrl: r, trackerId: t.trackerId }), this.payment = new $t({ debug: i, apiUrl: r });
3747
+ constructor(n) {
3748
+ const { organizationId: t, debug: i = !1, apiUrl: r = un } = n;
3749
+ this.event = new _t({ organizationId: t, debug: i, apiUrl: r, trackerId: n.trackerId }), this.package = new Gt({ organizationId: t, debug: i, apiUrl: r }), this.category = new Qt({ organizationId: t, debug: i, apiUrl: r }), this.metric = new en({ apiUrl: r, trackerId: n.trackerId }), this.shop = new sn({ debug: i, apiUrl: r, trackerId: n.trackerId }), this.customField = new dn({ debug: i, apiUrl: r }), this.basket = new vt({ debug: i, apiUrl: r, trackerId: n.trackerId }), this.payment = new $t({ debug: i, apiUrl: r });
3754
3750
  }
3755
3751
  }
3756
3752
  export {