@builtbystack/sq-shopify-theme-sdk 0.0.3 → 0.0.5

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,7 +1,7 @@
1
- var Qe = Object.defineProperty;
2
- var Je = (e, t, n) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var ge = (e, t, n) => (Je(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- function Xe(e, t) {
1
+ var He = Object.defineProperty;
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 Ne = (e, t, n) => (Ye(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ function ze(e, t) {
5
5
  for (var n = 0; n < t.length; n++) {
6
6
  const r = t[n];
7
7
  if (typeof r != "string" && !Array.isArray(r)) {
@@ -17,44 +17,44 @@ function Xe(e, t) {
17
17
  }
18
18
  return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
19
19
  }
20
- const Te = JSON, We = (e) => e.toUpperCase(), Ze = (e) => {
20
+ const Te = JSON, Qe = (e) => e.toUpperCase(), Je = (e) => {
21
21
  const t = {};
22
22
  return e.forEach((n, r) => {
23
23
  t[r] = n;
24
24
  }), t;
25
- }, Ke = (e, t, n) => e.document ? e : {
25
+ }, Xe = (e, t, n) => e.document ? e : {
26
26
  document: e,
27
27
  variables: t,
28
28
  requestHeaders: n,
29
29
  signal: void 0
30
- }, et = (e, t, n) => e.query ? e : {
30
+ }, We = (e, t, n) => e.query ? e : {
31
31
  query: e,
32
32
  variables: t,
33
33
  requestHeaders: n,
34
34
  signal: void 0
35
- }, tt = (e, t) => e.documents ? e : {
35
+ }, Ze = (e, t) => e.documents ? e : {
36
36
  documents: e,
37
37
  requestHeaders: t,
38
38
  signal: void 0
39
39
  };
40
- function W(e, t) {
40
+ function Z(e, t) {
41
41
  if (!!!e)
42
42
  throw new Error(t);
43
43
  }
44
- function nt(e) {
44
+ function Ke(e) {
45
45
  return typeof e == "object" && e !== null;
46
46
  }
47
- function it(e, t) {
47
+ function et(e, t) {
48
48
  if (!!!e)
49
49
  throw new Error(
50
50
  t ?? "Unexpected invariant triggered."
51
51
  );
52
52
  }
53
- const rt = /\r\n|[\n\r]/g;
53
+ const tt = /\r\n|[\n\r]/g;
54
54
  function de(e, t) {
55
55
  let n = 0, r = 1;
56
- for (const i of e.body.matchAll(rt)) {
57
- if (typeof i.index == "number" || it(!1), i.index >= t)
56
+ for (const i of e.body.matchAll(tt)) {
57
+ if (typeof i.index == "number" || et(!1), i.index >= t)
58
58
  break;
59
59
  n = i.index + i[0].length, r += 1;
60
60
  }
@@ -63,17 +63,17 @@ function de(e, t) {
63
63
  column: t + 1 - n
64
64
  };
65
65
  }
66
- function st(e) {
67
- return we(
66
+ function nt(e) {
67
+ return Ce(
68
68
  e.source,
69
69
  de(e.source, e.start)
70
70
  );
71
71
  }
72
- function we(e, t) {
73
- const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, c = t.line + s, u = t.line === 1 ? n : 0, p = t.column + u, d = `${e.name}:${c}:${p}
72
+ function Ce(e, t) {
73
+ const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, c = t.line + s, u = t.line === 1 ? n : 0, h = t.column + u, d = `${e.name}:${c}:${h}
74
74
  `, y = r.split(/\r\n|[\n\r]/g), E = y[i];
75
75
  if (E.length > 120) {
76
- const T = Math.floor(p / 80), A = p % 80, m = [];
76
+ const T = Math.floor(h / 80), A = h % 80, m = [];
77
77
  for (let x = 0; x < E.length; x += 80)
78
78
  m.push(E.slice(x, x + 80));
79
79
  return d + Ae([
@@ -87,7 +87,7 @@ function we(e, t) {
87
87
  // Lines specified like this: ["prefix", "string"],
88
88
  [`${c - 1} |`, y[i - 1]],
89
89
  [`${c} |`, E],
90
- ["|", "^".padStart(p)],
90
+ ["|", "^".padStart(h)],
91
91
  [`${c + 1} |`, y[i + 1]]
92
92
  ]);
93
93
  }
@@ -96,7 +96,7 @@ function Ae(e) {
96
96
  return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(`
97
97
  `);
98
98
  }
99
- function ot(e) {
99
+ function it(e) {
100
100
  const t = e[0];
101
101
  return t == null || "kind" in t || "length" in t ? {
102
102
  nodes: t,
@@ -107,7 +107,7 @@ function ot(e) {
107
107
  extensions: e[5]
108
108
  } : t;
109
109
  }
110
- class ve extends Error {
110
+ class ge extends Error {
111
111
  /**
112
112
  * An array of `{ line, column }` locations within the source GraphQL document
113
113
  * which correspond to this error.
@@ -148,15 +148,15 @@ class ve extends Error {
148
148
  */
149
149
  constructor(t, ...n) {
150
150
  var r, i, s;
151
- const { nodes: c, source: u, positions: p, path: d, originalError: y, extensions: E } = ot(n);
151
+ const { nodes: c, source: u, positions: h, path: d, originalError: y, extensions: E } = it(n);
152
152
  super(t), this.name = "GraphQLError", this.path = d ?? void 0, this.originalError = y ?? void 0, this.nodes = xe(
153
153
  Array.isArray(c) ? c : c ? [c] : void 0
154
154
  );
155
155
  const T = xe(
156
156
  (r = this.nodes) === null || r === void 0 ? void 0 : r.map((m) => m.loc).filter((m) => m != null)
157
157
  );
158
- this.source = u ?? (T == null || (i = T[0]) === null || i === void 0 ? void 0 : i.source), this.positions = p ?? (T == null ? void 0 : T.map((m) => m.start)), this.locations = p && u ? p.map((m) => de(u, m)) : T == null ? void 0 : T.map((m) => de(m.source, m.start));
159
- const A = nt(
158
+ this.source = u ?? (T == null || (i = T[0]) === null || i === void 0 ? void 0 : i.source), this.positions = h ?? (T == null ? void 0 : T.map((m) => m.start)), this.locations = h && u ? h.map((m) => de(u, m)) : T == null ? void 0 : T.map((m) => de(m.source, m.start));
159
+ const A = Ke(
160
160
  y == null ? void 0 : y.extensions
161
161
  ) ? y == null ? void 0 : y.extensions : void 0;
162
162
  this.extensions = (s = E ?? A) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
@@ -183,7 +183,7 @@ class ve extends Error {
183
183
  value: y.stack,
184
184
  writable: !0,
185
185
  configurable: !0
186
- }) : Error.captureStackTrace ? Error.captureStackTrace(this, ve) : Object.defineProperty(this, "stack", {
186
+ }) : Error.captureStackTrace ? Error.captureStackTrace(this, ge) : Object.defineProperty(this, "stack", {
187
187
  value: Error().stack,
188
188
  writable: !0,
189
189
  configurable: !0
@@ -198,12 +198,12 @@ class ve extends Error {
198
198
  for (const n of this.nodes)
199
199
  n.loc && (t += `
200
200
 
201
- ` + st(n.loc));
201
+ ` + nt(n.loc));
202
202
  else if (this.source && this.locations)
203
203
  for (const n of this.locations)
204
204
  t += `
205
205
 
206
- ` + we(this.source, n);
206
+ ` + Ce(this.source, n);
207
207
  return t;
208
208
  }
209
209
  toJSON() {
@@ -216,13 +216,13 @@ class ve extends Error {
216
216
  function xe(e) {
217
217
  return e === void 0 || e.length === 0 ? void 0 : e;
218
218
  }
219
- function I(e, t, n) {
220
- return new ve(`Syntax Error: ${n}`, {
219
+ function b(e, t, n) {
220
+ return new ge(`Syntax Error: ${n}`, {
221
221
  source: e,
222
222
  positions: [t]
223
223
  });
224
224
  }
225
- class at {
225
+ class rt {
226
226
  /**
227
227
  * The character offset at which this Node begins.
228
228
  */
@@ -251,7 +251,7 @@ class at {
251
251
  };
252
252
  }
253
253
  }
254
- class Re {
254
+ class Se {
255
255
  /**
256
256
  * The kind of Token.
257
257
  */
@@ -293,7 +293,7 @@ class Re {
293
293
  };
294
294
  }
295
295
  }
296
- const Le = {
296
+ const we = {
297
297
  Name: [],
298
298
  Document: ["definitions"],
299
299
  OperationDefinition: [
@@ -367,10 +367,10 @@ const Le = {
367
367
  UnionTypeExtension: ["name", "directives", "types"],
368
368
  EnumTypeExtension: ["name", "directives", "values"],
369
369
  InputObjectTypeExtension: ["name", "directives", "fields"]
370
- }, ct = new Set(Object.keys(Le));
371
- function be(e) {
370
+ }, st = new Set(Object.keys(we));
371
+ function Ie(e) {
372
372
  const t = e == null ? void 0 : e.kind;
373
- return typeof t == "string" && ct.has(t);
373
+ return typeof t == "string" && st.has(t);
374
374
  }
375
375
  var M;
376
376
  (function(e) {
@@ -387,40 +387,40 @@ var f;
387
387
  function ye(e) {
388
388
  return e === 9 || e === 32;
389
389
  }
390
- function H(e) {
390
+ function Y(e) {
391
391
  return e >= 48 && e <= 57;
392
392
  }
393
- function Fe(e) {
393
+ function ke(e) {
394
394
  return e >= 97 && e <= 122 || // A-Z
395
395
  e >= 65 && e <= 90;
396
396
  }
397
- function Pe(e) {
398
- return Fe(e) || e === 95;
397
+ function Re(e) {
398
+ return ke(e) || e === 95;
399
399
  }
400
- function ut(e) {
401
- return Fe(e) || H(e) || e === 95;
400
+ function ot(e) {
401
+ return ke(e) || Y(e) || e === 95;
402
402
  }
403
- function lt(e) {
403
+ function at(e) {
404
404
  var t;
405
405
  let n = Number.MAX_SAFE_INTEGER, r = null, i = -1;
406
406
  for (let c = 0; c < e.length; ++c) {
407
407
  var s;
408
- const u = e[c], p = ht(u);
409
- p !== u.length && (r = (s = r) !== null && s !== void 0 ? s : c, i = c, c !== 0 && p < n && (n = p));
408
+ const u = e[c], h = ct(u);
409
+ h !== u.length && (r = (s = r) !== null && s !== void 0 ? s : c, i = c, c !== 0 && h < n && (n = h));
410
410
  }
411
411
  return e.map((c, u) => u === 0 ? c : c.slice(n)).slice(
412
412
  (t = r) !== null && t !== void 0 ? t : 0,
413
413
  i + 1
414
414
  );
415
415
  }
416
- function ht(e) {
416
+ function ct(e) {
417
417
  let t = 0;
418
418
  for (; t < e.length && ye(e.charCodeAt(t)); )
419
419
  ++t;
420
420
  return t;
421
421
  }
422
- function pt(e, t) {
423
- const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((A) => A.length === 0 || ye(A.charCodeAt(0))), c = n.endsWith('\\"""'), u = e.endsWith('"') && !c, p = e.endsWith("\\"), d = u || p, y = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
422
+ function ut(e, t) {
423
+ const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((A) => A.length === 0 || ye(A.charCodeAt(0))), c = n.endsWith('\\"""'), u = e.endsWith('"') && !c, h = e.endsWith("\\"), d = u || h, y = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
424
424
  (!i || e.length > 70 || d || s || c);
425
425
  let E = "";
426
426
  const T = i && ye(e.charCodeAt(0));
@@ -432,7 +432,7 @@ var a;
432
432
  (function(e) {
433
433
  e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
434
434
  })(a || (a = {}));
435
- class dt {
435
+ class lt {
436
436
  /**
437
437
  * The previously focused non-ignored token.
438
438
  */
@@ -446,7 +446,7 @@ class dt {
446
446
  * The character offset at which the current line begins.
447
447
  */
448
448
  constructor(t) {
449
- const n = new Re(a.SOF, 0, 0, 0, 0);
449
+ const n = new Se(a.SOF, 0, 0, 0, 0);
450
450
  this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
451
451
  }
452
452
  get [Symbol.toStringTag]() {
@@ -469,26 +469,26 @@ class dt {
469
469
  if (t.next)
470
470
  t = t.next;
471
471
  else {
472
- const n = yt(this, t.end);
472
+ const n = pt(this, t.end);
473
473
  t.next = n, n.prev = t, t = n;
474
474
  }
475
475
  while (t.kind === a.COMMENT);
476
476
  return t;
477
477
  }
478
478
  }
479
- function ft(e) {
479
+ function ht(e) {
480
480
  return e === a.BANG || e === a.DOLLAR || e === a.AMP || e === a.PAREN_L || e === a.PAREN_R || e === a.SPREAD || e === a.COLON || e === a.EQUALS || e === a.AT || e === a.BRACKET_L || e === a.BRACKET_R || e === a.BRACE_L || e === a.PIPE || e === a.BRACE_R;
481
481
  }
482
- function V(e) {
482
+ function q(e) {
483
483
  return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
484
484
  }
485
- function re(e, t) {
486
- return Be(e.charCodeAt(t)) && Me(e.charCodeAt(t + 1));
485
+ function se(e, t) {
486
+ return Le(e.charCodeAt(t)) && Fe(e.charCodeAt(t + 1));
487
487
  }
488
- function Be(e) {
488
+ function Le(e) {
489
489
  return e >= 55296 && e <= 56319;
490
490
  }
491
- function Me(e) {
491
+ function Fe(e) {
492
492
  return e >= 56320 && e <= 57343;
493
493
  }
494
494
  function F(e, t) {
@@ -501,11 +501,11 @@ function F(e, t) {
501
501
  }
502
502
  return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
503
503
  }
504
- function b(e, t, n, r, i) {
504
+ function I(e, t, n, r, i) {
505
505
  const s = e.line, c = 1 + n - e.lineStart;
506
- return new Re(t, n, r, s, c, i);
506
+ return new Se(t, n, r, s, c, i);
507
507
  }
508
- function yt(e, t) {
508
+ function pt(e, t) {
509
509
  const n = e.source.body, r = n.length;
510
510
  let i = t;
511
511
  for (; i < r; ) {
@@ -524,67 +524,67 @@ function yt(e, t) {
524
524
  n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i;
525
525
  continue;
526
526
  case 35:
527
- return mt(e, i);
527
+ return dt(e, i);
528
528
  case 33:
529
- return b(e, a.BANG, i, i + 1);
529
+ return I(e, a.BANG, i, i + 1);
530
530
  case 36:
531
- return b(e, a.DOLLAR, i, i + 1);
531
+ return I(e, a.DOLLAR, i, i + 1);
532
532
  case 38:
533
- return b(e, a.AMP, i, i + 1);
533
+ return I(e, a.AMP, i, i + 1);
534
534
  case 40:
535
- return b(e, a.PAREN_L, i, i + 1);
535
+ return I(e, a.PAREN_L, i, i + 1);
536
536
  case 41:
537
- return b(e, a.PAREN_R, i, i + 1);
537
+ return I(e, a.PAREN_R, i, i + 1);
538
538
  case 46:
539
539
  if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46)
540
- return b(e, a.SPREAD, i, i + 3);
540
+ return I(e, a.SPREAD, i, i + 3);
541
541
  break;
542
542
  case 58:
543
- return b(e, a.COLON, i, i + 1);
543
+ return I(e, a.COLON, i, i + 1);
544
544
  case 61:
545
- return b(e, a.EQUALS, i, i + 1);
545
+ return I(e, a.EQUALS, i, i + 1);
546
546
  case 64:
547
- return b(e, a.AT, i, i + 1);
547
+ return I(e, a.AT, i, i + 1);
548
548
  case 91:
549
- return b(e, a.BRACKET_L, i, i + 1);
549
+ return I(e, a.BRACKET_L, i, i + 1);
550
550
  case 93:
551
- return b(e, a.BRACKET_R, i, i + 1);
551
+ return I(e, a.BRACKET_R, i, i + 1);
552
552
  case 123:
553
- return b(e, a.BRACE_L, i, i + 1);
553
+ return I(e, a.BRACE_L, i, i + 1);
554
554
  case 124:
555
- return b(e, a.PIPE, i, i + 1);
555
+ return I(e, a.PIPE, i, i + 1);
556
556
  case 125:
557
- return b(e, a.BRACE_R, i, i + 1);
557
+ return I(e, a.BRACE_R, i, i + 1);
558
558
  case 34:
559
- return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? At(e, i) : Tt(e, i);
559
+ return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? gt(e, i) : yt(e, i);
560
560
  }
561
- if (H(s) || s === 45)
562
- return Et(e, i, s);
563
- if (Pe(s))
564
- return xt(e, i);
565
- throw I(
561
+ if (Y(s) || s === 45)
562
+ return ft(e, i, s);
563
+ if (Re(s))
564
+ return vt(e, i);
565
+ throw b(
566
566
  e.source,
567
567
  i,
568
- s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : V(s) || re(n, i) ? `Unexpected character: ${F(e, i)}.` : `Invalid character: ${F(e, i)}.`
568
+ s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : q(s) || se(n, i) ? `Unexpected character: ${F(e, i)}.` : `Invalid character: ${F(e, i)}.`
569
569
  );
570
570
  }
571
- return b(e, a.EOF, r, r);
571
+ return I(e, a.EOF, r, r);
572
572
  }
573
- function mt(e, t) {
573
+ function dt(e, t) {
574
574
  const n = e.source.body, r = n.length;
575
575
  let i = t + 1;
576
576
  for (; i < r; ) {
577
577
  const s = n.charCodeAt(i);
578
578
  if (s === 10 || s === 13)
579
579
  break;
580
- if (V(s))
580
+ if (q(s))
581
581
  ++i;
582
- else if (re(n, i))
582
+ else if (se(n, i))
583
583
  i += 2;
584
584
  else
585
585
  break;
586
586
  }
587
- return b(
587
+ return I(
588
588
  e,
589
589
  a.COMMENT,
590
590
  t,
@@ -592,12 +592,12 @@ function mt(e, t) {
592
592
  n.slice(t + 1, i)
593
593
  );
594
594
  }
595
- function Et(e, t, n) {
595
+ function ft(e, t, n) {
596
596
  const r = e.source.body;
597
597
  let i = t, s = n, c = !1;
598
598
  if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
599
- if (s = r.charCodeAt(++i), H(s))
600
- throw I(
599
+ if (s = r.charCodeAt(++i), Y(s))
600
+ throw b(
601
601
  e.source,
602
602
  i,
603
603
  `Invalid number, unexpected digit after 0: ${F(
@@ -607,8 +607,8 @@ function Et(e, t, n) {
607
607
  );
608
608
  } else
609
609
  i = ue(e, i, s), s = r.charCodeAt(i);
610
- if (s === 46 && (c = !0, s = r.charCodeAt(++i), i = ue(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (c = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ue(e, i, s), s = r.charCodeAt(i)), s === 46 || Pe(s))
611
- throw I(
610
+ if (s === 46 && (c = !0, s = r.charCodeAt(++i), i = ue(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (c = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ue(e, i, s), s = r.charCodeAt(i)), s === 46 || Re(s))
611
+ throw b(
612
612
  e.source,
613
613
  i,
614
614
  `Invalid number, expected digit but got: ${F(
@@ -616,7 +616,7 @@ function Et(e, t, n) {
616
616
  i
617
617
  )}.`
618
618
  );
619
- return b(
619
+ return I(
620
620
  e,
621
621
  c ? a.FLOAT : a.INT,
622
622
  t,
@@ -625,8 +625,8 @@ function Et(e, t, n) {
625
625
  );
626
626
  }
627
627
  function ue(e, t, n) {
628
- if (!H(n))
629
- throw I(
628
+ if (!Y(n))
629
+ throw b(
630
630
  e.source,
631
631
  t,
632
632
  `Invalid number, expected digit but got: ${F(
@@ -636,31 +636,31 @@ function ue(e, t, n) {
636
636
  );
637
637
  const r = e.source.body;
638
638
  let i = t + 1;
639
- for (; H(r.charCodeAt(i)); )
639
+ for (; Y(r.charCodeAt(i)); )
640
640
  ++i;
641
641
  return i;
642
642
  }
643
- function Tt(e, t) {
643
+ function yt(e, t) {
644
644
  const n = e.source.body, r = n.length;
645
645
  let i = t + 1, s = i, c = "";
646
646
  for (; i < r; ) {
647
647
  const u = n.charCodeAt(i);
648
648
  if (u === 34)
649
- return c += n.slice(s, i), b(e, a.STRING, t, i + 1, c);
649
+ return c += n.slice(s, i), I(e, a.STRING, t, i + 1, c);
650
650
  if (u === 92) {
651
651
  c += n.slice(s, i);
652
- const p = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? vt(e, i) : Nt(e, i) : gt(e, i);
653
- c += p.value, i += p.size, s = i;
652
+ const h = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? mt(e, i) : Et(e, i) : Tt(e, i);
653
+ c += h.value, i += h.size, s = i;
654
654
  continue;
655
655
  }
656
656
  if (u === 10 || u === 13)
657
657
  break;
658
- if (V(u))
658
+ if (q(u))
659
659
  ++i;
660
- else if (re(n, i))
660
+ else if (se(n, i))
661
661
  i += 2;
662
662
  else
663
- throw I(
663
+ throw b(
664
664
  e.source,
665
665
  i,
666
666
  `Invalid character within String: ${F(
@@ -669,25 +669,25 @@ function Tt(e, t) {
669
669
  )}.`
670
670
  );
671
671
  }
672
- throw I(e.source, i, "Unterminated string.");
672
+ throw b(e.source, i, "Unterminated string.");
673
673
  }
674
- function vt(e, t) {
674
+ function mt(e, t) {
675
675
  const n = e.source.body;
676
676
  let r = 0, i = 3;
677
677
  for (; i < 12; ) {
678
678
  const s = n.charCodeAt(t + i++);
679
679
  if (s === 125) {
680
- if (i < 5 || !V(r))
680
+ if (i < 5 || !q(r))
681
681
  break;
682
682
  return {
683
683
  value: String.fromCodePoint(r),
684
684
  size: i
685
685
  };
686
686
  }
687
- if (r = r << 4 | $(s), r < 0)
687
+ if (r = r << 4 | G(s), r < 0)
688
688
  break;
689
689
  }
690
- throw I(
690
+ throw b(
691
691
  e.source,
692
692
  t,
693
693
  `Invalid Unicode escape sequence: "${n.slice(
@@ -696,34 +696,34 @@ function vt(e, t) {
696
696
  )}".`
697
697
  );
698
698
  }
699
- function Nt(e, t) {
700
- const n = e.source.body, r = Ie(n, t + 2);
701
- if (V(r))
699
+ function Et(e, t) {
700
+ const n = e.source.body, r = be(n, t + 2);
701
+ if (q(r))
702
702
  return {
703
703
  value: String.fromCodePoint(r),
704
704
  size: 6
705
705
  };
706
- if (Be(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
707
- const i = Ie(n, t + 8);
708
- if (Me(i))
706
+ if (Le(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
707
+ const i = be(n, t + 8);
708
+ if (Fe(i))
709
709
  return {
710
710
  value: String.fromCodePoint(r, i),
711
711
  size: 12
712
712
  };
713
713
  }
714
- throw I(
714
+ throw b(
715
715
  e.source,
716
716
  t,
717
717
  `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
718
718
  );
719
719
  }
720
- function Ie(e, t) {
721
- return $(e.charCodeAt(t)) << 12 | $(e.charCodeAt(t + 1)) << 8 | $(e.charCodeAt(t + 2)) << 4 | $(e.charCodeAt(t + 3));
720
+ function be(e, t) {
721
+ return G(e.charCodeAt(t)) << 12 | G(e.charCodeAt(t + 1)) << 8 | G(e.charCodeAt(t + 2)) << 4 | G(e.charCodeAt(t + 3));
722
722
  }
723
- function $(e) {
723
+ function G(e) {
724
724
  return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
725
725
  }
726
- function gt(e, t) {
726
+ function Tt(e, t) {
727
727
  const n = e.source.body;
728
728
  switch (n.charCodeAt(t + 1)) {
729
729
  case 34:
@@ -768,7 +768,7 @@ function gt(e, t) {
768
768
  size: 2
769
769
  };
770
770
  }
771
- throw I(
771
+ throw b(
772
772
  e.source,
773
773
  t,
774
774
  `Invalid character escape sequence: "${n.slice(
@@ -777,39 +777,39 @@ function gt(e, t) {
777
777
  )}".`
778
778
  );
779
779
  }
780
- function At(e, t) {
780
+ function gt(e, t) {
781
781
  const n = e.source.body, r = n.length;
782
782
  let i = e.lineStart, s = t + 3, c = s, u = "";
783
- const p = [];
783
+ const h = [];
784
784
  for (; s < r; ) {
785
785
  const d = n.charCodeAt(s);
786
786
  if (d === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
787
- u += n.slice(c, s), p.push(u);
788
- const y = b(
787
+ u += n.slice(c, s), h.push(u);
788
+ const y = I(
789
789
  e,
790
790
  a.BLOCK_STRING,
791
791
  t,
792
792
  s + 3,
793
793
  // Return a string of the lines joined with U+000A.
794
- lt(p).join(`
794
+ at(h).join(`
795
795
  `)
796
796
  );
797
- return e.line += p.length - 1, e.lineStart = i, y;
797
+ return e.line += h.length - 1, e.lineStart = i, y;
798
798
  }
799
799
  if (d === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
800
800
  u += n.slice(c, s), c = s + 1, s += 4;
801
801
  continue;
802
802
  }
803
803
  if (d === 10 || d === 13) {
804
- u += n.slice(c, s), p.push(u), d === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", c = s, i = s;
804
+ u += n.slice(c, s), h.push(u), d === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", c = s, i = s;
805
805
  continue;
806
806
  }
807
- if (V(d))
807
+ if (q(d))
808
808
  ++s;
809
- else if (re(n, s))
809
+ else if (se(n, s))
810
810
  s += 2;
811
811
  else
812
- throw I(
812
+ throw b(
813
813
  e.source,
814
814
  s,
815
815
  `Invalid character within String: ${F(
@@ -818,19 +818,19 @@ function At(e, t) {
818
818
  )}.`
819
819
  );
820
820
  }
821
- throw I(e.source, s, "Unterminated string.");
821
+ throw b(e.source, s, "Unterminated string.");
822
822
  }
823
- function xt(e, t) {
823
+ function vt(e, t) {
824
824
  const n = e.source.body, r = n.length;
825
825
  let i = t + 1;
826
826
  for (; i < r; ) {
827
827
  const s = n.charCodeAt(i);
828
- if (ut(s))
828
+ if (ot(s))
829
829
  ++i;
830
830
  else
831
831
  break;
832
832
  }
833
- return b(
833
+ return I(
834
834
  e,
835
835
  a.NAME,
836
836
  t,
@@ -838,56 +838,56 @@ function xt(e, t) {
838
838
  n.slice(t, i)
839
839
  );
840
840
  }
841
- const bt = 10, Ue = 2;
842
- function Ne(e) {
843
- return se(e, []);
841
+ const Nt = 10, Pe = 2;
842
+ function ve(e) {
843
+ return oe(e, []);
844
844
  }
845
- function se(e, t) {
845
+ function oe(e, t) {
846
846
  switch (typeof e) {
847
847
  case "string":
848
848
  return JSON.stringify(e);
849
849
  case "function":
850
850
  return e.name ? `[function ${e.name}]` : "[function]";
851
851
  case "object":
852
- return It(e, t);
852
+ return At(e, t);
853
853
  default:
854
854
  return String(e);
855
855
  }
856
856
  }
857
- function It(e, t) {
857
+ function At(e, t) {
858
858
  if (e === null)
859
859
  return "null";
860
860
  if (t.includes(e))
861
861
  return "[Circular]";
862
862
  const n = [...t, e];
863
- if (Ot(e)) {
863
+ if (xt(e)) {
864
864
  const r = e.toJSON();
865
865
  if (r !== e)
866
- return typeof r == "string" ? r : se(r, n);
866
+ return typeof r == "string" ? r : oe(r, n);
867
867
  } else if (Array.isArray(e))
868
- return Dt(e, n);
869
- return _t(e, n);
868
+ return bt(e, n);
869
+ return It(e, n);
870
870
  }
871
- function Ot(e) {
871
+ function xt(e) {
872
872
  return typeof e.toJSON == "function";
873
873
  }
874
- function _t(e, t) {
874
+ function It(e, t) {
875
875
  const n = Object.entries(e);
876
- return n.length === 0 ? "{}" : t.length > Ue ? "[" + St(e) + "]" : "{ " + n.map(
877
- ([i, s]) => i + ": " + se(s, t)
876
+ return n.length === 0 ? "{}" : t.length > Pe ? "[" + Ot(e) + "]" : "{ " + n.map(
877
+ ([i, s]) => i + ": " + oe(s, t)
878
878
  ).join(", ") + " }";
879
879
  }
880
- function Dt(e, t) {
880
+ function bt(e, t) {
881
881
  if (e.length === 0)
882
882
  return "[]";
883
- if (t.length > Ue)
883
+ if (t.length > Pe)
884
884
  return "[Array]";
885
- const n = Math.min(bt, e.length), r = e.length - n, i = [];
885
+ const n = Math.min(Nt, e.length), r = e.length - n, i = [];
886
886
  for (let s = 0; s < n; ++s)
887
- i.push(se(e[s], t));
887
+ i.push(oe(e[s], t));
888
888
  return r === 1 ? i.push("... 1 more item") : r > 1 && i.push(`... ${r} more items`), "[" + i.join(", ") + "]";
889
889
  }
890
- function St(e) {
890
+ function Ot(e) {
891
891
  const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
892
892
  if (t === "Object" && typeof e.constructor == "function") {
893
893
  const n = e.constructor.name;
@@ -896,7 +896,7 @@ function St(e) {
896
896
  }
897
897
  return t;
898
898
  }
899
- const Ct = (
899
+ const _t = (
900
900
  /* c8 ignore next 6 */
901
901
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
902
902
  globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function(t, n) {
@@ -911,7 +911,7 @@ const Ct = (
911
911
  Symbol.toStringTag in t ? t[Symbol.toStringTag] : (r = t.constructor) === null || r === void 0 ? void 0 : r.name
912
912
  );
913
913
  if (i === s) {
914
- const c = Ne(t);
914
+ const c = ve(t);
915
915
  throw new Error(`Cannot use ${i} "${c}" from another module or realm.
916
916
 
917
917
  Ensure that there is only one instance of "graphql" in the node_modules
@@ -929,15 +929,15 @@ spurious results.`);
929
929
  return !1;
930
930
  }
931
931
  );
932
- class Ve {
932
+ class Be {
933
933
  constructor(t, n = "GraphQL request", r = {
934
934
  line: 1,
935
935
  column: 1
936
936
  }) {
937
- typeof t == "string" || W(!1, `Body must be a string. Received: ${Ne(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || W(
937
+ typeof t == "string" || Z(!1, `Body must be a string. Received: ${ve(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || Z(
938
938
  !1,
939
939
  "line in locationOffset is 1-indexed and must be positive."
940
- ), this.locationOffset.column > 0 || W(
940
+ ), this.locationOffset.column > 0 || Z(
941
941
  !1,
942
942
  "column in locationOffset is 1-indexed and must be positive."
943
943
  );
@@ -946,16 +946,16 @@ class Ve {
946
946
  return "Source";
947
947
  }
948
948
  }
949
- function kt(e) {
950
- return Ct(e, Ve);
949
+ function Dt(e) {
950
+ return _t(e, Be);
951
951
  }
952
- function qe(e, t) {
953
- return new wt(e, t).parseDocument();
952
+ function Me(e, t) {
953
+ return new Ct(e, t).parseDocument();
954
954
  }
955
- class wt {
955
+ class Ct {
956
956
  constructor(t, n = {}) {
957
- const r = kt(t) ? t : new Ve(t);
958
- this._lexer = new dt(r), this._options = n, this._tokenCounter = 0;
957
+ const r = Dt(t) ? t : new Be(t);
958
+ this._lexer = new lt(r), this._options = n, this._tokenCounter = 0;
959
959
  }
960
960
  /**
961
961
  * Converts a name lex token into a name parse node.
@@ -1028,7 +1028,7 @@ class wt {
1028
1028
  return this.parseDirectiveDefinition();
1029
1029
  }
1030
1030
  if (t)
1031
- throw I(
1031
+ throw b(
1032
1032
  this._lexer.source,
1033
1033
  this._lexer.token.start,
1034
1034
  "Unexpected description, descriptions are supported only on type definitions."
@@ -1302,7 +1302,7 @@ class wt {
1302
1302
  if (t)
1303
1303
  if (this.expectToken(a.DOLLAR), this._lexer.token.kind === a.NAME) {
1304
1304
  const r = this._lexer.token.value;
1305
- throw I(
1305
+ throw b(
1306
1306
  this._lexer.source,
1307
1307
  n.start,
1308
1308
  `Unexpected variable "$${r}" in constant value.`
@@ -1649,10 +1649,10 @@ class wt {
1649
1649
  */
1650
1650
  parseEnumValueName() {
1651
1651
  if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null")
1652
- throw I(
1652
+ throw b(
1653
1653
  this._lexer.source,
1654
1654
  this._lexer.token.start,
1655
- `${X(
1655
+ `${W(
1656
1656
  this._lexer.token
1657
1657
  )} is reserved and cannot be used for an enum value.`
1658
1658
  );
@@ -1922,7 +1922,7 @@ class wt {
1922
1922
  * given parsed object.
1923
1923
  */
1924
1924
  node(t, n) {
1925
- return this._options.noLocation !== !0 && (n.loc = new at(
1925
+ return this._options.noLocation !== !0 && (n.loc = new rt(
1926
1926
  t,
1927
1927
  this._lexer.lastToken,
1928
1928
  this._lexer.source
@@ -1942,10 +1942,10 @@ class wt {
1942
1942
  const n = this._lexer.token;
1943
1943
  if (n.kind === t)
1944
1944
  return this.advanceLexer(), n;
1945
- throw I(
1945
+ throw b(
1946
1946
  this._lexer.source,
1947
1947
  n.start,
1948
- `Expected ${je(t)}, found ${X(n)}.`
1948
+ `Expected ${Ue(t)}, found ${W(n)}.`
1949
1949
  );
1950
1950
  }
1951
1951
  /**
@@ -1964,10 +1964,10 @@ class wt {
1964
1964
  if (n.kind === a.NAME && n.value === t)
1965
1965
  this.advanceLexer();
1966
1966
  else
1967
- throw I(
1967
+ throw b(
1968
1968
  this._lexer.source,
1969
1969
  n.start,
1970
- `Expected "${t}", found ${X(n)}.`
1970
+ `Expected "${t}", found ${W(n)}.`
1971
1971
  );
1972
1972
  }
1973
1973
  /**
@@ -1983,10 +1983,10 @@ class wt {
1983
1983
  */
1984
1984
  unexpected(t) {
1985
1985
  const n = t ?? this._lexer.token;
1986
- return I(
1986
+ return b(
1987
1987
  this._lexer.source,
1988
1988
  n.start,
1989
- `Unexpected ${X(n)}.`
1989
+ `Unexpected ${W(n)}.`
1990
1990
  );
1991
1991
  }
1992
1992
  /**
@@ -2046,28 +2046,28 @@ class wt {
2046
2046
  advanceLexer() {
2047
2047
  const { maxTokens: t } = this._options, n = this._lexer.advance();
2048
2048
  if (t !== void 0 && n.kind !== a.EOF && (++this._tokenCounter, this._tokenCounter > t))
2049
- throw I(
2049
+ throw b(
2050
2050
  this._lexer.source,
2051
2051
  n.start,
2052
2052
  `Document contains more that ${t} tokens. Parsing aborted.`
2053
2053
  );
2054
2054
  }
2055
2055
  }
2056
- function X(e) {
2056
+ function W(e) {
2057
2057
  const t = e.value;
2058
- return je(e.kind) + (t != null ? ` "${t}"` : "");
2058
+ return Ue(e.kind) + (t != null ? ` "${t}"` : "");
2059
2059
  }
2060
- function je(e) {
2061
- return ft(e) ? `"${e}"` : e;
2060
+ function Ue(e) {
2061
+ return ht(e) ? `"${e}"` : e;
2062
2062
  }
2063
- function Rt(e) {
2064
- return `"${e.replace(Lt, Ft)}"`;
2063
+ function St(e) {
2064
+ return `"${e.replace(wt, kt)}"`;
2065
2065
  }
2066
- const Lt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
2067
- function Ft(e) {
2068
- return Pt[e.charCodeAt(0)];
2066
+ const wt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
2067
+ function kt(e) {
2068
+ return Rt[e.charCodeAt(0)];
2069
2069
  }
2070
- const Pt = [
2070
+ const Rt = [
2071
2071
  "\\u0000",
2072
2072
  "\\u0001",
2073
2073
  "\\u0002",
@@ -2233,60 +2233,60 @@ const Pt = [
2233
2233
  "\\u009D",
2234
2234
  "\\u009E",
2235
2235
  "\\u009F"
2236
- ], Bt = Object.freeze({});
2237
- function Mt(e, t, n = Le) {
2236
+ ], Lt = Object.freeze({});
2237
+ function Ft(e, t, n = we) {
2238
2238
  const r = /* @__PURE__ */ new Map();
2239
- for (const S of Object.values(f))
2240
- r.set(S, Ut(t, S));
2241
- let i, s = Array.isArray(e), c = [e], u = -1, p = [], d = e, y, E;
2239
+ for (const C of Object.values(f))
2240
+ r.set(C, Pt(t, C));
2241
+ let i, s = Array.isArray(e), c = [e], u = -1, h = [], d = e, y, E;
2242
2242
  const T = [], A = [];
2243
2243
  do {
2244
2244
  u++;
2245
- const S = u === c.length, Y = S && p.length !== 0;
2246
- if (S) {
2247
- if (y = A.length === 0 ? void 0 : T[T.length - 1], d = E, E = A.pop(), Y)
2245
+ const C = u === c.length, z = C && h.length !== 0;
2246
+ if (C) {
2247
+ if (y = A.length === 0 ? void 0 : T[T.length - 1], d = E, E = A.pop(), z)
2248
2248
  if (s) {
2249
2249
  d = d.slice();
2250
- let C = 0;
2251
- for (const [P, z] of p) {
2252
- const Q = P - C;
2253
- z === null ? (d.splice(Q, 1), C++) : d[Q] = z;
2250
+ let S = 0;
2251
+ for (const [P, Q] of h) {
2252
+ const J = P - S;
2253
+ Q === null ? (d.splice(J, 1), S++) : d[J] = Q;
2254
2254
  }
2255
2255
  } else {
2256
2256
  d = Object.defineProperties(
2257
2257
  {},
2258
2258
  Object.getOwnPropertyDescriptors(d)
2259
2259
  );
2260
- for (const [C, P] of p)
2261
- d[C] = P;
2260
+ for (const [S, P] of h)
2261
+ d[S] = P;
2262
2262
  }
2263
- u = i.index, c = i.keys, p = i.edits, s = i.inArray, i = i.prev;
2263
+ u = i.index, c = i.keys, h = i.edits, s = i.inArray, i = i.prev;
2264
2264
  } else if (E) {
2265
2265
  if (y = s ? u : c[u], d = E[y], d == null)
2266
2266
  continue;
2267
2267
  T.push(y);
2268
2268
  }
2269
- let w;
2269
+ let k;
2270
2270
  if (!Array.isArray(d)) {
2271
2271
  var m, x;
2272
- be(d) || W(!1, `Invalid AST Node: ${Ne(d)}.`);
2273
- const C = S ? (m = r.get(d.kind)) === null || m === void 0 ? void 0 : m.leave : (x = r.get(d.kind)) === null || x === void 0 ? void 0 : x.enter;
2274
- if (w = C == null ? void 0 : C.call(t, d, y, E, T, A), w === Bt)
2272
+ Ie(d) || Z(!1, `Invalid AST Node: ${ve(d)}.`);
2273
+ const S = C ? (m = r.get(d.kind)) === null || m === void 0 ? void 0 : m.leave : (x = r.get(d.kind)) === null || x === void 0 ? void 0 : x.enter;
2274
+ if (k = S == null ? void 0 : S.call(t, d, y, E, T, A), k === Lt)
2275
2275
  break;
2276
- if (w === !1) {
2277
- if (!S) {
2276
+ if (k === !1) {
2277
+ if (!C) {
2278
2278
  T.pop();
2279
2279
  continue;
2280
2280
  }
2281
- } else if (w !== void 0 && (p.push([y, w]), !S))
2282
- if (be(w))
2283
- d = w;
2281
+ } else if (k !== void 0 && (h.push([y, k]), !C))
2282
+ if (Ie(k))
2283
+ d = k;
2284
2284
  else {
2285
2285
  T.pop();
2286
2286
  continue;
2287
2287
  }
2288
2288
  }
2289
- if (w === void 0 && Y && p.push([y, d]), S)
2289
+ if (k === void 0 && z && h.push([y, d]), C)
2290
2290
  T.pop();
2291
2291
  else {
2292
2292
  var D;
@@ -2294,14 +2294,14 @@ function Mt(e, t, n = Le) {
2294
2294
  inArray: s,
2295
2295
  index: u,
2296
2296
  keys: c,
2297
- edits: p,
2297
+ edits: h,
2298
2298
  prev: i
2299
- }, s = Array.isArray(d), c = s ? d : (D = n[d.kind]) !== null && D !== void 0 ? D : [], u = -1, p = [], E && A.push(E), E = d;
2299
+ }, s = Array.isArray(d), c = s ? d : (D = n[d.kind]) !== null && D !== void 0 ? D : [], u = -1, h = [], E && A.push(E), E = d;
2300
2300
  }
2301
2301
  } while (i !== void 0);
2302
- return p.length !== 0 ? p[p.length - 1][1] : e;
2302
+ return h.length !== 0 ? h[h.length - 1][1] : e;
2303
2303
  }
2304
- function Ut(e, t) {
2304
+ function Pt(e, t) {
2305
2305
  const n = e[t];
2306
2306
  return typeof n == "object" ? n : typeof n == "function" ? {
2307
2307
  enter: n,
@@ -2311,10 +2311,10 @@ function Ut(e, t) {
2311
2311
  leave: e.leave
2312
2312
  };
2313
2313
  }
2314
- function Vt(e) {
2315
- return Mt(e, jt);
2314
+ function Bt(e) {
2315
+ return Ft(e, Ut);
2316
2316
  }
2317
- const qt = 80, jt = {
2317
+ const Mt = 80, Ut = {
2318
2318
  Name: {
2319
2319
  leave: (e) => e.value
2320
2320
  },
@@ -2323,17 +2323,17 @@ const qt = 80, jt = {
2323
2323
  },
2324
2324
  // Document
2325
2325
  Document: {
2326
- leave: (e) => h(e.definitions, `
2326
+ leave: (e) => p(e.definitions, `
2327
2327
 
2328
2328
  `)
2329
2329
  },
2330
2330
  OperationDefinition: {
2331
2331
  leave(e) {
2332
- const t = N("(", h(e.variableDefinitions, ", "), ")"), n = h(
2332
+ const t = v("(", p(e.variableDefinitions, ", "), ")"), n = p(
2333
2333
  [
2334
2334
  e.operation,
2335
- h([e.name, t]),
2336
- h(e.directives, " ")
2335
+ p([e.name, t]),
2336
+ p(e.directives, " ")
2337
2337
  ],
2338
2338
  " "
2339
2339
  );
@@ -2341,19 +2341,19 @@ const qt = 80, jt = {
2341
2341
  }
2342
2342
  },
2343
2343
  VariableDefinition: {
2344
- leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + N(" = ", n) + N(" ", h(r, " "))
2344
+ leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + v(" = ", n) + v(" ", p(r, " "))
2345
2345
  },
2346
2346
  SelectionSet: {
2347
- leave: ({ selections: e }) => k(e)
2347
+ leave: ({ selections: e }) => w(e)
2348
2348
  },
2349
2349
  Field: {
2350
2350
  leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) {
2351
- const s = N("", e, ": ") + t;
2352
- let c = s + N("(", h(n, ", "), ")");
2353
- return c.length > qt && (c = s + N(`(
2354
- `, Z(h(n, `
2351
+ const s = v("", e, ": ") + t;
2352
+ let c = s + v("(", p(n, ", "), ")");
2353
+ return c.length > Mt && (c = s + v(`(
2354
+ `, K(p(n, `
2355
2355
  `)), `
2356
- )`)), h([c, h(r, " "), i], " ");
2356
+ )`)), p([c, p(r, " "), i], " ");
2357
2357
  }
2358
2358
  },
2359
2359
  Argument: {
@@ -2361,14 +2361,14 @@ const qt = 80, jt = {
2361
2361
  },
2362
2362
  // Fragments
2363
2363
  FragmentSpread: {
2364
- leave: ({ name: e, directives: t }) => "..." + e + N(" ", h(t, " "))
2364
+ leave: ({ name: e, directives: t }) => "..." + e + v(" ", p(t, " "))
2365
2365
  },
2366
2366
  InlineFragment: {
2367
- leave: ({ typeCondition: e, directives: t, selectionSet: n }) => h(
2367
+ leave: ({ typeCondition: e, directives: t, selectionSet: n }) => p(
2368
2368
  [
2369
2369
  "...",
2370
- N("on ", e),
2371
- h(t, " "),
2370
+ v("on ", e),
2371
+ p(t, " "),
2372
2372
  n
2373
2373
  ],
2374
2374
  " "
@@ -2377,7 +2377,7 @@ const qt = 80, jt = {
2377
2377
  FragmentDefinition: {
2378
2378
  leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: r, selectionSet: i }) => (
2379
2379
  // or removed in the future.
2380
- `fragment ${e}${N("(", h(n, ", "), ")")} on ${t} ${N("", h(r, " "), " ")}` + i
2380
+ `fragment ${e}${v("(", p(n, ", "), ")")} on ${t} ${v("", p(r, " "), " ")}` + i
2381
2381
  )
2382
2382
  },
2383
2383
  // Value
@@ -2388,7 +2388,7 @@ const qt = 80, jt = {
2388
2388
  leave: ({ value: e }) => e
2389
2389
  },
2390
2390
  StringValue: {
2391
- leave: ({ value: e, block: t }) => t ? pt(e) : Rt(e)
2391
+ leave: ({ value: e, block: t }) => t ? ut(e) : St(e)
2392
2392
  },
2393
2393
  BooleanValue: {
2394
2394
  leave: ({ value: e }) => e ? "true" : "false"
@@ -2400,17 +2400,17 @@ const qt = 80, jt = {
2400
2400
  leave: ({ value: e }) => e
2401
2401
  },
2402
2402
  ListValue: {
2403
- leave: ({ values: e }) => "[" + h(e, ", ") + "]"
2403
+ leave: ({ values: e }) => "[" + p(e, ", ") + "]"
2404
2404
  },
2405
2405
  ObjectValue: {
2406
- leave: ({ fields: e }) => "{" + h(e, ", ") + "}"
2406
+ leave: ({ fields: e }) => "{" + p(e, ", ") + "}"
2407
2407
  },
2408
2408
  ObjectField: {
2409
2409
  leave: ({ name: e, value: t }) => e + ": " + t
2410
2410
  },
2411
2411
  // Directive
2412
2412
  Directive: {
2413
- leave: ({ name: e, arguments: t }) => "@" + e + N("(", h(t, ", "), ")")
2413
+ leave: ({ name: e, arguments: t }) => "@" + e + v("(", p(t, ", "), ")")
2414
2414
  },
2415
2415
  // Type
2416
2416
  NamedType: {
@@ -2424,148 +2424,148 @@ const qt = 80, jt = {
2424
2424
  },
2425
2425
  // Type System Definitions
2426
2426
  SchemaDefinition: {
2427
- leave: ({ description: e, directives: t, operationTypes: n }) => N("", e, `
2428
- `) + h(["schema", h(t, " "), k(n)], " ")
2427
+ leave: ({ description: e, directives: t, operationTypes: n }) => v("", e, `
2428
+ `) + p(["schema", p(t, " "), w(n)], " ")
2429
2429
  },
2430
2430
  OperationTypeDefinition: {
2431
2431
  leave: ({ operation: e, type: t }) => e + ": " + t
2432
2432
  },
2433
2433
  ScalarTypeDefinition: {
2434
- leave: ({ description: e, name: t, directives: n }) => N("", e, `
2435
- `) + h(["scalar", t, h(n, " ")], " ")
2434
+ leave: ({ description: e, name: t, directives: n }) => v("", e, `
2435
+ `) + p(["scalar", t, p(n, " ")], " ")
2436
2436
  },
2437
2437
  ObjectTypeDefinition: {
2438
- leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => N("", e, `
2439
- `) + h(
2438
+ leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, `
2439
+ `) + p(
2440
2440
  [
2441
2441
  "type",
2442
2442
  t,
2443
- N("implements ", h(n, " & ")),
2444
- h(r, " "),
2445
- k(i)
2443
+ v("implements ", p(n, " & ")),
2444
+ p(r, " "),
2445
+ w(i)
2446
2446
  ],
2447
2447
  " "
2448
2448
  )
2449
2449
  },
2450
2450
  FieldDefinition: {
2451
- leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => N("", e, `
2452
- `) + t + (Oe(n) ? N(`(
2453
- `, Z(h(n, `
2451
+ leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => v("", e, `
2452
+ `) + t + (Oe(n) ? v(`(
2453
+ `, K(p(n, `
2454
2454
  `)), `
2455
- )`) : N("(", h(n, ", "), ")")) + ": " + r + N(" ", h(i, " "))
2455
+ )`) : v("(", p(n, ", "), ")")) + ": " + r + v(" ", p(i, " "))
2456
2456
  },
2457
2457
  InputValueDefinition: {
2458
- leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => N("", e, `
2459
- `) + h(
2460
- [t + ": " + n, N("= ", r), h(i, " ")],
2458
+ leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => v("", e, `
2459
+ `) + p(
2460
+ [t + ": " + n, v("= ", r), p(i, " ")],
2461
2461
  " "
2462
2462
  )
2463
2463
  },
2464
2464
  InterfaceTypeDefinition: {
2465
- leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => N("", e, `
2466
- `) + h(
2465
+ leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, `
2466
+ `) + p(
2467
2467
  [
2468
2468
  "interface",
2469
2469
  t,
2470
- N("implements ", h(n, " & ")),
2471
- h(r, " "),
2472
- k(i)
2470
+ v("implements ", p(n, " & ")),
2471
+ p(r, " "),
2472
+ w(i)
2473
2473
  ],
2474
2474
  " "
2475
2475
  )
2476
2476
  },
2477
2477
  UnionTypeDefinition: {
2478
- leave: ({ description: e, name: t, directives: n, types: r }) => N("", e, `
2479
- `) + h(
2480
- ["union", t, h(n, " "), N("= ", h(r, " | "))],
2478
+ leave: ({ description: e, name: t, directives: n, types: r }) => v("", e, `
2479
+ `) + p(
2480
+ ["union", t, p(n, " "), v("= ", p(r, " | "))],
2481
2481
  " "
2482
2482
  )
2483
2483
  },
2484
2484
  EnumTypeDefinition: {
2485
- leave: ({ description: e, name: t, directives: n, values: r }) => N("", e, `
2486
- `) + h(["enum", t, h(n, " "), k(r)], " ")
2485
+ leave: ({ description: e, name: t, directives: n, values: r }) => v("", e, `
2486
+ `) + p(["enum", t, p(n, " "), w(r)], " ")
2487
2487
  },
2488
2488
  EnumValueDefinition: {
2489
- leave: ({ description: e, name: t, directives: n }) => N("", e, `
2490
- `) + h([t, h(n, " ")], " ")
2489
+ leave: ({ description: e, name: t, directives: n }) => v("", e, `
2490
+ `) + p([t, p(n, " ")], " ")
2491
2491
  },
2492
2492
  InputObjectTypeDefinition: {
2493
- leave: ({ description: e, name: t, directives: n, fields: r }) => N("", e, `
2494
- `) + h(["input", t, h(n, " "), k(r)], " ")
2493
+ leave: ({ description: e, name: t, directives: n, fields: r }) => v("", e, `
2494
+ `) + p(["input", t, p(n, " "), w(r)], " ")
2495
2495
  },
2496
2496
  DirectiveDefinition: {
2497
- leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => N("", e, `
2498
- `) + "directive @" + t + (Oe(n) ? N(`(
2499
- `, Z(h(n, `
2497
+ leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => v("", e, `
2498
+ `) + "directive @" + t + (Oe(n) ? v(`(
2499
+ `, K(p(n, `
2500
2500
  `)), `
2501
- )`) : N("(", h(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + h(i, " | ")
2501
+ )`) : v("(", p(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + p(i, " | ")
2502
2502
  },
2503
2503
  SchemaExtension: {
2504
- leave: ({ directives: e, operationTypes: t }) => h(
2505
- ["extend schema", h(e, " "), k(t)],
2504
+ leave: ({ directives: e, operationTypes: t }) => p(
2505
+ ["extend schema", p(e, " "), w(t)],
2506
2506
  " "
2507
2507
  )
2508
2508
  },
2509
2509
  ScalarTypeExtension: {
2510
- leave: ({ name: e, directives: t }) => h(["extend scalar", e, h(t, " ")], " ")
2510
+ leave: ({ name: e, directives: t }) => p(["extend scalar", e, p(t, " ")], " ")
2511
2511
  },
2512
2512
  ObjectTypeExtension: {
2513
- leave: ({ name: e, interfaces: t, directives: n, fields: r }) => h(
2513
+ leave: ({ name: e, interfaces: t, directives: n, fields: r }) => p(
2514
2514
  [
2515
2515
  "extend type",
2516
2516
  e,
2517
- N("implements ", h(t, " & ")),
2518
- h(n, " "),
2519
- k(r)
2517
+ v("implements ", p(t, " & ")),
2518
+ p(n, " "),
2519
+ w(r)
2520
2520
  ],
2521
2521
  " "
2522
2522
  )
2523
2523
  },
2524
2524
  InterfaceTypeExtension: {
2525
- leave: ({ name: e, interfaces: t, directives: n, fields: r }) => h(
2525
+ leave: ({ name: e, interfaces: t, directives: n, fields: r }) => p(
2526
2526
  [
2527
2527
  "extend interface",
2528
2528
  e,
2529
- N("implements ", h(t, " & ")),
2530
- h(n, " "),
2531
- k(r)
2529
+ v("implements ", p(t, " & ")),
2530
+ p(n, " "),
2531
+ w(r)
2532
2532
  ],
2533
2533
  " "
2534
2534
  )
2535
2535
  },
2536
2536
  UnionTypeExtension: {
2537
- leave: ({ name: e, directives: t, types: n }) => h(
2537
+ leave: ({ name: e, directives: t, types: n }) => p(
2538
2538
  [
2539
2539
  "extend union",
2540
2540
  e,
2541
- h(t, " "),
2542
- N("= ", h(n, " | "))
2541
+ p(t, " "),
2542
+ v("= ", p(n, " | "))
2543
2543
  ],
2544
2544
  " "
2545
2545
  )
2546
2546
  },
2547
2547
  EnumTypeExtension: {
2548
- leave: ({ name: e, directives: t, values: n }) => h(["extend enum", e, h(t, " "), k(n)], " ")
2548
+ leave: ({ name: e, directives: t, values: n }) => p(["extend enum", e, p(t, " "), w(n)], " ")
2549
2549
  },
2550
2550
  InputObjectTypeExtension: {
2551
- leave: ({ name: e, directives: t, fields: n }) => h(["extend input", e, h(t, " "), k(n)], " ")
2551
+ leave: ({ name: e, directives: t, fields: n }) => p(["extend input", e, p(t, " "), w(n)], " ")
2552
2552
  }
2553
2553
  };
2554
- function h(e, t = "") {
2554
+ function p(e, t = "") {
2555
2555
  var n;
2556
2556
  return (n = e == null ? void 0 : e.filter((r) => r).join(t)) !== null && n !== void 0 ? n : "";
2557
2557
  }
2558
- function k(e) {
2559
- return N(`{
2560
- `, Z(h(e, `
2558
+ function w(e) {
2559
+ return v(`{
2560
+ `, K(p(e, `
2561
2561
  `)), `
2562
2562
  }`);
2563
2563
  }
2564
- function N(e, t, n = "") {
2564
+ function v(e, t, n = "") {
2565
2565
  return t != null && t !== "" ? e + t + n : "";
2566
2566
  }
2567
- function Z(e) {
2568
- return N(" ", e.replace(/\n/g, `
2567
+ function K(e) {
2568
+ return v(" ", e.replace(/\n/g, `
2569
2569
  `));
2570
2570
  }
2571
2571
  function Oe(e) {
@@ -2582,35 +2582,35 @@ const _e = (e) => {
2582
2582
  if (typeof e == "string") {
2583
2583
  let n;
2584
2584
  try {
2585
- const r = qe(e);
2585
+ const r = Me(e);
2586
2586
  n = _e(r);
2587
2587
  } catch {
2588
2588
  }
2589
2589
  return { query: e, operationName: n };
2590
2590
  }
2591
2591
  const t = _e(e);
2592
- return { query: Vt(e), operationName: t };
2592
+ return { query: Bt(e), operationName: t };
2593
2593
  };
2594
- class G extends Error {
2594
+ class H extends Error {
2595
2595
  constructor(t, n) {
2596
- const r = `${G.extractMessage(t)}: ${JSON.stringify({
2596
+ const r = `${H.extractMessage(t)}: ${JSON.stringify({
2597
2597
  response: t,
2598
2598
  request: n
2599
2599
  })}`;
2600
- super(r), Object.setPrototypeOf(this, G.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, G);
2600
+ super(r), Object.setPrototypeOf(this, H.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, H);
2601
2601
  }
2602
2602
  static extractMessage(t) {
2603
2603
  var n, r;
2604
2604
  return ((r = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : r.message) ?? `GraphQL Error (Code: ${t.status})`;
2605
2605
  }
2606
2606
  }
2607
- var $t = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2608
- function Gt(e) {
2607
+ var qt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2608
+ function Vt(e) {
2609
2609
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
2610
2610
  }
2611
2611
  var me = { exports: {} };
2612
2612
  (function(e, t) {
2613
- var n = typeof self < "u" ? self : $t, r = function() {
2613
+ var n = typeof self < "u" ? self : qt, r = function() {
2614
2614
  function s() {
2615
2615
  this.fetch = !1, this.DOMException = n.DOMException;
2616
2616
  }
@@ -2631,7 +2631,7 @@ var me = { exports: {} };
2631
2631
  formData: "FormData" in s,
2632
2632
  arrayBuffer: "ArrayBuffer" in s
2633
2633
  };
2634
- function p(o) {
2634
+ function h(o) {
2635
2635
  return o && DataView.prototype.isPrototypeOf(o);
2636
2636
  }
2637
2637
  if (u.arrayBuffer)
@@ -2659,8 +2659,8 @@ var me = { exports: {} };
2659
2659
  function A(o) {
2660
2660
  var l = {
2661
2661
  next: function() {
2662
- var v = o.shift();
2663
- return { done: v === void 0, value: v };
2662
+ var g = o.shift();
2663
+ return { done: g === void 0, value: g };
2664
2664
  }
2665
2665
  };
2666
2666
  return u.iterable && (l[Symbol.iterator] = function() {
@@ -2668,8 +2668,8 @@ var me = { exports: {} };
2668
2668
  }), l;
2669
2669
  }
2670
2670
  function m(o) {
2671
- this.map = {}, o instanceof m ? o.forEach(function(l, v) {
2672
- this.append(v, l);
2671
+ this.map = {}, o instanceof m ? o.forEach(function(l, g) {
2672
+ this.append(g, l);
2673
2673
  }, this) : Array.isArray(o) ? o.forEach(function(l) {
2674
2674
  this.append(l[0], l[1]);
2675
2675
  }, this) : o && Object.getOwnPropertyNames(o).forEach(function(l) {
@@ -2678,8 +2678,8 @@ var me = { exports: {} };
2678
2678
  }
2679
2679
  m.prototype.append = function(o, l) {
2680
2680
  o = E(o), l = T(l);
2681
- var v = this.map[o];
2682
- this.map[o] = v ? v + ", " + l : l;
2681
+ var g = this.map[o];
2682
+ this.map[o] = g ? g + ", " + l : l;
2683
2683
  }, m.prototype.delete = function(o) {
2684
2684
  delete this.map[E(o)];
2685
2685
  }, m.prototype.get = function(o) {
@@ -2689,12 +2689,12 @@ var me = { exports: {} };
2689
2689
  }, m.prototype.set = function(o, l) {
2690
2690
  this.map[E(o)] = T(l);
2691
2691
  }, m.prototype.forEach = function(o, l) {
2692
- for (var v in this.map)
2693
- this.map.hasOwnProperty(v) && o.call(l, this.map[v], v, this);
2692
+ for (var g in this.map)
2693
+ this.map.hasOwnProperty(g) && o.call(l, this.map[g], g, this);
2694
2694
  }, m.prototype.keys = function() {
2695
2695
  var o = [];
2696
- return this.forEach(function(l, v) {
2697
- o.push(v);
2696
+ return this.forEach(function(l, g) {
2697
+ o.push(g);
2698
2698
  }), A(o);
2699
2699
  }, m.prototype.values = function() {
2700
2700
  var o = [];
@@ -2703,8 +2703,8 @@ var me = { exports: {} };
2703
2703
  }), A(o);
2704
2704
  }, m.prototype.entries = function() {
2705
2705
  var o = [];
2706
- return this.forEach(function(l, v) {
2707
- o.push([v, l]);
2706
+ return this.forEach(function(l, g) {
2707
+ o.push([g, l]);
2708
2708
  }), A(o);
2709
2709
  }, u.iterable && (m.prototype[Symbol.iterator] = m.prototype.entries);
2710
2710
  function x(o) {
@@ -2713,28 +2713,28 @@ var me = { exports: {} };
2713
2713
  o.bodyUsed = !0;
2714
2714
  }
2715
2715
  function D(o) {
2716
- return new Promise(function(l, v) {
2716
+ return new Promise(function(l, g) {
2717
2717
  o.onload = function() {
2718
2718
  l(o.result);
2719
2719
  }, o.onerror = function() {
2720
- v(o.error);
2720
+ g(o.error);
2721
2721
  };
2722
2722
  });
2723
2723
  }
2724
- function S(o) {
2725
- var l = new FileReader(), v = D(l);
2726
- return l.readAsArrayBuffer(o), v;
2724
+ function C(o) {
2725
+ var l = new FileReader(), g = D(l);
2726
+ return l.readAsArrayBuffer(o), g;
2727
2727
  }
2728
- function Y(o) {
2729
- var l = new FileReader(), v = D(l);
2730
- return l.readAsText(o), v;
2728
+ function z(o) {
2729
+ var l = new FileReader(), g = D(l);
2730
+ return l.readAsText(o), g;
2731
2731
  }
2732
- function w(o) {
2733
- for (var l = new Uint8Array(o), v = new Array(l.length), _ = 0; _ < l.length; _++)
2734
- v[_] = String.fromCharCode(l[_]);
2735
- return v.join("");
2732
+ function k(o) {
2733
+ for (var l = new Uint8Array(o), g = new Array(l.length), _ = 0; _ < l.length; _++)
2734
+ g[_] = String.fromCharCode(l[_]);
2735
+ return g.join("");
2736
2736
  }
2737
- function C(o) {
2737
+ function S(o) {
2738
2738
  if (o.slice)
2739
2739
  return o.slice(0);
2740
2740
  var l = new Uint8Array(o.byteLength);
@@ -2742,7 +2742,7 @@ var me = { exports: {} };
2742
2742
  }
2743
2743
  function P() {
2744
2744
  return this.bodyUsed = !1, this._initBody = function(o) {
2745
- this._bodyInit = o, o ? typeof o == "string" ? this._bodyText = o : u.blob && Blob.prototype.isPrototypeOf(o) ? this._bodyBlob = o : u.formData && FormData.prototype.isPrototypeOf(o) ? this._bodyFormData = o : u.searchParams && URLSearchParams.prototype.isPrototypeOf(o) ? this._bodyText = o.toString() : u.arrayBuffer && u.blob && p(o) ? (this._bodyArrayBuffer = C(o.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : u.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(o) || y(o)) ? this._bodyArrayBuffer = C(o) : this._bodyText = o = Object.prototype.toString.call(o) : this._bodyText = "", this.headers.get("content-type") || (typeof o == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : u.searchParams && URLSearchParams.prototype.isPrototypeOf(o) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
2745
+ this._bodyInit = o, o ? typeof o == "string" ? this._bodyText = o : u.blob && Blob.prototype.isPrototypeOf(o) ? this._bodyBlob = o : u.formData && FormData.prototype.isPrototypeOf(o) ? this._bodyFormData = o : u.searchParams && URLSearchParams.prototype.isPrototypeOf(o) ? this._bodyText = o.toString() : u.arrayBuffer && u.blob && h(o) ? (this._bodyArrayBuffer = S(o.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : u.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(o) || y(o)) ? this._bodyArrayBuffer = S(o) : this._bodyText = o = Object.prototype.toString.call(o) : this._bodyText = "", this.headers.get("content-type") || (typeof o == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : u.searchParams && URLSearchParams.prototype.isPrototypeOf(o) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
2746
2746
  }, u.blob && (this.blob = function() {
2747
2747
  var o = x(this);
2748
2748
  if (o)
@@ -2755,61 +2755,61 @@ var me = { exports: {} };
2755
2755
  throw new Error("could not read FormData body as blob");
2756
2756
  return Promise.resolve(new Blob([this._bodyText]));
2757
2757
  }, this.arrayBuffer = function() {
2758
- return this._bodyArrayBuffer ? x(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(S);
2758
+ return this._bodyArrayBuffer ? x(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(C);
2759
2759
  }), this.text = function() {
2760
2760
  var o = x(this);
2761
2761
  if (o)
2762
2762
  return o;
2763
2763
  if (this._bodyBlob)
2764
- return Y(this._bodyBlob);
2764
+ return z(this._bodyBlob);
2765
2765
  if (this._bodyArrayBuffer)
2766
- return Promise.resolve(w(this._bodyArrayBuffer));
2766
+ return Promise.resolve(k(this._bodyArrayBuffer));
2767
2767
  if (this._bodyFormData)
2768
2768
  throw new Error("could not read FormData body as text");
2769
2769
  return Promise.resolve(this._bodyText);
2770
2770
  }, u.formData && (this.formData = function() {
2771
- return this.text().then(He);
2771
+ return this.text().then(je);
2772
2772
  }), this.json = function() {
2773
2773
  return this.text().then(JSON.parse);
2774
2774
  }, this;
2775
2775
  }
2776
- var z = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
2777
- function Q(o) {
2776
+ var Q = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
2777
+ function J(o) {
2778
2778
  var l = o.toUpperCase();
2779
- return z.indexOf(l) > -1 ? l : o;
2779
+ return Q.indexOf(l) > -1 ? l : o;
2780
2780
  }
2781
2781
  function L(o, l) {
2782
2782
  l = l || {};
2783
- var v = l.body;
2783
+ var g = l.body;
2784
2784
  if (o instanceof L) {
2785
2785
  if (o.bodyUsed)
2786
2786
  throw new TypeError("Already read");
2787
- this.url = o.url, this.credentials = o.credentials, l.headers || (this.headers = new m(o.headers)), this.method = o.method, this.mode = o.mode, this.signal = o.signal, !v && o._bodyInit != null && (v = o._bodyInit, o.bodyUsed = !0);
2787
+ this.url = o.url, this.credentials = o.credentials, l.headers || (this.headers = new m(o.headers)), this.method = o.method, this.mode = o.mode, this.signal = o.signal, !g && o._bodyInit != null && (g = o._bodyInit, o.bodyUsed = !0);
2788
2788
  } else
2789
2789
  this.url = String(o);
2790
- if (this.credentials = l.credentials || this.credentials || "same-origin", (l.headers || !this.headers) && (this.headers = new m(l.headers)), this.method = Q(l.method || this.method || "GET"), this.mode = l.mode || this.mode || null, this.signal = l.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && v)
2790
+ if (this.credentials = l.credentials || this.credentials || "same-origin", (l.headers || !this.headers) && (this.headers = new m(l.headers)), this.method = J(l.method || this.method || "GET"), this.mode = l.mode || this.mode || null, this.signal = l.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && g)
2791
2791
  throw new TypeError("Body not allowed for GET or HEAD requests");
2792
- this._initBody(v);
2792
+ this._initBody(g);
2793
2793
  }
2794
2794
  L.prototype.clone = function() {
2795
2795
  return new L(this, { body: this._bodyInit });
2796
2796
  };
2797
- function He(o) {
2797
+ function je(o) {
2798
2798
  var l = new FormData();
2799
- return o.trim().split("&").forEach(function(v) {
2800
- if (v) {
2801
- var _ = v.split("="), O = _.shift().replace(/\+/g, " "), g = _.join("=").replace(/\+/g, " ");
2802
- l.append(decodeURIComponent(O), decodeURIComponent(g));
2799
+ return o.trim().split("&").forEach(function(g) {
2800
+ if (g) {
2801
+ var _ = g.split("="), O = _.shift().replace(/\+/g, " "), N = _.join("=").replace(/\+/g, " ");
2802
+ l.append(decodeURIComponent(O), decodeURIComponent(N));
2803
2803
  }
2804
2804
  }), l;
2805
2805
  }
2806
- function Ye(o) {
2807
- var l = new m(), v = o.replace(/\r?\n[\t ]+/g, " ");
2808
- return v.split(/\r?\n/).forEach(function(_) {
2809
- var O = _.split(":"), g = O.shift().trim();
2810
- if (g) {
2811
- var J = O.join(":").trim();
2812
- l.append(g, J);
2806
+ function $e(o) {
2807
+ var l = new m(), g = o.replace(/\r?\n[\t ]+/g, " ");
2808
+ return g.split(/\r?\n/).forEach(function(_) {
2809
+ var O = _.split(":"), N = O.shift().trim();
2810
+ if (N) {
2811
+ var X = O.join(":").trim();
2812
+ l.append(N, X);
2813
2813
  }
2814
2814
  }), l;
2815
2815
  }
@@ -2828,50 +2828,50 @@ var me = { exports: {} };
2828
2828
  var o = new R(null, { status: 0, statusText: "" });
2829
2829
  return o.type = "error", o;
2830
2830
  };
2831
- var ze = [301, 302, 303, 307, 308];
2831
+ var Ge = [301, 302, 303, 307, 308];
2832
2832
  R.redirect = function(o, l) {
2833
- if (ze.indexOf(l) === -1)
2833
+ if (Ge.indexOf(l) === -1)
2834
2834
  throw new RangeError("Invalid status code");
2835
2835
  return new R(null, { status: l, headers: { location: o } });
2836
2836
  }, c.DOMException = s.DOMException;
2837
2837
  try {
2838
2838
  new c.DOMException();
2839
2839
  } catch {
2840
- c.DOMException = function(l, v) {
2841
- this.message = l, this.name = v;
2840
+ c.DOMException = function(l, g) {
2841
+ this.message = l, this.name = g;
2842
2842
  var _ = Error(l);
2843
2843
  this.stack = _.stack;
2844
2844
  }, c.DOMException.prototype = Object.create(Error.prototype), c.DOMException.prototype.constructor = c.DOMException;
2845
2845
  }
2846
2846
  function ae(o, l) {
2847
- return new Promise(function(v, _) {
2847
+ return new Promise(function(g, _) {
2848
2848
  var O = new L(o, l);
2849
2849
  if (O.signal && O.signal.aborted)
2850
2850
  return _(new c.DOMException("Aborted", "AbortError"));
2851
- var g = new XMLHttpRequest();
2852
- function J() {
2853
- g.abort();
2851
+ var N = new XMLHttpRequest();
2852
+ function X() {
2853
+ N.abort();
2854
2854
  }
2855
- g.onload = function() {
2856
- var q = {
2857
- status: g.status,
2858
- statusText: g.statusText,
2859
- headers: Ye(g.getAllResponseHeaders() || "")
2855
+ N.onload = function() {
2856
+ var j = {
2857
+ status: N.status,
2858
+ statusText: N.statusText,
2859
+ headers: $e(N.getAllResponseHeaders() || "")
2860
2860
  };
2861
- q.url = "responseURL" in g ? g.responseURL : q.headers.get("X-Request-URL");
2862
- var ce = "response" in g ? g.response : g.responseText;
2863
- v(new R(ce, q));
2864
- }, g.onerror = function() {
2861
+ j.url = "responseURL" in N ? N.responseURL : j.headers.get("X-Request-URL");
2862
+ var ce = "response" in N ? N.response : N.responseText;
2863
+ g(new R(ce, j));
2864
+ }, N.onerror = function() {
2865
2865
  _(new TypeError("Network request failed"));
2866
- }, g.ontimeout = function() {
2866
+ }, N.ontimeout = function() {
2867
2867
  _(new TypeError("Network request failed"));
2868
- }, g.onabort = function() {
2868
+ }, N.onabort = function() {
2869
2869
  _(new c.DOMException("Aborted", "AbortError"));
2870
- }, g.open(O.method, O.url, !0), O.credentials === "include" ? g.withCredentials = !0 : O.credentials === "omit" && (g.withCredentials = !1), "responseType" in g && u.blob && (g.responseType = "blob"), O.headers.forEach(function(q, ce) {
2871
- g.setRequestHeader(ce, q);
2872
- }), O.signal && (O.signal.addEventListener("abort", J), g.onreadystatechange = function() {
2873
- g.readyState === 4 && O.signal.removeEventListener("abort", J);
2874
- }), g.send(typeof O._bodyInit > "u" ? null : O._bodyInit);
2870
+ }, N.open(O.method, O.url, !0), O.credentials === "include" ? N.withCredentials = !0 : O.credentials === "omit" && (N.withCredentials = !1), "responseType" in N && u.blob && (N.responseType = "blob"), O.headers.forEach(function(j, ce) {
2871
+ N.setRequestHeader(ce, j);
2872
+ }), O.signal && (O.signal.addEventListener("abort", X), N.onreadystatechange = function() {
2873
+ N.readyState === 4 && O.signal.removeEventListener("abort", X);
2874
+ }), N.send(typeof O._bodyInit > "u" ? null : O._bodyInit);
2875
2875
  });
2876
2876
  }
2877
2877
  return ae.polyfill = !0, s.fetch || (s.fetch = ae, s.Headers = m, s.Request = L, s.Response = R), c.Headers = m, c.Request = L, c.Response = R, c.fetch = ae, Object.defineProperty(c, "__esModule", { value: !0 }), c;
@@ -2880,16 +2880,16 @@ var me = { exports: {} };
2880
2880
  var i = r;
2881
2881
  t = i.fetch, t.default = i.fetch, t.fetch = i.fetch, t.Headers = i.Headers, t.Request = i.Request, t.Response = i.Response, e.exports = t;
2882
2882
  })(me, me.exports);
2883
- var te = me.exports;
2884
- const K = /* @__PURE__ */ Gt(te), Ht = /* @__PURE__ */ Xe({
2883
+ var ne = me.exports;
2884
+ const ee = /* @__PURE__ */ Vt(ne), jt = /* @__PURE__ */ ze({
2885
2885
  __proto__: null,
2886
- default: K
2887
- }, [te]), B = (e) => {
2886
+ default: ee
2887
+ }, [ne]), B = (e) => {
2888
2888
  let t = {};
2889
- return e && (typeof Headers < "u" && e instanceof Headers || Ht && te.Headers && e instanceof te.Headers ? t = Ze(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
2889
+ return e && (typeof Headers < "u" && e instanceof Headers || jt && ne.Headers && e instanceof ne.Headers ? t = Je(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
2890
2890
  n && r !== void 0 && (t[n] = r);
2891
2891
  }) : t = e), t;
2892
- }, De = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), Yt = (e) => {
2892
+ }, De = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), $t = (e) => {
2893
2893
  if (!Array.isArray(e.query)) {
2894
2894
  const r = e, i = [`query=${encodeURIComponent(De(r.query))}`];
2895
2895
  return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.join("&");
@@ -2901,10 +2901,10 @@ const K = /* @__PURE__ */ Gt(te), Ht = /* @__PURE__ */ Xe({
2901
2901
  variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0
2902
2902
  }), r), []);
2903
2903
  return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
2904
- }, zt = (e) => async (t) => {
2905
- const { url: n, query: r, variables: i, operationName: s, fetch: c, fetchOptions: u, middleware: p } = t, d = { ...t.headers };
2904
+ }, Gt = (e) => async (t) => {
2905
+ const { url: n, query: r, variables: i, operationName: s, fetch: c, fetchOptions: u, middleware: h } = t, d = { ...t.headers };
2906
2906
  let y = "", E;
2907
- e === "POST" ? (E = Jt(r, i, s, u.jsonSerializer), typeof E == "string" && (d["Content-Type"] = "application/json")) : y = Yt({
2907
+ e === "POST" ? (E = Yt(r, i, s, u.jsonSerializer), typeof E == "string" && (d["Content-Type"] = "application/json")) : y = $t({
2908
2908
  query: r,
2909
2909
  variables: i,
2910
2910
  operationName: s,
@@ -2917,16 +2917,16 @@ const K = /* @__PURE__ */ Gt(te), Ht = /* @__PURE__ */ Xe({
2917
2917
  ...u
2918
2918
  };
2919
2919
  let A = n, m = T;
2920
- if (p) {
2921
- const x = await Promise.resolve(p({ ...T, url: n, operationName: s, variables: i })), { url: D, ...S } = x;
2922
- A = D, m = S;
2920
+ if (h) {
2921
+ const x = await Promise.resolve(h({ ...T, url: n, operationName: s, variables: i })), { url: D, ...C } = x;
2922
+ A = D, m = C;
2923
2923
  }
2924
2924
  return y && (A = `${A}?${y}`), await c(A, m);
2925
2925
  };
2926
- class Qt {
2926
+ class Ht {
2927
2927
  constructor(t, n = {}) {
2928
2928
  this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => {
2929
- const [i, s, c] = r, u = et(i, s, c), { headers: p, fetch: d = K, method: y = "POST", requestMiddleware: E, responseMiddleware: T, ...A } = this.requestConfig, { url: m } = this;
2929
+ const [i, s, c] = r, u = We(i, s, c), { headers: h, fetch: d = ee, method: y = "POST", requestMiddleware: E, responseMiddleware: T, ...A } = this.requestConfig, { url: m } = this;
2930
2930
  u.signal !== void 0 && (A.signal = u.signal);
2931
2931
  const { operationName: x } = le(u.query);
2932
2932
  return he({
@@ -2934,7 +2934,7 @@ class Qt {
2934
2934
  query: u.query,
2935
2935
  variables: u.variables,
2936
2936
  headers: {
2937
- ...B(pe(p)),
2937
+ ...B(pe(h)),
2938
2938
  ...B(u.requestHeaders)
2939
2939
  },
2940
2940
  operationName: x,
@@ -2948,7 +2948,7 @@ class Qt {
2948
2948
  };
2949
2949
  }
2950
2950
  async request(t, ...n) {
2951
- const [r, i] = n, s = Ke(t, r, i), { headers: c, fetch: u = K, method: p = "POST", requestMiddleware: d, responseMiddleware: y, ...E } = this.requestConfig, { url: T } = this;
2951
+ const [r, i] = n, s = Xe(t, r, i), { headers: c, fetch: u = ee, method: h = "POST", requestMiddleware: d, responseMiddleware: y, ...E } = this.requestConfig, { url: T } = this;
2952
2952
  s.signal !== void 0 && (E.signal = s.signal);
2953
2953
  const { query: A, operationName: m } = le(s.document);
2954
2954
  return he({
@@ -2961,7 +2961,7 @@ class Qt {
2961
2961
  },
2962
2962
  operationName: m,
2963
2963
  fetch: u,
2964
- method: p,
2964
+ method: h,
2965
2965
  fetchOptions: E,
2966
2966
  middleware: d
2967
2967
  }).then((x) => (y && y(x), x.data)).catch((x) => {
@@ -2970,9 +2970,9 @@ class Qt {
2970
2970
  }
2971
2971
  // prettier-ignore
2972
2972
  batchRequests(t, n) {
2973
- const r = tt(t, n), { headers: i, ...s } = this.requestConfig;
2973
+ const r = Ze(t, n), { headers: i, ...s } = this.requestConfig;
2974
2974
  r.signal !== void 0 && (s.signal = r.signal);
2975
- const c = r.documents.map(({ document: p }) => le(p).query), u = r.documents.map(({ variables: p }) => p);
2975
+ const c = r.documents.map(({ document: h }) => le(h).query), u = r.documents.map(({ variables: h }) => h);
2976
2976
  return he({
2977
2977
  url: this.url,
2978
2978
  query: c,
@@ -2983,12 +2983,12 @@ class Qt {
2983
2983
  ...B(r.requestHeaders)
2984
2984
  },
2985
2985
  operationName: void 0,
2986
- fetch: this.requestConfig.fetch ?? K,
2986
+ fetch: this.requestConfig.fetch ?? ee,
2987
2987
  method: this.requestConfig.method || "POST",
2988
2988
  fetchOptions: s,
2989
2989
  middleware: this.requestConfig.requestMiddleware
2990
- }).then((p) => (this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(p), p.data)).catch((p) => {
2991
- throw this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(p), p;
2990
+ }).then((h) => (this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(h), h.data)).catch((h) => {
2991
+ throw this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(h), h;
2992
2992
  });
2993
2993
  }
2994
2994
  setHeaders(t) {
@@ -3009,8 +3009,8 @@ class Qt {
3009
3009
  }
3010
3010
  }
3011
3011
  const he = async (e) => {
3012
- const { query: t, variables: n, fetchOptions: r } = e, i = zt(We(e.method ?? "post")), s = Array.isArray(e.query), c = await i(e), u = await Xt(c, r.jsonSerializer ?? Te), p = Array.isArray(u) ? !u.some(({ data: y }) => !y) : !!u.data, d = Array.isArray(u) || !u.errors || Array.isArray(u.errors) && !u.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
3013
- if (c.ok && d && p) {
3012
+ const { query: t, variables: n, fetchOptions: r } = e, i = Gt(Qe(e.method ?? "post")), s = Array.isArray(e.query), c = await i(e), u = await zt(c, r.jsonSerializer ?? Te), h = Array.isArray(u) ? !u.some(({ data: y }) => !y) : !!u.data, d = Array.isArray(u) || !u.errors || Array.isArray(u.errors) && !u.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
3013
+ if (c.ok && d && h) {
3014
3014
  const { errors: y, ...E } = (Array.isArray(u), u), T = r.errorPolicy === "ignore" ? E : u;
3015
3015
  return {
3016
3016
  ...s ? { data: T } : T,
@@ -3021,56 +3021,56 @@ const he = async (e) => {
3021
3021
  const y = typeof u == "string" ? {
3022
3022
  error: u
3023
3023
  } : u;
3024
- throw new G(
3024
+ throw new H(
3025
3025
  // @ts-expect-error TODO
3026
3026
  { ...y, status: c.status, headers: c.headers },
3027
3027
  { query: t, variables: n }
3028
3028
  );
3029
3029
  }
3030
- }, Jt = (e, t, n, r) => {
3030
+ }, Yt = (e, t, n, r) => {
3031
3031
  const i = r ?? Te;
3032
3032
  if (!Array.isArray(e))
3033
3033
  return i.stringify({ query: e, variables: t, operationName: n });
3034
3034
  if (typeof t < "u" && !Array.isArray(t))
3035
3035
  throw new Error("Cannot create request body with given variable type, array expected");
3036
- const s = e.reduce((c, u, p) => (c.push({ query: u, variables: t ? t[p] : void 0 }), c), []);
3036
+ const s = e.reduce((c, u, h) => (c.push({ query: u, variables: t ? t[h] : void 0 }), c), []);
3037
3037
  return i.stringify(s);
3038
- }, Xt = async (e, t) => {
3038
+ }, zt = async (e, t) => {
3039
3039
  let n;
3040
3040
  return e.headers.forEach((r, i) => {
3041
3041
  i.toLowerCase() === "content-type" && (n = r);
3042
3042
  }), n && (n.toLowerCase().startsWith("application/json") || n.toLowerCase().startsWith("application/graphql+json") || n.toLowerCase().startsWith("application/graphql-response+json")) ? t.parse(await e.text()) : e.text();
3043
3043
  }, pe = (e) => typeof e == "function" ? e() : e;
3044
- var ne = function() {
3045
- return ne = Object.assign || function(t) {
3044
+ var ie = function() {
3045
+ return ie = Object.assign || function(t) {
3046
3046
  for (var n, r = 1, i = arguments.length; r < i; r++) {
3047
3047
  n = arguments[r];
3048
3048
  for (var s in n)
3049
3049
  Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
3050
3050
  }
3051
3051
  return t;
3052
- }, ne.apply(this, arguments);
3052
+ }, ie.apply(this, arguments);
3053
3053
  };
3054
- var ee = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Map(), $e = !0, ie = !1;
3055
- function Ge(e) {
3054
+ var te = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Map(), qe = !0, re = !1;
3055
+ function Ve(e) {
3056
3056
  return e.replace(/[\s,]+/g, " ").trim();
3057
3057
  }
3058
- function Wt(e) {
3059
- return Ge(e.source.body.substring(e.start, e.end));
3058
+ function Qt(e) {
3059
+ return Ve(e.source.body.substring(e.start, e.end));
3060
3060
  }
3061
- function Zt(e) {
3061
+ function Jt(e) {
3062
3062
  var t = /* @__PURE__ */ new Set(), n = [];
3063
3063
  return e.definitions.forEach(function(r) {
3064
3064
  if (r.kind === "FragmentDefinition") {
3065
- var i = r.name.value, s = Wt(r.loc), c = Ee.get(i);
3066
- c && !c.has(s) ? $e && console.warn("Warning: fragment with name " + i + ` already exists.
3065
+ var i = r.name.value, s = Qt(r.loc), c = Ee.get(i);
3066
+ c && !c.has(s) ? qe && console.warn("Warning: fragment with name " + i + ` already exists.
3067
3067
  graphql-tag enforces all fragment names across your application to be unique; read more about
3068
3068
  this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : c || Ee.set(i, c = /* @__PURE__ */ new Set()), c.add(s), t.has(s) || (t.add(s), n.push(r));
3069
3069
  } else
3070
3070
  n.push(r);
3071
- }), ne(ne({}, e), { definitions: n });
3071
+ }), ie(ie({}, e), { definitions: n });
3072
3072
  }
3073
- function Kt(e) {
3073
+ function Xt(e) {
3074
3074
  var t = new Set(e.definitions);
3075
3075
  t.forEach(function(r) {
3076
3076
  r.loc && delete r.loc, Object.keys(r).forEach(function(i) {
@@ -3081,18 +3081,18 @@ function Kt(e) {
3081
3081
  var n = e.loc;
3082
3082
  return n && (delete n.startToken, delete n.endToken), e;
3083
3083
  }
3084
- function en(e) {
3085
- var t = Ge(e);
3086
- if (!ee.has(t)) {
3087
- var n = qe(e, {
3088
- experimentalFragmentVariables: ie,
3089
- allowLegacyFragmentVariables: ie
3084
+ function Wt(e) {
3085
+ var t = Ve(e);
3086
+ if (!te.has(t)) {
3087
+ var n = Me(e, {
3088
+ experimentalFragmentVariables: re,
3089
+ allowLegacyFragmentVariables: re
3090
3090
  });
3091
3091
  if (!n || n.kind !== "Document")
3092
3092
  throw new Error("Not a valid GraphQL document.");
3093
- ee.set(t, Kt(Zt(n)));
3093
+ te.set(t, Xt(Jt(n)));
3094
3094
  }
3095
- return ee.get(t);
3095
+ return te.get(t);
3096
3096
  }
3097
3097
  function U(e) {
3098
3098
  for (var t = [], n = 1; n < arguments.length; n++)
@@ -3101,45 +3101,32 @@ function U(e) {
3101
3101
  var r = e[0];
3102
3102
  return t.forEach(function(i, s) {
3103
3103
  i && i.kind === "Document" ? r += i.loc.source.body : r += i, r += e[s + 1];
3104
- }), en(r);
3104
+ }), Wt(r);
3105
3105
  }
3106
- function tn() {
3107
- ee.clear(), Ee.clear();
3106
+ function Zt() {
3107
+ te.clear(), Ee.clear();
3108
3108
  }
3109
- function nn() {
3110
- $e = !1;
3109
+ function Kt() {
3110
+ qe = !1;
3111
3111
  }
3112
- function rn() {
3113
- ie = !0;
3112
+ function en() {
3113
+ re = !0;
3114
3114
  }
3115
- function sn() {
3116
- ie = !1;
3115
+ function tn() {
3116
+ re = !1;
3117
3117
  }
3118
- var j = {
3118
+ var $ = {
3119
3119
  gql: U,
3120
- resetCaches: tn,
3121
- disableFragmentWarnings: nn,
3122
- enableExperimentalFragmentVariables: rn,
3123
- disableExperimentalFragmentVariables: sn
3120
+ resetCaches: Zt,
3121
+ disableFragmentWarnings: Kt,
3122
+ enableExperimentalFragmentVariables: en,
3123
+ disableExperimentalFragmentVariables: tn
3124
3124
  };
3125
3125
  (function(e) {
3126
- e.gql = j.gql, e.resetCaches = j.resetCaches, e.disableFragmentWarnings = j.disableFragmentWarnings, e.enableExperimentalFragmentVariables = j.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = j.disableExperimentalFragmentVariables;
3126
+ e.gql = $.gql, e.resetCaches = $.resetCaches, e.disableFragmentWarnings = $.disableFragmentWarnings, e.enableExperimentalFragmentVariables = $.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = $.disableExperimentalFragmentVariables;
3127
3127
  })(U || (U = {}));
3128
3128
  U.default = U;
3129
- const oe = U;
3130
- var Se;
3131
- (function(e) {
3132
- e.CreatedAt = "CREATED_AT";
3133
- })(Se || (Se = {}));
3134
- var Ce;
3135
- (function(e) {
3136
- e.CreatedAt = "CREATED_AT";
3137
- })(Ce || (Ce = {}));
3138
- var ke;
3139
- (function(e) {
3140
- e.Invalid = "INVALID", e.Public = "PUBLIC", e.TenantUser = "TENANT_USER";
3141
- })(ke || (ke = {}));
3142
- const on = oe`
3129
+ const V = U, nn = V`
3143
3130
  query GetLocationAvailabilities($sku: String!, $first: Int, $after: String, $isReverse: Boolean! = false) {
3144
3131
  locationAvailabilities(
3145
3132
  sku: $sku
@@ -3162,7 +3149,7 @@ const on = oe`
3162
3149
  }
3163
3150
  }
3164
3151
  }
3165
- `, an = oe`
3152
+ `, rn = V`
3166
3153
  query GetLocationAvailability($sku: String!, $locationID: ID!) {
3167
3154
  locationAvailability(sku: $sku, locationID: $locationID) {
3168
3155
  location {
@@ -3172,7 +3159,7 @@ const on = oe`
3172
3159
  inventoryQuantity
3173
3160
  }
3174
3161
  }
3175
- `, cn = oe`
3162
+ `, sn = V`
3176
3163
  query GetPurchasingCustomerMetafield($namespace: String!, $key: String!) {
3177
3164
  purchasingCustomerMetafield(namespace: $namespace, key: $key) {
3178
3165
  id
@@ -3181,34 +3168,77 @@ const on = oe`
3181
3168
  value
3182
3169
  }
3183
3170
  }
3184
- `, un = oe`
3171
+ `, on = V`
3185
3172
  query GetPoints {
3186
3173
  purchasingCustomer {
3187
3174
  pointsApproved
3188
3175
  pointsPending
3189
3176
  }
3190
3177
  }
3191
- `, ln = (e, t, n, r) => e();
3192
- function hn(e, t = ln) {
3178
+ `, an = V`
3179
+ query GetLocations($first: Int, $after: String, $isReverse: Boolean! = false) {
3180
+ locations(first: $first, after: $after, isReverse: $isReverse) {
3181
+ nodes {
3182
+ id
3183
+ name
3184
+ }
3185
+ pageInfo {
3186
+ startCursor
3187
+ endCursor
3188
+ hasNextPage
3189
+ hasPreviousPage
3190
+ }
3191
+ }
3192
+ }
3193
+ `, cn = V`
3194
+ query GetPurchasingCustomerDiscounts($first: Int, $after: String, $isReverse: Boolean! = false) {
3195
+ purchasingCustomer {
3196
+ id
3197
+ discounts(first: $first, after: $after, isReverse: $isReverse) {
3198
+ nodes {
3199
+ id
3200
+ title
3201
+ description
3202
+ code
3203
+ createdAt
3204
+ updatedAt
3205
+ }
3206
+ pageInfo {
3207
+ startCursor
3208
+ endCursor
3209
+ hasNextPage
3210
+ hasPreviousPage
3211
+ }
3212
+ }
3213
+ }
3214
+ }
3215
+ `, un = (e, t, n, r) => e();
3216
+ function ln(e, t = un) {
3193
3217
  return {
3194
3218
  GetLocationAvailabilities(n, r) {
3195
- return t((i) => e.request(on, n, { ...r, ...i }), "GetLocationAvailabilities", "query", n);
3219
+ return t((i) => e.request(nn, n, { ...r, ...i }), "GetLocationAvailabilities", "query", n);
3196
3220
  },
3197
3221
  GetLocationAvailability(n, r) {
3198
- return t((i) => e.request(an, n, { ...r, ...i }), "GetLocationAvailability", "query", n);
3222
+ return t((i) => e.request(rn, n, { ...r, ...i }), "GetLocationAvailability", "query", n);
3199
3223
  },
3200
3224
  GetPurchasingCustomerMetafield(n, r) {
3201
- return t((i) => e.request(cn, n, { ...r, ...i }), "GetPurchasingCustomerMetafield", "query", n);
3225
+ return t((i) => e.request(sn, n, { ...r, ...i }), "GetPurchasingCustomerMetafield", "query", n);
3202
3226
  },
3203
3227
  GetPoints(n, r) {
3204
- return t((i) => e.request(un, n, { ...r, ...i }), "GetPoints", "query", n);
3228
+ return t((i) => e.request(on, n, { ...r, ...i }), "GetPoints", "query", n);
3229
+ },
3230
+ GetLocations(n, r) {
3231
+ return t((i) => e.request(an, n, { ...r, ...i }), "GetLocations", "query", n);
3232
+ },
3233
+ GetPurchasingCustomerDiscounts(n, r) {
3234
+ return t((i) => e.request(cn, n, { ...r, ...i }), "GetPurchasingCustomerDiscounts", "query", n);
3205
3235
  }
3206
3236
  };
3207
3237
  }
3208
- class dn {
3238
+ class pn {
3209
3239
  constructor(t) {
3210
- ge(this, "api");
3211
- this.api = hn(new Qt(`${t}/apps/sq-api`, {
3240
+ Ne(this, "api");
3241
+ this.api = ln(new Ht(`${t}/apps/sq-api`, {
3212
3242
  headers: {
3213
3243
  "X-SQ-CLIENT": "ShopifyAppProxy"
3214
3244
  }
@@ -3219,7 +3249,7 @@ class dn {
3219
3249
  *
3220
3250
  * @param {string} sku 在庫一覧を取得したい商品のSKU。
3221
3251
  * @param {number} [first] 取得してくる個数。デフォルトは250。
3222
- * @param {string} [before] ページングの値。指定しない場合先頭から取得してくる。
3252
+ * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
3223
3253
  * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
3224
3254
  */
3225
3255
  async getLocationAvailabilities(t, n, r, i) {
@@ -3269,7 +3299,47 @@ class dn {
3269
3299
  pointsPending: t.purchasingCustomer.pointsPending
3270
3300
  } : null;
3271
3301
  }
3302
+ /**
3303
+ * getLocations は ShopifyIntegration に紐づく LocationGroup の Location の一覧を取得します。
3304
+ *
3305
+ * @param {number} [first] 取得してくる個数。デフォルトは250。
3306
+ * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
3307
+ * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
3308
+ */
3309
+ async getLocations(t, n, r) {
3310
+ const i = await this.api.GetLocations({ first: t, after: n, isReverse: r });
3311
+ return {
3312
+ nodes: i.locations.nodes.map((s) => ({
3313
+ id: s.id,
3314
+ name: s.name
3315
+ })) ?? [],
3316
+ pageInfo: i.locations.pageInfo ?? null
3317
+ };
3318
+ }
3319
+ /**
3320
+ * getPurchasingCustomerDiscounts は購入者の割引情報を返します。
3321
+ *
3322
+ * @param {number} [first] 取得してくる個数。デフォルトは250。
3323
+ * @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
3324
+ * @param {boolean} [isReverse] 並び順。デフォルトはfalse。
3325
+ */
3326
+ async getPurchasingCustomerDiscounts(t, n, r) {
3327
+ var s, c, u;
3328
+ const i = await this.api.GetPurchasingCustomerDiscounts({ first: t, after: n, isReverse: r });
3329
+ return {
3330
+ id: ((s = i.purchasingCustomer) == null ? void 0 : s.id) ?? "",
3331
+ nodes: ((c = i.purchasingCustomer) == null ? void 0 : c.discounts.nodes.map((h) => ({
3332
+ id: h.id,
3333
+ title: h.title,
3334
+ description: h.description,
3335
+ code: h.code,
3336
+ createdAt: new Date(h.createdAt),
3337
+ updatedAt: new Date(h.updatedAt)
3338
+ }))) ?? [],
3339
+ pageInfo: ((u = i.purchasingCustomer) == null ? void 0 : u.discounts.pageInfo) ?? null
3340
+ };
3341
+ }
3272
3342
  }
3273
3343
  export {
3274
- dn as SDK
3344
+ pn as SDK
3275
3345
  };