@builtbystack/sq-shopify-theme-sdk 0.0.25 → 0.0.28
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 +138 -11
- package/dist/sq-shopify-theme-sdk.d.ts +84 -22
- package/dist/sq-shopify-theme-sdk.js +594 -542
- package/dist/sq-shopify-theme-sdk.umd.js +68 -49
- package/package.json +4 -2
|
@@ -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 Te = (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 r = t[n];
|
|
@@ -54,34 +54,34 @@ function he(e, t) {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
function We(e) {
|
|
57
|
-
return
|
|
57
|
+
return Oe(
|
|
58
58
|
e.source,
|
|
59
59
|
he(e.source, e.start)
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1,
|
|
64
|
-
`, m = r.split(/\r\n|[\n\r]/g),
|
|
65
|
-
if (
|
|
66
|
-
const
|
|
67
|
-
for (let
|
|
68
|
-
g.push(
|
|
69
|
-
return h +
|
|
70
|
-
[`${
|
|
71
|
-
...g.slice(1,
|
|
72
|
-
["|", "^".padStart(
|
|
73
|
-
["|", g[
|
|
62
|
+
function Oe(e, t) {
|
|
63
|
+
const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, c = t.line === 1 ? n : 0, p = t.column + c, h = `${e.name}:${a}:${p}
|
|
64
|
+
`, m = r.split(/\r\n|[\n\r]/g), C = m[i];
|
|
65
|
+
if (C.length > 120) {
|
|
66
|
+
const y = Math.floor(p / 80), A = p % 80, g = [];
|
|
67
|
+
for (let I = 0; I < C.length; I += 80)
|
|
68
|
+
g.push(C.slice(I, I + 80));
|
|
69
|
+
return h + Ae([
|
|
70
|
+
[`${a} |`, g[0]],
|
|
71
|
+
...g.slice(1, y + 1).map((I) => ["|", I]),
|
|
72
|
+
["|", "^".padStart(A)],
|
|
73
|
+
["|", g[y + 1]]
|
|
74
74
|
]);
|
|
75
75
|
}
|
|
76
|
-
return h +
|
|
76
|
+
return h + Ae([
|
|
77
77
|
// Lines specified like this: ["prefix", "string"],
|
|
78
|
-
[`${
|
|
79
|
-
[`${
|
|
78
|
+
[`${a - 1} |`, m[i - 1]],
|
|
79
|
+
[`${a} |`, C],
|
|
80
80
|
["|", "^".padStart(p)],
|
|
81
|
-
[`${
|
|
81
|
+
[`${a + 1} |`, m[i + 1]]
|
|
82
82
|
]);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function Ae(e) {
|
|
85
85
|
const t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length));
|
|
86
86
|
return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(`
|
|
87
87
|
`);
|
|
@@ -97,7 +97,7 @@ function Ke(e) {
|
|
|
97
97
|
extensions: e[5]
|
|
98
98
|
} : t;
|
|
99
99
|
}
|
|
100
|
-
class
|
|
100
|
+
class ye extends Error {
|
|
101
101
|
/**
|
|
102
102
|
* An array of `{ line, column }` locations within the source GraphQL document
|
|
103
103
|
* which correspond to this error.
|
|
@@ -138,18 +138,18 @@ class Ce extends Error {
|
|
|
138
138
|
*/
|
|
139
139
|
constructor(t, ...n) {
|
|
140
140
|
var r, i, s;
|
|
141
|
-
const { nodes:
|
|
142
|
-
super(t), this.name = "GraphQLError", this.path = h ?? void 0, this.originalError = m ?? void 0, this.nodes =
|
|
143
|
-
Array.isArray(
|
|
141
|
+
const { nodes: a, source: c, positions: p, path: h, originalError: m, extensions: C } = Ke(n);
|
|
142
|
+
super(t), this.name = "GraphQLError", this.path = h ?? void 0, this.originalError = m ?? void 0, this.nodes = Ie(
|
|
143
|
+
Array.isArray(a) ? a : a ? [a] : void 0
|
|
144
144
|
);
|
|
145
|
-
const
|
|
145
|
+
const y = Ie(
|
|
146
146
|
(r = this.nodes) === null || r === void 0 ? void 0 : r.map((g) => g.loc).filter((g) => g != null)
|
|
147
147
|
);
|
|
148
|
-
this.source = c ?? (
|
|
149
|
-
const
|
|
148
|
+
this.source = c ?? (y == null || (i = y[0]) === null || i === void 0 ? void 0 : i.source), this.positions = p ?? (y == null ? void 0 : y.map((g) => g.start)), this.locations = p && c ? p.map((g) => he(c, g)) : y == null ? void 0 : y.map((g) => he(g.source, g.start));
|
|
149
|
+
const A = Je(
|
|
150
150
|
m == null ? void 0 : m.extensions
|
|
151
151
|
) ? m == null ? void 0 : m.extensions : void 0;
|
|
152
|
-
this.extensions = (s =
|
|
152
|
+
this.extensions = (s = C ?? A) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
153
153
|
message: {
|
|
154
154
|
writable: !0,
|
|
155
155
|
enumerable: !0
|
|
@@ -173,7 +173,7 @@ class Ce extends Error {
|
|
|
173
173
|
value: m.stack,
|
|
174
174
|
writable: !0,
|
|
175
175
|
configurable: !0
|
|
176
|
-
}) : Error.captureStackTrace ? Error.captureStackTrace(this,
|
|
176
|
+
}) : Error.captureStackTrace ? Error.captureStackTrace(this, ye) : Object.defineProperty(this, "stack", {
|
|
177
177
|
value: Error().stack,
|
|
178
178
|
writable: !0,
|
|
179
179
|
configurable: !0
|
|
@@ -193,7 +193,7 @@ class Ce extends Error {
|
|
|
193
193
|
for (const n of this.locations)
|
|
194
194
|
t += `
|
|
195
195
|
|
|
196
|
-
` +
|
|
196
|
+
` + Oe(this.source, n);
|
|
197
197
|
return t;
|
|
198
198
|
}
|
|
199
199
|
toJSON() {
|
|
@@ -203,11 +203,11 @@ class Ce extends Error {
|
|
|
203
203
|
return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Ie(e) {
|
|
207
207
|
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
return new
|
|
209
|
+
function N(e, t, n) {
|
|
210
|
+
return new ye(`Syntax Error: ${n}`, {
|
|
211
211
|
source: e,
|
|
212
212
|
positions: [t]
|
|
213
213
|
});
|
|
@@ -241,7 +241,7 @@ class Ze {
|
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
class
|
|
244
|
+
class Pe {
|
|
245
245
|
/**
|
|
246
246
|
* The kind of Token.
|
|
247
247
|
*/
|
|
@@ -268,8 +268,8 @@ class Oe {
|
|
|
268
268
|
* including ignored tokens. <SOF> is always the first node and <EOF>
|
|
269
269
|
* the last.
|
|
270
270
|
*/
|
|
271
|
-
constructor(t, n, r, i, s,
|
|
272
|
-
this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value =
|
|
271
|
+
constructor(t, n, r, i, s, a) {
|
|
272
|
+
this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = a, this.prev = null, this.next = null;
|
|
273
273
|
}
|
|
274
274
|
get [Symbol.toStringTag]() {
|
|
275
275
|
return "Token";
|
|
@@ -283,7 +283,7 @@ class Oe {
|
|
|
283
283
|
};
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const De = {
|
|
287
287
|
Name: [],
|
|
288
288
|
Document: ["definitions"],
|
|
289
289
|
OperationDefinition: [
|
|
@@ -357,15 +357,15 @@ const ke = {
|
|
|
357
357
|
UnionTypeExtension: ["name", "directives", "types"],
|
|
358
358
|
EnumTypeExtension: ["name", "directives", "values"],
|
|
359
359
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
360
|
-
}, et = new Set(Object.keys(
|
|
361
|
-
function
|
|
360
|
+
}, et = new Set(Object.keys(De));
|
|
361
|
+
function Se(e) {
|
|
362
362
|
const t = e == null ? void 0 : e.kind;
|
|
363
363
|
return typeof t == "string" && et.has(t);
|
|
364
364
|
}
|
|
365
|
-
var
|
|
365
|
+
var M;
|
|
366
366
|
(function(e) {
|
|
367
367
|
e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
|
|
368
|
-
})(
|
|
368
|
+
})(M || (M = {}));
|
|
369
369
|
var fe;
|
|
370
370
|
(function(e) {
|
|
371
371
|
e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
|
|
@@ -380,43 +380,43 @@ function me(e) {
|
|
|
380
380
|
function Y(e) {
|
|
381
381
|
return e >= 48 && e <= 57;
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function ke(e) {
|
|
384
384
|
return e >= 97 && e <= 122 || // A-Z
|
|
385
385
|
e >= 65 && e <= 90;
|
|
386
386
|
}
|
|
387
387
|
function _e(e) {
|
|
388
|
-
return
|
|
388
|
+
return ke(e) || e === 95;
|
|
389
389
|
}
|
|
390
390
|
function tt(e) {
|
|
391
|
-
return
|
|
391
|
+
return ke(e) || Y(e) || e === 95;
|
|
392
392
|
}
|
|
393
393
|
function nt(e) {
|
|
394
394
|
var t;
|
|
395
395
|
let n = Number.MAX_SAFE_INTEGER, r = null, i = -1;
|
|
396
|
-
for (let
|
|
396
|
+
for (let a = 0; a < e.length; ++a) {
|
|
397
397
|
var s;
|
|
398
|
-
const c = e[
|
|
399
|
-
p !== c.length && (r = (s = r) !== null && s !== void 0 ? s :
|
|
398
|
+
const c = e[a], p = it(c);
|
|
399
|
+
p !== c.length && (r = (s = r) !== null && s !== void 0 ? s : a, i = a, a !== 0 && p < n && (n = p));
|
|
400
400
|
}
|
|
401
|
-
return e.map((
|
|
401
|
+
return e.map((a, c) => c === 0 ? a : a.slice(n)).slice(
|
|
402
402
|
(t = r) !== null && t !== void 0 ? t : 0,
|
|
403
403
|
i + 1
|
|
404
404
|
);
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function it(e) {
|
|
407
407
|
let t = 0;
|
|
408
408
|
for (; t < e.length && me(e.charCodeAt(t)); )
|
|
409
409
|
++t;
|
|
410
410
|
return t;
|
|
411
411
|
}
|
|
412
|
-
function
|
|
413
|
-
const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((
|
|
414
|
-
(!i || e.length > 70 || h || s ||
|
|
415
|
-
let
|
|
416
|
-
const
|
|
417
|
-
return (m && !
|
|
418
|
-
`),
|
|
419
|
-
`), '"""' +
|
|
412
|
+
function rt(e, t) {
|
|
413
|
+
const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((A) => A.length === 0 || me(A.charCodeAt(0))), a = n.endsWith('\\"""'), c = e.endsWith('"') && !a, p = e.endsWith("\\"), h = c || p, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
414
|
+
(!i || e.length > 70 || h || s || a);
|
|
415
|
+
let C = "";
|
|
416
|
+
const y = i && me(e.charCodeAt(0));
|
|
417
|
+
return (m && !y || s) && (C += `
|
|
418
|
+
`), C += n, (m || h) && (C += `
|
|
419
|
+
`), '"""' + C + '"""';
|
|
420
420
|
}
|
|
421
421
|
var u;
|
|
422
422
|
(function(e) {
|
|
@@ -436,7 +436,7 @@ class st {
|
|
|
436
436
|
* The character offset at which the current line begins.
|
|
437
437
|
*/
|
|
438
438
|
constructor(t) {
|
|
439
|
-
const n = new
|
|
439
|
+
const n = new Pe(u.SOF, 0, 0, 0, 0);
|
|
440
440
|
this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
|
|
441
441
|
}
|
|
442
442
|
get [Symbol.toStringTag]() {
|
|
@@ -459,14 +459,14 @@ class st {
|
|
|
459
459
|
if (t.next)
|
|
460
460
|
t = t.next;
|
|
461
461
|
else {
|
|
462
|
-
const n =
|
|
462
|
+
const n = ot(this, t.end);
|
|
463
463
|
t.next = n, n.prev = t, t = n;
|
|
464
464
|
}
|
|
465
465
|
while (t.kind === u.COMMENT);
|
|
466
466
|
return t;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function at(e) {
|
|
470
470
|
return e === u.BANG || e === u.DOLLAR || e === u.AMP || e === u.PAREN_L || e === u.PAREN_R || e === u.SPREAD || e === u.COLON || e === u.EQUALS || e === u.AT || e === u.BRACKET_L || e === u.BRACKET_R || e === u.BRACE_L || e === u.PIPE || e === u.BRACE_R;
|
|
471
471
|
}
|
|
472
472
|
function G(e) {
|
|
@@ -491,11 +491,11 @@ function F(e, t) {
|
|
|
491
491
|
}
|
|
492
492
|
return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
|
|
493
493
|
}
|
|
494
|
-
function
|
|
495
|
-
const s = e.line,
|
|
496
|
-
return new
|
|
494
|
+
function S(e, t, n, r, i) {
|
|
495
|
+
const s = e.line, a = 1 + n - e.lineStart;
|
|
496
|
+
return new Pe(t, n, r, s, a, i);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function ot(e, t) {
|
|
499
499
|
const n = e.source.body, r = n.length;
|
|
500
500
|
let i = t;
|
|
501
501
|
for (; i < r; ) {
|
|
@@ -516,35 +516,35 @@ function at(e, t) {
|
|
|
516
516
|
case 35:
|
|
517
517
|
return ut(e, i);
|
|
518
518
|
case 33:
|
|
519
|
-
return
|
|
519
|
+
return S(e, u.BANG, i, i + 1);
|
|
520
520
|
case 36:
|
|
521
|
-
return
|
|
521
|
+
return S(e, u.DOLLAR, i, i + 1);
|
|
522
522
|
case 38:
|
|
523
|
-
return
|
|
523
|
+
return S(e, u.AMP, i, i + 1);
|
|
524
524
|
case 40:
|
|
525
|
-
return
|
|
525
|
+
return S(e, u.PAREN_L, i, i + 1);
|
|
526
526
|
case 41:
|
|
527
|
-
return
|
|
527
|
+
return S(e, u.PAREN_R, i, i + 1);
|
|
528
528
|
case 46:
|
|
529
529
|
if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46)
|
|
530
|
-
return
|
|
530
|
+
return S(e, u.SPREAD, i, i + 3);
|
|
531
531
|
break;
|
|
532
532
|
case 58:
|
|
533
|
-
return
|
|
533
|
+
return S(e, u.COLON, i, i + 1);
|
|
534
534
|
case 61:
|
|
535
|
-
return
|
|
535
|
+
return S(e, u.EQUALS, i, i + 1);
|
|
536
536
|
case 64:
|
|
537
|
-
return
|
|
537
|
+
return S(e, u.AT, i, i + 1);
|
|
538
538
|
case 91:
|
|
539
|
-
return
|
|
539
|
+
return S(e, u.BRACKET_L, i, i + 1);
|
|
540
540
|
case 93:
|
|
541
|
-
return
|
|
541
|
+
return S(e, u.BRACKET_R, i, i + 1);
|
|
542
542
|
case 123:
|
|
543
|
-
return
|
|
543
|
+
return S(e, u.BRACE_L, i, i + 1);
|
|
544
544
|
case 124:
|
|
545
|
-
return
|
|
545
|
+
return S(e, u.PIPE, i, i + 1);
|
|
546
546
|
case 125:
|
|
547
|
-
return
|
|
547
|
+
return S(e, u.BRACE_R, i, i + 1);
|
|
548
548
|
case 34:
|
|
549
549
|
return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? ft(e, i) : lt(e, i);
|
|
550
550
|
}
|
|
@@ -552,13 +552,13 @@ function at(e, t) {
|
|
|
552
552
|
return ct(e, i, s);
|
|
553
553
|
if (_e(s))
|
|
554
554
|
return mt(e, i);
|
|
555
|
-
throw
|
|
555
|
+
throw N(
|
|
556
556
|
e.source,
|
|
557
557
|
i,
|
|
558
558
|
s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : G(s) || se(n, i) ? `Unexpected character: ${F(e, i)}.` : `Invalid character: ${F(e, i)}.`
|
|
559
559
|
);
|
|
560
560
|
}
|
|
561
|
-
return
|
|
561
|
+
return S(e, u.EOF, r, r);
|
|
562
562
|
}
|
|
563
563
|
function ut(e, t) {
|
|
564
564
|
const n = e.source.body, r = n.length;
|
|
@@ -574,7 +574,7 @@ function ut(e, t) {
|
|
|
574
574
|
else
|
|
575
575
|
break;
|
|
576
576
|
}
|
|
577
|
-
return
|
|
577
|
+
return S(
|
|
578
578
|
e,
|
|
579
579
|
u.COMMENT,
|
|
580
580
|
t,
|
|
@@ -584,10 +584,10 @@ function ut(e, t) {
|
|
|
584
584
|
}
|
|
585
585
|
function ct(e, t, n) {
|
|
586
586
|
const r = e.source.body;
|
|
587
|
-
let i = t, s = n,
|
|
587
|
+
let i = t, s = n, a = !1;
|
|
588
588
|
if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
|
|
589
589
|
if (s = r.charCodeAt(++i), Y(s))
|
|
590
|
-
throw
|
|
590
|
+
throw N(
|
|
591
591
|
e.source,
|
|
592
592
|
i,
|
|
593
593
|
`Invalid number, unexpected digit after 0: ${F(
|
|
@@ -597,8 +597,8 @@ function ct(e, t, n) {
|
|
|
597
597
|
);
|
|
598
598
|
} else
|
|
599
599
|
i = ce(e, i, s), s = r.charCodeAt(i);
|
|
600
|
-
if (s === 46 && (
|
|
601
|
-
throw
|
|
600
|
+
if (s === 46 && (a = !0, s = r.charCodeAt(++i), i = ce(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (a = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ce(e, i, s), s = r.charCodeAt(i)), s === 46 || _e(s))
|
|
601
|
+
throw N(
|
|
602
602
|
e.source,
|
|
603
603
|
i,
|
|
604
604
|
`Invalid number, expected digit but got: ${F(
|
|
@@ -606,9 +606,9 @@ function ct(e, t, n) {
|
|
|
606
606
|
i
|
|
607
607
|
)}.`
|
|
608
608
|
);
|
|
609
|
-
return
|
|
609
|
+
return S(
|
|
610
610
|
e,
|
|
611
|
-
|
|
611
|
+
a ? u.FLOAT : u.INT,
|
|
612
612
|
t,
|
|
613
613
|
i,
|
|
614
614
|
r.slice(t, i)
|
|
@@ -616,7 +616,7 @@ function ct(e, t, n) {
|
|
|
616
616
|
}
|
|
617
617
|
function ce(e, t, n) {
|
|
618
618
|
if (!Y(n))
|
|
619
|
-
throw
|
|
619
|
+
throw N(
|
|
620
620
|
e.source,
|
|
621
621
|
t,
|
|
622
622
|
`Invalid number, expected digit but got: ${F(
|
|
@@ -632,15 +632,15 @@ function ce(e, t, n) {
|
|
|
632
632
|
}
|
|
633
633
|
function lt(e, t) {
|
|
634
634
|
const n = e.source.body, r = n.length;
|
|
635
|
-
let i = t + 1, s = i,
|
|
635
|
+
let i = t + 1, s = i, a = "";
|
|
636
636
|
for (; i < r; ) {
|
|
637
637
|
const c = n.charCodeAt(i);
|
|
638
638
|
if (c === 34)
|
|
639
|
-
return
|
|
639
|
+
return a += n.slice(s, i), S(e, u.STRING, t, i + 1, a);
|
|
640
640
|
if (c === 92) {
|
|
641
|
-
|
|
641
|
+
a += n.slice(s, i);
|
|
642
642
|
const p = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? dt(e, i) : pt(e, i) : ht(e, i);
|
|
643
|
-
|
|
643
|
+
a += p.value, i += p.size, s = i;
|
|
644
644
|
continue;
|
|
645
645
|
}
|
|
646
646
|
if (c === 10 || c === 13)
|
|
@@ -650,7 +650,7 @@ function lt(e, t) {
|
|
|
650
650
|
else if (se(n, i))
|
|
651
651
|
i += 2;
|
|
652
652
|
else
|
|
653
|
-
throw
|
|
653
|
+
throw N(
|
|
654
654
|
e.source,
|
|
655
655
|
i,
|
|
656
656
|
`Invalid character within String: ${F(
|
|
@@ -659,7 +659,7 @@ function lt(e, t) {
|
|
|
659
659
|
)}.`
|
|
660
660
|
);
|
|
661
661
|
}
|
|
662
|
-
throw
|
|
662
|
+
throw N(e.source, i, "Unterminated string.");
|
|
663
663
|
}
|
|
664
664
|
function dt(e, t) {
|
|
665
665
|
const n = e.source.body;
|
|
@@ -677,7 +677,7 @@ function dt(e, t) {
|
|
|
677
677
|
if (r = r << 4 | j(s), r < 0)
|
|
678
678
|
break;
|
|
679
679
|
}
|
|
680
|
-
throw
|
|
680
|
+
throw N(
|
|
681
681
|
e.source,
|
|
682
682
|
t,
|
|
683
683
|
`Invalid Unicode escape sequence: "${n.slice(
|
|
@@ -687,27 +687,27 @@ function dt(e, t) {
|
|
|
687
687
|
);
|
|
688
688
|
}
|
|
689
689
|
function pt(e, t) {
|
|
690
|
-
const n = e.source.body, r =
|
|
690
|
+
const n = e.source.body, r = Ne(n, t + 2);
|
|
691
691
|
if (G(r))
|
|
692
692
|
return {
|
|
693
693
|
value: String.fromCodePoint(r),
|
|
694
694
|
size: 6
|
|
695
695
|
};
|
|
696
696
|
if (Le(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
|
|
697
|
-
const i =
|
|
697
|
+
const i = Ne(n, t + 8);
|
|
698
698
|
if (we(i))
|
|
699
699
|
return {
|
|
700
700
|
value: String.fromCodePoint(r, i),
|
|
701
701
|
size: 12
|
|
702
702
|
};
|
|
703
703
|
}
|
|
704
|
-
throw
|
|
704
|
+
throw N(
|
|
705
705
|
e.source,
|
|
706
706
|
t,
|
|
707
707
|
`Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
|
|
708
708
|
);
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function Ne(e, t) {
|
|
711
711
|
return j(e.charCodeAt(t)) << 12 | j(e.charCodeAt(t + 1)) << 8 | j(e.charCodeAt(t + 2)) << 4 | j(e.charCodeAt(t + 3));
|
|
712
712
|
}
|
|
713
713
|
function j(e) {
|
|
@@ -758,7 +758,7 @@ function ht(e, t) {
|
|
|
758
758
|
size: 2
|
|
759
759
|
};
|
|
760
760
|
}
|
|
761
|
-
throw
|
|
761
|
+
throw N(
|
|
762
762
|
e.source,
|
|
763
763
|
t,
|
|
764
764
|
`Invalid character escape sequence: "${n.slice(
|
|
@@ -769,13 +769,13 @@ function ht(e, t) {
|
|
|
769
769
|
}
|
|
770
770
|
function ft(e, t) {
|
|
771
771
|
const n = e.source.body, r = n.length;
|
|
772
|
-
let i = e.lineStart, s = t + 3,
|
|
772
|
+
let i = e.lineStart, s = t + 3, a = s, c = "";
|
|
773
773
|
const p = [];
|
|
774
774
|
for (; s < r; ) {
|
|
775
775
|
const h = n.charCodeAt(s);
|
|
776
776
|
if (h === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
|
|
777
|
-
c += n.slice(
|
|
778
|
-
const m =
|
|
777
|
+
c += n.slice(a, s), p.push(c);
|
|
778
|
+
const m = S(
|
|
779
779
|
e,
|
|
780
780
|
u.BLOCK_STRING,
|
|
781
781
|
t,
|
|
@@ -787,11 +787,11 @@ function ft(e, t) {
|
|
|
787
787
|
return e.line += p.length - 1, e.lineStart = i, m;
|
|
788
788
|
}
|
|
789
789
|
if (h === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
|
|
790
|
-
c += n.slice(
|
|
790
|
+
c += n.slice(a, s), a = s + 1, s += 4;
|
|
791
791
|
continue;
|
|
792
792
|
}
|
|
793
793
|
if (h === 10 || h === 13) {
|
|
794
|
-
c += n.slice(
|
|
794
|
+
c += n.slice(a, s), p.push(c), h === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, c = "", a = s, i = s;
|
|
795
795
|
continue;
|
|
796
796
|
}
|
|
797
797
|
if (G(h))
|
|
@@ -799,7 +799,7 @@ function ft(e, t) {
|
|
|
799
799
|
else if (se(n, s))
|
|
800
800
|
s += 2;
|
|
801
801
|
else
|
|
802
|
-
throw
|
|
802
|
+
throw N(
|
|
803
803
|
e.source,
|
|
804
804
|
s,
|
|
805
805
|
`Invalid character within String: ${F(
|
|
@@ -808,7 +808,7 @@ function ft(e, t) {
|
|
|
808
808
|
)}.`
|
|
809
809
|
);
|
|
810
810
|
}
|
|
811
|
-
throw
|
|
811
|
+
throw N(e.source, s, "Unterminated string.");
|
|
812
812
|
}
|
|
813
813
|
function mt(e, t) {
|
|
814
814
|
const n = e.source.body, r = n.length;
|
|
@@ -820,7 +820,7 @@ function mt(e, t) {
|
|
|
820
820
|
else
|
|
821
821
|
break;
|
|
822
822
|
}
|
|
823
|
-
return
|
|
823
|
+
return S(
|
|
824
824
|
e,
|
|
825
825
|
u.NAME,
|
|
826
826
|
t,
|
|
@@ -830,41 +830,41 @@ function mt(e, t) {
|
|
|
830
830
|
}
|
|
831
831
|
const gt = 10, Fe = 2;
|
|
832
832
|
function Ee(e) {
|
|
833
|
-
return
|
|
833
|
+
return ae(e, []);
|
|
834
834
|
}
|
|
835
|
-
function
|
|
835
|
+
function ae(e, t) {
|
|
836
836
|
switch (typeof e) {
|
|
837
837
|
case "string":
|
|
838
838
|
return JSON.stringify(e);
|
|
839
839
|
case "function":
|
|
840
840
|
return e.name ? `[function ${e.name}]` : "[function]";
|
|
841
841
|
case "object":
|
|
842
|
-
return
|
|
842
|
+
return Ct(e, t);
|
|
843
843
|
default:
|
|
844
844
|
return String(e);
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function Ct(e, t) {
|
|
848
848
|
if (e === null)
|
|
849
849
|
return "null";
|
|
850
850
|
if (t.includes(e))
|
|
851
851
|
return "[Circular]";
|
|
852
852
|
const n = [...t, e];
|
|
853
|
-
if (
|
|
853
|
+
if (yt(e)) {
|
|
854
854
|
const r = e.toJSON();
|
|
855
855
|
if (r !== e)
|
|
856
|
-
return typeof r == "string" ? r :
|
|
856
|
+
return typeof r == "string" ? r : ae(r, n);
|
|
857
857
|
} else if (Array.isArray(e))
|
|
858
858
|
return vt(e, n);
|
|
859
859
|
return Et(e, n);
|
|
860
860
|
}
|
|
861
|
-
function
|
|
861
|
+
function yt(e) {
|
|
862
862
|
return typeof e.toJSON == "function";
|
|
863
863
|
}
|
|
864
864
|
function Et(e, t) {
|
|
865
865
|
const n = Object.entries(e);
|
|
866
|
-
return n.length === 0 ? "{}" : t.length > Fe ? "[" +
|
|
867
|
-
([i, s]) => i + ": " +
|
|
866
|
+
return n.length === 0 ? "{}" : t.length > Fe ? "[" + Tt(e) + "]" : "{ " + n.map(
|
|
867
|
+
([i, s]) => i + ": " + ae(s, t)
|
|
868
868
|
).join(", ") + " }";
|
|
869
869
|
}
|
|
870
870
|
function vt(e, t) {
|
|
@@ -874,10 +874,10 @@ function vt(e, t) {
|
|
|
874
874
|
return "[Array]";
|
|
875
875
|
const n = Math.min(gt, e.length), r = e.length - n, i = [];
|
|
876
876
|
for (let s = 0; s < n; ++s)
|
|
877
|
-
i.push(
|
|
877
|
+
i.push(ae(e[s], t));
|
|
878
878
|
return r === 1 ? i.push("... 1 more item") : r > 1 && i.push(`... ${r} more items`), "[" + i.join(", ") + "]";
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function Tt(e) {
|
|
881
881
|
const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
|
|
882
882
|
if (t === "Object" && typeof e.constructor == "function") {
|
|
883
883
|
const n = e.constructor.name;
|
|
@@ -886,7 +886,7 @@ function At(e) {
|
|
|
886
886
|
}
|
|
887
887
|
return t;
|
|
888
888
|
}
|
|
889
|
-
const
|
|
889
|
+
const At = (
|
|
890
890
|
/* c8 ignore next 6 */
|
|
891
891
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
892
892
|
globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function(t, n) {
|
|
@@ -901,8 +901,8 @@ const Tt = (
|
|
|
901
901
|
Symbol.toStringTag in t ? t[Symbol.toStringTag] : (r = t.constructor) === null || r === void 0 ? void 0 : r.name
|
|
902
902
|
);
|
|
903
903
|
if (i === s) {
|
|
904
|
-
const
|
|
905
|
-
throw new Error(`Cannot use ${i} "${
|
|
904
|
+
const a = Ee(t);
|
|
905
|
+
throw new Error(`Cannot use ${i} "${a}" from another module or realm.
|
|
906
906
|
|
|
907
907
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
908
908
|
directory. If different versions of "graphql" are the dependencies of other
|
|
@@ -936,15 +936,15 @@ class Be {
|
|
|
936
936
|
return "Source";
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
return
|
|
939
|
+
function It(e) {
|
|
940
|
+
return At(e, Be);
|
|
941
941
|
}
|
|
942
942
|
function Ue(e, t) {
|
|
943
|
-
return new
|
|
943
|
+
return new St(e, t).parseDocument();
|
|
944
944
|
}
|
|
945
|
-
class
|
|
945
|
+
class St {
|
|
946
946
|
constructor(t, n = {}) {
|
|
947
|
-
const r =
|
|
947
|
+
const r = It(t) ? t : new Be(t);
|
|
948
948
|
this._lexer = new st(r), this._options = n, this._tokenCounter = 0;
|
|
949
949
|
}
|
|
950
950
|
/**
|
|
@@ -1018,7 +1018,7 @@ class It {
|
|
|
1018
1018
|
return this.parseDirectiveDefinition();
|
|
1019
1019
|
}
|
|
1020
1020
|
if (t)
|
|
1021
|
-
throw
|
|
1021
|
+
throw N(
|
|
1022
1022
|
this._lexer.source,
|
|
1023
1023
|
this._lexer.token.start,
|
|
1024
1024
|
"Unexpected description, descriptions are supported only on type definitions."
|
|
@@ -1047,7 +1047,7 @@ class It {
|
|
|
1047
1047
|
if (this.peek(u.BRACE_L))
|
|
1048
1048
|
return this.node(t, {
|
|
1049
1049
|
kind: f.OPERATION_DEFINITION,
|
|
1050
|
-
operation:
|
|
1050
|
+
operation: M.QUERY,
|
|
1051
1051
|
name: void 0,
|
|
1052
1052
|
variableDefinitions: [],
|
|
1053
1053
|
directives: [],
|
|
@@ -1071,11 +1071,11 @@ class It {
|
|
|
1071
1071
|
const t = this.expectToken(u.NAME);
|
|
1072
1072
|
switch (t.value) {
|
|
1073
1073
|
case "query":
|
|
1074
|
-
return
|
|
1074
|
+
return M.QUERY;
|
|
1075
1075
|
case "mutation":
|
|
1076
|
-
return
|
|
1076
|
+
return M.MUTATION;
|
|
1077
1077
|
case "subscription":
|
|
1078
|
-
return
|
|
1078
|
+
return M.SUBSCRIPTION;
|
|
1079
1079
|
}
|
|
1080
1080
|
throw this.unexpected(t);
|
|
1081
1081
|
}
|
|
@@ -1292,7 +1292,7 @@ class It {
|
|
|
1292
1292
|
if (t)
|
|
1293
1293
|
if (this.expectToken(u.DOLLAR), this._lexer.token.kind === u.NAME) {
|
|
1294
1294
|
const r = this._lexer.token.value;
|
|
1295
|
-
throw
|
|
1295
|
+
throw N(
|
|
1296
1296
|
this._lexer.source,
|
|
1297
1297
|
n.start,
|
|
1298
1298
|
`Unexpected variable "$${r}" in constant value.`
|
|
@@ -1476,14 +1476,14 @@ class It {
|
|
|
1476
1476
|
parseObjectTypeDefinition() {
|
|
1477
1477
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1478
1478
|
this.expectKeyword("type");
|
|
1479
|
-
const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(),
|
|
1479
|
+
const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
|
|
1480
1480
|
return this.node(t, {
|
|
1481
1481
|
kind: f.OBJECT_TYPE_DEFINITION,
|
|
1482
1482
|
description: n,
|
|
1483
1483
|
name: r,
|
|
1484
1484
|
interfaces: i,
|
|
1485
1485
|
directives: s,
|
|
1486
|
-
fields:
|
|
1486
|
+
fields: a
|
|
1487
1487
|
});
|
|
1488
1488
|
}
|
|
1489
1489
|
/**
|
|
@@ -1513,14 +1513,14 @@ class It {
|
|
|
1513
1513
|
parseFieldDefinition() {
|
|
1514
1514
|
const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs();
|
|
1515
1515
|
this.expectToken(u.COLON);
|
|
1516
|
-
const s = this.parseTypeReference(),
|
|
1516
|
+
const s = this.parseTypeReference(), a = this.parseConstDirectives();
|
|
1517
1517
|
return this.node(t, {
|
|
1518
1518
|
kind: f.FIELD_DEFINITION,
|
|
1519
1519
|
description: n,
|
|
1520
1520
|
name: r,
|
|
1521
1521
|
arguments: i,
|
|
1522
1522
|
type: s,
|
|
1523
|
-
directives:
|
|
1523
|
+
directives: a
|
|
1524
1524
|
});
|
|
1525
1525
|
}
|
|
1526
1526
|
/**
|
|
@@ -1543,14 +1543,14 @@ class It {
|
|
|
1543
1543
|
const i = this.parseTypeReference();
|
|
1544
1544
|
let s;
|
|
1545
1545
|
this.expectOptionalToken(u.EQUALS) && (s = this.parseConstValueLiteral());
|
|
1546
|
-
const
|
|
1546
|
+
const a = this.parseConstDirectives();
|
|
1547
1547
|
return this.node(t, {
|
|
1548
1548
|
kind: f.INPUT_VALUE_DEFINITION,
|
|
1549
1549
|
description: n,
|
|
1550
1550
|
name: r,
|
|
1551
1551
|
type: i,
|
|
1552
1552
|
defaultValue: s,
|
|
1553
|
-
directives:
|
|
1553
|
+
directives: a
|
|
1554
1554
|
});
|
|
1555
1555
|
}
|
|
1556
1556
|
/**
|
|
@@ -1560,14 +1560,14 @@ class It {
|
|
|
1560
1560
|
parseInterfaceTypeDefinition() {
|
|
1561
1561
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1562
1562
|
this.expectKeyword("interface");
|
|
1563
|
-
const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(),
|
|
1563
|
+
const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
|
|
1564
1564
|
return this.node(t, {
|
|
1565
1565
|
kind: f.INTERFACE_TYPE_DEFINITION,
|
|
1566
1566
|
description: n,
|
|
1567
1567
|
name: r,
|
|
1568
1568
|
interfaces: i,
|
|
1569
1569
|
directives: s,
|
|
1570
|
-
fields:
|
|
1570
|
+
fields: a
|
|
1571
1571
|
});
|
|
1572
1572
|
}
|
|
1573
1573
|
/**
|
|
@@ -1639,7 +1639,7 @@ class It {
|
|
|
1639
1639
|
*/
|
|
1640
1640
|
parseEnumValueName() {
|
|
1641
1641
|
if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null")
|
|
1642
|
-
throw
|
|
1642
|
+
throw N(
|
|
1643
1643
|
this._lexer.source,
|
|
1644
1644
|
this._lexer.token.start,
|
|
1645
1645
|
`${W(
|
|
@@ -1854,14 +1854,14 @@ class It {
|
|
|
1854
1854
|
this.expectKeyword("directive"), this.expectToken(u.AT);
|
|
1855
1855
|
const r = this.parseName(), i = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
|
|
1856
1856
|
this.expectKeyword("on");
|
|
1857
|
-
const
|
|
1857
|
+
const a = this.parseDirectiveLocations();
|
|
1858
1858
|
return this.node(t, {
|
|
1859
1859
|
kind: f.DIRECTIVE_DEFINITION,
|
|
1860
1860
|
description: n,
|
|
1861
1861
|
name: r,
|
|
1862
1862
|
arguments: i,
|
|
1863
1863
|
repeatable: s,
|
|
1864
|
-
locations:
|
|
1864
|
+
locations: a
|
|
1865
1865
|
});
|
|
1866
1866
|
}
|
|
1867
1867
|
/**
|
|
@@ -1932,10 +1932,10 @@ class It {
|
|
|
1932
1932
|
const n = this._lexer.token;
|
|
1933
1933
|
if (n.kind === t)
|
|
1934
1934
|
return this.advanceLexer(), n;
|
|
1935
|
-
throw
|
|
1935
|
+
throw N(
|
|
1936
1936
|
this._lexer.source,
|
|
1937
1937
|
n.start,
|
|
1938
|
-
`Expected ${
|
|
1938
|
+
`Expected ${Me(t)}, found ${W(n)}.`
|
|
1939
1939
|
);
|
|
1940
1940
|
}
|
|
1941
1941
|
/**
|
|
@@ -1954,7 +1954,7 @@ class It {
|
|
|
1954
1954
|
if (n.kind === u.NAME && n.value === t)
|
|
1955
1955
|
this.advanceLexer();
|
|
1956
1956
|
else
|
|
1957
|
-
throw
|
|
1957
|
+
throw N(
|
|
1958
1958
|
this._lexer.source,
|
|
1959
1959
|
n.start,
|
|
1960
1960
|
`Expected "${t}", found ${W(n)}.`
|
|
@@ -1973,7 +1973,7 @@ class It {
|
|
|
1973
1973
|
*/
|
|
1974
1974
|
unexpected(t) {
|
|
1975
1975
|
const n = t ?? this._lexer.token;
|
|
1976
|
-
return
|
|
1976
|
+
return N(
|
|
1977
1977
|
this._lexer.source,
|
|
1978
1978
|
n.start,
|
|
1979
1979
|
`Unexpected ${W(n)}.`
|
|
@@ -2036,7 +2036,7 @@ class It {
|
|
|
2036
2036
|
advanceLexer() {
|
|
2037
2037
|
const { maxTokens: t } = this._options, n = this._lexer.advance();
|
|
2038
2038
|
if (t !== void 0 && n.kind !== u.EOF && (++this._tokenCounter, this._tokenCounter > t))
|
|
2039
|
-
throw
|
|
2039
|
+
throw N(
|
|
2040
2040
|
this._lexer.source,
|
|
2041
2041
|
n.start,
|
|
2042
2042
|
`Document contains more that ${t} tokens. Parsing aborted.`
|
|
@@ -2045,19 +2045,19 @@ class It {
|
|
|
2045
2045
|
}
|
|
2046
2046
|
function W(e) {
|
|
2047
2047
|
const t = e.value;
|
|
2048
|
-
return
|
|
2048
|
+
return Me(e.kind) + (t != null ? ` "${t}"` : "");
|
|
2049
2049
|
}
|
|
2050
|
-
function
|
|
2051
|
-
return
|
|
2050
|
+
function Me(e) {
|
|
2051
|
+
return at(e) ? `"${e}"` : e;
|
|
2052
2052
|
}
|
|
2053
|
-
function
|
|
2054
|
-
return `"${e.replace(
|
|
2053
|
+
function Nt(e) {
|
|
2054
|
+
return `"${e.replace(Rt, xt)}"`;
|
|
2055
2055
|
}
|
|
2056
|
-
const
|
|
2057
|
-
function
|
|
2058
|
-
return
|
|
2056
|
+
const Rt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
|
|
2057
|
+
function xt(e) {
|
|
2058
|
+
return bt[e.charCodeAt(0)];
|
|
2059
2059
|
}
|
|
2060
|
-
const
|
|
2060
|
+
const bt = [
|
|
2061
2061
|
"\\u0000",
|
|
2062
2062
|
"\\u0001",
|
|
2063
2063
|
"\\u0002",
|
|
@@ -2223,75 +2223,75 @@ const Rt = [
|
|
|
2223
2223
|
"\\u009D",
|
|
2224
2224
|
"\\u009E",
|
|
2225
2225
|
"\\u009F"
|
|
2226
|
-
],
|
|
2227
|
-
function
|
|
2226
|
+
], Ot = Object.freeze({});
|
|
2227
|
+
function Pt(e, t, n = De) {
|
|
2228
2228
|
const r = /* @__PURE__ */ new Map();
|
|
2229
|
-
for (const
|
|
2230
|
-
r.set(
|
|
2231
|
-
let i, s = Array.isArray(e),
|
|
2232
|
-
const
|
|
2229
|
+
for (const P of Object.values(f))
|
|
2230
|
+
r.set(P, Dt(t, P));
|
|
2231
|
+
let i, s = Array.isArray(e), a = [e], c = -1, p = [], h = e, m, C;
|
|
2232
|
+
const y = [], A = [];
|
|
2233
2233
|
do {
|
|
2234
2234
|
c++;
|
|
2235
|
-
const
|
|
2236
|
-
if (
|
|
2237
|
-
if (m =
|
|
2235
|
+
const P = c === a.length, z = P && p.length !== 0;
|
|
2236
|
+
if (P) {
|
|
2237
|
+
if (m = A.length === 0 ? void 0 : y[y.length - 1], h = C, C = A.pop(), z)
|
|
2238
2238
|
if (s) {
|
|
2239
2239
|
h = h.slice();
|
|
2240
|
-
let
|
|
2240
|
+
let D = 0;
|
|
2241
2241
|
for (const [B, J] of p) {
|
|
2242
|
-
const Q = B -
|
|
2243
|
-
J === null ? (h.splice(Q, 1),
|
|
2242
|
+
const Q = B - D;
|
|
2243
|
+
J === null ? (h.splice(Q, 1), D++) : h[Q] = J;
|
|
2244
2244
|
}
|
|
2245
2245
|
} else {
|
|
2246
2246
|
h = Object.defineProperties(
|
|
2247
2247
|
{},
|
|
2248
2248
|
Object.getOwnPropertyDescriptors(h)
|
|
2249
2249
|
);
|
|
2250
|
-
for (const [
|
|
2251
|
-
h[
|
|
2250
|
+
for (const [D, B] of p)
|
|
2251
|
+
h[D] = B;
|
|
2252
2252
|
}
|
|
2253
|
-
c = i.index,
|
|
2254
|
-
} else if (
|
|
2255
|
-
if (m = s ? c :
|
|
2253
|
+
c = i.index, a = i.keys, p = i.edits, s = i.inArray, i = i.prev;
|
|
2254
|
+
} else if (C) {
|
|
2255
|
+
if (m = s ? c : a[c], h = C[m], h == null)
|
|
2256
2256
|
continue;
|
|
2257
|
-
|
|
2257
|
+
y.push(m);
|
|
2258
2258
|
}
|
|
2259
2259
|
let _;
|
|
2260
2260
|
if (!Array.isArray(h)) {
|
|
2261
|
-
var g,
|
|
2262
|
-
|
|
2263
|
-
const
|
|
2264
|
-
if (_ =
|
|
2261
|
+
var g, I;
|
|
2262
|
+
Se(h) || K(!1, `Invalid AST Node: ${Ee(h)}.`);
|
|
2263
|
+
const D = P ? (g = r.get(h.kind)) === null || g === void 0 ? void 0 : g.leave : (I = r.get(h.kind)) === null || I === void 0 ? void 0 : I.enter;
|
|
2264
|
+
if (_ = D == null ? void 0 : D.call(t, h, m, C, y, A), _ === Ot)
|
|
2265
2265
|
break;
|
|
2266
2266
|
if (_ === !1) {
|
|
2267
|
-
if (!
|
|
2268
|
-
|
|
2267
|
+
if (!P) {
|
|
2268
|
+
y.pop();
|
|
2269
2269
|
continue;
|
|
2270
2270
|
}
|
|
2271
|
-
} else if (_ !== void 0 && (p.push([m, _]), !
|
|
2272
|
-
if (
|
|
2271
|
+
} else if (_ !== void 0 && (p.push([m, _]), !P))
|
|
2272
|
+
if (Se(_))
|
|
2273
2273
|
h = _;
|
|
2274
2274
|
else {
|
|
2275
|
-
|
|
2275
|
+
y.pop();
|
|
2276
2276
|
continue;
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
2279
|
-
if (_ === void 0 && z && p.push([m, h]),
|
|
2280
|
-
|
|
2279
|
+
if (_ === void 0 && z && p.push([m, h]), P)
|
|
2280
|
+
y.pop();
|
|
2281
2281
|
else {
|
|
2282
|
-
var
|
|
2282
|
+
var O;
|
|
2283
2283
|
i = {
|
|
2284
2284
|
inArray: s,
|
|
2285
2285
|
index: c,
|
|
2286
|
-
keys:
|
|
2286
|
+
keys: a,
|
|
2287
2287
|
edits: p,
|
|
2288
2288
|
prev: i
|
|
2289
|
-
}, s = Array.isArray(h),
|
|
2289
|
+
}, s = Array.isArray(h), a = s ? h : (O = n[h.kind]) !== null && O !== void 0 ? O : [], c = -1, p = [], C && A.push(C), C = h;
|
|
2290
2290
|
}
|
|
2291
2291
|
} while (i !== void 0);
|
|
2292
2292
|
return p.length !== 0 ? p[p.length - 1][1] : e;
|
|
2293
2293
|
}
|
|
2294
|
-
function
|
|
2294
|
+
function Dt(e, t) {
|
|
2295
2295
|
const n = e[t];
|
|
2296
2296
|
return typeof n == "object" ? n : typeof n == "function" ? {
|
|
2297
2297
|
enter: n,
|
|
@@ -2301,8 +2301,8 @@ function kt(e, t) {
|
|
|
2301
2301
|
leave: e.leave
|
|
2302
2302
|
};
|
|
2303
2303
|
}
|
|
2304
|
-
function
|
|
2305
|
-
return
|
|
2304
|
+
function kt(e) {
|
|
2305
|
+
return Pt(e, Lt);
|
|
2306
2306
|
}
|
|
2307
2307
|
const _t = 80, Lt = {
|
|
2308
2308
|
Name: {
|
|
@@ -2334,16 +2334,16 @@ const _t = 80, Lt = {
|
|
|
2334
2334
|
leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + v(" = ", n) + v(" ", d(r, " "))
|
|
2335
2335
|
},
|
|
2336
2336
|
SelectionSet: {
|
|
2337
|
-
leave: ({ selections: e }) =>
|
|
2337
|
+
leave: ({ selections: e }) => k(e)
|
|
2338
2338
|
},
|
|
2339
2339
|
Field: {
|
|
2340
2340
|
leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) {
|
|
2341
2341
|
const s = v("", e, ": ") + t;
|
|
2342
|
-
let
|
|
2343
|
-
return
|
|
2342
|
+
let a = s + v("(", d(n, ", "), ")");
|
|
2343
|
+
return a.length > _t && (a = s + v(`(
|
|
2344
2344
|
`, Z(d(n, `
|
|
2345
2345
|
`)), `
|
|
2346
|
-
)`)), d([
|
|
2346
|
+
)`)), d([a, d(r, " "), i], " ");
|
|
2347
2347
|
}
|
|
2348
2348
|
},
|
|
2349
2349
|
Argument: {
|
|
@@ -2378,7 +2378,7 @@ const _t = 80, Lt = {
|
|
|
2378
2378
|
leave: ({ value: e }) => e
|
|
2379
2379
|
},
|
|
2380
2380
|
StringValue: {
|
|
2381
|
-
leave: ({ value: e, block: t }) => t ?
|
|
2381
|
+
leave: ({ value: e, block: t }) => t ? rt(e) : Nt(e)
|
|
2382
2382
|
},
|
|
2383
2383
|
BooleanValue: {
|
|
2384
2384
|
leave: ({ value: e }) => e ? "true" : "false"
|
|
@@ -2415,7 +2415,7 @@ const _t = 80, Lt = {
|
|
|
2415
2415
|
// Type System Definitions
|
|
2416
2416
|
SchemaDefinition: {
|
|
2417
2417
|
leave: ({ description: e, directives: t, operationTypes: n }) => v("", e, `
|
|
2418
|
-
`) + d(["schema", d(t, " "),
|
|
2418
|
+
`) + d(["schema", d(t, " "), k(n)], " ")
|
|
2419
2419
|
},
|
|
2420
2420
|
OperationTypeDefinition: {
|
|
2421
2421
|
leave: ({ operation: e, type: t }) => e + ": " + t
|
|
@@ -2432,14 +2432,14 @@ const _t = 80, Lt = {
|
|
|
2432
2432
|
t,
|
|
2433
2433
|
v("implements ", d(n, " & ")),
|
|
2434
2434
|
d(r, " "),
|
|
2435
|
-
|
|
2435
|
+
k(i)
|
|
2436
2436
|
],
|
|
2437
2437
|
" "
|
|
2438
2438
|
)
|
|
2439
2439
|
},
|
|
2440
2440
|
FieldDefinition: {
|
|
2441
2441
|
leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => v("", e, `
|
|
2442
|
-
`) + t + (
|
|
2442
|
+
`) + t + (Re(n) ? v(`(
|
|
2443
2443
|
`, Z(d(n, `
|
|
2444
2444
|
`)), `
|
|
2445
2445
|
)`) : v("(", d(n, ", "), ")")) + ": " + r + v(" ", d(i, " "))
|
|
@@ -2459,7 +2459,7 @@ const _t = 80, Lt = {
|
|
|
2459
2459
|
t,
|
|
2460
2460
|
v("implements ", d(n, " & ")),
|
|
2461
2461
|
d(r, " "),
|
|
2462
|
-
|
|
2462
|
+
k(i)
|
|
2463
2463
|
],
|
|
2464
2464
|
" "
|
|
2465
2465
|
)
|
|
@@ -2473,7 +2473,7 @@ const _t = 80, Lt = {
|
|
|
2473
2473
|
},
|
|
2474
2474
|
EnumTypeDefinition: {
|
|
2475
2475
|
leave: ({ description: e, name: t, directives: n, values: r }) => v("", e, `
|
|
2476
|
-
`) + d(["enum", t, d(n, " "),
|
|
2476
|
+
`) + d(["enum", t, d(n, " "), k(r)], " ")
|
|
2477
2477
|
},
|
|
2478
2478
|
EnumValueDefinition: {
|
|
2479
2479
|
leave: ({ description: e, name: t, directives: n }) => v("", e, `
|
|
@@ -2481,18 +2481,18 @@ const _t = 80, Lt = {
|
|
|
2481
2481
|
},
|
|
2482
2482
|
InputObjectTypeDefinition: {
|
|
2483
2483
|
leave: ({ description: e, name: t, directives: n, fields: r }) => v("", e, `
|
|
2484
|
-
`) + d(["input", t, d(n, " "),
|
|
2484
|
+
`) + d(["input", t, d(n, " "), k(r)], " ")
|
|
2485
2485
|
},
|
|
2486
2486
|
DirectiveDefinition: {
|
|
2487
2487
|
leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => v("", e, `
|
|
2488
|
-
`) + "directive @" + t + (
|
|
2488
|
+
`) + "directive @" + t + (Re(n) ? v(`(
|
|
2489
2489
|
`, Z(d(n, `
|
|
2490
2490
|
`)), `
|
|
2491
2491
|
)`) : v("(", d(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + d(i, " | ")
|
|
2492
2492
|
},
|
|
2493
2493
|
SchemaExtension: {
|
|
2494
2494
|
leave: ({ directives: e, operationTypes: t }) => d(
|
|
2495
|
-
["extend schema", d(e, " "),
|
|
2495
|
+
["extend schema", d(e, " "), k(t)],
|
|
2496
2496
|
" "
|
|
2497
2497
|
)
|
|
2498
2498
|
},
|
|
@@ -2506,7 +2506,7 @@ const _t = 80, Lt = {
|
|
|
2506
2506
|
e,
|
|
2507
2507
|
v("implements ", d(t, " & ")),
|
|
2508
2508
|
d(n, " "),
|
|
2509
|
-
|
|
2509
|
+
k(r)
|
|
2510
2510
|
],
|
|
2511
2511
|
" "
|
|
2512
2512
|
)
|
|
@@ -2518,7 +2518,7 @@ const _t = 80, Lt = {
|
|
|
2518
2518
|
e,
|
|
2519
2519
|
v("implements ", d(t, " & ")),
|
|
2520
2520
|
d(n, " "),
|
|
2521
|
-
|
|
2521
|
+
k(r)
|
|
2522
2522
|
],
|
|
2523
2523
|
" "
|
|
2524
2524
|
)
|
|
@@ -2535,17 +2535,17 @@ const _t = 80, Lt = {
|
|
|
2535
2535
|
)
|
|
2536
2536
|
},
|
|
2537
2537
|
EnumTypeExtension: {
|
|
2538
|
-
leave: ({ name: e, directives: t, values: n }) => d(["extend enum", e, d(t, " "),
|
|
2538
|
+
leave: ({ name: e, directives: t, values: n }) => d(["extend enum", e, d(t, " "), k(n)], " ")
|
|
2539
2539
|
},
|
|
2540
2540
|
InputObjectTypeExtension: {
|
|
2541
|
-
leave: ({ name: e, directives: t, fields: n }) => d(["extend input", e, d(t, " "),
|
|
2541
|
+
leave: ({ name: e, directives: t, fields: n }) => d(["extend input", e, d(t, " "), k(n)], " ")
|
|
2542
2542
|
}
|
|
2543
2543
|
};
|
|
2544
2544
|
function d(e, t = "") {
|
|
2545
2545
|
var n;
|
|
2546
2546
|
return (n = e == null ? void 0 : e.filter((r) => r).join(t)) !== null && n !== void 0 ? n : "";
|
|
2547
2547
|
}
|
|
2548
|
-
function
|
|
2548
|
+
function k(e) {
|
|
2549
2549
|
return v(`{
|
|
2550
2550
|
`, Z(d(e, `
|
|
2551
2551
|
`)), `
|
|
@@ -2558,12 +2558,12 @@ function Z(e) {
|
|
|
2558
2558
|
return v(" ", e.replace(/\n/g, `
|
|
2559
2559
|
`));
|
|
2560
2560
|
}
|
|
2561
|
-
function
|
|
2561
|
+
function Re(e) {
|
|
2562
2562
|
var t;
|
|
2563
2563
|
return (t = e == null ? void 0 : e.some((n) => n.includes(`
|
|
2564
2564
|
`))) !== null && t !== void 0 ? t : !1;
|
|
2565
2565
|
}
|
|
2566
|
-
var ee = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(),
|
|
2566
|
+
var ee = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), qe = !0, ie = !1;
|
|
2567
2567
|
function Ge(e) {
|
|
2568
2568
|
return e.replace(/[\s,]+/g, " ").trim();
|
|
2569
2569
|
}
|
|
@@ -2574,10 +2574,10 @@ function Ft(e) {
|
|
|
2574
2574
|
var t = /* @__PURE__ */ new Set(), n = [];
|
|
2575
2575
|
return e.definitions.forEach(function(r) {
|
|
2576
2576
|
if (r.kind === "FragmentDefinition") {
|
|
2577
|
-
var i = r.name.value, s = wt(r.loc),
|
|
2578
|
-
|
|
2577
|
+
var i = r.name.value, s = wt(r.loc), a = ge.get(i);
|
|
2578
|
+
a && !a.has(s) ? qe && console.warn("Warning: fragment with name " + i + ` already exists.
|
|
2579
2579
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
2580
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) :
|
|
2580
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : a || ge.set(i, a = /* @__PURE__ */ new Set()), a.add(s), t.has(s) || (t.add(s), n.push(r));
|
|
2581
2581
|
} else
|
|
2582
2582
|
n.push(r);
|
|
2583
2583
|
}), ne(ne({}, e), { definitions: n });
|
|
@@ -2597,8 +2597,8 @@ function Ut(e) {
|
|
|
2597
2597
|
var t = Ge(e);
|
|
2598
2598
|
if (!ee.has(t)) {
|
|
2599
2599
|
var n = Ue(e, {
|
|
2600
|
-
experimentalFragmentVariables:
|
|
2601
|
-
allowLegacyFragmentVariables:
|
|
2600
|
+
experimentalFragmentVariables: ie,
|
|
2601
|
+
allowLegacyFragmentVariables: ie
|
|
2602
2602
|
});
|
|
2603
2603
|
if (!n || n.kind !== "Document")
|
|
2604
2604
|
throw new Error("Not a valid GraphQL document.");
|
|
@@ -2606,7 +2606,7 @@ function Ut(e) {
|
|
|
2606
2606
|
}
|
|
2607
2607
|
return ee.get(t);
|
|
2608
2608
|
}
|
|
2609
|
-
function
|
|
2609
|
+
function q(e) {
|
|
2610
2610
|
for (var t = [], n = 1; n < arguments.length; n++)
|
|
2611
2611
|
t[n - 1] = arguments[n];
|
|
2612
2612
|
typeof e == "string" && (e = [e]);
|
|
@@ -2615,30 +2615,30 @@ function M(e) {
|
|
|
2615
2615
|
i && i.kind === "Document" ? r += i.loc.source.body : r += i, r += e[s + 1];
|
|
2616
2616
|
}), Ut(r);
|
|
2617
2617
|
}
|
|
2618
|
-
function
|
|
2618
|
+
function Mt() {
|
|
2619
2619
|
ee.clear(), ge.clear();
|
|
2620
2620
|
}
|
|
2621
|
-
function
|
|
2622
|
-
|
|
2621
|
+
function qt() {
|
|
2622
|
+
qe = !1;
|
|
2623
2623
|
}
|
|
2624
2624
|
function Gt() {
|
|
2625
|
-
|
|
2625
|
+
ie = !0;
|
|
2626
2626
|
}
|
|
2627
2627
|
function Vt() {
|
|
2628
|
-
|
|
2628
|
+
ie = !1;
|
|
2629
2629
|
}
|
|
2630
2630
|
var $ = {
|
|
2631
|
-
gql:
|
|
2632
|
-
resetCaches:
|
|
2633
|
-
disableFragmentWarnings:
|
|
2631
|
+
gql: q,
|
|
2632
|
+
resetCaches: Mt,
|
|
2633
|
+
disableFragmentWarnings: qt,
|
|
2634
2634
|
enableExperimentalFragmentVariables: Gt,
|
|
2635
2635
|
disableExperimentalFragmentVariables: Vt
|
|
2636
2636
|
};
|
|
2637
2637
|
(function(e) {
|
|
2638
2638
|
e.gql = $.gql, e.resetCaches = $.resetCaches, e.disableFragmentWarnings = $.disableFragmentWarnings, e.enableExperimentalFragmentVariables = $.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = $.disableExperimentalFragmentVariables;
|
|
2639
|
-
})(
|
|
2640
|
-
|
|
2641
|
-
const
|
|
2639
|
+
})(q || (q = {}));
|
|
2640
|
+
q.default = q;
|
|
2641
|
+
const x = q, $t = x`
|
|
2642
2642
|
query GetLocationAvailabilities($sku: String!, $first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
2643
2643
|
locationAvailabilities(
|
|
2644
2644
|
sku: $sku
|
|
@@ -2677,7 +2677,7 @@ const b = M, $t = b`
|
|
|
2677
2677
|
}
|
|
2678
2678
|
}
|
|
2679
2679
|
}
|
|
2680
|
-
`, jt =
|
|
2680
|
+
`, jt = x`
|
|
2681
2681
|
query GetLocationAvailability($sku: String!, $locationID: ID!) {
|
|
2682
2682
|
locationAvailability(sku: $sku, locationID: $locationID) {
|
|
2683
2683
|
location {
|
|
@@ -2703,7 +2703,7 @@ const b = M, $t = b`
|
|
|
2703
2703
|
inventoryQuantity
|
|
2704
2704
|
}
|
|
2705
2705
|
}
|
|
2706
|
-
`, Ht =
|
|
2706
|
+
`, Ht = x`
|
|
2707
2707
|
query GetPurchasingCustomerMetafield($namespace: String!, $key: String!) {
|
|
2708
2708
|
purchasingCustomerMetafield(namespace: $namespace, key: $key) {
|
|
2709
2709
|
id
|
|
@@ -2712,7 +2712,7 @@ const b = M, $t = b`
|
|
|
2712
2712
|
value
|
|
2713
2713
|
}
|
|
2714
2714
|
}
|
|
2715
|
-
`, Yt =
|
|
2715
|
+
`, Yt = x`
|
|
2716
2716
|
query GetPoints {
|
|
2717
2717
|
purchasingCustomer {
|
|
2718
2718
|
pointsApproved
|
|
@@ -2724,14 +2724,9 @@ const b = M, $t = b`
|
|
|
2724
2724
|
}
|
|
2725
2725
|
}
|
|
2726
2726
|
}
|
|
2727
|
-
`, zt =
|
|
2728
|
-
query GetLocations($
|
|
2729
|
-
locations(
|
|
2730
|
-
first: $first
|
|
2731
|
-
after: $after
|
|
2732
|
-
isReverse: $isReverse
|
|
2733
|
-
filter: {tag: $tag, provinceCodes: $provinceCodes}
|
|
2734
|
-
) {
|
|
2727
|
+
`, zt = x`
|
|
2728
|
+
query GetLocations($first: Int, $after: String, $filter: LocationFilter, $isReverse: Boolean! = false) {
|
|
2729
|
+
locations(first: $first, after: $after, filter: $filter, isReverse: $isReverse) {
|
|
2735
2730
|
nodes {
|
|
2736
2731
|
id
|
|
2737
2732
|
name
|
|
@@ -2760,7 +2755,7 @@ const b = M, $t = b`
|
|
|
2760
2755
|
}
|
|
2761
2756
|
}
|
|
2762
2757
|
}
|
|
2763
|
-
`, Jt =
|
|
2758
|
+
`, Jt = x`
|
|
2764
2759
|
query GetPurchasingCustomerDiscounts($first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
2765
2760
|
purchasingCustomer {
|
|
2766
2761
|
id
|
|
@@ -2789,14 +2784,14 @@ const b = M, $t = b`
|
|
|
2789
2784
|
}
|
|
2790
2785
|
}
|
|
2791
2786
|
}
|
|
2792
|
-
`, Qt =
|
|
2787
|
+
`, Qt = x`
|
|
2793
2788
|
query GetPurchasingCustomerDiscountCodeCount {
|
|
2794
2789
|
purchasingCustomer {
|
|
2795
2790
|
id
|
|
2796
2791
|
orderPriceAdjustmentRuleCount
|
|
2797
2792
|
}
|
|
2798
2793
|
}
|
|
2799
|
-
`, Xt =
|
|
2794
|
+
`, Xt = x`
|
|
2800
2795
|
query GetPurchasingCustomerPointChangeActivities($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: PointChangeActivitySortKey! = CREATED_AT) {
|
|
2801
2796
|
purchasingCustomer {
|
|
2802
2797
|
id
|
|
@@ -2856,7 +2851,7 @@ const b = M, $t = b`
|
|
|
2856
2851
|
}
|
|
2857
2852
|
}
|
|
2858
2853
|
}
|
|
2859
|
-
`, Wt =
|
|
2854
|
+
`, Wt = x`
|
|
2860
2855
|
query GetPurchasingCustomerRank {
|
|
2861
2856
|
purchasingCustomer {
|
|
2862
2857
|
currentCustomerRank {
|
|
@@ -2873,6 +2868,8 @@ const b = M, $t = b`
|
|
|
2873
2868
|
name
|
|
2874
2869
|
threshold
|
|
2875
2870
|
}
|
|
2871
|
+
earnedPoint
|
|
2872
|
+
purchasePrice
|
|
2876
2873
|
earnedPointToRankUp
|
|
2877
2874
|
purchasePriceToRankUp
|
|
2878
2875
|
calculationCondition {
|
|
@@ -2895,14 +2892,14 @@ const b = M, $t = b`
|
|
|
2895
2892
|
}
|
|
2896
2893
|
}
|
|
2897
2894
|
}
|
|
2898
|
-
`, Kt =
|
|
2895
|
+
`, Kt = x`
|
|
2899
2896
|
query GetSharingPurchasingCustomerCount {
|
|
2900
2897
|
purchasingCustomer {
|
|
2901
2898
|
id
|
|
2902
2899
|
sharingPurchasingCustomerCount
|
|
2903
2900
|
}
|
|
2904
2901
|
}
|
|
2905
|
-
`, Zt =
|
|
2902
|
+
`, Zt = x`
|
|
2906
2903
|
query GetPurchasingCustomerSharing {
|
|
2907
2904
|
purchasingCustomer {
|
|
2908
2905
|
id
|
|
@@ -2919,7 +2916,7 @@ const b = M, $t = b`
|
|
|
2919
2916
|
}
|
|
2920
2917
|
}
|
|
2921
2918
|
}
|
|
2922
|
-
`, en =
|
|
2919
|
+
`, en = x`
|
|
2923
2920
|
query GetProduct($id: String!, $first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: ProductVariantSortKeys! = CREATED_AT) {
|
|
2924
2921
|
productByProductShopifyLegacyResourceID(productShopifyLegacyResourceID: $id) {
|
|
2925
2922
|
id
|
|
@@ -2951,30 +2948,52 @@ const b = M, $t = b`
|
|
|
2951
2948
|
}
|
|
2952
2949
|
}
|
|
2953
2950
|
}
|
|
2954
|
-
`, tn =
|
|
2951
|
+
`, tn = x`
|
|
2955
2952
|
query GetPointCampaignOrderRuleTargetCustomerRank {
|
|
2956
2953
|
pointCampaignOrderRuleTargetCustomerRank {
|
|
2957
2954
|
pointCampaignOrderRule {
|
|
2958
2955
|
id
|
|
2959
2956
|
title
|
|
2957
|
+
pointMethod
|
|
2958
|
+
targetType
|
|
2960
2959
|
}
|
|
2961
2960
|
multiplier
|
|
2962
2961
|
fixedPoint
|
|
2963
2962
|
}
|
|
2964
2963
|
}
|
|
2965
|
-
`, nn =
|
|
2964
|
+
`, nn = x`
|
|
2966
2965
|
query GetEstimatedShopifyCartPoint($input: EstimatedShopifyCartPointInput!) {
|
|
2967
2966
|
estimatedShopifyCartPoint(input: $input) {
|
|
2968
|
-
|
|
2967
|
+
pointsEarning
|
|
2968
|
+
totalPointsEarning
|
|
2969
|
+
pointCampaign {
|
|
2970
|
+
pointsEarning
|
|
2971
|
+
pointCampaignOrderRule {
|
|
2972
|
+
id
|
|
2973
|
+
title
|
|
2974
|
+
pointMethod
|
|
2975
|
+
targetType
|
|
2976
|
+
}
|
|
2977
|
+
}
|
|
2969
2978
|
}
|
|
2970
2979
|
}
|
|
2971
|
-
`, rn =
|
|
2980
|
+
`, rn = x`
|
|
2972
2981
|
query GetEstimatedShopifyCartLineItemPoint($input: EstimatedShopifyCartLineItemPointInput!) {
|
|
2973
2982
|
estimatedShopifyCartLineItemPoint(input: $input) {
|
|
2974
|
-
|
|
2983
|
+
pointsEarning
|
|
2984
|
+
totalPointsEarning
|
|
2985
|
+
pointCampaign {
|
|
2986
|
+
pointsEarning
|
|
2987
|
+
pointCampaignOrderRule {
|
|
2988
|
+
id
|
|
2989
|
+
title
|
|
2990
|
+
pointMethod
|
|
2991
|
+
targetType
|
|
2992
|
+
}
|
|
2993
|
+
}
|
|
2975
2994
|
}
|
|
2976
2995
|
}
|
|
2977
|
-
`, sn =
|
|
2996
|
+
`, sn = x`
|
|
2978
2997
|
mutation PurchasingCustomerSendCustomerSharingActivationCode {
|
|
2979
2998
|
purchasingCustomerSendCustomerSharingActivationCode {
|
|
2980
2999
|
purchasingCustomer {
|
|
@@ -2990,7 +3009,7 @@ const b = M, $t = b`
|
|
|
2990
3009
|
}
|
|
2991
3010
|
}
|
|
2992
3011
|
}
|
|
2993
|
-
`,
|
|
3012
|
+
`, an = x`
|
|
2994
3013
|
mutation PurchasingCustomerActivateCustomerSharing($email: String!, $activationCode: String!) {
|
|
2995
3014
|
purchasingCustomerActivateCustomerSharing(
|
|
2996
3015
|
input: {email: $email, activationCode: $activationCode}
|
|
@@ -3005,8 +3024,8 @@ const b = M, $t = b`
|
|
|
3005
3024
|
}
|
|
3006
3025
|
}
|
|
3007
3026
|
}
|
|
3008
|
-
`,
|
|
3009
|
-
function un(e, t =
|
|
3027
|
+
`, on = (e, t, n, r) => e();
|
|
3028
|
+
function un(e, t = on) {
|
|
3010
3029
|
return {
|
|
3011
3030
|
GetLocationAvailabilities(n, r) {
|
|
3012
3031
|
return t((i) => e.request($t, n, { ...r, ...i }), "GetLocationAvailabilities", "query", n);
|
|
@@ -3057,7 +3076,7 @@ function un(e, t = an) {
|
|
|
3057
3076
|
return t((i) => e.request(sn, n, { ...r, ...i }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
|
|
3058
3077
|
},
|
|
3059
3078
|
PurchasingCustomerActivateCustomerSharing(n, r) {
|
|
3060
|
-
return t((i) => e.request(
|
|
3079
|
+
return t((i) => e.request(an, n, { ...r, ...i }), "PurchasingCustomerActivateCustomerSharing", "mutation", n);
|
|
3061
3080
|
}
|
|
3062
3081
|
};
|
|
3063
3082
|
}
|
|
@@ -3080,7 +3099,7 @@ const ve = JSON, cn = (e) => e.toUpperCase(), ln = (e) => {
|
|
|
3080
3099
|
documents: e,
|
|
3081
3100
|
requestHeaders: t,
|
|
3082
3101
|
signal: void 0
|
|
3083
|
-
},
|
|
3102
|
+
}, xe = (e) => {
|
|
3084
3103
|
var r, i;
|
|
3085
3104
|
let t;
|
|
3086
3105
|
const n = e.definitions.filter((s) => s.kind === "OperationDefinition");
|
|
@@ -3090,13 +3109,13 @@ const ve = JSON, cn = (e) => e.toUpperCase(), ln = (e) => {
|
|
|
3090
3109
|
let n;
|
|
3091
3110
|
try {
|
|
3092
3111
|
const r = Ue(e);
|
|
3093
|
-
n =
|
|
3112
|
+
n = xe(r);
|
|
3094
3113
|
} catch {
|
|
3095
3114
|
}
|
|
3096
3115
|
return { query: e, operationName: n };
|
|
3097
3116
|
}
|
|
3098
|
-
const t =
|
|
3099
|
-
return { query:
|
|
3117
|
+
const t = xe(e);
|
|
3118
|
+
return { query: kt(e), operationName: t };
|
|
3100
3119
|
};
|
|
3101
3120
|
class H extends Error {
|
|
3102
3121
|
constructor(t, n) {
|
|
@@ -3115,7 +3134,7 @@ var fn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
3115
3134
|
function mn(e) {
|
|
3116
3135
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
3117
3136
|
}
|
|
3118
|
-
var
|
|
3137
|
+
var Ce = { exports: {} };
|
|
3119
3138
|
(function(e, t) {
|
|
3120
3139
|
var n = typeof self < "u" ? self : fn, r = function() {
|
|
3121
3140
|
function s() {
|
|
@@ -3124,7 +3143,7 @@ var ye = { exports: {} };
|
|
|
3124
3143
|
return s.prototype = n, new s();
|
|
3125
3144
|
}();
|
|
3126
3145
|
(function(s) {
|
|
3127
|
-
(function(
|
|
3146
|
+
(function(a) {
|
|
3128
3147
|
var c = {
|
|
3129
3148
|
searchParams: "URLSearchParams" in s,
|
|
3130
3149
|
iterable: "Symbol" in s && "iterator" in Symbol,
|
|
@@ -3138,8 +3157,8 @@ var ye = { exports: {} };
|
|
|
3138
3157
|
formData: "FormData" in s,
|
|
3139
3158
|
arrayBuffer: "ArrayBuffer" in s
|
|
3140
3159
|
};
|
|
3141
|
-
function p(
|
|
3142
|
-
return
|
|
3160
|
+
function p(o) {
|
|
3161
|
+
return o && DataView.prototype.isPrototypeOf(o);
|
|
3143
3162
|
}
|
|
3144
3163
|
if (c.arrayBuffer)
|
|
3145
3164
|
var h = [
|
|
@@ -3152,21 +3171,21 @@ var ye = { exports: {} };
|
|
|
3152
3171
|
"[object Uint32Array]",
|
|
3153
3172
|
"[object Float32Array]",
|
|
3154
3173
|
"[object Float64Array]"
|
|
3155
|
-
], m = ArrayBuffer.isView || function(
|
|
3156
|
-
return
|
|
3174
|
+
], m = ArrayBuffer.isView || function(o) {
|
|
3175
|
+
return o && h.indexOf(Object.prototype.toString.call(o)) > -1;
|
|
3157
3176
|
};
|
|
3158
|
-
function
|
|
3159
|
-
if (typeof
|
|
3177
|
+
function C(o) {
|
|
3178
|
+
if (typeof o != "string" && (o = String(o)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(o))
|
|
3160
3179
|
throw new TypeError("Invalid character in header field name");
|
|
3161
|
-
return
|
|
3180
|
+
return o.toLowerCase();
|
|
3162
3181
|
}
|
|
3163
|
-
function
|
|
3164
|
-
return typeof
|
|
3182
|
+
function y(o) {
|
|
3183
|
+
return typeof o != "string" && (o = String(o)), o;
|
|
3165
3184
|
}
|
|
3166
|
-
function
|
|
3185
|
+
function A(o) {
|
|
3167
3186
|
var l = {
|
|
3168
3187
|
next: function() {
|
|
3169
|
-
var E =
|
|
3188
|
+
var E = o.shift();
|
|
3170
3189
|
return { done: E === void 0, value: E };
|
|
3171
3190
|
}
|
|
3172
3191
|
};
|
|
@@ -3174,86 +3193,86 @@ var ye = { exports: {} };
|
|
|
3174
3193
|
return l;
|
|
3175
3194
|
}), l;
|
|
3176
3195
|
}
|
|
3177
|
-
function g(
|
|
3178
|
-
this.map = {},
|
|
3196
|
+
function g(o) {
|
|
3197
|
+
this.map = {}, o instanceof g ? o.forEach(function(l, E) {
|
|
3179
3198
|
this.append(E, l);
|
|
3180
|
-
}, this) : Array.isArray(
|
|
3199
|
+
}, this) : Array.isArray(o) ? o.forEach(function(l) {
|
|
3181
3200
|
this.append(l[0], l[1]);
|
|
3182
|
-
}, this) :
|
|
3183
|
-
this.append(l,
|
|
3201
|
+
}, this) : o && Object.getOwnPropertyNames(o).forEach(function(l) {
|
|
3202
|
+
this.append(l, o[l]);
|
|
3184
3203
|
}, this);
|
|
3185
3204
|
}
|
|
3186
|
-
g.prototype.append = function(
|
|
3187
|
-
|
|
3188
|
-
var E = this.map[
|
|
3189
|
-
this.map[
|
|
3190
|
-
}, g.prototype.delete = function(
|
|
3191
|
-
delete this.map[
|
|
3192
|
-
}, g.prototype.get = function(
|
|
3193
|
-
return
|
|
3194
|
-
}, g.prototype.has = function(
|
|
3195
|
-
return this.map.hasOwnProperty(
|
|
3196
|
-
}, g.prototype.set = function(
|
|
3197
|
-
this.map[
|
|
3198
|
-
}, g.prototype.forEach = function(
|
|
3205
|
+
g.prototype.append = function(o, l) {
|
|
3206
|
+
o = C(o), l = y(l);
|
|
3207
|
+
var E = this.map[o];
|
|
3208
|
+
this.map[o] = E ? E + ", " + l : l;
|
|
3209
|
+
}, g.prototype.delete = function(o) {
|
|
3210
|
+
delete this.map[C(o)];
|
|
3211
|
+
}, g.prototype.get = function(o) {
|
|
3212
|
+
return o = C(o), this.has(o) ? this.map[o] : null;
|
|
3213
|
+
}, g.prototype.has = function(o) {
|
|
3214
|
+
return this.map.hasOwnProperty(C(o));
|
|
3215
|
+
}, g.prototype.set = function(o, l) {
|
|
3216
|
+
this.map[C(o)] = y(l);
|
|
3217
|
+
}, g.prototype.forEach = function(o, l) {
|
|
3199
3218
|
for (var E in this.map)
|
|
3200
|
-
this.map.hasOwnProperty(E) &&
|
|
3219
|
+
this.map.hasOwnProperty(E) && o.call(l, this.map[E], E, this);
|
|
3201
3220
|
}, g.prototype.keys = function() {
|
|
3202
|
-
var
|
|
3221
|
+
var o = [];
|
|
3203
3222
|
return this.forEach(function(l, E) {
|
|
3204
|
-
|
|
3205
|
-
}),
|
|
3223
|
+
o.push(E);
|
|
3224
|
+
}), A(o);
|
|
3206
3225
|
}, g.prototype.values = function() {
|
|
3207
|
-
var
|
|
3226
|
+
var o = [];
|
|
3208
3227
|
return this.forEach(function(l) {
|
|
3209
|
-
|
|
3210
|
-
}),
|
|
3228
|
+
o.push(l);
|
|
3229
|
+
}), A(o);
|
|
3211
3230
|
}, g.prototype.entries = function() {
|
|
3212
|
-
var
|
|
3231
|
+
var o = [];
|
|
3213
3232
|
return this.forEach(function(l, E) {
|
|
3214
|
-
|
|
3215
|
-
}),
|
|
3233
|
+
o.push([E, l]);
|
|
3234
|
+
}), A(o);
|
|
3216
3235
|
}, c.iterable && (g.prototype[Symbol.iterator] = g.prototype.entries);
|
|
3217
|
-
function
|
|
3218
|
-
if (
|
|
3236
|
+
function I(o) {
|
|
3237
|
+
if (o.bodyUsed)
|
|
3219
3238
|
return Promise.reject(new TypeError("Already read"));
|
|
3220
|
-
|
|
3239
|
+
o.bodyUsed = !0;
|
|
3221
3240
|
}
|
|
3222
|
-
function
|
|
3241
|
+
function O(o) {
|
|
3223
3242
|
return new Promise(function(l, E) {
|
|
3224
|
-
|
|
3225
|
-
l(
|
|
3226
|
-
},
|
|
3227
|
-
E(
|
|
3243
|
+
o.onload = function() {
|
|
3244
|
+
l(o.result);
|
|
3245
|
+
}, o.onerror = function() {
|
|
3246
|
+
E(o.error);
|
|
3228
3247
|
};
|
|
3229
3248
|
});
|
|
3230
3249
|
}
|
|
3231
|
-
function
|
|
3232
|
-
var l = new FileReader(), E =
|
|
3233
|
-
return l.readAsArrayBuffer(
|
|
3250
|
+
function P(o) {
|
|
3251
|
+
var l = new FileReader(), E = O(l);
|
|
3252
|
+
return l.readAsArrayBuffer(o), E;
|
|
3234
3253
|
}
|
|
3235
|
-
function z(
|
|
3236
|
-
var l = new FileReader(), E =
|
|
3237
|
-
return l.readAsText(
|
|
3254
|
+
function z(o) {
|
|
3255
|
+
var l = new FileReader(), E = O(l);
|
|
3256
|
+
return l.readAsText(o), E;
|
|
3238
3257
|
}
|
|
3239
|
-
function _(
|
|
3240
|
-
for (var l = new Uint8Array(
|
|
3241
|
-
E[
|
|
3258
|
+
function _(o) {
|
|
3259
|
+
for (var l = new Uint8Array(o), E = new Array(l.length), b = 0; b < l.length; b++)
|
|
3260
|
+
E[b] = String.fromCharCode(l[b]);
|
|
3242
3261
|
return E.join("");
|
|
3243
3262
|
}
|
|
3244
|
-
function
|
|
3245
|
-
if (
|
|
3246
|
-
return
|
|
3247
|
-
var l = new Uint8Array(
|
|
3248
|
-
return l.set(new Uint8Array(
|
|
3263
|
+
function D(o) {
|
|
3264
|
+
if (o.slice)
|
|
3265
|
+
return o.slice(0);
|
|
3266
|
+
var l = new Uint8Array(o.byteLength);
|
|
3267
|
+
return l.set(new Uint8Array(o)), l.buffer;
|
|
3249
3268
|
}
|
|
3250
3269
|
function B() {
|
|
3251
|
-
return this.bodyUsed = !1, this._initBody = function(
|
|
3252
|
-
this._bodyInit =
|
|
3270
|
+
return this.bodyUsed = !1, this._initBody = function(o) {
|
|
3271
|
+
this._bodyInit = o, o ? typeof o == "string" ? this._bodyText = o : c.blob && Blob.prototype.isPrototypeOf(o) ? this._bodyBlob = o : c.formData && FormData.prototype.isPrototypeOf(o) ? this._bodyFormData = o : c.searchParams && URLSearchParams.prototype.isPrototypeOf(o) ? this._bodyText = o.toString() : c.arrayBuffer && c.blob && p(o) ? (this._bodyArrayBuffer = D(o.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : c.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(o) || m(o)) ? this._bodyArrayBuffer = D(o) : this._bodyText = o = Object.prototype.toString.call(o) : this._bodyText = "", this.headers.get("content-type") || (typeof o == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : c.searchParams && URLSearchParams.prototype.isPrototypeOf(o) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
3253
3272
|
}, c.blob && (this.blob = function() {
|
|
3254
|
-
var
|
|
3255
|
-
if (
|
|
3256
|
-
return
|
|
3273
|
+
var o = I(this);
|
|
3274
|
+
if (o)
|
|
3275
|
+
return o;
|
|
3257
3276
|
if (this._bodyBlob)
|
|
3258
3277
|
return Promise.resolve(this._bodyBlob);
|
|
3259
3278
|
if (this._bodyArrayBuffer)
|
|
@@ -3262,11 +3281,11 @@ var ye = { exports: {} };
|
|
|
3262
3281
|
throw new Error("could not read FormData body as blob");
|
|
3263
3282
|
return Promise.resolve(new Blob([this._bodyText]));
|
|
3264
3283
|
}, this.arrayBuffer = function() {
|
|
3265
|
-
return this._bodyArrayBuffer ?
|
|
3284
|
+
return this._bodyArrayBuffer ? I(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(P);
|
|
3266
3285
|
}), this.text = function() {
|
|
3267
|
-
var
|
|
3268
|
-
if (
|
|
3269
|
-
return
|
|
3286
|
+
var o = I(this);
|
|
3287
|
+
if (o)
|
|
3288
|
+
return o;
|
|
3270
3289
|
if (this._bodyBlob)
|
|
3271
3290
|
return z(this._bodyBlob);
|
|
3272
3291
|
if (this._bodyArrayBuffer)
|
|
@@ -3281,19 +3300,19 @@ var ye = { exports: {} };
|
|
|
3281
3300
|
}, this;
|
|
3282
3301
|
}
|
|
3283
3302
|
var J = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
|
|
3284
|
-
function Q(
|
|
3285
|
-
var l =
|
|
3286
|
-
return J.indexOf(l) > -1 ? l :
|
|
3303
|
+
function Q(o) {
|
|
3304
|
+
var l = o.toUpperCase();
|
|
3305
|
+
return J.indexOf(l) > -1 ? l : o;
|
|
3287
3306
|
}
|
|
3288
|
-
function w(
|
|
3307
|
+
function w(o, l) {
|
|
3289
3308
|
l = l || {};
|
|
3290
3309
|
var E = l.body;
|
|
3291
|
-
if (
|
|
3292
|
-
if (
|
|
3310
|
+
if (o instanceof w) {
|
|
3311
|
+
if (o.bodyUsed)
|
|
3293
3312
|
throw new TypeError("Already read");
|
|
3294
|
-
this.url =
|
|
3313
|
+
this.url = o.url, this.credentials = o.credentials, l.headers || (this.headers = new g(o.headers)), this.method = o.method, this.mode = o.mode, this.signal = o.signal, !E && o._bodyInit != null && (E = o._bodyInit, o.bodyUsed = !0);
|
|
3295
3314
|
} else
|
|
3296
|
-
this.url = String(
|
|
3315
|
+
this.url = String(o);
|
|
3297
3316
|
if (this.credentials = l.credentials || this.credentials || "same-origin", (l.headers || !this.headers) && (this.headers = new g(l.headers)), this.method = Q(l.method || this.method || "GET"), this.mode = l.mode || this.mode || null, this.signal = l.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && E)
|
|
3298
3317
|
throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
3299
3318
|
this._initBody(E);
|
|
@@ -3301,28 +3320,28 @@ var ye = { exports: {} };
|
|
|
3301
3320
|
w.prototype.clone = function() {
|
|
3302
3321
|
return new w(this, { body: this._bodyInit });
|
|
3303
3322
|
};
|
|
3304
|
-
function Ve(
|
|
3323
|
+
function Ve(o) {
|
|
3305
3324
|
var l = new FormData();
|
|
3306
|
-
return
|
|
3325
|
+
return o.trim().split("&").forEach(function(E) {
|
|
3307
3326
|
if (E) {
|
|
3308
|
-
var
|
|
3309
|
-
l.append(decodeURIComponent(
|
|
3327
|
+
var b = E.split("="), R = b.shift().replace(/\+/g, " "), T = b.join("=").replace(/\+/g, " ");
|
|
3328
|
+
l.append(decodeURIComponent(R), decodeURIComponent(T));
|
|
3310
3329
|
}
|
|
3311
3330
|
}), l;
|
|
3312
3331
|
}
|
|
3313
|
-
function $e(
|
|
3314
|
-
var l = new g(), E =
|
|
3315
|
-
return E.split(/\r?\n/).forEach(function(
|
|
3316
|
-
var
|
|
3317
|
-
if (
|
|
3318
|
-
var X =
|
|
3319
|
-
l.append(
|
|
3332
|
+
function $e(o) {
|
|
3333
|
+
var l = new g(), E = o.replace(/\r?\n[\t ]+/g, " ");
|
|
3334
|
+
return E.split(/\r?\n/).forEach(function(b) {
|
|
3335
|
+
var R = b.split(":"), T = R.shift().trim();
|
|
3336
|
+
if (T) {
|
|
3337
|
+
var X = R.join(":").trim();
|
|
3338
|
+
l.append(T, X);
|
|
3320
3339
|
}
|
|
3321
3340
|
}), l;
|
|
3322
3341
|
}
|
|
3323
3342
|
B.call(w.prototype);
|
|
3324
|
-
function L(
|
|
3325
|
-
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 g(l.headers), this.url = l.url || "", this._initBody(
|
|
3343
|
+
function L(o, l) {
|
|
3344
|
+
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 g(l.headers), this.url = l.url || "", this._initBody(o);
|
|
3326
3345
|
}
|
|
3327
3346
|
B.call(L.prototype), L.prototype.clone = function() {
|
|
3328
3347
|
return new L(this._bodyInit, {
|
|
@@ -3332,110 +3351,110 @@ var ye = { exports: {} };
|
|
|
3332
3351
|
url: this.url
|
|
3333
3352
|
});
|
|
3334
3353
|
}, L.error = function() {
|
|
3335
|
-
var
|
|
3336
|
-
return
|
|
3354
|
+
var o = new L(null, { status: 0, statusText: "" });
|
|
3355
|
+
return o.type = "error", o;
|
|
3337
3356
|
};
|
|
3338
3357
|
var je = [301, 302, 303, 307, 308];
|
|
3339
|
-
L.redirect = function(
|
|
3358
|
+
L.redirect = function(o, l) {
|
|
3340
3359
|
if (je.indexOf(l) === -1)
|
|
3341
3360
|
throw new RangeError("Invalid status code");
|
|
3342
|
-
return new L(null, { status: l, headers: { location:
|
|
3343
|
-
},
|
|
3361
|
+
return new L(null, { status: l, headers: { location: o } });
|
|
3362
|
+
}, a.DOMException = s.DOMException;
|
|
3344
3363
|
try {
|
|
3345
|
-
new
|
|
3364
|
+
new a.DOMException();
|
|
3346
3365
|
} catch {
|
|
3347
|
-
|
|
3366
|
+
a.DOMException = function(l, E) {
|
|
3348
3367
|
this.message = l, this.name = E;
|
|
3349
|
-
var
|
|
3350
|
-
this.stack =
|
|
3351
|
-
},
|
|
3368
|
+
var b = Error(l);
|
|
3369
|
+
this.stack = b.stack;
|
|
3370
|
+
}, a.DOMException.prototype = Object.create(Error.prototype), a.DOMException.prototype.constructor = a.DOMException;
|
|
3352
3371
|
}
|
|
3353
|
-
function
|
|
3354
|
-
return new Promise(function(E,
|
|
3355
|
-
var
|
|
3356
|
-
if (
|
|
3357
|
-
return
|
|
3358
|
-
var
|
|
3372
|
+
function oe(o, l) {
|
|
3373
|
+
return new Promise(function(E, b) {
|
|
3374
|
+
var R = new w(o, l);
|
|
3375
|
+
if (R.signal && R.signal.aborted)
|
|
3376
|
+
return b(new a.DOMException("Aborted", "AbortError"));
|
|
3377
|
+
var T = new XMLHttpRequest();
|
|
3359
3378
|
function X() {
|
|
3360
|
-
|
|
3379
|
+
T.abort();
|
|
3361
3380
|
}
|
|
3362
|
-
|
|
3381
|
+
T.onload = function() {
|
|
3363
3382
|
var V = {
|
|
3364
|
-
status:
|
|
3365
|
-
statusText:
|
|
3366
|
-
headers: $e(
|
|
3383
|
+
status: T.status,
|
|
3384
|
+
statusText: T.statusText,
|
|
3385
|
+
headers: $e(T.getAllResponseHeaders() || "")
|
|
3367
3386
|
};
|
|
3368
|
-
V.url = "responseURL" in
|
|
3369
|
-
var ue = "response" in
|
|
3387
|
+
V.url = "responseURL" in T ? T.responseURL : V.headers.get("X-Request-URL");
|
|
3388
|
+
var ue = "response" in T ? T.response : T.responseText;
|
|
3370
3389
|
E(new L(ue, V));
|
|
3371
|
-
},
|
|
3372
|
-
|
|
3373
|
-
},
|
|
3374
|
-
|
|
3375
|
-
},
|
|
3376
|
-
|
|
3377
|
-
},
|
|
3378
|
-
|
|
3379
|
-
}),
|
|
3380
|
-
|
|
3381
|
-
}),
|
|
3390
|
+
}, T.onerror = function() {
|
|
3391
|
+
b(new TypeError("Network request failed"));
|
|
3392
|
+
}, T.ontimeout = function() {
|
|
3393
|
+
b(new TypeError("Network request failed"));
|
|
3394
|
+
}, T.onabort = function() {
|
|
3395
|
+
b(new a.DOMException("Aborted", "AbortError"));
|
|
3396
|
+
}, T.open(R.method, R.url, !0), R.credentials === "include" ? T.withCredentials = !0 : R.credentials === "omit" && (T.withCredentials = !1), "responseType" in T && c.blob && (T.responseType = "blob"), R.headers.forEach(function(V, ue) {
|
|
3397
|
+
T.setRequestHeader(ue, V);
|
|
3398
|
+
}), R.signal && (R.signal.addEventListener("abort", X), T.onreadystatechange = function() {
|
|
3399
|
+
T.readyState === 4 && R.signal.removeEventListener("abort", X);
|
|
3400
|
+
}), T.send(typeof R._bodyInit > "u" ? null : R._bodyInit);
|
|
3382
3401
|
});
|
|
3383
3402
|
}
|
|
3384
|
-
return
|
|
3403
|
+
return oe.polyfill = !0, s.fetch || (s.fetch = oe, s.Headers = g, s.Request = w, s.Response = L), a.Headers = g, a.Request = w, a.Response = L, a.fetch = oe, Object.defineProperty(a, "__esModule", { value: !0 }), a;
|
|
3385
3404
|
})({});
|
|
3386
3405
|
})(r), r.fetch.ponyfill = !0, delete r.fetch.polyfill;
|
|
3387
3406
|
var i = r;
|
|
3388
3407
|
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;
|
|
3389
|
-
})(
|
|
3390
|
-
var
|
|
3391
|
-
const te = /* @__PURE__ */ mn(
|
|
3408
|
+
})(Ce, Ce.exports);
|
|
3409
|
+
var re = Ce.exports;
|
|
3410
|
+
const te = /* @__PURE__ */ mn(re), gn = /* @__PURE__ */ ze({
|
|
3392
3411
|
__proto__: null,
|
|
3393
3412
|
default: te
|
|
3394
|
-
}, [
|
|
3413
|
+
}, [re]), U = (e) => {
|
|
3395
3414
|
let t = {};
|
|
3396
|
-
return e && (typeof Headers < "u" && e instanceof Headers || gn &&
|
|
3415
|
+
return e && (typeof Headers < "u" && e instanceof Headers || gn && re.Headers && e instanceof re.Headers ? t = ln(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
|
|
3397
3416
|
n && r !== void 0 && (t[n] = r);
|
|
3398
3417
|
}) : t = e), t;
|
|
3399
|
-
},
|
|
3418
|
+
}, be = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), Cn = (e) => {
|
|
3400
3419
|
if (!Array.isArray(e.query)) {
|
|
3401
|
-
const r = e, i = [`query=${encodeURIComponent(
|
|
3420
|
+
const r = e, i = [`query=${encodeURIComponent(be(r.query))}`];
|
|
3402
3421
|
return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.join("&");
|
|
3403
3422
|
}
|
|
3404
3423
|
if (typeof e.variables < "u" && !Array.isArray(e.variables))
|
|
3405
3424
|
throw new Error("Cannot create query with given variable type, array expected");
|
|
3406
3425
|
const t = e, n = e.query.reduce((r, i, s) => (r.push({
|
|
3407
|
-
query:
|
|
3426
|
+
query: be(i),
|
|
3408
3427
|
variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0
|
|
3409
3428
|
}), r), []);
|
|
3410
3429
|
return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
|
|
3411
|
-
},
|
|
3412
|
-
const { url: n, query: r, variables: i, operationName: s, fetch:
|
|
3413
|
-
let m = "",
|
|
3414
|
-
e === "POST" ? (
|
|
3430
|
+
}, yn = (e) => async (t) => {
|
|
3431
|
+
const { url: n, query: r, variables: i, operationName: s, fetch: a, fetchOptions: c, middleware: p } = t, h = { ...t.headers };
|
|
3432
|
+
let m = "", C;
|
|
3433
|
+
e === "POST" ? (C = vn(r, i, s, c.jsonSerializer), typeof C == "string" && (h["Content-Type"] = "application/json")) : m = Cn({
|
|
3415
3434
|
query: r,
|
|
3416
3435
|
variables: i,
|
|
3417
3436
|
operationName: s,
|
|
3418
3437
|
jsonSerializer: c.jsonSerializer ?? ve
|
|
3419
3438
|
});
|
|
3420
|
-
const
|
|
3439
|
+
const y = {
|
|
3421
3440
|
method: e,
|
|
3422
3441
|
headers: h,
|
|
3423
|
-
body:
|
|
3442
|
+
body: C,
|
|
3424
3443
|
...c
|
|
3425
3444
|
};
|
|
3426
|
-
let
|
|
3445
|
+
let A = n, g = y;
|
|
3427
3446
|
if (p) {
|
|
3428
|
-
const
|
|
3429
|
-
|
|
3447
|
+
const I = await Promise.resolve(p({ ...y, url: n, operationName: s, variables: i })), { url: O, ...P } = I;
|
|
3448
|
+
A = O, g = P;
|
|
3430
3449
|
}
|
|
3431
|
-
return m && (
|
|
3450
|
+
return m && (A = `${A}?${m}`), await a(A, g);
|
|
3432
3451
|
};
|
|
3433
3452
|
class En {
|
|
3434
3453
|
constructor(t, n = {}) {
|
|
3435
3454
|
this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => {
|
|
3436
|
-
const [i, s,
|
|
3437
|
-
c.signal !== void 0 && (
|
|
3438
|
-
const { operationName:
|
|
3455
|
+
const [i, s, a] = r, c = pn(i, s, a), { headers: p, fetch: h = te, method: m = "POST", requestMiddleware: C, responseMiddleware: y, ...A } = this.requestConfig, { url: g } = this;
|
|
3456
|
+
c.signal !== void 0 && (A.signal = c.signal);
|
|
3457
|
+
const { operationName: I } = le(c.query);
|
|
3439
3458
|
return de({
|
|
3440
3459
|
url: g,
|
|
3441
3460
|
query: c.query,
|
|
@@ -3444,45 +3463,45 @@ class En {
|
|
|
3444
3463
|
...U(pe(p)),
|
|
3445
3464
|
...U(c.requestHeaders)
|
|
3446
3465
|
},
|
|
3447
|
-
operationName:
|
|
3466
|
+
operationName: I,
|
|
3448
3467
|
fetch: h,
|
|
3449
3468
|
method: m,
|
|
3450
|
-
fetchOptions:
|
|
3451
|
-
middleware:
|
|
3452
|
-
}).then((
|
|
3453
|
-
throw
|
|
3469
|
+
fetchOptions: A,
|
|
3470
|
+
middleware: C
|
|
3471
|
+
}).then((O) => (y && y(O), O)).catch((O) => {
|
|
3472
|
+
throw y && y(O), O;
|
|
3454
3473
|
});
|
|
3455
3474
|
};
|
|
3456
3475
|
}
|
|
3457
3476
|
async request(t, ...n) {
|
|
3458
|
-
const [r, i] = n, s = dn(t, r, i), { headers:
|
|
3459
|
-
s.signal !== void 0 && (
|
|
3460
|
-
const { query:
|
|
3477
|
+
const [r, i] = n, s = dn(t, r, i), { headers: a, fetch: c = te, method: p = "POST", requestMiddleware: h, responseMiddleware: m, ...C } = this.requestConfig, { url: y } = this;
|
|
3478
|
+
s.signal !== void 0 && (C.signal = s.signal);
|
|
3479
|
+
const { query: A, operationName: g } = le(s.document);
|
|
3461
3480
|
return de({
|
|
3462
|
-
url:
|
|
3463
|
-
query:
|
|
3481
|
+
url: y,
|
|
3482
|
+
query: A,
|
|
3464
3483
|
variables: s.variables,
|
|
3465
3484
|
headers: {
|
|
3466
|
-
...U(pe(
|
|
3485
|
+
...U(pe(a)),
|
|
3467
3486
|
...U(s.requestHeaders)
|
|
3468
3487
|
},
|
|
3469
3488
|
operationName: g,
|
|
3470
3489
|
fetch: c,
|
|
3471
3490
|
method: p,
|
|
3472
|
-
fetchOptions:
|
|
3491
|
+
fetchOptions: C,
|
|
3473
3492
|
middleware: h
|
|
3474
|
-
}).then((
|
|
3475
|
-
throw m && m(
|
|
3493
|
+
}).then((I) => (m && m(I), I.data)).catch((I) => {
|
|
3494
|
+
throw m && m(I), I;
|
|
3476
3495
|
});
|
|
3477
3496
|
}
|
|
3478
3497
|
// prettier-ignore
|
|
3479
3498
|
batchRequests(t, n) {
|
|
3480
3499
|
const r = hn(t, n), { headers: i, ...s } = this.requestConfig;
|
|
3481
3500
|
r.signal !== void 0 && (s.signal = r.signal);
|
|
3482
|
-
const
|
|
3501
|
+
const a = r.documents.map(({ document: p }) => le(p).query), c = r.documents.map(({ variables: p }) => p);
|
|
3483
3502
|
return de({
|
|
3484
3503
|
url: this.url,
|
|
3485
|
-
query:
|
|
3504
|
+
query: a,
|
|
3486
3505
|
// @ts-expect-error TODO reconcile batch variables into system.
|
|
3487
3506
|
variables: c,
|
|
3488
3507
|
headers: {
|
|
@@ -3516,13 +3535,13 @@ class En {
|
|
|
3516
3535
|
}
|
|
3517
3536
|
}
|
|
3518
3537
|
const de = async (e) => {
|
|
3519
|
-
const { query: t, variables: n, fetchOptions: r } = e, i =
|
|
3520
|
-
if (
|
|
3521
|
-
const { errors: m, ...
|
|
3538
|
+
const { query: t, variables: n, fetchOptions: r } = e, i = yn(cn(e.method ?? "post")), s = Array.isArray(e.query), a = await i(e), c = await Tn(a, r.jsonSerializer ?? ve), p = Array.isArray(c) ? !c.some(({ data: m }) => !m) : !!c.data, h = Array.isArray(c) || !c.errors || Array.isArray(c.errors) && !c.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
|
|
3539
|
+
if (a.ok && h && p) {
|
|
3540
|
+
const { errors: m, ...C } = (Array.isArray(c), c), y = r.errorPolicy === "ignore" ? C : c;
|
|
3522
3541
|
return {
|
|
3523
|
-
...s ? { data:
|
|
3524
|
-
headers:
|
|
3525
|
-
status:
|
|
3542
|
+
...s ? { data: y } : y,
|
|
3543
|
+
headers: a.headers,
|
|
3544
|
+
status: a.status
|
|
3526
3545
|
};
|
|
3527
3546
|
} else {
|
|
3528
3547
|
const m = typeof c == "string" ? {
|
|
@@ -3530,7 +3549,7 @@ const de = async (e) => {
|
|
|
3530
3549
|
} : c;
|
|
3531
3550
|
throw new H(
|
|
3532
3551
|
// @ts-expect-error TODO
|
|
3533
|
-
{ ...m, status:
|
|
3552
|
+
{ ...m, status: a.status, headers: a.headers },
|
|
3534
3553
|
{ query: t, variables: n }
|
|
3535
3554
|
);
|
|
3536
3555
|
}
|
|
@@ -3540,18 +3559,18 @@ const de = async (e) => {
|
|
|
3540
3559
|
return i.stringify({ query: e, variables: t, operationName: n });
|
|
3541
3560
|
if (typeof t < "u" && !Array.isArray(t))
|
|
3542
3561
|
throw new Error("Cannot create request body with given variable type, array expected");
|
|
3543
|
-
const s = e.reduce((
|
|
3562
|
+
const s = e.reduce((a, c, p) => (a.push({ query: c, variables: t ? t[p] : void 0 }), a), []);
|
|
3544
3563
|
return i.stringify(s);
|
|
3545
|
-
},
|
|
3564
|
+
}, Tn = async (e, t) => {
|
|
3546
3565
|
let n;
|
|
3547
3566
|
return e.headers.forEach((r, i) => {
|
|
3548
3567
|
i.toLowerCase() === "content-type" && (n = r);
|
|
3549
3568
|
}), 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();
|
|
3550
3569
|
}, pe = (e) => typeof e == "function" ? e() : e;
|
|
3551
|
-
var
|
|
3552
|
-
class
|
|
3570
|
+
var An = /* @__PURE__ */ ((e) => (e.Eur = "EUR", e.Jpy = "JPY", e.Usd = "USD", e))(An || {}), In = /* @__PURE__ */ ((e) => (e.Retail = "RETAIL", e.Warehouse = "WAREHOUSE", e))(In || {});
|
|
3571
|
+
class Nn {
|
|
3553
3572
|
constructor(t) {
|
|
3554
|
-
|
|
3573
|
+
Te(this, "api");
|
|
3555
3574
|
this.api = un(
|
|
3556
3575
|
new En(`${t}/apps/sq-api`, {
|
|
3557
3576
|
headers: {
|
|
@@ -3577,26 +3596,26 @@ class In {
|
|
|
3577
3596
|
});
|
|
3578
3597
|
return {
|
|
3579
3598
|
nodes: s.locationAvailabilities.nodes.map(
|
|
3580
|
-
(
|
|
3599
|
+
(a) => ({
|
|
3581
3600
|
location: {
|
|
3582
|
-
id:
|
|
3583
|
-
name:
|
|
3584
|
-
phone:
|
|
3585
|
-
mapURL:
|
|
3586
|
-
tags:
|
|
3587
|
-
address:
|
|
3588
|
-
id:
|
|
3589
|
-
countryCode:
|
|
3590
|
-
country:
|
|
3591
|
-
postalCode:
|
|
3592
|
-
provinceCode:
|
|
3593
|
-
province:
|
|
3594
|
-
city:
|
|
3595
|
-
address1:
|
|
3596
|
-
address2:
|
|
3601
|
+
id: a.location.id,
|
|
3602
|
+
name: a.location.name,
|
|
3603
|
+
phone: a.location.phone,
|
|
3604
|
+
mapURL: a.location.mapURL,
|
|
3605
|
+
tags: a.location.tags,
|
|
3606
|
+
address: a.location.address ? {
|
|
3607
|
+
id: a.location.address.id,
|
|
3608
|
+
countryCode: a.location.address.countryCode,
|
|
3609
|
+
country: a.location.address.country,
|
|
3610
|
+
postalCode: a.location.address.postalCode,
|
|
3611
|
+
provinceCode: a.location.address.provinceCode,
|
|
3612
|
+
province: a.location.address.province,
|
|
3613
|
+
city: a.location.address.city,
|
|
3614
|
+
address1: a.location.address.address1,
|
|
3615
|
+
address2: a.location.address.address2
|
|
3597
3616
|
} : void 0
|
|
3598
3617
|
},
|
|
3599
|
-
inventoryQuantity:
|
|
3618
|
+
inventoryQuantity: a.inventoryQuantity
|
|
3600
3619
|
})
|
|
3601
3620
|
) ?? [],
|
|
3602
3621
|
pageInfo: s.locationAvailabilities.pageInfo ?? null
|
|
@@ -3654,42 +3673,50 @@ class In {
|
|
|
3654
3673
|
pointsPending: t.purchasingCustomer.pointsPending,
|
|
3655
3674
|
pointsExpiringSoon: t.purchasingCustomer.pointsExpiringSoon ? {
|
|
3656
3675
|
points: t.purchasingCustomer.pointsExpiringSoon.points,
|
|
3657
|
-
expiresDate: new Date(
|
|
3658
|
-
|
|
3676
|
+
expiresDate: new Date(
|
|
3677
|
+
t.purchasingCustomer.pointsExpiringSoon.expiresDate
|
|
3678
|
+
),
|
|
3679
|
+
availableUntil: new Date(
|
|
3680
|
+
t.purchasingCustomer.pointsExpiringSoon.availableUntil
|
|
3681
|
+
)
|
|
3659
3682
|
} : void 0
|
|
3660
3683
|
} : null;
|
|
3661
3684
|
}
|
|
3662
3685
|
/**
|
|
3663
3686
|
* getLocations は ShopifyIntegration に紐づく LocationGroup の Location の一覧を取得します。
|
|
3664
3687
|
*
|
|
3665
|
-
* @param {string} [tag] 取得したいLocationのタグ。
|
|
3666
|
-
* @param {string[]} [provinceCodes] 取得したいLocationの都道府県コード。
|
|
3667
3688
|
* @param {number} [first] 取得してくる個数。デフォルトは250。
|
|
3668
3689
|
* @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
|
|
3690
|
+
* @param {LocationFilter} [locationFilter] ロケーションのロケーションのフィルタリング条件。
|
|
3669
3691
|
* @param {boolean} [isReverse] 並び順。デフォルトはfalse。
|
|
3670
3692
|
*/
|
|
3671
|
-
async getLocations(t, n, r, i
|
|
3672
|
-
const
|
|
3693
|
+
async getLocations(t, n, r, i) {
|
|
3694
|
+
const s = await this.api.GetLocations({
|
|
3695
|
+
first: t,
|
|
3696
|
+
after: n,
|
|
3697
|
+
filter: r,
|
|
3698
|
+
isReverse: i
|
|
3699
|
+
});
|
|
3673
3700
|
return {
|
|
3674
|
-
nodes:
|
|
3675
|
-
id:
|
|
3676
|
-
name:
|
|
3677
|
-
phone:
|
|
3678
|
-
mapURL:
|
|
3679
|
-
tags:
|
|
3680
|
-
address:
|
|
3681
|
-
id:
|
|
3682
|
-
countryCode:
|
|
3683
|
-
country:
|
|
3684
|
-
postalCode:
|
|
3685
|
-
provinceCode:
|
|
3686
|
-
province:
|
|
3687
|
-
city:
|
|
3688
|
-
address1:
|
|
3689
|
-
address2:
|
|
3701
|
+
nodes: s.locations.nodes.map((a) => ({
|
|
3702
|
+
id: a.id,
|
|
3703
|
+
name: a.name,
|
|
3704
|
+
phone: a.phone,
|
|
3705
|
+
mapURL: a.mapURL,
|
|
3706
|
+
tags: a.tags,
|
|
3707
|
+
address: a.address ? {
|
|
3708
|
+
id: a.address.id,
|
|
3709
|
+
countryCode: a.address.countryCode,
|
|
3710
|
+
country: a.address.country,
|
|
3711
|
+
postalCode: a.address.postalCode,
|
|
3712
|
+
provinceCode: a.address.provinceCode,
|
|
3713
|
+
province: a.address.province,
|
|
3714
|
+
city: a.address.city,
|
|
3715
|
+
address1: a.address.address1,
|
|
3716
|
+
address2: a.address.address2
|
|
3690
3717
|
} : void 0
|
|
3691
3718
|
})) ?? [],
|
|
3692
|
-
pageInfo:
|
|
3719
|
+
pageInfo: s.locations.pageInfo ?? null
|
|
3693
3720
|
};
|
|
3694
3721
|
}
|
|
3695
3722
|
/**
|
|
@@ -3745,46 +3772,46 @@ class In {
|
|
|
3745
3772
|
});
|
|
3746
3773
|
return s.purchasingCustomer ? {
|
|
3747
3774
|
nodes: s.purchasingCustomer.pointChangeActivities.nodes.map(
|
|
3748
|
-
(
|
|
3749
|
-
id:
|
|
3750
|
-
title:
|
|
3775
|
+
(a) => ({
|
|
3776
|
+
id: a.id,
|
|
3777
|
+
title: a.title,
|
|
3778
|
+
tenant: {
|
|
3779
|
+
id: a.tenant.id,
|
|
3780
|
+
name: a.tenant.name
|
|
3781
|
+
},
|
|
3751
3782
|
pointChange: {
|
|
3752
|
-
id:
|
|
3753
|
-
delta:
|
|
3754
|
-
availableAt:
|
|
3755
|
-
|
|
3756
|
-
|
|
3783
|
+
id: a.pointChange.id,
|
|
3784
|
+
delta: a.pointChange.delta,
|
|
3785
|
+
availableAt: a.pointChange.availableAt ? new Date(a.pointChange.availableAt) : void 0,
|
|
3786
|
+
expiresDate: a.pointChange.expiresDate ? new Date(a.pointChange.expiresDate) : void 0,
|
|
3787
|
+
availableUntil: a.pointChange.availableUntil ? new Date(a.pointChange.availableUntil) : void 0,
|
|
3757
3788
|
pointChangeCreatedAt: new Date(
|
|
3758
|
-
|
|
3789
|
+
a.pointChange.pointChangeCreatedAt
|
|
3759
3790
|
),
|
|
3760
3791
|
tenant: {
|
|
3761
|
-
id:
|
|
3762
|
-
name:
|
|
3792
|
+
id: a.pointChange.tenant.id,
|
|
3793
|
+
name: a.pointChange.tenant.name
|
|
3763
3794
|
},
|
|
3764
|
-
createdAt: new Date(
|
|
3795
|
+
createdAt: new Date(a.pointChange.createdAt)
|
|
3765
3796
|
},
|
|
3766
|
-
retailLocation:
|
|
3767
|
-
id:
|
|
3768
|
-
name:
|
|
3769
|
-
phone:
|
|
3770
|
-
mapURL:
|
|
3771
|
-
tags:
|
|
3772
|
-
address:
|
|
3773
|
-
id:
|
|
3774
|
-
countryCode:
|
|
3775
|
-
country:
|
|
3776
|
-
postalCode:
|
|
3777
|
-
provinceCode:
|
|
3778
|
-
province:
|
|
3779
|
-
city:
|
|
3780
|
-
address1:
|
|
3781
|
-
address2:
|
|
3797
|
+
retailLocation: a.retailLocation ? {
|
|
3798
|
+
id: a.retailLocation.id,
|
|
3799
|
+
name: a.retailLocation.name,
|
|
3800
|
+
phone: a.retailLocation.phone,
|
|
3801
|
+
mapURL: a.retailLocation.mapURL,
|
|
3802
|
+
tags: a.retailLocation.tags,
|
|
3803
|
+
address: a.retailLocation.address ? {
|
|
3804
|
+
id: a.retailLocation.address.id,
|
|
3805
|
+
countryCode: a.retailLocation.address.countryCode,
|
|
3806
|
+
country: a.retailLocation.address.country,
|
|
3807
|
+
postalCode: a.retailLocation.address.postalCode,
|
|
3808
|
+
provinceCode: a.retailLocation.address.provinceCode,
|
|
3809
|
+
province: a.retailLocation.address.province,
|
|
3810
|
+
city: a.retailLocation.address.city,
|
|
3811
|
+
address1: a.retailLocation.address.address1,
|
|
3812
|
+
address2: a.retailLocation.address.address2
|
|
3782
3813
|
} : void 0
|
|
3783
|
-
} : void 0
|
|
3784
|
-
tenant: {
|
|
3785
|
-
id: o.tenant.id,
|
|
3786
|
-
name: o.tenant.name
|
|
3787
|
-
}
|
|
3814
|
+
} : void 0
|
|
3788
3815
|
})
|
|
3789
3816
|
),
|
|
3790
3817
|
pageInfo: s.purchasingCustomer.pointChangeActivities.pageInfo
|
|
@@ -3799,6 +3826,21 @@ class In {
|
|
|
3799
3826
|
return (n = t.purchasingCustomer) != null && n.currentCustomerRank ? {
|
|
3800
3827
|
id: t.purchasingCustomer.currentCustomerRank.id,
|
|
3801
3828
|
name: t.purchasingCustomer.currentCustomerRank.name,
|
|
3829
|
+
threshold: t.purchasingCustomer.currentCustomerRank.threshold,
|
|
3830
|
+
higherRank: t.purchasingCustomer.currentCustomerRank.higherRank ? {
|
|
3831
|
+
id: t.purchasingCustomer.currentCustomerRank.higherRank.id,
|
|
3832
|
+
name: t.purchasingCustomer.currentCustomerRank.higherRank.name,
|
|
3833
|
+
threshold: t.purchasingCustomer.currentCustomerRank.higherRank.threshold
|
|
3834
|
+
} : void 0,
|
|
3835
|
+
lowerRank: t.purchasingCustomer.currentCustomerRank.lowerRank ? {
|
|
3836
|
+
id: t.purchasingCustomer.currentCustomerRank.lowerRank.id,
|
|
3837
|
+
name: t.purchasingCustomer.currentCustomerRank.lowerRank.name,
|
|
3838
|
+
threshold: t.purchasingCustomer.currentCustomerRank.lowerRank.threshold
|
|
3839
|
+
} : void 0,
|
|
3840
|
+
earnedPoint: t.purchasingCustomer.currentCustomerRank.earnedPoint,
|
|
3841
|
+
purchasePrice: t.purchasingCustomer.currentCustomerRank.purchasePrice,
|
|
3842
|
+
earnedPointToRankUp: t.purchasingCustomer.currentCustomerRank.earnedPointToRankUp,
|
|
3843
|
+
purchasePriceToRankUp: t.purchasingCustomer.currentCustomerRank.purchasePriceToRankUp,
|
|
3802
3844
|
calculationCondition: {
|
|
3803
3845
|
customerRankCalculationPeriod: t.purchasingCustomer.currentCustomerRank.calculationCondition.customerRankCalculationPeriod ? {
|
|
3804
3846
|
start: new Date(
|
|
@@ -3811,19 +3853,6 @@ class In {
|
|
|
3811
3853
|
earnedPoint: t.purchasingCustomer.currentCustomerRank.calculationCondition.earnedPoint,
|
|
3812
3854
|
purchasePrice: t.purchasingCustomer.currentCustomerRank.calculationCondition.purchasePrice
|
|
3813
3855
|
},
|
|
3814
|
-
earnedPointToRankUp: t.purchasingCustomer.currentCustomerRank.earnedPointToRankUp,
|
|
3815
|
-
higherRank: t.purchasingCustomer.currentCustomerRank.higherRank ? {
|
|
3816
|
-
id: t.purchasingCustomer.currentCustomerRank.higherRank.id,
|
|
3817
|
-
name: t.purchasingCustomer.currentCustomerRank.higherRank.name,
|
|
3818
|
-
threshold: t.purchasingCustomer.currentCustomerRank.higherRank.threshold
|
|
3819
|
-
} : void 0,
|
|
3820
|
-
lowerRank: t.purchasingCustomer.currentCustomerRank.lowerRank ? {
|
|
3821
|
-
id: t.purchasingCustomer.currentCustomerRank.lowerRank.id,
|
|
3822
|
-
name: t.purchasingCustomer.currentCustomerRank.lowerRank.name,
|
|
3823
|
-
threshold: t.purchasingCustomer.currentCustomerRank.lowerRank.threshold
|
|
3824
|
-
} : void 0,
|
|
3825
|
-
purchasePriceToRankUp: t.purchasingCustomer.currentCustomerRank.purchasePriceToRankUp,
|
|
3826
|
-
threshold: t.purchasingCustomer.currentCustomerRank.threshold,
|
|
3827
3856
|
pointMultiplier: t.purchasingCustomer.currentCustomerRank.pointMultiplier ? {
|
|
3828
3857
|
id: t.purchasingCustomer.currentCustomerRank.pointMultiplier.id,
|
|
3829
3858
|
customerRankRule: {
|
|
@@ -3870,32 +3899,32 @@ class In {
|
|
|
3870
3899
|
} : null;
|
|
3871
3900
|
}
|
|
3872
3901
|
async getProduct(t, n, r, i, s) {
|
|
3873
|
-
const
|
|
3902
|
+
const a = await this.api.GetProduct({
|
|
3874
3903
|
id: t,
|
|
3875
3904
|
first: n,
|
|
3876
3905
|
after: r,
|
|
3877
3906
|
isReverse: i,
|
|
3878
3907
|
sortKeys: s
|
|
3879
3908
|
});
|
|
3880
|
-
return
|
|
3881
|
-
id:
|
|
3882
|
-
title:
|
|
3883
|
-
hasBackOrderProductVariants:
|
|
3884
|
-
isLocalPickupAvailable:
|
|
3909
|
+
return a.productByProductShopifyLegacyResourceID ? {
|
|
3910
|
+
id: a.productByProductShopifyLegacyResourceID.id,
|
|
3911
|
+
title: a.productByProductShopifyLegacyResourceID.title,
|
|
3912
|
+
hasBackOrderProductVariants: a.productByProductShopifyLegacyResourceID.hasBackOrderProductVariants,
|
|
3913
|
+
isLocalPickupAvailable: a.productByProductShopifyLegacyResourceID.isLocalPickupAvailable,
|
|
3885
3914
|
variants: {
|
|
3886
|
-
nodes:
|
|
3915
|
+
nodes: a.productByProductShopifyLegacyResourceID.productVariants.nodes.map(
|
|
3887
3916
|
(c) => ({
|
|
3888
3917
|
id: c.id,
|
|
3889
3918
|
title: c.title,
|
|
3890
|
-
isBackOrderEnable: c.isBackOrderEnable,
|
|
3891
|
-
isLocalPickupAvailable: c.isLocalPickupAvailable,
|
|
3892
3919
|
inventoryItem: {
|
|
3893
3920
|
id: c.inventoryItem.id,
|
|
3894
3921
|
sku: c.inventoryItem.sku
|
|
3895
|
-
}
|
|
3922
|
+
},
|
|
3923
|
+
isBackOrderEnable: c.isBackOrderEnable,
|
|
3924
|
+
isLocalPickupAvailable: c.isLocalPickupAvailable
|
|
3896
3925
|
})
|
|
3897
3926
|
),
|
|
3898
|
-
pageInfo:
|
|
3927
|
+
pageInfo: a.productByProductShopifyLegacyResourceID.productVariants.pageInfo
|
|
3899
3928
|
}
|
|
3900
3929
|
} : null;
|
|
3901
3930
|
}
|
|
@@ -3904,7 +3933,9 @@ class In {
|
|
|
3904
3933
|
return t.pointCampaignOrderRuleTargetCustomerRank ? {
|
|
3905
3934
|
pointCampaignOrderRule: {
|
|
3906
3935
|
id: t.pointCampaignOrderRuleTargetCustomerRank.pointCampaignOrderRule.id,
|
|
3907
|
-
title: t.pointCampaignOrderRuleTargetCustomerRank.pointCampaignOrderRule.title
|
|
3936
|
+
title: t.pointCampaignOrderRuleTargetCustomerRank.pointCampaignOrderRule.title,
|
|
3937
|
+
pointMethod: t.pointCampaignOrderRuleTargetCustomerRank.pointCampaignOrderRule.pointMethod,
|
|
3938
|
+
targetType: t.pointCampaignOrderRuleTargetCustomerRank.pointCampaignOrderRule.targetType
|
|
3908
3939
|
},
|
|
3909
3940
|
multiplier: t.pointCampaignOrderRuleTargetCustomerRank.multiplier ? t.pointCampaignOrderRuleTargetCustomerRank.multiplier : void 0,
|
|
3910
3941
|
fixedPoint: t.pointCampaignOrderRuleTargetCustomerRank.fixedPoint ? t.pointCampaignOrderRuleTargetCustomerRank.fixedPoint : void 0
|
|
@@ -3919,11 +3950,21 @@ class In {
|
|
|
3919
3950
|
}
|
|
3920
3951
|
});
|
|
3921
3952
|
return i.estimatedShopifyCartPoint ? {
|
|
3922
|
-
|
|
3953
|
+
pointsEarning: i.estimatedShopifyCartPoint.pointsEarning,
|
|
3954
|
+
totalPointsEarning: i.estimatedShopifyCartPoint.totalPointsEarning,
|
|
3955
|
+
pointCampaign: i.estimatedShopifyCartPoint.pointCampaign ? {
|
|
3956
|
+
pointsEarning: i.estimatedShopifyCartPoint.pointCampaign.pointsEarning,
|
|
3957
|
+
pointCampaignOrderRule: {
|
|
3958
|
+
id: i.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.id,
|
|
3959
|
+
title: i.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.title,
|
|
3960
|
+
pointMethod: i.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.pointMethod,
|
|
3961
|
+
targetType: i.estimatedShopifyCartPoint.pointCampaign.pointCampaignOrderRule.targetType
|
|
3962
|
+
}
|
|
3963
|
+
} : void 0
|
|
3923
3964
|
} : null;
|
|
3924
3965
|
}
|
|
3925
3966
|
async getEstimatedShopifyCartLineItemPoint(t, n, r, i, s) {
|
|
3926
|
-
const
|
|
3967
|
+
const a = await this.api.GetEstimatedShopifyCartLineItemPoint({
|
|
3927
3968
|
input: {
|
|
3928
3969
|
currencyCode: t,
|
|
3929
3970
|
taxesIncluded: n,
|
|
@@ -3932,8 +3973,18 @@ class In {
|
|
|
3932
3973
|
unitPrice: s
|
|
3933
3974
|
}
|
|
3934
3975
|
});
|
|
3935
|
-
return
|
|
3936
|
-
|
|
3976
|
+
return a.estimatedShopifyCartLineItemPoint ? {
|
|
3977
|
+
pointsEarning: a.estimatedShopifyCartLineItemPoint.pointsEarning,
|
|
3978
|
+
totalPointsEarning: a.estimatedShopifyCartLineItemPoint.totalPointsEarning,
|
|
3979
|
+
pointCampaign: a.estimatedShopifyCartLineItemPoint.pointCampaign ? {
|
|
3980
|
+
pointsEarning: a.estimatedShopifyCartLineItemPoint.pointCampaign.pointsEarning,
|
|
3981
|
+
pointCampaignOrderRule: {
|
|
3982
|
+
id: a.estimatedShopifyCartLineItemPoint.pointCampaign.pointCampaignOrderRule.id,
|
|
3983
|
+
title: a.estimatedShopifyCartLineItemPoint.pointCampaign.pointCampaignOrderRule.title,
|
|
3984
|
+
pointMethod: a.estimatedShopifyCartLineItemPoint.pointCampaign.pointCampaignOrderRule.pointMethod,
|
|
3985
|
+
targetType: a.estimatedShopifyCartLineItemPoint.pointCampaign.pointCampaignOrderRule.targetType
|
|
3986
|
+
}
|
|
3987
|
+
} : void 0
|
|
3937
3988
|
} : null;
|
|
3938
3989
|
}
|
|
3939
3990
|
/**
|
|
@@ -3976,6 +4027,7 @@ class In {
|
|
|
3976
4027
|
}
|
|
3977
4028
|
}
|
|
3978
4029
|
export {
|
|
3979
|
-
|
|
3980
|
-
In as
|
|
4030
|
+
An as CurrencyCode,
|
|
4031
|
+
In as LocationType,
|
|
4032
|
+
Nn as SDK
|
|
3981
4033
|
};
|