@builtbystack/sq-shopify-theme-sdk 0.0.29 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
1
  var He = Object.defineProperty;
2
2
  var Ye = (e, t, n) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Te = (e, t, n) => (Ye(e, typeof t != "symbol" ? t + "" : t, n), n);
3
+ var Ae = (e, t, n) => (Ye(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  function ze(e, t) {
5
5
  for (var n = 0; n < t.length; n++) {
6
- const i = t[n];
7
- if (typeof i != "string" && !Array.isArray(i)) {
8
- for (const r in i)
9
- if (r !== "default" && !(r in e)) {
10
- const s = Object.getOwnPropertyDescriptor(i, r);
11
- s && Object.defineProperty(e, r, s.get ? s : {
6
+ const r = t[n];
7
+ if (typeof r != "string" && !Array.isArray(r)) {
8
+ for (const i in r)
9
+ if (i !== "default" && !(i in e)) {
10
+ const s = Object.getOwnPropertyDescriptor(r, i);
11
+ s && Object.defineProperty(e, i, s.get ? s : {
12
12
  enumerable: !0,
13
- get: () => i[r]
13
+ get: () => r[i]
14
14
  });
15
15
  }
16
16
  }
@@ -19,15 +19,15 @@ function ze(e, t) {
19
19
  }
20
20
  var ne = function() {
21
21
  return ne = Object.assign || function(t) {
22
- for (var n, i = 1, r = arguments.length; i < r; i++) {
23
- n = arguments[i];
22
+ for (var n, r = 1, i = arguments.length; r < i; r++) {
23
+ n = arguments[r];
24
24
  for (var s in n)
25
25
  Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
26
26
  }
27
27
  return t;
28
28
  }, ne.apply(this, arguments);
29
29
  };
30
- function K(e, t) {
30
+ function W(e, t) {
31
31
  if (!!!e)
32
32
  throw new Error(t);
33
33
  }
@@ -42,51 +42,51 @@ function Qe(e, t) {
42
42
  }
43
43
  const Xe = /\r\n|[\n\r]/g;
44
44
  function he(e, t) {
45
- let n = 0, i = 1;
46
- for (const r of e.body.matchAll(Xe)) {
47
- if (typeof r.index == "number" || Qe(!1), r.index >= t)
45
+ let n = 0, r = 1;
46
+ for (const i of e.body.matchAll(Xe)) {
47
+ if (typeof i.index == "number" || Qe(!1), i.index >= t)
48
48
  break;
49
- n = r.index + r[0].length, i += 1;
49
+ n = i.index + i[0].length, r += 1;
50
50
  }
51
51
  return {
52
- line: i,
52
+ line: r,
53
53
  column: t + 1 - n
54
54
  };
55
55
  }
56
- function We(e) {
57
- return Pe(
56
+ function Ke(e) {
57
+ return Oe(
58
58
  e.source,
59
59
  he(e.source, e.start)
60
60
  );
61
61
  }
62
- function Pe(e, t) {
63
- const n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, c = t.line === 1 ? n : 0, p = t.column + c, h = `${e.name}:${a}:${p}
64
- `, m = i.split(/\r\n|[\n\r]/g), y = m[r];
65
- if (y.length > 120) {
66
- const C = Math.floor(p / 80), A = p % 80, g = [];
67
- for (let I = 0; I < y.length; I += 80)
68
- g.push(y.slice(I, I + 80));
69
- return h + Ae([
62
+ function Oe(e, t) {
63
+ const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, c = t.line === 1 ? n : 0, p = t.column + c, h = `${e.name}:${a}:${p}
64
+ `, m = r.split(/\r\n|[\n\r]/g), C = m[i];
65
+ if (C.length > 120) {
66
+ const y = Math.floor(p / 80), T = p % 80, g = [];
67
+ for (let I = 0; I < C.length; I += 80)
68
+ g.push(C.slice(I, I + 80));
69
+ return h + Te([
70
70
  [`${a} |`, g[0]],
71
- ...g.slice(1, C + 1).map((I) => ["|", I]),
72
- ["|", "^".padStart(A)],
73
- ["|", g[C + 1]]
71
+ ...g.slice(1, y + 1).map((I) => ["|", I]),
72
+ ["|", "^".padStart(T)],
73
+ ["|", g[y + 1]]
74
74
  ]);
75
75
  }
76
- return h + Ae([
76
+ return h + Te([
77
77
  // Lines specified like this: ["prefix", "string"],
78
- [`${a - 1} |`, m[r - 1]],
79
- [`${a} |`, y],
78
+ [`${a - 1} |`, m[i - 1]],
79
+ [`${a} |`, C],
80
80
  ["|", "^".padStart(p)],
81
- [`${a + 1} |`, m[r + 1]]
81
+ [`${a + 1} |`, m[i + 1]]
82
82
  ]);
83
83
  }
84
- function Ae(e) {
85
- const t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
86
- return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
84
+ function Te(e) {
85
+ const t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length));
86
+ return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(`
87
87
  `);
88
88
  }
89
- function Ke(e) {
89
+ function We(e) {
90
90
  const t = e[0];
91
91
  return t == null || "kind" in t || "length" in t ? {
92
92
  nodes: t,
@@ -97,7 +97,7 @@ function Ke(e) {
97
97
  extensions: e[5]
98
98
  } : t;
99
99
  }
100
- class Ce extends Error {
100
+ class ye extends Error {
101
101
  /**
102
102
  * An array of `{ line, column }` locations within the source GraphQL document
103
103
  * which correspond to this error.
@@ -137,19 +137,19 @@ class Ce extends Error {
137
137
  * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
138
138
  */
139
139
  constructor(t, ...n) {
140
- var i, r, s;
141
- const { nodes: a, source: c, positions: p, path: h, originalError: m, extensions: y } = Ke(n);
140
+ var r, i, s;
141
+ const { nodes: a, source: c, positions: p, path: h, originalError: m, extensions: C } = We(n);
142
142
  super(t), this.name = "GraphQLError", this.path = h ?? void 0, this.originalError = m ?? void 0, this.nodes = Ie(
143
143
  Array.isArray(a) ? a : a ? [a] : void 0
144
144
  );
145
- const C = Ie(
146
- (i = this.nodes) === null || i === void 0 ? void 0 : i.map((g) => g.loc).filter((g) => g != null)
145
+ const y = Ie(
146
+ (r = this.nodes) === null || r === void 0 ? void 0 : r.map((g) => g.loc).filter((g) => g != null)
147
147
  );
148
- this.source = c ?? (C == null || (r = C[0]) === null || r === void 0 ? void 0 : r.source), this.positions = p ?? (C == null ? void 0 : C.map((g) => g.start)), this.locations = p && c ? p.map((g) => he(c, g)) : C == null ? void 0 : C.map((g) => he(g.source, g.start));
149
- const A = Je(
148
+ this.source = c ?? (y == null || (i = y[0]) === null || i === void 0 ? void 0 : i.source), this.positions = p ?? (y == null ? void 0 : y.map((g) => g.start)), this.locations = p && c ? p.map((g) => he(c, g)) : y == null ? void 0 : y.map((g) => he(g.source, g.start));
149
+ const T = Je(
150
150
  m == null ? void 0 : m.extensions
151
151
  ) ? m == null ? void 0 : m.extensions : void 0;
152
- this.extensions = (s = y ?? A) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
152
+ this.extensions = (s = C ?? T) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
153
153
  message: {
154
154
  writable: !0,
155
155
  enumerable: !0
@@ -173,7 +173,7 @@ class Ce extends Error {
173
173
  value: m.stack,
174
174
  writable: !0,
175
175
  configurable: !0
176
- }) : Error.captureStackTrace ? Error.captureStackTrace(this, Ce) : Object.defineProperty(this, "stack", {
176
+ }) : Error.captureStackTrace ? Error.captureStackTrace(this, ye) : Object.defineProperty(this, "stack", {
177
177
  value: Error().stack,
178
178
  writable: !0,
179
179
  configurable: !0
@@ -188,12 +188,12 @@ class Ce extends Error {
188
188
  for (const n of this.nodes)
189
189
  n.loc && (t += `
190
190
 
191
- ` + We(n.loc));
191
+ ` + Ke(n.loc));
192
192
  else if (this.source && this.locations)
193
193
  for (const n of this.locations)
194
194
  t += `
195
195
 
196
- ` + Pe(this.source, n);
196
+ ` + Oe(this.source, n);
197
197
  return t;
198
198
  }
199
199
  toJSON() {
@@ -206,8 +206,8 @@ class Ce extends Error {
206
206
  function Ie(e) {
207
207
  return e === void 0 || e.length === 0 ? void 0 : e;
208
208
  }
209
- function R(e, t, n) {
210
- return new Ce(`Syntax Error: ${n}`, {
209
+ function N(e, t, n) {
210
+ return new ye(`Syntax Error: ${n}`, {
211
211
  source: e,
212
212
  positions: [t]
213
213
  });
@@ -228,8 +228,8 @@ class Ze {
228
228
  /**
229
229
  * The Source document the AST represents.
230
230
  */
231
- constructor(t, n, i) {
232
- this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
231
+ constructor(t, n, r) {
232
+ this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = r;
233
233
  }
234
234
  get [Symbol.toStringTag]() {
235
235
  return "Location";
@@ -268,8 +268,8 @@ class be {
268
268
  * including ignored tokens. <SOF> is always the first node and <EOF>
269
269
  * the last.
270
270
  */
271
- constructor(t, n, i, r, s, a) {
272
- this.kind = t, this.start = n, this.end = i, this.line = r, this.column = s, this.value = a, this.prev = null, this.next = null;
271
+ constructor(t, n, r, i, s, a) {
272
+ this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = a, this.prev = null, this.next = null;
273
273
  }
274
274
  get [Symbol.toStringTag]() {
275
275
  return "Token";
@@ -362,10 +362,10 @@ function Se(e) {
362
362
  const t = e == null ? void 0 : e.kind;
363
363
  return typeof t == "string" && et.has(t);
364
364
  }
365
- var M;
365
+ var U;
366
366
  (function(e) {
367
367
  e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
368
- })(M || (M = {}));
368
+ })(U || (U = {}));
369
369
  var fe;
370
370
  (function(e) {
371
371
  e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
@@ -392,31 +392,31 @@ function tt(e) {
392
392
  }
393
393
  function nt(e) {
394
394
  var t;
395
- let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
395
+ let n = Number.MAX_SAFE_INTEGER, r = null, i = -1;
396
396
  for (let a = 0; a < e.length; ++a) {
397
397
  var s;
398
- const c = e[a], p = rt(c);
399
- p !== c.length && (i = (s = i) !== null && s !== void 0 ? s : a, r = a, a !== 0 && p < n && (n = p));
398
+ const c = e[a], p = it(c);
399
+ p !== c.length && (r = (s = r) !== null && s !== void 0 ? s : a, i = a, a !== 0 && p < n && (n = p));
400
400
  }
401
401
  return e.map((a, c) => c === 0 ? a : a.slice(n)).slice(
402
- (t = i) !== null && t !== void 0 ? t : 0,
403
- r + 1
402
+ (t = r) !== null && t !== void 0 ? t : 0,
403
+ i + 1
404
404
  );
405
405
  }
406
- function rt(e) {
406
+ function it(e) {
407
407
  let t = 0;
408
408
  for (; t < e.length && me(e.charCodeAt(t)); )
409
409
  ++t;
410
410
  return t;
411
411
  }
412
- function it(e, t) {
413
- const n = e.replace(/"""/g, '\\"""'), i = n.split(/\r\n|[\n\r]/g), r = i.length === 1, s = i.length > 1 && i.slice(1).every((A) => A.length === 0 || me(A.charCodeAt(0))), a = n.endsWith('\\"""'), c = e.endsWith('"') && !a, p = e.endsWith("\\"), h = c || p, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
414
- (!r || e.length > 70 || h || s || a);
415
- let y = "";
416
- const C = r && me(e.charCodeAt(0));
417
- return (m && !C || s) && (y += `
418
- `), y += n, (m || h) && (y += `
419
- `), '"""' + y + '"""';
412
+ function rt(e, t) {
413
+ const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((T) => T.length === 0 || me(T.charCodeAt(0))), a = n.endsWith('\\"""'), c = e.endsWith('"') && !a, p = e.endsWith("\\"), h = c || p, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
414
+ (!i || e.length > 70 || h || s || a);
415
+ let C = "";
416
+ const y = i && me(e.charCodeAt(0));
417
+ return (m && !y || s) && (C += `
418
+ `), C += n, (m || h) && (C += `
419
+ `), '"""' + C + '"""';
420
420
  }
421
421
  var u;
422
422
  (function(e) {
@@ -486,91 +486,91 @@ function F(e, t) {
486
486
  if (n === void 0)
487
487
  return u.EOF;
488
488
  if (n >= 32 && n <= 126) {
489
- const i = String.fromCodePoint(n);
490
- return i === '"' ? `'"'` : `"${i}"`;
489
+ const r = String.fromCodePoint(n);
490
+ return r === '"' ? `'"'` : `"${r}"`;
491
491
  }
492
492
  return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
493
493
  }
494
- function S(e, t, n, i, r) {
494
+ function S(e, t, n, r, i) {
495
495
  const s = e.line, a = 1 + n - e.lineStart;
496
- return new be(t, n, i, s, a, r);
496
+ return new be(t, n, r, s, a, i);
497
497
  }
498
498
  function ot(e, t) {
499
- const n = e.source.body, i = n.length;
500
- let r = t;
501
- for (; r < i; ) {
502
- const s = n.charCodeAt(r);
499
+ const n = e.source.body, r = n.length;
500
+ let i = t;
501
+ for (; i < r; ) {
502
+ const s = n.charCodeAt(i);
503
503
  switch (s) {
504
504
  case 65279:
505
505
  case 9:
506
506
  case 32:
507
507
  case 44:
508
- ++r;
508
+ ++i;
509
509
  continue;
510
510
  case 10:
511
- ++r, ++e.line, e.lineStart = r;
511
+ ++i, ++e.line, e.lineStart = i;
512
512
  continue;
513
513
  case 13:
514
- n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
514
+ n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i;
515
515
  continue;
516
516
  case 35:
517
- return ut(e, r);
517
+ return ut(e, i);
518
518
  case 33:
519
- return S(e, u.BANG, r, r + 1);
519
+ return S(e, u.BANG, i, i + 1);
520
520
  case 36:
521
- return S(e, u.DOLLAR, r, r + 1);
521
+ return S(e, u.DOLLAR, i, i + 1);
522
522
  case 38:
523
- return S(e, u.AMP, r, r + 1);
523
+ return S(e, u.AMP, i, i + 1);
524
524
  case 40:
525
- return S(e, u.PAREN_L, r, r + 1);
525
+ return S(e, u.PAREN_L, i, i + 1);
526
526
  case 41:
527
- return S(e, u.PAREN_R, r, r + 1);
527
+ return S(e, u.PAREN_R, i, i + 1);
528
528
  case 46:
529
- if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46)
530
- return S(e, u.SPREAD, r, r + 3);
529
+ if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46)
530
+ return S(e, u.SPREAD, i, i + 3);
531
531
  break;
532
532
  case 58:
533
- return S(e, u.COLON, r, r + 1);
533
+ return S(e, u.COLON, i, i + 1);
534
534
  case 61:
535
- return S(e, u.EQUALS, r, r + 1);
535
+ return S(e, u.EQUALS, i, i + 1);
536
536
  case 64:
537
- return S(e, u.AT, r, r + 1);
537
+ return S(e, u.AT, i, i + 1);
538
538
  case 91:
539
- return S(e, u.BRACKET_L, r, r + 1);
539
+ return S(e, u.BRACKET_L, i, i + 1);
540
540
  case 93:
541
- return S(e, u.BRACKET_R, r, r + 1);
541
+ return S(e, u.BRACKET_R, i, i + 1);
542
542
  case 123:
543
- return S(e, u.BRACE_L, r, r + 1);
543
+ return S(e, u.BRACE_L, i, i + 1);
544
544
  case 124:
545
- return S(e, u.PIPE, r, r + 1);
545
+ return S(e, u.PIPE, i, i + 1);
546
546
  case 125:
547
- return S(e, u.BRACE_R, r, r + 1);
547
+ return S(e, u.BRACE_R, i, i + 1);
548
548
  case 34:
549
- return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? ft(e, r) : dt(e, r);
549
+ return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? ft(e, i) : dt(e, i);
550
550
  }
551
551
  if (Y(s) || s === 45)
552
- return ct(e, r, s);
552
+ return ct(e, i, s);
553
553
  if (_e(s))
554
- return mt(e, r);
555
- throw R(
554
+ return mt(e, i);
555
+ throw N(
556
556
  e.source,
557
- r,
558
- s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : G(s) || se(n, r) ? `Unexpected character: ${F(e, r)}.` : `Invalid character: ${F(e, r)}.`
557
+ i,
558
+ s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : G(s) || se(n, i) ? `Unexpected character: ${F(e, i)}.` : `Invalid character: ${F(e, i)}.`
559
559
  );
560
560
  }
561
- return S(e, u.EOF, i, i);
561
+ return S(e, u.EOF, r, r);
562
562
  }
563
563
  function ut(e, t) {
564
- const n = e.source.body, i = n.length;
565
- let r = t + 1;
566
- for (; r < i; ) {
567
- const s = n.charCodeAt(r);
564
+ const n = e.source.body, r = n.length;
565
+ let i = t + 1;
566
+ for (; i < r; ) {
567
+ const s = n.charCodeAt(i);
568
568
  if (s === 10 || s === 13)
569
569
  break;
570
570
  if (G(s))
571
- ++r;
572
- else if (se(n, r))
573
- r += 2;
571
+ ++i;
572
+ else if (se(n, i))
573
+ i += 2;
574
574
  else
575
575
  break;
576
576
  }
@@ -578,45 +578,45 @@ function ut(e, t) {
578
578
  e,
579
579
  u.COMMENT,
580
580
  t,
581
- r,
582
- n.slice(t + 1, r)
581
+ i,
582
+ n.slice(t + 1, i)
583
583
  );
584
584
  }
585
585
  function ct(e, t, n) {
586
- const i = e.source.body;
587
- let r = t, s = n, a = !1;
588
- if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
589
- if (s = i.charCodeAt(++r), Y(s))
590
- throw R(
586
+ const r = e.source.body;
587
+ let i = t, s = n, a = !1;
588
+ if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
589
+ if (s = r.charCodeAt(++i), Y(s))
590
+ throw N(
591
591
  e.source,
592
- r,
592
+ i,
593
593
  `Invalid number, unexpected digit after 0: ${F(
594
594
  e,
595
- r
595
+ i
596
596
  )}.`
597
597
  );
598
598
  } else
599
- r = ce(e, r, s), s = i.charCodeAt(r);
600
- if (s === 46 && (a = !0, s = i.charCodeAt(++r), r = ce(e, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (a = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = ce(e, r, s), s = i.charCodeAt(r)), s === 46 || _e(s))
601
- throw R(
599
+ i = ce(e, i, s), s = r.charCodeAt(i);
600
+ if (s === 46 && (a = !0, s = r.charCodeAt(++i), i = ce(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (a = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ce(e, i, s), s = r.charCodeAt(i)), s === 46 || _e(s))
601
+ throw N(
602
602
  e.source,
603
- r,
603
+ i,
604
604
  `Invalid number, expected digit but got: ${F(
605
605
  e,
606
- r
606
+ i
607
607
  )}.`
608
608
  );
609
609
  return S(
610
610
  e,
611
611
  a ? u.FLOAT : u.INT,
612
612
  t,
613
- r,
614
- i.slice(t, r)
613
+ i,
614
+ r.slice(t, i)
615
615
  );
616
616
  }
617
617
  function ce(e, t, n) {
618
618
  if (!Y(n))
619
- throw R(
619
+ throw N(
620
620
  e.source,
621
621
  t,
622
622
  `Invalid number, expected digit but got: ${F(
@@ -624,84 +624,84 @@ function ce(e, t, n) {
624
624
  t
625
625
  )}.`
626
626
  );
627
- const i = e.source.body;
628
- let r = t + 1;
629
- for (; Y(i.charCodeAt(r)); )
630
- ++r;
631
- return r;
627
+ const r = e.source.body;
628
+ let i = t + 1;
629
+ for (; Y(r.charCodeAt(i)); )
630
+ ++i;
631
+ return i;
632
632
  }
633
633
  function dt(e, t) {
634
- const n = e.source.body, i = n.length;
635
- let r = t + 1, s = r, a = "";
636
- for (; r < i; ) {
637
- const c = n.charCodeAt(r);
634
+ const n = e.source.body, r = n.length;
635
+ let i = t + 1, s = i, a = "";
636
+ for (; i < r; ) {
637
+ const c = n.charCodeAt(i);
638
638
  if (c === 34)
639
- return a += n.slice(s, r), S(e, u.STRING, t, r + 1, a);
639
+ return a += n.slice(s, i), S(e, u.STRING, t, i + 1, a);
640
640
  if (c === 92) {
641
- a += n.slice(s, r);
642
- const p = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? lt(e, r) : pt(e, r) : ht(e, r);
643
- a += p.value, r += p.size, s = r;
641
+ a += n.slice(s, i);
642
+ const p = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? lt(e, i) : pt(e, i) : ht(e, i);
643
+ a += p.value, i += p.size, s = i;
644
644
  continue;
645
645
  }
646
646
  if (c === 10 || c === 13)
647
647
  break;
648
648
  if (G(c))
649
- ++r;
650
- else if (se(n, r))
651
- r += 2;
649
+ ++i;
650
+ else if (se(n, i))
651
+ i += 2;
652
652
  else
653
- throw R(
653
+ throw N(
654
654
  e.source,
655
- r,
655
+ i,
656
656
  `Invalid character within String: ${F(
657
657
  e,
658
- r
658
+ i
659
659
  )}.`
660
660
  );
661
661
  }
662
- throw R(e.source, r, "Unterminated string.");
662
+ throw N(e.source, i, "Unterminated string.");
663
663
  }
664
664
  function lt(e, t) {
665
665
  const n = e.source.body;
666
- let i = 0, r = 3;
667
- for (; r < 12; ) {
668
- const s = n.charCodeAt(t + r++);
666
+ let r = 0, i = 3;
667
+ for (; i < 12; ) {
668
+ const s = n.charCodeAt(t + i++);
669
669
  if (s === 125) {
670
- if (r < 5 || !G(i))
670
+ if (i < 5 || !G(r))
671
671
  break;
672
672
  return {
673
- value: String.fromCodePoint(i),
674
- size: r
673
+ value: String.fromCodePoint(r),
674
+ size: i
675
675
  };
676
676
  }
677
- if (i = i << 4 | j(s), i < 0)
677
+ if (r = r << 4 | j(s), r < 0)
678
678
  break;
679
679
  }
680
- throw R(
680
+ throw N(
681
681
  e.source,
682
682
  t,
683
683
  `Invalid Unicode escape sequence: "${n.slice(
684
684
  t,
685
- t + r
685
+ t + i
686
686
  )}".`
687
687
  );
688
688
  }
689
689
  function pt(e, t) {
690
- const n = e.source.body, i = Re(n, t + 2);
691
- if (G(i))
690
+ const n = e.source.body, r = Re(n, t + 2);
691
+ if (G(r))
692
692
  return {
693
- value: String.fromCodePoint(i),
693
+ value: String.fromCodePoint(r),
694
694
  size: 6
695
695
  };
696
- if (Le(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
697
- const r = Re(n, t + 8);
698
- if (we(r))
696
+ if (Le(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
697
+ const i = Re(n, t + 8);
698
+ if (we(i))
699
699
  return {
700
- value: String.fromCodePoint(i, r),
700
+ value: String.fromCodePoint(r, i),
701
701
  size: 12
702
702
  };
703
703
  }
704
- throw R(
704
+ throw N(
705
705
  e.source,
706
706
  t,
707
707
  `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
@@ -758,7 +758,7 @@ function ht(e, t) {
758
758
  size: 2
759
759
  };
760
760
  }
761
- throw R(
761
+ throw N(
762
762
  e.source,
763
763
  t,
764
764
  `Invalid character escape sequence: "${n.slice(
@@ -768,10 +768,10 @@ function ht(e, t) {
768
768
  );
769
769
  }
770
770
  function ft(e, t) {
771
- const n = e.source.body, i = n.length;
772
- let r = e.lineStart, s = t + 3, a = s, c = "";
771
+ const n = e.source.body, r = n.length;
772
+ let i = e.lineStart, s = t + 3, a = s, c = "";
773
773
  const p = [];
774
- for (; s < i; ) {
774
+ for (; s < r; ) {
775
775
  const h = n.charCodeAt(s);
776
776
  if (h === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
777
777
  c += n.slice(a, s), p.push(c);
@@ -784,14 +784,14 @@ function ft(e, t) {
784
784
  nt(p).join(`
785
785
  `)
786
786
  );
787
- return e.line += p.length - 1, e.lineStart = r, m;
787
+ return e.line += p.length - 1, e.lineStart = i, m;
788
788
  }
789
789
  if (h === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
790
790
  c += n.slice(a, s), a = s + 1, s += 4;
791
791
  continue;
792
792
  }
793
793
  if (h === 10 || h === 13) {
794
- c += n.slice(a, s), p.push(c), h === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, c = "", a = s, r = s;
794
+ c += n.slice(a, s), p.push(c), h === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, c = "", a = s, i = s;
795
795
  continue;
796
796
  }
797
797
  if (G(h))
@@ -799,7 +799,7 @@ function ft(e, t) {
799
799
  else if (se(n, s))
800
800
  s += 2;
801
801
  else
802
- throw R(
802
+ throw N(
803
803
  e.source,
804
804
  s,
805
805
  `Invalid character within String: ${F(
@@ -808,15 +808,15 @@ function ft(e, t) {
808
808
  )}.`
809
809
  );
810
810
  }
811
- throw R(e.source, s, "Unterminated string.");
811
+ throw N(e.source, s, "Unterminated string.");
812
812
  }
813
813
  function mt(e, t) {
814
- const n = e.source.body, i = n.length;
815
- let r = t + 1;
816
- for (; r < i; ) {
817
- const s = n.charCodeAt(r);
814
+ const n = e.source.body, r = n.length;
815
+ let i = t + 1;
816
+ for (; i < r; ) {
817
+ const s = n.charCodeAt(i);
818
818
  if (tt(s))
819
- ++r;
819
+ ++i;
820
820
  else
821
821
  break;
822
822
  }
@@ -824,8 +824,8 @@ function mt(e, t) {
824
824
  e,
825
825
  u.NAME,
826
826
  t,
827
- r,
828
- n.slice(t, r)
827
+ i,
828
+ n.slice(t, i)
829
829
  );
830
830
  }
831
831
  const gt = 10, Fe = 2;
@@ -839,32 +839,32 @@ function ae(e, t) {
839
839
  case "function":
840
840
  return e.name ? `[function ${e.name}]` : "[function]";
841
841
  case "object":
842
- return yt(e, t);
842
+ return Ct(e, t);
843
843
  default:
844
844
  return String(e);
845
845
  }
846
846
  }
847
- function yt(e, t) {
847
+ function Ct(e, t) {
848
848
  if (e === null)
849
849
  return "null";
850
850
  if (t.includes(e))
851
851
  return "[Circular]";
852
852
  const n = [...t, e];
853
- if (Ct(e)) {
854
- const i = e.toJSON();
855
- if (i !== e)
856
- return typeof i == "string" ? i : ae(i, n);
853
+ if (yt(e)) {
854
+ const r = e.toJSON();
855
+ if (r !== e)
856
+ return typeof r == "string" ? r : ae(r, n);
857
857
  } else if (Array.isArray(e))
858
858
  return vt(e, n);
859
859
  return Et(e, n);
860
860
  }
861
- function Ct(e) {
861
+ function yt(e) {
862
862
  return typeof e.toJSON == "function";
863
863
  }
864
864
  function Et(e, t) {
865
865
  const n = Object.entries(e);
866
- return n.length === 0 ? "{}" : t.length > Fe ? "[" + Tt(e) + "]" : "{ " + n.map(
867
- ([r, s]) => r + ": " + ae(s, t)
866
+ return n.length === 0 ? "{}" : t.length > Fe ? "[" + At(e) + "]" : "{ " + n.map(
867
+ ([i, s]) => i + ": " + ae(s, t)
868
868
  ).join(", ") + " }";
869
869
  }
870
870
  function vt(e, t) {
@@ -872,12 +872,12 @@ function vt(e, t) {
872
872
  return "[]";
873
873
  if (t.length > Fe)
874
874
  return "[Array]";
875
- const n = Math.min(gt, e.length), i = e.length - n, r = [];
875
+ const n = Math.min(gt, e.length), r = e.length - n, i = [];
876
876
  for (let s = 0; s < n; ++s)
877
- r.push(ae(e[s], t));
878
- return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
877
+ i.push(ae(e[s], t));
878
+ return r === 1 ? i.push("... 1 more item") : r > 1 && i.push(`... ${r} more items`), "[" + i.join(", ") + "]";
879
879
  }
880
- function Tt(e) {
880
+ function At(e) {
881
881
  const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
882
882
  if (t === "Object" && typeof e.constructor == "function") {
883
883
  const n = e.constructor.name;
@@ -886,7 +886,7 @@ function Tt(e) {
886
886
  }
887
887
  return t;
888
888
  }
889
- const At = (
889
+ const Tt = (
890
890
  /* c8 ignore next 6 */
891
891
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
892
892
  globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function(t, n) {
@@ -895,14 +895,14 @@ const At = (
895
895
  if (t instanceof n)
896
896
  return !0;
897
897
  if (typeof t == "object" && t !== null) {
898
- var i;
899
- const r = n.prototype[Symbol.toStringTag], s = (
898
+ var r;
899
+ const i = n.prototype[Symbol.toStringTag], s = (
900
900
  // We still need to support constructor's name to detect conflicts with older versions of this library.
901
- Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name
901
+ Symbol.toStringTag in t ? t[Symbol.toStringTag] : (r = t.constructor) === null || r === void 0 ? void 0 : r.name
902
902
  );
903
- if (r === s) {
903
+ if (i === s) {
904
904
  const a = Ee(t);
905
- throw new Error(`Cannot use ${r} "${a}" from another module or realm.
905
+ throw new Error(`Cannot use ${i} "${a}" from another module or realm.
906
906
 
907
907
  Ensure that there is only one instance of "graphql" in the node_modules
908
908
  directory. If different versions of "graphql" are the dependencies of other
@@ -920,14 +920,14 @@ spurious results.`);
920
920
  }
921
921
  );
922
922
  class Be {
923
- constructor(t, n = "GraphQL request", i = {
923
+ constructor(t, n = "GraphQL request", r = {
924
924
  line: 1,
925
925
  column: 1
926
926
  }) {
927
- typeof t == "string" || K(!1, `Body must be a string. Received: ${Ee(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || K(
927
+ typeof t == "string" || W(!1, `Body must be a string. Received: ${Ee(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || W(
928
928
  !1,
929
929
  "line in locationOffset is 1-indexed and must be positive."
930
- ), this.locationOffset.column > 0 || K(
930
+ ), this.locationOffset.column > 0 || W(
931
931
  !1,
932
932
  "column in locationOffset is 1-indexed and must be positive."
933
933
  );
@@ -937,15 +937,15 @@ class Be {
937
937
  }
938
938
  }
939
939
  function It(e) {
940
- return At(e, Be);
940
+ return Tt(e, Be);
941
941
  }
942
- function Ue(e, t) {
942
+ function Me(e, t) {
943
943
  return new St(e, t).parseDocument();
944
944
  }
945
945
  class St {
946
946
  constructor(t, n = {}) {
947
- const i = It(t) ? t : new Be(t);
948
- this._lexer = new st(i), this._options = n, this._tokenCounter = 0;
947
+ const r = It(t) ? t : new Be(t);
948
+ this._lexer = new st(r), this._options = n, this._tokenCounter = 0;
949
949
  }
950
950
  /**
951
951
  * Converts a name lex token into a name parse node.
@@ -1018,7 +1018,7 @@ class St {
1018
1018
  return this.parseDirectiveDefinition();
1019
1019
  }
1020
1020
  if (t)
1021
- throw R(
1021
+ throw N(
1022
1022
  this._lexer.source,
1023
1023
  this._lexer.token.start,
1024
1024
  "Unexpected description, descriptions are supported only on type definitions."
@@ -1047,18 +1047,18 @@ class St {
1047
1047
  if (this.peek(u.BRACE_L))
1048
1048
  return this.node(t, {
1049
1049
  kind: f.OPERATION_DEFINITION,
1050
- operation: M.QUERY,
1050
+ operation: U.QUERY,
1051
1051
  name: void 0,
1052
1052
  variableDefinitions: [],
1053
1053
  directives: [],
1054
1054
  selectionSet: this.parseSelectionSet()
1055
1055
  });
1056
1056
  const n = this.parseOperationType();
1057
- let i;
1058
- return this.peek(u.NAME) && (i = this.parseName()), this.node(t, {
1057
+ let r;
1058
+ return this.peek(u.NAME) && (r = this.parseName()), this.node(t, {
1059
1059
  kind: f.OPERATION_DEFINITION,
1060
1060
  operation: n,
1061
- name: i,
1061
+ name: r,
1062
1062
  variableDefinitions: this.parseVariableDefinitions(),
1063
1063
  directives: this.parseDirectives(!1),
1064
1064
  selectionSet: this.parseSelectionSet()
@@ -1071,11 +1071,11 @@ class St {
1071
1071
  const t = this.expectToken(u.NAME);
1072
1072
  switch (t.value) {
1073
1073
  case "query":
1074
- return M.QUERY;
1074
+ return U.QUERY;
1075
1075
  case "mutation":
1076
- return M.MUTATION;
1076
+ return U.MUTATION;
1077
1077
  case "subscription":
1078
- return M.SUBSCRIPTION;
1078
+ return U.SUBSCRIPTION;
1079
1079
  }
1080
1080
  throw this.unexpected(t);
1081
1081
  }
@@ -1142,11 +1142,11 @@ class St {
1142
1142
  */
1143
1143
  parseField() {
1144
1144
  const t = this._lexer.token, n = this.parseName();
1145
- let i, r;
1146
- return this.expectOptionalToken(u.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
1145
+ let r, i;
1146
+ return this.expectOptionalToken(u.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
1147
1147
  kind: f.FIELD,
1148
- alias: i,
1149
- name: r,
1148
+ alias: r,
1149
+ name: i,
1150
1150
  arguments: this.parseArguments(!1),
1151
1151
  directives: this.parseDirectives(!1),
1152
1152
  selectionSet: this.peek(u.BRACE_L) ? this.parseSelectionSet() : void 0
@@ -1163,10 +1163,10 @@ class St {
1163
1163
  * Argument[Const] : Name : Value[?Const]
1164
1164
  */
1165
1165
  parseArgument(t = !1) {
1166
- const n = this._lexer.token, i = this.parseName();
1166
+ const n = this._lexer.token, r = this.parseName();
1167
1167
  return this.expectToken(u.COLON), this.node(n, {
1168
1168
  kind: f.ARGUMENT,
1169
- name: i,
1169
+ name: r,
1170
1170
  value: this.parseValueLiteral(t)
1171
1171
  });
1172
1172
  }
@@ -1291,11 +1291,11 @@ class St {
1291
1291
  case u.DOLLAR:
1292
1292
  if (t)
1293
1293
  if (this.expectToken(u.DOLLAR), this._lexer.token.kind === u.NAME) {
1294
- const i = this._lexer.token.value;
1295
- throw R(
1294
+ const r = this._lexer.token.value;
1295
+ throw N(
1296
1296
  this._lexer.source,
1297
1297
  n.start,
1298
- `Unexpected variable "$${i}" in constant value.`
1298
+ `Unexpected variable "$${r}" in constant value.`
1299
1299
  );
1300
1300
  } else
1301
1301
  throw this.unexpected(n);
@@ -1345,10 +1345,10 @@ class St {
1345
1345
  * ObjectField[Const] : Name : Value[?Const]
1346
1346
  */
1347
1347
  parseObjectField(t) {
1348
- const n = this._lexer.token, i = this.parseName();
1348
+ const n = this._lexer.token, r = this.parseName();
1349
1349
  return this.expectToken(u.COLON), this.node(n, {
1350
1350
  kind: f.OBJECT_FIELD,
1351
- name: i,
1351
+ name: r,
1352
1352
  value: this.parseValueLiteral(t)
1353
1353
  });
1354
1354
  }
@@ -1389,10 +1389,10 @@ class St {
1389
1389
  const t = this._lexer.token;
1390
1390
  let n;
1391
1391
  if (this.expectOptionalToken(u.BRACKET_L)) {
1392
- const i = this.parseTypeReference();
1392
+ const r = this.parseTypeReference();
1393
1393
  this.expectToken(u.BRACKET_R), n = this.node(t, {
1394
1394
  kind: f.LIST_TYPE,
1395
- type: i
1395
+ type: r
1396
1396
  });
1397
1397
  } else
1398
1398
  n = this.parseNamedType();
@@ -1429,7 +1429,7 @@ class St {
1429
1429
  parseSchemaDefinition() {
1430
1430
  const t = this._lexer.token, n = this.parseDescription();
1431
1431
  this.expectKeyword("schema");
1432
- const i = this.parseConstDirectives(), r = this.many(
1432
+ const r = this.parseConstDirectives(), i = this.many(
1433
1433
  u.BRACE_L,
1434
1434
  this.parseOperationTypeDefinition,
1435
1435
  u.BRACE_R
@@ -1437,8 +1437,8 @@ class St {
1437
1437
  return this.node(t, {
1438
1438
  kind: f.SCHEMA_DEFINITION,
1439
1439
  description: n,
1440
- directives: i,
1441
- operationTypes: r
1440
+ directives: r,
1441
+ operationTypes: i
1442
1442
  });
1443
1443
  }
1444
1444
  /**
@@ -1447,11 +1447,11 @@ class St {
1447
1447
  parseOperationTypeDefinition() {
1448
1448
  const t = this._lexer.token, n = this.parseOperationType();
1449
1449
  this.expectToken(u.COLON);
1450
- const i = this.parseNamedType();
1450
+ const r = this.parseNamedType();
1451
1451
  return this.node(t, {
1452
1452
  kind: f.OPERATION_TYPE_DEFINITION,
1453
1453
  operation: n,
1454
- type: i
1454
+ type: r
1455
1455
  });
1456
1456
  }
1457
1457
  /**
@@ -1460,12 +1460,12 @@ class St {
1460
1460
  parseScalarTypeDefinition() {
1461
1461
  const t = this._lexer.token, n = this.parseDescription();
1462
1462
  this.expectKeyword("scalar");
1463
- const i = this.parseName(), r = this.parseConstDirectives();
1463
+ const r = this.parseName(), i = this.parseConstDirectives();
1464
1464
  return this.node(t, {
1465
1465
  kind: f.SCALAR_TYPE_DEFINITION,
1466
1466
  description: n,
1467
- name: i,
1468
- directives: r
1467
+ name: r,
1468
+ directives: i
1469
1469
  });
1470
1470
  }
1471
1471
  /**
@@ -1476,12 +1476,12 @@ class St {
1476
1476
  parseObjectTypeDefinition() {
1477
1477
  const t = this._lexer.token, n = this.parseDescription();
1478
1478
  this.expectKeyword("type");
1479
- const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1479
+ const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1480
1480
  return this.node(t, {
1481
1481
  kind: f.OBJECT_TYPE_DEFINITION,
1482
1482
  description: n,
1483
- name: i,
1484
- interfaces: r,
1483
+ name: r,
1484
+ interfaces: i,
1485
1485
  directives: s,
1486
1486
  fields: a
1487
1487
  });
@@ -1511,14 +1511,14 @@ class St {
1511
1511
  * - Description? Name ArgumentsDefinition? : Type Directives[Const]?
1512
1512
  */
1513
1513
  parseFieldDefinition() {
1514
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1514
+ const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs();
1515
1515
  this.expectToken(u.COLON);
1516
1516
  const s = this.parseTypeReference(), a = this.parseConstDirectives();
1517
1517
  return this.node(t, {
1518
1518
  kind: f.FIELD_DEFINITION,
1519
1519
  description: n,
1520
- name: i,
1521
- arguments: r,
1520
+ name: r,
1521
+ arguments: i,
1522
1522
  type: s,
1523
1523
  directives: a
1524
1524
  });
@@ -1538,17 +1538,17 @@ class St {
1538
1538
  * - Description? Name : Type DefaultValue? Directives[Const]?
1539
1539
  */
1540
1540
  parseInputValueDef() {
1541
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
1541
+ const t = this._lexer.token, n = this.parseDescription(), r = this.parseName();
1542
1542
  this.expectToken(u.COLON);
1543
- const r = this.parseTypeReference();
1543
+ const i = this.parseTypeReference();
1544
1544
  let s;
1545
1545
  this.expectOptionalToken(u.EQUALS) && (s = this.parseConstValueLiteral());
1546
1546
  const a = this.parseConstDirectives();
1547
1547
  return this.node(t, {
1548
1548
  kind: f.INPUT_VALUE_DEFINITION,
1549
1549
  description: n,
1550
- name: i,
1551
- type: r,
1550
+ name: r,
1551
+ type: i,
1552
1552
  defaultValue: s,
1553
1553
  directives: a
1554
1554
  });
@@ -1560,12 +1560,12 @@ class St {
1560
1560
  parseInterfaceTypeDefinition() {
1561
1561
  const t = this._lexer.token, n = this.parseDescription();
1562
1562
  this.expectKeyword("interface");
1563
- const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1563
+ const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1564
1564
  return this.node(t, {
1565
1565
  kind: f.INTERFACE_TYPE_DEFINITION,
1566
1566
  description: n,
1567
- name: i,
1568
- interfaces: r,
1567
+ name: r,
1568
+ interfaces: i,
1569
1569
  directives: s,
1570
1570
  fields: a
1571
1571
  });
@@ -1577,12 +1577,12 @@ class St {
1577
1577
  parseUnionTypeDefinition() {
1578
1578
  const t = this._lexer.token, n = this.parseDescription();
1579
1579
  this.expectKeyword("union");
1580
- const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1580
+ const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1581
1581
  return this.node(t, {
1582
1582
  kind: f.UNION_TYPE_DEFINITION,
1583
1583
  description: n,
1584
- name: i,
1585
- directives: r,
1584
+ name: r,
1585
+ directives: i,
1586
1586
  types: s
1587
1587
  });
1588
1588
  }
@@ -1601,12 +1601,12 @@ class St {
1601
1601
  parseEnumTypeDefinition() {
1602
1602
  const t = this._lexer.token, n = this.parseDescription();
1603
1603
  this.expectKeyword("enum");
1604
- const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1604
+ const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1605
1605
  return this.node(t, {
1606
1606
  kind: f.ENUM_TYPE_DEFINITION,
1607
1607
  description: n,
1608
- name: i,
1609
- directives: r,
1608
+ name: r,
1609
+ directives: i,
1610
1610
  values: s
1611
1611
  });
1612
1612
  }
@@ -1626,12 +1626,12 @@ class St {
1626
1626
  * EnumValueDefinition : Description? EnumValue Directives[Const]?
1627
1627
  */
1628
1628
  parseEnumValueDefinition() {
1629
- const t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1629
+ const t = this._lexer.token, n = this.parseDescription(), r = this.parseEnumValueName(), i = this.parseConstDirectives();
1630
1630
  return this.node(t, {
1631
1631
  kind: f.ENUM_VALUE_DEFINITION,
1632
1632
  description: n,
1633
- name: i,
1634
- directives: r
1633
+ name: r,
1634
+ directives: i
1635
1635
  });
1636
1636
  }
1637
1637
  /**
@@ -1639,10 +1639,10 @@ class St {
1639
1639
  */
1640
1640
  parseEnumValueName() {
1641
1641
  if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null")
1642
- throw R(
1642
+ throw N(
1643
1643
  this._lexer.source,
1644
1644
  this._lexer.token.start,
1645
- `${W(
1645
+ `${K(
1646
1646
  this._lexer.token
1647
1647
  )} is reserved and cannot be used for an enum value.`
1648
1648
  );
@@ -1655,12 +1655,12 @@ class St {
1655
1655
  parseInputObjectTypeDefinition() {
1656
1656
  const t = this._lexer.token, n = this.parseDescription();
1657
1657
  this.expectKeyword("input");
1658
- const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1658
+ const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1659
1659
  return this.node(t, {
1660
1660
  kind: f.INPUT_OBJECT_TYPE_DEFINITION,
1661
1661
  description: n,
1662
- name: i,
1663
- directives: r,
1662
+ name: r,
1663
+ directives: i,
1664
1664
  fields: s
1665
1665
  });
1666
1666
  }
@@ -1720,17 +1720,17 @@ class St {
1720
1720
  parseSchemaExtension() {
1721
1721
  const t = this._lexer.token;
1722
1722
  this.expectKeyword("extend"), this.expectKeyword("schema");
1723
- const n = this.parseConstDirectives(), i = this.optionalMany(
1723
+ const n = this.parseConstDirectives(), r = this.optionalMany(
1724
1724
  u.BRACE_L,
1725
1725
  this.parseOperationTypeDefinition,
1726
1726
  u.BRACE_R
1727
1727
  );
1728
- if (n.length === 0 && i.length === 0)
1728
+ if (n.length === 0 && r.length === 0)
1729
1729
  throw this.unexpected();
1730
1730
  return this.node(t, {
1731
1731
  kind: f.SCHEMA_EXTENSION,
1732
1732
  directives: n,
1733
- operationTypes: i
1733
+ operationTypes: r
1734
1734
  });
1735
1735
  }
1736
1736
  /**
@@ -1740,13 +1740,13 @@ class St {
1740
1740
  parseScalarTypeExtension() {
1741
1741
  const t = this._lexer.token;
1742
1742
  this.expectKeyword("extend"), this.expectKeyword("scalar");
1743
- const n = this.parseName(), i = this.parseConstDirectives();
1744
- if (i.length === 0)
1743
+ const n = this.parseName(), r = this.parseConstDirectives();
1744
+ if (r.length === 0)
1745
1745
  throw this.unexpected();
1746
1746
  return this.node(t, {
1747
1747
  kind: f.SCALAR_TYPE_EXTENSION,
1748
1748
  name: n,
1749
- directives: i
1749
+ directives: r
1750
1750
  });
1751
1751
  }
1752
1752
  /**
@@ -1758,14 +1758,14 @@ class St {
1758
1758
  parseObjectTypeExtension() {
1759
1759
  const t = this._lexer.token;
1760
1760
  this.expectKeyword("extend"), this.expectKeyword("type");
1761
- const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1762
- if (i.length === 0 && r.length === 0 && s.length === 0)
1761
+ const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1762
+ if (r.length === 0 && i.length === 0 && s.length === 0)
1763
1763
  throw this.unexpected();
1764
1764
  return this.node(t, {
1765
1765
  kind: f.OBJECT_TYPE_EXTENSION,
1766
1766
  name: n,
1767
- interfaces: i,
1768
- directives: r,
1767
+ interfaces: r,
1768
+ directives: i,
1769
1769
  fields: s
1770
1770
  });
1771
1771
  }
@@ -1778,14 +1778,14 @@ class St {
1778
1778
  parseInterfaceTypeExtension() {
1779
1779
  const t = this._lexer.token;
1780
1780
  this.expectKeyword("extend"), this.expectKeyword("interface");
1781
- const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1782
- if (i.length === 0 && r.length === 0 && s.length === 0)
1781
+ const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1782
+ if (r.length === 0 && i.length === 0 && s.length === 0)
1783
1783
  throw this.unexpected();
1784
1784
  return this.node(t, {
1785
1785
  kind: f.INTERFACE_TYPE_EXTENSION,
1786
1786
  name: n,
1787
- interfaces: i,
1788
- directives: r,
1787
+ interfaces: r,
1788
+ directives: i,
1789
1789
  fields: s
1790
1790
  });
1791
1791
  }
@@ -1797,14 +1797,14 @@ class St {
1797
1797
  parseUnionTypeExtension() {
1798
1798
  const t = this._lexer.token;
1799
1799
  this.expectKeyword("extend"), this.expectKeyword("union");
1800
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1801
- if (i.length === 0 && r.length === 0)
1800
+ const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseUnionMemberTypes();
1801
+ if (r.length === 0 && i.length === 0)
1802
1802
  throw this.unexpected();
1803
1803
  return this.node(t, {
1804
1804
  kind: f.UNION_TYPE_EXTENSION,
1805
1805
  name: n,
1806
- directives: i,
1807
- types: r
1806
+ directives: r,
1807
+ types: i
1808
1808
  });
1809
1809
  }
1810
1810
  /**
@@ -1815,14 +1815,14 @@ class St {
1815
1815
  parseEnumTypeExtension() {
1816
1816
  const t = this._lexer.token;
1817
1817
  this.expectKeyword("extend"), this.expectKeyword("enum");
1818
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1819
- if (i.length === 0 && r.length === 0)
1818
+ const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseEnumValuesDefinition();
1819
+ if (r.length === 0 && i.length === 0)
1820
1820
  throw this.unexpected();
1821
1821
  return this.node(t, {
1822
1822
  kind: f.ENUM_TYPE_EXTENSION,
1823
1823
  name: n,
1824
- directives: i,
1825
- values: r
1824
+ directives: r,
1825
+ values: i
1826
1826
  });
1827
1827
  }
1828
1828
  /**
@@ -1833,14 +1833,14 @@ class St {
1833
1833
  parseInputObjectTypeExtension() {
1834
1834
  const t = this._lexer.token;
1835
1835
  this.expectKeyword("extend"), this.expectKeyword("input");
1836
- const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1837
- if (i.length === 0 && r.length === 0)
1836
+ const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseInputFieldsDefinition();
1837
+ if (r.length === 0 && i.length === 0)
1838
1838
  throw this.unexpected();
1839
1839
  return this.node(t, {
1840
1840
  kind: f.INPUT_OBJECT_TYPE_EXTENSION,
1841
1841
  name: n,
1842
- directives: i,
1843
- fields: r
1842
+ directives: r,
1843
+ fields: i
1844
1844
  });
1845
1845
  }
1846
1846
  /**
@@ -1852,14 +1852,14 @@ class St {
1852
1852
  parseDirectiveDefinition() {
1853
1853
  const t = this._lexer.token, n = this.parseDescription();
1854
1854
  this.expectKeyword("directive"), this.expectToken(u.AT);
1855
- const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1855
+ const r = this.parseName(), i = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1856
1856
  this.expectKeyword("on");
1857
1857
  const a = this.parseDirectiveLocations();
1858
1858
  return this.node(t, {
1859
1859
  kind: f.DIRECTIVE_DEFINITION,
1860
1860
  description: n,
1861
- name: i,
1862
- arguments: r,
1861
+ name: r,
1862
+ arguments: i,
1863
1863
  repeatable: s,
1864
1864
  locations: a
1865
1865
  });
@@ -1932,10 +1932,10 @@ class St {
1932
1932
  const n = this._lexer.token;
1933
1933
  if (n.kind === t)
1934
1934
  return this.advanceLexer(), n;
1935
- throw R(
1935
+ throw N(
1936
1936
  this._lexer.source,
1937
1937
  n.start,
1938
- `Expected ${Me(t)}, found ${W(n)}.`
1938
+ `Expected ${Ue(t)}, found ${K(n)}.`
1939
1939
  );
1940
1940
  }
1941
1941
  /**
@@ -1954,10 +1954,10 @@ class St {
1954
1954
  if (n.kind === u.NAME && n.value === t)
1955
1955
  this.advanceLexer();
1956
1956
  else
1957
- throw R(
1957
+ throw N(
1958
1958
  this._lexer.source,
1959
1959
  n.start,
1960
- `Expected "${t}", found ${W(n)}.`
1960
+ `Expected "${t}", found ${K(n)}.`
1961
1961
  );
1962
1962
  }
1963
1963
  /**
@@ -1973,10 +1973,10 @@ class St {
1973
1973
  */
1974
1974
  unexpected(t) {
1975
1975
  const n = t ?? this._lexer.token;
1976
- return R(
1976
+ return N(
1977
1977
  this._lexer.source,
1978
1978
  n.start,
1979
- `Unexpected ${W(n)}.`
1979
+ `Unexpected ${K(n)}.`
1980
1980
  );
1981
1981
  }
1982
1982
  /**
@@ -1984,12 +1984,12 @@ class St {
1984
1984
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
1985
1985
  * Advances the parser to the next lex token after the closing token.
1986
1986
  */
1987
- any(t, n, i) {
1987
+ any(t, n, r) {
1988
1988
  this.expectToken(t);
1989
- const r = [];
1990
- for (; !this.expectOptionalToken(i); )
1991
- r.push(n.call(this));
1992
- return r;
1989
+ const i = [];
1990
+ for (; !this.expectOptionalToken(r); )
1991
+ i.push(n.call(this));
1992
+ return i;
1993
1993
  }
1994
1994
  /**
1995
1995
  * Returns a list of parse nodes, determined by the parseFn.
@@ -1997,13 +1997,13 @@ class St {
1997
1997
  * that begins with a lex token of openKind and ends with a lex token of closeKind.
1998
1998
  * Advances the parser to the next lex token after the closing token.
1999
1999
  */
2000
- optionalMany(t, n, i) {
2000
+ optionalMany(t, n, r) {
2001
2001
  if (this.expectOptionalToken(t)) {
2002
- const r = [];
2002
+ const i = [];
2003
2003
  do
2004
- r.push(n.call(this));
2005
- while (!this.expectOptionalToken(i));
2006
- return r;
2004
+ i.push(n.call(this));
2005
+ while (!this.expectOptionalToken(r));
2006
+ return i;
2007
2007
  }
2008
2008
  return [];
2009
2009
  }
@@ -2012,13 +2012,13 @@ class St {
2012
2012
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2013
2013
  * Advances the parser to the next lex token after the closing token.
2014
2014
  */
2015
- many(t, n, i) {
2015
+ many(t, n, r) {
2016
2016
  this.expectToken(t);
2017
- const r = [];
2017
+ const i = [];
2018
2018
  do
2019
- r.push(n.call(this));
2020
- while (!this.expectOptionalToken(i));
2021
- return r;
2019
+ i.push(n.call(this));
2020
+ while (!this.expectOptionalToken(r));
2021
+ return i;
2022
2022
  }
2023
2023
  /**
2024
2024
  * Returns a non-empty list of parse nodes, determined by the parseFn.
@@ -2027,37 +2027,37 @@ class St {
2027
2027
  */
2028
2028
  delimitedMany(t, n) {
2029
2029
  this.expectOptionalToken(t);
2030
- const i = [];
2030
+ const r = [];
2031
2031
  do
2032
- i.push(n.call(this));
2032
+ r.push(n.call(this));
2033
2033
  while (this.expectOptionalToken(t));
2034
- return i;
2034
+ return r;
2035
2035
  }
2036
2036
  advanceLexer() {
2037
2037
  const { maxTokens: t } = this._options, n = this._lexer.advance();
2038
2038
  if (t !== void 0 && n.kind !== u.EOF && (++this._tokenCounter, this._tokenCounter > t))
2039
- throw R(
2039
+ throw N(
2040
2040
  this._lexer.source,
2041
2041
  n.start,
2042
2042
  `Document contains more that ${t} tokens. Parsing aborted.`
2043
2043
  );
2044
2044
  }
2045
2045
  }
2046
- function W(e) {
2046
+ function K(e) {
2047
2047
  const t = e.value;
2048
- return Me(e.kind) + (t != null ? ` "${t}"` : "");
2048
+ return Ue(e.kind) + (t != null ? ` "${t}"` : "");
2049
2049
  }
2050
- function Me(e) {
2050
+ function Ue(e) {
2051
2051
  return at(e) ? `"${e}"` : e;
2052
2052
  }
2053
2053
  function Rt(e) {
2054
- return `"${e.replace(Nt, xt)}"`;
2054
+ return `"${e.replace(Nt, Pt)}"`;
2055
2055
  }
2056
2056
  const Nt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
2057
- function xt(e) {
2058
- return Ot[e.charCodeAt(0)];
2057
+ function Pt(e) {
2058
+ return xt[e.charCodeAt(0)];
2059
2059
  }
2060
- const Ot = [
2060
+ const xt = [
2061
2061
  "\\u0000",
2062
2062
  "\\u0001",
2063
2063
  "\\u0002",
@@ -2223,18 +2223,18 @@ const Ot = [
2223
2223
  "\\u009D",
2224
2224
  "\\u009E",
2225
2225
  "\\u009F"
2226
- ], Pt = Object.freeze({});
2226
+ ], Ot = Object.freeze({});
2227
2227
  function bt(e, t, n = De) {
2228
- const i = /* @__PURE__ */ new Map();
2228
+ const r = /* @__PURE__ */ new Map();
2229
2229
  for (const b of Object.values(f))
2230
- i.set(b, Dt(t, b));
2231
- let r, s = Array.isArray(e), a = [e], c = -1, p = [], h = e, m, y;
2232
- const C = [], A = [];
2230
+ r.set(b, Dt(t, b));
2231
+ let i, s = Array.isArray(e), a = [e], c = -1, p = [], h = e, m, C;
2232
+ const y = [], T = [];
2233
2233
  do {
2234
2234
  c++;
2235
2235
  const b = c === a.length, z = b && p.length !== 0;
2236
2236
  if (b) {
2237
- if (m = A.length === 0 ? void 0 : C[C.length - 1], h = y, y = A.pop(), z)
2237
+ if (m = T.length === 0 ? void 0 : y[y.length - 1], h = C, C = T.pop(), z)
2238
2238
  if (s) {
2239
2239
  h = h.slice();
2240
2240
  let D = 0;
@@ -2250,45 +2250,45 @@ function bt(e, t, n = De) {
2250
2250
  for (const [D, B] of p)
2251
2251
  h[D] = B;
2252
2252
  }
2253
- c = r.index, a = r.keys, p = r.edits, s = r.inArray, r = r.prev;
2254
- } else if (y) {
2255
- if (m = s ? c : a[c], h = y[m], h == null)
2253
+ c = i.index, a = i.keys, p = i.edits, s = i.inArray, i = i.prev;
2254
+ } else if (C) {
2255
+ if (m = s ? c : a[c], h = C[m], h == null)
2256
2256
  continue;
2257
- C.push(m);
2257
+ y.push(m);
2258
2258
  }
2259
2259
  let _;
2260
2260
  if (!Array.isArray(h)) {
2261
2261
  var g, I;
2262
- Se(h) || K(!1, `Invalid AST Node: ${Ee(h)}.`);
2263
- const D = b ? (g = i.get(h.kind)) === null || g === void 0 ? void 0 : g.leave : (I = i.get(h.kind)) === null || I === void 0 ? void 0 : I.enter;
2264
- if (_ = D == null ? void 0 : D.call(t, h, m, y, C, A), _ === Pt)
2262
+ Se(h) || W(!1, `Invalid AST Node: ${Ee(h)}.`);
2263
+ const D = b ? (g = r.get(h.kind)) === null || g === void 0 ? void 0 : g.leave : (I = r.get(h.kind)) === null || I === void 0 ? void 0 : I.enter;
2264
+ if (_ = D == null ? void 0 : D.call(t, h, m, C, y, T), _ === Ot)
2265
2265
  break;
2266
2266
  if (_ === !1) {
2267
2267
  if (!b) {
2268
- C.pop();
2268
+ y.pop();
2269
2269
  continue;
2270
2270
  }
2271
2271
  } else if (_ !== void 0 && (p.push([m, _]), !b))
2272
2272
  if (Se(_))
2273
2273
  h = _;
2274
2274
  else {
2275
- C.pop();
2275
+ y.pop();
2276
2276
  continue;
2277
2277
  }
2278
2278
  }
2279
2279
  if (_ === void 0 && z && p.push([m, h]), b)
2280
- C.pop();
2280
+ y.pop();
2281
2281
  else {
2282
- var P;
2283
- r = {
2282
+ var O;
2283
+ i = {
2284
2284
  inArray: s,
2285
2285
  index: c,
2286
2286
  keys: a,
2287
2287
  edits: p,
2288
- prev: r
2289
- }, s = Array.isArray(h), a = s ? h : (P = n[h.kind]) !== null && P !== void 0 ? P : [], c = -1, p = [], y && A.push(y), y = h;
2288
+ prev: i
2289
+ }, s = Array.isArray(h), a = s ? h : (O = n[h.kind]) !== null && O !== void 0 ? O : [], c = -1, p = [], C && T.push(C), C = h;
2290
2290
  }
2291
- } while (r !== void 0);
2291
+ } while (i !== void 0);
2292
2292
  return p.length !== 0 ? p[p.length - 1][1] : e;
2293
2293
  }
2294
2294
  function Dt(e, t) {
@@ -2331,19 +2331,19 @@ const _t = 80, Lt = {
2331
2331
  }
2332
2332
  },
2333
2333
  VariableDefinition: {
2334
- leave: ({ variable: e, type: t, defaultValue: n, directives: i }) => e + ": " + t + v(" = ", n) + v(" ", l(i, " "))
2334
+ leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + v(" = ", n) + v(" ", l(r, " "))
2335
2335
  },
2336
2336
  SelectionSet: {
2337
2337
  leave: ({ selections: e }) => k(e)
2338
2338
  },
2339
2339
  Field: {
2340
- leave({ alias: e, name: t, arguments: n, directives: i, selectionSet: r }) {
2340
+ leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) {
2341
2341
  const s = v("", e, ": ") + t;
2342
2342
  let a = s + v("(", l(n, ", "), ")");
2343
2343
  return a.length > _t && (a = s + v(`(
2344
2344
  `, Z(l(n, `
2345
2345
  `)), `
2346
- )`)), l([a, l(i, " "), r], " ");
2346
+ )`)), l([a, l(r, " "), i], " ");
2347
2347
  }
2348
2348
  },
2349
2349
  Argument: {
@@ -2365,9 +2365,9 @@ const _t = 80, Lt = {
2365
2365
  )
2366
2366
  },
2367
2367
  FragmentDefinition: {
2368
- leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: i, selectionSet: r }) => (
2368
+ leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: r, selectionSet: i }) => (
2369
2369
  // or removed in the future.
2370
- `fragment ${e}${v("(", l(n, ", "), ")")} on ${t} ${v("", l(i, " "), " ")}` + r
2370
+ `fragment ${e}${v("(", l(n, ", "), ")")} on ${t} ${v("", l(r, " "), " ")}` + i
2371
2371
  )
2372
2372
  },
2373
2373
  // Value
@@ -2378,7 +2378,7 @@ const _t = 80, Lt = {
2378
2378
  leave: ({ value: e }) => e
2379
2379
  },
2380
2380
  StringValue: {
2381
- leave: ({ value: e, block: t }) => t ? it(e) : Rt(e)
2381
+ leave: ({ value: e, block: t }) => t ? rt(e) : Rt(e)
2382
2382
  },
2383
2383
  BooleanValue: {
2384
2384
  leave: ({ value: e }) => e ? "true" : "false"
@@ -2425,70 +2425,70 @@ const _t = 80, Lt = {
2425
2425
  `) + l(["scalar", t, l(n, " ")], " ")
2426
2426
  },
2427
2427
  ObjectTypeDefinition: {
2428
- leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => v("", e, `
2428
+ leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, `
2429
2429
  `) + l(
2430
2430
  [
2431
2431
  "type",
2432
2432
  t,
2433
2433
  v("implements ", l(n, " & ")),
2434
- l(i, " "),
2435
- k(r)
2434
+ l(r, " "),
2435
+ k(i)
2436
2436
  ],
2437
2437
  " "
2438
2438
  )
2439
2439
  },
2440
2440
  FieldDefinition: {
2441
- leave: ({ description: e, name: t, arguments: n, type: i, directives: r }) => v("", e, `
2441
+ leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => v("", e, `
2442
2442
  `) + t + (Ne(n) ? v(`(
2443
2443
  `, Z(l(n, `
2444
2444
  `)), `
2445
- )`) : v("(", l(n, ", "), ")")) + ": " + i + v(" ", l(r, " "))
2445
+ )`) : v("(", l(n, ", "), ")")) + ": " + r + v(" ", l(i, " "))
2446
2446
  },
2447
2447
  InputValueDefinition: {
2448
- leave: ({ description: e, name: t, type: n, defaultValue: i, directives: r }) => v("", e, `
2448
+ leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => v("", e, `
2449
2449
  `) + l(
2450
- [t + ": " + n, v("= ", i), l(r, " ")],
2450
+ [t + ": " + n, v("= ", r), l(i, " ")],
2451
2451
  " "
2452
2452
  )
2453
2453
  },
2454
2454
  InterfaceTypeDefinition: {
2455
- leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => v("", e, `
2455
+ leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, `
2456
2456
  `) + l(
2457
2457
  [
2458
2458
  "interface",
2459
2459
  t,
2460
2460
  v("implements ", l(n, " & ")),
2461
- l(i, " "),
2462
- k(r)
2461
+ l(r, " "),
2462
+ k(i)
2463
2463
  ],
2464
2464
  " "
2465
2465
  )
2466
2466
  },
2467
2467
  UnionTypeDefinition: {
2468
- leave: ({ description: e, name: t, directives: n, types: i }) => v("", e, `
2468
+ leave: ({ description: e, name: t, directives: n, types: r }) => v("", e, `
2469
2469
  `) + l(
2470
- ["union", t, l(n, " "), v("= ", l(i, " | "))],
2470
+ ["union", t, l(n, " "), v("= ", l(r, " | "))],
2471
2471
  " "
2472
2472
  )
2473
2473
  },
2474
2474
  EnumTypeDefinition: {
2475
- leave: ({ description: e, name: t, directives: n, values: i }) => v("", e, `
2476
- `) + l(["enum", t, l(n, " "), k(i)], " ")
2475
+ leave: ({ description: e, name: t, directives: n, values: r }) => v("", e, `
2476
+ `) + l(["enum", t, l(n, " "), k(r)], " ")
2477
2477
  },
2478
2478
  EnumValueDefinition: {
2479
2479
  leave: ({ description: e, name: t, directives: n }) => v("", e, `
2480
2480
  `) + l([t, l(n, " ")], " ")
2481
2481
  },
2482
2482
  InputObjectTypeDefinition: {
2483
- leave: ({ description: e, name: t, directives: n, fields: i }) => v("", e, `
2484
- `) + l(["input", t, l(n, " "), k(i)], " ")
2483
+ leave: ({ description: e, name: t, directives: n, fields: r }) => v("", e, `
2484
+ `) + l(["input", t, l(n, " "), k(r)], " ")
2485
2485
  },
2486
2486
  DirectiveDefinition: {
2487
- leave: ({ description: e, name: t, arguments: n, repeatable: i, locations: r }) => v("", e, `
2487
+ leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => v("", e, `
2488
2488
  `) + "directive @" + t + (Ne(n) ? v(`(
2489
2489
  `, Z(l(n, `
2490
2490
  `)), `
2491
- )`) : v("(", l(n, ", "), ")")) + (i ? " repeatable" : "") + " on " + l(r, " | ")
2491
+ )`) : v("(", l(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + l(i, " | ")
2492
2492
  },
2493
2493
  SchemaExtension: {
2494
2494
  leave: ({ directives: e, operationTypes: t }) => l(
@@ -2500,25 +2500,25 @@ const _t = 80, Lt = {
2500
2500
  leave: ({ name: e, directives: t }) => l(["extend scalar", e, l(t, " ")], " ")
2501
2501
  },
2502
2502
  ObjectTypeExtension: {
2503
- leave: ({ name: e, interfaces: t, directives: n, fields: i }) => l(
2503
+ leave: ({ name: e, interfaces: t, directives: n, fields: r }) => l(
2504
2504
  [
2505
2505
  "extend type",
2506
2506
  e,
2507
2507
  v("implements ", l(t, " & ")),
2508
2508
  l(n, " "),
2509
- k(i)
2509
+ k(r)
2510
2510
  ],
2511
2511
  " "
2512
2512
  )
2513
2513
  },
2514
2514
  InterfaceTypeExtension: {
2515
- leave: ({ name: e, interfaces: t, directives: n, fields: i }) => l(
2515
+ leave: ({ name: e, interfaces: t, directives: n, fields: r }) => l(
2516
2516
  [
2517
2517
  "extend interface",
2518
2518
  e,
2519
2519
  v("implements ", l(t, " & ")),
2520
2520
  l(n, " "),
2521
- k(i)
2521
+ k(r)
2522
2522
  ],
2523
2523
  " "
2524
2524
  )
@@ -2543,7 +2543,7 @@ const _t = 80, Lt = {
2543
2543
  };
2544
2544
  function l(e, t = "") {
2545
2545
  var n;
2546
- return (n = e == null ? void 0 : e.filter((i) => i).join(t)) !== null && n !== void 0 ? n : "";
2546
+ return (n = e == null ? void 0 : e.filter((r) => r).join(t)) !== null && n !== void 0 ? n : "";
2547
2547
  }
2548
2548
  function k(e) {
2549
2549
  return v(`{
@@ -2563,7 +2563,7 @@ function Ne(e) {
2563
2563
  return (t = e == null ? void 0 : e.some((n) => n.includes(`
2564
2564
  `))) !== null && t !== void 0 ? t : !1;
2565
2565
  }
2566
- var ee = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), qe = !0, re = !1;
2566
+ var ee = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), qe = !0, ie = !1;
2567
2567
  function Ge(e) {
2568
2568
  return e.replace(/[\s,]+/g, " ").trim();
2569
2569
  }
@@ -2572,33 +2572,33 @@ function wt(e) {
2572
2572
  }
2573
2573
  function Ft(e) {
2574
2574
  var t = /* @__PURE__ */ new Set(), n = [];
2575
- return e.definitions.forEach(function(i) {
2576
- if (i.kind === "FragmentDefinition") {
2577
- var r = i.name.value, s = wt(i.loc), a = ge.get(r);
2578
- a && !a.has(s) ? qe && console.warn("Warning: fragment with name " + r + ` already exists.
2575
+ return e.definitions.forEach(function(r) {
2576
+ if (r.kind === "FragmentDefinition") {
2577
+ var i = r.name.value, s = wt(r.loc), a = ge.get(i);
2578
+ a && !a.has(s) ? qe && console.warn("Warning: fragment with name " + i + ` already exists.
2579
2579
  graphql-tag enforces all fragment names across your application to be unique; read more about
2580
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : a || ge.set(r, a = /* @__PURE__ */ new Set()), a.add(s), t.has(s) || (t.add(s), n.push(i));
2580
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : a || ge.set(i, a = /* @__PURE__ */ new Set()), a.add(s), t.has(s) || (t.add(s), n.push(r));
2581
2581
  } else
2582
- n.push(i);
2582
+ n.push(r);
2583
2583
  }), ne(ne({}, e), { definitions: n });
2584
2584
  }
2585
2585
  function Bt(e) {
2586
2586
  var t = new Set(e.definitions);
2587
- t.forEach(function(i) {
2588
- i.loc && delete i.loc, Object.keys(i).forEach(function(r) {
2589
- var s = i[r];
2587
+ t.forEach(function(r) {
2588
+ r.loc && delete r.loc, Object.keys(r).forEach(function(i) {
2589
+ var s = r[i];
2590
2590
  s && typeof s == "object" && t.add(s);
2591
2591
  });
2592
2592
  });
2593
2593
  var n = e.loc;
2594
2594
  return n && (delete n.startToken, delete n.endToken), e;
2595
2595
  }
2596
- function Ut(e) {
2596
+ function Mt(e) {
2597
2597
  var t = Ge(e);
2598
2598
  if (!ee.has(t)) {
2599
- var n = Ue(e, {
2600
- experimentalFragmentVariables: re,
2601
- allowLegacyFragmentVariables: re
2599
+ var n = Me(e, {
2600
+ experimentalFragmentVariables: ie,
2601
+ allowLegacyFragmentVariables: ie
2602
2602
  });
2603
2603
  if (!n || n.kind !== "Document")
2604
2604
  throw new Error("Not a valid GraphQL document.");
@@ -2610,26 +2610,26 @@ function q(e) {
2610
2610
  for (var t = [], n = 1; n < arguments.length; n++)
2611
2611
  t[n - 1] = arguments[n];
2612
2612
  typeof e == "string" && (e = [e]);
2613
- var i = e[0];
2614
- return t.forEach(function(r, s) {
2615
- r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += e[s + 1];
2616
- }), Ut(i);
2613
+ var r = e[0];
2614
+ return t.forEach(function(i, s) {
2615
+ i && i.kind === "Document" ? r += i.loc.source.body : r += i, r += e[s + 1];
2616
+ }), Mt(r);
2617
2617
  }
2618
- function Mt() {
2618
+ function Ut() {
2619
2619
  ee.clear(), ge.clear();
2620
2620
  }
2621
2621
  function qt() {
2622
2622
  qe = !1;
2623
2623
  }
2624
2624
  function Gt() {
2625
- re = !0;
2625
+ ie = !0;
2626
2626
  }
2627
2627
  function Vt() {
2628
- re = !1;
2628
+ ie = !1;
2629
2629
  }
2630
2630
  var $ = {
2631
2631
  gql: q,
2632
- resetCaches: Mt,
2632
+ resetCaches: Ut,
2633
2633
  disableFragmentWarnings: qt,
2634
2634
  enableExperimentalFragmentVariables: Gt,
2635
2635
  disableExperimentalFragmentVariables: Vt
@@ -2638,7 +2638,7 @@ var $ = {
2638
2638
  e.gql = $.gql, e.resetCaches = $.resetCaches, e.disableFragmentWarnings = $.disableFragmentWarnings, e.enableExperimentalFragmentVariables = $.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = $.disableExperimentalFragmentVariables;
2639
2639
  })(q || (q = {}));
2640
2640
  q.default = q;
2641
- const N = q, $t = N`
2641
+ const R = q, $t = R`
2642
2642
  query GetLocationAvailabilities($sku: String!, $first: Int, $after: String, $isReverse: Boolean! = false) {
2643
2643
  locationAvailabilities(
2644
2644
  sku: $sku
@@ -2677,7 +2677,7 @@ const N = q, $t = N`
2677
2677
  }
2678
2678
  }
2679
2679
  }
2680
- `, jt = N`
2680
+ `, jt = R`
2681
2681
  query GetLocationAvailability($sku: String!, $locationID: ID!) {
2682
2682
  locationAvailability(sku: $sku, locationID: $locationID) {
2683
2683
  location {
@@ -2703,7 +2703,7 @@ const N = q, $t = N`
2703
2703
  inventoryQuantity
2704
2704
  }
2705
2705
  }
2706
- `, Ht = N`
2706
+ `, Ht = R`
2707
2707
  query GetPurchasingCustomerMetafield($namespace: String!, $key: String!) {
2708
2708
  purchasingCustomerMetafield(namespace: $namespace, key: $key) {
2709
2709
  id
@@ -2712,7 +2712,7 @@ const N = q, $t = N`
2712
2712
  value
2713
2713
  }
2714
2714
  }
2715
- `, Yt = N`
2715
+ `, Yt = R`
2716
2716
  query GetPoints {
2717
2717
  purchasingCustomer {
2718
2718
  pointsApproved
@@ -2724,7 +2724,7 @@ const N = q, $t = N`
2724
2724
  }
2725
2725
  }
2726
2726
  }
2727
- `, zt = N`
2727
+ `, zt = R`
2728
2728
  query GetLocations($first: Int, $after: String, $filter: LocationFilter, $isReverse: Boolean! = false) {
2729
2729
  locations(first: $first, after: $after, filter: $filter, isReverse: $isReverse) {
2730
2730
  nodes {
@@ -2755,7 +2755,7 @@ const N = q, $t = N`
2755
2755
  }
2756
2756
  }
2757
2757
  }
2758
- `, Jt = N`
2758
+ `, Jt = R`
2759
2759
  query GetPurchasingCustomerDiscounts($first: Int, $after: String, $isReverse: Boolean! = false) {
2760
2760
  purchasingCustomer {
2761
2761
  id
@@ -2784,14 +2784,14 @@ const N = q, $t = N`
2784
2784
  }
2785
2785
  }
2786
2786
  }
2787
- `, Qt = N`
2787
+ `, Qt = R`
2788
2788
  query GetPurchasingCustomerDiscountCodeCount {
2789
2789
  purchasingCustomer {
2790
2790
  id
2791
2791
  orderPriceAdjustmentRuleCount
2792
2792
  }
2793
2793
  }
2794
- `, Xt = N`
2794
+ `, Xt = R`
2795
2795
  query GetPurchasingCustomerPointChangeActivities($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: PointChangeActivitySortKey! = CREATED_AT) {
2796
2796
  purchasingCustomer {
2797
2797
  id
@@ -2851,7 +2851,7 @@ const N = q, $t = N`
2851
2851
  }
2852
2852
  }
2853
2853
  }
2854
- `, Wt = N`
2854
+ `, Kt = R`
2855
2855
  query GetPurchasingCustomerRank {
2856
2856
  purchasingCustomer {
2857
2857
  currentCustomerRank {
@@ -2892,14 +2892,14 @@ const N = q, $t = N`
2892
2892
  }
2893
2893
  }
2894
2894
  }
2895
- `, Kt = N`
2895
+ `, Wt = R`
2896
2896
  query GetSharingPurchasingCustomerCount {
2897
2897
  purchasingCustomer {
2898
2898
  id
2899
2899
  sharingPurchasingCustomerCount
2900
2900
  }
2901
2901
  }
2902
- `, Zt = N`
2902
+ `, Zt = R`
2903
2903
  query GetPurchasingCustomerSharing {
2904
2904
  purchasingCustomer {
2905
2905
  id
@@ -2916,7 +2916,7 @@ const N = q, $t = N`
2916
2916
  }
2917
2917
  }
2918
2918
  }
2919
- `, en = N`
2919
+ `, en = R`
2920
2920
  query GetProduct($id: String!, $first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: ProductVariantSortKeys! = CREATED_AT) {
2921
2921
  productByProductShopifyLegacyResourceID(productShopifyLegacyResourceID: $id) {
2922
2922
  id
@@ -2948,14 +2948,14 @@ const N = q, $t = N`
2948
2948
  }
2949
2949
  }
2950
2950
  }
2951
- `, tn = N`
2951
+ `, tn = R`
2952
2952
  query GetHasBackOrderProductVariantsByProductShopifyLegacyResourceID($id: String!) {
2953
2953
  productByProductShopifyLegacyResourceID(productShopifyLegacyResourceID: $id) {
2954
2954
  id
2955
2955
  hasBackOrderProductVariants
2956
2956
  }
2957
2957
  }
2958
- `, nn = N`
2958
+ `, nn = R`
2959
2959
  query GetPointCampaignOrderRuleTargetCustomerRank {
2960
2960
  pointCampaignOrderRuleTargetCustomerRank {
2961
2961
  pointCampaignOrderRule {
@@ -2968,7 +2968,7 @@ const N = q, $t = N`
2968
2968
  fixedPoint
2969
2969
  }
2970
2970
  }
2971
- `, rn = N`
2971
+ `, rn = R`
2972
2972
  query GetEstimatedShopifyCartPoint($input: EstimatedShopifyCartPointInput!) {
2973
2973
  estimatedShopifyCartPoint(input: $input) {
2974
2974
  pointsEarning
@@ -2984,7 +2984,7 @@ const N = q, $t = N`
2984
2984
  }
2985
2985
  }
2986
2986
  }
2987
- `, sn = N`
2987
+ `, sn = R`
2988
2988
  query GetEstimatedShopifyCartLineItemPoint($input: EstimatedShopifyCartLineItemPointInput!) {
2989
2989
  estimatedShopifyCartLineItemPoint(input: $input) {
2990
2990
  pointsEarning
@@ -3000,7 +3000,7 @@ const N = q, $t = N`
3000
3000
  }
3001
3001
  }
3002
3002
  }
3003
- `, an = N`
3003
+ `, an = R`
3004
3004
  mutation PurchasingCustomerSendCustomerSharingActivationCode {
3005
3005
  purchasingCustomerSendCustomerSharingActivationCode {
3006
3006
  purchasingCustomer {
@@ -3016,7 +3016,7 @@ const N = q, $t = N`
3016
3016
  }
3017
3017
  }
3018
3018
  }
3019
- `, on = N`
3019
+ `, on = R`
3020
3020
  mutation PurchasingCustomerActivateCustomerSharing($email: String!, $activationCode: String!) {
3021
3021
  purchasingCustomerActivateCustomerSharing(
3022
3022
  input: {email: $email, activationCode: $activationCode}
@@ -3031,122 +3031,163 @@ const N = q, $t = N`
3031
3031
  }
3032
3032
  }
3033
3033
  }
3034
- `, un = (e, t, n, i) => e();
3035
- function cn(e, t = un) {
3034
+ `, un = R`
3035
+ query GetMiles {
3036
+ purchasingCustomer {
3037
+ miles
3038
+ }
3039
+ }
3040
+ `, cn = R`
3041
+ query GetPurchasingCustomerMileChangeActivities($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: MileChangeActivitySortKey! = CREATED_AT) {
3042
+ purchasingCustomer {
3043
+ id
3044
+ mileChangeActivities(
3045
+ first: $first
3046
+ after: $after
3047
+ isReverse: $isReverse
3048
+ sortKeys: $sortKeys
3049
+ ) {
3050
+ nodes {
3051
+ id
3052
+ title
3053
+ mileChange {
3054
+ id
3055
+ delta
3056
+ mileChangeCreatedAt
3057
+ createdAt
3058
+ }
3059
+ }
3060
+ pageInfo {
3061
+ startCursor
3062
+ endCursor
3063
+ hasNextPage
3064
+ hasPreviousPage
3065
+ }
3066
+ }
3067
+ }
3068
+ }
3069
+ `, dn = (e, t, n, r) => e();
3070
+ function ln(e, t = dn) {
3036
3071
  return {
3037
- GetLocationAvailabilities(n, i) {
3038
- return t((r) => e.request($t, n, { ...i, ...r }), "GetLocationAvailabilities", "query", n);
3072
+ GetLocationAvailabilities(n, r) {
3073
+ return t((i) => e.request($t, n, { ...r, ...i }), "GetLocationAvailabilities", "query", n);
3074
+ },
3075
+ GetLocationAvailability(n, r) {
3076
+ return t((i) => e.request(jt, n, { ...r, ...i }), "GetLocationAvailability", "query", n);
3039
3077
  },
3040
- GetLocationAvailability(n, i) {
3041
- return t((r) => e.request(jt, n, { ...i, ...r }), "GetLocationAvailability", "query", n);
3078
+ GetPurchasingCustomerMetafield(n, r) {
3079
+ return t((i) => e.request(Ht, n, { ...r, ...i }), "GetPurchasingCustomerMetafield", "query", n);
3042
3080
  },
3043
- GetPurchasingCustomerMetafield(n, i) {
3044
- return t((r) => e.request(Ht, n, { ...i, ...r }), "GetPurchasingCustomerMetafield", "query", n);
3081
+ GetPoints(n, r) {
3082
+ return t((i) => e.request(Yt, n, { ...r, ...i }), "GetPoints", "query", n);
3045
3083
  },
3046
- GetPoints(n, i) {
3047
- return t((r) => e.request(Yt, n, { ...i, ...r }), "GetPoints", "query", n);
3084
+ GetLocations(n, r) {
3085
+ return t((i) => e.request(zt, n, { ...r, ...i }), "GetLocations", "query", n);
3048
3086
  },
3049
- GetLocations(n, i) {
3050
- return t((r) => e.request(zt, n, { ...i, ...r }), "GetLocations", "query", n);
3087
+ GetPurchasingCustomerDiscounts(n, r) {
3088
+ return t((i) => e.request(Jt, n, { ...r, ...i }), "GetPurchasingCustomerDiscounts", "query", n);
3051
3089
  },
3052
- GetPurchasingCustomerDiscounts(n, i) {
3053
- return t((r) => e.request(Jt, n, { ...i, ...r }), "GetPurchasingCustomerDiscounts", "query", n);
3090
+ GetPurchasingCustomerDiscountCodeCount(n, r) {
3091
+ return t((i) => e.request(Qt, n, { ...r, ...i }), "GetPurchasingCustomerDiscountCodeCount", "query", n);
3054
3092
  },
3055
- GetPurchasingCustomerDiscountCodeCount(n, i) {
3056
- return t((r) => e.request(Qt, n, { ...i, ...r }), "GetPurchasingCustomerDiscountCodeCount", "query", n);
3093
+ GetPurchasingCustomerPointChangeActivities(n, r) {
3094
+ return t((i) => e.request(Xt, n, { ...r, ...i }), "GetPurchasingCustomerPointChangeActivities", "query", n);
3057
3095
  },
3058
- GetPurchasingCustomerPointChangeActivities(n, i) {
3059
- return t((r) => e.request(Xt, n, { ...i, ...r }), "GetPurchasingCustomerPointChangeActivities", "query", n);
3096
+ GetPurchasingCustomerRank(n, r) {
3097
+ return t((i) => e.request(Kt, n, { ...r, ...i }), "GetPurchasingCustomerRank", "query", n);
3060
3098
  },
3061
- GetPurchasingCustomerRank(n, i) {
3062
- return t((r) => e.request(Wt, n, { ...i, ...r }), "GetPurchasingCustomerRank", "query", n);
3099
+ GetSharingPurchasingCustomerCount(n, r) {
3100
+ return t((i) => e.request(Wt, n, { ...r, ...i }), "GetSharingPurchasingCustomerCount", "query", n);
3063
3101
  },
3064
- GetSharingPurchasingCustomerCount(n, i) {
3065
- return t((r) => e.request(Kt, n, { ...i, ...r }), "GetSharingPurchasingCustomerCount", "query", n);
3102
+ GetPurchasingCustomerSharing(n, r) {
3103
+ return t((i) => e.request(Zt, n, { ...r, ...i }), "GetPurchasingCustomerSharing", "query", n);
3066
3104
  },
3067
- GetPurchasingCustomerSharing(n, i) {
3068
- return t((r) => e.request(Zt, n, { ...i, ...r }), "GetPurchasingCustomerSharing", "query", n);
3105
+ GetProduct(n, r) {
3106
+ return t((i) => e.request(en, n, { ...r, ...i }), "GetProduct", "query", n);
3069
3107
  },
3070
- GetProduct(n, i) {
3071
- return t((r) => e.request(en, n, { ...i, ...r }), "GetProduct", "query", n);
3108
+ GetHasBackOrderProductVariantsByProductShopifyLegacyResourceID(n, r) {
3109
+ return t((i) => e.request(tn, n, { ...r, ...i }), "GetHasBackOrderProductVariantsByProductShopifyLegacyResourceID", "query", n);
3072
3110
  },
3073
- GetHasBackOrderProductVariantsByProductShopifyLegacyResourceID(n, i) {
3074
- return t((r) => e.request(tn, n, { ...i, ...r }), "GetHasBackOrderProductVariantsByProductShopifyLegacyResourceID", "query", n);
3111
+ GetPointCampaignOrderRuleTargetCustomerRank(n, r) {
3112
+ return t((i) => e.request(nn, n, { ...r, ...i }), "GetPointCampaignOrderRuleTargetCustomerRank", "query", n);
3075
3113
  },
3076
- GetPointCampaignOrderRuleTargetCustomerRank(n, i) {
3077
- return t((r) => e.request(nn, n, { ...i, ...r }), "GetPointCampaignOrderRuleTargetCustomerRank", "query", n);
3114
+ GetEstimatedShopifyCartPoint(n, r) {
3115
+ return t((i) => e.request(rn, n, { ...r, ...i }), "GetEstimatedShopifyCartPoint", "query", n);
3078
3116
  },
3079
- GetEstimatedShopifyCartPoint(n, i) {
3080
- return t((r) => e.request(rn, n, { ...i, ...r }), "GetEstimatedShopifyCartPoint", "query", n);
3117
+ GetEstimatedShopifyCartLineItemPoint(n, r) {
3118
+ return t((i) => e.request(sn, n, { ...r, ...i }), "GetEstimatedShopifyCartLineItemPoint", "query", n);
3081
3119
  },
3082
- GetEstimatedShopifyCartLineItemPoint(n, i) {
3083
- return t((r) => e.request(sn, n, { ...i, ...r }), "GetEstimatedShopifyCartLineItemPoint", "query", n);
3120
+ PurchasingCustomerSendCustomerSharingActivationCode(n, r) {
3121
+ return t((i) => e.request(an, n, { ...r, ...i }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
3084
3122
  },
3085
- PurchasingCustomerSendCustomerSharingActivationCode(n, i) {
3086
- return t((r) => e.request(an, n, { ...i, ...r }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
3123
+ PurchasingCustomerActivateCustomerSharing(n, r) {
3124
+ return t((i) => e.request(on, n, { ...r, ...i }), "PurchasingCustomerActivateCustomerSharing", "mutation", n);
3087
3125
  },
3088
- PurchasingCustomerActivateCustomerSharing(n, i) {
3089
- return t((r) => e.request(on, n, { ...i, ...r }), "PurchasingCustomerActivateCustomerSharing", "mutation", n);
3126
+ GetMiles(n, r) {
3127
+ return t((i) => e.request(un, n, { ...r, ...i }), "GetMiles", "query", n);
3128
+ },
3129
+ GetPurchasingCustomerMileChangeActivities(n, r) {
3130
+ return t((i) => e.request(cn, n, { ...r, ...i }), "GetPurchasingCustomerMileChangeActivities", "query", n);
3090
3131
  }
3091
3132
  };
3092
3133
  }
3093
- const ve = JSON, dn = (e) => e.toUpperCase(), ln = (e) => {
3134
+ const ve = JSON, pn = (e) => e.toUpperCase(), hn = (e) => {
3094
3135
  const t = {};
3095
- return e.forEach((n, i) => {
3096
- t[i] = n;
3136
+ return e.forEach((n, r) => {
3137
+ t[r] = n;
3097
3138
  }), t;
3098
- }, pn = (e, t, n) => e.document ? e : {
3139
+ }, fn = (e, t, n) => e.document ? e : {
3099
3140
  document: e,
3100
3141
  variables: t,
3101
3142
  requestHeaders: n,
3102
3143
  signal: void 0
3103
- }, hn = (e, t, n) => e.query ? e : {
3144
+ }, mn = (e, t, n) => e.query ? e : {
3104
3145
  query: e,
3105
3146
  variables: t,
3106
3147
  requestHeaders: n,
3107
3148
  signal: void 0
3108
- }, fn = (e, t) => e.documents ? e : {
3149
+ }, gn = (e, t) => e.documents ? e : {
3109
3150
  documents: e,
3110
3151
  requestHeaders: t,
3111
3152
  signal: void 0
3112
- }, xe = (e) => {
3113
- var i, r;
3153
+ }, Pe = (e) => {
3154
+ var r, i;
3114
3155
  let t;
3115
3156
  const n = e.definitions.filter((s) => s.kind === "OperationDefinition");
3116
- return n.length === 1 && (t = (r = (i = n[0]) == null ? void 0 : i.name) == null ? void 0 : r.value), t;
3157
+ return n.length === 1 && (t = (i = (r = n[0]) == null ? void 0 : r.name) == null ? void 0 : i.value), t;
3117
3158
  }, de = (e) => {
3118
3159
  if (typeof e == "string") {
3119
3160
  let n;
3120
3161
  try {
3121
- const i = Ue(e);
3122
- n = xe(i);
3162
+ const r = Me(e);
3163
+ n = Pe(r);
3123
3164
  } catch {
3124
3165
  }
3125
3166
  return { query: e, operationName: n };
3126
3167
  }
3127
- const t = xe(e);
3168
+ const t = Pe(e);
3128
3169
  return { query: kt(e), operationName: t };
3129
3170
  };
3130
3171
  class H extends Error {
3131
3172
  constructor(t, n) {
3132
- const i = `${H.extractMessage(t)}: ${JSON.stringify({
3173
+ const r = `${H.extractMessage(t)}: ${JSON.stringify({
3133
3174
  response: t,
3134
3175
  request: n
3135
3176
  })}`;
3136
- super(i), Object.setPrototypeOf(this, H.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, H);
3177
+ super(r), Object.setPrototypeOf(this, H.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, H);
3137
3178
  }
3138
3179
  static extractMessage(t) {
3139
- var n, i;
3140
- return ((i = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : i.message) ?? `GraphQL Error (Code: ${t.status})`;
3180
+ var n, r;
3181
+ return ((r = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : r.message) ?? `GraphQL Error (Code: ${t.status})`;
3141
3182
  }
3142
3183
  }
3143
- var mn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3144
- function gn(e) {
3184
+ var Cn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3185
+ function yn(e) {
3145
3186
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3146
3187
  }
3147
- var ye = { exports: {} };
3188
+ var Ce = { exports: {} };
3148
3189
  (function(e, t) {
3149
- var n = typeof self < "u" ? self : mn, i = function() {
3190
+ var n = typeof self < "u" ? self : Cn, r = function() {
3150
3191
  function s() {
3151
3192
  this.fetch = !1, this.DOMException = n.DOMException;
3152
3193
  }
@@ -3184,15 +3225,15 @@ var ye = { exports: {} };
3184
3225
  ], m = ArrayBuffer.isView || function(o) {
3185
3226
  return o && h.indexOf(Object.prototype.toString.call(o)) > -1;
3186
3227
  };
3187
- function y(o) {
3228
+ function C(o) {
3188
3229
  if (typeof o != "string" && (o = String(o)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(o))
3189
3230
  throw new TypeError("Invalid character in header field name");
3190
3231
  return o.toLowerCase();
3191
3232
  }
3192
- function C(o) {
3233
+ function y(o) {
3193
3234
  return typeof o != "string" && (o = String(o)), o;
3194
3235
  }
3195
- function A(o) {
3236
+ function T(o) {
3196
3237
  var d = {
3197
3238
  next: function() {
3198
3239
  var E = o.shift();
@@ -3213,17 +3254,17 @@ var ye = { exports: {} };
3213
3254
  }, this);
3214
3255
  }
3215
3256
  g.prototype.append = function(o, d) {
3216
- o = y(o), d = C(d);
3257
+ o = C(o), d = y(d);
3217
3258
  var E = this.map[o];
3218
3259
  this.map[o] = E ? E + ", " + d : d;
3219
3260
  }, g.prototype.delete = function(o) {
3220
- delete this.map[y(o)];
3261
+ delete this.map[C(o)];
3221
3262
  }, g.prototype.get = function(o) {
3222
- return o = y(o), this.has(o) ? this.map[o] : null;
3263
+ return o = C(o), this.has(o) ? this.map[o] : null;
3223
3264
  }, g.prototype.has = function(o) {
3224
- return this.map.hasOwnProperty(y(o));
3265
+ return this.map.hasOwnProperty(C(o));
3225
3266
  }, g.prototype.set = function(o, d) {
3226
- this.map[y(o)] = C(d);
3267
+ this.map[C(o)] = y(d);
3227
3268
  }, g.prototype.forEach = function(o, d) {
3228
3269
  for (var E in this.map)
3229
3270
  this.map.hasOwnProperty(E) && o.call(d, this.map[E], E, this);
@@ -3231,24 +3272,24 @@ var ye = { exports: {} };
3231
3272
  var o = [];
3232
3273
  return this.forEach(function(d, E) {
3233
3274
  o.push(E);
3234
- }), A(o);
3275
+ }), T(o);
3235
3276
  }, g.prototype.values = function() {
3236
3277
  var o = [];
3237
3278
  return this.forEach(function(d) {
3238
3279
  o.push(d);
3239
- }), A(o);
3280
+ }), T(o);
3240
3281
  }, g.prototype.entries = function() {
3241
3282
  var o = [];
3242
3283
  return this.forEach(function(d, E) {
3243
3284
  o.push([E, d]);
3244
- }), A(o);
3285
+ }), T(o);
3245
3286
  }, c.iterable && (g.prototype[Symbol.iterator] = g.prototype.entries);
3246
3287
  function I(o) {
3247
3288
  if (o.bodyUsed)
3248
3289
  return Promise.reject(new TypeError("Already read"));
3249
3290
  o.bodyUsed = !0;
3250
3291
  }
3251
- function P(o) {
3292
+ function O(o) {
3252
3293
  return new Promise(function(d, E) {
3253
3294
  o.onload = function() {
3254
3295
  d(o.result);
@@ -3258,16 +3299,16 @@ var ye = { exports: {} };
3258
3299
  });
3259
3300
  }
3260
3301
  function b(o) {
3261
- var d = new FileReader(), E = P(d);
3302
+ var d = new FileReader(), E = O(d);
3262
3303
  return d.readAsArrayBuffer(o), E;
3263
3304
  }
3264
3305
  function z(o) {
3265
- var d = new FileReader(), E = P(d);
3306
+ var d = new FileReader(), E = O(d);
3266
3307
  return d.readAsText(o), E;
3267
3308
  }
3268
3309
  function _(o) {
3269
- for (var d = new Uint8Array(o), E = new Array(d.length), O = 0; O < d.length; O++)
3270
- E[O] = String.fromCharCode(d[O]);
3310
+ for (var d = new Uint8Array(o), E = new Array(d.length), x = 0; x < d.length; x++)
3311
+ E[x] = String.fromCharCode(d[x]);
3271
3312
  return E.join("");
3272
3313
  }
3273
3314
  function D(o) {
@@ -3334,18 +3375,18 @@ var ye = { exports: {} };
3334
3375
  var d = new FormData();
3335
3376
  return o.trim().split("&").forEach(function(E) {
3336
3377
  if (E) {
3337
- var O = E.split("="), x = O.shift().replace(/\+/g, " "), T = O.join("=").replace(/\+/g, " ");
3338
- d.append(decodeURIComponent(x), decodeURIComponent(T));
3378
+ var x = E.split("="), P = x.shift().replace(/\+/g, " "), A = x.join("=").replace(/\+/g, " ");
3379
+ d.append(decodeURIComponent(P), decodeURIComponent(A));
3339
3380
  }
3340
3381
  }), d;
3341
3382
  }
3342
3383
  function $e(o) {
3343
3384
  var d = new g(), E = o.replace(/\r?\n[\t ]+/g, " ");
3344
- return E.split(/\r?\n/).forEach(function(O) {
3345
- var x = O.split(":"), T = x.shift().trim();
3346
- if (T) {
3347
- var X = x.join(":").trim();
3348
- d.append(T, X);
3385
+ return E.split(/\r?\n/).forEach(function(x) {
3386
+ var P = x.split(":"), A = P.shift().trim();
3387
+ if (A) {
3388
+ var X = P.join(":").trim();
3389
+ d.append(A, X);
3349
3390
  }
3350
3391
  }), d;
3351
3392
  }
@@ -3375,130 +3416,130 @@ var ye = { exports: {} };
3375
3416
  } catch {
3376
3417
  a.DOMException = function(d, E) {
3377
3418
  this.message = d, this.name = E;
3378
- var O = Error(d);
3379
- this.stack = O.stack;
3419
+ var x = Error(d);
3420
+ this.stack = x.stack;
3380
3421
  }, a.DOMException.prototype = Object.create(Error.prototype), a.DOMException.prototype.constructor = a.DOMException;
3381
3422
  }
3382
3423
  function oe(o, d) {
3383
- return new Promise(function(E, O) {
3384
- var x = new w(o, d);
3385
- if (x.signal && x.signal.aborted)
3386
- return O(new a.DOMException("Aborted", "AbortError"));
3387
- var T = new XMLHttpRequest();
3424
+ return new Promise(function(E, x) {
3425
+ var P = new w(o, d);
3426
+ if (P.signal && P.signal.aborted)
3427
+ return x(new a.DOMException("Aborted", "AbortError"));
3428
+ var A = new XMLHttpRequest();
3388
3429
  function X() {
3389
- T.abort();
3430
+ A.abort();
3390
3431
  }
3391
- T.onload = function() {
3432
+ A.onload = function() {
3392
3433
  var V = {
3393
- status: T.status,
3394
- statusText: T.statusText,
3395
- headers: $e(T.getAllResponseHeaders() || "")
3434
+ status: A.status,
3435
+ statusText: A.statusText,
3436
+ headers: $e(A.getAllResponseHeaders() || "")
3396
3437
  };
3397
- V.url = "responseURL" in T ? T.responseURL : V.headers.get("X-Request-URL");
3398
- var ue = "response" in T ? T.response : T.responseText;
3438
+ V.url = "responseURL" in A ? A.responseURL : V.headers.get("X-Request-URL");
3439
+ var ue = "response" in A ? A.response : A.responseText;
3399
3440
  E(new L(ue, V));
3400
- }, T.onerror = function() {
3401
- O(new TypeError("Network request failed"));
3402
- }, T.ontimeout = function() {
3403
- O(new TypeError("Network request failed"));
3404
- }, T.onabort = function() {
3405
- O(new a.DOMException("Aborted", "AbortError"));
3406
- }, T.open(x.method, x.url, !0), x.credentials === "include" ? T.withCredentials = !0 : x.credentials === "omit" && (T.withCredentials = !1), "responseType" in T && c.blob && (T.responseType = "blob"), x.headers.forEach(function(V, ue) {
3407
- T.setRequestHeader(ue, V);
3408
- }), x.signal && (x.signal.addEventListener("abort", X), T.onreadystatechange = function() {
3409
- T.readyState === 4 && x.signal.removeEventListener("abort", X);
3410
- }), T.send(typeof x._bodyInit > "u" ? null : x._bodyInit);
3441
+ }, A.onerror = function() {
3442
+ x(new TypeError("Network request failed"));
3443
+ }, A.ontimeout = function() {
3444
+ x(new TypeError("Network request failed"));
3445
+ }, A.onabort = function() {
3446
+ x(new a.DOMException("Aborted", "AbortError"));
3447
+ }, A.open(P.method, P.url, !0), P.credentials === "include" ? A.withCredentials = !0 : P.credentials === "omit" && (A.withCredentials = !1), "responseType" in A && c.blob && (A.responseType = "blob"), P.headers.forEach(function(V, ue) {
3448
+ A.setRequestHeader(ue, V);
3449
+ }), P.signal && (P.signal.addEventListener("abort", X), A.onreadystatechange = function() {
3450
+ A.readyState === 4 && P.signal.removeEventListener("abort", X);
3451
+ }), A.send(typeof P._bodyInit > "u" ? null : P._bodyInit);
3411
3452
  });
3412
3453
  }
3413
3454
  return oe.polyfill = !0, s.fetch || (s.fetch = oe, s.Headers = g, s.Request = w, s.Response = L), a.Headers = g, a.Request = w, a.Response = L, a.fetch = oe, Object.defineProperty(a, "__esModule", { value: !0 }), a;
3414
3455
  })({});
3415
- })(i), i.fetch.ponyfill = !0, delete i.fetch.polyfill;
3416
- var r = i;
3417
- t = r.fetch, t.default = r.fetch, t.fetch = r.fetch, t.Headers = r.Headers, t.Request = r.Request, t.Response = r.Response, e.exports = t;
3418
- })(ye, ye.exports);
3419
- var ie = ye.exports;
3420
- const te = /* @__PURE__ */ gn(ie), yn = /* @__PURE__ */ ze({
3456
+ })(r), r.fetch.ponyfill = !0, delete r.fetch.polyfill;
3457
+ var i = r;
3458
+ t = i.fetch, t.default = i.fetch, t.fetch = i.fetch, t.Headers = i.Headers, t.Request = i.Request, t.Response = i.Response, e.exports = t;
3459
+ })(Ce, Ce.exports);
3460
+ var re = Ce.exports;
3461
+ const te = /* @__PURE__ */ yn(re), En = /* @__PURE__ */ ze({
3421
3462
  __proto__: null,
3422
3463
  default: te
3423
- }, [ie]), U = (e) => {
3464
+ }, [re]), M = (e) => {
3424
3465
  let t = {};
3425
- return e && (typeof Headers < "u" && e instanceof Headers || yn && ie.Headers && e instanceof ie.Headers ? t = ln(e) : Array.isArray(e) ? e.forEach(([n, i]) => {
3426
- n && i !== void 0 && (t[n] = i);
3466
+ return e && (typeof Headers < "u" && e instanceof Headers || En && re.Headers && e instanceof re.Headers ? t = hn(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
3467
+ n && r !== void 0 && (t[n] = r);
3427
3468
  }) : t = e), t;
3428
- }, Oe = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), Cn = (e) => {
3469
+ }, xe = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), vn = (e) => {
3429
3470
  if (!Array.isArray(e.query)) {
3430
- const i = e, r = [`query=${encodeURIComponent(Oe(i.query))}`];
3431
- return e.variables && r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`), i.operationName && r.push(`operationName=${encodeURIComponent(i.operationName)}`), r.join("&");
3471
+ const r = e, i = [`query=${encodeURIComponent(xe(r.query))}`];
3472
+ return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.join("&");
3432
3473
  }
3433
3474
  if (typeof e.variables < "u" && !Array.isArray(e.variables))
3434
3475
  throw new Error("Cannot create query with given variable type, array expected");
3435
- const t = e, n = e.query.reduce((i, r, s) => (i.push({
3436
- query: Oe(r),
3476
+ const t = e, n = e.query.reduce((r, i, s) => (r.push({
3477
+ query: xe(i),
3437
3478
  variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0
3438
- }), i), []);
3479
+ }), r), []);
3439
3480
  return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
3440
- }, En = (e) => async (t) => {
3441
- const { url: n, query: i, variables: r, operationName: s, fetch: a, fetchOptions: c, middleware: p } = t, h = { ...t.headers };
3442
- let m = "", y;
3443
- e === "POST" ? (y = Tn(i, r, s, c.jsonSerializer), typeof y == "string" && (h["Content-Type"] = "application/json")) : m = Cn({
3444
- query: i,
3445
- variables: r,
3481
+ }, An = (e) => async (t) => {
3482
+ const { url: n, query: r, variables: i, operationName: s, fetch: a, fetchOptions: c, middleware: p } = t, h = { ...t.headers };
3483
+ let m = "", C;
3484
+ e === "POST" ? (C = In(r, i, s, c.jsonSerializer), typeof C == "string" && (h["Content-Type"] = "application/json")) : m = vn({
3485
+ query: r,
3486
+ variables: i,
3446
3487
  operationName: s,
3447
3488
  jsonSerializer: c.jsonSerializer ?? ve
3448
3489
  });
3449
- const C = {
3490
+ const y = {
3450
3491
  method: e,
3451
3492
  headers: h,
3452
- body: y,
3493
+ body: C,
3453
3494
  ...c
3454
3495
  };
3455
- let A = n, g = C;
3496
+ let T = n, g = y;
3456
3497
  if (p) {
3457
- const I = await Promise.resolve(p({ ...C, url: n, operationName: s, variables: r })), { url: P, ...b } = I;
3458
- A = P, g = b;
3498
+ const I = await Promise.resolve(p({ ...y, url: n, operationName: s, variables: i })), { url: O, ...b } = I;
3499
+ T = O, g = b;
3459
3500
  }
3460
- return m && (A = `${A}?${m}`), await a(A, g);
3501
+ return m && (T = `${T}?${m}`), await a(T, g);
3461
3502
  };
3462
- class vn {
3503
+ class Tn {
3463
3504
  constructor(t, n = {}) {
3464
- this.url = t, this.requestConfig = n, this.rawRequest = async (...i) => {
3465
- const [r, s, a] = i, c = hn(r, s, a), { headers: p, fetch: h = te, method: m = "POST", requestMiddleware: y, responseMiddleware: C, ...A } = this.requestConfig, { url: g } = this;
3466
- c.signal !== void 0 && (A.signal = c.signal);
3505
+ this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => {
3506
+ const [i, s, a] = r, c = mn(i, s, a), { headers: p, fetch: h = te, method: m = "POST", requestMiddleware: C, responseMiddleware: y, ...T } = this.requestConfig, { url: g } = this;
3507
+ c.signal !== void 0 && (T.signal = c.signal);
3467
3508
  const { operationName: I } = de(c.query);
3468
3509
  return le({
3469
3510
  url: g,
3470
3511
  query: c.query,
3471
3512
  variables: c.variables,
3472
3513
  headers: {
3473
- ...U(pe(p)),
3474
- ...U(c.requestHeaders)
3514
+ ...M(pe(p)),
3515
+ ...M(c.requestHeaders)
3475
3516
  },
3476
3517
  operationName: I,
3477
3518
  fetch: h,
3478
3519
  method: m,
3479
- fetchOptions: A,
3480
- middleware: y
3481
- }).then((P) => (C && C(P), P)).catch((P) => {
3482
- throw C && C(P), P;
3520
+ fetchOptions: T,
3521
+ middleware: C
3522
+ }).then((O) => (y && y(O), O)).catch((O) => {
3523
+ throw y && y(O), O;
3483
3524
  });
3484
3525
  };
3485
3526
  }
3486
3527
  async request(t, ...n) {
3487
- const [i, r] = n, s = pn(t, i, r), { headers: a, fetch: c = te, method: p = "POST", requestMiddleware: h, responseMiddleware: m, ...y } = this.requestConfig, { url: C } = this;
3488
- s.signal !== void 0 && (y.signal = s.signal);
3489
- const { query: A, operationName: g } = de(s.document);
3528
+ const [r, i] = n, s = fn(t, r, i), { headers: a, fetch: c = te, method: p = "POST", requestMiddleware: h, responseMiddleware: m, ...C } = this.requestConfig, { url: y } = this;
3529
+ s.signal !== void 0 && (C.signal = s.signal);
3530
+ const { query: T, operationName: g } = de(s.document);
3490
3531
  return le({
3491
- url: C,
3492
- query: A,
3532
+ url: y,
3533
+ query: T,
3493
3534
  variables: s.variables,
3494
3535
  headers: {
3495
- ...U(pe(a)),
3496
- ...U(s.requestHeaders)
3536
+ ...M(pe(a)),
3537
+ ...M(s.requestHeaders)
3497
3538
  },
3498
3539
  operationName: g,
3499
3540
  fetch: c,
3500
3541
  method: p,
3501
- fetchOptions: y,
3542
+ fetchOptions: C,
3502
3543
  middleware: h
3503
3544
  }).then((I) => (m && m(I), I.data)).catch((I) => {
3504
3545
  throw m && m(I), I;
@@ -3506,17 +3547,17 @@ class vn {
3506
3547
  }
3507
3548
  // prettier-ignore
3508
3549
  batchRequests(t, n) {
3509
- const i = fn(t, n), { headers: r, ...s } = this.requestConfig;
3510
- i.signal !== void 0 && (s.signal = i.signal);
3511
- const a = i.documents.map(({ document: p }) => de(p).query), c = i.documents.map(({ variables: p }) => p);
3550
+ const r = gn(t, n), { headers: i, ...s } = this.requestConfig;
3551
+ r.signal !== void 0 && (s.signal = r.signal);
3552
+ const a = r.documents.map(({ document: p }) => de(p).query), c = r.documents.map(({ variables: p }) => p);
3512
3553
  return le({
3513
3554
  url: this.url,
3514
3555
  query: a,
3515
3556
  // @ts-expect-error TODO reconcile batch variables into system.
3516
3557
  variables: c,
3517
3558
  headers: {
3518
- ...U(pe(r)),
3519
- ...U(i.requestHeaders)
3559
+ ...M(pe(i)),
3560
+ ...M(r.requestHeaders)
3520
3561
  },
3521
3562
  operationName: void 0,
3522
3563
  fetch: this.requestConfig.fetch ?? te,
@@ -3534,8 +3575,8 @@ class vn {
3534
3575
  * Attach a header to the client. All subsequent requests will have this header.
3535
3576
  */
3536
3577
  setHeader(t, n) {
3537
- const { headers: i } = this.requestConfig;
3538
- return i ? i[t] = n : this.requestConfig.headers = { [t]: n }, this;
3578
+ const { headers: r } = this.requestConfig;
3579
+ return r ? r[t] = n : this.requestConfig.headers = { [t]: n }, this;
3539
3580
  }
3540
3581
  /**
3541
3582
  * Change the client endpoint. All subsequent requests will send to this endpoint.
@@ -3545,11 +3586,11 @@ class vn {
3545
3586
  }
3546
3587
  }
3547
3588
  const le = async (e) => {
3548
- const { query: t, variables: n, fetchOptions: i } = e, r = En(dn(e.method ?? "post")), s = Array.isArray(e.query), a = await r(e), c = await An(a, i.jsonSerializer ?? ve), p = Array.isArray(c) ? !c.some(({ data: m }) => !m) : !!c.data, h = Array.isArray(c) || !c.errors || Array.isArray(c.errors) && !c.errors.length || i.errorPolicy === "all" || i.errorPolicy === "ignore";
3589
+ const { query: t, variables: n, fetchOptions: r } = e, i = An(pn(e.method ?? "post")), s = Array.isArray(e.query), a = await i(e), c = await Sn(a, r.jsonSerializer ?? ve), p = Array.isArray(c) ? !c.some(({ data: m }) => !m) : !!c.data, h = Array.isArray(c) || !c.errors || Array.isArray(c.errors) && !c.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
3549
3590
  if (a.ok && h && p) {
3550
- const { errors: m, ...y } = (Array.isArray(c), c), C = i.errorPolicy === "ignore" ? y : c;
3591
+ const { errors: m, ...C } = (Array.isArray(c), c), y = r.errorPolicy === "ignore" ? C : c;
3551
3592
  return {
3552
- ...s ? { data: C } : C,
3593
+ ...s ? { data: y } : y,
3553
3594
  headers: a.headers,
3554
3595
  status: a.status
3555
3596
  };
@@ -3563,26 +3604,26 @@ const le = async (e) => {
3563
3604
  { query: t, variables: n }
3564
3605
  );
3565
3606
  }
3566
- }, Tn = (e, t, n, i) => {
3567
- const r = i ?? ve;
3607
+ }, In = (e, t, n, r) => {
3608
+ const i = r ?? ve;
3568
3609
  if (!Array.isArray(e))
3569
- return r.stringify({ query: e, variables: t, operationName: n });
3610
+ return i.stringify({ query: e, variables: t, operationName: n });
3570
3611
  if (typeof t < "u" && !Array.isArray(t))
3571
3612
  throw new Error("Cannot create request body with given variable type, array expected");
3572
3613
  const s = e.reduce((a, c, p) => (a.push({ query: c, variables: t ? t[p] : void 0 }), a), []);
3573
- return r.stringify(s);
3574
- }, An = async (e, t) => {
3614
+ return i.stringify(s);
3615
+ }, Sn = async (e, t) => {
3575
3616
  let n;
3576
- return e.headers.forEach((i, r) => {
3577
- r.toLowerCase() === "content-type" && (n = i);
3617
+ return e.headers.forEach((r, i) => {
3618
+ i.toLowerCase() === "content-type" && (n = r);
3578
3619
  }), n && (n.toLowerCase().startsWith("application/json") || n.toLowerCase().startsWith("application/graphql+json") || n.toLowerCase().startsWith("application/graphql-response+json")) ? t.parse(await e.text()) : e.text();
3579
3620
  }, pe = (e) => typeof e == "function" ? e() : e;
3580
- var In = /* @__PURE__ */ ((e) => (e.Eur = "EUR", e.Jpy = "JPY", e.Usd = "USD", e))(In || {}), Sn = /* @__PURE__ */ ((e) => (e.Retail = "RETAIL", e.Warehouse = "WAREHOUSE", e))(Sn || {});
3581
- class Nn {
3621
+ var Rn = /* @__PURE__ */ ((e) => (e.Eur = "EUR", e.Jpy = "JPY", e.Usd = "USD", e))(Rn || {}), Nn = /* @__PURE__ */ ((e) => (e.Retail = "RETAIL", e.Warehouse = "WAREHOUSE", e))(Nn || {});
3622
+ class xn {
3582
3623
  constructor(t) {
3583
- Te(this, "api");
3584
- this.api = cn(
3585
- new vn(`${t}/apps/sq-api`, {
3624
+ Ae(this, "api");
3625
+ this.api = ln(
3626
+ new Tn(`${t}/apps/sq-api`, {
3586
3627
  headers: {
3587
3628
  "X-SQ-CLIENT": "ShopifyAppProxy"
3588
3629
  }
@@ -3597,12 +3638,12 @@ class Nn {
3597
3638
  * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
3598
3639
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
3599
3640
  */
3600
- async getLocationAvailabilities(t, n, i, r) {
3641
+ async getLocationAvailabilities(t, n, r, i) {
3601
3642
  const s = await this.api.GetLocationAvailabilities({
3602
3643
  sku: t,
3603
3644
  first: n,
3604
- after: i,
3605
- isReverse: r
3645
+ after: r,
3646
+ isReverse: i
3606
3647
  });
3607
3648
  return {
3608
3649
  nodes: s.locationAvailabilities.nodes.map(
@@ -3637,27 +3678,27 @@ class Nn {
3637
3678
  * @param {string} locationID 在庫情報を取得したいLocationのID。
3638
3679
  */
3639
3680
  async getLocationAvailability(t, n) {
3640
- const i = await this.api.GetLocationAvailability({ sku: t, locationID: n });
3681
+ const r = await this.api.GetLocationAvailability({ sku: t, locationID: n });
3641
3682
  return {
3642
3683
  location: {
3643
- id: i.locationAvailability.location.id,
3644
- name: i.locationAvailability.location.name,
3645
- phone: i.locationAvailability.location.phone,
3646
- mapURL: i.locationAvailability.location.mapURL,
3647
- tags: i.locationAvailability.location.tags,
3648
- address: i.locationAvailability.location.address ? {
3649
- id: i.locationAvailability.location.address.id,
3650
- countryCode: i.locationAvailability.location.address.countryCode,
3651
- country: i.locationAvailability.location.address.country,
3652
- postalCode: i.locationAvailability.location.address.postalCode,
3653
- provinceCode: i.locationAvailability.location.address.provinceCode,
3654
- province: i.locationAvailability.location.address.province,
3655
- city: i.locationAvailability.location.address.city,
3656
- address1: i.locationAvailability.location.address.address1,
3657
- address2: i.locationAvailability.location.address.address2
3684
+ id: r.locationAvailability.location.id,
3685
+ name: r.locationAvailability.location.name,
3686
+ phone: r.locationAvailability.location.phone,
3687
+ mapURL: r.locationAvailability.location.mapURL,
3688
+ tags: r.locationAvailability.location.tags,
3689
+ address: r.locationAvailability.location.address ? {
3690
+ id: r.locationAvailability.location.address.id,
3691
+ countryCode: r.locationAvailability.location.address.countryCode,
3692
+ country: r.locationAvailability.location.address.country,
3693
+ postalCode: r.locationAvailability.location.address.postalCode,
3694
+ provinceCode: r.locationAvailability.location.address.provinceCode,
3695
+ province: r.locationAvailability.location.address.province,
3696
+ city: r.locationAvailability.location.address.city,
3697
+ address1: r.locationAvailability.location.address.address1,
3698
+ address2: r.locationAvailability.location.address.address2
3658
3699
  } : void 0
3659
3700
  },
3660
- inventoryQuantity: i.locationAvailability.inventoryQuantity
3701
+ inventoryQuantity: r.locationAvailability.inventoryQuantity
3661
3702
  };
3662
3703
  }
3663
3704
  /**
@@ -3700,12 +3741,12 @@ class Nn {
3700
3741
  * @param {LocationFilter} [locationFilter] ロケーションのロケーションのフィルタリング条件。
3701
3742
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
3702
3743
  */
3703
- async getLocations(t, n, i, r) {
3744
+ async getLocations(t, n, r, i) {
3704
3745
  const s = await this.api.GetLocations({
3705
3746
  first: t,
3706
3747
  after: n,
3707
- filter: i,
3708
- isReverse: r
3748
+ filter: r,
3749
+ isReverse: i
3709
3750
  });
3710
3751
  return {
3711
3752
  nodes: s.locations.nodes.map((a) => ({
@@ -3737,15 +3778,15 @@ class Nn {
3737
3778
  * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
3738
3779
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
3739
3780
  */
3740
- async getPurchasingCustomerDiscounts(t, n, i) {
3741
- const r = await this.api.GetPurchasingCustomerDiscounts({
3781
+ async getPurchasingCustomerDiscounts(t, n, r) {
3782
+ const i = await this.api.GetPurchasingCustomerDiscounts({
3742
3783
  first: t,
3743
3784
  after: n,
3744
- isReverse: i
3785
+ isReverse: r
3745
3786
  });
3746
- return r.purchasingCustomer ? {
3747
- id: r.purchasingCustomer.id,
3748
- nodes: r.purchasingCustomer.orderPriceAdjustmentRules.nodes.map(
3787
+ return i.purchasingCustomer ? {
3788
+ id: i.purchasingCustomer.id,
3789
+ nodes: i.purchasingCustomer.orderPriceAdjustmentRules.nodes.map(
3749
3790
  (s) => ({
3750
3791
  id: s.id,
3751
3792
  title: s.title,
@@ -3762,7 +3803,7 @@ class Nn {
3762
3803
  updatedAt: new Date(s.updatedAt)
3763
3804
  })
3764
3805
  ) ?? [],
3765
- pageInfo: r.purchasingCustomer.orderPriceAdjustmentRules.pageInfo ?? null
3806
+ pageInfo: i.purchasingCustomer.orderPriceAdjustmentRules.pageInfo ?? null
3766
3807
  } : null;
3767
3808
  }
3768
3809
  /**
@@ -3773,12 +3814,12 @@ class Nn {
3773
3814
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
3774
3815
  * @param {PointChangeActivitySortKey} [sortKeys] ソートキー。CREATED_ATかPOINT_CHANGE_CREATED_ATを渡す。デフォルトはCREATED_AT。
3775
3816
  */
3776
- async getPointChangeActivities(t, n, i, r) {
3817
+ async getPointChangeActivities(t, n, r, i) {
3777
3818
  const s = await this.api.GetPurchasingCustomerPointChangeActivities({
3778
3819
  first: t,
3779
3820
  after: n,
3780
- isReverse: i,
3781
- sortKeys: r
3821
+ isReverse: r,
3822
+ sortKeys: i
3782
3823
  });
3783
3824
  return s.purchasingCustomer ? {
3784
3825
  nodes: s.purchasingCustomer.pointChangeActivities.nodes.map(
@@ -3897,23 +3938,23 @@ class Nn {
3897
3938
  return (n = t.purchasingCustomer) != null && n.customerSharing ? {
3898
3939
  id: t.purchasingCustomer.customerSharing.id,
3899
3940
  purchasingCustomers: t.purchasingCustomer.customerSharing.purchasingCustomers.map(
3900
- (i) => ({
3901
- id: i.id,
3902
- sharingPurchasingCustomerCount: i.sharingPurchasingCustomerCount,
3941
+ (r) => ({
3942
+ id: r.id,
3943
+ sharingPurchasingCustomerCount: r.sharingPurchasingCustomerCount,
3903
3944
  tenant: {
3904
- id: i.tenant.id,
3905
- name: i.tenant.name
3945
+ id: r.tenant.id,
3946
+ name: r.tenant.name
3906
3947
  }
3907
3948
  })
3908
3949
  )
3909
3950
  } : null;
3910
3951
  }
3911
- async getProduct(t, n, i, r, s) {
3952
+ async getProduct(t, n, r, i, s) {
3912
3953
  const a = await this.api.GetProduct({
3913
3954
  id: t,
3914
3955
  first: n,
3915
- after: i,
3916
- isReverse: r,
3956
+ after: r,
3957
+ isReverse: i,
3917
3958
  sortKeys: s
3918
3959
  });
3919
3960
  return a.productByProductShopifyLegacyResourceID ? {
@@ -3962,35 +4003,35 @@ class Nn {
3962
4003
  fixedPoint: t.pointCampaignOrderRuleTargetCustomerRank.fixedPoint ? t.pointCampaignOrderRuleTargetCustomerRank.fixedPoint : void 0
3963
4004
  } : null;
3964
4005
  }
3965
- async getEstimatedShopifyCartPoint(t, n, i) {
3966
- const r = await this.api.GetEstimatedShopifyCartPoint({
4006
+ async getEstimatedShopifyCartPoint(t, n, r) {
4007
+ const i = await this.api.GetEstimatedShopifyCartPoint({
3967
4008
  input: {
3968
4009
  currencyCode: t,
3969
4010
  taxesIncluded: n,
3970
- lineItems: i
4011
+ lineItems: r
3971
4012
  }
3972
4013
  });
3973
- return r.estimatedShopifyCartPoint ? {
3974
- pointsEarning: r.estimatedShopifyCartPoint.pointsEarning,
3975
- totalPointsEarning: r.estimatedShopifyCartPoint.totalPointsEarning,
3976
- pointCampaign: r.estimatedShopifyCartPoint.pointCampaign ? {
3977
- pointsEarning: r.estimatedShopifyCartPoint.pointCampaign.pointsEarning,
4014
+ return i.estimatedShopifyCartPoint ? {
4015
+ pointsEarning: i.estimatedShopifyCartPoint.pointsEarning,
4016
+ totalPointsEarning: i.estimatedShopifyCartPoint.totalPointsEarning,
4017
+ pointCampaign: i.estimatedShopifyCartPoint.pointCampaign ? {
4018
+ pointsEarning: i.estimatedShopifyCartPoint.pointCampaign.pointsEarning,
3978
4019
  pointCampaignOrderRule: {
3979
- id: r.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.id,
3980
- title: r.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.title,
3981
- pointMethod: r.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.pointMethod,
3982
- targetType: r.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.targetType
4020
+ id: i.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.id,
4021
+ title: i.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.title,
4022
+ pointMethod: i.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.pointMethod,
4023
+ targetType: i.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.targetType
3983
4024
  }
3984
4025
  } : void 0
3985
4026
  } : null;
3986
4027
  }
3987
- async getEstimatedShopifyCartLineItemPoint(t, n, i, r, s) {
4028
+ async getEstimatedShopifyCartLineItemPoint(t, n, r, i, s) {
3988
4029
  const a = await this.api.GetEstimatedShopifyCartLineItemPoint({
3989
4030
  input: {
3990
4031
  currencyCode: t,
3991
4032
  taxesIncluded: n,
3992
- sku: i,
3993
- quantity: r,
4033
+ sku: r,
4034
+ quantity: i,
3994
4035
  unitPrice: s
3995
4036
  }
3996
4037
  });
@@ -4033,22 +4074,64 @@ class Nn {
4033
4074
  throw new Error(
4034
4075
  `Invalid activation code: ${n} is not 6 characters.`
4035
4076
  );
4036
- const i = await this.api.PurchasingCustomerActivateCustomerSharing({
4077
+ const r = await this.api.PurchasingCustomerActivateCustomerSharing({
4037
4078
  email: t,
4038
4079
  activationCode: n
4039
4080
  });
4040
- return i.purchasingCustomerActivateCustomerSharing ? {
4041
- id: i.purchasingCustomerActivateCustomerSharing.purchasingCustomer.id,
4042
- sharingPurchasingCustomerCount: i.purchasingCustomerActivateCustomerSharing.purchasingCustomer.sharingPurchasingCustomerCount,
4081
+ return r.purchasingCustomerActivateCustomerSharing ? {
4082
+ id: r.purchasingCustomerActivateCustomerSharing.purchasingCustomer.id,
4083
+ sharingPurchasingCustomerCount: r.purchasingCustomerActivateCustomerSharing.purchasingCustomer.sharingPurchasingCustomerCount,
4043
4084
  tenant: {
4044
- id: i.purchasingCustomerActivateCustomerSharing.purchasingCustomer.tenant.id,
4045
- name: i.purchasingCustomerActivateCustomerSharing.purchasingCustomer.tenant.name
4085
+ id: r.purchasingCustomerActivateCustomerSharing.purchasingCustomer.tenant.id,
4086
+ name: r.purchasingCustomerActivateCustomerSharing.purchasingCustomer.tenant.name
4046
4087
  }
4047
4088
  } : null;
4048
4089
  }
4090
+ /**
4091
+ * getMiles は、Miles は SDK から取得できるマイルの情報を返します。
4092
+ */
4093
+ async getMiles() {
4094
+ const t = await this.api.GetMiles();
4095
+ return t.purchasingCustomer ? {
4096
+ miles: t.purchasingCustomer.miles
4097
+ } : null;
4098
+ }
4099
+ /**
4100
+ * getMileChangeActivities は購入者のマイル変動履歴を返します。
4101
+ *
4102
+ * @param {number} [first] 取得してくる個数。デフォルトは250。
4103
+ * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
4104
+ * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
4105
+ * @param {MileChangeActivitySortKey} [sortKeys] ソートキー。CREATED_ATかMILE_CHANGE_CREATED_ATを渡す。デフォルトはCREATED_AT。
4106
+ */
4107
+ async getMileChangeActivities(t, n, r, i) {
4108
+ const s = await this.api.GetPurchasingCustomerMileChangeActivities({
4109
+ first: t,
4110
+ after: n,
4111
+ isReverse: r,
4112
+ sortKeys: i
4113
+ });
4114
+ return s.purchasingCustomer ? {
4115
+ nodes: s.purchasingCustomer.mileChangeActivities.nodes.map(
4116
+ (a) => ({
4117
+ id: a.id,
4118
+ title: a.title,
4119
+ mileChange: {
4120
+ id: a.mileChange.id,
4121
+ delta: a.mileChange.delta,
4122
+ mileChangeCreatedAt: new Date(
4123
+ a.mileChange.mileChangeCreatedAt
4124
+ ),
4125
+ createdAt: new Date(a.mileChange.createdAt)
4126
+ }
4127
+ })
4128
+ ),
4129
+ pageInfo: s.purchasingCustomer.mileChangeActivities.pageInfo
4130
+ } : null;
4131
+ }
4049
4132
  }
4050
4133
  export {
4051
- In as CurrencyCode,
4052
- Sn as LocationType,
4053
- Nn as SDK
4134
+ Rn as CurrencyCode,
4135
+ Nn as LocationType,
4136
+ xn as SDK
4054
4137
  };