@builtbystack/sq-shopify-theme-sdk 0.0.12 → 0.0.14
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/README.md +52 -0
- package/dist/sq-shopify-theme-sdk.d.ts +14 -0
- package/dist/sq-shopify-theme-sdk.js +307 -258
- package/dist/sq-shopify-theme-sdk.umd.js +52 -30
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var He = Object.defineProperty;
|
|
2
2
|
var Ye = (e, t, n) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
3
|
+
var Ae = (e, t, n) => (Ye(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
function ze(e, t) {
|
|
5
5
|
for (var n = 0; n < t.length; n++) {
|
|
6
6
|
const i = t[n];
|
|
@@ -17,7 +17,7 @@ function ze(e, t) {
|
|
|
17
17
|
}
|
|
18
18
|
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
19
19
|
}
|
|
20
|
-
const
|
|
20
|
+
const Ee = JSON, Qe = (e) => e.toUpperCase(), Je = (e) => {
|
|
21
21
|
const t = {};
|
|
22
22
|
return e.forEach((n, i) => {
|
|
23
23
|
t[i] = n;
|
|
@@ -51,7 +51,7 @@ function et(e, t) {
|
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
const tt = /\r\n|[\n\r]/g;
|
|
54
|
-
function
|
|
54
|
+
function pe(e, t) {
|
|
55
55
|
let n = 0, i = 1;
|
|
56
56
|
for (const r of e.body.matchAll(tt)) {
|
|
57
57
|
if (typeof r.index == "number" || et(!1), r.index >= t)
|
|
@@ -64,34 +64,34 @@ function he(e, t) {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
function nt(e) {
|
|
67
|
-
return
|
|
67
|
+
return Re(
|
|
68
68
|
e.source,
|
|
69
|
-
|
|
69
|
+
pe(e.source, e.start)
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
const n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, u = t.line === 1 ? n : 0,
|
|
74
|
-
`, m = i.split(/\r\n|[\n\r]/g),
|
|
75
|
-
if (
|
|
76
|
-
const
|
|
77
|
-
for (let N = 0; N <
|
|
78
|
-
y.push(
|
|
79
|
-
return
|
|
72
|
+
function Re(e, t) {
|
|
73
|
+
const n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, u = t.line === 1 ? n : 0, h = t.column + u, p = `${e.name}:${o}:${h}
|
|
74
|
+
`, m = i.split(/\r\n|[\n\r]/g), g = m[r];
|
|
75
|
+
if (g.length > 120) {
|
|
76
|
+
const E = Math.floor(h / 80), T = h % 80, y = [];
|
|
77
|
+
for (let N = 0; N < g.length; N += 80)
|
|
78
|
+
y.push(g.slice(N, N + 80));
|
|
79
|
+
return p + Te([
|
|
80
80
|
[`${o} |`, y[0]],
|
|
81
|
-
...y.slice(1,
|
|
82
|
-
["|", "^".padStart(
|
|
83
|
-
["|", y[
|
|
81
|
+
...y.slice(1, E + 1).map((N) => ["|", N]),
|
|
82
|
+
["|", "^".padStart(T)],
|
|
83
|
+
["|", y[E + 1]]
|
|
84
84
|
]);
|
|
85
85
|
}
|
|
86
|
-
return
|
|
86
|
+
return p + Te([
|
|
87
87
|
// Lines specified like this: ["prefix", "string"],
|
|
88
88
|
[`${o - 1} |`, m[r - 1]],
|
|
89
|
-
[`${o} |`,
|
|
90
|
-
["|", "^".padStart(
|
|
89
|
+
[`${o} |`, g],
|
|
90
|
+
["|", "^".padStart(h)],
|
|
91
91
|
[`${o + 1} |`, m[r + 1]]
|
|
92
92
|
]);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Te(e) {
|
|
95
95
|
const t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
|
|
96
96
|
return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
|
|
97
97
|
`);
|
|
@@ -148,18 +148,18 @@ class Ce extends Error {
|
|
|
148
148
|
*/
|
|
149
149
|
constructor(t, ...n) {
|
|
150
150
|
var i, r, s;
|
|
151
|
-
const { nodes: o, source: u, positions:
|
|
152
|
-
super(t), this.name = "GraphQLError", this.path =
|
|
151
|
+
const { nodes: o, source: u, positions: h, path: p, originalError: m, extensions: g } = rt(n);
|
|
152
|
+
super(t), this.name = "GraphQLError", this.path = p ?? void 0, this.originalError = m ?? void 0, this.nodes = Ne(
|
|
153
153
|
Array.isArray(o) ? o : o ? [o] : void 0
|
|
154
154
|
);
|
|
155
|
-
const
|
|
155
|
+
const E = Ne(
|
|
156
156
|
(i = this.nodes) === null || i === void 0 ? void 0 : i.map((y) => y.loc).filter((y) => y != null)
|
|
157
157
|
);
|
|
158
|
-
this.source = u ?? (
|
|
159
|
-
const
|
|
158
|
+
this.source = u ?? (E == null || (r = E[0]) === null || r === void 0 ? void 0 : r.source), this.positions = h ?? (E == null ? void 0 : E.map((y) => y.start)), this.locations = h && u ? h.map((y) => pe(u, y)) : E == null ? void 0 : E.map((y) => pe(y.source, y.start));
|
|
159
|
+
const T = Ke(
|
|
160
160
|
m == null ? void 0 : m.extensions
|
|
161
161
|
) ? m == null ? void 0 : m.extensions : void 0;
|
|
162
|
-
this.extensions = (s =
|
|
162
|
+
this.extensions = (s = g ?? T) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
163
163
|
message: {
|
|
164
164
|
writable: !0,
|
|
165
165
|
enumerable: !0
|
|
@@ -203,7 +203,7 @@ class Ce extends Error {
|
|
|
203
203
|
for (const n of this.locations)
|
|
204
204
|
t += `
|
|
205
205
|
|
|
206
|
-
` +
|
|
206
|
+
` + Re(this.source, n);
|
|
207
207
|
return t;
|
|
208
208
|
}
|
|
209
209
|
toJSON() {
|
|
@@ -251,7 +251,7 @@ class it {
|
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
class
|
|
254
|
+
class _e {
|
|
255
255
|
/**
|
|
256
256
|
* The kind of Token.
|
|
257
257
|
*/
|
|
@@ -293,7 +293,7 @@ class ke {
|
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const Se = {
|
|
297
297
|
Name: [],
|
|
298
298
|
Document: ["definitions"],
|
|
299
299
|
OperationDefinition: [
|
|
@@ -367,15 +367,15 @@ const Re = {
|
|
|
367
367
|
UnionTypeExtension: ["name", "directives", "types"],
|
|
368
368
|
EnumTypeExtension: ["name", "directives", "values"],
|
|
369
369
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
370
|
-
}, st = new Set(Object.keys(
|
|
370
|
+
}, st = new Set(Object.keys(Se));
|
|
371
371
|
function be(e) {
|
|
372
372
|
const t = e == null ? void 0 : e.kind;
|
|
373
373
|
return typeof t == "string" && st.has(t);
|
|
374
374
|
}
|
|
375
|
-
var
|
|
375
|
+
var M;
|
|
376
376
|
(function(e) {
|
|
377
377
|
e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
|
|
378
|
-
})(
|
|
378
|
+
})(M || (M = {}));
|
|
379
379
|
var fe;
|
|
380
380
|
(function(e) {
|
|
381
381
|
e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
|
|
@@ -390,23 +390,23 @@ function me(e) {
|
|
|
390
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
397
|
function we(e) {
|
|
398
|
-
return
|
|
398
|
+
return ke(e) || e === 95;
|
|
399
399
|
}
|
|
400
400
|
function ot(e) {
|
|
401
|
-
return
|
|
401
|
+
return ke(e) || Y(e) || e === 95;
|
|
402
402
|
}
|
|
403
403
|
function at(e) {
|
|
404
404
|
var t;
|
|
405
405
|
let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
|
|
406
406
|
for (let o = 0; o < e.length; ++o) {
|
|
407
407
|
var s;
|
|
408
|
-
const u = e[o],
|
|
409
|
-
|
|
408
|
+
const u = e[o], h = ct(u);
|
|
409
|
+
h !== u.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && h < n && (n = h));
|
|
410
410
|
}
|
|
411
411
|
return e.map((o, u) => u === 0 ? o : o.slice(n)).slice(
|
|
412
412
|
(t = i) !== null && t !== void 0 ? t : 0,
|
|
@@ -420,13 +420,13 @@ function ct(e) {
|
|
|
420
420
|
return t;
|
|
421
421
|
}
|
|
422
422
|
function ut(e, t) {
|
|
423
|
-
const n = e.replace(/"""/g, '\\"""'), i = n.split(/\r\n|[\n\r]/g), r = i.length === 1, s = i.length > 1 && i.slice(1).every((
|
|
424
|
-
(!r || e.length > 70 ||
|
|
425
|
-
let
|
|
426
|
-
const
|
|
427
|
-
return (m && !
|
|
428
|
-
`),
|
|
429
|
-
`), '"""' +
|
|
423
|
+
const n = e.replace(/"""/g, '\\"""'), i = n.split(/\r\n|[\n\r]/g), r = i.length === 1, s = i.length > 1 && i.slice(1).every((T) => T.length === 0 || me(T.charCodeAt(0))), o = n.endsWith('\\"""'), u = e.endsWith('"') && !o, h = e.endsWith("\\"), p = u || h, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
424
|
+
(!r || e.length > 70 || p || s || o);
|
|
425
|
+
let g = "";
|
|
426
|
+
const E = r && me(e.charCodeAt(0));
|
|
427
|
+
return (m && !E || s) && (g += `
|
|
428
|
+
`), g += n, (m || p) && (g += `
|
|
429
|
+
`), '"""' + g + '"""';
|
|
430
430
|
}
|
|
431
431
|
var c;
|
|
432
432
|
(function(e) {
|
|
@@ -446,7 +446,7 @@ class lt {
|
|
|
446
446
|
* The character offset at which the current line begins.
|
|
447
447
|
*/
|
|
448
448
|
constructor(t) {
|
|
449
|
-
const n = new
|
|
449
|
+
const n = new _e(c.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,7 +469,7 @@ class lt {
|
|
|
469
469
|
if (t.next)
|
|
470
470
|
t = t.next;
|
|
471
471
|
else {
|
|
472
|
-
const n =
|
|
472
|
+
const n = ht(this, t.end);
|
|
473
473
|
t.next = n, n.prev = t, t = n;
|
|
474
474
|
}
|
|
475
475
|
while (t.kind === c.COMMENT);
|
|
@@ -503,9 +503,9 @@ function F(e, t) {
|
|
|
503
503
|
}
|
|
504
504
|
function b(e, t, n, i, r) {
|
|
505
505
|
const s = e.line, o = 1 + n - e.lineStart;
|
|
506
|
-
return new
|
|
506
|
+
return new _e(t, n, i, s, o, r);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function ht(e, t) {
|
|
509
509
|
const n = e.source.body, i = n.length;
|
|
510
510
|
let r = t;
|
|
511
511
|
for (; r < i; ) {
|
|
@@ -524,7 +524,7 @@ function pt(e, t) {
|
|
|
524
524
|
n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
|
|
525
525
|
continue;
|
|
526
526
|
case 35:
|
|
527
|
-
return
|
|
527
|
+
return pt(e, r);
|
|
528
528
|
case 33:
|
|
529
529
|
return b(e, c.BANG, r, r + 1);
|
|
530
530
|
case 36:
|
|
@@ -570,7 +570,7 @@ function pt(e, t) {
|
|
|
570
570
|
}
|
|
571
571
|
return b(e, c.EOF, i, i);
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function pt(e, t) {
|
|
574
574
|
const n = e.source.body, i = n.length;
|
|
575
575
|
let r = t + 1;
|
|
576
576
|
for (; r < i; ) {
|
|
@@ -649,8 +649,8 @@ function mt(e, t) {
|
|
|
649
649
|
return o += n.slice(s, r), b(e, c.STRING, t, r + 1, o);
|
|
650
650
|
if (u === 92) {
|
|
651
651
|
o += n.slice(s, r);
|
|
652
|
-
const
|
|
653
|
-
o +=
|
|
652
|
+
const h = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? yt(e, r) : gt(e, r) : Et(e, r);
|
|
653
|
+
o += h.value, r += h.size, s = r;
|
|
654
654
|
continue;
|
|
655
655
|
}
|
|
656
656
|
if (u === 10 || u === 13)
|
|
@@ -696,7 +696,7 @@ function yt(e, t) {
|
|
|
696
696
|
)}".`
|
|
697
697
|
);
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function gt(e, t) {
|
|
700
700
|
const n = e.source.body, i = xe(n, t + 2);
|
|
701
701
|
if (V(i))
|
|
702
702
|
return {
|
|
@@ -723,7 +723,7 @@ function xe(e, t) {
|
|
|
723
723
|
function $(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 Et(e, t) {
|
|
727
727
|
const n = e.source.body;
|
|
728
728
|
switch (n.charCodeAt(t + 1)) {
|
|
729
729
|
case 34:
|
|
@@ -780,31 +780,31 @@ function gt(e, t) {
|
|
|
780
780
|
function Ct(e, t) {
|
|
781
781
|
const n = e.source.body, i = n.length;
|
|
782
782
|
let r = e.lineStart, s = t + 3, o = s, u = "";
|
|
783
|
-
const
|
|
783
|
+
const h = [];
|
|
784
784
|
for (; s < i; ) {
|
|
785
|
-
const
|
|
786
|
-
if (
|
|
787
|
-
u += n.slice(o, s),
|
|
785
|
+
const p = n.charCodeAt(s);
|
|
786
|
+
if (p === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
|
|
787
|
+
u += n.slice(o, s), h.push(u);
|
|
788
788
|
const m = b(
|
|
789
789
|
e,
|
|
790
790
|
c.BLOCK_STRING,
|
|
791
791
|
t,
|
|
792
792
|
s + 3,
|
|
793
793
|
// Return a string of the lines joined with U+000A.
|
|
794
|
-
at(
|
|
794
|
+
at(h).join(`
|
|
795
795
|
`)
|
|
796
796
|
);
|
|
797
|
-
return e.line +=
|
|
797
|
+
return e.line += h.length - 1, e.lineStart = r, m;
|
|
798
798
|
}
|
|
799
|
-
if (
|
|
799
|
+
if (p === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
|
|
800
800
|
u += n.slice(o, s), o = s + 1, s += 4;
|
|
801
801
|
continue;
|
|
802
802
|
}
|
|
803
|
-
if (
|
|
804
|
-
u += n.slice(o, s),
|
|
803
|
+
if (p === 10 || p === 13) {
|
|
804
|
+
u += n.slice(o, s), h.push(u), p === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", o = s, r = s;
|
|
805
805
|
continue;
|
|
806
806
|
}
|
|
807
|
-
if (V(
|
|
807
|
+
if (V(p))
|
|
808
808
|
++s;
|
|
809
809
|
else if (se(n, s))
|
|
810
810
|
s += 2;
|
|
@@ -838,7 +838,7 @@ function vt(e, t) {
|
|
|
838
838
|
n.slice(t, r)
|
|
839
839
|
);
|
|
840
840
|
}
|
|
841
|
-
const
|
|
841
|
+
const At = 10, Fe = 2;
|
|
842
842
|
function ve(e) {
|
|
843
843
|
return oe(e, []);
|
|
844
844
|
}
|
|
@@ -849,12 +849,12 @@ function oe(e, t) {
|
|
|
849
849
|
case "function":
|
|
850
850
|
return e.name ? `[function ${e.name}]` : "[function]";
|
|
851
851
|
case "object":
|
|
852
|
-
return
|
|
852
|
+
return Tt(e, t);
|
|
853
853
|
default:
|
|
854
854
|
return String(e);
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function Tt(e, t) {
|
|
858
858
|
if (e === null)
|
|
859
859
|
return "null";
|
|
860
860
|
if (t.includes(e))
|
|
@@ -882,7 +882,7 @@ function xt(e, t) {
|
|
|
882
882
|
return "[]";
|
|
883
883
|
if (t.length > Fe)
|
|
884
884
|
return "[Array]";
|
|
885
|
-
const n = Math.min(
|
|
885
|
+
const n = Math.min(At, e.length), i = e.length - n, r = [];
|
|
886
886
|
for (let s = 0; s < n; ++s)
|
|
887
887
|
r.push(oe(e[s], t));
|
|
888
888
|
return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
|
|
@@ -929,7 +929,7 @@ spurious results.`);
|
|
|
929
929
|
return !1;
|
|
930
930
|
}
|
|
931
931
|
);
|
|
932
|
-
class
|
|
932
|
+
class Ue {
|
|
933
933
|
constructor(t, n = "GraphQL request", i = {
|
|
934
934
|
line: 1,
|
|
935
935
|
column: 1
|
|
@@ -947,14 +947,14 @@ class Be {
|
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
function Ot(e) {
|
|
950
|
-
return Dt(e,
|
|
950
|
+
return Dt(e, Ue);
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
return new
|
|
952
|
+
function Be(e, t) {
|
|
953
|
+
return new Rt(e, t).parseDocument();
|
|
954
954
|
}
|
|
955
|
-
class
|
|
955
|
+
class Rt {
|
|
956
956
|
constructor(t, n = {}) {
|
|
957
|
-
const i = Ot(t) ? t : new
|
|
957
|
+
const i = Ot(t) ? t : new Ue(t);
|
|
958
958
|
this._lexer = new lt(i), this._options = n, this._tokenCounter = 0;
|
|
959
959
|
}
|
|
960
960
|
/**
|
|
@@ -1057,7 +1057,7 @@ class _t {
|
|
|
1057
1057
|
if (this.peek(c.BRACE_L))
|
|
1058
1058
|
return this.node(t, {
|
|
1059
1059
|
kind: f.OPERATION_DEFINITION,
|
|
1060
|
-
operation:
|
|
1060
|
+
operation: M.QUERY,
|
|
1061
1061
|
name: void 0,
|
|
1062
1062
|
variableDefinitions: [],
|
|
1063
1063
|
directives: [],
|
|
@@ -1081,11 +1081,11 @@ class _t {
|
|
|
1081
1081
|
const t = this.expectToken(c.NAME);
|
|
1082
1082
|
switch (t.value) {
|
|
1083
1083
|
case "query":
|
|
1084
|
-
return
|
|
1084
|
+
return M.QUERY;
|
|
1085
1085
|
case "mutation":
|
|
1086
|
-
return
|
|
1086
|
+
return M.MUTATION;
|
|
1087
1087
|
case "subscription":
|
|
1088
|
-
return
|
|
1088
|
+
return M.SUBSCRIPTION;
|
|
1089
1089
|
}
|
|
1090
1090
|
throw this.unexpected(t);
|
|
1091
1091
|
}
|
|
@@ -1945,7 +1945,7 @@ class _t {
|
|
|
1945
1945
|
throw x(
|
|
1946
1946
|
this._lexer.source,
|
|
1947
1947
|
n.start,
|
|
1948
|
-
`Expected ${
|
|
1948
|
+
`Expected ${Me(t)}, found ${W(n)}.`
|
|
1949
1949
|
);
|
|
1950
1950
|
}
|
|
1951
1951
|
/**
|
|
@@ -2055,16 +2055,16 @@ class _t {
|
|
|
2055
2055
|
}
|
|
2056
2056
|
function W(e) {
|
|
2057
2057
|
const t = e.value;
|
|
2058
|
-
return
|
|
2058
|
+
return Me(e.kind) + (t != null ? ` "${t}"` : "");
|
|
2059
2059
|
}
|
|
2060
|
-
function
|
|
2060
|
+
function Me(e) {
|
|
2061
2061
|
return dt(e) ? `"${e}"` : e;
|
|
2062
2062
|
}
|
|
2063
|
-
function
|
|
2064
|
-
return `"${e.replace(
|
|
2063
|
+
function _t(e) {
|
|
2064
|
+
return `"${e.replace(St, kt)}"`;
|
|
2065
2065
|
}
|
|
2066
|
-
const
|
|
2067
|
-
function
|
|
2066
|
+
const St = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
|
|
2067
|
+
function kt(e) {
|
|
2068
2068
|
return wt[e.charCodeAt(0)];
|
|
2069
2069
|
}
|
|
2070
2070
|
const wt = [
|
|
@@ -2234,72 +2234,72 @@ const wt = [
|
|
|
2234
2234
|
"\\u009E",
|
|
2235
2235
|
"\\u009F"
|
|
2236
2236
|
], Lt = Object.freeze({});
|
|
2237
|
-
function Pt(e, t, n =
|
|
2237
|
+
function Pt(e, t, n = Se) {
|
|
2238
2238
|
const i = /* @__PURE__ */ new Map();
|
|
2239
|
-
for (const
|
|
2240
|
-
i.set(
|
|
2241
|
-
let r, s = Array.isArray(e), o = [e], u = -1,
|
|
2242
|
-
const
|
|
2239
|
+
for (const R of Object.values(f))
|
|
2240
|
+
i.set(R, Ft(t, R));
|
|
2241
|
+
let r, s = Array.isArray(e), o = [e], u = -1, h = [], p = e, m, g;
|
|
2242
|
+
const E = [], T = [];
|
|
2243
2243
|
do {
|
|
2244
2244
|
u++;
|
|
2245
|
-
const
|
|
2246
|
-
if (
|
|
2247
|
-
if (m =
|
|
2245
|
+
const R = u === o.length, z = R && h.length !== 0;
|
|
2246
|
+
if (R) {
|
|
2247
|
+
if (m = T.length === 0 ? void 0 : E[E.length - 1], p = g, g = T.pop(), z)
|
|
2248
2248
|
if (s) {
|
|
2249
|
-
|
|
2250
|
-
let
|
|
2251
|
-
for (const [
|
|
2252
|
-
const J =
|
|
2253
|
-
Q === null ? (
|
|
2249
|
+
p = p.slice();
|
|
2250
|
+
let _ = 0;
|
|
2251
|
+
for (const [U, Q] of h) {
|
|
2252
|
+
const J = U - _;
|
|
2253
|
+
Q === null ? (p.splice(J, 1), _++) : p[J] = Q;
|
|
2254
2254
|
}
|
|
2255
2255
|
} else {
|
|
2256
|
-
|
|
2256
|
+
p = Object.defineProperties(
|
|
2257
2257
|
{},
|
|
2258
|
-
Object.getOwnPropertyDescriptors(
|
|
2258
|
+
Object.getOwnPropertyDescriptors(p)
|
|
2259
2259
|
);
|
|
2260
|
-
for (const [
|
|
2261
|
-
|
|
2260
|
+
for (const [_, U] of h)
|
|
2261
|
+
p[_] = U;
|
|
2262
2262
|
}
|
|
2263
|
-
u = r.index, o = r.keys,
|
|
2264
|
-
} else if (
|
|
2265
|
-
if (m = s ? u : o[u],
|
|
2263
|
+
u = r.index, o = r.keys, h = r.edits, s = r.inArray, r = r.prev;
|
|
2264
|
+
} else if (g) {
|
|
2265
|
+
if (m = s ? u : o[u], p = g[m], p == null)
|
|
2266
2266
|
continue;
|
|
2267
|
-
|
|
2267
|
+
E.push(m);
|
|
2268
2268
|
}
|
|
2269
|
-
let
|
|
2270
|
-
if (!Array.isArray(
|
|
2269
|
+
let w;
|
|
2270
|
+
if (!Array.isArray(p)) {
|
|
2271
2271
|
var y, N;
|
|
2272
|
-
be(
|
|
2273
|
-
const
|
|
2274
|
-
if (
|
|
2272
|
+
be(p) || Z(!1, `Invalid AST Node: ${ve(p)}.`);
|
|
2273
|
+
const _ = R ? (y = i.get(p.kind)) === null || y === void 0 ? void 0 : y.leave : (N = i.get(p.kind)) === null || N === void 0 ? void 0 : N.enter;
|
|
2274
|
+
if (w = _ == null ? void 0 : _.call(t, p, m, g, E, T), w === Lt)
|
|
2275
2275
|
break;
|
|
2276
|
-
if (
|
|
2277
|
-
if (!
|
|
2278
|
-
|
|
2276
|
+
if (w === !1) {
|
|
2277
|
+
if (!R) {
|
|
2278
|
+
E.pop();
|
|
2279
2279
|
continue;
|
|
2280
2280
|
}
|
|
2281
|
-
} else if (
|
|
2282
|
-
if (be(
|
|
2283
|
-
|
|
2281
|
+
} else if (w !== void 0 && (h.push([m, w]), !R))
|
|
2282
|
+
if (be(w))
|
|
2283
|
+
p = w;
|
|
2284
2284
|
else {
|
|
2285
|
-
|
|
2285
|
+
E.pop();
|
|
2286
2286
|
continue;
|
|
2287
2287
|
}
|
|
2288
2288
|
}
|
|
2289
|
-
if (
|
|
2290
|
-
|
|
2289
|
+
if (w === void 0 && z && h.push([m, p]), R)
|
|
2290
|
+
E.pop();
|
|
2291
2291
|
else {
|
|
2292
2292
|
var O;
|
|
2293
2293
|
r = {
|
|
2294
2294
|
inArray: s,
|
|
2295
2295
|
index: u,
|
|
2296
2296
|
keys: o,
|
|
2297
|
-
edits:
|
|
2297
|
+
edits: h,
|
|
2298
2298
|
prev: r
|
|
2299
|
-
}, s = Array.isArray(
|
|
2299
|
+
}, s = Array.isArray(p), o = s ? p : (O = n[p.kind]) !== null && O !== void 0 ? O : [], u = -1, h = [], g && T.push(g), g = p;
|
|
2300
2300
|
}
|
|
2301
2301
|
} while (r !== void 0);
|
|
2302
|
-
return
|
|
2302
|
+
return h.length !== 0 ? h[h.length - 1][1] : e;
|
|
2303
2303
|
}
|
|
2304
2304
|
function Ft(e, t) {
|
|
2305
2305
|
const n = e[t];
|
|
@@ -2311,10 +2311,10 @@ function Ft(e, t) {
|
|
|
2311
2311
|
leave: e.leave
|
|
2312
2312
|
};
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2315
|
-
return Pt(e,
|
|
2314
|
+
function Ut(e) {
|
|
2315
|
+
return Pt(e, Mt);
|
|
2316
2316
|
}
|
|
2317
|
-
const
|
|
2317
|
+
const Bt = 80, Mt = {
|
|
2318
2318
|
Name: {
|
|
2319
2319
|
leave: (e) => e.value
|
|
2320
2320
|
},
|
|
@@ -2344,13 +2344,13 @@ const Mt = 80, Ut = {
|
|
|
2344
2344
|
leave: ({ variable: e, type: t, defaultValue: n, directives: i }) => e + ": " + t + v(" = ", n) + v(" ", d(i, " "))
|
|
2345
2345
|
},
|
|
2346
2346
|
SelectionSet: {
|
|
2347
|
-
leave: ({ selections: e }) =>
|
|
2347
|
+
leave: ({ selections: e }) => S(e)
|
|
2348
2348
|
},
|
|
2349
2349
|
Field: {
|
|
2350
2350
|
leave({ alias: e, name: t, arguments: n, directives: i, selectionSet: r }) {
|
|
2351
2351
|
const s = v("", e, ": ") + t;
|
|
2352
2352
|
let o = s + v("(", d(n, ", "), ")");
|
|
2353
|
-
return o.length >
|
|
2353
|
+
return o.length > Bt && (o = s + v(`(
|
|
2354
2354
|
`, K(d(n, `
|
|
2355
2355
|
`)), `
|
|
2356
2356
|
)`)), d([o, d(i, " "), r], " ");
|
|
@@ -2388,7 +2388,7 @@ const Mt = 80, Ut = {
|
|
|
2388
2388
|
leave: ({ value: e }) => e
|
|
2389
2389
|
},
|
|
2390
2390
|
StringValue: {
|
|
2391
|
-
leave: ({ value: e, block: t }) => t ? ut(e) :
|
|
2391
|
+
leave: ({ value: e, block: t }) => t ? ut(e) : _t(e)
|
|
2392
2392
|
},
|
|
2393
2393
|
BooleanValue: {
|
|
2394
2394
|
leave: ({ value: e }) => e ? "true" : "false"
|
|
@@ -2425,7 +2425,7 @@ const Mt = 80, Ut = {
|
|
|
2425
2425
|
// Type System Definitions
|
|
2426
2426
|
SchemaDefinition: {
|
|
2427
2427
|
leave: ({ description: e, directives: t, operationTypes: n }) => v("", e, `
|
|
2428
|
-
`) + d(["schema", d(t, " "),
|
|
2428
|
+
`) + d(["schema", d(t, " "), S(n)], " ")
|
|
2429
2429
|
},
|
|
2430
2430
|
OperationTypeDefinition: {
|
|
2431
2431
|
leave: ({ operation: e, type: t }) => e + ": " + t
|
|
@@ -2442,7 +2442,7 @@ const Mt = 80, Ut = {
|
|
|
2442
2442
|
t,
|
|
2443
2443
|
v("implements ", d(n, " & ")),
|
|
2444
2444
|
d(i, " "),
|
|
2445
|
-
|
|
2445
|
+
S(r)
|
|
2446
2446
|
],
|
|
2447
2447
|
" "
|
|
2448
2448
|
)
|
|
@@ -2469,7 +2469,7 @@ const Mt = 80, Ut = {
|
|
|
2469
2469
|
t,
|
|
2470
2470
|
v("implements ", d(n, " & ")),
|
|
2471
2471
|
d(i, " "),
|
|
2472
|
-
|
|
2472
|
+
S(r)
|
|
2473
2473
|
],
|
|
2474
2474
|
" "
|
|
2475
2475
|
)
|
|
@@ -2483,7 +2483,7 @@ const Mt = 80, Ut = {
|
|
|
2483
2483
|
},
|
|
2484
2484
|
EnumTypeDefinition: {
|
|
2485
2485
|
leave: ({ description: e, name: t, directives: n, values: i }) => v("", e, `
|
|
2486
|
-
`) + d(["enum", t, d(n, " "),
|
|
2486
|
+
`) + d(["enum", t, d(n, " "), S(i)], " ")
|
|
2487
2487
|
},
|
|
2488
2488
|
EnumValueDefinition: {
|
|
2489
2489
|
leave: ({ description: e, name: t, directives: n }) => v("", e, `
|
|
@@ -2491,7 +2491,7 @@ const Mt = 80, Ut = {
|
|
|
2491
2491
|
},
|
|
2492
2492
|
InputObjectTypeDefinition: {
|
|
2493
2493
|
leave: ({ description: e, name: t, directives: n, fields: i }) => v("", e, `
|
|
2494
|
-
`) + d(["input", t, d(n, " "),
|
|
2494
|
+
`) + d(["input", t, d(n, " "), S(i)], " ")
|
|
2495
2495
|
},
|
|
2496
2496
|
DirectiveDefinition: {
|
|
2497
2497
|
leave: ({ description: e, name: t, arguments: n, repeatable: i, locations: r }) => v("", e, `
|
|
@@ -2502,7 +2502,7 @@ const Mt = 80, Ut = {
|
|
|
2502
2502
|
},
|
|
2503
2503
|
SchemaExtension: {
|
|
2504
2504
|
leave: ({ directives: e, operationTypes: t }) => d(
|
|
2505
|
-
["extend schema", d(e, " "),
|
|
2505
|
+
["extend schema", d(e, " "), S(t)],
|
|
2506
2506
|
" "
|
|
2507
2507
|
)
|
|
2508
2508
|
},
|
|
@@ -2516,7 +2516,7 @@ const Mt = 80, Ut = {
|
|
|
2516
2516
|
e,
|
|
2517
2517
|
v("implements ", d(t, " & ")),
|
|
2518
2518
|
d(n, " "),
|
|
2519
|
-
|
|
2519
|
+
S(i)
|
|
2520
2520
|
],
|
|
2521
2521
|
" "
|
|
2522
2522
|
)
|
|
@@ -2528,7 +2528,7 @@ const Mt = 80, Ut = {
|
|
|
2528
2528
|
e,
|
|
2529
2529
|
v("implements ", d(t, " & ")),
|
|
2530
2530
|
d(n, " "),
|
|
2531
|
-
|
|
2531
|
+
S(i)
|
|
2532
2532
|
],
|
|
2533
2533
|
" "
|
|
2534
2534
|
)
|
|
@@ -2545,17 +2545,17 @@ const Mt = 80, Ut = {
|
|
|
2545
2545
|
)
|
|
2546
2546
|
},
|
|
2547
2547
|
EnumTypeExtension: {
|
|
2548
|
-
leave: ({ name: e, directives: t, values: n }) => d(["extend enum", e, d(t, " "),
|
|
2548
|
+
leave: ({ name: e, directives: t, values: n }) => d(["extend enum", e, d(t, " "), S(n)], " ")
|
|
2549
2549
|
},
|
|
2550
2550
|
InputObjectTypeExtension: {
|
|
2551
|
-
leave: ({ name: e, directives: t, fields: n }) => d(["extend input", e, d(t, " "),
|
|
2551
|
+
leave: ({ name: e, directives: t, fields: n }) => d(["extend input", e, d(t, " "), S(n)], " ")
|
|
2552
2552
|
}
|
|
2553
2553
|
};
|
|
2554
2554
|
function d(e, t = "") {
|
|
2555
2555
|
var n;
|
|
2556
2556
|
return (n = e == null ? void 0 : e.filter((i) => i).join(t)) !== null && n !== void 0 ? n : "";
|
|
2557
2557
|
}
|
|
2558
|
-
function
|
|
2558
|
+
function S(e) {
|
|
2559
2559
|
return v(`{
|
|
2560
2560
|
`, K(d(e, `
|
|
2561
2561
|
`)), `
|
|
@@ -2582,14 +2582,14 @@ const De = (e) => {
|
|
|
2582
2582
|
if (typeof e == "string") {
|
|
2583
2583
|
let n;
|
|
2584
2584
|
try {
|
|
2585
|
-
const i =
|
|
2585
|
+
const i = Be(e);
|
|
2586
2586
|
n = De(i);
|
|
2587
2587
|
} catch {
|
|
2588
2588
|
}
|
|
2589
2589
|
return { query: e, operationName: n };
|
|
2590
2590
|
}
|
|
2591
2591
|
const t = De(e);
|
|
2592
|
-
return { query:
|
|
2592
|
+
return { query: Ut(e), operationName: t };
|
|
2593
2593
|
};
|
|
2594
2594
|
class H extends Error {
|
|
2595
2595
|
constructor(t, n) {
|
|
@@ -2631,11 +2631,11 @@ var ye = { exports: {} };
|
|
|
2631
2631
|
formData: "FormData" in s,
|
|
2632
2632
|
arrayBuffer: "ArrayBuffer" in s
|
|
2633
2633
|
};
|
|
2634
|
-
function
|
|
2634
|
+
function h(a) {
|
|
2635
2635
|
return a && DataView.prototype.isPrototypeOf(a);
|
|
2636
2636
|
}
|
|
2637
2637
|
if (u.arrayBuffer)
|
|
2638
|
-
var
|
|
2638
|
+
var p = [
|
|
2639
2639
|
"[object Int8Array]",
|
|
2640
2640
|
"[object Uint8Array]",
|
|
2641
2641
|
"[object Uint8ClampedArray]",
|
|
@@ -2646,17 +2646,17 @@ var ye = { exports: {} };
|
|
|
2646
2646
|
"[object Float32Array]",
|
|
2647
2647
|
"[object Float64Array]"
|
|
2648
2648
|
], m = ArrayBuffer.isView || function(a) {
|
|
2649
|
-
return a &&
|
|
2649
|
+
return a && p.indexOf(Object.prototype.toString.call(a)) > -1;
|
|
2650
2650
|
};
|
|
2651
|
-
function
|
|
2651
|
+
function g(a) {
|
|
2652
2652
|
if (typeof a != "string" && (a = String(a)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(a))
|
|
2653
2653
|
throw new TypeError("Invalid character in header field name");
|
|
2654
2654
|
return a.toLowerCase();
|
|
2655
2655
|
}
|
|
2656
|
-
function
|
|
2656
|
+
function E(a) {
|
|
2657
2657
|
return typeof a != "string" && (a = String(a)), a;
|
|
2658
2658
|
}
|
|
2659
|
-
function
|
|
2659
|
+
function T(a) {
|
|
2660
2660
|
var l = {
|
|
2661
2661
|
next: function() {
|
|
2662
2662
|
var C = a.shift();
|
|
@@ -2677,17 +2677,17 @@ var ye = { exports: {} };
|
|
|
2677
2677
|
}, this);
|
|
2678
2678
|
}
|
|
2679
2679
|
y.prototype.append = function(a, l) {
|
|
2680
|
-
a =
|
|
2680
|
+
a = g(a), l = E(l);
|
|
2681
2681
|
var C = this.map[a];
|
|
2682
2682
|
this.map[a] = C ? C + ", " + l : l;
|
|
2683
2683
|
}, y.prototype.delete = function(a) {
|
|
2684
|
-
delete this.map[
|
|
2684
|
+
delete this.map[g(a)];
|
|
2685
2685
|
}, y.prototype.get = function(a) {
|
|
2686
|
-
return a =
|
|
2686
|
+
return a = g(a), this.has(a) ? this.map[a] : null;
|
|
2687
2687
|
}, y.prototype.has = function(a) {
|
|
2688
|
-
return this.map.hasOwnProperty(
|
|
2688
|
+
return this.map.hasOwnProperty(g(a));
|
|
2689
2689
|
}, y.prototype.set = function(a, l) {
|
|
2690
|
-
this.map[
|
|
2690
|
+
this.map[g(a)] = E(l);
|
|
2691
2691
|
}, y.prototype.forEach = function(a, l) {
|
|
2692
2692
|
for (var C in this.map)
|
|
2693
2693
|
this.map.hasOwnProperty(C) && a.call(l, this.map[C], C, this);
|
|
@@ -2695,17 +2695,17 @@ var ye = { exports: {} };
|
|
|
2695
2695
|
var a = [];
|
|
2696
2696
|
return this.forEach(function(l, C) {
|
|
2697
2697
|
a.push(C);
|
|
2698
|
-
}),
|
|
2698
|
+
}), T(a);
|
|
2699
2699
|
}, y.prototype.values = function() {
|
|
2700
2700
|
var a = [];
|
|
2701
2701
|
return this.forEach(function(l) {
|
|
2702
2702
|
a.push(l);
|
|
2703
|
-
}),
|
|
2703
|
+
}), T(a);
|
|
2704
2704
|
}, y.prototype.entries = function() {
|
|
2705
2705
|
var a = [];
|
|
2706
2706
|
return this.forEach(function(l, C) {
|
|
2707
2707
|
a.push([C, l]);
|
|
2708
|
-
}),
|
|
2708
|
+
}), T(a);
|
|
2709
2709
|
}, u.iterable && (y.prototype[Symbol.iterator] = y.prototype.entries);
|
|
2710
2710
|
function N(a) {
|
|
2711
2711
|
if (a.bodyUsed)
|
|
@@ -2721,7 +2721,7 @@ var ye = { exports: {} };
|
|
|
2721
2721
|
};
|
|
2722
2722
|
});
|
|
2723
2723
|
}
|
|
2724
|
-
function
|
|
2724
|
+
function R(a) {
|
|
2725
2725
|
var l = new FileReader(), C = O(l);
|
|
2726
2726
|
return l.readAsArrayBuffer(a), C;
|
|
2727
2727
|
}
|
|
@@ -2729,20 +2729,20 @@ var ye = { exports: {} };
|
|
|
2729
2729
|
var l = new FileReader(), C = O(l);
|
|
2730
2730
|
return l.readAsText(a), C;
|
|
2731
2731
|
}
|
|
2732
|
-
function
|
|
2732
|
+
function w(a) {
|
|
2733
2733
|
for (var l = new Uint8Array(a), C = new Array(l.length), D = 0; D < l.length; D++)
|
|
2734
2734
|
C[D] = String.fromCharCode(l[D]);
|
|
2735
2735
|
return C.join("");
|
|
2736
2736
|
}
|
|
2737
|
-
function
|
|
2737
|
+
function _(a) {
|
|
2738
2738
|
if (a.slice)
|
|
2739
2739
|
return a.slice(0);
|
|
2740
2740
|
var l = new Uint8Array(a.byteLength);
|
|
2741
2741
|
return l.set(new Uint8Array(a)), l.buffer;
|
|
2742
2742
|
}
|
|
2743
|
-
function
|
|
2743
|
+
function U() {
|
|
2744
2744
|
return this.bodyUsed = !1, this._initBody = function(a) {
|
|
2745
|
-
this._bodyInit = a, a ? typeof a == "string" ? this._bodyText = a : u.blob && Blob.prototype.isPrototypeOf(a) ? this._bodyBlob = a : u.formData && FormData.prototype.isPrototypeOf(a) ? this._bodyFormData = a : u.searchParams && URLSearchParams.prototype.isPrototypeOf(a) ? this._bodyText = a.toString() : u.arrayBuffer && u.blob &&
|
|
2745
|
+
this._bodyInit = a, a ? typeof a == "string" ? this._bodyText = a : u.blob && Blob.prototype.isPrototypeOf(a) ? this._bodyBlob = a : u.formData && FormData.prototype.isPrototypeOf(a) ? this._bodyFormData = a : u.searchParams && URLSearchParams.prototype.isPrototypeOf(a) ? this._bodyText = a.toString() : u.arrayBuffer && u.blob && h(a) ? (this._bodyArrayBuffer = _(a.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : u.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(a) || m(a)) ? this._bodyArrayBuffer = _(a) : this._bodyText = a = Object.prototype.toString.call(a) : this._bodyText = "", this.headers.get("content-type") || (typeof a == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : u.searchParams && URLSearchParams.prototype.isPrototypeOf(a) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
2746
2746
|
}, u.blob && (this.blob = function() {
|
|
2747
2747
|
var a = N(this);
|
|
2748
2748
|
if (a)
|
|
@@ -2755,7 +2755,7 @@ var ye = { exports: {} };
|
|
|
2755
2755
|
throw new Error("could not read FormData body as blob");
|
|
2756
2756
|
return Promise.resolve(new Blob([this._bodyText]));
|
|
2757
2757
|
}, this.arrayBuffer = function() {
|
|
2758
|
-
return this._bodyArrayBuffer ? N(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(
|
|
2758
|
+
return this._bodyArrayBuffer ? N(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(R);
|
|
2759
2759
|
}), this.text = function() {
|
|
2760
2760
|
var a = N(this);
|
|
2761
2761
|
if (a)
|
|
@@ -2763,7 +2763,7 @@ var ye = { exports: {} };
|
|
|
2763
2763
|
if (this._bodyBlob)
|
|
2764
2764
|
return z(this._bodyBlob);
|
|
2765
2765
|
if (this._bodyArrayBuffer)
|
|
2766
|
-
return Promise.resolve(
|
|
2766
|
+
return Promise.resolve(w(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);
|
|
@@ -2798,41 +2798,41 @@ var ye = { exports: {} };
|
|
|
2798
2798
|
var l = new FormData();
|
|
2799
2799
|
return a.trim().split("&").forEach(function(C) {
|
|
2800
2800
|
if (C) {
|
|
2801
|
-
var D = C.split("="), I = D.shift().replace(/\+/g, " "),
|
|
2802
|
-
l.append(decodeURIComponent(I), decodeURIComponent(
|
|
2801
|
+
var D = C.split("="), I = D.shift().replace(/\+/g, " "), A = D.join("=").replace(/\+/g, " ");
|
|
2802
|
+
l.append(decodeURIComponent(I), decodeURIComponent(A));
|
|
2803
2803
|
}
|
|
2804
2804
|
}), l;
|
|
2805
2805
|
}
|
|
2806
2806
|
function Ge(a) {
|
|
2807
2807
|
var l = new y(), C = a.replace(/\r?\n[\t ]+/g, " ");
|
|
2808
2808
|
return C.split(/\r?\n/).forEach(function(D) {
|
|
2809
|
-
var I = D.split(":"),
|
|
2810
|
-
if (
|
|
2809
|
+
var I = D.split(":"), A = I.shift().trim();
|
|
2810
|
+
if (A) {
|
|
2811
2811
|
var X = I.join(":").trim();
|
|
2812
|
-
l.append(
|
|
2812
|
+
l.append(A, X);
|
|
2813
2813
|
}
|
|
2814
2814
|
}), l;
|
|
2815
2815
|
}
|
|
2816
|
-
|
|
2817
|
-
function
|
|
2816
|
+
U.call(P.prototype);
|
|
2817
|
+
function L(a, l) {
|
|
2818
2818
|
l || (l = {}), this.type = "default", this.status = l.status === void 0 ? 200 : l.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in l ? l.statusText : "OK", this.headers = new y(l.headers), this.url = l.url || "", this._initBody(a);
|
|
2819
2819
|
}
|
|
2820
|
-
|
|
2821
|
-
return new
|
|
2820
|
+
U.call(L.prototype), L.prototype.clone = function() {
|
|
2821
|
+
return new L(this._bodyInit, {
|
|
2822
2822
|
status: this.status,
|
|
2823
2823
|
statusText: this.statusText,
|
|
2824
2824
|
headers: new y(this.headers),
|
|
2825
2825
|
url: this.url
|
|
2826
2826
|
});
|
|
2827
|
-
},
|
|
2828
|
-
var a = new
|
|
2827
|
+
}, L.error = function() {
|
|
2828
|
+
var a = new L(null, { status: 0, statusText: "" });
|
|
2829
2829
|
return a.type = "error", a;
|
|
2830
2830
|
};
|
|
2831
2831
|
var $e = [301, 302, 303, 307, 308];
|
|
2832
|
-
|
|
2832
|
+
L.redirect = function(a, l) {
|
|
2833
2833
|
if ($e.indexOf(l) === -1)
|
|
2834
2834
|
throw new RangeError("Invalid status code");
|
|
2835
|
-
return new
|
|
2835
|
+
return new L(null, { status: l, headers: { location: a } });
|
|
2836
2836
|
}, o.DOMException = s.DOMException;
|
|
2837
2837
|
try {
|
|
2838
2838
|
new o.DOMException();
|
|
@@ -2848,33 +2848,33 @@ var ye = { exports: {} };
|
|
|
2848
2848
|
var I = new P(a, l);
|
|
2849
2849
|
if (I.signal && I.signal.aborted)
|
|
2850
2850
|
return D(new o.DOMException("Aborted", "AbortError"));
|
|
2851
|
-
var
|
|
2851
|
+
var A = new XMLHttpRequest();
|
|
2852
2852
|
function X() {
|
|
2853
|
-
|
|
2853
|
+
A.abort();
|
|
2854
2854
|
}
|
|
2855
|
-
|
|
2855
|
+
A.onload = function() {
|
|
2856
2856
|
var j = {
|
|
2857
|
-
status:
|
|
2858
|
-
statusText:
|
|
2859
|
-
headers: Ge(
|
|
2857
|
+
status: A.status,
|
|
2858
|
+
statusText: A.statusText,
|
|
2859
|
+
headers: Ge(A.getAllResponseHeaders() || "")
|
|
2860
2860
|
};
|
|
2861
|
-
j.url = "responseURL" in
|
|
2862
|
-
var ce = "response" in
|
|
2863
|
-
C(new
|
|
2864
|
-
},
|
|
2861
|
+
j.url = "responseURL" in A ? A.responseURL : j.headers.get("X-Request-URL");
|
|
2862
|
+
var ce = "response" in A ? A.response : A.responseText;
|
|
2863
|
+
C(new L(ce, j));
|
|
2864
|
+
}, A.onerror = function() {
|
|
2865
2865
|
D(new TypeError("Network request failed"));
|
|
2866
|
-
},
|
|
2866
|
+
}, A.ontimeout = function() {
|
|
2867
2867
|
D(new TypeError("Network request failed"));
|
|
2868
|
-
},
|
|
2868
|
+
}, A.onabort = function() {
|
|
2869
2869
|
D(new o.DOMException("Aborted", "AbortError"));
|
|
2870
|
-
},
|
|
2871
|
-
|
|
2872
|
-
}), I.signal && (I.signal.addEventListener("abort", X),
|
|
2873
|
-
|
|
2874
|
-
}),
|
|
2870
|
+
}, A.open(I.method, I.url, !0), I.credentials === "include" ? A.withCredentials = !0 : I.credentials === "omit" && (A.withCredentials = !1), "responseType" in A && u.blob && (A.responseType = "blob"), I.headers.forEach(function(j, ce) {
|
|
2871
|
+
A.setRequestHeader(ce, j);
|
|
2872
|
+
}), I.signal && (I.signal.addEventListener("abort", X), A.onreadystatechange = function() {
|
|
2873
|
+
A.readyState === 4 && I.signal.removeEventListener("abort", X);
|
|
2874
|
+
}), A.send(typeof I._bodyInit > "u" ? null : I._bodyInit);
|
|
2875
2875
|
});
|
|
2876
2876
|
}
|
|
2877
|
-
return ae.polyfill = !0, s.fetch || (s.fetch = ae, s.Headers = y, s.Request = P, s.Response =
|
|
2877
|
+
return ae.polyfill = !0, s.fetch || (s.fetch = ae, s.Headers = y, s.Request = P, s.Response = L), o.Headers = y, o.Request = P, o.Response = L, o.fetch = ae, Object.defineProperty(o, "__esModule", { value: !0 }), o;
|
|
2878
2878
|
})({});
|
|
2879
2879
|
})(i), i.fetch.ponyfill = !0, delete i.fetch.polyfill;
|
|
2880
2880
|
var r = i;
|
|
@@ -2884,7 +2884,7 @@ var ne = ye.exports;
|
|
|
2884
2884
|
const ee = /* @__PURE__ */ Vt(ne), jt = /* @__PURE__ */ ze({
|
|
2885
2885
|
__proto__: null,
|
|
2886
2886
|
default: ee
|
|
2887
|
-
}, [ne]),
|
|
2887
|
+
}, [ne]), B = (e) => {
|
|
2888
2888
|
let t = {};
|
|
2889
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, i]) => {
|
|
2890
2890
|
n && i !== void 0 && (t[n] = i);
|
|
@@ -2902,68 +2902,68 @@ const ee = /* @__PURE__ */ Vt(ne), jt = /* @__PURE__ */ ze({
|
|
|
2902
2902
|
}), i), []);
|
|
2903
2903
|
return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
|
|
2904
2904
|
}, $t = (e) => async (t) => {
|
|
2905
|
-
const { url: n, query: i, variables: r, operationName: s, fetch: o, fetchOptions: u, middleware:
|
|
2906
|
-
let m = "",
|
|
2907
|
-
e === "POST" ? (
|
|
2905
|
+
const { url: n, query: i, variables: r, operationName: s, fetch: o, fetchOptions: u, middleware: h } = t, p = { ...t.headers };
|
|
2906
|
+
let m = "", g;
|
|
2907
|
+
e === "POST" ? (g = Yt(i, r, s, u.jsonSerializer), typeof g == "string" && (p["Content-Type"] = "application/json")) : m = Gt({
|
|
2908
2908
|
query: i,
|
|
2909
2909
|
variables: r,
|
|
2910
2910
|
operationName: s,
|
|
2911
|
-
jsonSerializer: u.jsonSerializer ??
|
|
2911
|
+
jsonSerializer: u.jsonSerializer ?? Ee
|
|
2912
2912
|
});
|
|
2913
|
-
const
|
|
2913
|
+
const E = {
|
|
2914
2914
|
method: e,
|
|
2915
|
-
headers:
|
|
2916
|
-
body:
|
|
2915
|
+
headers: p,
|
|
2916
|
+
body: g,
|
|
2917
2917
|
...u
|
|
2918
2918
|
};
|
|
2919
|
-
let
|
|
2920
|
-
if (
|
|
2921
|
-
const N = await Promise.resolve(
|
|
2922
|
-
|
|
2919
|
+
let T = n, y = E;
|
|
2920
|
+
if (h) {
|
|
2921
|
+
const N = await Promise.resolve(h({ ...E, url: n, operationName: s, variables: r })), { url: O, ...R } = N;
|
|
2922
|
+
T = O, y = R;
|
|
2923
2923
|
}
|
|
2924
|
-
return m && (
|
|
2924
|
+
return m && (T = `${T}?${m}`), await o(T, y);
|
|
2925
2925
|
};
|
|
2926
2926
|
class Ht {
|
|
2927
2927
|
constructor(t, n = {}) {
|
|
2928
2928
|
this.url = t, this.requestConfig = n, this.rawRequest = async (...i) => {
|
|
2929
|
-
const [r, s, o] = i, u = We(r, s, o), { headers:
|
|
2930
|
-
u.signal !== void 0 && (
|
|
2929
|
+
const [r, s, o] = i, u = We(r, s, o), { headers: h, fetch: p = ee, method: m = "POST", requestMiddleware: g, responseMiddleware: E, ...T } = this.requestConfig, { url: y } = this;
|
|
2930
|
+
u.signal !== void 0 && (T.signal = u.signal);
|
|
2931
2931
|
const { operationName: N } = le(u.query);
|
|
2932
2932
|
return de({
|
|
2933
2933
|
url: y,
|
|
2934
2934
|
query: u.query,
|
|
2935
2935
|
variables: u.variables,
|
|
2936
2936
|
headers: {
|
|
2937
|
-
...
|
|
2938
|
-
...
|
|
2937
|
+
...B(he(h)),
|
|
2938
|
+
...B(u.requestHeaders)
|
|
2939
2939
|
},
|
|
2940
2940
|
operationName: N,
|
|
2941
|
-
fetch:
|
|
2941
|
+
fetch: p,
|
|
2942
2942
|
method: m,
|
|
2943
|
-
fetchOptions:
|
|
2944
|
-
middleware:
|
|
2945
|
-
}).then((O) => (
|
|
2946
|
-
throw
|
|
2943
|
+
fetchOptions: T,
|
|
2944
|
+
middleware: g
|
|
2945
|
+
}).then((O) => (E && E(O), O)).catch((O) => {
|
|
2946
|
+
throw E && E(O), O;
|
|
2947
2947
|
});
|
|
2948
2948
|
};
|
|
2949
2949
|
}
|
|
2950
2950
|
async request(t, ...n) {
|
|
2951
|
-
const [i, r] = n, s = Xe(t, i, r), { headers: o, fetch: u = ee, method:
|
|
2952
|
-
s.signal !== void 0 && (
|
|
2953
|
-
const { query:
|
|
2951
|
+
const [i, r] = n, s = Xe(t, i, r), { headers: o, fetch: u = ee, method: h = "POST", requestMiddleware: p, responseMiddleware: m, ...g } = this.requestConfig, { url: E } = this;
|
|
2952
|
+
s.signal !== void 0 && (g.signal = s.signal);
|
|
2953
|
+
const { query: T, operationName: y } = le(s.document);
|
|
2954
2954
|
return de({
|
|
2955
|
-
url:
|
|
2956
|
-
query:
|
|
2955
|
+
url: E,
|
|
2956
|
+
query: T,
|
|
2957
2957
|
variables: s.variables,
|
|
2958
2958
|
headers: {
|
|
2959
|
-
...
|
|
2960
|
-
...
|
|
2959
|
+
...B(he(o)),
|
|
2960
|
+
...B(s.requestHeaders)
|
|
2961
2961
|
},
|
|
2962
2962
|
operationName: y,
|
|
2963
2963
|
fetch: u,
|
|
2964
|
-
method:
|
|
2965
|
-
fetchOptions:
|
|
2966
|
-
middleware:
|
|
2964
|
+
method: h,
|
|
2965
|
+
fetchOptions: g,
|
|
2966
|
+
middleware: p
|
|
2967
2967
|
}).then((N) => (m && m(N), N.data)).catch((N) => {
|
|
2968
2968
|
throw m && m(N), N;
|
|
2969
2969
|
});
|
|
@@ -2972,23 +2972,23 @@ class Ht {
|
|
|
2972
2972
|
batchRequests(t, n) {
|
|
2973
2973
|
const i = Ze(t, n), { headers: r, ...s } = this.requestConfig;
|
|
2974
2974
|
i.signal !== void 0 && (s.signal = i.signal);
|
|
2975
|
-
const o = i.documents.map(({ document:
|
|
2975
|
+
const o = i.documents.map(({ document: h }) => le(h).query), u = i.documents.map(({ variables: h }) => h);
|
|
2976
2976
|
return de({
|
|
2977
2977
|
url: this.url,
|
|
2978
2978
|
query: o,
|
|
2979
2979
|
// @ts-expect-error TODO reconcile batch variables into system.
|
|
2980
2980
|
variables: u,
|
|
2981
2981
|
headers: {
|
|
2982
|
-
...
|
|
2983
|
-
...
|
|
2982
|
+
...B(he(r)),
|
|
2983
|
+
...B(i.requestHeaders)
|
|
2984
2984
|
},
|
|
2985
2985
|
operationName: void 0,
|
|
2986
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((
|
|
2991
|
-
throw this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(
|
|
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,11 +3009,11 @@ class Ht {
|
|
|
3009
3009
|
}
|
|
3010
3010
|
}
|
|
3011
3011
|
const de = async (e) => {
|
|
3012
|
-
const { query: t, variables: n, fetchOptions: i } = e, r = $t(Qe(e.method ?? "post")), s = Array.isArray(e.query), o = await r(e), u = await zt(o, i.jsonSerializer ??
|
|
3013
|
-
if (o.ok &&
|
|
3014
|
-
const { errors: m, ...
|
|
3012
|
+
const { query: t, variables: n, fetchOptions: i } = e, r = $t(Qe(e.method ?? "post")), s = Array.isArray(e.query), o = await r(e), u = await zt(o, i.jsonSerializer ?? Ee), h = Array.isArray(u) ? !u.some(({ data: m }) => !m) : !!u.data, p = Array.isArray(u) || !u.errors || Array.isArray(u.errors) && !u.errors.length || i.errorPolicy === "all" || i.errorPolicy === "ignore";
|
|
3013
|
+
if (o.ok && p && h) {
|
|
3014
|
+
const { errors: m, ...g } = (Array.isArray(u), u), E = i.errorPolicy === "ignore" ? g : u;
|
|
3015
3015
|
return {
|
|
3016
|
-
...s ? { data:
|
|
3016
|
+
...s ? { data: E } : E,
|
|
3017
3017
|
headers: o.headers,
|
|
3018
3018
|
status: o.status
|
|
3019
3019
|
};
|
|
@@ -3028,19 +3028,19 @@ const de = async (e) => {
|
|
|
3028
3028
|
);
|
|
3029
3029
|
}
|
|
3030
3030
|
}, Yt = (e, t, n, i) => {
|
|
3031
|
-
const r = i ??
|
|
3031
|
+
const r = i ?? Ee;
|
|
3032
3032
|
if (!Array.isArray(e))
|
|
3033
3033
|
return r.stringify({ query: e, variables: t, operationName: n });
|
|
3034
3034
|
if (typeof t < "u" && !Array.isArray(t))
|
|
3035
3035
|
throw new Error("Cannot create request body with given variable type, array expected");
|
|
3036
|
-
const s = e.reduce((o, u,
|
|
3036
|
+
const s = e.reduce((o, u, h) => (o.push({ query: u, variables: t ? t[h] : void 0 }), o), []);
|
|
3037
3037
|
return r.stringify(s);
|
|
3038
3038
|
}, zt = async (e, t) => {
|
|
3039
3039
|
let n;
|
|
3040
3040
|
return e.headers.forEach((i, r) => {
|
|
3041
3041
|
r.toLowerCase() === "content-type" && (n = i);
|
|
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
|
+
}, he = (e) => typeof e == "function" ? e() : e;
|
|
3044
3044
|
var re = function() {
|
|
3045
3045
|
return re = Object.assign || function(t) {
|
|
3046
3046
|
for (var n, i = 1, r = arguments.length; i < r; i++) {
|
|
@@ -3051,7 +3051,7 @@ var re = function() {
|
|
|
3051
3051
|
return t;
|
|
3052
3052
|
}, re.apply(this, arguments);
|
|
3053
3053
|
};
|
|
3054
|
-
var te = /* @__PURE__ */ new Map(),
|
|
3054
|
+
var te = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), qe = !0, ie = !1;
|
|
3055
3055
|
function Ve(e) {
|
|
3056
3056
|
return e.replace(/[\s,]+/g, " ").trim();
|
|
3057
3057
|
}
|
|
@@ -3062,10 +3062,10 @@ function Jt(e) {
|
|
|
3062
3062
|
var t = /* @__PURE__ */ new Set(), n = [];
|
|
3063
3063
|
return e.definitions.forEach(function(i) {
|
|
3064
3064
|
if (i.kind === "FragmentDefinition") {
|
|
3065
|
-
var r = i.name.value, s = Qt(i.loc), o =
|
|
3065
|
+
var r = i.name.value, s = Qt(i.loc), o = ge.get(r);
|
|
3066
3066
|
o && !o.has(s) ? qe && console.warn("Warning: fragment with name " + r + ` already exists.
|
|
3067
3067
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
3068
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o ||
|
|
3068
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || ge.set(r, o = /* @__PURE__ */ new Set()), o.add(s), t.has(s) || (t.add(s), n.push(i));
|
|
3069
3069
|
} else
|
|
3070
3070
|
n.push(i);
|
|
3071
3071
|
}), re(re({}, e), { definitions: n });
|
|
@@ -3084,7 +3084,7 @@ function Xt(e) {
|
|
|
3084
3084
|
function Wt(e) {
|
|
3085
3085
|
var t = Ve(e);
|
|
3086
3086
|
if (!te.has(t)) {
|
|
3087
|
-
var n =
|
|
3087
|
+
var n = Be(e, {
|
|
3088
3088
|
experimentalFragmentVariables: ie,
|
|
3089
3089
|
allowLegacyFragmentVariables: ie
|
|
3090
3090
|
});
|
|
@@ -3104,7 +3104,7 @@ function q(e) {
|
|
|
3104
3104
|
}), Wt(i);
|
|
3105
3105
|
}
|
|
3106
3106
|
function Zt() {
|
|
3107
|
-
te.clear(),
|
|
3107
|
+
te.clear(), ge.clear();
|
|
3108
3108
|
}
|
|
3109
3109
|
function Kt() {
|
|
3110
3110
|
qe = !1;
|
|
@@ -3126,7 +3126,7 @@ var G = {
|
|
|
3126
3126
|
e.gql = G.gql, e.resetCaches = G.resetCaches, e.disableFragmentWarnings = G.disableFragmentWarnings, e.enableExperimentalFragmentVariables = G.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = G.disableExperimentalFragmentVariables;
|
|
3127
3127
|
})(q || (q = {}));
|
|
3128
3128
|
q.default = q;
|
|
3129
|
-
const
|
|
3129
|
+
const k = q, nn = k`
|
|
3130
3130
|
query GetLocationAvailabilities($sku: String!, $first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
3131
3131
|
locationAvailabilities(
|
|
3132
3132
|
sku: $sku
|
|
@@ -3139,6 +3139,7 @@ const L = q, nn = L`
|
|
|
3139
3139
|
id
|
|
3140
3140
|
name
|
|
3141
3141
|
phone
|
|
3142
|
+
mapURL
|
|
3142
3143
|
address {
|
|
3143
3144
|
id
|
|
3144
3145
|
countryCode
|
|
@@ -3163,13 +3164,14 @@ const L = q, nn = L`
|
|
|
3163
3164
|
}
|
|
3164
3165
|
}
|
|
3165
3166
|
}
|
|
3166
|
-
`, rn =
|
|
3167
|
+
`, rn = k`
|
|
3167
3168
|
query GetLocationAvailability($sku: String!, $locationID: ID!) {
|
|
3168
3169
|
locationAvailability(sku: $sku, locationID: $locationID) {
|
|
3169
3170
|
location {
|
|
3170
3171
|
id
|
|
3171
3172
|
name
|
|
3172
3173
|
phone
|
|
3174
|
+
mapURL
|
|
3173
3175
|
address {
|
|
3174
3176
|
id
|
|
3175
3177
|
countryCode
|
|
@@ -3187,7 +3189,7 @@ const L = q, nn = L`
|
|
|
3187
3189
|
inventoryQuantity
|
|
3188
3190
|
}
|
|
3189
3191
|
}
|
|
3190
|
-
`, sn =
|
|
3192
|
+
`, sn = k`
|
|
3191
3193
|
query GetPurchasingCustomerMetafield($namespace: String!, $key: String!) {
|
|
3192
3194
|
purchasingCustomerMetafield(namespace: $namespace, key: $key) {
|
|
3193
3195
|
id
|
|
@@ -3196,20 +3198,21 @@ const L = q, nn = L`
|
|
|
3196
3198
|
value
|
|
3197
3199
|
}
|
|
3198
3200
|
}
|
|
3199
|
-
`, on =
|
|
3201
|
+
`, on = k`
|
|
3200
3202
|
query GetPoints {
|
|
3201
3203
|
purchasingCustomer {
|
|
3202
3204
|
pointsApproved
|
|
3203
3205
|
pointsPending
|
|
3204
3206
|
}
|
|
3205
3207
|
}
|
|
3206
|
-
`, an =
|
|
3208
|
+
`, an = k`
|
|
3207
3209
|
query GetLocations($first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
3208
3210
|
locations(first: $first, after: $after, isReverse: $isReverse) {
|
|
3209
3211
|
nodes {
|
|
3210
3212
|
id
|
|
3211
3213
|
name
|
|
3212
3214
|
phone
|
|
3215
|
+
mapURL
|
|
3213
3216
|
address {
|
|
3214
3217
|
id
|
|
3215
3218
|
countryCode
|
|
@@ -3232,7 +3235,7 @@ const L = q, nn = L`
|
|
|
3232
3235
|
}
|
|
3233
3236
|
}
|
|
3234
3237
|
}
|
|
3235
|
-
`, cn =
|
|
3238
|
+
`, cn = k`
|
|
3236
3239
|
query GetPurchasingCustomerDiscounts($first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
3237
3240
|
purchasingCustomer {
|
|
3238
3241
|
id
|
|
@@ -3261,14 +3264,14 @@ const L = q, nn = L`
|
|
|
3261
3264
|
}
|
|
3262
3265
|
}
|
|
3263
3266
|
}
|
|
3264
|
-
`, un =
|
|
3267
|
+
`, un = k`
|
|
3265
3268
|
query GetPurchasingCustomerDiscountCodeCount {
|
|
3266
3269
|
purchasingCustomer {
|
|
3267
3270
|
id
|
|
3268
3271
|
orderPriceAdjustmentRuleCount
|
|
3269
3272
|
}
|
|
3270
3273
|
}
|
|
3271
|
-
`, ln =
|
|
3274
|
+
`, ln = k`
|
|
3272
3275
|
query GetPurchasingCustomerPointChangeActivities($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: PointChangeActivitySortKey! = CREATED_AT) {
|
|
3273
3276
|
purchasingCustomer {
|
|
3274
3277
|
id
|
|
@@ -3294,6 +3297,7 @@ const L = q, nn = L`
|
|
|
3294
3297
|
id
|
|
3295
3298
|
name
|
|
3296
3299
|
phone
|
|
3300
|
+
mapURL
|
|
3297
3301
|
address {
|
|
3298
3302
|
id
|
|
3299
3303
|
countryCode
|
|
@@ -3318,7 +3322,7 @@ const L = q, nn = L`
|
|
|
3318
3322
|
}
|
|
3319
3323
|
}
|
|
3320
3324
|
}
|
|
3321
|
-
`, dn =
|
|
3325
|
+
`, dn = k`
|
|
3322
3326
|
query GetPurchasingCustomerRank {
|
|
3323
3327
|
purchasingCustomer {
|
|
3324
3328
|
currentCustomerRank {
|
|
@@ -3357,8 +3361,26 @@ const L = q, nn = L`
|
|
|
3357
3361
|
}
|
|
3358
3362
|
}
|
|
3359
3363
|
}
|
|
3360
|
-
`,
|
|
3361
|
-
|
|
3364
|
+
`, hn = k`
|
|
3365
|
+
query GetSharingPurchasingCustomerCount {
|
|
3366
|
+
purchasingCustomer {
|
|
3367
|
+
id
|
|
3368
|
+
sharingPurchasingCustomerCount
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3371
|
+
`, pn = k`
|
|
3372
|
+
mutation PurchasingCustomerSendCustomerSharingActivationCode {
|
|
3373
|
+
purchasingCustomerSendCustomerSharingActivationCode {
|
|
3374
|
+
purchasingCustomer {
|
|
3375
|
+
id
|
|
3376
|
+
}
|
|
3377
|
+
customerSharingActivationCode {
|
|
3378
|
+
id
|
|
3379
|
+
}
|
|
3380
|
+
}
|
|
3381
|
+
}
|
|
3382
|
+
`, fn = (e, t, n, i) => e();
|
|
3383
|
+
function mn(e, t = fn) {
|
|
3362
3384
|
return {
|
|
3363
3385
|
GetLocationAvailabilities(n, i) {
|
|
3364
3386
|
return t((r) => e.request(nn, n, { ...i, ...r }), "GetLocationAvailabilities", "query", n);
|
|
@@ -3386,13 +3408,19 @@ function hn(e, t = pn) {
|
|
|
3386
3408
|
},
|
|
3387
3409
|
GetPurchasingCustomerRank(n, i) {
|
|
3388
3410
|
return t((r) => e.request(dn, n, { ...i, ...r }), "GetPurchasingCustomerRank", "query", n);
|
|
3411
|
+
},
|
|
3412
|
+
GetSharingPurchasingCustomerCount(n, i) {
|
|
3413
|
+
return t((r) => e.request(hn, n, { ...i, ...r }), "GetSharingPurchasingCustomerCount", "query", n);
|
|
3414
|
+
},
|
|
3415
|
+
PurchasingCustomerSendCustomerSharingActivationCode(n, i) {
|
|
3416
|
+
return t((r) => e.request(pn, n, { ...i, ...r }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
|
|
3389
3417
|
}
|
|
3390
3418
|
};
|
|
3391
3419
|
}
|
|
3392
|
-
class
|
|
3420
|
+
class gn {
|
|
3393
3421
|
constructor(t) {
|
|
3394
|
-
|
|
3395
|
-
this.api =
|
|
3422
|
+
Ae(this, "api");
|
|
3423
|
+
this.api = mn(
|
|
3396
3424
|
new Ht(`${t}/apps/sq-api`, {
|
|
3397
3425
|
headers: {
|
|
3398
3426
|
"X-SQ-CLIENT": "ShopifyAppProxy"
|
|
@@ -3422,6 +3450,7 @@ class mn {
|
|
|
3422
3450
|
id: o.location.id,
|
|
3423
3451
|
name: o.location.name,
|
|
3424
3452
|
phone: o.location.phone,
|
|
3453
|
+
mapURL: o.location.mapURL,
|
|
3425
3454
|
address: o.location.address ? {
|
|
3426
3455
|
id: o.location.address.id,
|
|
3427
3456
|
countryCode: o.location.address.countryCode,
|
|
@@ -3452,6 +3481,7 @@ class mn {
|
|
|
3452
3481
|
id: i.locationAvailability.location.id,
|
|
3453
3482
|
name: i.locationAvailability.location.name,
|
|
3454
3483
|
phone: i.locationAvailability.location.phone,
|
|
3484
|
+
mapURL: i.locationAvailability.location.mapURL,
|
|
3455
3485
|
address: i.locationAvailability.location.address ? {
|
|
3456
3486
|
id: i.locationAvailability.location.address.id,
|
|
3457
3487
|
countryCode: i.locationAvailability.location.address.countryCode,
|
|
@@ -3505,6 +3535,7 @@ class mn {
|
|
|
3505
3535
|
id: s.id,
|
|
3506
3536
|
name: s.name,
|
|
3507
3537
|
phone: s.phone,
|
|
3538
|
+
mapURL: s.mapURL,
|
|
3508
3539
|
address: s.address ? {
|
|
3509
3540
|
id: s.address.id,
|
|
3510
3541
|
countryCode: s.address.countryCode,
|
|
@@ -3591,6 +3622,7 @@ class mn {
|
|
|
3591
3622
|
id: o.retailLocation.id,
|
|
3592
3623
|
name: o.retailLocation.name,
|
|
3593
3624
|
phone: o.retailLocation.phone,
|
|
3625
|
+
mapURL: o.retailLocation.mapURL,
|
|
3594
3626
|
address: o.retailLocation.address ? {
|
|
3595
3627
|
id: o.retailLocation.address.id,
|
|
3596
3628
|
countryCode: o.retailLocation.address.countryCode,
|
|
@@ -3660,7 +3692,24 @@ class mn {
|
|
|
3660
3692
|
var n;
|
|
3661
3693
|
return ((n = (await this.api.GetPurchasingCustomerDiscountCodeCount()).purchasingCustomer) == null ? void 0 : n.orderPriceAdjustmentRuleCount) ?? 0;
|
|
3662
3694
|
}
|
|
3695
|
+
/**
|
|
3696
|
+
* getSharingPurchasingCustomerCount は顧客が共有化している数を返します。
|
|
3697
|
+
*/
|
|
3698
|
+
async getSharingPurchasingCustomerCount() {
|
|
3699
|
+
var n;
|
|
3700
|
+
return ((n = (await this.api.GetSharingPurchasingCustomerCount()).purchasingCustomer) == null ? void 0 : n.sharingPurchasingCustomerCount) ?? 0;
|
|
3701
|
+
}
|
|
3702
|
+
/**
|
|
3703
|
+
* purchasingCustomerSendCustomerSharingActivationCode はログインしているアカウントのメールアドレスに顧客情報共有のためのアクティベーションコードを送信する。
|
|
3704
|
+
*/
|
|
3705
|
+
async purchasingCustomerSendCustomerSharingActivationCode() {
|
|
3706
|
+
const t = await this.api.PurchasingCustomerSendCustomerSharingActivationCode();
|
|
3707
|
+
return t.purchasingCustomerSendCustomerSharingActivationCode ? {
|
|
3708
|
+
purchasingCustomerID: t.purchasingCustomerSendCustomerSharingActivationCode.purchasingCustomer.id,
|
|
3709
|
+
customerSharingActivationCodeID: t.purchasingCustomerSendCustomerSharingActivationCode.customerSharingActivationCode.id
|
|
3710
|
+
} : null;
|
|
3711
|
+
}
|
|
3663
3712
|
}
|
|
3664
3713
|
export {
|
|
3665
|
-
|
|
3714
|
+
gn as SDK
|
|
3666
3715
|
};
|