@ticketapp-dev/shop-sdk 1.0.43 → 1.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,98 +1,100 @@
1
- import { GraphQLClient as v } from "graphql-request";
2
- import { DateTime as A } from "luxon";
3
- var T = /* @__PURE__ */ ((n) => (n.PACKAGE = "PACKAGE", n.PRODUCT = "PRODUCT", n.ADD_ONS = "ADD_ONS", n.DELIVERY = "DELIVERY", n.PICKUP = "PICKUP", n))(T || {}), R = /* @__PURE__ */ ((n) => (n.AdditionalEvent = "ADDITIONAL_EVENT", n.Addon = "ADDON", n.Regular = "REGULAR", n))(R || {}), K = /* @__PURE__ */ ((n) => (n.Active = "ACTIVE", n.Concept = "CONCEPT", n.Paused = "PAUSED", n.SoldOut = "SOLD_OUT", n))(K || {}), ee = /* @__PURE__ */ ((n) => (n.Active = "ACTIVE", n.Inactive = "INACTIVE", n))(ee || {}), te = /* @__PURE__ */ ((n) => (n.Active = "ACTIVE", n.Inactive = "INACTIVE", n.Paused = "PAUSED", n.SoldOut = "SOLD_OUT", n))(te || {}), ne = /* @__PURE__ */ ((n) => (n.Asc = "ASC", n.Desc = "DESC", n))(ne || {}), ie = /* @__PURE__ */ ((n) => (n.AllReserved = "ALL_RESERVED", n.Available = "AVAILABLE", n.SoldOut = "SOLD_OUT", n))(ie || {}), re = /* @__PURE__ */ ((n) => (n.Addon = "ADDON", n.Delivery = "DELIVERY", n.Door = "DOOR", n.Friend = "FRIEND", n.Guest = "GUEST", n.Pickup = "PICKUP", n.Promoter = "PROMOTER", n.Ticket = "TICKET", n))(re || {}), se = /* @__PURE__ */ ((n) => (n.FIXED = "FIXED", n.PERCENTAGE = "PERCENTAGE", n))(se || {}), ae = /* @__PURE__ */ ((n) => (n.AddOn = "ADD_ON", n.DeliveryOption = "DELIVERY_OPTION", n.EntranceTicket = "ENTRANCE_TICKET", n))(ae || {}), oe = /* @__PURE__ */ ((n) => (n.Fixed = "FIXED", n.Percentage = "PERCENTAGE", n))(oe || {}), w = /* @__PURE__ */ ((n) => (n.Event = "EVENT", n.Package = "PACKAGE", n))(w || {});
1
+ import { GraphQLClient as N } from "graphql-request";
2
+ import { DateTime as k } from "luxon";
3
+ var T = /* @__PURE__ */ ((t) => (t.PACKAGE = "PACKAGE", t.PRODUCT = "PRODUCT", t.ADD_ONS = "ADD_ONS", t.DELIVERY = "DELIVERY", t.PICKUP = "PICKUP", t))(T || {}), R = /* @__PURE__ */ ((t) => (t.AdditionalEvent = "ADDITIONAL_EVENT", t.Addon = "ADDON", t.Regular = "REGULAR", t))(R || {}), Z = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Concept = "CONCEPT", t.Paused = "PAUSED", t.SoldOut = "SOLD_OUT", t))(Z || {}), K = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Inactive = "INACTIVE", t))(K || {}), ee = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Inactive = "INACTIVE", t.Paused = "PAUSED", t.SoldOut = "SOLD_OUT", t))(ee || {}), te = /* @__PURE__ */ ((t) => (t.Asc = "ASC", t.Desc = "DESC", t))(te || {}), ne = /* @__PURE__ */ ((t) => (t.AllReserved = "ALL_RESERVED", t.Available = "AVAILABLE", t.SoldOut = "SOLD_OUT", t))(ne || {}), ie = /* @__PURE__ */ ((t) => (t.Addon = "ADDON", t.Delivery = "DELIVERY", t.Door = "DOOR", t.Friend = "FRIEND", t.Guest = "GUEST", t.Pickup = "PICKUP", t.Promoter = "PROMOTER", t.Ticket = "TICKET", t))(ie || {}), re = /* @__PURE__ */ ((t) => (t.FIXED = "FIXED", t.PERCENTAGE = "PERCENTAGE", t))(re || {}), se = /* @__PURE__ */ ((t) => (t.AddOn = "ADD_ON", t.DeliveryOption = "DELIVERY_OPTION", t.EntranceTicket = "ENTRANCE_TICKET", t))(se || {}), ae = /* @__PURE__ */ ((t) => (t.Fixed = "FIXED", t.Percentage = "PERCENTAGE", t))(ae || {}), oe = /* @__PURE__ */ ((t) => (t.Default = "DEFAULT", t.Transparent = "TRANSPARENT", t))(oe || {}), ce = /* @__PURE__ */ ((t) => (t.Calendar = "CALENDAR", t.Large = "LARGE", t.Small = "SMALL", t))(ce || {}), F = /* @__PURE__ */ ((t) => (t.Event = "EVENT", t.Package = "PACKAGE", t))(F || {});
4
4
  const Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
5
  __proto__: null,
6
6
  BasketOrderType: T,
7
- DiscountType: oe,
8
- EventStatus: te,
9
- MetricsType: w,
10
- OrderItemType: ae,
7
+ DiscountType: ae,
8
+ EventStatus: ee,
9
+ MetricsType: F,
10
+ OrderItemType: se,
11
11
  PackageItemType: R,
12
- PackageStatus: K,
13
- PackageTabType: ee,
14
- PaymentMethodFeeType: se,
15
- ProductStatus: ie,
16
- ProductType: re,
17
- SortOrder: ne
12
+ PackageStatus: Z,
13
+ PackageTabType: K,
14
+ PaymentMethodFeeType: re,
15
+ ProductStatus: ne,
16
+ ProductType: ie,
17
+ ShopTemplateType: oe,
18
+ ShopVariationType: ce,
19
+ SortOrder: te
18
20
  }, Symbol.toStringTag, { value: "Module" }));
19
- var F = function() {
20
- return F = Object.assign || function(e) {
21
- for (var t, i = 1, r = arguments.length; i < r; i++) {
22
- t = arguments[i];
23
- for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]);
21
+ var w = function() {
22
+ return w = Object.assign || function(e) {
23
+ for (var n, i = 1, r = arguments.length; i < r; i++) {
24
+ n = arguments[i];
25
+ for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (e[s] = n[s]);
24
26
  }
25
27
  return e;
26
- }, F.apply(this, arguments);
28
+ }, w.apply(this, arguments);
27
29
  };
