@builtbystack/sq-shopify-theme-sdk 0.0.4 → 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.
- package/dist/sq-shopify-theme-sdk.js +402 -372
- package/dist/sq-shopify-theme-sdk.umd.js +72 -35
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Ne = (e, t, n) => (
|
|
4
|
-
function
|
|
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,
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
35
|
+
}, Ze = (e, t) => e.documents ? e : {
|
|
36
36
|
documents: e,
|
|
37
37
|
requestHeaders: t,
|
|
38
38
|
signal: void 0
|
|
39
39
|
};
|
|
40
|
-
function
|
|
40
|
+
function Z(e, t) {
|
|
41
41
|
if (!!!e)
|
|
42
42
|
throw new Error(t);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Ke(e) {
|
|
45
45
|
return typeof e == "object" && e !== null;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
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
|
|
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(
|
|
57
|
-
if (typeof i.index == "number" ||
|
|
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,13 +63,13 @@ function de(e, t) {
|
|
|
63
63
|
column: t + 1 - n
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return
|
|
66
|
+
function nt(e) {
|
|
67
|
+
return Ce(
|
|
68
68
|
e.source,
|
|
69
69
|
de(e.source, e.start)
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Ce(e, t) {
|
|
73
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) {
|
|
@@ -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
|
|
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
|
|
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,7 +148,7 @@ class ve extends Error {
|
|
|
148
148
|
*/
|
|
149
149
|
constructor(t, ...n) {
|
|
150
150
|
var r, i, s;
|
|
151
|
-
const { nodes: c, source: u, positions: h, path: d, originalError: y, extensions: E } =
|
|
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
|
);
|
|
@@ -156,7 +156,7 @@ class ve extends Error {
|
|
|
156
156
|
(r = this.nodes) === null || r === void 0 ? void 0 : r.map((m) => m.loc).filter((m) => m != null)
|
|
157
157
|
);
|
|
158
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 =
|
|
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,
|
|
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
|
-
` +
|
|
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
|
-
` +
|
|
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
|
|
220
|
-
return new
|
|
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
|
|
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
|
|
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
|
|
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
|
-
},
|
|
371
|
-
function
|
|
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" &&
|
|
373
|
+
return typeof t == "string" && st.has(t);
|
|
374
374
|
}
|
|
375
375
|
var M;
|
|
376
376
|
(function(e) {
|
|
@@ -387,25 +387,25 @@ var f;
|
|
|
387
387
|
function ye(e) {
|
|
388
388
|
return e === 9 || e === 32;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function Y(e) {
|
|
391
391
|
return e >= 48 && e <= 57;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function ke(e) {
|
|
394
394
|
return e >= 97 && e <= 122 || // A-Z
|
|
395
395
|
e >= 65 && e <= 90;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
398
|
-
return
|
|
397
|
+
function Re(e) {
|
|
398
|
+
return ke(e) || e === 95;
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
return
|
|
400
|
+
function ot(e) {
|
|
401
|
+
return ke(e) || Y(e) || e === 95;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
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], h =
|
|
408
|
+
const u = e[c], h = ct(u);
|
|
409
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(
|
|
@@ -413,13 +413,13 @@ function lt(e) {
|
|
|
413
413
|
i + 1
|
|
414
414
|
);
|
|
415
415
|
}
|
|
416
|
-
function
|
|
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
|
|
422
|
+
function ut(e, t) {
|
|
423
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 = "";
|
|
@@ -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
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
482
|
+
function q(e) {
|
|
483
483
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
485
|
+
function se(e, t) {
|
|
486
|
+
return Le(e.charCodeAt(t)) && Fe(e.charCodeAt(t + 1));
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Le(e) {
|
|
489
489
|
return e >= 55296 && e <= 56319;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
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
|
|
504
|
+
function I(e, t, n, r, i) {
|
|
505
505
|
const s = e.line, c = 1 + n - e.lineStart;
|
|
506
|
-
return new
|
|
506
|
+
return new Se(t, n, r, s, c, i);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
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
|
|
527
|
+
return dt(e, i);
|
|
528
528
|
case 33:
|
|
529
|
-
return
|
|
529
|
+
return I(e, a.BANG, i, i + 1);
|
|
530
530
|
case 36:
|
|
531
|
-
return
|
|
531
|
+
return I(e, a.DOLLAR, i, i + 1);
|
|
532
532
|
case 38:
|
|
533
|
-
return
|
|
533
|
+
return I(e, a.AMP, i, i + 1);
|
|
534
534
|
case 40:
|
|
535
|
-
return
|
|
535
|
+
return I(e, a.PAREN_L, i, i + 1);
|
|
536
536
|
case 41:
|
|
537
|
-
return
|
|
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
|
|
540
|
+
return I(e, a.SPREAD, i, i + 3);
|
|
541
541
|
break;
|
|
542
542
|
case 58:
|
|
543
|
-
return
|
|
543
|
+
return I(e, a.COLON, i, i + 1);
|
|
544
544
|
case 61:
|
|
545
|
-
return
|
|
545
|
+
return I(e, a.EQUALS, i, i + 1);
|
|
546
546
|
case 64:
|
|
547
|
-
return
|
|
547
|
+
return I(e, a.AT, i, i + 1);
|
|
548
548
|
case 91:
|
|
549
|
-
return
|
|
549
|
+
return I(e, a.BRACKET_L, i, i + 1);
|
|
550
550
|
case 93:
|
|
551
|
-
return
|
|
551
|
+
return I(e, a.BRACKET_R, i, i + 1);
|
|
552
552
|
case 123:
|
|
553
|
-
return
|
|
553
|
+
return I(e, a.BRACE_L, i, i + 1);
|
|
554
554
|
case 124:
|
|
555
|
-
return
|
|
555
|
+
return I(e, a.PIPE, i, i + 1);
|
|
556
556
|
case 125:
|
|
557
|
-
return
|
|
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 ?
|
|
559
|
+
return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? gt(e, i) : yt(e, i);
|
|
560
560
|
}
|
|
561
|
-
if (
|
|
562
|
-
return
|
|
563
|
-
if (
|
|
564
|
-
return
|
|
565
|
-
throw
|
|
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 (")?` :
|
|
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
|
|
571
|
+
return I(e, a.EOF, r, r);
|
|
572
572
|
}
|
|
573
|
-
function
|
|
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 (
|
|
580
|
+
if (q(s))
|
|
581
581
|
++i;
|
|
582
|
-
else if (
|
|
582
|
+
else if (se(n, i))
|
|
583
583
|
i += 2;
|
|
584
584
|
else
|
|
585
585
|
break;
|
|
586
586
|
}
|
|
587
|
-
return
|
|
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
|
|
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),
|
|
600
|
-
throw
|
|
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 ||
|
|
611
|
-
throw
|
|
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
|
|
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 (!
|
|
629
|
-
throw
|
|
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 (;
|
|
639
|
+
for (; Y(r.charCodeAt(i)); )
|
|
640
640
|
++i;
|
|
641
641
|
return i;
|
|
642
642
|
}
|
|
643
|
-
function
|
|
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),
|
|
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 h = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ?
|
|
652
|
+
const h = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? mt(e, i) : Et(e, i) : Tt(e, i);
|
|
653
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 (
|
|
658
|
+
if (q(u))
|
|
659
659
|
++i;
|
|
660
|
-
else if (
|
|
660
|
+
else if (se(n, i))
|
|
661
661
|
i += 2;
|
|
662
662
|
else
|
|
663
|
-
throw
|
|
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
|
|
672
|
+
throw b(e.source, i, "Unterminated string.");
|
|
673
673
|
}
|
|
674
|
-
function
|
|
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 || !
|
|
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 |
|
|
687
|
+
if (r = r << 4 | G(s), r < 0)
|
|
688
688
|
break;
|
|
689
689
|
}
|
|
690
|
-
throw
|
|
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
|
|
700
|
-
const n = e.source.body, r =
|
|
701
|
-
if (
|
|
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 (
|
|
707
|
-
const i =
|
|
708
|
-
if (
|
|
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
|
|
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
|
|
721
|
-
return
|
|
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
|
|
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
|
|
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 Nt(e, t) {
|
|
|
768
768
|
size: 2
|
|
769
769
|
};
|
|
770
770
|
}
|
|
771
|
-
throw
|
|
771
|
+
throw b(
|
|
772
772
|
e.source,
|
|
773
773
|
t,
|
|
774
774
|
`Invalid character escape sequence: "${n.slice(
|
|
@@ -777,7 +777,7 @@ function Nt(e, t) {
|
|
|
777
777
|
)}".`
|
|
778
778
|
);
|
|
779
779
|
}
|
|
780
|
-
function
|
|
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
783
|
const h = [];
|
|
@@ -785,13 +785,13 @@ function At(e, t) {
|
|
|
785
785
|
const d = n.charCodeAt(s);
|
|
786
786
|
if (d === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
|
|
787
787
|
u += n.slice(c, s), h.push(u);
|
|
788
|
-
const y =
|
|
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
|
-
|
|
794
|
+
at(h).join(`
|
|
795
795
|
`)
|
|
796
796
|
);
|
|
797
797
|
return e.line += h.length - 1, e.lineStart = i, y;
|
|
@@ -804,12 +804,12 @@ function At(e, t) {
|
|
|
804
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 (
|
|
807
|
+
if (q(d))
|
|
808
808
|
++s;
|
|
809
|
-
else if (
|
|
809
|
+
else if (se(n, s))
|
|
810
810
|
s += 2;
|
|
811
811
|
else
|
|
812
|
-
throw
|
|
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
|
|
821
|
+
throw b(e.source, s, "Unterminated string.");
|
|
822
822
|
}
|
|
823
|
-
function
|
|
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 (
|
|
828
|
+
if (ot(s))
|
|
829
829
|
++i;
|
|
830
830
|
else
|
|
831
831
|
break;
|
|
832
832
|
}
|
|
833
|
-
return
|
|
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
|
|
842
|
-
function
|
|
843
|
-
return
|
|
841
|
+
const Nt = 10, Pe = 2;
|
|
842
|
+
function ve(e) {
|
|
843
|
+
return oe(e, []);
|
|
844
844
|
}
|
|
845
|
-
function
|
|
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
|
|
852
|
+
return At(e, t);
|
|
853
853
|
default:
|
|
854
854
|
return String(e);
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
|
-
function
|
|
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 (
|
|
863
|
+
if (xt(e)) {
|
|
864
864
|
const r = e.toJSON();
|
|
865
865
|
if (r !== e)
|
|
866
|
-
return typeof r == "string" ? r :
|
|
866
|
+
return typeof r == "string" ? r : oe(r, n);
|
|
867
867
|
} else if (Array.isArray(e))
|
|
868
|
-
return
|
|
869
|
-
return
|
|
868
|
+
return bt(e, n);
|
|
869
|
+
return It(e, n);
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function xt(e) {
|
|
872
872
|
return typeof e.toJSON == "function";
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function It(e, t) {
|
|
875
875
|
const n = Object.entries(e);
|
|
876
|
-
return n.length === 0 ? "{}" : t.length >
|
|
877
|
-
([i, s]) => i + ": " +
|
|
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
|
|
880
|
+
function bt(e, t) {
|
|
881
881
|
if (e.length === 0)
|
|
882
882
|
return "[]";
|
|
883
|
-
if (t.length >
|
|
883
|
+
if (t.length > Pe)
|
|
884
884
|
return "[Array]";
|
|
885
|
-
const n = Math.min(
|
|
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(
|
|
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
|
|
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 Ct(e) {
|
|
|
896
896
|
}
|
|
897
897
|
return t;
|
|
898
898
|
}
|
|
899
|
-
const
|
|
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 St = (
|
|
|
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 =
|
|
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
|
|
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" ||
|
|
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 ||
|
|
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
|
|
950
|
-
return
|
|
949
|
+
function Dt(e) {
|
|
950
|
+
return _t(e, Be);
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
return new
|
|
952
|
+
function Me(e, t) {
|
|
953
|
+
return new Ct(e, t).parseDocument();
|
|
954
954
|
}
|
|
955
|
-
class
|
|
955
|
+
class Ct {
|
|
956
956
|
constructor(t, n = {}) {
|
|
957
|
-
const r =
|
|
958
|
-
this._lexer = new
|
|
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 kt {
|
|
|
1028
1028
|
return this.parseDirectiveDefinition();
|
|
1029
1029
|
}
|
|
1030
1030
|
if (t)
|
|
1031
|
-
throw
|
|
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 kt {
|
|
|
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
|
|
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 kt {
|
|
|
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
|
|
1652
|
+
throw b(
|
|
1653
1653
|
this._lexer.source,
|
|
1654
1654
|
this._lexer.token.start,
|
|
1655
|
-
`${
|
|
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 kt {
|
|
|
1922
1922
|
* given parsed object.
|
|
1923
1923
|
*/
|
|
1924
1924
|
node(t, n) {
|
|
1925
|
-
return this._options.noLocation !== !0 && (n.loc = new
|
|
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 kt {
|
|
|
1942
1942
|
const n = this._lexer.token;
|
|
1943
1943
|
if (n.kind === t)
|
|
1944
1944
|
return this.advanceLexer(), n;
|
|
1945
|
-
throw
|
|
1945
|
+
throw b(
|
|
1946
1946
|
this._lexer.source,
|
|
1947
1947
|
n.start,
|
|
1948
|
-
`Expected ${
|
|
1948
|
+
`Expected ${Ue(t)}, found ${W(n)}.`
|
|
1949
1949
|
);
|
|
1950
1950
|
}
|
|
1951
1951
|
/**
|
|
@@ -1964,10 +1964,10 @@ class kt {
|
|
|
1964
1964
|
if (n.kind === a.NAME && n.value === t)
|
|
1965
1965
|
this.advanceLexer();
|
|
1966
1966
|
else
|
|
1967
|
-
throw
|
|
1967
|
+
throw b(
|
|
1968
1968
|
this._lexer.source,
|
|
1969
1969
|
n.start,
|
|
1970
|
-
`Expected "${t}", found ${
|
|
1970
|
+
`Expected "${t}", found ${W(n)}.`
|
|
1971
1971
|
);
|
|
1972
1972
|
}
|
|
1973
1973
|
/**
|
|
@@ -1983,10 +1983,10 @@ class kt {
|
|
|
1983
1983
|
*/
|
|
1984
1984
|
unexpected(t) {
|
|
1985
1985
|
const n = t ?? this._lexer.token;
|
|
1986
|
-
return
|
|
1986
|
+
return b(
|
|
1987
1987
|
this._lexer.source,
|
|
1988
1988
|
n.start,
|
|
1989
|
-
`Unexpected ${
|
|
1989
|
+
`Unexpected ${W(n)}.`
|
|
1990
1990
|
);
|
|
1991
1991
|
}
|
|
1992
1992
|
/**
|
|
@@ -2046,28 +2046,28 @@ class kt {
|
|
|
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
|
|
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
|
|
2056
|
+
function W(e) {
|
|
2057
2057
|
const t = e.value;
|
|
2058
|
-
return
|
|
2058
|
+
return Ue(e.kind) + (t != null ? ` "${t}"` : "");
|
|
2059
2059
|
}
|
|
2060
|
-
function
|
|
2061
|
-
return
|
|
2060
|
+
function Ue(e) {
|
|
2061
|
+
return ht(e) ? `"${e}"` : e;
|
|
2062
2062
|
}
|
|
2063
|
-
function
|
|
2064
|
-
return `"${e.replace(
|
|
2063
|
+
function St(e) {
|
|
2064
|
+
return `"${e.replace(wt, kt)}"`;
|
|
2065
2065
|
}
|
|
2066
|
-
const
|
|
2067
|
-
function
|
|
2068
|
-
return
|
|
2066
|
+
const wt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
|
|
2067
|
+
function kt(e) {
|
|
2068
|
+
return Rt[e.charCodeAt(0)];
|
|
2069
2069
|
}
|
|
2070
|
-
const
|
|
2070
|
+
const Rt = [
|
|
2071
2071
|
"\\u0000",
|
|
2072
2072
|
"\\u0001",
|
|
2073
2073
|
"\\u0002",
|
|
@@ -2233,24 +2233,24 @@ const Pt = [
|
|
|
2233
2233
|
"\\u009D",
|
|
2234
2234
|
"\\u009E",
|
|
2235
2235
|
"\\u009F"
|
|
2236
|
-
],
|
|
2237
|
-
function
|
|
2236
|
+
], Lt = Object.freeze({});
|
|
2237
|
+
function Ft(e, t, n = we) {
|
|
2238
2238
|
const r = /* @__PURE__ */ new Map();
|
|
2239
2239
|
for (const C of Object.values(f))
|
|
2240
|
-
r.set(C,
|
|
2240
|
+
r.set(C, Pt(t, C));
|
|
2241
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 C = u === c.length,
|
|
2245
|
+
const C = u === c.length, z = C && h.length !== 0;
|
|
2246
2246
|
if (C) {
|
|
2247
|
-
if (y = A.length === 0 ? void 0 : T[T.length - 1], d = E, E = A.pop(),
|
|
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
2250
|
let S = 0;
|
|
2251
|
-
for (const [P,
|
|
2252
|
-
const
|
|
2253
|
-
|
|
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(
|
|
@@ -2269,9 +2269,9 @@ function Mt(e, t, n = Le) {
|
|
|
2269
2269
|
let k;
|
|
2270
2270
|
if (!Array.isArray(d)) {
|
|
2271
2271
|
var m, x;
|
|
2272
|
-
|
|
2272
|
+
Ie(d) || Z(!1, `Invalid AST Node: ${ve(d)}.`);
|
|
2273
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 ===
|
|
2274
|
+
if (k = S == null ? void 0 : S.call(t, d, y, E, T, A), k === Lt)
|
|
2275
2275
|
break;
|
|
2276
2276
|
if (k === !1) {
|
|
2277
2277
|
if (!C) {
|
|
@@ -2279,14 +2279,14 @@ function Mt(e, t, n = Le) {
|
|
|
2279
2279
|
continue;
|
|
2280
2280
|
}
|
|
2281
2281
|
} else if (k !== void 0 && (h.push([y, k]), !C))
|
|
2282
|
-
if (
|
|
2282
|
+
if (Ie(k))
|
|
2283
2283
|
d = k;
|
|
2284
2284
|
else {
|
|
2285
2285
|
T.pop();
|
|
2286
2286
|
continue;
|
|
2287
2287
|
}
|
|
2288
2288
|
}
|
|
2289
|
-
if (k === void 0 &&
|
|
2289
|
+
if (k === void 0 && z && h.push([y, d]), C)
|
|
2290
2290
|
T.pop();
|
|
2291
2291
|
else {
|
|
2292
2292
|
var D;
|
|
@@ -2301,7 +2301,7 @@ function Mt(e, t, n = Le) {
|
|
|
2301
2301
|
} while (i !== void 0);
|
|
2302
2302
|
return h.length !== 0 ? h[h.length - 1][1] : e;
|
|
2303
2303
|
}
|
|
2304
|
-
function
|
|
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
|
|
2315
|
-
return
|
|
2314
|
+
function Bt(e) {
|
|
2315
|
+
return Ft(e, Ut);
|
|
2316
2316
|
}
|
|
2317
|
-
const
|
|
2317
|
+
const Mt = 80, Ut = {
|
|
2318
2318
|
Name: {
|
|
2319
2319
|
leave: (e) => e.value
|
|
2320
2320
|
},
|
|
@@ -2329,7 +2329,7 @@ const qt = 80, jt = {
|
|
|
2329
2329
|
},
|
|
2330
2330
|
OperationDefinition: {
|
|
2331
2331
|
leave(e) {
|
|
2332
|
-
const t =
|
|
2332
|
+
const t = v("(", p(e.variableDefinitions, ", "), ")"), n = p(
|
|
2333
2333
|
[
|
|
2334
2334
|
e.operation,
|
|
2335
2335
|
p([e.name, t]),
|
|
@@ -2341,17 +2341,17 @@ const qt = 80, jt = {
|
|
|
2341
2341
|
}
|
|
2342
2342
|
},
|
|
2343
2343
|
VariableDefinition: {
|
|
2344
|
-
leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t +
|
|
2344
|
+
leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + v(" = ", n) + v(" ", p(r, " "))
|
|
2345
2345
|
},
|
|
2346
2346
|
SelectionSet: {
|
|
2347
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 =
|
|
2352
|
-
let c = s +
|
|
2353
|
-
return c.length >
|
|
2354
|
-
`,
|
|
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
2356
|
)`)), p([c, p(r, " "), i], " ");
|
|
2357
2357
|
}
|
|
@@ -2361,13 +2361,13 @@ const qt = 80, jt = {
|
|
|
2361
2361
|
},
|
|
2362
2362
|
// Fragments
|
|
2363
2363
|
FragmentSpread: {
|
|
2364
|
-
leave: ({ name: e, directives: t }) => "..." + e +
|
|
2364
|
+
leave: ({ name: e, directives: t }) => "..." + e + v(" ", p(t, " "))
|
|
2365
2365
|
},
|
|
2366
2366
|
InlineFragment: {
|
|
2367
2367
|
leave: ({ typeCondition: e, directives: t, selectionSet: n }) => p(
|
|
2368
2368
|
[
|
|
2369
2369
|
"...",
|
|
2370
|
-
|
|
2370
|
+
v("on ", e),
|
|
2371
2371
|
p(t, " "),
|
|
2372
2372
|
n
|
|
2373
2373
|
],
|
|
@@ -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}${
|
|
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 ?
|
|
2391
|
+
leave: ({ value: e, block: t }) => t ? ut(e) : St(e)
|
|
2392
2392
|
},
|
|
2393
2393
|
BooleanValue: {
|
|
2394
2394
|
leave: ({ value: e }) => e ? "true" : "false"
|
|
@@ -2410,7 +2410,7 @@ const qt = 80, jt = {
|
|
|
2410
2410
|
},
|
|
2411
2411
|
// Directive
|
|
2412
2412
|
Directive: {
|
|
2413
|
-
leave: ({ name: e, arguments: t }) => "@" + e +
|
|
2413
|
+
leave: ({ name: e, arguments: t }) => "@" + e + v("(", p(t, ", "), ")")
|
|
2414
2414
|
},
|
|
2415
2415
|
// Type
|
|
2416
2416
|
NamedType: {
|
|
@@ -2424,23 +2424,23 @@ const qt = 80, jt = {
|
|
|
2424
2424
|
},
|
|
2425
2425
|
// Type System Definitions
|
|
2426
2426
|
SchemaDefinition: {
|
|
2427
|
-
leave: ({ description: e, directives: t, operationTypes: n }) =>
|
|
2427
|
+
leave: ({ description: e, directives: t, operationTypes: n }) => v("", e, `
|
|
2428
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 }) =>
|
|
2434
|
+
leave: ({ description: e, name: t, directives: n }) => v("", e, `
|
|
2435
2435
|
`) + p(["scalar", t, p(n, " ")], " ")
|
|
2436
2436
|
},
|
|
2437
2437
|
ObjectTypeDefinition: {
|
|
2438
|
-
leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) =>
|
|
2438
|
+
leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, `
|
|
2439
2439
|
`) + p(
|
|
2440
2440
|
[
|
|
2441
2441
|
"type",
|
|
2442
2442
|
t,
|
|
2443
|
-
|
|
2443
|
+
v("implements ", p(n, " & ")),
|
|
2444
2444
|
p(r, " "),
|
|
2445
2445
|
w(i)
|
|
2446
2446
|
],
|
|
@@ -2448,26 +2448,26 @@ const qt = 80, jt = {
|
|
|
2448
2448
|
)
|
|
2449
2449
|
},
|
|
2450
2450
|
FieldDefinition: {
|
|
2451
|
-
leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) =>
|
|
2452
|
-
`) + t + (Oe(n) ?
|
|
2453
|
-
`,
|
|
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
|
-
)`) :
|
|
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 }) =>
|
|
2458
|
+
leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => v("", e, `
|
|
2459
2459
|
`) + p(
|
|
2460
|
-
[t + ": " + n,
|
|
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 }) =>
|
|
2465
|
+
leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => v("", e, `
|
|
2466
2466
|
`) + p(
|
|
2467
2467
|
[
|
|
2468
2468
|
"interface",
|
|
2469
2469
|
t,
|
|
2470
|
-
|
|
2470
|
+
v("implements ", p(n, " & ")),
|
|
2471
2471
|
p(r, " "),
|
|
2472
2472
|
w(i)
|
|
2473
2473
|
],
|
|
@@ -2475,30 +2475,30 @@ const qt = 80, jt = {
|
|
|
2475
2475
|
)
|
|
2476
2476
|
},
|
|
2477
2477
|
UnionTypeDefinition: {
|
|
2478
|
-
leave: ({ description: e, name: t, directives: n, types: r }) =>
|
|
2478
|
+
leave: ({ description: e, name: t, directives: n, types: r }) => v("", e, `
|
|
2479
2479
|
`) + p(
|
|
2480
|
-
["union", t, p(n, " "),
|
|
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 }) =>
|
|
2485
|
+
leave: ({ description: e, name: t, directives: n, values: r }) => v("", e, `
|
|
2486
2486
|
`) + p(["enum", t, p(n, " "), w(r)], " ")
|
|
2487
2487
|
},
|
|
2488
2488
|
EnumValueDefinition: {
|
|
2489
|
-
leave: ({ description: e, name: t, directives: n }) =>
|
|
2489
|
+
leave: ({ description: e, name: t, directives: n }) => v("", e, `
|
|
2490
2490
|
`) + p([t, p(n, " ")], " ")
|
|
2491
2491
|
},
|
|
2492
2492
|
InputObjectTypeDefinition: {
|
|
2493
|
-
leave: ({ description: e, name: t, directives: n, fields: r }) =>
|
|
2493
|
+
leave: ({ description: e, name: t, directives: n, fields: r }) => v("", e, `
|
|
2494
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 }) =>
|
|
2498
|
-
`) + "directive @" + t + (Oe(n) ?
|
|
2499
|
-
`,
|
|
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
|
-
)`) :
|
|
2501
|
+
)`) : v("(", p(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + p(i, " | ")
|
|
2502
2502
|
},
|
|
2503
2503
|
SchemaExtension: {
|
|
2504
2504
|
leave: ({ directives: e, operationTypes: t }) => p(
|
|
@@ -2514,7 +2514,7 @@ const qt = 80, jt = {
|
|
|
2514
2514
|
[
|
|
2515
2515
|
"extend type",
|
|
2516
2516
|
e,
|
|
2517
|
-
|
|
2517
|
+
v("implements ", p(t, " & ")),
|
|
2518
2518
|
p(n, " "),
|
|
2519
2519
|
w(r)
|
|
2520
2520
|
],
|
|
@@ -2526,7 +2526,7 @@ const qt = 80, jt = {
|
|
|
2526
2526
|
[
|
|
2527
2527
|
"extend interface",
|
|
2528
2528
|
e,
|
|
2529
|
-
|
|
2529
|
+
v("implements ", p(t, " & ")),
|
|
2530
2530
|
p(n, " "),
|
|
2531
2531
|
w(r)
|
|
2532
2532
|
],
|
|
@@ -2539,7 +2539,7 @@ const qt = 80, jt = {
|
|
|
2539
2539
|
"extend union",
|
|
2540
2540
|
e,
|
|
2541
2541
|
p(t, " "),
|
|
2542
|
-
|
|
2542
|
+
v("= ", p(n, " | "))
|
|
2543
2543
|
],
|
|
2544
2544
|
" "
|
|
2545
2545
|
)
|
|
@@ -2556,16 +2556,16 @@ function p(e, t = "") {
|
|
|
2556
2556
|
return (n = e == null ? void 0 : e.filter((r) => r).join(t)) !== null && n !== void 0 ? n : "";
|
|
2557
2557
|
}
|
|
2558
2558
|
function w(e) {
|
|
2559
|
-
return
|
|
2560
|
-
`,
|
|
2559
|
+
return v(`{
|
|
2560
|
+
`, K(p(e, `
|
|
2561
2561
|
`)), `
|
|
2562
2562
|
}`);
|
|
2563
2563
|
}
|
|
2564
|
-
function
|
|
2564
|
+
function v(e, t, n = "") {
|
|
2565
2565
|
return t != null && t !== "" ? e + t + n : "";
|
|
2566
2566
|
}
|
|
2567
|
-
function
|
|
2568
|
-
return
|
|
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 =
|
|
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:
|
|
2592
|
+
return { query: Bt(e), operationName: t };
|
|
2593
2593
|
};
|
|
2594
|
-
class
|
|
2594
|
+
class H extends Error {
|
|
2595
2595
|
constructor(t, n) {
|
|
2596
|
-
const r = `${
|
|
2596
|
+
const r = `${H.extractMessage(t)}: ${JSON.stringify({
|
|
2597
2597
|
response: t,
|
|
2598
2598
|
request: n
|
|
2599
2599
|
})}`;
|
|
2600
|
-
super(r), Object.setPrototypeOf(this,
|
|
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
|
|
2608
|
-
function
|
|
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 :
|
|
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
|
}
|
|
@@ -2659,8 +2659,8 @@ var me = { exports: {} };
|
|
|
2659
2659
|
function A(o) {
|
|
2660
2660
|
var l = {
|
|
2661
2661
|
next: function() {
|
|
2662
|
-
var
|
|
2663
|
-
return { done:
|
|
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,
|
|
2672
|
-
this.append(
|
|
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
|
|
2682
|
-
this.map[o] =
|
|
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
|
|
2693
|
-
this.map.hasOwnProperty(
|
|
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,
|
|
2697
|
-
o.push(
|
|
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,
|
|
2707
|
-
o.push([
|
|
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,26 +2713,26 @@ var me = { exports: {} };
|
|
|
2713
2713
|
o.bodyUsed = !0;
|
|
2714
2714
|
}
|
|
2715
2715
|
function D(o) {
|
|
2716
|
-
return new Promise(function(l,
|
|
2716
|
+
return new Promise(function(l, g) {
|
|
2717
2717
|
o.onload = function() {
|
|
2718
2718
|
l(o.result);
|
|
2719
2719
|
}, o.onerror = function() {
|
|
2720
|
-
|
|
2720
|
+
g(o.error);
|
|
2721
2721
|
};
|
|
2722
2722
|
});
|
|
2723
2723
|
}
|
|
2724
2724
|
function C(o) {
|
|
2725
|
-
var l = new FileReader(),
|
|
2726
|
-
return l.readAsArrayBuffer(o),
|
|
2725
|
+
var l = new FileReader(), g = D(l);
|
|
2726
|
+
return l.readAsArrayBuffer(o), g;
|
|
2727
2727
|
}
|
|
2728
|
-
function
|
|
2729
|
-
var l = new FileReader(),
|
|
2730
|
-
return l.readAsText(o),
|
|
2728
|
+
function z(o) {
|
|
2729
|
+
var l = new FileReader(), g = D(l);
|
|
2730
|
+
return l.readAsText(o), g;
|
|
2731
2731
|
}
|
|
2732
2732
|
function k(o) {
|
|
2733
|
-
for (var l = new Uint8Array(o),
|
|
2734
|
-
|
|
2735
|
-
return
|
|
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
2737
|
function S(o) {
|
|
2738
2738
|
if (o.slice)
|
|
@@ -2761,55 +2761,55 @@ var me = { exports: {} };
|
|
|
2761
2761
|
if (o)
|
|
2762
2762
|
return o;
|
|
2763
2763
|
if (this._bodyBlob)
|
|
2764
|
-
return
|
|
2764
|
+
return z(this._bodyBlob);
|
|
2765
2765
|
if (this._bodyArrayBuffer)
|
|
2766
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(
|
|
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
|
|
2777
|
-
function
|
|
2776
|
+
var Q = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
|
|
2777
|
+
function J(o) {
|
|
2778
2778
|
var l = o.toUpperCase();
|
|
2779
|
-
return
|
|
2779
|
+
return Q.indexOf(l) > -1 ? l : o;
|
|
2780
2780
|
}
|
|
2781
2781
|
function L(o, l) {
|
|
2782
2782
|
l = l || {};
|
|
2783
|
-
var
|
|
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, !
|
|
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 =
|
|
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(
|
|
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
|
|
2797
|
+
function je(o) {
|
|
2798
2798
|
var l = new FormData();
|
|
2799
|
-
return o.trim().split("&").forEach(function(
|
|
2800
|
-
if (
|
|
2801
|
-
var _ =
|
|
2799
|
+
return o.trim().split("&").forEach(function(g) {
|
|
2800
|
+
if (g) {
|
|
2801
|
+
var _ = g.split("="), O = _.shift().replace(/\+/g, " "), N = _.join("=").replace(/\+/g, " ");
|
|
2802
2802
|
l.append(decodeURIComponent(O), decodeURIComponent(N));
|
|
2803
2803
|
}
|
|
2804
2804
|
}), l;
|
|
2805
2805
|
}
|
|
2806
|
-
function
|
|
2807
|
-
var l = new m(),
|
|
2808
|
-
return
|
|
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
2809
|
var O = _.split(":"), N = O.shift().trim();
|
|
2810
2810
|
if (N) {
|
|
2811
|
-
var
|
|
2812
|
-
l.append(N,
|
|
2811
|
+
var X = O.join(":").trim();
|
|
2812
|
+
l.append(N, X);
|
|
2813
2813
|
}
|
|
2814
2814
|
}), l;
|
|
2815
2815
|
}
|
|
@@ -2828,49 +2828,49 @@ var me = { exports: {} };
|
|
|
2828
2828
|
var o = new R(null, { status: 0, statusText: "" });
|
|
2829
2829
|
return o.type = "error", o;
|
|
2830
2830
|
};
|
|
2831
|
-
var
|
|
2831
|
+
var Ge = [301, 302, 303, 307, 308];
|
|
2832
2832
|
R.redirect = function(o, l) {
|
|
2833
|
-
if (
|
|
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,
|
|
2841
|
-
this.message = l, this.name =
|
|
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(
|
|
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
2851
|
var N = new XMLHttpRequest();
|
|
2852
|
-
function
|
|
2852
|
+
function X() {
|
|
2853
2853
|
N.abort();
|
|
2854
2854
|
}
|
|
2855
2855
|
N.onload = function() {
|
|
2856
|
-
var
|
|
2856
|
+
var j = {
|
|
2857
2857
|
status: N.status,
|
|
2858
2858
|
statusText: N.statusText,
|
|
2859
|
-
headers:
|
|
2859
|
+
headers: $e(N.getAllResponseHeaders() || "")
|
|
2860
2860
|
};
|
|
2861
|
-
|
|
2861
|
+
j.url = "responseURL" in N ? N.responseURL : j.headers.get("X-Request-URL");
|
|
2862
2862
|
var ce = "response" in N ? N.response : N.responseText;
|
|
2863
|
-
|
|
2863
|
+
g(new R(ce, j));
|
|
2864
2864
|
}, N.onerror = function() {
|
|
2865
2865
|
_(new TypeError("Network request failed"));
|
|
2866
2866
|
}, N.ontimeout = function() {
|
|
2867
2867
|
_(new TypeError("Network request failed"));
|
|
2868
2868
|
}, N.onabort = function() {
|
|
2869
2869
|
_(new c.DOMException("Aborted", "AbortError"));
|
|
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(
|
|
2871
|
-
N.setRequestHeader(ce,
|
|
2872
|
-
}), O.signal && (O.signal.addEventListener("abort",
|
|
2873
|
-
N.readyState === 4 && O.signal.removeEventListener("abort",
|
|
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
2874
|
}), N.send(typeof O._bodyInit > "u" ? null : O._bodyInit);
|
|
2875
2875
|
});
|
|
2876
2876
|
}
|
|
@@ -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
|
|
2884
|
-
const
|
|
2883
|
+
var ne = me.exports;
|
|
2884
|
+
const ee = /* @__PURE__ */ Vt(ne), jt = /* @__PURE__ */ ze({
|
|
2885
2885
|
__proto__: null,
|
|
2886
|
-
default:
|
|
2887
|
-
}, [
|
|
2886
|
+
default: ee
|
|
2887
|
+
}, [ne]), B = (e) => {
|
|
2888
2888
|
let t = {};
|
|
2889
|
-
return e && (typeof Headers < "u" && e instanceof Headers ||
|
|
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(),
|
|
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
|
-
},
|
|
2904
|
+
}, Gt = (e) => async (t) => {
|
|
2905
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 =
|
|
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,
|
|
@@ -2923,10 +2923,10 @@ const K = /* @__PURE__ */ Gt(te), Ht = /* @__PURE__ */ Xe({
|
|
|
2923
2923
|
}
|
|
2924
2924
|
return y && (A = `${A}?${y}`), await c(A, m);
|
|
2925
2925
|
};
|
|
2926
|
-
class
|
|
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 =
|
|
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({
|
|
@@ -2948,7 +2948,7 @@ class Qt {
|
|
|
2948
2948
|
};
|
|
2949
2949
|
}
|
|
2950
2950
|
async request(t, ...n) {
|
|
2951
|
-
const [r, i] = n, s =
|
|
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({
|
|
@@ -2970,7 +2970,7 @@ class Qt {
|
|
|
2970
2970
|
}
|
|
2971
2971
|
// prettier-ignore
|
|
2972
2972
|
batchRequests(t, n) {
|
|
2973
|
-
const r =
|
|
2973
|
+
const r = Ze(t, n), { headers: i, ...s } = this.requestConfig;
|
|
2974
2974
|
r.signal !== void 0 && (s.signal = r.signal);
|
|
2975
2975
|
const c = r.documents.map(({ document: h }) => le(h).query), u = r.documents.map(({ variables: h }) => h);
|
|
2976
2976
|
return he({
|
|
@@ -2983,7 +2983,7 @@ class Qt {
|
|
|
2983
2983
|
...B(r.requestHeaders)
|
|
2984
2984
|
},
|
|
2985
2985
|
operationName: void 0,
|
|
2986
|
-
fetch: this.requestConfig.fetch ??
|
|
2986
|
+
fetch: this.requestConfig.fetch ?? ee,
|
|
2987
2987
|
method: this.requestConfig.method || "POST",
|
|
2988
2988
|
fetchOptions: s,
|
|
2989
2989
|
middleware: this.requestConfig.requestMiddleware
|
|
@@ -3009,7 +3009,7 @@ class Qt {
|
|
|
3009
3009
|
}
|
|
3010
3010
|
}
|
|
3011
3011
|
const he = async (e) => {
|
|
3012
|
-
const { query: t, variables: n, fetchOptions: r } = e, i =
|
|
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
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 {
|
|
@@ -3021,13 +3021,13 @@ const he = async (e) => {
|
|
|
3021
3021
|
const y = typeof u == "string" ? {
|
|
3022
3022
|
error: u
|
|
3023
3023
|
} : u;
|
|
3024
|
-
throw new
|
|
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
|
-
},
|
|
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 });
|
|
@@ -3035,42 +3035,42 @@ const he = async (e) => {
|
|
|
3035
3035
|
throw new Error("Cannot create request body with given variable type, array expected");
|
|
3036
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
|
-
},
|
|
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
|
|
3045
|
-
return
|
|
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
|
-
},
|
|
3052
|
+
}, ie.apply(this, arguments);
|
|
3053
3053
|
};
|
|
3054
|
-
var
|
|
3055
|
-
function
|
|
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
|
|
3059
|
-
return
|
|
3058
|
+
function Qt(e) {
|
|
3059
|
+
return Ve(e.source.body.substring(e.start, e.end));
|
|
3060
3060
|
}
|
|
3061
|
-
function
|
|
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 =
|
|
3066
|
-
c && !c.has(s) ?
|
|
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
|
-
}),
|
|
3071
|
+
}), ie(ie({}, e), { definitions: n });
|
|
3072
3072
|
}
|
|
3073
|
-
function
|
|
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
|
|
3085
|
-
var t =
|
|
3086
|
-
if (!
|
|
3087
|
-
var n =
|
|
3088
|
-
experimentalFragmentVariables:
|
|
3089
|
-
allowLegacyFragmentVariables:
|
|
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
|
-
|
|
3093
|
+
te.set(t, Xt(Jt(n)));
|
|
3094
3094
|
}
|
|
3095
|
-
return
|
|
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
|
-
}),
|
|
3104
|
+
}), Wt(r);
|
|
3105
3105
|
}
|
|
3106
|
-
function
|
|
3107
|
-
|
|
3106
|
+
function Zt() {
|
|
3107
|
+
te.clear(), Ee.clear();
|
|
3108
3108
|
}
|
|
3109
|
-
function
|
|
3110
|
-
|
|
3109
|
+
function Kt() {
|
|
3110
|
+
qe = !1;
|
|
3111
3111
|
}
|
|
3112
|
-
function
|
|
3113
|
-
|
|
3112
|
+
function en() {
|
|
3113
|
+
re = !0;
|
|
3114
3114
|
}
|
|
3115
|
-
function
|
|
3116
|
-
|
|
3115
|
+
function tn() {
|
|
3116
|
+
re = !1;
|
|
3117
3117
|
}
|
|
3118
|
-
var
|
|
3118
|
+
var $ = {
|
|
3119
3119
|
gql: U,
|
|
3120
|
-
resetCaches:
|
|
3121
|
-
disableFragmentWarnings:
|
|
3122
|
-
enableExperimentalFragmentVariables:
|
|
3123
|
-
disableExperimentalFragmentVariables:
|
|
3120
|
+
resetCaches: Zt,
|
|
3121
|
+
disableFragmentWarnings: Kt,
|
|
3122
|
+
enableExperimentalFragmentVariables: en,
|
|
3123
|
+
disableExperimentalFragmentVariables: tn
|
|
3124
3124
|
};
|
|
3125
3125
|
(function(e) {
|
|
3126
|
-
e.gql =
|
|
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
|
|
3130
|
-
var Ce;
|
|
3131
|
-
(function(e) {
|
|
3132
|
-
e.CreatedAt = "CREATED_AT";
|
|
3133
|
-
})(Ce || (Ce = {}));
|
|
3134
|
-
var Se;
|
|
3135
|
-
(function(e) {
|
|
3136
|
-
e.CreatedAt = "CREATED_AT";
|
|
3137
|
-
})(Se || (Se = {}));
|
|
3138
|
-
var we;
|
|
3139
|
-
(function(e) {
|
|
3140
|
-
e.Invalid = "INVALID", e.Public = "PUBLIC", e.TenantUser = "TENANT_USER";
|
|
3141
|
-
})(we || (we = {}));
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
3171
|
+
`, on = V`
|
|
3185
3172
|
query GetPoints {
|
|
3186
3173
|
purchasingCustomer {
|
|
3187
3174
|
pointsApproved
|
|
3188
3175
|
pointsPending
|
|
3189
3176
|
}
|
|
3190
3177
|
}
|
|
3191
|
-
`,
|
|
3192
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
|
3238
|
+
class pn {
|
|
3209
3239
|
constructor(t) {
|
|
3210
3240
|
Ne(this, "api");
|
|
3211
|
-
this.api =
|
|
3241
|
+
this.api = ln(new Ht(`${t}/apps/sq-api`, {
|
|
3212
3242
|
headers: {
|
|
3213
3243
|
"X-SQ-CLIENT": "ShopifyAppProxy"
|
|
3214
3244
|
}
|
|
@@ -3311,5 +3341,5 @@ class dn {
|
|
|
3311
3341
|
}
|
|
3312
3342
|
}
|
|
3313
3343
|
export {
|
|
3314
|
-
|
|
3344
|
+
pn as SDK
|
|
3315
3345
|
};
|