28
- function U(n, e) {
29
- if (!!!n)
30
+ function U(t, e) {
31
+ if (!!!t)
30
32
  throw new Error(e);
31
33
  }
32
- function Ae(n) {
33
- return typeof n == "object" && n !== null;
34
+ function De(t) {
35
+ return typeof t == "object" && t !== null;
34
36
  }
35
- function Ne(n, e) {
36
- if (!!!n)
37
+ function Ne(t, e) {
38
+ if (!!!t)
37
39
  throw new Error(
38
40
  "Unexpected invariant triggered."
39
41
  );
40
42
  }
41
- const De = /\r\n|[\n\r]/g;
42
- function z(n, e) {
43
- let t = 0, i = 1;
44
- for (const r of n.body.matchAll(De)) {
43
+ const ve = /\r\n|[\n\r]/g;
44
+ function z(t, e) {
45
+ let n = 0, i = 1;
46
+ for (const r of t.body.matchAll(ve)) {
45
47
  if (typeof r.index == "number" || Ne(!1), r.index >= e)
46
48
  break;
47
- t = r.index + r[0].length, i += 1;
49
+ n = r.index + r[0].length, i += 1;
48
50
  }
49
51
  return {
50
52
  line: i,
51
- column: e + 1 - t
53
+ column: e + 1 - n
52
54
  };
53
55
  }
54
- function ve(n) {
55
- return ce(
56
- n.source,
57
- z(n.source, n.start)
56
+ function be(t) {
57
+ return de(
58
+ t.source,
59
+ z(t.source, t.start)
58
60
  );
59
61
  }
60
- function ce(n, e) {
61
- const t = n.locationOffset.column - 1, i = "".padStart(t) + n.body, r = e.line - 1, s = n.locationOffset.line - 1, o = e.line + s, u = e.line === 1 ? t : 0, h = e.column + u, E = `${n.name}:${o}:${h}
62
- `, m = i.split(/\r\n|[\n\r]/g), d = m[r];
62
+ function de(t, e) {
63
+ const n = t.locationOffset.column - 1, i = "".padStart(n) + t.body, r = e.line - 1, s = t.locationOffset.line - 1, o = e.line + s, l = e.line === 1 ? n : 0, p = e.column + l, E = `${t.name}:${o}:${p}
64
+ `, g = i.split(/\r\n|[\n\r]/g), d = g[r];
63
65
  if (d.length > 120) {
64
- const f = Math.floor(h / 80), y = h % 80, p = [];
66
+ const m = Math.floor(p / 80), y = p % 80, h = [];
65
67
  for (let O = 0; O < d.length; O += 80)
66
- p.push(d.slice(O, O + 80));
68
+ h.push(d.slice(O, O + 80));
67
69
  return E + Q([
68
- [`${o} |`, p[0]],
69
- ...p.slice(1, f + 1).map((O) => ["|", O]),
70
+ [`${o} |`, h[0]],
71
+ ...h.slice(1, m + 1).map((O) => ["|", O]),
70
72
  ["|", "^".padStart(y)],
71
- ["|", p[f + 1]]
73
+ ["|", h[m + 1]]
72
74
  ]);
73
75
  }
74
76
  return E + Q([
75
77
  // Lines specified like this: ["prefix", "string"],
76
- [`${o - 1} |`, m[r - 1]],
78
+ [`${o - 1} |`, g[r - 1]],
77
79
  [`${o} |`, d],
78
- ["|", "^".padStart(h)],
79
- [`${o + 1} |`, m[r + 1]]
80
+ ["|", "^".padStart(p)],
81
+ [`${o + 1} |`, g[r + 1]]
80
82
  ]);
81
83
  }
82
- function Q(n) {
83
- const e = n.filter(([i, r]) => r !== void 0), t = Math.max(...e.map(([i]) => i.length));
84
- return e.map(([i, r]) => i.padStart(t) + (r ? " " + r : "")).join(`
84
+ function Q(t) {
85
+ const e = t.filter(([i, r]) => r !== void 0), n = Math.max(...e.map(([i]) => i.length));
86
+ return e.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
85
87
  `);
86
88
  }
87
- function xe(n) {
88
- const e = n[0];
89
+ function Pe(t) {
90
+ const e = t[0];
89
91
  return e == null || "kind" in e || "length" in e ? {
90
92
  nodes: e,
91
- source: n[1],
92
- positions: n[2],
93
- path: n[3],
94
- originalError: n[4],
95
- extensions: n[5]
93
+ source: t[1],
94
+ positions: t[2],
95
+ path: t[3],
96
+ originalError: t[4],
97
+ extensions: t[5]
96
98
  } : e;
97
99
  }
98
100
  class j extends Error {
@@ -134,19 +136,19 @@ class j extends Error {
134
136
  /**
135
137
  * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
136
138
  */
137
- constructor(e, ...t) {
139
+ constructor(e, ...n) {
138
140
  var i, r, s;
139
- const { nodes: o, source: u, positions: h, path: E, originalError: m, extensions: d } = xe(t);
140
- super(e), this.name = "GraphQLError", this.path = E ?? void 0, this.originalError = m ?? void 0, this.nodes = X(
141
+ const { nodes: o, source: l, positions: p, path: E, originalError: g, extensions: d } = Pe(n);
142
+ super(e), this.name = "GraphQLError", this.path = E ?? void 0, this.originalError = g ?? void 0, this.nodes = X(
141
143
  Array.isArray(o) ? o : o ? [o] : void 0
142
144
  );
143
- const f = X(
144
- (i = this.nodes) === null || i === void 0 ? void 0 : i.map((p) => p.loc).filter((p) => p != null)
145
+ const m = X(
146
+ (i = this.nodes) === null || i === void 0 ? void 0 : i.map((h) => h.loc).filter((h) => h != null)
145
147
  );
146
- this.source = u ?? (f == null || (r = f[0]) === null || r === void 0 ? void 0 : r.source), this.positions = h ?? f?.map((p) => p.start), this.locations = h && u ? h.map((p) => z(u, p)) : f?.map((p) => z(p.source, p.start));
147
- const y = Ae(
148
- m?.extensions
149
- ) ? m?.extensions : void 0;
148
+ this.source = l ?? (m == null || (r = m[0]) === null || r === void 0 ? void 0 : r.source), this.positions = p ?? m?.map((h) => h.start), this.locations = p && l ? p.map((h) => z(l, h)) : m?.map((h) => z(h.source, h.start));
149
+ const y = De(
150
+ g?.extensions
151
+ ) ? g?.extensions : void 0;
150
152
  this.extensions = (s = d ?? y) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
151
153
  message: {
152
154
  writable: !0,
@@ -167,8 +169,8 @@ class j extends Error {
167
169
  originalError: {
168
170
  enumerable: !1
169
171
  }
170
- }), m != null && m.stack ? Object.defineProperty(this, "stack", {
171
- value: m.stack,
172
+ }), g != null && g.stack ? Object.defineProperty(this, "stack", {
173
+ value: g.stack,
172
174
  writable: !0,
173
175
  configurable: !0
174
176
  }) : Error.captureStackTrace ? Error.captureStackTrace(this, j) : Object.defineProperty(this, "stack", {
@@ -183,15 +185,15 @@ class j extends Error {
183
185
  toString() {
184
186
  let e = this.message;
185
187
  if (this.nodes)
186
- for (const t of this.nodes)
187
- t.loc && (e += `
188
+ for (const n of this.nodes)
189
+ n.loc && (e += `
188
190
 
189
- ` + ve(t.loc));
191
+ ` + be(n.loc));
190
192
  else if (this.source && this.locations)
191
- for (const t of this.locations)
193
+ for (const n of this.locations)
192
194
  e += `
193
195
 
194
- ` + ce(this.source, t);
196
+ ` + de(this.source, n);
195
197
  return e;
196
198
  }
197
199
  toJSON() {
@@ -201,16 +203,16 @@ class j extends Error {
201
203
  return this.locations != null && (e.locations = this.locations), this.path != null && (e.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (e.extensions = this.extensions), e;
202
204
  }
203
205
  }
204
- function X(n) {
205
- return n === void 0 || n.length === 0 ? void 0 : n;
206
+ function X(t) {
207
+ return t === void 0 || t.length === 0 ? void 0 : t;
206
208
  }
207
- function I(n, e, t) {
208
- return new j(`Syntax Error: ${t}`, {
209
- source: n,
209
+ function I(t, e, n) {
210
+ return new j(`Syntax Error: ${n}`, {
211
+ source: t,
210
212
  positions: [e]
211
213
  });
212
214
  }
213
- class Pe {
215
+ class Se {
214
216
  /**
215
217
  * The character offset at which this Node begins.
216
218
  */
@@ -226,8 +228,8 @@ class Pe {
226
228
  /**
227
229
  * The Source document the AST represents.
228
230
  */
229
- constructor(e, t, i) {
230
- this.start = e.start, this.end = t.end, this.startToken = e, this.endToken = t, this.source = i;
231
+ constructor(e, n, i) {
232
+ this.start = e.start, this.end = n.end, this.startToken = e, this.endToken = n, this.source = i;
231
233
  }
232
234
  get [Symbol.toStringTag]() {
233
235
  return "Location";
@@ -239,7 +241,7 @@ class Pe {
239
241
  };
240
242
  }
241
243
  }
242
- class de {
244
+ class ue {
243
245
  /**
244
246
  * The kind of Token.
245
247
  */
@@ -266,8 +268,8 @@ class de {
266
268
  * including ignored tokens. <SOF> is always the first node and <EOF>
267
269
  * the last.
268
270
  */
269
- constructor(e, t, i, r, s, o) {
270
- this.kind = e, this.start = t, this.end = i, this.line = r, this.column = s, this.value = o, this.prev = null, this.next = null;
271
+ constructor(e, n, i, r, s, o) {
272
+ this.kind = e, this.start = n, this.end = i, this.line = r, this.column = s, this.value = o, this.prev = null, this.next = null;
271
273
  }
272
274
  get [Symbol.toStringTag]() {
273
275
  return "Token";
@@ -281,7 +283,7 @@ class de {
281
283
  };
282
284
  }
283
285
  }
284
- const be = {
286
+ const xe = {
285
287
  Name: [],
286
288
  Document: ["definitions"],
287
289
  OperationDefinition: [
@@ -369,59 +371,59 @@ const be = {
369
371
  DirectiveCoordinate: ["name"],
370
372
  DirectiveArgumentCoordinate: ["name", "argumentName"]
371
373
  };
372
- new Set(Object.keys(be));
373
- var D;
374
- (function(n) {
375
- n.QUERY = "query", n.MUTATION = "mutation", n.SUBSCRIPTION = "subscription";
376
- })(D || (D = {}));
374
+ new Set(Object.keys(xe));
375
+ var v;
376
+ (function(t) {
377
+ t.QUERY = "query", t.MUTATION = "mutation", t.SUBSCRIPTION = "subscription";
378
+ })(v || (v = {}));
377
379
  var q;
378
- (function(n) {
379
- n.QUERY = "QUERY", n.MUTATION = "MUTATION", n.SUBSCRIPTION = "SUBSCRIPTION", n.FIELD = "FIELD", n.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", n.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", n.INLINE_FRAGMENT = "INLINE_FRAGMENT", n.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", n.SCHEMA = "SCHEMA", n.SCALAR = "SCALAR", n.OBJECT = "OBJECT", n.FIELD_DEFINITION = "FIELD_DEFINITION", n.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", n.INTERFACE = "INTERFACE", n.UNION = "UNION", n.ENUM = "ENUM", n.ENUM_VALUE = "ENUM_VALUE", n.INPUT_OBJECT = "INPUT_OBJECT", n.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
380
+ (function(t) {
381
+ t.QUERY = "QUERY", t.MUTATION = "MUTATION", t.SUBSCRIPTION = "SUBSCRIPTION", t.FIELD = "FIELD", t.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", t.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", t.INLINE_FRAGMENT = "INLINE_FRAGMENT", t.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", t.SCHEMA = "SCHEMA", t.SCALAR = "SCALAR", t.OBJECT = "OBJECT", t.FIELD_DEFINITION = "FIELD_DEFINITION", t.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", t.INTERFACE = "INTERFACE", t.UNION = "UNION", t.ENUM = "ENUM", t.ENUM_VALUE = "ENUM_VALUE", t.INPUT_OBJECT = "INPUT_OBJECT", t.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
380
382
  })(q || (q = {}));
381
383
  var c;
382
- (function(n) {
383
- n.NAME = "Name", n.DOCUMENT = "Document", n.OPERATION_DEFINITION = "OperationDefinition", n.VARIABLE_DEFINITION = "VariableDefinition", n.SELECTION_SET = "SelectionSet", n.FIELD = "Field", n.ARGUMENT = "Argument", n.FRAGMENT_SPREAD = "FragmentSpread", n.INLINE_FRAGMENT = "InlineFragment", n.FRAGMENT_DEFINITION = "FragmentDefinition", n.VARIABLE = "Variable", n.INT = "IntValue", n.FLOAT = "FloatValue", n.STRING = "StringValue", n.BOOLEAN = "BooleanValue", n.NULL = "NullValue", n.ENUM = "EnumValue", n.LIST = "ListValue", n.OBJECT = "ObjectValue", n.OBJECT_FIELD = "ObjectField", n.DIRECTIVE = "Directive", n.NAMED_TYPE = "NamedType", n.LIST_TYPE = "ListType", n.NON_NULL_TYPE = "NonNullType", n.SCHEMA_DEFINITION = "SchemaDefinition", n.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", n.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", n.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", n.FIELD_DEFINITION = "FieldDefinition", n.INPUT_VALUE_DEFINITION = "InputValueDefinition", n.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", n.UNION_TYPE_DEFINITION = "UnionTypeDefinition", n.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", n.ENUM_VALUE_DEFINITION = "EnumValueDefinition", n.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", n.DIRECTIVE_DEFINITION = "DirectiveDefinition", n.SCHEMA_EXTENSION = "SchemaExtension", n.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", n.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", n.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", n.UNION_TYPE_EXTENSION = "UnionTypeExtension", n.ENUM_TYPE_EXTENSION = "EnumTypeExtension", n.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension", n.TYPE_COORDINATE = "TypeCoordinate", n.MEMBER_COORDINATE = "MemberCoordinate", n.ARGUMENT_COORDINATE = "ArgumentCoordinate", n.DIRECTIVE_COORDINATE = "DirectiveCoordinate", n.DIRECTIVE_ARGUMENT_COORDINATE = "DirectiveArgumentCoordinate";
384
+ (function(t) {
385
+ t.NAME = "Name", t.DOCUMENT = "Document", t.OPERATION_DEFINITION = "OperationDefinition", t.VARIABLE_DEFINITION = "VariableDefinition", t.SELECTION_SET = "SelectionSet", t.FIELD = "Field", t.ARGUMENT = "Argument", t.FRAGMENT_SPREAD = "FragmentSpread", t.INLINE_FRAGMENT = "InlineFragment", t.FRAGMENT_DEFINITION = "FragmentDefinition", t.VARIABLE = "Variable", t.INT = "IntValue", t.FLOAT = "FloatValue", t.STRING = "StringValue", t.BOOLEAN = "BooleanValue", t.NULL = "NullValue", t.ENUM = "EnumValue", t.LIST = "ListValue", t.OBJECT = "ObjectValue", t.OBJECT_FIELD = "ObjectField", t.DIRECTIVE = "Directive", t.NAMED_TYPE = "NamedType", t.LIST_TYPE = "ListType", t.NON_NULL_TYPE = "NonNullType", t.SCHEMA_DEFINITION = "SchemaDefinition", t.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", t.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", t.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", t.FIELD_DEFINITION = "FieldDefinition", t.INPUT_VALUE_DEFINITION = "InputValueDefinition", t.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", t.UNION_TYPE_DEFINITION = "UnionTypeDefinition", t.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", t.ENUM_VALUE_DEFINITION = "EnumValueDefinition", t.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", t.DIRECTIVE_DEFINITION = "DirectiveDefinition", t.SCHEMA_EXTENSION = "SchemaExtension", t.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", t.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", t.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", t.UNION_TYPE_EXTENSION = "UnionTypeExtension", t.ENUM_TYPE_EXTENSION = "EnumTypeExtension", t.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension", t.TYPE_COORDINATE = "TypeCoordinate", t.MEMBER_COORDINATE = "MemberCoordinate", t.ARGUMENT_COORDINATE = "ArgumentCoordinate", t.DIRECTIVE_COORDINATE = "DirectiveCoordinate", t.DIRECTIVE_ARGUMENT_COORDINATE = "DirectiveArgumentCoordinate";
384
386
  })(c || (c = {}));
385
- function Se(n) {
386
- return n === 9 || n === 32;
387
+ function Ce(t) {
388
+ return t === 9 || t === 32;
387
389
  }
388
- function S(n) {
389
- return n >= 48 && n <= 57;
390
+ function x(t) {
391
+ return t >= 48 && t <= 57;
390
392
  }
391
- function ue(n) {
392
- return n >= 97 && n <= 122 || // A-Z
393
- n >= 65 && n <= 90;
393
+ function le(t) {
394
+ return t >= 97 && t <= 122 || // A-Z
395
+ t >= 65 && t <= 90;
394
396
  }
395
- function le(n) {
396
- return ue(n) || n === 95;
397
+ function pe(t) {
398
+ return le(t) || t === 95;
397
399
  }
398
- function Ce(n) {
399
- return ue(n) || S(n) || n === 95;
400
+ function _e(t) {
401
+ return le(t) || x(t) || t === 95;
400
402
  }
401
- function _e(n) {
403
+ function Le(t) {
402
404
  var e;
403
- let t = Number.MAX_SAFE_INTEGER, i = null, r = -1;
404
- for (let o = 0; o < n.length; ++o) {
405
+ let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
406
+ for (let o = 0; o < t.length; ++o) {
405
407
  var s;
406
- const u = n[o], h = Le(u);
407
- h !== u.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && h < t && (t = h));
408
+ const l = t[o], p = Re(l);
409
+ p !== l.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && p < n && (n = p));
408
410
  }
409
- return n.map((o, u) => u === 0 ? o : o.slice(t)).slice(
411
+ return t.map((o, l) => l === 0 ? o : o.slice(n)).slice(
410
412
  (e = i) !== null && e !== void 0 ? e : 0,
411
413
  r + 1
412
414
  );
413
415
  }
414
- function Le(n) {
416
+ function Re(t) {
415
417
  let e = 0;
416
- for (; e < n.length && Se(n.charCodeAt(e)); )
418
+ for (; e < t.length && Ce(t.charCodeAt(e)); )
417
419
  ++e;
418
420
  return e;
419
421
  }
420
422
  var a;
421
- (function(n) {
422
- n.SOF = "<SOF>", n.EOF = "<EOF>", n.BANG = "!", n.DOLLAR = "$", n.AMP = "&", n.PAREN_L = "(", n.PAREN_R = ")", n.DOT = ".", n.SPREAD = "...", n.COLON = ":", n.EQUALS = "=", n.AT = "@", n.BRACKET_L = "[", n.BRACKET_R = "]", n.BRACE_L = "{", n.PIPE = "|", n.BRACE_R = "}", n.NAME = "Name", n.INT = "Int", n.FLOAT = "Float", n.STRING = "String", n.BLOCK_STRING = "BlockString", n.COMMENT = "Comment";
423
+ (function(t) {
424
+ t.SOF = "<SOF>", t.EOF = "<EOF>", t.BANG = "!", t.DOLLAR = "$", t.AMP = "&", t.PAREN_L = "(", t.PAREN_R = ")", t.DOT = ".", t.SPREAD = "...", t.COLON = ":", t.EQUALS = "=", t.AT = "@", t.BRACKET_L = "[", t.BRACKET_R = "]", t.BRACE_L = "{", t.PIPE = "|", t.BRACE_R = "}", t.NAME = "Name", t.INT = "Int", t.FLOAT = "Float", t.STRING = "String", t.BLOCK_STRING = "BlockString", t.COMMENT = "Comment";
423
425
  })(a || (a = {}));
424
- class Re {
426
+ class Fe {
425
427
  /**
426
428
  * The previously focused non-ignored token.
427
429
  */
@@ -435,8 +437,8 @@ class Re {
435
437
  * The character offset at which the current line begins.
436
438
  */
437
439
  constructor(e) {
438
- const t = new de(a.SOF, 0, 0, 0, 0);
439
- this.source = e, this.lastToken = t, this.token = t, this.line = 1, this.lineStart = 0;
440
+ const n = new ue(a.SOF, 0, 0, 0, 0);
441
+ this.source = e, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
440
442
  }
441
443
  get [Symbol.toStringTag]() {
442
444
  return "Lexer";
@@ -458,47 +460,47 @@ class Re {
458
460
  if (e.next)
459
461
  e = e.next;
460
462
  else {
461
- const t = Fe(this, e.end);
462
- e.next = t, t.prev = e, e = t;
463
+ const n = $e(this, e.end);
464
+ e.next = n, n.prev = e, e = n;
463
465
  }
464
466
  while (e.kind === a.COMMENT);
465
467
  return e;
466
468
  }
467
469
  }
468
- function we(n) {
469
- return n === a.BANG || n === a.DOLLAR || n === a.AMP || n === a.PAREN_L || n === a.PAREN_R || n === a.DOT || n === a.SPREAD || n === a.COLON || n === a.EQUALS || n === a.AT || n === a.BRACKET_L || n === a.BRACKET_R || n === a.BRACE_L || n === a.PIPE || n === a.BRACE_R;
470
+ function we(t) {
471
+ return t === a.BANG || t === a.DOLLAR || t === a.AMP || t === a.PAREN_L || t === a.PAREN_R || t === a.DOT || t === a.SPREAD || t === a.COLON || t === a.EQUALS || t === a.AT || t === a.BRACKET_L || t === a.BRACKET_R || t === a.BRACE_L || t === a.PIPE || t === a.BRACE_R;
470
472
  }
471
- function x(n) {
472
- return n >= 0 && n <= 55295 || n >= 57344 && n <= 1114111;
473
+ function b(t) {
474
+ return t >= 0 && t <= 55295 || t >= 57344 && t <= 1114111;
473
475
  }
474
- function B(n, e) {
475
- return he(n.charCodeAt(e)) && pe(n.charCodeAt(e + 1));
476
+ function B(t, e) {
477
+ return he(t.charCodeAt(e)) && ge(t.charCodeAt(e + 1));
476
478
  }
477
- function he(n) {
478
- return n >= 55296 && n <= 56319;
479
+ function he(t) {
480
+ return t >= 55296 && t <= 56319;
479
481
  }
480
- function pe(n) {
481
- return n >= 56320 && n <= 57343;
482
+ function ge(t) {
483
+ return t >= 56320 && t <= 57343;
482
484
  }
483
- function N(n, e) {
484
- const t = n.source.body.codePointAt(e);
485
- if (t === void 0)
485
+ function D(t, e) {
486
+ const n = t.source.body.codePointAt(e);
487
+ if (n === void 0)
486
488
  return a.EOF;
487
- if (t >= 32 && t <= 126) {
488
- const i = String.fromCodePoint(t);
489
+ if (n >= 32 && n <= 126) {
490
+ const i = String.fromCodePoint(n);
489
491
  return i === '"' ? `'"'` : `"${i}"`;
490
492
  }
491
- return "U+" + t.toString(16).toUpperCase().padStart(4, "0");
493
+ return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
492
494
  }
493
- function g(n, e, t, i, r) {
494
- const s = n.line, o = 1 + t - n.lineStart;
495
- return new de(e, t, i, s, o, r);
495
+ function f(t, e, n, i, r) {
496
+ const s = t.line, o = 1 + n - t.lineStart;
497
+ return new ue(e, n, i, s, o, r);
496
498
  }
497
- function Fe(n, e) {
498
- const t = n.source.body, i = t.length;
499
+ function $e(t, e) {
500
+ const n = t.source.body, i = n.length;
499
501
  let r = e;
500
502
  for (; r < i; ) {
501
- const s = t.charCodeAt(r);
503
+ const s = n.charCodeAt(r);
502
504
  switch (s) {
503
505
  // Ignored ::
504
506
  // - UnicodeBOM
@@ -528,14 +530,14 @@ function Fe(n, e) {
528
530
  // - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
529
531
  // - "Carriage Return (U+000D)" "New Line (U+000A)"
530
532
  case 10:
531
- ++r, ++n.line, n.lineStart = r;
533
+ ++r, ++t.line, t.lineStart = r;
532
534
  continue;
533
535
  case 13:
534
- t.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++n.line, n.lineStart = r;
536
+ n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++t.line, t.lineStart = r;
535
537
  continue;
536
538
  // Comment
537
539
  case 35:
538
- return $e(n, r);
540
+ return Be(t, r);
539
541
  // Token ::
540
542
  // - Punctuator
541
543
  // - Name
@@ -545,207 +547,207 @@ function Fe(n, e) {
545
547
  //
546
548
  // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
547
549
  case 33:
548
- return g(n, a.BANG, r, r + 1);
550
+ return f(t, a.BANG, r, r + 1);
549
551
  case 36:
550
- return g(n, a.DOLLAR, r, r + 1);
552
+ return f(t, a.DOLLAR, r, r + 1);
551
553
  case 38:
552
- return g(n, a.AMP, r, r + 1);
554
+ return f(t, a.AMP, r, r + 1);
553
555
  case 40:
554
- return g(n, a.PAREN_L, r, r + 1);
556
+ return f(t, a.PAREN_L, r, r + 1);
555
557
  case 41:
556
- return g(n, a.PAREN_R, r, r + 1);
558
+ return f(t, a.PAREN_R, r, r + 1);
557
559
  case 46:
558
- if (t.charCodeAt(r + 1) === 46 && t.charCodeAt(r + 2) === 46)
559
- return g(n, a.SPREAD, r, r + 3);
560
+ if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46)
561
+ return f(t, a.SPREAD, r, r + 3);
560
562
  break;
561
563
  case 58:
562
- return g(n, a.COLON, r, r + 1);
564
+ return f(t, a.COLON, r, r + 1);
563
565
  case 61:
564
- return g(n, a.EQUALS, r, r + 1);
566
+ return f(t, a.EQUALS, r, r + 1);
565
567
  case 64:
566
- return g(n, a.AT, r, r + 1);
568
+ return f(t, a.AT, r, r + 1);
567
569
  case 91:
568
- return g(n, a.BRACKET_L, r, r + 1);
570
+ return f(t, a.BRACKET_L, r, r + 1);
569
571
  case 93:
570
- return g(n, a.BRACKET_R, r, r + 1);
572
+ return f(t, a.BRACKET_R, r, r + 1);
571
573
  case 123:
572
- return g(n, a.BRACE_L, r, r + 1);
574
+ return f(t, a.BRACE_L, r, r + 1);
573
575
  case 124:
574
- return g(n, a.PIPE, r, r + 1);
576
+ return f(t, a.PIPE, r, r + 1);
575
577
  case 125:
576
- return g(n, a.BRACE_R, r, r + 1);
578
+ return f(t, a.BRACE_R, r, r + 1);
577
579
  // StringValue
578
580
  case 34:
579
- return t.charCodeAt(r + 1) === 34 && t.charCodeAt(r + 2) === 34 ? qe(n, r) : Ve(n, r);
581
+ return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? Ge(t, r) : Ue(t, r);
580
582
  }
581
- if (S(s) || s === 45)
582
- return Be(n, r, s);
583
- if (le(s))
584
- return Ge(n, r);
583
+ if (x(s) || s === 45)
584
+ return Ve(t, r, s);
585
+ if (pe(s))
586
+ return je(t, r);
585
587
  throw I(
586
- n.source,
588
+ t.source,
587
589
  r,
588
- s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : x(s) || B(t, r) ? `Unexpected character: ${N(n, r)}.` : `Invalid character: ${N(n, r)}.`
590
+ s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : b(s) || B(n, r) ? `Unexpected character: ${D(t, r)}.` : `Invalid character: ${D(t, r)}.`
589
591
  );
590
592
  }
591
- return g(n, a.EOF, i, i);
593
+ return f(t, a.EOF, i, i);
592
594
  }
593
- function $e(n, e) {
594
- const t = n.source.body, i = t.length;
595
+ function Be(t, e) {
596
+ const n = t.source.body, i = n.length;
595
597
  let r = e + 1;
596
598
  for (; r < i; ) {
597
- const s = t.charCodeAt(r);
599
+ const s = n.charCodeAt(r);
598
600
  if (s === 10 || s === 13)
599
601
  break;
600
- if (x(s))
602
+ if (b(s))
601
603
  ++r;
602
- else if (B(t, r))
604
+ else if (B(n, r))
603
605
  r += 2;
604
606
  else
605
607
  break;
606
608
  }
607
- return g(
608
- n,
609
+ return f(
610
+ t,
609
611
  a.COMMENT,
610
612
  e,
611
613
  r,
612
- t.slice(e + 1, r)
614
+ n.slice(e + 1, r)
613
615
  );
614
616
  }
615
- function Be(n, e, t) {
616
- const i = n.source.body;
617
- let r = e, s = t, o = !1;
617
+ function Ve(t, e, n) {
618
+ const i = t.source.body;
619
+ let r = e, s = n, o = !1;
618
620
  if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
619
- if (s = i.charCodeAt(++r), S(s))
621
+ if (s = i.charCodeAt(++r), x(s))
620
622
  throw I(
621
- n.source,
623
+ t.source,
622
624
  r,
623
- `Invalid number, unexpected digit after 0: ${N(
624
- n,
625
+ `Invalid number, unexpected digit after 0: ${D(
626
+ t,
625
627
  r
626
628
  )}.`
627
629
  );
628
630
  } else
629
- r = M(n, r, s), s = i.charCodeAt(r);
630
- if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = M(n, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (o = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = M(n, r, s), s = i.charCodeAt(r)), s === 46 || le(s))
631
+ r = M(t, r, s), s = i.charCodeAt(r);
632
+ if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = M(t, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (o = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = M(t, r, s), s = i.charCodeAt(r)), s === 46 || pe(s))
631
633
  throw I(
632
- n.source,
634
+ t.source,
633
635
  r,
634
- `Invalid number, expected digit but got: ${N(
635
- n,
636
+ `Invalid number, expected digit but got: ${D(
637
+ t,
636
638
  r
637
639
  )}.`
638
640
  );
639
- return g(
640
- n,
641
+ return f(
642
+ t,
641
643
  o ? a.FLOAT : a.INT,
642
644
  e,
643
645
  r,
644
646
  i.slice(e, r)
645
647
  );
646
648
  }
647
- function M(n, e, t) {
648
- if (!S(t))
649
+ function M(t, e, n) {
650
+ if (!x(n))
649
651
  throw I(
650
- n.source,
652
+ t.source,
651
653
  e,
652
- `Invalid number, expected digit but got: ${N(
653
- n,
654
+ `Invalid number, expected digit but got: ${D(
655
+ t,
654
656
  e
655
657
  )}.`
656
658
  );
657
- const i = n.source.body;
659
+ const i = t.source.body;
658
660
  let r = e + 1;
659
- for (; S(i.charCodeAt(r)); )
661
+ for (; x(i.charCodeAt(r)); )
660
662
  ++r;
661
663
  return r;
662
664
  }
663
- function Ve(n, e) {
664
- const t = n.source.body, i = t.length;
665
+ function Ue(t, e) {
666
+ const n = t.source.body, i = n.length;
665
667
  let r = e + 1, s = r, o = "";
666
668
  for (; r < i; ) {
667
- const u = t.charCodeAt(r);
668
- if (u === 34)
669
- return o += t.slice(s, r), g(n, a.STRING, e, r + 1, o);
670
- if (u === 92) {
671
- o += t.slice(s, r);
672
- const h = t.charCodeAt(r + 1) === 117 ? t.charCodeAt(r + 2) === 123 ? Ue(n, r) : Me(n, r) : ze(n, r);
673
- o += h.value, r += h.size, s = r;
669
+ const l = n.charCodeAt(r);
670
+ if (l === 34)
671
+ return o += n.slice(s, r), f(t, a.STRING, e, r + 1, o);
672
+ if (l === 92) {
673
+ o += n.slice(s, r);
674
+ const p = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? Me(t, r) : ze(t, r) : qe(t, r);
675
+ o += p.value, r += p.size, s = r;
674
676
  continue;
675
677
  }
676
- if (u === 10 || u === 13)
678
+ if (l === 10 || l === 13)
677
679
  break;
678
- if (x(u))
680
+ if (b(l))
679
681
  ++r;
680
- else if (B(t, r))
682
+ else if (B(n, r))
681
683
  r += 2;
682
684
  else
683
685
  throw I(
684
- n.source,
686
+ t.source,
685
687
  r,
686
- `Invalid character within String: ${N(
687
- n,
688
+ `Invalid character within String: ${D(
689
+ t,
688
690
  r
689
691
  )}.`
690
692
  );
691
693
  }
692
- throw I(n.source, r, "Unterminated string.");
694
+ throw I(t.source, r, "Unterminated string.");
693
695
  }
694
- function Ue(n, e) {
695
- const t = n.source.body;
696
+ function Me(t, e) {
697
+ const n = t.source.body;
696
698
  let i = 0, r = 3;
697
699
  for (; r < 12; ) {
698
- const s = t.charCodeAt(e + r++);
700
+ const s = n.charCodeAt(e + r++);
699
701
  if (s === 125) {
700
- if (r < 5 || !x(i))
702
+ if (r < 5 || !b(i))
701
703
  break;
702
704
  return {
703
705
  value: String.fromCodePoint(i),
704
706
  size: r
705
707
  };
706
708
  }
707
- if (i = i << 4 | b(s), i < 0)
709
+ if (i = i << 4 | S(s), i < 0)
708
710
  break;
709
711
  }
710
712
  throw I(
711
- n.source,
713
+ t.source,
712
714
  e,
713
- `Invalid Unicode escape sequence: "${t.slice(
715
+ `Invalid Unicode escape sequence: "${n.slice(
714
716
  e,
715
717
  e + r
716
718
  )}".`
717
719
  );
718
720
  }
719
- function Me(n, e) {
720
- const t = n.source.body, i = W(t, e + 2);
721
- if (x(i))
721
+ function ze(t, e) {
722
+ const n = t.source.body, i = W(n, e + 2);
723
+ if (b(i))
722
724
  return {
723
725
  value: String.fromCodePoint(i),
724
726
  size: 6
725
727
  };
726
- if (he(i) && t.charCodeAt(e + 6) === 92 && t.charCodeAt(e + 7) === 117) {
727
- const r = W(t, e + 8);
728
- if (pe(r))
728
+ if (he(i) && n.charCodeAt(e + 6) === 92 && n.charCodeAt(e + 7) === 117) {
729
+ const r = W(n, e + 8);
730
+ if (ge(r))
729
731
  return {
730
732
  value: String.fromCodePoint(i, r),
731
733
  size: 12
732
734
  };
733
735
  }
734
736
  throw I(
735
- n.source,
737
+ t.source,
736
738
  e,
737
- `Invalid Unicode escape sequence: "${t.slice(e, e + 6)}".`
739
+ `Invalid Unicode escape sequence: "${n.slice(e, e + 6)}".`
738
740
  );
739
741
  }
740
- function W(n, e) {
741
- return b(n.charCodeAt(e)) << 12 | b(n.charCodeAt(e + 1)) << 8 | b(n.charCodeAt(e + 2)) << 4 | b(n.charCodeAt(e + 3));
742
+ function W(t, e) {
743
+ return S(t.charCodeAt(e)) << 12 | S(t.charCodeAt(e + 1)) << 8 | S(t.charCodeAt(e + 2)) << 4 | S(t.charCodeAt(e + 3));
742
744
  }
743
- function b(n) {
744
- return n >= 48 && n <= 57 ? n - 48 : n >= 65 && n <= 70 ? n - 55 : n >= 97 && n <= 102 ? n - 87 : -1;
745
+ function S(t) {
746
+ return t >= 48 && t <= 57 ? t - 48 : t >= 65 && t <= 70 ? t - 55 : t >= 97 && t <= 102 ? t - 87 : -1;
745
747
  }
746
- function ze(n, e) {
747
- const t = n.source.body;
748
- switch (t.charCodeAt(e + 1)) {
748
+ function qe(t, e) {
749
+ const n = t.source.body;
750
+ switch (n.charCodeAt(e + 1)) {
749
751
  case 34:
750
752
  return {
751
753
  value: '"',
@@ -789,145 +791,145 @@ function ze(n, e) {
789
791
  };
790
792
  }
791
793
  throw I(
792
- n.source,
794
+ t.source,
793
795
  e,
794
- `Invalid character escape sequence: "${t.slice(
796
+ `Invalid character escape sequence: "${n.slice(
795
797
  e,
796
798
  e + 2
797
799
  )}".`
798
800
  );
799
801
  }
800
- function qe(n, e) {
801
- const t = n.source.body, i = t.length;
802
- let r = n.lineStart, s = e + 3, o = s, u = "";
803
- const h = [];
802
+ function Ge(t, e) {
803
+ const n = t.source.body, i = n.length;
804
+ let r = t.lineStart, s = e + 3, o = s, l = "";
805
+ const p = [];
804
806
  for (; s < i; ) {
805
- const E = t.charCodeAt(s);
806
- if (E === 34 && t.charCodeAt(s + 1) === 34 && t.charCodeAt(s + 2) === 34) {
807
- u += t.slice(o, s), h.push(u);
808
- const m = g(
809
- n,
807
+ const E = n.charCodeAt(s);
808
+ if (E === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
809
+ l += n.slice(o, s), p.push(l);
810
+ const g = f(
811
+ t,
810
812
  a.BLOCK_STRING,
811
813
  e,
812
814
  s + 3,
813
815
  // Return a string of the lines joined with U+000A.
814
- _e(h).join(`
816
+ Le(p).join(`
815
817
  `)
816
818
  );
817
- return n.line += h.length - 1, n.lineStart = r, m;
819
+ return t.line += p.length - 1, t.lineStart = r, g;
818
820
  }
819
- if (E === 92 && t.charCodeAt(s + 1) === 34 && t.charCodeAt(s + 2) === 34 && t.charCodeAt(s + 3) === 34) {
820
- u += t.slice(o, s), o = s + 1, s += 4;
821
+ if (E === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
822
+ l += n.slice(o, s), o = s + 1, s += 4;
821
823
  continue;
822
824
  }
823
825
  if (E === 10 || E === 13) {
824
- u += t.slice(o, s), h.push(u), E === 13 && t.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", o = s, r = s;
826
+ l += n.slice(o, s), p.push(l), E === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, l = "", o = s, r = s;
825
827
  continue;
826
828
  }
827
- if (x(E))
829
+ if (b(E))
828
830
  ++s;
829
- else if (B(t, s))
831
+ else if (B(n, s))
830
832
  s += 2;
831
833
  else
832
834
  throw I(
833
- n.source,
835
+ t.source,
834
836
  s,
835
- `Invalid character within String: ${N(
836
- n,
837
+ `Invalid character within String: ${D(
838
+ t,
837
839
  s
838
840
  )}.`
839
841
  );
840
842
  }
841
- throw I(n.source, s, "Unterminated string.");
843
+ throw I(t.source, s, "Unterminated string.");
842
844
  }
843
- function Ge(n, e) {
844
- const t = n.source.body, i = t.length;
845
+ function je(t, e) {
846
+ const n = t.source.body, i = n.length;
845
847
  let r = e + 1;
846
848
  for (; r < i; ) {
847
- const s = t.charCodeAt(r);
848
- if (Ce(s))
849
+ const s = n.charCodeAt(r);
850
+ if (_e(s))
849
851
  ++r;
850
852
  else
851
853
  break;
852
854
  }
853
- return g(
854
- n,
855
+ return f(
856
+ t,
855
857
  a.NAME,
856
858
  e,
857
859
  r,
858
- t.slice(e, r)
860
+ n.slice(e, r)
859
861
  );
860
862
  }
861
- const je = 10, me = 2;
862
- function fe(n) {
863
- return V(n, []);
863
+ const Ye = 10, me = 2;
864
+ function fe(t) {
865
+ return V(t, []);
864
866
  }
865
- function V(n, e) {
866
- switch (typeof n) {
867
+ function V(t, e) {
868
+ switch (typeof t) {
867
869
  case "string":
868
- return JSON.stringify(n);
870
+ return JSON.stringify(t);
869
871
  case "function":
870
- return n.name ? `[function ${n.name}]` : "[function]";
872
+ return t.name ? `[function ${t.name}]` : "[function]";
871
873
  case "object":
872
- return Ye(n, e);
874
+ return He(t, e);
873
875
  default:
874
- return String(n);
876
+ return String(t);
875
877
  }
876
878
  }
877
- function Ye(n, e) {
878
- if (n === null)
879
+ function He(t, e) {
880
+ if (t === null)
879
881
  return "null";
880
- if (e.includes(n))
882
+ if (e.includes(t))
881
883
  return "[Circular]";
882
- const t = [...e, n];
883
- if (He(n)) {
884
- const i = n.toJSON();
885
- if (i !== n)
886
- return typeof i == "string" ? i : V(i, t);
887
- } else if (Array.isArray(n))
888
- return Qe(n, t);
889
- return Je(n, t);
890
- }
891
- function He(n) {
892
- return typeof n.toJSON == "function";
893
- }
894
- function Je(n, e) {
895
- const t = Object.entries(n);
896
- return t.length === 0 ? "{}" : e.length > me ? "[" + Xe(n) + "]" : "{ " + t.map(
884
+ const n = [...e, t];
885
+ if (Je(t)) {
886
+ const i = t.toJSON();
887
+ if (i !== t)
888
+ return typeof i == "string" ? i : V(i, n);
889
+ } else if (Array.isArray(t))
890
+ return Xe(t, n);
891
+ return Qe(t, n);
892
+ }
893
+ function Je(t) {
894
+ return typeof t.toJSON == "function";
895
+ }
896
+ function Qe(t, e) {
897
+ const n = Object.entries(t);
898
+ return n.length === 0 ? "{}" : e.length > me ? "[" + We(t) + "]" : "{ " + n.map(
897
899
  ([r, s]) => r + ": " + V(s, e)
898
900
  ).join(", ") + " }";
899
901
  }
900
- function Qe(n, e) {
901
- if (n.length === 0)
902
+ function Xe(t, e) {
903
+ if (t.length === 0)
902
904
  return "[]";
903
905
  if (e.length > me)
904
906
  return "[Array]";
905
- const t = Math.min(je, n.length), i = n.length - t, r = [];
906
- for (let s = 0; s < t; ++s)
907
- r.push(V(n[s], e));
907
+ const n = Math.min(Ye, t.length), i = t.length - n, r = [];
908
+ for (let s = 0; s < n; ++s)
909
+ r.push(V(t[s], e));
908
910
  return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
909
911
  }
910
- function Xe(n) {
911
- const e = Object.prototype.toString.call(n).replace(/^\[object /, "").replace(/]$/, "");
912
- if (e === "Object" && typeof n.constructor == "function") {
913
- const t = n.constructor.name;
914
- if (typeof t == "string" && t !== "")
915
- return t;
912
+ function We(t) {
913
+ const e = Object.prototype.toString.call(t).replace(/^\[object /, "").replace(/]$/, "");
914
+ if (e === "Object" && typeof t.constructor == "function") {
915
+ const n = t.constructor.name;
916
+ if (typeof n == "string" && n !== "")
917
+ return n;
916
918
  }
917
919
  return e;
918
920
  }
919
- const We = globalThis.process && // eslint-disable-next-line no-undef
920
- process.env.NODE_ENV === "production", Ze = (
921
+ const Ze = globalThis.process && // eslint-disable-next-line no-undef
922
+ process.env.NODE_ENV === "production", Ke = (
921
923
  /* c8 ignore next 6 */
922
924
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
923
- We ? function(e, t) {
924
- return e instanceof t;
925
- } : function(e, t) {
926
- if (e instanceof t)
925
+ Ze ? function(e, n) {
926
+ return e instanceof n;
927
+ } : function(e, n) {
928
+ if (e instanceof n)
927
929
  return !0;
928
930
  if (typeof e == "object" && e !== null) {
929
931
  var i;
930
- const r = t.prototype[Symbol.toStringTag], s = (
932
+ const r = n.prototype[Symbol.toStringTag], s = (
931
933
  // We still need to support constructor's name to detect conflicts with older versions of this library.
932
934
  Symbol.toStringTag in e ? e[Symbol.toStringTag] : (i = e.constructor) === null || i === void 0 ? void 0 : i.name
933
935
  );
@@ -950,12 +952,12 @@ spurious results.`);
950
952
  return !1;
951
953
  }
952
954
  );
953
- class ge {
954
- constructor(e, t = "GraphQL request", i = {
955
+ class Ie {
956
+ constructor(e, n = "GraphQL request", i = {
955
957
  line: 1,
956
958
  column: 1
957
959
  }) {
958
- typeof e == "string" || U(!1, `Body must be a string. Received: ${fe(e)}.`), this.body = e, this.name = t, this.locationOffset = i, this.locationOffset.line > 0 || U(
960
+ typeof e == "string" || U(!1, `Body must be a string. Received: ${fe(e)}.`), this.body = e, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || U(
959
961
  !1,
960
962
  "line in locationOffset is 1-indexed and must be positive."
961
963
  ), this.locationOffset.column > 0 || U(
@@ -967,24 +969,24 @@ class ge {
967
969
  return "Source";
968
970
  }
969
971
  }
970
- function Ke(n) {
971
- return Ze(n, ge);
972
+ function et(t) {
973
+ return Ke(t, Ie);
972
974
  }
973
- function et(n, e) {
974
- const t = new tt(n, e), i = t.parseDocument();
975
+ function tt(t, e) {
976
+ const n = new nt(t, e), i = n.parseDocument();
975
977
  return Object.defineProperty(i, "tokenCount", {
976
978
  enumerable: !1,
977
- value: t.tokenCount
979
+ value: n.tokenCount
978
980
  }), i;
979
981
  }
980
- class tt {
981
- constructor(e, t = {}) {
982
- const { lexer: i, ...r } = t;
982
+ class nt {
983
+ constructor(e, n = {}) {
984
+ const { lexer: i, ...r } = n;
983
985
  if (i)
984
986
  this._lexer = i;
985
987
  else {
986
- const s = Ke(e) ? e : new ge(e);
987
- this._lexer = new Re(s);
988
+ const s = et(e) ? e : new Ie(e);
989
+ this._lexer = new Fe(s);
988
990
  }
989
991
  this._options = r, this._tokenCounter = 0;
990
992
  }
@@ -1041,15 +1043,15 @@ class tt {
1041
1043
  parseDefinition() {
1042
1044
  if (this.peek(a.BRACE_L))
1043
1045
  return this.parseOperationDefinition();
1044
- const e = this.peekDescription(), t = e ? this._lexer.lookahead() : this._lexer.token;
1045
- if (e && t.kind === a.BRACE_L)
1046
+ const e = this.peekDescription(), n = e ? this._lexer.lookahead() : this._lexer.token;
1047
+ if (e && n.kind === a.BRACE_L)
1046
1048
  throw I(
1047
1049
  this._lexer.source,
1048
1050
  this._lexer.token.start,
1049
1051
  "Unexpected description, descriptions are not supported on shorthand queries."
1050
1052
  );
1051
- if (t.kind === a.NAME) {
1052
- switch (t.value) {
1053
+ if (n.kind === a.NAME) {
1054
+ switch (n.value) {
1053
1055
  case "schema":
1054
1056
  return this.parseSchemaDefinition();
1055
1057
  case "scalar":
@@ -1067,7 +1069,7 @@ class tt {
1067
1069
  case "directive":
1068
1070
  return this.parseDirectiveDefinition();
1069
1071
  }
1070
- switch (t.value) {
1072
+ switch (n.value) {
1071
1073
  case "query":
1072
1074
  case "mutation":
1073
1075
  case "subscription":
@@ -1081,10 +1083,10 @@ class tt {
1081
1083
  this._lexer.token.start,
1082
1084
  "Unexpected description, only GraphQL definitions support descriptions."
1083
1085
  );
1084
- if (t.value === "extend")
1086
+ if (n.value === "extend")
1085
1087
  return this.parseTypeSystemExtension();
1086
1088
  }
1087
- throw this.unexpected(t);
1089
+ throw this.unexpected(n);
1088
1090
  }
1089
1091
  // Implements the parsing rules in the Operations section.
1090
1092
  /**
@@ -1097,19 +1099,19 @@ class tt {
1097
1099
  if (this.peek(a.BRACE_L))
1098
1100
  return this.node(e, {
1099
1101
  kind: c.OPERATION_DEFINITION,
1100
- operation: D.QUERY,
1102
+ operation: v.QUERY,
1101
1103
  description: void 0,
1102
1104
  name: void 0,
1103
1105
  variableDefinitions: [],
1104
1106
  directives: [],
1105
1107
  selectionSet: this.parseSelectionSet()
1106
1108
  });
1107
- const t = this.parseDescription(), i = this.parseOperationType();
1109
+ const n = this.parseDescription(), i = this.parseOperationType();
1108
1110
  let r;
1109
1111
  return this.peek(a.NAME) && (r = this.parseName()), this.node(e, {
1110
1112
  kind: c.OPERATION_DEFINITION,
1111
1113
  operation: i,
1112
- description: t,
1114
+ description: n,
1113
1115
  name: r,
1114
1116
  variableDefinitions: this.parseVariableDefinitions(),
1115
1117
  directives: this.parseDirectives(!1),
@@ -1123,11 +1125,11 @@ class tt {
1123
1125
  const e = this.expectToken(a.NAME);
1124
1126
  switch (e.value) {
1125
1127
  case "query":
1126
- return D.QUERY;
1128
+ return v.QUERY;
1127
1129
  case "mutation":
1128
- return D.MUTATION;
1130
+ return v.MUTATION;
1129
1131
  case "subscription":
1130
- return D.SUBSCRIPTION;
1132
+ return v.SUBSCRIPTION;
1131
1133
  }
1132
1134
  throw this.unexpected(e);
1133
1135
  }
@@ -1194,9 +1196,9 @@ class tt {
1194
1196
  * Alias : Name :
1195
1197
  */
1196
1198
  parseField() {
1197
- const e = this._lexer.token, t = this.parseName();
1199
+ const e = this._lexer.token, n = this.parseName();
1198
1200
  let i, r;
1199
- return this.expectOptionalToken(a.COLON) ? (i = t, r = this.parseName()) : r = t, this.node(e, {
1201
+ return this.expectOptionalToken(a.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(e, {
1200
1202
  kind: c.FIELD,
1201
1203
  alias: i,
1202
1204
  name: r,
@@ -1209,15 +1211,15 @@ class tt {
1209
1211
  * Arguments[Const] : ( Argument[?Const]+ )
1210
1212
  */
1211
1213
  parseArguments(e) {
1212
- const t = e ? this.parseConstArgument : this.parseArgument;
1213
- return this.optionalMany(a.PAREN_L, t, a.PAREN_R);
1214
+ const n = e ? this.parseConstArgument : this.parseArgument;
1215
+ return this.optionalMany(a.PAREN_L, n, a.PAREN_R);
1214
1216
  }
1215
1217
  /**
1216
1218
  * Argument[Const] : Name : Value[?Const]
1217
1219
  */
1218
1220
  parseArgument(e = !1) {
1219
- const t = this._lexer.token, i = this.parseName();
1220
- return this.expectToken(a.COLON), this.node(t, {
1221
+ const n = this._lexer.token, i = this.parseName();
1222
+ return this.expectToken(a.COLON), this.node(n, {
1221
1223
  kind: c.ARGUMENT,
1222
1224
  name: i,
1223
1225
  value: this.parseValueLiteral(e)
@@ -1237,14 +1239,14 @@ class tt {
1237
1239
  parseFragment() {
1238
1240
  const e = this._lexer.token;
1239
1241
  this.expectToken(a.SPREAD);
1240
- const t = this.expectOptionalKeyword("on");
1241
- return !t && this.peek(a.NAME) ? this.node(e, {
1242
+ const n = this.expectOptionalKeyword("on");
1243
+ return !n && this.peek(a.NAME) ? this.node(e, {
1242
1244
  kind: c.FRAGMENT_SPREAD,
1243
1245
  name: this.parseFragmentName(),
1244
1246
  directives: this.parseDirectives(!1)
1245
1247
  }) : this.node(e, {
1246
1248
  kind: c.INLINE_FRAGMENT,
1247
- typeCondition: t ? this.parseNamedType() : void 0,
1249
+ typeCondition: n ? this.parseNamedType() : void 0,
1248
1250
  directives: this.parseDirectives(!1),
1249
1251
  selectionSet: this.parseSelectionSet()
1250
1252
  });
@@ -1256,10 +1258,10 @@ class tt {
1256
1258
  * TypeCondition : NamedType
1257
1259
  */
1258
1260
  parseFragmentDefinition() {
1259
- const e = this._lexer.token, t = this.parseDescription();
1261
+ const e = this._lexer.token, n = this.parseDescription();
1260
1262
  return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(e, {
1261
1263
  kind: c.FRAGMENT_DEFINITION,
1262
- description: t,
1264
+ description: n,
1263
1265
  name: this.parseFragmentName(),
1264
1266
  variableDefinitions: this.parseVariableDefinitions(),
1265
1267
  typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
@@ -1267,7 +1269,7 @@ class tt {
1267
1269
  selectionSet: this.parseSelectionSet()
1268
1270
  }) : this.node(e, {
1269
1271
  kind: c.FRAGMENT_DEFINITION,
1270
- description: t,
1272
+ description: n,
1271
1273
  name: this.parseFragmentName(),
1272
1274
  typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
1273
1275
  directives: this.parseDirectives(!1),
@@ -1302,45 +1304,45 @@ class tt {
1302
1304
  * EnumValue : Name but not `true`, `false` or `null`
1303
1305
  */
1304
1306
  parseValueLiteral(e) {
1305
- const t = this._lexer.token;
1306
- switch (t.kind) {
1307
+ const n = this._lexer.token;
1308
+ switch (n.kind) {
1307
1309
  case a.BRACKET_L:
1308
1310
  return this.parseList(e);
1309
1311
  case a.BRACE_L:
1310
1312
  return this.parseObject(e);
1311
1313
  case a.INT:
1312
- return this.advanceLexer(), this.node(t, {
1314
+ return this.advanceLexer(), this.node(n, {
1313
1315
  kind: c.INT,
1314
- value: t.value
1316
+ value: n.value
1315
1317
  });
1316
1318
  case a.FLOAT:
1317
- return this.advanceLexer(), this.node(t, {
1319
+ return this.advanceLexer(), this.node(n, {
1318
1320
  kind: c.FLOAT,
1319
- value: t.value
1321
+ value: n.value
1320
1322
  });
1321
1323
  case a.STRING:
1322
1324
  case a.BLOCK_STRING:
1323
1325
  return this.parseStringLiteral();
1324
1326
  case a.NAME:
1325
- switch (this.advanceLexer(), t.value) {
1327
+ switch (this.advanceLexer(), n.value) {
1326
1328
  case "true":
1327
- return this.node(t, {
1329
+ return this.node(n, {
1328
1330
  kind: c.BOOLEAN,
1329
1331
  value: !0
1330
1332
  });
1331
1333
  case "false":
1332
- return this.node(t, {
1334
+ return this.node(n, {
1333
1335
  kind: c.BOOLEAN,
1334
1336
  value: !1
1335
1337
  });
1336
1338
  case "null":
1337
- return this.node(t, {
1339
+ return this.node(n, {
1338
1340
  kind: c.NULL
1339
1341
  });
1340
1342
  default:
1341
- return this.node(t, {
1343
+ return this.node(n, {
1342
1344
  kind: c.ENUM,
1343
- value: t.value
1345
+ value: n.value
1344
1346
  });
1345
1347
  }
1346
1348
  case a.DOLLAR:
@@ -1349,11 +1351,11 @@ class tt {
1349
1351
  const i = this._lexer.token.value;
1350
1352
  throw I(
1351
1353
  this._lexer.source,
1352
- t.start,
1354
+ n.start,
1353
1355
  `Unexpected variable "$${i}" in constant value.`
1354
1356
  );
1355
1357
  } else
1356
- throw this.unexpected(t);
1358
+ throw this.unexpected(n);
1357
1359
  return this.parseVariable();
1358
1360
  default:
1359
1361
  throw this.unexpected();
@@ -1376,10 +1378,10 @@ class tt {
1376
1378
  * - [ Value[?Const]+ ]
1377
1379
  */
1378
1380
  parseList(e) {
1379
- const t = () => this.parseValueLiteral(e);
1381
+ const n = () => this.parseValueLiteral(e);
1380
1382
  return this.node(this._lexer.token, {
1381
1383
  kind: c.LIST,
1382
- values: this.any(a.BRACKET_L, t, a.BRACKET_R)
1384
+ values: this.any(a.BRACKET_L, n, a.BRACKET_R)
1383
1385
  });
1384
1386
  }
1385
1387
  /**
@@ -1390,18 +1392,18 @@ class tt {
1390
1392
  * ```
1391
1393
  */
1392
1394
  parseObject(e) {
1393
- const t = () => this.parseObjectField(e);
1395
+ const n = () => this.parseObjectField(e);
1394
1396
  return this.node(this._lexer.token, {
1395
1397
  kind: c.OBJECT,
1396
- fields: this.any(a.BRACE_L, t, a.BRACE_R)
1398
+ fields: this.any(a.BRACE_L, n, a.BRACE_R)
1397
1399
  });
1398
1400
  }
1399
1401
  /**
1400
1402
  * ObjectField[Const] : Name : Value[?Const]
1401
1403
  */
1402
1404
  parseObjectField(e) {
1403
- const t = this._lexer.token, i = this.parseName();
1404
- return this.expectToken(a.COLON), this.node(t, {
1405
+ const n = this._lexer.token, i = this.parseName();
1406
+ return this.expectToken(a.COLON), this.node(n, {
1405
1407
  kind: c.OBJECT_FIELD,
1406
1408
  name: i,
1407
1409
  value: this.parseValueLiteral(e)
@@ -1412,10 +1414,10 @@ class tt {
1412
1414
  * Directives[Const] : Directive[?Const]+
1413
1415
  */
1414
1416
  parseDirectives(e) {
1415
- const t = [];
1417
+ const n = [];
1416
1418
  for (; this.peek(a.AT); )
1417
- t.push(this.parseDirective(e));
1418
- return t;
1419
+ n.push(this.parseDirective(e));
1420
+ return n;
1419
1421
  }
1420
1422
  parseConstDirectives() {
1421
1423
  return this.parseDirectives(!0);
@@ -1426,8 +1428,8 @@ class tt {
1426
1428
  * ```
1427
1429
  */
1428
1430
  parseDirective(e) {
1429
- const t = this._lexer.token;
1430
- return this.expectToken(a.AT), this.node(t, {
1431
+ const n = this._lexer.token;
1432
+ return this.expectToken(a.AT), this.node(n, {
1431
1433
  kind: c.DIRECTIVE,
1432
1434
  name: this.parseName(),
1433
1435
  arguments: this.parseArguments(e)
@@ -1442,19 +1444,19 @@ class tt {
1442
1444
  */
1443
1445
  parseTypeReference() {
1444
1446
  const e = this._lexer.token;
1445
- let t;
1447
+ let n;
1446
1448
  if (this.expectOptionalToken(a.BRACKET_L)) {
1447
1449
  const i = this.parseTypeReference();
1448
- this.expectToken(a.BRACKET_R), t = this.node(e, {
1450
+ this.expectToken(a.BRACKET_R), n = this.node(e, {
1449
1451
  kind: c.LIST_TYPE,
1450
1452
  type: i
1451
1453
  });
1452
1454
  } else
1453
- t = this.parseNamedType();
1455
+ n = this.parseNamedType();
1454
1456
  return this.expectOptionalToken(a.BANG) ? this.node(e, {
1455
1457
  kind: c.NON_NULL_TYPE,
1456
- type: t
1457
- }) : t;
1458
+ type: n
1459
+ }) : n;
1458
1460
  }
1459
1461
  /**
1460
1462
  * NamedType : Name
@@ -1482,7 +1484,7 @@ class tt {
1482
1484
  * ```
1483
1485
  */
1484
1486
  parseSchemaDefinition() {
1485
- const e = this._lexer.token, t = this.parseDescription();
1487
+ const e = this._lexer.token, n = this.parseDescription();
1486
1488
  this.expectKeyword("schema");
1487
1489
  const i = this.parseConstDirectives(), r = this.many(
1488
1490
  a.BRACE_L,
@@ -1491,7 +1493,7 @@ class tt {
1491
1493
  );
1492
1494
  return this.node(e, {
1493
1495
  kind: c.SCHEMA_DEFINITION,
1494
- description: t,
1496
+ description: n,
1495
1497
  directives: i,
1496
1498
  operationTypes: r
1497
1499
  });
@@ -1500,12 +1502,12 @@ class tt {
1500
1502
  * OperationTypeDefinition : OperationType : NamedType
1501
1503
  */
1502
1504
  parseOperationTypeDefinition() {
1503
- const e = this._lexer.token, t = this.parseOperationType();
1505
+ const e = this._lexer.token, n = this.parseOperationType();
1504
1506
  this.expectToken(a.COLON);
1505
1507
  const i = this.parseNamedType();
1506
1508
  return this.node(e, {
1507
1509
  kind: c.OPERATION_TYPE_DEFINITION,
1508
- operation: t,
1510
+ operation: n,
1509
1511
  type: i
1510
1512
  });
1511
1513
  }
@@ -1513,12 +1515,12 @@ class tt {
1513
1515
  * ScalarTypeDefinition : Description? scalar Name Directives[Const]?
1514
1516
  */
1515
1517
  parseScalarTypeDefinition() {
1516
- const e = this._lexer.token, t = this.parseDescription();
1518
+ const e = this._lexer.token, n = this.parseDescription();
1517
1519
  this.expectKeyword("scalar");
1518
1520
  const i = this.parseName(), r = this.parseConstDirectives();
1519
1521
  return this.node(e, {
1520
1522
  kind: c.SCALAR_TYPE_DEFINITION,
1521
- description: t,
1523
+ description: n,
1522
1524
  name: i,
1523
1525
  directives: r
1524
1526
  });
@@ -1529,12 +1531,12 @@ class tt {
1529
1531
  * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
1530
1532
  */
1531
1533
  parseObjectTypeDefinition() {
1532
- const e = this._lexer.token, t = this.parseDescription();
1534
+ const e = this._lexer.token, n = this.parseDescription();
1533
1535
  this.expectKeyword("type");
1534
1536
  const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1535
1537
  return this.node(e, {
1536
1538
  kind: c.OBJECT_TYPE_DEFINITION,
1537
- description: t,
1539
+ description: n,
1538
1540
  name: i,
1539
1541
  interfaces: r,
1540
1542
  directives: s,
@@ -1566,12 +1568,12 @@ class tt {
1566
1568
  * - Description? Name ArgumentsDefinition? : Type Directives[Const]?
1567
1569
  */
1568
1570
  parseFieldDefinition() {
1569
- const e = this._lexer.token, t = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1571
+ const e = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1570
1572
  this.expectToken(a.COLON);
1571
1573
  const s = this.parseTypeReference(), o = this.parseConstDirectives();
1572
1574
  return this.node(e, {
1573
1575
  kind: c.FIELD_DEFINITION,
1574
- description: t,
1576
+ description: n,
1575
1577
  name: i,
1576
1578
  arguments: r,
1577
1579
  type: s,
@@ -1593,7 +1595,7 @@ class tt {
1593
1595
  * - Description? Name : Type DefaultValue? Directives[Const]?
1594
1596
  */
1595
1597
  parseInputValueDef() {
1596
- const e = this._lexer.token, t = this.parseDescription(), i = this.parseName();
1598
+ const e = this._lexer.token, n = this.parseDescription(), i = this.parseName();
1597
1599
  this.expectToken(a.COLON);
1598
1600
  const r = this.parseTypeReference();
1599
1601
  let s;
@@ -1601,7 +1603,7 @@ class tt {
1601
1603
  const o = this.parseConstDirectives();
1602
1604
  return this.node(e, {
1603
1605
  kind: c.INPUT_VALUE_DEFINITION,
1604
- description: t,
1606
+ description: n,
1605
1607
  name: i,
1606
1608
  type: r,
1607
1609
  defaultValue: s,
@@ -1613,12 +1615,12 @@ class tt {
1613
1615
  * - Description? interface Name Directives[Const]? FieldsDefinition?
1614
1616
  */
1615
1617
  parseInterfaceTypeDefinition() {
1616
- const e = this._lexer.token, t = this.parseDescription();
1618
+ const e = this._lexer.token, n = this.parseDescription();
1617
1619
  this.expectKeyword("interface");
1618
1620
  const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1619
1621
  return this.node(e, {
1620
1622
  kind: c.INTERFACE_TYPE_DEFINITION,
1621
- description: t,
1623
+ description: n,
1622
1624
  name: i,
1623
1625
  interfaces: r,
1624
1626
  directives: s,
@@ -1630,12 +1632,12 @@ class tt {
1630
1632
  * - Description? union Name Directives[Const]? UnionMemberTypes?
1631
1633
  */
1632
1634
  parseUnionTypeDefinition() {
1633
- const e = this._lexer.token, t = this.parseDescription();
1635
+ const e = this._lexer.token, n = this.parseDescription();
1634
1636
  this.expectKeyword("union");
1635
1637
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1636
1638
  return this.node(e, {
1637
1639
  kind: c.UNION_TYPE_DEFINITION,
1638
- description: t,
1640
+ description: n,
1639
1641
  name: i,
1640
1642
  directives: r,
1641
1643
  types: s
@@ -1654,12 +1656,12 @@ class tt {
1654
1656
  * - Description? enum Name Directives[Const]? EnumValuesDefinition?
1655
1657
  */
1656
1658
  parseEnumTypeDefinition() {
1657
- const e = this._lexer.token, t = this.parseDescription();
1659
+ const e = this._lexer.token, n = this.parseDescription();
1658
1660
  this.expectKeyword("enum");
1659
1661
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1660
1662
  return this.node(e, {
1661
1663
  kind: c.ENUM_TYPE_DEFINITION,
1662
- description: t,
1664
+ description: n,
1663
1665
  name: i,
1664
1666
  directives: r,
1665
1667
  values: s
@@ -1681,10 +1683,10 @@ class tt {
1681
1683
  * EnumValueDefinition : Description? EnumValue Directives[Const]?
1682
1684
  */
1683
1685
  parseEnumValueDefinition() {
1684
- const e = this._lexer.token, t = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1686
+ const e = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1685
1687
  return this.node(e, {
1686
1688
  kind: c.ENUM_VALUE_DEFINITION,
1687
- description: t,
1689
+ description: n,
1688
1690
  name: i,
1689
1691
  directives: r
1690
1692
  });
@@ -1708,12 +1710,12 @@ class tt {
1708
1710
  * - Description? input Name Directives[Const]? InputFieldsDefinition?
1709
1711
  */
1710
1712
  parseInputObjectTypeDefinition() {
1711
- const e = this._lexer.token, t = this.parseDescription();
1713
+ const e = this._lexer.token, n = this.parseDescription();
1712
1714
  this.expectKeyword("input");
1713
1715
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1714
1716
  return this.node(e, {
1715
1717
  kind: c.INPUT_OBJECT_TYPE_DEFINITION,
1716
- description: t,
1718
+ description: n,
1717
1719
  name: i,
1718
1720
  directives: r,
1719
1721
  fields: s
@@ -1775,16 +1777,16 @@ class tt {
1775
1777
  parseSchemaExtension() {
1776
1778
  const e = this._lexer.token;
1777
1779
  this.expectKeyword("extend"), this.expectKeyword("schema");
1778
- const t = this.parseConstDirectives(), i = this.optionalMany(
1780
+ const n = this.parseConstDirectives(), i = this.optionalMany(
1779
1781
  a.BRACE_L,
1780
1782
  this.parseOperationTypeDefinition,
1781
1783
  a.BRACE_R
1782
1784
  );
1783
- if (t.length === 0 && i.length === 0)
1785
+ if (n.length === 0 && i.length === 0)
1784
1786
  throw this.unexpected();
1785
1787
  return this.node(e, {
1786
1788
  kind: c.SCHEMA_EXTENSION,
1787
- directives: t,
1789
+ directives: n,
1788
1790
  operationTypes: i
1789
1791
  });
1790
1792
  }
@@ -1795,12 +1797,12 @@ class tt {
1795
1797
  parseScalarTypeExtension() {
1796
1798
  const e = this._lexer.token;
1797
1799
  this.expectKeyword("extend"), this.expectKeyword("scalar");
1798
- const t = this.parseName(), i = this.parseConstDirectives();
1800
+ const n = this.parseName(), i = this.parseConstDirectives();
1799
1801
  if (i.length === 0)
1800
1802
  throw this.unexpected();
1801
1803
  return this.node(e, {
1802
1804
  kind: c.SCALAR_TYPE_EXTENSION,
1803
- name: t,
1805
+ name: n,
1804
1806
  directives: i
1805
1807
  });
1806
1808
  }
@@ -1813,12 +1815,12 @@ class tt {
1813
1815
  parseObjectTypeExtension() {
1814
1816
  const e = this._lexer.token;
1815
1817
  this.expectKeyword("extend"), this.expectKeyword("type");
1816
- const t = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1818
+ const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1817
1819
  if (i.length === 0 && r.length === 0 && s.length === 0)
1818
1820
  throw this.unexpected();
1819
1821
  return this.node(e, {
1820
1822
  kind: c.OBJECT_TYPE_EXTENSION,
1821
- name: t,
1823
+ name: n,
1822
1824
  interfaces: i,
1823
1825
  directives: r,
1824
1826
  fields: s
@@ -1833,12 +1835,12 @@ class tt {
1833
1835
  parseInterfaceTypeExtension() {
1834
1836
  const e = this._lexer.token;
1835
1837
  this.expectKeyword("extend"), this.expectKeyword("interface");
1836
- const t = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1838
+ const n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1837
1839
  if (i.length === 0 && r.length === 0 && s.length === 0)
1838
1840
  throw this.unexpected();
1839
1841
  return this.node(e, {
1840
1842
  kind: c.INTERFACE_TYPE_EXTENSION,
1841
- name: t,
1843
+ name: n,
1842
1844
  interfaces: i,
1843
1845
  directives: r,
1844
1846
  fields: s
@@ -1852,12 +1854,12 @@ class tt {
1852
1854
  parseUnionTypeExtension() {
1853
1855
  const e = this._lexer.token;
1854
1856
  this.expectKeyword("extend"), this.expectKeyword("union");
1855
- const t = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1857
+ const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1856
1858
  if (i.length === 0 && r.length === 0)
1857
1859
  throw this.unexpected();
1858
1860
  return this.node(e, {
1859
1861
  kind: c.UNION_TYPE_EXTENSION,
1860
- name: t,
1862
+ name: n,
1861
1863
  directives: i,
1862
1864
  types: r
1863
1865
  });
@@ -1870,12 +1872,12 @@ class tt {
1870
1872
  parseEnumTypeExtension() {
1871
1873
  const e = this._lexer.token;
1872
1874
  this.expectKeyword("extend"), this.expectKeyword("enum");
1873
- const t = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1875
+ const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1874
1876
  if (i.length === 0 && r.length === 0)
1875
1877
  throw this.unexpected();
1876
1878
  return this.node(e, {
1877
1879
  kind: c.ENUM_TYPE_EXTENSION,
1878
- name: t,
1880
+ name: n,
1879
1881
  directives: i,
1880
1882
  values: r
1881
1883
  });
@@ -1888,12 +1890,12 @@ class tt {
1888
1890
  parseInputObjectTypeExtension() {
1889
1891
  const e = this._lexer.token;
1890
1892
  this.expectKeyword("extend"), this.expectKeyword("input");
1891
- const t = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1893
+ const n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1892
1894
  if (i.length === 0 && r.length === 0)
1893
1895
  throw this.unexpected();
1894
1896
  return this.node(e, {
1895
1897
  kind: c.INPUT_OBJECT_TYPE_EXTENSION,
1896
- name: t,
1898
+ name: n,
1897
1899
  directives: i,
1898
1900
  fields: r
1899
1901
  });
@@ -1905,14 +1907,14 @@ class tt {
1905
1907
  * ```
1906
1908
  */
1907
1909
  parseDirectiveDefinition() {
1908
- const e = this._lexer.token, t = this.parseDescription();
1910
+ const e = this._lexer.token, n = this.parseDescription();
1909
1911
  this.expectKeyword("directive"), this.expectToken(a.AT);
1910
1912
  const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1911
1913
  this.expectKeyword("on");
1912
1914
  const o = this.parseDirectiveLocations();
1913
1915
  return this.node(e, {
1914
1916
  kind: c.DIRECTIVE_DEFINITION,
1915
- description: t,
1917
+ description: n,
1916
1918
  name: i,
1917
1919
  arguments: r,
1918
1920
  repeatable: s,
@@ -1955,9 +1957,9 @@ class tt {
1955
1957
  * `INPUT_FIELD_DEFINITION`
1956
1958
  */
1957
1959
  parseDirectiveLocation() {
1958
- const e = this._lexer.token, t = this.parseName();
1959
- if (Object.prototype.hasOwnProperty.call(q, t.value))
1960
- return t;
1960
+ const e = this._lexer.token, n = this.parseName();
1961
+ if (Object.prototype.hasOwnProperty.call(q, n.value))
1962
+ return n;
1961
1963
  throw this.unexpected(e);
1962
1964
  }
1963
1965
  // Schema Coordinates
@@ -1970,11 +1972,11 @@ class tt {
1970
1972
  * - \@ Name ( Name : )
1971
1973
  */
1972
1974
  parseSchemaCoordinate() {
1973
- const e = this._lexer.token, t = this.expectOptionalToken(a.AT), i = this.parseName();
1975
+ const e = this._lexer.token, n = this.expectOptionalToken(a.AT), i = this.parseName();
1974
1976
  let r;
1975
- !t && this.expectOptionalToken(a.DOT) && (r = this.parseName());
1977
+ !n && this.expectOptionalToken(a.DOT) && (r = this.parseName());
1976
1978
  let s;
1977
- return (t || r) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), t ? s ? this.node(e, {
1979
+ return (n || r) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), n ? s ? this.node(e, {
1978
1980
  kind: c.DIRECTIVE_ARGUMENT_COORDINATE,
1979
1981
  name: i,
1980
1982
  argumentName: s
@@ -2001,12 +2003,12 @@ class tt {
2001
2003
  * location object, used to identify the place in the source that created a
2002
2004
  * given parsed object.
2003
2005
  */
2004
- node(e, t) {
2005
- return this._options.noLocation !== !0 && (t.loc = new Pe(
2006
+ node(e, n) {
2007
+ return this._options.noLocation !== !0 && (n.loc = new Se(
2006
2008
  e,
2007
2009
  this._lexer.lastToken,
2008
2010
  this._lexer.source
2009
- )), t;
2011
+ )), n;
2010
2012
  }
2011
2013
  /**
2012
2014
  * Determines if the next token is of a given kind
@@ -2019,13 +2021,13 @@ class tt {
2019
2021
  * Otherwise, do not change the parser state and throw an error.
2020
2022
  */
2021
2023
  expectToken(e) {
2022
- const t = this._lexer.token;
2023
- if (t.kind === e)
2024
- return this.advanceLexer(), t;
2024
+ const n = this._lexer.token;
2025
+ if (n.kind === e)
2026
+ return this.advanceLexer(), n;
2025
2027
  throw I(
2026
2028
  this._lexer.source,
2027
- t.start,
2028
- `Expected ${Ie(e)}, found ${_(t)}.`
2029
+ n.start,
2030
+ `Expected ${Ee(e)}, found ${_(n)}.`
2029
2031
  );
2030
2032
  }
2031
2033
  /**
@@ -2040,14 +2042,14 @@ class tt {
2040
2042
  * Otherwise, do not change the parser state and throw an error.
2041
2043
  */
2042
2044
  expectKeyword(e) {
2043
- const t = this._lexer.token;
2044
- if (t.kind === a.NAME && t.value === e)
2045
+ const n = this._lexer.token;
2046
+ if (n.kind === a.NAME && n.value === e)
2045
2047
  this.advanceLexer();
2046
2048
  else
2047
2049
  throw I(
2048
2050
  this._lexer.source,
2049
- t.start,
2050
- `Expected "${e}", found ${_(t)}.`
2051
+ n.start,
2052
+ `Expected "${e}", found ${_(n)}.`
2051
2053
  );
2052
2054
  }
2053
2055
  /**
@@ -2055,18 +2057,18 @@ class tt {
2055
2057
  * Otherwise, do not change the parser state and return "false".
2056
2058
  */
2057
2059
  expectOptionalKeyword(e) {
2058
- const t = this._lexer.token;
2059
- return t.kind === a.NAME && t.value === e ? (this.advanceLexer(), !0) : !1;
2060
+ const n = this._lexer.token;
2061
+ return n.kind === a.NAME && n.value === e ? (this.advanceLexer(), !0) : !1;
2060
2062
  }
2061
2063
  /**
2062
2064
  * Helper function for creating an error when an unexpected lexed token is encountered.
2063
2065
  */
2064
2066
  unexpected(e) {
2065
- const t = e ?? this._lexer.token;
2067
+ const n = e ?? this._lexer.token;
2066
2068
  return I(
2067
2069
  this._lexer.source,
2068
- t.start,
2069
- `Unexpected ${_(t)}.`
2070
+ n.start,
2071
+ `Unexpected ${_(n)}.`
2070
2072
  );
2071
2073
  }
2072
2074
  /**
@@ -2074,11 +2076,11 @@ class tt {
2074
2076
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2075
2077
  * Advances the parser to the next lex token after the closing token.
2076
2078
  */
2077
- any(e, t, i) {
2079
+ any(e, n, i) {
2078
2080
  this.expectToken(e);
2079
2081
  const r = [];
2080
2082
  for (; !this.expectOptionalToken(i); )
2081
- r.push(t.call(this));
2083
+ r.push(n.call(this));
2082
2084
  return r;
2083
2085
  }
2084
2086
  /**
@@ -2087,11 +2089,11 @@ class tt {
2087
2089
  * that begins with a lex token of openKind and ends with a lex token of closeKind.
2088
2090
  * Advances the parser to the next lex token after the closing token.
2089
2091
  */
2090
- optionalMany(e, t, i) {
2092
+ optionalMany(e, n, i) {
2091
2093
  if (this.expectOptionalToken(e)) {
2092
2094
  const r = [];
2093
2095
  do
2094
- r.push(t.call(this));
2096
+ r.push(n.call(this));
2095
2097
  while (!this.expectOptionalToken(i));
2096
2098
  return r;
2097
2099
  }
@@ -2102,11 +2104,11 @@ class tt {
2102
2104
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2103
2105
  * Advances the parser to the next lex token after the closing token.
2104
2106
  */
2105
- many(e, t, i) {
2107
+ many(e, n, i) {
2106
2108
  this.expectToken(e);
2107
2109
  const r = [];
2108
2110
  do
2109
- r.push(t.call(this));
2111
+ r.push(n.call(this));
2110
2112
  while (!this.expectOptionalToken(i));
2111
2113
  return r;
2112
2114
  }
@@ -2115,107 +2117,107 @@ class tt {
2115
2117
  * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
2116
2118
  * Advances the parser to the next lex token after last item in the list.
2117
2119
  */
2118
- delimitedMany(e, t) {
2120
+ delimitedMany(e, n) {
2119
2121
  this.expectOptionalToken(e);
2120
2122
  const i = [];
2121
2123
  do
2122
- i.push(t.call(this));
2124
+ i.push(n.call(this));
2123
2125
  while (this.expectOptionalToken(e));
2124
2126
  return i;
2125
2127
  }
2126
2128
  advanceLexer() {
2127
- const { maxTokens: e } = this._options, t = this._lexer.advance();
2128
- if (t.kind !== a.EOF && (++this._tokenCounter, e !== void 0 && this._tokenCounter > e))
2129
+ const { maxTokens: e } = this._options, n = this._lexer.advance();
2130
+ if (n.kind !== a.EOF && (++this._tokenCounter, e !== void 0 && this._tokenCounter > e))
2129
2131
  throw I(
2130
2132
  this._lexer.source,
2131
- t.start,
2133
+ n.start,
2132
2134
  `Document contains more that ${e} tokens. Parsing aborted.`
2133
2135
  );
2134
2136
  }
2135
2137
  }
2136
- function _(n) {
2137
- const e = n.value;
2138
- return Ie(n.kind) + (e != null ? ` "${e}"` : "");
2138
+ function _(t) {
2139
+ const e = t.value;
2140
+ return Ee(t.kind) + (e != null ? ` "${e}"` : "");
2139
2141
  }
2140
- function Ie(n) {
2141
- return we(n) ? `"${n}"` : n;
2142
+ function Ee(t) {
2143
+ return we(t) ? `"${t}"` : t;
2142
2144
  }
2143
- var L = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map(), Ee = !0, $ = !1;
2144
- function ye(n) {
2145
- return n.replace(/[\s,]+/g, " ").trim();
2145
+ var L = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map(), ye = !0, $ = !1;
2146
+ function ke(t) {
2147
+ return t.replace(/[\s,]+/g, " ").trim();
2146
2148
  }
2147
- function nt(n) {
2148
- return ye(n.source.body.substring(n.start, n.end));
2149
+ function it(t) {
2150
+ return ke(t.source.body.substring(t.start, t.end));
2149
2151
  }
2150
- function it(n) {
2151
- var e = /* @__PURE__ */ new Set(), t = [];
2152
- return n.definitions.forEach(function(i) {
2152
+ function rt(t) {
2153
+ var e = /* @__PURE__ */ new Set(), n = [];
2154
+ return t.definitions.forEach(function(i) {
2153
2155
  if (i.kind === "FragmentDefinition") {
2154
- var r = i.name.value, s = nt(i.loc), o = G.get(r);
2155
- o && !o.has(s) ? Ee && console.warn("Warning: fragment with name " + r + ` already exists.
2156
+ var r = i.name.value, s = it(i.loc), o = G.get(r);
2157
+ o && !o.has(s) ? ye && console.warn("Warning: fragment with name " + r + ` already exists.
2156
2158
  graphql-tag enforces all fragment names across your application to be unique; read more about
2157
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || G.set(r, o = /* @__PURE__ */ new Set()), o.add(s), e.has(s) || (e.add(s), t.push(i));
2159
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : o || G.set(r, o = /* @__PURE__ */ new Set()), o.add(s), e.has(s) || (e.add(s), n.push(i));
2158
2160
  } else
2159
- t.push(i);
2160
- }), F(F({}, n), { definitions: t });
2161
+ n.push(i);
2162
+ }), w(w({}, t), { definitions: n });
2161
2163
  }
2162
- function rt(n) {
2163
- var e = new Set(n.definitions);
2164
+ function st(t) {
2165
+ var e = new Set(t.definitions);
2164
2166
  e.forEach(function(i) {
2165
2167
  i.loc && delete i.loc, Object.keys(i).forEach(function(r) {
2166
2168
  var s = i[r];
2167
2169
  s && typeof s == "object" && e.add(s);
2168
2170
  });
2169
2171
  });
2170
- var t = n.loc;
2171
- return t && (delete t.startToken, delete t.endToken), n;
2172
+ var n = t.loc;
2173
+ return n && (delete n.startToken, delete n.endToken), t;
2172
2174
  }
2173
- function st(n) {
2174
- var e = ye(n);
2175
+ function at(t) {
2176
+ var e = ke(t);
2175
2177
  if (!L.has(e)) {
2176
- var t = et(n, {
2178
+ var n = tt(t, {
2177
2179
  experimentalFragmentVariables: $,
2178
2180
  allowLegacyFragmentVariables: $
2179
2181
  });
2180
- if (!t || t.kind !== "Document")
2182
+ if (!n || n.kind !== "Document")
2181
2183
  throw new Error("Not a valid GraphQL document.");
2182
- L.set(e, rt(it(t)));
2184
+ L.set(e, st(rt(n)));
2183
2185
  }
2184
2186
  return L.get(e);
2185
2187
  }
2186
- function l(n) {
2187
- for (var e = [], t = 1; t < arguments.length; t++)
2188
- e[t - 1] = arguments[t];
2189
- typeof n == "string" && (n = [n]);
2190
- var i = n[0];
2188
+ function u(t) {
2189
+ for (var e = [], n = 1; n < arguments.length; n++)
2190
+ e[n - 1] = arguments[n];
2191
+ typeof t == "string" && (t = [t]);
2192
+ var i = t[0];
2191
2193
  return e.forEach(function(r, s) {
2192
- r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += n[s + 1];
2193
- }), st(i);
2194
- }
2195
- function at() {
2196
- L.clear(), G.clear();
2194
+ r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += t[s + 1];
2195
+ }), at(i);
2197
2196
  }
2198
2197
  function ot() {
2199
- Ee = !1;
2198
+ L.clear(), G.clear();
2200
2199
  }
2201
2200
  function ct() {
2202
- $ = !0;
2201
+ ye = !1;
2203
2202
  }
2204
2203
  function dt() {
2204
+ $ = !0;
2205
+ }
2206
+ function ut() {
2205
2207
  $ = !1;
2206
2208
  }
2207
2209
  var P = {
2208
- gql: l,
2209
- resetCaches: at,
2210
- disableFragmentWarnings: ot,
2211
- enableExperimentalFragmentVariables: ct,
2212
- disableExperimentalFragmentVariables: dt
2210
+ gql: u,
2211
+ resetCaches: ot,
2212
+ disableFragmentWarnings: ct,
2213
+ enableExperimentalFragmentVariables: dt,
2214
+ disableExperimentalFragmentVariables: ut
2213
2215
  };
2214
- (function(n) {
2215
- n.gql = P.gql, n.resetCaches = P.resetCaches, n.disableFragmentWarnings = P.disableFragmentWarnings, n.enableExperimentalFragmentVariables = P.enableExperimentalFragmentVariables, n.disableExperimentalFragmentVariables = P.disableExperimentalFragmentVariables;
2216
- })(l || (l = {}));
2217
- l.default = l;
2218
- const ut = l`
2216
+ (function(t) {
2217
+ t.gql = P.gql, t.resetCaches = P.resetCaches, t.disableFragmentWarnings = P.disableFragmentWarnings, t.enableExperimentalFragmentVariables = P.enableExperimentalFragmentVariables, t.disableExperimentalFragmentVariables = P.disableExperimentalFragmentVariables;
2218
+ })(u || (u = {}));
2219
+ u.default = u;
2220
+ const lt = u`
2219
2221
  query findActiveOrderById($id: String) {
2220
2222
  findOrder(id: $id) {
2221
2223
  id
@@ -2302,7 +2304,7 @@ const ut = l`
2302
2304
  }
2303
2305
  }
2304
2306
  }
2305
- `, lt = l`
2307
+ `, pt = u`
2306
2308
  query findOrderById($id: String, $reference: String) {
2307
2309
  findOrder(id: $id, reference: $reference) {
2308
2310
  id
@@ -2346,7 +2348,7 @@ const ut = l`
2346
2348
  downloadCode
2347
2349
  }
2348
2350
  }
2349
- `, ht = l`
2351
+ `, ht = u`
2350
2352
  mutation addToOrder($orderId: ID!, $productId: ID!, $shopId: ID, $additionalData: AdditionalDataInput, $trackerId: ID, $amount: Int) {
2351
2353
  reserveProduct(
2352
2354
  input: {orderId: $orderId, productId: $productId, additionalData: $additionalData, trackerId: $trackerId, shopId: $shopId, amountToIncrease: $amount}
@@ -2356,7 +2358,7 @@ const ut = l`
2356
2358
  amountReserved
2357
2359
  }
2358
2360
  }
2359
- `, pt = l`
2361
+ `, gt = u`
2360
2362
  mutation removeFromOrder($orderId: ID!, $productId: ID!, $additionalData: AdditionalDataInput, $amount: Int) {
2361
2363
  releaseProduct(
2362
2364
  input: {orderId: $orderId, productId: $productId, additionalData: $additionalData, amountToRelease: $amount}
@@ -2365,7 +2367,7 @@ const ut = l`
2365
2367
  amountReleased
2366
2368
  }
2367
2369
  }
2368
- `, mt = l`
2370
+ `, mt = u`
2369
2371
  mutation configurePackage($orderId: ID!, $packageId: ID!, $amount: Int!, $items: [ReservedItem!]!, $shopId: ID, $trackerId: ID) {
2370
2372
  configurePackage(
2371
2373
  input: {orderId: $orderId, shopId: $shopId, trackerId: $trackerId, packageId: $packageId, amount: $amount, items: $items}
@@ -2375,7 +2377,7 @@ const ut = l`
2375
2377
  amountReserved
2376
2378
  }
2377
2379
  }
2378
- `, ft = l`
2380
+ `, ft = u`
2379
2381
  mutation reserveAdditionalPackageItem($amount: Int!, $orderId: ID!, $packageId: ID!, $eventId: ID!, $packageItemId: ID!) {
2380
2382
  reserveAdditionalPackageItem(
2381
2383
  input: {amount: $amount, eventId: $eventId, orderId: $orderId, packageId: $packageId, packageItemId: $packageItemId}
@@ -2385,158 +2387,158 @@ const ut = l`
2385
2387
  amountReserved
2386
2388
  }
2387
2389
  }
2388
- `, gt = l`
2390
+ `, It = u`
2389
2391
  mutation configureOrderDeliveryOption($orderId: ID!, $productId: ID) {
2390
2392
  configureDeliveryOption(input: {orderId: $orderId, productId: $productId})
2391
2393
  }
2392
- `, It = l`
2394
+ `, Et = u`
2393
2395
  mutation createOrderCustomer($orderId: ID!, $countryCode: String, $customer: CreateCustomerInput!) {
2394
2396
  createOrderCustomer(
2395
2397
  input: {id: $orderId, countryCode: $countryCode, customer: $customer}
2396
2398
  )
2397
2399
  }
2398
- `, Et = l`
2400
+ `, yt = u`
2399
2401
  mutation deleteOrder($orderId: ID!) {
2400
2402
  cancelOrder(id: $orderId)
2401
2403
  }
2402
- `, yt = (n, e, t, i) => n();
2403
- function Ot(n, e = yt) {
2404
+ `, kt = (t, e, n, i) => t();
2405
+ function Ot(t, e = kt) {
2404
2406
  return {
2405
- findActiveOrderById(t, i, r) {
2406
- return e((s) => n.request({ document: ut, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", t);
2407
+ findActiveOrderById(n, i, r) {
2408
+ return e((s) => t.request({ document: lt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", n);
2407
2409
  },
2408
- findOrderById(t, i, r) {
2409
- return e((s) => n.request({ document: lt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findOrderById", "query", t);
2410
+ findOrderById(n, i, r) {
2411
+ return e((s) => t.request({ document: pt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findOrderById", "query", n);
2410
2412
  },
2411
- addToOrder(t, i, r) {
2412
- return e((s) => n.request({ document: ht, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", t);
2413
+ addToOrder(n, i, r) {
2414
+ return e((s) => t.request({ document: ht, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", n);
2413
2415
  },
2414
- removeFromOrder(t, i, r) {
2415
- return e((s) => n.request({ document: pt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", t);
2416
+ removeFromOrder(n, i, r) {
2417
+ return e((s) => t.request({ document: gt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", n);
2416
2418
  },
2417
- configurePackage(t, i, r) {
2418
- return e((s) => n.request({ document: mt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", t);
2419
+ configurePackage(n, i, r) {
2420
+ return e((s) => t.request({ document: mt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", n);
2419
2421
  },
2420
- reserveAdditionalPackageItem(t, i, r) {
2421
- return e((s) => n.request({ document: ft, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", t);
2422
+ reserveAdditionalPackageItem(n, i, r) {
2423
+ return e((s) => t.request({ document: ft, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", n);
2422
2424
  },
2423
- configureOrderDeliveryOption(t, i, r) {
2424
- return e((s) => n.request({ document: gt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", t);
2425
+ configureOrderDeliveryOption(n, i, r) {
2426
+ return e((s) => t.request({ document: It, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", n);
2425
2427
  },
2426
- createOrderCustomer(t, i, r) {
2427
- return e((s) => n.request({ document: It, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", t);
2428
+ createOrderCustomer(n, i, r) {
2429
+ return e((s) => t.request({ document: Et, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", n);
2428
2430
  },
2429
- deleteOrder(t, i, r) {
2430
- return e((s) => n.request({ document: Et, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", t);
2431
+ deleteOrder(n, i, r) {
2432
+ return e((s) => t.request({ document: yt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", n);
2431
2433
  }
2432
2434
  };
2433
2435
  }
2434
- class kt {
2436
+ class At {
2435
2437
  config;
2436
2438
  sdk;
2437
2439
  constructor(e) {
2438
- this.config = e, this.sdk = Ot(new v(e.apiUrl));
2440
+ this.config = e, this.sdk = Ot(new N(e.apiUrl));
2439
2441
  }
2440
2442
  // Basket update functions
2441
- async addProduct(e, t) {
2443
+ async addProduct(e, n, i) {
2442
2444
  try {
2443
2445
  return this.debugLog("Adding product", {
2444
- productId: t.id,
2446
+ productId: n.id,
2445
2447
  orderId: e,
2446
- amount: t.amount,
2447
- seat: t.seat
2448
+ amount: n.amount,
2449
+ seat: n.seat
2448
2450
  }), (await this.sdk.addToOrder({
2449
- productId: t.id,
2451
+ productId: n.id,
2450
2452
  orderId: e,
2451
- additionalData: t.seat ? {
2453
+ additionalData: n.seat ? {
2452
2454
  seat: {
2453
- seatId: t.seat.id,
2454
- seatLabel: t.seat.label,
2455
- holdToken: t.seat.holdToken
2455
+ seatId: n.seat.id,
2456
+ seatLabel: n.seat.label,
2457
+ holdToken: n.seat.holdToken
2456
2458
  }
2457
2459
  } : null,
2458
2460
  trackerId: this.config.trackerId,
2459
- shopId: this.config.shopId,
2460
- amount: t.amount
2461
+ shopId: i,
2462
+ amount: n.amount
2461
2463
  })).reserveProduct;
2462
- } catch (i) {
2463
- throw this.debugLog("Error adding product", i), this.handleError(i), i;
2464
+ } catch (r) {
2465
+ throw this.debugLog("Error adding product", r), this.handleError(r), r;
2464
2466
  }
2465
2467
  }
2466
- async removeProduct(e, t) {
2468
+ async removeProduct(e, n) {
2467
2469
  try {
2468
2470
  return this.debugLog("Removing product", {
2469
- productId: t.id,
2471
+ productId: n.id,
2470
2472
  orderId: e,
2471
- amount: t.amount
2473
+ amount: n.amount
2472
2474
  }), (await this.sdk.removeFromOrder({
2473
- productId: t.id,
2475
+ productId: n.id,
2474
2476
  orderId: e,
2475
- additionalData: t.seat ? {
2477
+ additionalData: n.seat ? {
2476
2478
  seat: {
2477
- seatId: t.seat.id,
2478
- seatLabel: t.seat.label
2479
+ seatId: n.seat.id,
2480
+ seatLabel: n.seat.label
2479
2481
  }
2480
2482
  } : null,
2481
- amount: t.amount
2483
+ amount: n.amount
2482
2484
  })).releaseProduct ?? null;
2483
2485
  } catch (i) {
2484
2486
  throw this.debugLog("Error removing product", i), this.handleError(i), i;
2485
2487
  }
2486
2488
  }
2487
- async configurePackage(e, t) {
2489
+ async configurePackage(e, n, i) {
2488
2490
  try {
2489
- const i = t.items.map((s) => ({
2490
- packageItemId: s.packageItemId,
2491
- eventId: s.eventId
2491
+ const r = n.items.map((o) => ({
2492
+ packageItemId: o.packageItemId,
2493
+ eventId: o.eventId
2492
2494
  }));
2493
2495
  this.debugLog("Configuring package", {
2494
- packageId: t.id,
2496
+ packageId: n.id,
2495
2497
  orderId: e,
2496
- amount: t.amount,
2497
- items: i,
2498
- shopId: this.config.shopId
2498
+ amount: n.amount,
2499
+ items: r,
2500
+ shopId: i
2499
2501
  });
2500
- const r = await this.sdk.configurePackage({
2502
+ const s = await this.sdk.configurePackage({
2501
2503
  trackerId: this.config.trackerId,
2502
- shopId: this.config.shopId,
2503
- packageId: t.id,
2504
+ shopId: i,
2505
+ packageId: n.id,
2504
2506
  orderId: e,
2505
- amount: t.amount,
2506
- items: i
2507
+ amount: n.amount,
2508
+ items: r
2507
2509
  });
2508
- return this.debugLog("Configure package response"), r.configurePackage ?? null;
2509
- } catch (i) {
2510
- throw this.debugLog("Error configuring package", i), this.handleError(i), i;
2510
+ return this.debugLog("Configure package response"), s.configurePackage ?? null;
2511
+ } catch (r) {
2512
+ throw this.debugLog("Error configuring package", r), this.handleError(r), r;
2511
2513
  }
2512
2514
  }
2513
- async configureCustomer(e, t) {
2514
- this.debugLog("Creating/replacing customer", { orderId: e, email: t.email });
2515
+ async configureCustomer(e, n) {
2516
+ this.debugLog("Creating/replacing customer", { orderId: e, email: n.email });
2515
2517
  try {
2516
2518
  const i = await this.sdk.createOrderCustomer({
2517
2519
  orderId: e,
2518
- customer: t
2520
+ customer: n
2519
2521
  });
2520
2522
  this.debugLog("Customer set successfully", i);
2521
2523
  } catch (i) {
2522
2524
  throw this.debugLog("Failed to set customer", i), new Error(`Failed to set customer: ${i.message}`);
2523
2525
  }
2524
2526
  }
2525
- async reserveAdditionalPackageItem(e, t) {
2527
+ async reserveAdditionalPackageItem(e, n) {
2526
2528
  try {
2527
2529
  this.debugLog("reserve additional packageItem", {
2528
2530
  orderId: e,
2529
- eventId: t.eventId,
2530
- amount: t.amount,
2531
- packageId: t.packageId,
2532
- packageItemId: t.packageItemId
2531
+ eventId: n.eventId,
2532
+ amount: n.amount,
2533
+ packageId: n.packageId,
2534
+ packageItemId: n.packageItemId
2533
2535
  });
2534
2536
  const i = await this.sdk.reserveAdditionalPackageItem({
2535
2537
  orderId: e,
2536
- eventId: t.eventId,
2537
- amount: t.amount,
2538
- packageId: t.packageId,
2539
- packageItemId: t.packageItemId
2538
+ eventId: n.eventId,
2539
+ amount: n.amount,
2540
+ packageId: n.packageId,
2541
+ packageItemId: n.packageItemId
2540
2542
  });
2541
2543
  return this.debugLog("reserve additional packageItem"), i.reserveAdditionalPackageItem ?? null;
2542
2544
  } catch (i) {
@@ -2547,9 +2549,9 @@ class kt {
2547
2549
  async cancelOrder(e) {
2548
2550
  e && (this.debugLog("Cancelling order", { orderId: e }), await this.sdk.deleteOrder({ orderId: e }), this.debugLog("Order cancelled successfully"));
2549
2551
  }
2550
- async findOrder(e, t) {
2552
+ async findOrder(e, n) {
2551
2553
  try {
2552
- const i = await this.sdk.findOrderById({ id: e, reference: t });
2554
+ const i = await this.sdk.findOrderById({ id: e, reference: n });
2553
2555
  return i.findOrder ? {
2554
2556
  id: i.findOrder.id,
2555
2557
  reference: i.findOrder.reference,
@@ -2577,16 +2579,16 @@ class kt {
2577
2579
  async findActiveOrder(e) {
2578
2580
  this.debugLog("Fetching order from server", { orderId: e });
2579
2581
  try {
2580
- const t = await this.sdk.findActiveOrderById({ id: e });
2581
- if (!t?.findOrder)
2582
+ const n = await this.sdk.findActiveOrderById({ id: e });
2583
+ if (!n?.findOrder)
2582
2584
  return null;
2583
- const i = t.findOrder;
2585
+ const i = n.findOrder;
2584
2586
  this.debugLog("Order fetched successfully", i);
2585
2587
  const r = i.items, s = r.filter((d) => d.product != null && d.amount > 0).map((d) => {
2586
- let f = T.PRODUCT;
2587
- return d.product.type === "PROMOTER" ? f = T.ADD_ONS : d.product.type === "PICKUP" ? f = T.PICKUP : d.product.type === "DELIVERY" && (f = T.DELIVERY), {
2588
+ let m = T.PRODUCT;
2589
+ return d.product.type === "PROMOTER" ? m = T.ADD_ONS : d.product.type === "PICKUP" ? m = T.PICKUP : d.product.type === "DELIVERY" && (m = T.DELIVERY), {
2588
2590
  id: d.product.id,
2589
- type: f,
2591
+ type: m,
2590
2592
  name: d.product.name,
2591
2593
  icon: d.product.icon,
2592
2594
  description: d.product.description,
@@ -2600,18 +2602,18 @@ class kt {
2600
2602
  label: y.label
2601
2603
  }))
2602
2604
  };
2603
- }), o = r.filter((d) => d.packageItem != null && d.amount > 0).reduce((d, f) => {
2605
+ }), o = r.filter((d) => d.packageItem != null && d.amount > 0).reduce((d, m) => {
2604
2606
  const {
2605
2607
  packageItem: y,
2606
- event: p,
2608
+ event: h,
2607
2609
  amount: O,
2608
2610
  price: C,
2609
2611
  serviceFee: Y,
2610
2612
  depositPrice: H,
2611
2613
  originalPrice: J
2612
- } = f, k = y.package.id;
2613
- d[k] ? (d[k].price += C ?? 0, d[k].serviceFee += Y ?? 0, d[k].originalPrice += J ?? 0, d[k].depositPrice += H ?? C ?? 0) : d[k] = {
2614
- id: k,
2614
+ } = m, A = y.package.id;
2615
+ d[A] ? (d[A].price += C ?? 0, d[A].serviceFee += Y ?? 0, d[A].originalPrice += J ?? 0, d[A].depositPrice += H ?? C ?? 0) : d[A] = {
2616
+ id: A,
2615
2617
  type: T.PACKAGE,
2616
2618
  name: y.package.name,
2617
2619
  amount: O,
@@ -2621,30 +2623,30 @@ class kt {
2621
2623
  originalPrice: J ?? 0,
2622
2624
  packageItems: []
2623
2625
  };
2624
- const Oe = A.fromISO(p.startAt, {
2625
- zone: p.timezone
2626
- }), ke = A.fromISO(p.endAt, {
2627
- zone: p.timezone
2626
+ const Oe = k.fromISO(h.startAt, {
2627
+ zone: h.timezone
2628
+ }), Ae = k.fromISO(h.endAt, {
2629
+ zone: h.timezone
2628
2630
  });
2629
- return d[k].packageItems.push({
2631
+ return d[A].packageItems.push({
2630
2632
  packageItemId: y.id,
2631
- eventId: p.id,
2632
- name: p.name,
2633
+ eventId: h.id,
2634
+ name: h.name,
2633
2635
  startAt: Oe.toJSDate().toISOString(),
2634
- endAt: ke.toJSDate().toISOString()
2636
+ endAt: Ae.toJSDate().toISOString()
2635
2637
  }), d;
2636
- }, {}), u = [
2638
+ }, {}), l = [
2637
2639
  ...s,
2638
2640
  ...Object.values(o)
2639
- ], h = u.reduce((d, f) => d + (f.amount || 0), 0);
2640
- if (h === 0)
2641
+ ], p = l.reduce((d, m) => d + (m.amount || 0), 0);
2642
+ if (p === 0)
2641
2643
  return null;
2642
- const E = r.filter((d) => d.amount > 0).map((d) => new Date(d.expiredAt).getTime()), m = A.fromMillis(Math.min(...E));
2644
+ const E = r.filter((d) => d.amount > 0).map((d) => new Date(d.expiredAt).getTime()), g = k.fromMillis(Math.min(...E));
2643
2645
  return {
2644
2646
  id: i.id,
2645
2647
  currency: i.currency,
2646
- expiredAt: m?.toJSDate().toISOString(),
2647
- items: u,
2648
+ expiredAt: g?.toJSDate().toISOString(),
2649
+ items: l,
2648
2650
  customer: i.mainBooker ? {
2649
2651
  firstName: i.mainBooker.firstName,
2650
2652
  lastName: i.mainBooker.lastName,
@@ -2654,29 +2656,29 @@ class kt {
2654
2656
  residence: i.mainBooker.residence,
2655
2657
  extraInfo: i.mainBooker.extraInfo
2656
2658
  } : null,
2657
- count: h,
2659
+ count: p,
2658
2660
  orderProtection: !1
2659
2661
  };
2660
- } catch (t) {
2661
- throw this.debugLog("Error fetching order", t), t;
2662
+ } catch (n) {
2663
+ throw this.debugLog("Error fetching order", n), n;
2662
2664
  }
2663
2665
  }
2664
- debugLog(e, t) {
2665
- this.config.debug && console.log(`[BasketService] ${e}`, t || "");
2666
+ debugLog(e, n) {
2667
+ this.config.debug && console.log(`[BasketService] ${e}`, n || "");
2666
2668
  }
2667
2669
  handleError(e) {
2668
- const t = e;
2669
- if (t.graphQLErrors && t.graphQLErrors.length > 0) {
2670
- const i = t.graphQLErrors[0];
2670
+ const n = e;
2671
+ if (n.graphQLErrors && n.graphQLErrors.length > 0) {
2672
+ const i = n.graphQLErrors[0];
2671
2673
  i.extensions?.status === "RATE_LIMIT" && console.error("Rate Limit reached"), i.extensions?.status === "SOLD_OUT" && console.error("Product sold out");
2672
2674
  }
2673
- if (t.response?.errors && t.response.errors.length > 0) {
2674
- const i = t.response.errors[0];
2675
+ if (n.response?.errors && n.response.errors.length > 0) {
2676
+ const i = n.response.errors[0];
2675
2677
  console.error("GraphQL Error:", i.message), i.extensions?.code && console.error("Error Code:", i.extensions.code);
2676
2678
  }
2677
2679
  }
2678
2680
  }
2679
- const Tt = l`
2681
+ const Tt = u`
2680
2682
  query EventOverviewPage($organizationId: ID!, $hostingIds: [String!], $locationIds: [String!], $excludedEventIds: [String!], $trackerId: String, $filterEventStatuses: [EventStatus!], $dateRange: DateRangeInput, $page: PageInput, $sorts: [SortInput!], $searchTerm: String, $priceRange: PriceRangeInput) {
2681
2683
  findAllPublicEventByOrganizationId(
2682
2684
  id: $organizationId
@@ -2721,7 +2723,7 @@ const Tt = l`
2721
2723
  count
2722
2724
  }
2723
2725
  }
2724
- `, At = l`
2726
+ `, Dt = u`
2725
2727
  query EventDetailPage($eventId: ID!) {
2726
2728
  findPublicEventById(id: $eventId) {
2727
2729
  id
@@ -2753,7 +2755,39 @@ const Tt = l`
2753
2755
  totalViews
2754
2756
  }
2755
2757
  }
2756
- `, Nt = l`
2758
+ `, Nt = u`
2759
+ query FindPublicEventBySlug($organizationId: ID!, $slug: String!) {
2760
+ findPublicEventBySlug(organizationId: $organizationId, slug: $slug) {
2761
+ id
2762
+ name
2763
+ icon
2764
+ banner
2765
+ description
2766
+ addonDescription
2767
+ startAt
2768
+ endAt
2769
+ startSalesAt
2770
+ endSalesAt
2771
+ facebookPixelId
2772
+ timezone
2773
+ slug
2774
+ status
2775
+ location {
2776
+ id
2777
+ name
2778
+ address
2779
+ }
2780
+ hosting {
2781
+ id
2782
+ name
2783
+ }
2784
+ infoDescription
2785
+ maxAmountOfTicketsPerOrder
2786
+ startingPrice
2787
+ totalViews
2788
+ }
2789
+ }
2790
+ `, vt = u`
2757
2791
  query findProductsByEventId($eventId: ID!, $promoCode: String, $trackerId: String, $productTypes: [ProductType!]) {
2758
2792
  findPublicProductsByEventId(
2759
2793
  eventId: $eventId
@@ -2787,57 +2821,45 @@ const Tt = l`
2787
2821
  showEndSalesAtTag
2788
2822
  }
2789
2823
  }
2790
- `, Dt = (n, e, t, i) => n();
2791
- function vt(n, e = Dt) {
2824
+ `, bt = (t, e, n, i) => t();
2825
+ function Pt(t, e = bt) {
2792
2826
  return {
2793
- EventOverviewPage(t, i, r) {
2794
- return e((s) => n.request({ document: Tt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", t);
2827
+ EventOverviewPage(n, i, r) {
2828
+ return e((s) => t.request({ document: Tt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", n);
2829
+ },
2830
+ EventDetailPage(n, i, r) {
2831
+ return e((s) => t.request({ document: Dt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", n);
2795
2832
  },
2796
- EventDetailPage(t, i, r) {
2797
- return e((s) => n.request({ document: At, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", t);
2833
+ FindPublicEventBySlug(n, i, r) {
2834
+ return e((s) => t.request({ document: Nt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "FindPublicEventBySlug", "query", n);
2798
2835
  },
2799
- findProductsByEventId(t, i, r) {
2800
- return e((s) => n.request({ document: Nt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", t);
2836
+ findProductsByEventId(n, i, r) {
2837
+ return e((s) => t.request({ document: vt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", n);
2801
2838
  }
2802
2839
  };
2803
2840
  }
2804
- class xt {
2841
+ class St {
2805
2842
  config;
2806
2843
  sdk;
2807
2844
  constructor(e) {
2808
- this.config = e, this.sdk = vt(new v(e.apiUrl));
2845
+ this.config = e, this.sdk = Pt(new N(e.apiUrl));
2809
2846
  }
2810
- async getEvents(e = {}) {
2847
+ async getEvents(e, n) {
2811
2848
  try {
2812
2849
  e.page && (e.page = {
2813
2850
  index: e.page.index ?? 0,
2814
2851
  size: e.page.size ?? 20
2815
2852
  }), this.debugLog("Fetching events with parameters", {
2816
- organizationId: this.config.organizationId,
2853
+ organizationId: this.config.organizationId ?? n ?? "",
2817
2854
  hostingIds: e.hostingIds,
2818
2855
  filterEventStatuses: e.statuses,
2819
2856
  dateRange: e.dateRange,
2820
2857
  page: e.page,
2821
2858
  sorts: e.sorts,
2822
2859
  trackerId: this.config.trackerId
2823
- }), console.log({
2824
- organizationId: this.config.organizationId,
2825
- hostingIds: e.hostingIds,
2826
- locationIds: e.locationIds,
2827
- excludedEventIds: e.excludedEventIds,
2828
- filterEventStatuses: e.statuses,
2829
- dateRange: e.dateRange && e.dateRange.from && e.dateRange.till ? {
2830
- from: e.dateRange.from.toISO(),
2831
- till: e.dateRange.till.toISO()
2832
- } : void 0,
2833
- page: e.page,
2834
- sorts: e.sorts,
2835
- trackerId: this.config.trackerId,
2836
- searchTerm: e.searchTerm,
2837
- priceRange: e.priceRange
2838
2860
  });
2839
- const t = await this.sdk.EventOverviewPage({
2840
- organizationId: this.config.organizationId,
2861
+ const i = await this.sdk.EventOverviewPage({
2862
+ organizationId: this.config.organizationId ?? n ?? "",
2841
2863
  hostingIds: e.hostingIds,
2842
2864
  locationIds: e.locationIds,
2843
2865
  excludedEventIds: e.excludedEventIds,
@@ -2852,56 +2874,56 @@ class xt {
2852
2874
  searchTerm: e.searchTerm,
2853
2875
  priceRange: e.priceRange
2854
2876
  });
2855
- if (this.debugLog("Raw GraphQL response", t), t?.findAllPublicEventByOrganizationId?.data) {
2856
- const i = t.findAllPublicEventByOrganizationId.data.map((r) => ({
2857
- id: r.id,
2858
- name: r.name,
2859
- icon: r.icon,
2860
- banner: r.banner,
2861
- description: r.description,
2862
- addonDescription: r.addonDescription,
2863
- startAt: A.fromISO(r.startAt, { zone: r.timezone }).toJSDate().toISOString(),
2864
- endAt: A.fromISO(r.endAt, { zone: r.timezone }).toJSDate().toISOString(),
2865
- timezone: r.timezone,
2877
+ if (this.debugLog("Raw GraphQL response", i), i?.findAllPublicEventByOrganizationId?.data) {
2878
+ const r = i.findAllPublicEventByOrganizationId.data.map((s) => ({
2879
+ id: s.id,
2880
+ name: s.name,
2881
+ icon: s.icon,
2882
+ banner: s.banner,
2883
+ description: s.description,
2884
+ addonDescription: s.addonDescription,
2885
+ startAt: k.fromISO(s.startAt, { zone: s.timezone }).toJSDate().toISOString(),
2886
+ endAt: k.fromISO(s.endAt, { zone: s.timezone }).toJSDate().toISOString(),
2887
+ timezone: s.timezone,
2866
2888
  startSalesAt: null,
2867
2889
  endSalesAt: null,
2868
- slug: r.slug ?? "ERROR",
2890
+ slug: s.slug ?? "ERROR",
2869
2891
  facebookPixelId: null,
2870
- status: r.status,
2871
- location: r.location ? {
2872
- id: r.location.id,
2873
- name: r.location.name,
2874
- address: r.location.address
2892
+ status: s.status,
2893
+ location: s.location ? {
2894
+ id: s.location.id,
2895
+ name: s.location.name,
2896
+ address: s.location.address
2875
2897
  } : void 0,
2876
- hosting: r.hosting ? {
2877
- id: r.hosting.id,
2878
- name: r.hosting.name
2898
+ hosting: s.hosting ? {
2899
+ id: s.hosting.id,
2900
+ name: s.hosting.name
2879
2901
  } : void 0,
2880
- infoDescription: r.infoDescription,
2881
- startingPrice: r.startingPrice,
2882
- totalViews: r.totalViews
2902
+ infoDescription: s.infoDescription,
2903
+ startingPrice: s.startingPrice,
2904
+ totalViews: s.totalViews
2883
2905
  }));
2884
- return this.debugLog("Processed events", { events: i, count: i.length }), [i, t.findAllPublicEventByOrganizationId.count ?? 0];
2906
+ return this.debugLog("Processed events", { events: r, count: r.length }), [r, i.findAllPublicEventByOrganizationId.count ?? 0];
2885
2907
  } else
2886
2908
  return this.debugLog("No events found in response"), [[], 0];
2887
- } catch (t) {
2888
- throw this.debugLog("Error fetching events", t), t;
2909
+ } catch (i) {
2910
+ throw this.debugLog("Error fetching events", i), i;
2889
2911
  }
2890
2912
  }
2891
2913
  async getEvent(e) {
2892
2914
  try {
2893
2915
  this.debugLog("Fetching single event", { eventId: e });
2894
- const t = await this.sdk.EventDetailPage({ eventId: e });
2895
- if (this.debugLog("Raw GraphQL response", t), t?.findPublicEventById) {
2896
- const i = t.findPublicEventById, r = {
2916
+ const n = await this.sdk.EventDetailPage({ eventId: e });
2917
+ if (this.debugLog("Raw GraphQL response", n), n?.findPublicEventById) {
2918
+ const i = n.findPublicEventById, r = {
2897
2919
  id: i.id,
2898
2920
  name: i.name,
2899
2921
  icon: i.icon,
2900
2922
  banner: i.banner,
2901
2923
  description: i.description,
2902
2924
  addonDescription: i.addonDescription,
2903
- startAt: A.fromISO(i.startAt, { zone: i.timezone }).toJSDate().toISOString(),
2904
- endAt: A.fromISO(i.endAt, { zone: i.timezone }).toJSDate().toISOString(),
2925
+ startAt: k.fromISO(i.startAt, { zone: i.timezone }).toJSDate().toISOString(),
2926
+ endAt: k.fromISO(i.endAt, { zone: i.timezone }).toJSDate().toISOString(),
2905
2927
  timezone: i.timezone,
2906
2928
  startSalesAt: i.startSalesAt,
2907
2929
  endSalesAt: i.endSalesAt,
@@ -2926,23 +2948,65 @@ class xt {
2926
2948
  this.debugLog("No event found for id", e);
2927
2949
  return;
2928
2950
  }
2929
- } catch (t) {
2930
- throw this.debugLog("Error fetching single event", t), t;
2951
+ } catch (n) {
2952
+ throw this.debugLog("Error fetching single event", n), n;
2953
+ }
2954
+ }
2955
+ async getEventBySlug(e, n) {
2956
+ try {
2957
+ this.debugLog("Fetching single event by slug", { organizationId: e, slug: n });
2958
+ const i = await this.sdk.FindPublicEventBySlug({ organizationId: e, slug: n });
2959
+ if (this.debugLog("Raw GraphQL response", i), i?.findPublicEventBySlug) {
2960
+ const r = i.findPublicEventBySlug, s = {
2961
+ id: r.id,
2962
+ name: r.name,
2963
+ icon: r.icon,
2964
+ banner: r.banner,
2965
+ description: r.description,
2966
+ addonDescription: r.addonDescription,
2967
+ startAt: k.fromISO(r.startAt, { zone: r.timezone }).toJSDate().toISOString(),
2968
+ endAt: k.fromISO(r.endAt, { zone: r.timezone }).toJSDate().toISOString(),
2969
+ timezone: r.timezone,
2970
+ startSalesAt: r.startSalesAt,
2971
+ endSalesAt: r.endSalesAt,
2972
+ slug: r.slug ?? "ERROR",
2973
+ facebookPixelId: r.facebookPixelId,
2974
+ status: r.status,
2975
+ location: r.location ? {
2976
+ id: r.location.id,
2977
+ name: r.location.name,
2978
+ address: r.location.address
2979
+ } : void 0,
2980
+ hosting: r.hosting ? {
2981
+ id: r.hosting.id,
2982
+ name: r.hosting.name
2983
+ } : void 0,
2984
+ infoDescription: r.infoDescription,
2985
+ startingPrice: r.startingPrice,
2986
+ totalViews: r.totalViews
2987
+ };
2988
+ return this.debugLog("Processed single event", s), s;
2989
+ } else {
2990
+ this.debugLog("No event found for id by slug", { organizationId: e, slug: n });
2991
+ return;
2992
+ }
2993
+ } catch (i) {
2994
+ throw this.debugLog("Error fetching single event", i), i;
2931
2995
  }
2932
2996
  }
2933
- async getProducts(e, t, i) {
2997
+ async getProducts(e, n, i) {
2934
2998
  try {
2935
2999
  this.debugLog("Fetching products for event", {
2936
3000
  eventId: e,
2937
3001
  promoCode: i,
2938
3002
  trackerId: this.config.trackerId,
2939
- productTypes: t
3003
+ productTypes: n
2940
3004
  });
2941
3005
  const r = await this.sdk.findProductsByEventId({
2942
3006
  eventId: e,
2943
3007
  promoCode: i,
2944
3008
  trackerId: this.config.trackerId,
2945
- productTypes: t
3009
+ productTypes: n
2946
3010
  });
2947
3011
  if (r?.findPublicProductsByEventId) {
2948
3012
  const s = r.findPublicProductsByEventId.map((o) => ({
@@ -2980,11 +3044,11 @@ class xt {
2980
3044
  throw this.debugLog("Error fetching products", { eventId: e, error: r }), r;
2981
3045
  }
2982
3046
  }
2983
- debugLog(e, t) {
2984
- this.config.debug && console.log(`[EventService:${this.config.organizationId}] ${e}`, t || "");
3047
+ debugLog(e, n) {
3048
+ this.config.debug && console.log(`[EventService:${this.config.organizationId}] ${e}`, n || "");
2985
3049
  }
2986
3050
  }
2987
- const Pt = l`
3051
+ const xt = u`
2988
3052
  query findPaymentMethods($orderId: ID!, $orderItemId: String, $amountOfTickets: Int, $paymentMethodId: String, $withTicketProtection: Boolean) {
2989
3053
  findPaymentDetails(
2990
3054
  orderId: $orderId
@@ -3014,40 +3078,40 @@ const Pt = l`
3014
3078
  protectionFee
3015
3079
  }
3016
3080
  }
3017
- `, bt = l`
3081
+ `, Ct = u`
3018
3082
  mutation createDigitalPayment($input: CreateDigitalOrderPaymentInput!) {
3019
3083
  createDigitalOrderPayment(input: $input)
3020
3084
  }
3021
- `, St = (n, e, t, i) => n();
3022
- function Ct(n, e = St) {
3085
+ `, _t = (t, e, n, i) => t();
3086
+ function Lt(t, e = _t) {
3023
3087
  return {
3024
- findPaymentMethods(t, i, r) {
3025
- return e((s) => n.request({ document: Pt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", t);
3088
+ findPaymentMethods(n, i, r) {
3089
+ return e((s) => t.request({ document: xt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", n);
3026
3090
  },
3027
- createDigitalPayment(t, i, r) {
3028
- return e((s) => n.request({ document: bt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", t);
3091
+ createDigitalPayment(n, i, r) {
3092
+ return e((s) => t.request({ document: Ct, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", n);
3029
3093
  }
3030
3094
  };
3031
3095
  }
3032
- class _t {
3096
+ class Rt {
3033
3097
  config;
3034
3098
  sdk;
3035
3099
  constructor(e) {
3036
- this.config = e, this.sdk = Ct(new v(e.apiUrl));
3100
+ this.config = e, this.sdk = Lt(new N(e.apiUrl));
3037
3101
  }
3038
3102
  async getPaymentDetails(e) {
3039
3103
  this.debugLog("Fetching payment methods", e);
3040
3104
  try {
3041
- const t = await this.sdk.findPaymentMethods({
3105
+ const n = await this.sdk.findPaymentMethods({
3042
3106
  orderId: e.orderId,
3043
3107
  orderItemId: e.orderItemId,
3044
3108
  amountOfTickets: e.amountOfTickets,
3045
3109
  paymentMethodId: e.paymentMethodId,
3046
3110
  withTicketProtection: e.withTicketProtection
3047
3111
  });
3048
- if (!t?.findPaymentDetails)
3112
+ if (!n?.findPaymentDetails)
3049
3113
  throw this.debugLog("No payment details found"), new Error("No payment details found for this order");
3050
- const i = t.findPaymentDetails;
3114
+ const i = n.findPaymentDetails;
3051
3115
  return this.debugLog("Payment methods fetched successfully", {
3052
3116
  methodCount: i.methods?.length ?? 0,
3053
3117
  transactionPrice: i.transactionPrice,
@@ -3076,14 +3140,14 @@ class _t {
3076
3140
  })) ?? null
3077
3141
  })) ?? null
3078
3142
  };
3079
- } catch (t) {
3080
- throw this.debugLog("Error fetching payment methods", t), t;
3143
+ } catch (n) {
3144
+ throw this.debugLog("Error fetching payment methods", n), n;
3081
3145
  }
3082
3146
  }
3083
3147
  async createPayment(e) {
3084
3148
  this.debugLog("Creating payment", e);
3085
3149
  try {
3086
- const t = {
3150
+ const n = {
3087
3151
  orderId: e.orderId,
3088
3152
  paymentMethodId: e.paymentMethodId,
3089
3153
  issuerId: e.issuerId,
@@ -3095,23 +3159,23 @@ class _t {
3095
3159
  orderItemId: e.orderItemId,
3096
3160
  withTicketProtection: e.withTicketProtection
3097
3161
  };
3098
- e.customer && (t.customer = e.customer), e.products && (t.products = e.products), e.description && (t.description = e.description), e.reference && (t.reference = e.reference), e.ipAddress && (t.ipAddress = e.ipAddress);
3162
+ e.customer && (n.customer = e.customer), e.products && (n.products = e.products), e.description && (n.description = e.description), e.reference && (n.reference = e.reference), e.ipAddress && (n.ipAddress = e.ipAddress);
3099
3163
  const i = await this.sdk.createDigitalPayment({
3100
- input: t
3164
+ input: n
3101
3165
  });
3102
3166
  if (!i?.createDigitalOrderPayment)
3103
3167
  throw this.debugLog("Failed to create payment"), new Error("Failed to create payment for this order");
3104
3168
  const r = i.createDigitalOrderPayment;
3105
3169
  return this.debugLog("Payment created successfully", { paymentUrl: r }), { paymentUrl: r };
3106
- } catch (t) {
3107
- throw this.debugLog("Error creating payment", t), t;
3170
+ } catch (n) {
3171
+ throw this.debugLog("Error creating payment", n), n;
3108
3172
  }
3109
3173
  }
3110
- debugLog(e, t) {
3111
- this.config.debug && console.log(`[PaymentService] ${e}`, t || "");
3174
+ debugLog(e, n) {
3175
+ this.config.debug && console.log(`[PaymentService] ${e}`, n || "");
3112
3176
  }
3113
3177
  }
3114
- const Lt = l`
3178
+ const Ft = u`
3115
3179
  query findAllPublicPackagesByOrganizationId($organizationId: ID!) {
3116
3180
  findAllPublicPackagesByOrganizationId(organizationId: $organizationId) {
3117
3181
  data {
@@ -3136,7 +3200,7 @@ const Lt = l`
3136
3200
  count
3137
3201
  }
3138
3202
  }
3139
- `, Rt = l`
3203
+ `, wt = u`
3140
3204
  query findPublicPackageById($packageId: ID!) {
3141
3205
  findPublicPackageById(id: $packageId) {
3142
3206
  id
@@ -3162,7 +3226,33 @@ const Lt = l`
3162
3226
  }
3163
3227
  }
3164
3228
  }
3165
- `, wt = l`
3229
+ `, $t = u`
3230
+ query findPublicPackageBySlug($organizationId: ID!, $slug: String!) {
3231
+ findPublicPackageBySlug(organizationId: $organizationId, slug: $slug) {
3232
+ id
3233
+ slug
3234
+ status
3235
+ name
3236
+ description
3237
+ shortTitle
3238
+ shortDescription
3239
+ startAvailabilityAt
3240
+ endAvailabilityAt
3241
+ maxAmountOfPersonsPerOrder
3242
+ icon
3243
+ banner
3244
+ currency
3245
+ amountOfEvents
3246
+ amountOfAddons
3247
+ prices {
3248
+ price
3249
+ deposit
3250
+ discount
3251
+ serviceFee
3252
+ }
3253
+ }
3254
+ }
3255
+ `, Bt = u`
3166
3256
  query findPublicItemsByPackageId($packageId: ID!, $types: [PackageItemType!], $page: PageInput) {
3167
3257
  findPublicItemsByPackageId(packageId: $packageId, types: $types, page: $page) {
3168
3258
  data {
@@ -3197,54 +3287,57 @@ const Lt = l`
3197
3287
  count
3198
3288
  }
3199
3289
  }
3200
- `, Ft = (n, e, t, i) => n();
3201
- function $t(n, e = Ft) {
3290
+ `, Vt = (t, e, n, i) => t();
3291
+ function Ut(t, e = Vt) {
3202
3292
  return {
3203
- findAllPublicPackagesByOrganizationId(t, i, r) {
3204
- return e((s) => n.request({ document: Lt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", t);
3293
+ findAllPublicPackagesByOrganizationId(n, i, r) {
3294
+ return e((s) => t.request({ document: Ft, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", n);
3295
+ },
3296
+ findPublicPackageById(n, i, r) {
3297
+ return e((s) => t.request({ document: wt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", n);
3205
3298
  },
3206
- findPublicPackageById(t, i, r) {
3207
- return e((s) => n.request({ document: Rt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", t);
3299
+ findPublicPackageBySlug(n, i, r) {
3300
+ return e((s) => t.request({ document: $t, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageBySlug", "query", n);
3208
3301
  },
3209
- findPublicItemsByPackageId(t, i, r) {
3210
- return e((s) => n.request({ document: wt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", t);
3302
+ findPublicItemsByPackageId(n, i, r) {
3303
+ return e((s) => t.request({ document: Bt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", n);
3211
3304
  }
3212
3305
  };
3213
3306
  }
3214
- class Bt {
3307
+ class Mt {
3215
3308
  config;
3216
3309
  sdk;
3217
3310
  constructor(e) {
3218
- this.config = e, this.sdk = $t(new v(e.apiUrl));
3311
+ this.config = e, this.sdk = Ut(new N(e.apiUrl));
3219
3312
  }
3220
- debugLog(e, t) {
3221
- this.config.debug && console.log(`[PackageService] ${e}`, t || "");
3313
+ debugLog(e, n) {
3314
+ this.config.debug && console.log(`[PackageService] ${e}`, n || "");
3222
3315
  }
3223
- async getPackages(e = {}) {
3316
+ async getPackages(e, n) {
3224
3317
  try {
3225
- let t;
3226
- e.page && (t = {
3318
+ let i;
3319
+ e.page && (i = {
3227
3320
  index: e.page.index ?? 0,
3228
3321
  size: e.page.size ?? 20
3229
3322
  }), this.debugLog("Fetching public packages", {
3230
- organizationId: this.config.organizationId,
3231
- page: t,
3323
+ organizationId: this.config.organizationId ?? n ?? "",
3324
+ page: i,
3232
3325
  tab: e.tab,
3233
3326
  statuses: e.statuses
3234
3327
  });
3235
- const i = await this.sdk.findAllPublicPackagesByOrganizationId({
3236
- organizationId: this.config.organizationId
3328
+ const r = await this.sdk.findAllPublicPackagesByOrganizationId({
3329
+ organizationId: this.config.organizationId ?? n ?? ""
3237
3330
  });
3238
- if (i?.findAllPublicPackagesByOrganizationId) {
3239
- const r = i.findAllPublicPackagesByOrganizationId;
3331
+ if (r?.findAllPublicPackagesByOrganizationId) {
3332
+ const s = r.findAllPublicPackagesByOrganizationId;
3240
3333
  return this.debugLog("Public packages fetched", {
3241
- count: r.count,
3242
- dataLength: r.data.length
3243
- }), r.data;
3334
+ count: s.count,
3335
+ dataLength: s.data.length
3336
+ }), s.data;
3244
3337
  }
3245
3338
  return null;
3246
- } catch (t) {
3247
- throw this.debugLog("Error fetching public packages", t), t;
3339
+ } catch (i) {
3340
+ throw this.debugLog("Error fetching public packages", i), i;
3248
3341
  }
3249
3342
  }
3250
3343
  async getPackage(e) {
@@ -3252,22 +3345,38 @@ class Bt {
3252
3345
  this.debugLog("Fetching public packages", {
3253
3346
  packageId: e
3254
3347
  });
3255
- const t = await this.sdk.findPublicPackageById({ packageId: e });
3256
- if (t?.findPublicPackageById) {
3257
- const i = t.findPublicPackageById;
3348
+ const n = await this.sdk.findPublicPackageById({ packageId: e });
3349
+ if (n?.findPublicPackageById) {
3350
+ const i = n.findPublicPackageById;
3258
3351
  return this.debugLog("Public package fetched"), i;
3259
3352
  }
3260
3353
  return null;
3261
- } catch (t) {
3262
- throw this.debugLog("Error fetching public packages", t), t;
3354
+ } catch (n) {
3355
+ throw this.debugLog("Error fetching public packages", n), n;
3356
+ }
3357
+ }
3358
+ async getPackageBySlug(e, n) {
3359
+ try {
3360
+ this.debugLog("Fetching public packages by slug", {
3361
+ organizationId: e,
3362
+ slug: n
3363
+ });
3364
+ const i = await this.sdk.findPublicPackageBySlug({ organizationId: e, slug: n });
3365
+ if (i?.findPublicPackageBySlug) {
3366
+ const r = i.findPublicPackageBySlug;
3367
+ return this.debugLog("Public package fetched"), r;
3368
+ }
3369
+ return null;
3370
+ } catch (i) {
3371
+ throw this.debugLog("Error fetching public packages", i), i;
3263
3372
  }
3264
3373
  }
3265
- async getPackageItems(e, t = [R.Regular, R.AdditionalEvent]) {
3374
+ async getPackageItems(e, n = [R.Regular, R.AdditionalEvent]) {
3266
3375
  try {
3267
- this.debugLog("Fetching public package items", { packageId: e, types: t });
3376
+ this.debugLog("Fetching public package items", { packageId: e, types: n });
3268
3377
  const i = await this.sdk.findPublicItemsByPackageId({
3269
3378
  packageId: e,
3270
- types: t,
3379
+ types: n,
3271
3380
  page: { index: 0, size: 100 }
3272
3381
  });
3273
3382
  if (i?.findPublicItemsByPackageId) {
@@ -3283,7 +3392,7 @@ class Bt {
3283
3392
  }
3284
3393
  }
3285
3394
  }
3286
- const Vt = l`
3395
+ const zt = u`
3287
3396
  query findAllPublicCategoriesByOrganizationId($organizationId: ID!, $dateRange: DateRangeInput) {
3288
3397
  findAllPublicLocationsByOrganizationId(id: $organizationId) {
3289
3398
  data {
@@ -3303,89 +3412,89 @@ const Vt = l`
3303
3412
  count
3304
3413
  }
3305
3414
  }
3306
- `, Ut = (n, e, t, i) => n();
3307
- function Mt(n, e = Ut) {
3415
+ `, qt = (t, e, n, i) => t();
3416
+ function Gt(t, e = qt) {
3308
3417
  return {
3309
- findAllPublicCategoriesByOrganizationId(t, i, r) {
3310
- return e((s) => n.request({ document: Vt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", t);
3418
+ findAllPublicCategoriesByOrganizationId(n, i, r) {
3419
+ return e((s) => t.request({ document: zt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", n);
3311
3420
  }
3312
3421
  };
3313
3422
  }
3314
- class zt {
3423
+ class jt {
3315
3424
  config;
3316
3425
  sdk;
3317
3426
  constructor(e) {
3318
- this.config = e, this.sdk = Mt(new v(e.apiUrl));
3427
+ this.config = e, this.sdk = Gt(new N(e.apiUrl));
3319
3428
  }
3320
- debugLog(e, t) {
3321
- this.config.debug && console.log(`[CategoryService] ${e}`, t || "");
3429
+ debugLog(e, n) {
3430
+ this.config.debug && console.log(`[CategoryService] ${e}`, n || "");
3322
3431
  }
3323
- async getCategories(e) {
3432
+ async getCategories(e, n) {
3324
3433
  try {
3325
3434
  this.debugLog("Fetching all categories", { organizationId: this.config.organizationId });
3326
- const t = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId, dateRange: e ?? null });
3327
- if (t?.findAllPublicHostingsByOrganizationId) {
3328
- const i = t.findAllPublicHostingsByOrganizationId, r = t.findAllPublicLocationsByOrganizationId;
3329
- return this.debugLog("Categories fetched", { count: i.count + r.count, dataLength: i.data.length + r.data.length }), [
3330
- ...i.data.map((s) => ({ id: s.id, name: s.name, icon: s.icon, activeEvents: s.amountOfActiveEvents, type: "HOSTING" })),
3331
- ...r.data.map((s) => ({ id: s.id, name: s.name, activeEvents: s.amountOfActiveEvents, type: "LOCATION" }))
3435
+ const i = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId ?? n ?? "", dateRange: e ?? null });
3436
+ if (i?.findAllPublicHostingsByOrganizationId) {
3437
+ const r = i.findAllPublicHostingsByOrganizationId, s = i.findAllPublicLocationsByOrganizationId;
3438
+ return this.debugLog("Categories fetched", { count: r.count + s.count, dataLength: r.data.length + s.data.length }), [
3439
+ ...r.data.map((o) => ({ id: o.id, name: o.name, icon: o.icon, activeEvents: o.amountOfActiveEvents, type: "HOSTING" })),
3440
+ ...s.data.map((o) => ({ id: o.id, name: o.name, activeEvents: o.amountOfActiveEvents, type: "LOCATION" }))
3332
3441
  ];
3333
3442
  }
3334
3443
  return [];
3335
- } catch (t) {
3336
- throw this.debugLog("Error fetching categories", t), t;
3444
+ } catch (i) {
3445
+ throw this.debugLog("Error fetching categories", i), i;
3337
3446
  }
3338
3447
  }
3339
3448
  }
3340
- const qt = l`
3449
+ const Yt = u`
3341
3450
  mutation CreateShopView($id: ID!, $trackerLinkId: ID) {
3342
3451
  createShopView(id: $id, trackerId: $trackerLinkId)
3343
3452
  }
3344
- `, Gt = l`
3453
+ `, Ht = u`
3345
3454
  mutation CreateEventView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
3346
3455
  createEventView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
3347
3456
  }
3348
- `, jt = l`
3457
+ `, Jt = u`
3349
3458
  mutation CreatePackageView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
3350
3459
  createPackageView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
3351
3460
  }
3352
- `, Yt = (n, e, t, i) => n();
3353
- function Ht(n, e = Yt) {
3461
+ `, Qt = (t, e, n, i) => t();
3462
+ function Xt(t, e = Qt) {
3354
3463
  return {
3355
- CreateShopView(t, i, r) {
3356
- return e((s) => n.request({ document: qt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "CreateShopView", "mutation", t);
3464
+ CreateShopView(n, i, r) {
3465
+ return e((s) => t.request({ document: Yt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreateShopView", "mutation", n);
3357
3466
  },
3358
- CreateEventView(t, i, r) {
3359
- return e((s) => n.request({ document: Gt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "CreateEventView", "mutation", t);
3467
+ CreateEventView(n, i, r) {
3468
+ return e((s) => t.request({ document: Ht, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreateEventView", "mutation", n);
3360
3469
  },
3361
- CreatePackageView(t, i, r) {
3362
- return e((s) => n.request({ document: jt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "CreatePackageView", "mutation", t);
3470
+ CreatePackageView(n, i, r) {
3471
+ return e((s) => t.request({ document: Jt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "CreatePackageView", "mutation", n);
3363
3472
  }
3364
3473
  };
3365
3474
  }
3366
- class Jt {
3475
+ class Wt {
3367
3476
  config;
3368
3477
  sdk;
3369
3478
  constructor(e) {
3370
- this.config = e, this.sdk = Ht(new v(e.apiUrl));
3479
+ this.config = e, this.sdk = Xt(new N(e.apiUrl));
3371
3480
  }
3372
- createMetric = async (e, t, i) => {
3373
- switch (!t && !i && await this.sdk.CreateShopView({
3481
+ createMetric = async (e, n, i) => {
3482
+ switch (!n && !i && await this.sdk.CreateShopView({
3374
3483
  id: e,
3375
3484
  trackerLinkId: this.config.trackerId
3376
3485
  }), i) {
3377
- case w.Event:
3486
+ case F.Event:
3378
3487
  await this.sdk.CreateEventView({
3379
3488
  id: e,
3380
- shopId: t,
3489
+ shopId: n,
3381
3490
  trackerLinkId: this.config.trackerId
3382
3491
  });
3383
3492
  break;
3384
- case w.Package:
3493
+ case F.Package:
3385
3494
  await this.sdk.CreatePackageView(
3386
3495
  {
3387
3496
  id: e,
3388
- shopId: t,
3497
+ shopId: n,
3389
3498
  trackerLinkId: this.config.trackerId
3390
3499
  }
3391
3500
  );
@@ -3393,70 +3502,111 @@ class Jt {
3393
3502
  }
3394
3503
  };
3395
3504
  }
3396
- const Qt = "https://api.ticketapp.com/graphql", Z = "TIC_TRACKER_ID";
3397
- class Zt {
3505
+ const Zt = u`
3506
+ query getShopBySlug($slug: String!, $trackerLinkId: String) {
3507
+ findShopBySlug(slug: $slug, promoterId: $trackerLinkId) {
3508
+ id
3509
+ name
3510
+ description
3511
+ filteredLocationIds
3512
+ filteredHostingIds
3513
+ slug
3514
+ enablePromoCode
3515
+ enableDoorTickets
3516
+ removeServiceFee
3517
+ organization {
3518
+ id
3519
+ name
3520
+ logo
3521
+ socials {
3522
+ key
3523
+ value
3524
+ }
3525
+ billing_address_name
3526
+ terms_and_conditions
3527
+ facebook_pixel
3528
+ google_tag
3529
+ seatsIoWorkspaceId
3530
+ }
3531
+ template(trackerId: $trackerLinkId) {
3532
+ type
3533
+ variation
3534
+ backgroundColor
3535
+ primaryColor
3536
+ secondaryColor
3537
+ textColor
3538
+ slogan
3539
+ title
3540
+ notes
3541
+ description
3542
+ banner
3543
+ autoSelectFirstEvent
3544
+ useDarkTheme
3545
+ }
3546
+ blockedLanguages
3547
+ }
3548
+ }
3549
+ `, Kt = (t, e, n, i) => t();
3550
+ function en(t, e = Kt) {
3551
+ return {
3552
+ getShopBySlug(n, i, r) {
3553
+ return e((s) => t.request({ document: Zt, variables: n, requestHeaders: { ...i, ...s }, signal: r }), "getShopBySlug", "query", n);
3554
+ }
3555
+ };
3556
+ }
3557
+ class tn {
3558
+ config;
3559
+ sdk;
3560
+ constructor(e) {
3561
+ this.config = e, this.sdk = en(new N(e.apiUrl));
3562
+ }
3563
+ async getShop(e) {
3564
+ try {
3565
+ this.debugLog("Fetching shop", { slug: e });
3566
+ const n = await this.sdk.getShopBySlug({ slug: e, trackerLinkId: this.config.trackerId });
3567
+ if (this.debugLog("Raw GraphQL response", n), n?.findShopBySlug) {
3568
+ const i = n.findShopBySlug;
3569
+ return this.debugLog("Public Shop fetched"), i;
3570
+ }
3571
+ return null;
3572
+ } catch (n) {
3573
+ throw this.debugLog("Error fetching single Shop", n), n;
3574
+ }
3575
+ }
3576
+ debugLog(e, n) {
3577
+ this.config.debug && console.log(`[ShopService] ${e}`, n || "");
3578
+ }
3579
+ }
3580
+ const nn = "https://api.ticketapp.com/graphql";
3581
+ class an {
3398
3582
  basket;
3399
3583
  event;
3400
3584
  payment;
3401
3585
  package;
3402
3586
  category;
3403
3587
  metric;
3588
+ shop;
3404
3589
  // Attach selected public types to the SDK class
3405
3590
  static Types = Te;
3406
3591
  constructor(e) {
3407
- const { organizationId: t, debug: i = !1, apiUrl: r = Qt } = e, s = this.getOrInitTrackerId();
3408
- this.basket = new kt({ debug: i, apiUrl: r, shopId: e.shopId, trackerId: s }), this.event = new xt({ organizationId: t, debug: i, apiUrl: r, trackerId: s }), this.payment = new _t({ debug: i, apiUrl: r }), this.package = new Bt({ organizationId: t, debug: i, apiUrl: r }), this.category = new zt({ organizationId: t, debug: i, apiUrl: r }), this.metric = new Jt({ apiUrl: r, trackerId: s });
3409
- }
3410
- // Resolve tracker id from (in order): explicit config, URL query, or session storage
3411
- // Persist to session when found via config or URL for subsequent page loads
3412
- getOrInitTrackerId() {
3413
- try {
3414
- let e = null, t = null;
3415
- if (typeof window < "u") {
3416
- try {
3417
- t = new URL(window.location.href).searchParams.get("trackerId");
3418
- } catch {
3419
- }
3420
- try {
3421
- e = window.sessionStorage?.getItem(Z) ?? null;
3422
- } catch {
3423
- }
3424
- }
3425
- if (t && t.trim().length > 0) {
3426
- try {
3427
- typeof window < "u" && window.sessionStorage && sessionStorage.setItem(Z, t);
3428
- } catch {
3429
- }
3430
- return t;
3431
- }
3432
- if (e && e.trim().length > 0) {
3433
- try {
3434
- if (typeof window < "u") {
3435
- const i = new URL(window.location.href);
3436
- i.searchParams.get("trackerId") || (i.searchParams.set("trackerId", e), window.history.replaceState({}, "", i.toString()));
3437
- }
3438
- } catch {
3439
- }
3440
- return e;
3441
- }
3442
- return;
3443
- } catch {
3444
- return;
3445
- }
3592
+ const { organizationId: n, debug: i = !1, apiUrl: r = nn } = e;
3593
+ this.event = new St({ organizationId: n, debug: i, apiUrl: r, trackerId: e.trackerId }), this.package = new Mt({ organizationId: n, debug: i, apiUrl: r }), this.category = new jt({ organizationId: n, debug: i, apiUrl: r }), this.metric = new Wt({ apiUrl: r, trackerId: e.trackerId }), this.shop = new tn({ debug: i, apiUrl: r, trackerId: e.trackerId }), this.basket = new At({ debug: i, apiUrl: r, trackerId: e.trackerId }), this.payment = new Rt({ debug: i, apiUrl: r });
3446
3594
  }
3447
3595
  }
3448
3596
  export {
3449
3597
  T as BasketOrderType,
3450
- oe as DiscountType,
3451
- te as EventStatus,
3452
- w as MetricsType,
3453
- ae as OrderItemType,
3598
+ ae as DiscountType,
3599
+ ee as EventStatus,
3600
+ F as MetricsType,
3601
+ se as OrderItemType,
3454
3602
  R as PackageItemType,
3455
- K as PackageStatus,
3456
- ee as PackageTabType,
3457
- se as PaymentMethodFeeType,
3458
- ie as ProductStatus,
3459
- re as ProductType,
3460
- ne as SortOrder,
3461
- Zt as TicketappSDK
3603
+ Z as PackageStatus,
3604
+ K as PackageTabType,
3605
+ re as PaymentMethodFeeType,
3606
+ ne as ProductStatus,
3607
+ ie as ProductType,
3608
+ oe as ShopTemplateType,
3609
+ ce as ShopVariationType,
3610
+ te as SortOrder,
3611
+ an as TicketappSDK
3462
3612
  };