@ticketapp-dev/shop-sdk 1.0.43 → 1.0.44

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,6 +1,6 @@
1
1
  import { GraphQLClient as v } from "graphql-request";
2
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 || {});
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 || {}), K = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Concept = "CONCEPT", t.Paused = "PAUSED", t.SoldOut = "SOLD_OUT", t))(K || {}), ee = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Inactive = "INACTIVE", t))(ee || {}), te = /* @__PURE__ */ ((t) => (t.Active = "ACTIVE", t.Inactive = "INACTIVE", t.Paused = "PAUSED", t.SoldOut = "SOLD_OUT", t))(te || {}), ne = /* @__PURE__ */ ((t) => (t.Asc = "ASC", t.Desc = "DESC", t))(ne || {}), ie = /* @__PURE__ */ ((t) => (t.AllReserved = "ALL_RESERVED", t.Available = "AVAILABLE", t.SoldOut = "SOLD_OUT", t))(ie || {}), re = /* @__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))(re || {}), se = /* @__PURE__ */ ((t) => (t.FIXED = "FIXED", t.PERCENTAGE = "PERCENTAGE", t))(se || {}), ae = /* @__PURE__ */ ((t) => (t.AddOn = "ADD_ON", t.DeliveryOption = "DELIVERY_OPTION", t.EntranceTicket = "ENTRANCE_TICKET", t))(ae || {}), oe = /* @__PURE__ */ ((t) => (t.Fixed = "FIXED", t.Percentage = "PERCENTAGE", t))(oe || {}), w = /* @__PURE__ */ ((t) => (t.Event = "EVENT", t.Package = "PACKAGE", t))(w || {});
4
4
  const Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
5
  __proto__: null,
6
6
  BasketOrderType: T,
@@ -17,48 +17,48 @@ const Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
17
17
  SortOrder: ne
18
18
  }, Symbol.toStringTag, { value: "Module" }));
19
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]);
20
+ return F = Object.assign || function(n) {
21
+ for (var e, i = 1, r = arguments.length; i < r; i++) {
22
+ e = arguments[i];
23
+ for (var s in e) Object.prototype.hasOwnProperty.call(e, s) && (n[s] = e[s]);
24
24
  }
25
- return e;
25
+ return n;
26
26
  }, F.apply(this, arguments);
27
27
  };
28
- function U(n, e) {
29
- if (!!!n)
30
- throw new Error(e);
28
+ function U(t, n) {
29
+ if (!!!t)
30
+ throw new Error(n);
31
31
  }
32
- function Ae(n) {
33
- return typeof n == "object" && n !== null;
32
+ function Ae(t) {
33
+ return typeof t == "object" && t !== null;
34
34
  }
35
- function Ne(n, e) {
36
- if (!!!n)
35
+ function Ne(t, n) {
36
+ if (!!!t)
37
37
  throw new Error(
38
38
  "Unexpected invariant triggered."
39
39
  );
40
40
  }
41
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)) {
45
- if (typeof r.index == "number" || Ne(!1), r.index >= e)
42
+ function z(t, n) {
43
+ let e = 0, i = 1;
44
+ for (const r of t.body.matchAll(De)) {
45
+ if (typeof r.index == "number" || Ne(!1), r.index >= n)
46
46
  break;
47
- t = r.index + r[0].length, i += 1;
47
+ e = r.index + r[0].length, i += 1;
48
48
  }
49
49
  return {
50
50
  line: i,
51
- column: e + 1 - t
51
+ column: n + 1 - e
52
52
  };
53
53
  }
54
- function ve(n) {
54
+ function ve(t) {
55
55
  return ce(
56
- n.source,
57
- z(n.source, n.start)
56
+ t.source,
57
+ z(t.source, t.start)
58
58
  );
59
59
  }
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}
60
+ function ce(t, n) {
61
+ const e = t.locationOffset.column - 1, i = "".padStart(e) + t.body, r = n.line - 1, s = t.locationOffset.line - 1, o = n.line + s, u = n.line === 1 ? e : 0, h = n.column + u, E = `${t.name}:${o}:${h}
62
62
  `, m = i.split(/\r\n|[\n\r]/g), d = m[r];
63
63
  if (d.length > 120) {
64
64
  const f = Math.floor(h / 80), y = h % 80, p = [];
@@ -79,21 +79,21 @@ function ce(n, e) {
79
79
  [`${o + 1} |`, m[r + 1]]
80
80
  ]);
81
81
  }
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(`
82
+ function Q(t) {
83
+ const n = t.filter(([i, r]) => r !== void 0), e = Math.max(...n.map(([i]) => i.length));
84
+ return n.map(([i, r]) => i.padStart(e) + (r ? " " + r : "")).join(`
85
85
  `);
86
86
  }
87
- function xe(n) {
88
- const e = n[0];
89
- return e == null || "kind" in e || "length" in e ? {
90
- nodes: e,
91
- source: n[1],
92
- positions: n[2],
93
- path: n[3],
94
- originalError: n[4],
95
- extensions: n[5]
96
- } : e;
87
+ function Pe(t) {
88
+ const n = t[0];
89
+ return n == null || "kind" in n || "length" in n ? {
90
+ nodes: n,
91
+ source: t[1],
92
+ positions: t[2],
93
+ path: t[3],
94
+ originalError: t[4],
95
+ extensions: t[5]
96
+ } : n;
97
97
  }
98
98
  class j extends Error {
99
99
  /**
@@ -134,10 +134,10 @@ class j extends Error {
134
134
  /**
135
135
  * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
136
136
  */
137
- constructor(e, ...t) {
137
+ constructor(n, ...e) {
138
138
  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(
139
+ const { nodes: o, source: u, positions: h, path: E, originalError: m, extensions: d } = Pe(e);
140
+ super(n), this.name = "GraphQLError", this.path = E ?? void 0, this.originalError = m ?? void 0, this.nodes = X(
141
141
  Array.isArray(o) ? o : o ? [o] : void 0
142
142
  );
143
143
  const f = X(
@@ -181,36 +181,36 @@ class j extends Error {
181
181
  return "GraphQLError";
182
182
  }
183
183
  toString() {
184
- let e = this.message;
184
+ let n = this.message;
185
185
  if (this.nodes)
186
- for (const t of this.nodes)
187
- t.loc && (e += `
186
+ for (const e of this.nodes)
187
+ e.loc && (n += `
188
188
 
189
- ` + ve(t.loc));
189
+ ` + ve(e.loc));
190
190
  else if (this.source && this.locations)
191
- for (const t of this.locations)
192
- e += `
191
+ for (const e of this.locations)
192
+ n += `
193
193
 
194
- ` + ce(this.source, t);
195
- return e;
194
+ ` + ce(this.source, e);
195
+ return n;
196
196
  }
197
197
  toJSON() {
198
- const e = {
198
+ const n = {
199
199
  message: this.message
200
200
  };
201
- 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;
201
+ return this.locations != null && (n.locations = this.locations), this.path != null && (n.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (n.extensions = this.extensions), n;
202
202
  }
203
203
  }
204
- function X(n) {
205
- return n === void 0 || n.length === 0 ? void 0 : n;
204
+ function X(t) {
205
+ return t === void 0 || t.length === 0 ? void 0 : t;
206
206
  }
207
- function I(n, e, t) {
208
- return new j(`Syntax Error: ${t}`, {
209
- source: n,
210
- positions: [e]
207
+ function I(t, n, e) {
208
+ return new j(`Syntax Error: ${e}`, {
209
+ source: t,
210
+ positions: [n]
211
211
  });
212
212
  }
213
- class Pe {
213
+ class xe {
214
214
  /**
215
215
  * The character offset at which this Node begins.
216
216
  */
@@ -226,8 +226,8 @@ class Pe {
226
226
  /**
227
227
  * The Source document the AST represents.
228
228
  */
229
- constructor(e, t, i) {
230
- this.start = e.start, this.end = t.end, this.startToken = e, this.endToken = t, this.source = i;
229
+ constructor(n, e, i) {
230
+ this.start = n.start, this.end = e.end, this.startToken = n, this.endToken = e, this.source = i;
231
231
  }
232
232
  get [Symbol.toStringTag]() {
233
233
  return "Location";
@@ -266,8 +266,8 @@ class de {
266
266
  * including ignored tokens. <SOF> is always the first node and <EOF>
267
267
  * the last.
268
268
  */
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;
269
+ constructor(n, e, i, r, s, o) {
270
+ this.kind = n, this.start = e, this.end = i, this.line = r, this.column = s, this.value = o, this.prev = null, this.next = null;
271
271
  }
272
272
  get [Symbol.toStringTag]() {
273
273
  return "Token";
@@ -371,55 +371,55 @@ const be = {
371
371
  };
372
372
  new Set(Object.keys(be));
373
373
  var D;
374
- (function(n) {
375
- n.QUERY = "query", n.MUTATION = "mutation", n.SUBSCRIPTION = "subscription";
374
+ (function(t) {
375
+ t.QUERY = "query", t.MUTATION = "mutation", t.SUBSCRIPTION = "subscription";
376
376
  })(D || (D = {}));
377
377
  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";
378
+ (function(t) {
379
+ 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
380
  })(q || (q = {}));
381
381
  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";
382
+ (function(t) {
383
+ 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
384
  })(c || (c = {}));
385
- function Se(n) {
386
- return n === 9 || n === 32;
385
+ function Se(t) {
386
+ return t === 9 || t === 32;
387
387
  }
388
- function S(n) {
389
- return n >= 48 && n <= 57;
388
+ function S(t) {
389
+ return t >= 48 && t <= 57;
390
390
  }
391
- function ue(n) {
392
- return n >= 97 && n <= 122 || // A-Z
393
- n >= 65 && n <= 90;
391
+ function ue(t) {
392
+ return t >= 97 && t <= 122 || // A-Z
393
+ t >= 65 && t <= 90;
394
394
  }
395
- function le(n) {
396
- return ue(n) || n === 95;
395
+ function le(t) {
396
+ return ue(t) || t === 95;
397
397
  }
398
- function Ce(n) {
399
- return ue(n) || S(n) || n === 95;
398
+ function Ce(t) {
399
+ return ue(t) || S(t) || t === 95;
400
400
  }
401
- function _e(n) {
402
- var e;
403
- let t = Number.MAX_SAFE_INTEGER, i = null, r = -1;
404
- for (let o = 0; o < n.length; ++o) {
401
+ function _e(t) {
402
+ var n;
403
+ let e = Number.MAX_SAFE_INTEGER, i = null, r = -1;
404
+ for (let o = 0; o < t.length; ++o) {
405
405
  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));
406
+ const u = t[o], h = Le(u);
407
+ h !== u.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && h < e && (e = h));
408
408
  }
409
- return n.map((o, u) => u === 0 ? o : o.slice(t)).slice(
410
- (e = i) !== null && e !== void 0 ? e : 0,
409
+ return t.map((o, u) => u === 0 ? o : o.slice(e)).slice(
410
+ (n = i) !== null && n !== void 0 ? n : 0,
411
411
  r + 1
412
412
  );
413
413
  }
414
- function Le(n) {
415
- let e = 0;
416
- for (; e < n.length && Se(n.charCodeAt(e)); )
417
- ++e;
418
- return e;
414
+ function Le(t) {
415
+ let n = 0;
416
+ for (; n < t.length && Se(t.charCodeAt(n)); )
417
+ ++n;
418
+ return n;
419
419
  }
420
420
  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";
421
+ (function(t) {
422
+ 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
423
  })(a || (a = {}));
424
424
  class Re {
425
425
  /**
@@ -434,9 +434,9 @@ class Re {
434
434
  /**
435
435
  * The character offset at which the current line begins.
436
436
  */
437
- 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;
437
+ constructor(n) {
438
+ const e = new de(a.SOF, 0, 0, 0, 0);
439
+ this.source = n, this.lastToken = e, this.token = e, this.line = 1, this.lineStart = 0;
440
440
  }
441
441
  get [Symbol.toStringTag]() {
442
442
  return "Lexer";
@@ -452,53 +452,53 @@ class Re {
452
452
  * the state of Lexer.
453
453
  */
454
454
  lookahead() {
455
- let e = this.token;
456
- if (e.kind !== a.EOF)
455
+ let n = this.token;
456
+ if (n.kind !== a.EOF)
457
457
  do
458
- if (e.next)
459
- e = e.next;
458
+ if (n.next)
459
+ n = n.next;
460
460
  else {
461
- const t = Fe(this, e.end);
462
- e.next = t, t.prev = e, e = t;
461
+ const e = Fe(this, n.end);
462
+ n.next = e, e.prev = n, n = e;
463
463
  }
464
- while (e.kind === a.COMMENT);
465
- return e;
464
+ while (n.kind === a.COMMENT);
465
+ return n;
466
466
  }
467
467
  }
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;
468
+ function we(t) {
469
+ 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
470
  }
471
- function x(n) {
472
- return n >= 0 && n <= 55295 || n >= 57344 && n <= 1114111;
471
+ function P(t) {
472
+ return t >= 0 && t <= 55295 || t >= 57344 && t <= 1114111;
473
473
  }
474
- function B(n, e) {
475
- return he(n.charCodeAt(e)) && pe(n.charCodeAt(e + 1));
474
+ function B(t, n) {
475
+ return he(t.charCodeAt(n)) && pe(t.charCodeAt(n + 1));
476
476
  }
477
- function he(n) {
478
- return n >= 55296 && n <= 56319;
477
+ function he(t) {
478
+ return t >= 55296 && t <= 56319;
479
479
  }
480
- function pe(n) {
481
- return n >= 56320 && n <= 57343;
480
+ function pe(t) {
481
+ return t >= 56320 && t <= 57343;
482
482
  }
483
- function N(n, e) {
484
- const t = n.source.body.codePointAt(e);
485
- if (t === void 0)
483
+ function N(t, n) {
484
+ const e = t.source.body.codePointAt(n);
485
+ if (e === void 0)
486
486
  return a.EOF;
487
- if (t >= 32 && t <= 126) {
488
- const i = String.fromCodePoint(t);
487
+ if (e >= 32 && e <= 126) {
488
+ const i = String.fromCodePoint(e);
489
489
  return i === '"' ? `'"'` : `"${i}"`;
490
490
  }
491
- return "U+" + t.toString(16).toUpperCase().padStart(4, "0");
491
+ return "U+" + e.toString(16).toUpperCase().padStart(4, "0");
492
492
  }
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);
493
+ function g(t, n, e, i, r) {
494
+ const s = t.line, o = 1 + e - t.lineStart;
495
+ return new de(n, e, i, s, o, r);
496
496
  }
497
- function Fe(n, e) {
498
- const t = n.source.body, i = t.length;
499
- let r = e;
497
+ function Fe(t, n) {
498
+ const e = t.source.body, i = e.length;
499
+ let r = n;
500
500
  for (; r < i; ) {
501
- const s = t.charCodeAt(r);
501
+ const s = e.charCodeAt(r);
502
502
  switch (s) {
503
503
  // Ignored ::
504
504
  // - UnicodeBOM
@@ -528,14 +528,14 @@ function Fe(n, e) {
528
528
  // - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
529
529
  // - "Carriage Return (U+000D)" "New Line (U+000A)"
530
530
  case 10:
531
- ++r, ++n.line, n.lineStart = r;
531
+ ++r, ++t.line, t.lineStart = r;
532
532
  continue;
533
533
  case 13:
534
- t.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++n.line, n.lineStart = r;
534
+ e.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++t.line, t.lineStart = r;
535
535
  continue;
536
536
  // Comment
537
537
  case 35:
538
- return $e(n, r);
538
+ return $e(t, r);
539
539
  // Token ::
540
540
  // - Punctuator
541
541
  // - Name
@@ -545,159 +545,159 @@ function Fe(n, e) {
545
545
  //
546
546
  // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
547
547
  case 33:
548
- return g(n, a.BANG, r, r + 1);
548
+ return g(t, a.BANG, r, r + 1);
549
549
  case 36:
550
- return g(n, a.DOLLAR, r, r + 1);
550
+ return g(t, a.DOLLAR, r, r + 1);
551
551
  case 38:
552
- return g(n, a.AMP, r, r + 1);
552
+ return g(t, a.AMP, r, r + 1);
553
553
  case 40:
554
- return g(n, a.PAREN_L, r, r + 1);
554
+ return g(t, a.PAREN_L, r, r + 1);
555
555
  case 41:
556
- return g(n, a.PAREN_R, r, r + 1);
556
+ return g(t, a.PAREN_R, r, r + 1);
557
557
  case 46:
558
- if (t.charCodeAt(r + 1) === 46 && t.charCodeAt(r + 2) === 46)
559
- return g(n, a.SPREAD, r, r + 3);
558
+ if (e.charCodeAt(r + 1) === 46 && e.charCodeAt(r + 2) === 46)
559
+ return g(t, a.SPREAD, r, r + 3);
560
560
  break;
561
561
  case 58:
562
- return g(n, a.COLON, r, r + 1);
562
+ return g(t, a.COLON, r, r + 1);
563
563
  case 61:
564
- return g(n, a.EQUALS, r, r + 1);
564
+ return g(t, a.EQUALS, r, r + 1);
565
565
  case 64:
566
- return g(n, a.AT, r, r + 1);
566
+ return g(t, a.AT, r, r + 1);
567
567
  case 91:
568
- return g(n, a.BRACKET_L, r, r + 1);
568
+ return g(t, a.BRACKET_L, r, r + 1);
569
569
  case 93:
570
- return g(n, a.BRACKET_R, r, r + 1);
570
+ return g(t, a.BRACKET_R, r, r + 1);
571
571
  case 123:
572
- return g(n, a.BRACE_L, r, r + 1);
572
+ return g(t, a.BRACE_L, r, r + 1);
573
573
  case 124:
574
- return g(n, a.PIPE, r, r + 1);
574
+ return g(t, a.PIPE, r, r + 1);
575
575
  case 125:
576
- return g(n, a.BRACE_R, r, r + 1);
576
+ return g(t, a.BRACE_R, r, r + 1);
577
577
  // StringValue
578
578
  case 34:
579
- return t.charCodeAt(r + 1) === 34 && t.charCodeAt(r + 2) === 34 ? qe(n, r) : Ve(n, r);
579
+ return e.charCodeAt(r + 1) === 34 && e.charCodeAt(r + 2) === 34 ? qe(t, r) : Ve(t, r);
580
580
  }
581
581
  if (S(s) || s === 45)
582
- return Be(n, r, s);
582
+ return Be(t, r, s);
583
583
  if (le(s))
584
- return Ge(n, r);
584
+ return Ge(t, r);
585
585
  throw I(
586
- n.source,
586
+ t.source,
587
587
  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)}.`
588
+ s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : P(s) || B(e, r) ? `Unexpected character: ${N(t, r)}.` : `Invalid character: ${N(t, r)}.`
589
589
  );
590
590
  }
591
- return g(n, a.EOF, i, i);
591
+ return g(t, a.EOF, i, i);
592
592
  }
593
- function $e(n, e) {
594
- const t = n.source.body, i = t.length;
595
- let r = e + 1;
593
+ function $e(t, n) {
594
+ const e = t.source.body, i = e.length;
595
+ let r = n + 1;
596
596
  for (; r < i; ) {
597
- const s = t.charCodeAt(r);
597
+ const s = e.charCodeAt(r);
598
598
  if (s === 10 || s === 13)
599
599
  break;
600
- if (x(s))
600
+ if (P(s))
601
601
  ++r;
602
- else if (B(t, r))
602
+ else if (B(e, r))
603
603
  r += 2;
604
604
  else
605
605
  break;
606
606
  }
607
607
  return g(
608
- n,
608
+ t,
609
609
  a.COMMENT,
610
- e,
610
+ n,
611
611
  r,
612
- t.slice(e + 1, r)
612
+ e.slice(n + 1, r)
613
613
  );
614
614
  }
615
- function Be(n, e, t) {
616
- const i = n.source.body;
617
- let r = e, s = t, o = !1;
615
+ function Be(t, n, e) {
616
+ const i = t.source.body;
617
+ let r = n, s = e, o = !1;
618
618
  if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
619
619
  if (s = i.charCodeAt(++r), S(s))
620
620
  throw I(
621
- n.source,
621
+ t.source,
622
622
  r,
623
623
  `Invalid number, unexpected digit after 0: ${N(
624
- n,
624
+ t,
625
625
  r
626
626
  )}.`
627
627
  );
628
628
  } 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))
629
+ r = M(t, r, s), s = i.charCodeAt(r);
630
+ 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 || le(s))
631
631
  throw I(
632
- n.source,
632
+ t.source,
633
633
  r,
634
634
  `Invalid number, expected digit but got: ${N(
635
- n,
635
+ t,
636
636
  r
637
637
  )}.`
638
638
  );
639
639
  return g(
640
- n,
640
+ t,
641
641
  o ? a.FLOAT : a.INT,
642
- e,
642
+ n,
643
643
  r,
644
- i.slice(e, r)
644
+ i.slice(n, r)
645
645
  );
646
646
  }
647
- function M(n, e, t) {
648
- if (!S(t))
647
+ function M(t, n, e) {
648
+ if (!S(e))
649
649
  throw I(
650
- n.source,
651
- e,
650
+ t.source,
651
+ n,
652
652
  `Invalid number, expected digit but got: ${N(
653
- n,
654
- e
653
+ t,
654
+ n
655
655
  )}.`
656
656
  );
657
- const i = n.source.body;
658
- let r = e + 1;
657
+ const i = t.source.body;
658
+ let r = n + 1;
659
659
  for (; S(i.charCodeAt(r)); )
660
660
  ++r;
661
661
  return r;
662
662
  }
663
- function Ve(n, e) {
664
- const t = n.source.body, i = t.length;
665
- let r = e + 1, s = r, o = "";
663
+ function Ve(t, n) {
664
+ const e = t.source.body, i = e.length;
665
+ let r = n + 1, s = r, o = "";
666
666
  for (; r < i; ) {
667
- const u = t.charCodeAt(r);
667
+ const u = e.charCodeAt(r);
668
668
  if (u === 34)
669
- return o += t.slice(s, r), g(n, a.STRING, e, r + 1, o);
669
+ return o += e.slice(s, r), g(t, a.STRING, n, r + 1, o);
670
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);
671
+ o += e.slice(s, r);
672
+ const h = e.charCodeAt(r + 1) === 117 ? e.charCodeAt(r + 2) === 123 ? Ue(t, r) : Me(t, r) : ze(t, r);
673
673
  o += h.value, r += h.size, s = r;
674
674
  continue;
675
675
  }
676
676
  if (u === 10 || u === 13)
677
677
  break;
678
- if (x(u))
678
+ if (P(u))
679
679
  ++r;
680
- else if (B(t, r))
680
+ else if (B(e, r))
681
681
  r += 2;
682
682
  else
683
683
  throw I(
684
- n.source,
684
+ t.source,
685
685
  r,
686
686
  `Invalid character within String: ${N(
687
- n,
687
+ t,
688
688
  r
689
689
  )}.`
690
690
  );
691
691
  }
692
- throw I(n.source, r, "Unterminated string.");
692
+ throw I(t.source, r, "Unterminated string.");
693
693
  }
694
- function Ue(n, e) {
695
- const t = n.source.body;
694
+ function Ue(t, n) {
695
+ const e = t.source.body;
696
696
  let i = 0, r = 3;
697
697
  for (; r < 12; ) {
698
- const s = t.charCodeAt(e + r++);
698
+ const s = e.charCodeAt(n + r++);
699
699
  if (s === 125) {
700
- if (r < 5 || !x(i))
700
+ if (r < 5 || !P(i))
701
701
  break;
702
702
  return {
703
703
  value: String.fromCodePoint(i),
@@ -708,23 +708,23 @@ function Ue(n, e) {
708
708
  break;
709
709
  }
710
710
  throw I(
711
- n.source,
712
- e,
713
- `Invalid Unicode escape sequence: "${t.slice(
714
- e,
715
- e + r
711
+ t.source,
712
+ n,
713
+ `Invalid Unicode escape sequence: "${e.slice(
714
+ n,
715
+ n + r
716
716
  )}".`
717
717
  );
718
718
  }
719
- function Me(n, e) {
720
- const t = n.source.body, i = W(t, e + 2);
721
- if (x(i))
719
+ function Me(t, n) {
720
+ const e = t.source.body, i = W(e, n + 2);
721
+ if (P(i))
722
722
  return {
723
723
  value: String.fromCodePoint(i),
724
724
  size: 6
725
725
  };
726
- if (he(i) && t.charCodeAt(e + 6) === 92 && t.charCodeAt(e + 7) === 117) {
727
- const r = W(t, e + 8);
726
+ if (he(i) && e.charCodeAt(n + 6) === 92 && e.charCodeAt(n + 7) === 117) {
727
+ const r = W(e, n + 8);
728
728
  if (pe(r))
729
729
  return {
730
730
  value: String.fromCodePoint(i, r),
@@ -732,20 +732,20 @@ function Me(n, e) {
732
732
  };
733
733
  }
734
734
  throw I(
735
- n.source,
736
- e,
737
- `Invalid Unicode escape sequence: "${t.slice(e, e + 6)}".`
735
+ t.source,
736
+ n,
737
+ `Invalid Unicode escape sequence: "${e.slice(n, n + 6)}".`
738
738
  );
739
739
  }
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));
740
+ function W(t, n) {
741
+ return b(t.charCodeAt(n)) << 12 | b(t.charCodeAt(n + 1)) << 8 | b(t.charCodeAt(n + 2)) << 4 | b(t.charCodeAt(n + 3));
742
742
  }
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;
743
+ function b(t) {
744
+ return t >= 48 && t <= 57 ? t - 48 : t >= 65 && t <= 70 ? t - 55 : t >= 97 && t <= 102 ? t - 87 : -1;
745
745
  }
746
- function ze(n, e) {
747
- const t = n.source.body;
748
- switch (t.charCodeAt(e + 1)) {
746
+ function ze(t, n) {
747
+ const e = t.source.body;
748
+ switch (e.charCodeAt(n + 1)) {
749
749
  case 34:
750
750
  return {
751
751
  value: '"',
@@ -789,150 +789,150 @@ function ze(n, e) {
789
789
  };
790
790
  }
791
791
  throw I(
792
- n.source,
793
- e,
794
- `Invalid character escape sequence: "${t.slice(
795
- e,
796
- e + 2
792
+ t.source,
793
+ n,
794
+ `Invalid character escape sequence: "${e.slice(
795
+ n,
796
+ n + 2
797
797
  )}".`
798
798
  );
799
799
  }
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 = "";
800
+ function qe(t, n) {
801
+ const e = t.source.body, i = e.length;
802
+ let r = t.lineStart, s = n + 3, o = s, u = "";
803
803
  const h = [];
804
804
  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);
805
+ const E = e.charCodeAt(s);
806
+ if (E === 34 && e.charCodeAt(s + 1) === 34 && e.charCodeAt(s + 2) === 34) {
807
+ u += e.slice(o, s), h.push(u);
808
808
  const m = g(
809
- n,
809
+ t,
810
810
  a.BLOCK_STRING,
811
- e,
811
+ n,
812
812
  s + 3,
813
813
  // Return a string of the lines joined with U+000A.
814
814
  _e(h).join(`
815
815
  `)
816
816
  );
817
- return n.line += h.length - 1, n.lineStart = r, m;
817
+ return t.line += h.length - 1, t.lineStart = r, m;
818
818
  }
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;
819
+ if (E === 92 && e.charCodeAt(s + 1) === 34 && e.charCodeAt(s + 2) === 34 && e.charCodeAt(s + 3) === 34) {
820
+ u += e.slice(o, s), o = s + 1, s += 4;
821
821
  continue;
822
822
  }
823
823
  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;
824
+ u += e.slice(o, s), h.push(u), E === 13 && e.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", o = s, r = s;
825
825
  continue;
826
826
  }
827
- if (x(E))
827
+ if (P(E))
828
828
  ++s;
829
- else if (B(t, s))
829
+ else if (B(e, s))
830
830
  s += 2;
831
831
  else
832
832
  throw I(
833
- n.source,
833
+ t.source,
834
834
  s,
835
835
  `Invalid character within String: ${N(
836
- n,
836
+ t,
837
837
  s
838
838
  )}.`
839
839
  );
840
840
  }
841
- throw I(n.source, s, "Unterminated string.");
841
+ throw I(t.source, s, "Unterminated string.");
842
842
  }
843
- function Ge(n, e) {
844
- const t = n.source.body, i = t.length;
845
- let r = e + 1;
843
+ function Ge(t, n) {
844
+ const e = t.source.body, i = e.length;
845
+ let r = n + 1;
846
846
  for (; r < i; ) {
847
- const s = t.charCodeAt(r);
847
+ const s = e.charCodeAt(r);
848
848
  if (Ce(s))
849
849
  ++r;
850
850
  else
851
851
  break;
852
852
  }
853
853
  return g(
854
- n,
854
+ t,
855
855
  a.NAME,
856
- e,
856
+ n,
857
857
  r,
858
- t.slice(e, r)
858
+ e.slice(n, r)
859
859
  );
860
860
  }
861
861
  const je = 10, me = 2;
862
- function fe(n) {
863
- return V(n, []);
862
+ function fe(t) {
863
+ return V(t, []);
864
864
  }
865
- function V(n, e) {
866
- switch (typeof n) {
865
+ function V(t, n) {
866
+ switch (typeof t) {
867
867
  case "string":
868
- return JSON.stringify(n);
868
+ return JSON.stringify(t);
869
869
  case "function":
870
- return n.name ? `[function ${n.name}]` : "[function]";
870
+ return t.name ? `[function ${t.name}]` : "[function]";
871
871
  case "object":
872
- return Ye(n, e);
872
+ return Ye(t, n);
873
873
  default:
874
- return String(n);
874
+ return String(t);
875
875
  }
876
876
  }
877
- function Ye(n, e) {
878
- if (n === null)
877
+ function Ye(t, n) {
878
+ if (t === null)
879
879
  return "null";
880
- if (e.includes(n))
880
+ if (n.includes(t))
881
881
  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(
897
- ([r, s]) => r + ": " + V(s, e)
882
+ const e = [...n, t];
883
+ if (He(t)) {
884
+ const i = t.toJSON();
885
+ if (i !== t)
886
+ return typeof i == "string" ? i : V(i, e);
887
+ } else if (Array.isArray(t))
888
+ return Qe(t, e);
889
+ return Je(t, e);
890
+ }
891
+ function He(t) {
892
+ return typeof t.toJSON == "function";
893
+ }
894
+ function Je(t, n) {
895
+ const e = Object.entries(t);
896
+ return e.length === 0 ? "{}" : n.length > me ? "[" + Xe(t) + "]" : "{ " + e.map(
897
+ ([r, s]) => r + ": " + V(s, n)
898
898
  ).join(", ") + " }";
899
899
  }
900
- function Qe(n, e) {
901
- if (n.length === 0)
900
+ function Qe(t, n) {
901
+ if (t.length === 0)
902
902
  return "[]";
903
- if (e.length > me)
903
+ if (n.length > me)
904
904
  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));
905
+ const e = Math.min(je, t.length), i = t.length - e, r = [];
906
+ for (let s = 0; s < e; ++s)
907
+ r.push(V(t[s], n));
908
908
  return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
909
909
  }
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;
910
+ function Xe(t) {
911
+ const n = Object.prototype.toString.call(t).replace(/^\[object /, "").replace(/]$/, "");
912
+ if (n === "Object" && typeof t.constructor == "function") {
913
+ const e = t.constructor.name;
914
+ if (typeof e == "string" && e !== "")
915
+ return e;
916
916
  }
917
- return e;
917
+ return n;
918
918
  }
919
919
  const We = globalThis.process && // eslint-disable-next-line no-undef
920
920
  process.env.NODE_ENV === "production", Ze = (
921
921
  /* c8 ignore next 6 */
922
922
  // 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)
923
+ We ? function(n, e) {
924
+ return n instanceof e;
925
+ } : function(n, e) {
926
+ if (n instanceof e)
927
927
  return !0;
928
- if (typeof e == "object" && e !== null) {
928
+ if (typeof n == "object" && n !== null) {
929
929
  var i;
930
- const r = t.prototype[Symbol.toStringTag], s = (
930
+ const r = e.prototype[Symbol.toStringTag], s = (
931
931
  // We still need to support constructor's name to detect conflicts with older versions of this library.
932
- Symbol.toStringTag in e ? e[Symbol.toStringTag] : (i = e.constructor) === null || i === void 0 ? void 0 : i.name
932
+ Symbol.toStringTag in n ? n[Symbol.toStringTag] : (i = n.constructor) === null || i === void 0 ? void 0 : i.name
933
933
  );
934
934
  if (r === s) {
935
- const o = fe(e);
935
+ const o = fe(n);
936
936
  throw new Error(`Cannot use ${r} "${o}" from another module or realm.
937
937
 
938
938
  Ensure that there is only one instance of "graphql" in the node_modules
@@ -951,11 +951,11 @@ spurious results.`);
951
951
  }
952
952
  );
953
953
  class ge {
954
- constructor(e, t = "GraphQL request", i = {
954
+ constructor(n, e = "GraphQL request", i = {
955
955
  line: 1,
956
956
  column: 1
957
957
  }) {
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(
958
+ typeof n == "string" || U(!1, `Body must be a string. Received: ${fe(n)}.`), this.body = n, this.name = e, this.locationOffset = i, this.locationOffset.line > 0 || U(
959
959
  !1,
960
960
  "line in locationOffset is 1-indexed and must be positive."
961
961
  ), this.locationOffset.column > 0 || U(
@@ -967,23 +967,23 @@ class ge {
967
967
  return "Source";
968
968
  }
969
969
  }
970
- function Ke(n) {
971
- return Ze(n, ge);
970
+ function Ke(t) {
971
+ return Ze(t, ge);
972
972
  }
973
- function et(n, e) {
974
- const t = new tt(n, e), i = t.parseDocument();
973
+ function et(t, n) {
974
+ const e = new tt(t, n), i = e.parseDocument();
975
975
  return Object.defineProperty(i, "tokenCount", {
976
976
  enumerable: !1,
977
- value: t.tokenCount
977
+ value: e.tokenCount
978
978
  }), i;
979
979
  }
980
980
  class tt {
981
- constructor(e, t = {}) {
982
- const { lexer: i, ...r } = t;
981
+ constructor(n, e = {}) {
982
+ const { lexer: i, ...r } = e;
983
983
  if (i)
984
984
  this._lexer = i;
985
985
  else {
986
- const s = Ke(e) ? e : new ge(e);
986
+ const s = Ke(n) ? n : new ge(n);
987
987
  this._lexer = new Re(s);
988
988
  }
989
989
  this._options = r, this._tokenCounter = 0;
@@ -995,10 +995,10 @@ class tt {
995
995
  * Converts a name lex token into a name parse node.
996
996
  */
997
997
  parseName() {
998
- const e = this.expectToken(a.NAME);
999
- return this.node(e, {
998
+ const n = this.expectToken(a.NAME);
999
+ return this.node(n, {
1000
1000
  kind: c.NAME,
1001
- value: e.value
1001
+ value: n.value
1002
1002
  });
1003
1003
  }
1004
1004
  // Implements the parsing rules in the Document section.
@@ -1041,15 +1041,15 @@ class tt {
1041
1041
  parseDefinition() {
1042
1042
  if (this.peek(a.BRACE_L))
1043
1043
  return this.parseOperationDefinition();
1044
- const e = this.peekDescription(), t = e ? this._lexer.lookahead() : this._lexer.token;
1045
- if (e && t.kind === a.BRACE_L)
1044
+ const n = this.peekDescription(), e = n ? this._lexer.lookahead() : this._lexer.token;
1045
+ if (n && e.kind === a.BRACE_L)
1046
1046
  throw I(
1047
1047
  this._lexer.source,
1048
1048
  this._lexer.token.start,
1049
1049
  "Unexpected description, descriptions are not supported on shorthand queries."
1050
1050
  );
1051
- if (t.kind === a.NAME) {
1052
- switch (t.value) {
1051
+ if (e.kind === a.NAME) {
1052
+ switch (e.value) {
1053
1053
  case "schema":
1054
1054
  return this.parseSchemaDefinition();
1055
1055
  case "scalar":
@@ -1067,7 +1067,7 @@ class tt {
1067
1067
  case "directive":
1068
1068
  return this.parseDirectiveDefinition();
1069
1069
  }
1070
- switch (t.value) {
1070
+ switch (e.value) {
1071
1071
  case "query":
1072
1072
  case "mutation":
1073
1073
  case "subscription":
@@ -1075,16 +1075,16 @@ class tt {
1075
1075
  case "fragment":
1076
1076
  return this.parseFragmentDefinition();
1077
1077
  }
1078
- if (e)
1078
+ if (n)
1079
1079
  throw I(
1080
1080
  this._lexer.source,
1081
1081
  this._lexer.token.start,
1082
1082
  "Unexpected description, only GraphQL definitions support descriptions."
1083
1083
  );
1084
- if (t.value === "extend")
1084
+ if (e.value === "extend")
1085
1085
  return this.parseTypeSystemExtension();
1086
1086
  }
1087
- throw this.unexpected(t);
1087
+ throw this.unexpected(e);
1088
1088
  }
1089
1089
  // Implements the parsing rules in the Operations section.
1090
1090
  /**
@@ -1093,9 +1093,9 @@ class tt {
1093
1093
  * - OperationType Name? VariableDefinitions? Directives? SelectionSet
1094
1094
  */
1095
1095
  parseOperationDefinition() {
1096
- const e = this._lexer.token;
1096
+ const n = this._lexer.token;
1097
1097
  if (this.peek(a.BRACE_L))
1098
- return this.node(e, {
1098
+ return this.node(n, {
1099
1099
  kind: c.OPERATION_DEFINITION,
1100
1100
  operation: D.QUERY,
1101
1101
  description: void 0,
@@ -1104,12 +1104,12 @@ class tt {
1104
1104
  directives: [],
1105
1105
  selectionSet: this.parseSelectionSet()
1106
1106
  });
1107
- const t = this.parseDescription(), i = this.parseOperationType();
1107
+ const e = this.parseDescription(), i = this.parseOperationType();
1108
1108
  let r;
1109
- return this.peek(a.NAME) && (r = this.parseName()), this.node(e, {
1109
+ return this.peek(a.NAME) && (r = this.parseName()), this.node(n, {
1110
1110
  kind: c.OPERATION_DEFINITION,
1111
1111
  operation: i,
1112
- description: t,
1112
+ description: e,
1113
1113
  name: r,
1114
1114
  variableDefinitions: this.parseVariableDefinitions(),
1115
1115
  directives: this.parseDirectives(!1),
@@ -1120,8 +1120,8 @@ class tt {
1120
1120
  * OperationType : one of query mutation subscription
1121
1121
  */
1122
1122
  parseOperationType() {
1123
- const e = this.expectToken(a.NAME);
1124
- switch (e.value) {
1123
+ const n = this.expectToken(a.NAME);
1124
+ switch (n.value) {
1125
1125
  case "query":
1126
1126
  return D.QUERY;
1127
1127
  case "mutation":
@@ -1129,7 +1129,7 @@ class tt {
1129
1129
  case "subscription":
1130
1130
  return D.SUBSCRIPTION;
1131
1131
  }
1132
- throw this.unexpected(e);
1132
+ throw this.unexpected(n);
1133
1133
  }
1134
1134
  /**
1135
1135
  * VariableDefinitions : ( VariableDefinition+ )
@@ -1158,8 +1158,8 @@ class tt {
1158
1158
  * Variable : $ Name
1159
1159
  */
1160
1160
  parseVariable() {
1161
- const e = this._lexer.token;
1162
- return this.expectToken(a.DOLLAR), this.node(e, {
1161
+ const n = this._lexer.token;
1162
+ return this.expectToken(a.DOLLAR), this.node(n, {
1163
1163
  kind: c.VARIABLE,
1164
1164
  name: this.parseName()
1165
1165
  });
@@ -1194,9 +1194,9 @@ class tt {
1194
1194
  * Alias : Name :
1195
1195
  */
1196
1196
  parseField() {
1197
- const e = this._lexer.token, t = this.parseName();
1197
+ const n = this._lexer.token, e = this.parseName();
1198
1198
  let i, r;
1199
- return this.expectOptionalToken(a.COLON) ? (i = t, r = this.parseName()) : r = t, this.node(e, {
1199
+ return this.expectOptionalToken(a.COLON) ? (i = e, r = this.parseName()) : r = e, this.node(n, {
1200
1200
  kind: c.FIELD,
1201
1201
  alias: i,
1202
1202
  name: r,
@@ -1208,19 +1208,19 @@ class tt {
1208
1208
  /**
1209
1209
  * Arguments[Const] : ( Argument[?Const]+ )
1210
1210
  */
1211
- parseArguments(e) {
1212
- const t = e ? this.parseConstArgument : this.parseArgument;
1213
- return this.optionalMany(a.PAREN_L, t, a.PAREN_R);
1211
+ parseArguments(n) {
1212
+ const e = n ? this.parseConstArgument : this.parseArgument;
1213
+ return this.optionalMany(a.PAREN_L, e, a.PAREN_R);
1214
1214
  }
1215
1215
  /**
1216
1216
  * Argument[Const] : Name : Value[?Const]
1217
1217
  */
1218
- parseArgument(e = !1) {
1219
- const t = this._lexer.token, i = this.parseName();
1220
- return this.expectToken(a.COLON), this.node(t, {
1218
+ parseArgument(n = !1) {
1219
+ const e = this._lexer.token, i = this.parseName();
1220
+ return this.expectToken(a.COLON), this.node(e, {
1221
1221
  kind: c.ARGUMENT,
1222
1222
  name: i,
1223
- value: this.parseValueLiteral(e)
1223
+ value: this.parseValueLiteral(n)
1224
1224
  });
1225
1225
  }
1226
1226
  parseConstArgument() {
@@ -1235,16 +1235,16 @@ class tt {
1235
1235
  * InlineFragment : ... TypeCondition? Directives? SelectionSet
1236
1236
  */
1237
1237
  parseFragment() {
1238
- const e = this._lexer.token;
1238
+ const n = this._lexer.token;
1239
1239
  this.expectToken(a.SPREAD);
1240
- const t = this.expectOptionalKeyword("on");
1241
- return !t && this.peek(a.NAME) ? this.node(e, {
1240
+ const e = this.expectOptionalKeyword("on");
1241
+ return !e && this.peek(a.NAME) ? this.node(n, {
1242
1242
  kind: c.FRAGMENT_SPREAD,
1243
1243
  name: this.parseFragmentName(),
1244
1244
  directives: this.parseDirectives(!1)
1245
- }) : this.node(e, {
1245
+ }) : this.node(n, {
1246
1246
  kind: c.INLINE_FRAGMENT,
1247
- typeCondition: t ? this.parseNamedType() : void 0,
1247
+ typeCondition: e ? this.parseNamedType() : void 0,
1248
1248
  directives: this.parseDirectives(!1),
1249
1249
  selectionSet: this.parseSelectionSet()
1250
1250
  });
@@ -1256,18 +1256,18 @@ class tt {
1256
1256
  * TypeCondition : NamedType
1257
1257
  */
1258
1258
  parseFragmentDefinition() {
1259
- const e = this._lexer.token, t = this.parseDescription();
1260
- return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(e, {
1259
+ const n = this._lexer.token, e = this.parseDescription();
1260
+ return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(n, {
1261
1261
  kind: c.FRAGMENT_DEFINITION,
1262
- description: t,
1262
+ description: e,
1263
1263
  name: this.parseFragmentName(),
1264
1264
  variableDefinitions: this.parseVariableDefinitions(),
1265
1265
  typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
1266
1266
  directives: this.parseDirectives(!1),
1267
1267
  selectionSet: this.parseSelectionSet()
1268
- }) : this.node(e, {
1268
+ }) : this.node(n, {
1269
1269
  kind: c.FRAGMENT_DEFINITION,
1270
- description: t,
1270
+ description: e,
1271
1271
  name: this.parseFragmentName(),
1272
1272
  typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
1273
1273
  directives: this.parseDirectives(!1),
@@ -1301,59 +1301,59 @@ class tt {
1301
1301
  *
1302
1302
  * EnumValue : Name but not `true`, `false` or `null`
1303
1303
  */
1304
- parseValueLiteral(e) {
1305
- const t = this._lexer.token;
1306
- switch (t.kind) {
1304
+ parseValueLiteral(n) {
1305
+ const e = this._lexer.token;
1306
+ switch (e.kind) {
1307
1307
  case a.BRACKET_L:
1308
- return this.parseList(e);
1308
+ return this.parseList(n);
1309
1309
  case a.BRACE_L:
1310
- return this.parseObject(e);
1310
+ return this.parseObject(n);
1311
1311
  case a.INT:
1312
- return this.advanceLexer(), this.node(t, {
1312
+ return this.advanceLexer(), this.node(e, {
1313
1313
  kind: c.INT,
1314
- value: t.value
1314
+ value: e.value
1315
1315
  });
1316
1316
  case a.FLOAT:
1317
- return this.advanceLexer(), this.node(t, {
1317
+ return this.advanceLexer(), this.node(e, {
1318
1318
  kind: c.FLOAT,
1319
- value: t.value
1319
+ value: e.value
1320
1320
  });
1321
1321
  case a.STRING:
1322
1322
  case a.BLOCK_STRING:
1323
1323
  return this.parseStringLiteral();
1324
1324
  case a.NAME:
1325
- switch (this.advanceLexer(), t.value) {
1325
+ switch (this.advanceLexer(), e.value) {
1326
1326
  case "true":
1327
- return this.node(t, {
1327
+ return this.node(e, {
1328
1328
  kind: c.BOOLEAN,
1329
1329
  value: !0
1330
1330
  });
1331
1331
  case "false":
1332
- return this.node(t, {
1332
+ return this.node(e, {
1333
1333
  kind: c.BOOLEAN,
1334
1334
  value: !1
1335
1335
  });
1336
1336
  case "null":
1337
- return this.node(t, {
1337
+ return this.node(e, {
1338
1338
  kind: c.NULL
1339
1339
  });
1340
1340
  default:
1341
- return this.node(t, {
1341
+ return this.node(e, {
1342
1342
  kind: c.ENUM,
1343
- value: t.value
1343
+ value: e.value
1344
1344
  });
1345
1345
  }
1346
1346
  case a.DOLLAR:
1347
- if (e)
1347
+ if (n)
1348
1348
  if (this.expectToken(a.DOLLAR), this._lexer.token.kind === a.NAME) {
1349
1349
  const i = this._lexer.token.value;
1350
1350
  throw I(
1351
1351
  this._lexer.source,
1352
- t.start,
1352
+ e.start,
1353
1353
  `Unexpected variable "$${i}" in constant value.`
1354
1354
  );
1355
1355
  } else
1356
- throw this.unexpected(t);
1356
+ throw this.unexpected(e);
1357
1357
  return this.parseVariable();
1358
1358
  default:
1359
1359
  throw this.unexpected();
@@ -1363,11 +1363,11 @@ class tt {
1363
1363
  return this.parseValueLiteral(!0);
1364
1364
  }
1365
1365
  parseStringLiteral() {
1366
- const e = this._lexer.token;
1367
- return this.advanceLexer(), this.node(e, {
1366
+ const n = this._lexer.token;
1367
+ return this.advanceLexer(), this.node(n, {
1368
1368
  kind: c.STRING,
1369
- value: e.value,
1370
- block: e.kind === a.BLOCK_STRING
1369
+ value: n.value,
1370
+ block: n.kind === a.BLOCK_STRING
1371
1371
  });
1372
1372
  }
1373
1373
  /**
@@ -1375,11 +1375,11 @@ class tt {
1375
1375
  * - [ ]
1376
1376
  * - [ Value[?Const]+ ]
1377
1377
  */
1378
- parseList(e) {
1379
- const t = () => this.parseValueLiteral(e);
1378
+ parseList(n) {
1379
+ const e = () => this.parseValueLiteral(n);
1380
1380
  return this.node(this._lexer.token, {
1381
1381
  kind: c.LIST,
1382
- values: this.any(a.BRACKET_L, t, a.BRACKET_R)
1382
+ values: this.any(a.BRACKET_L, e, a.BRACKET_R)
1383
1383
  });
1384
1384
  }
1385
1385
  /**
@@ -1389,33 +1389,33 @@ class tt {
1389
1389
  * - { ObjectField[?Const]+ }
1390
1390
  * ```
1391
1391
  */
1392
- parseObject(e) {
1393
- const t = () => this.parseObjectField(e);
1392
+ parseObject(n) {
1393
+ const e = () => this.parseObjectField(n);
1394
1394
  return this.node(this._lexer.token, {
1395
1395
  kind: c.OBJECT,
1396
- fields: this.any(a.BRACE_L, t, a.BRACE_R)
1396
+ fields: this.any(a.BRACE_L, e, a.BRACE_R)
1397
1397
  });
1398
1398
  }
1399
1399
  /**
1400
1400
  * ObjectField[Const] : Name : Value[?Const]
1401
1401
  */
1402
- parseObjectField(e) {
1403
- const t = this._lexer.token, i = this.parseName();
1404
- return this.expectToken(a.COLON), this.node(t, {
1402
+ parseObjectField(n) {
1403
+ const e = this._lexer.token, i = this.parseName();
1404
+ return this.expectToken(a.COLON), this.node(e, {
1405
1405
  kind: c.OBJECT_FIELD,
1406
1406
  name: i,
1407
- value: this.parseValueLiteral(e)
1407
+ value: this.parseValueLiteral(n)
1408
1408
  });
1409
1409
  }
1410
1410
  // Implements the parsing rules in the Directives section.
1411
1411
  /**
1412
1412
  * Directives[Const] : Directive[?Const]+
1413
1413
  */
1414
- parseDirectives(e) {
1415
- const t = [];
1414
+ parseDirectives(n) {
1415
+ const e = [];
1416
1416
  for (; this.peek(a.AT); )
1417
- t.push(this.parseDirective(e));
1418
- return t;
1417
+ e.push(this.parseDirective(n));
1418
+ return e;
1419
1419
  }
1420
1420
  parseConstDirectives() {
1421
1421
  return this.parseDirectives(!0);
@@ -1425,12 +1425,12 @@ class tt {
1425
1425
  * Directive[Const] : @ Name Arguments[?Const]?
1426
1426
  * ```
1427
1427
  */
1428
- parseDirective(e) {
1429
- const t = this._lexer.token;
1430
- return this.expectToken(a.AT), this.node(t, {
1428
+ parseDirective(n) {
1429
+ const e = this._lexer.token;
1430
+ return this.expectToken(a.AT), this.node(e, {
1431
1431
  kind: c.DIRECTIVE,
1432
1432
  name: this.parseName(),
1433
- arguments: this.parseArguments(e)
1433
+ arguments: this.parseArguments(n)
1434
1434
  });
1435
1435
  }
1436
1436
  // Implements the parsing rules in the Types section.
@@ -1441,20 +1441,20 @@ class tt {
1441
1441
  * - NonNullType
1442
1442
  */
1443
1443
  parseTypeReference() {
1444
- const e = this._lexer.token;
1445
- let t;
1444
+ const n = this._lexer.token;
1445
+ let e;
1446
1446
  if (this.expectOptionalToken(a.BRACKET_L)) {
1447
1447
  const i = this.parseTypeReference();
1448
- this.expectToken(a.BRACKET_R), t = this.node(e, {
1448
+ this.expectToken(a.BRACKET_R), e = this.node(n, {
1449
1449
  kind: c.LIST_TYPE,
1450
1450
  type: i
1451
1451
  });
1452
1452
  } else
1453
- t = this.parseNamedType();
1454
- return this.expectOptionalToken(a.BANG) ? this.node(e, {
1453
+ e = this.parseNamedType();
1454
+ return this.expectOptionalToken(a.BANG) ? this.node(n, {
1455
1455
  kind: c.NON_NULL_TYPE,
1456
- type: t
1457
- }) : t;
1456
+ type: e
1457
+ }) : e;
1458
1458
  }
1459
1459
  /**
1460
1460
  * NamedType : Name
@@ -1482,16 +1482,16 @@ class tt {
1482
1482
  * ```
1483
1483
  */
1484
1484
  parseSchemaDefinition() {
1485
- const e = this._lexer.token, t = this.parseDescription();
1485
+ const n = this._lexer.token, e = this.parseDescription();
1486
1486
  this.expectKeyword("schema");
1487
1487
  const i = this.parseConstDirectives(), r = this.many(
1488
1488
  a.BRACE_L,
1489
1489
  this.parseOperationTypeDefinition,
1490
1490
  a.BRACE_R
1491
1491
  );
1492
- return this.node(e, {
1492
+ return this.node(n, {
1493
1493
  kind: c.SCHEMA_DEFINITION,
1494
- description: t,
1494
+ description: e,
1495
1495
  directives: i,
1496
1496
  operationTypes: r
1497
1497
  });
@@ -1500,12 +1500,12 @@ class tt {
1500
1500
  * OperationTypeDefinition : OperationType : NamedType
1501
1501
  */
1502
1502
  parseOperationTypeDefinition() {
1503
- const e = this._lexer.token, t = this.parseOperationType();
1503
+ const n = this._lexer.token, e = this.parseOperationType();
1504
1504
  this.expectToken(a.COLON);
1505
1505
  const i = this.parseNamedType();
1506
- return this.node(e, {
1506
+ return this.node(n, {
1507
1507
  kind: c.OPERATION_TYPE_DEFINITION,
1508
- operation: t,
1508
+ operation: e,
1509
1509
  type: i
1510
1510
  });
1511
1511
  }
@@ -1513,12 +1513,12 @@ class tt {
1513
1513
  * ScalarTypeDefinition : Description? scalar Name Directives[Const]?
1514
1514
  */
1515
1515
  parseScalarTypeDefinition() {
1516
- const e = this._lexer.token, t = this.parseDescription();
1516
+ const n = this._lexer.token, e = this.parseDescription();
1517
1517
  this.expectKeyword("scalar");
1518
1518
  const i = this.parseName(), r = this.parseConstDirectives();
1519
- return this.node(e, {
1519
+ return this.node(n, {
1520
1520
  kind: c.SCALAR_TYPE_DEFINITION,
1521
- description: t,
1521
+ description: e,
1522
1522
  name: i,
1523
1523
  directives: r
1524
1524
  });
@@ -1529,12 +1529,12 @@ class tt {
1529
1529
  * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
1530
1530
  */
1531
1531
  parseObjectTypeDefinition() {
1532
- const e = this._lexer.token, t = this.parseDescription();
1532
+ const n = this._lexer.token, e = this.parseDescription();
1533
1533
  this.expectKeyword("type");
1534
1534
  const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1535
- return this.node(e, {
1535
+ return this.node(n, {
1536
1536
  kind: c.OBJECT_TYPE_DEFINITION,
1537
- description: t,
1537
+ description: e,
1538
1538
  name: i,
1539
1539
  interfaces: r,
1540
1540
  directives: s,
@@ -1566,12 +1566,12 @@ class tt {
1566
1566
  * - Description? Name ArgumentsDefinition? : Type Directives[Const]?
1567
1567
  */
1568
1568
  parseFieldDefinition() {
1569
- const e = this._lexer.token, t = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1569
+ const n = this._lexer.token, e = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1570
1570
  this.expectToken(a.COLON);
1571
1571
  const s = this.parseTypeReference(), o = this.parseConstDirectives();
1572
- return this.node(e, {
1572
+ return this.node(n, {
1573
1573
  kind: c.FIELD_DEFINITION,
1574
- description: t,
1574
+ description: e,
1575
1575
  name: i,
1576
1576
  arguments: r,
1577
1577
  type: s,
@@ -1593,15 +1593,15 @@ class tt {
1593
1593
  * - Description? Name : Type DefaultValue? Directives[Const]?
1594
1594
  */
1595
1595
  parseInputValueDef() {
1596
- const e = this._lexer.token, t = this.parseDescription(), i = this.parseName();
1596
+ const n = this._lexer.token, e = this.parseDescription(), i = this.parseName();
1597
1597
  this.expectToken(a.COLON);
1598
1598
  const r = this.parseTypeReference();
1599
1599
  let s;
1600
1600
  this.expectOptionalToken(a.EQUALS) && (s = this.parseConstValueLiteral());
1601
1601
  const o = this.parseConstDirectives();
1602
- return this.node(e, {
1602
+ return this.node(n, {
1603
1603
  kind: c.INPUT_VALUE_DEFINITION,
1604
- description: t,
1604
+ description: e,
1605
1605
  name: i,
1606
1606
  type: r,
1607
1607
  defaultValue: s,
@@ -1613,12 +1613,12 @@ class tt {
1613
1613
  * - Description? interface Name Directives[Const]? FieldsDefinition?
1614
1614
  */
1615
1615
  parseInterfaceTypeDefinition() {
1616
- const e = this._lexer.token, t = this.parseDescription();
1616
+ const n = this._lexer.token, e = this.parseDescription();
1617
1617
  this.expectKeyword("interface");
1618
1618
  const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
1619
- return this.node(e, {
1619
+ return this.node(n, {
1620
1620
  kind: c.INTERFACE_TYPE_DEFINITION,
1621
- description: t,
1621
+ description: e,
1622
1622
  name: i,
1623
1623
  interfaces: r,
1624
1624
  directives: s,
@@ -1630,12 +1630,12 @@ class tt {
1630
1630
  * - Description? union Name Directives[Const]? UnionMemberTypes?
1631
1631
  */
1632
1632
  parseUnionTypeDefinition() {
1633
- const e = this._lexer.token, t = this.parseDescription();
1633
+ const n = this._lexer.token, e = this.parseDescription();
1634
1634
  this.expectKeyword("union");
1635
1635
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1636
- return this.node(e, {
1636
+ return this.node(n, {
1637
1637
  kind: c.UNION_TYPE_DEFINITION,
1638
- description: t,
1638
+ description: e,
1639
1639
  name: i,
1640
1640
  directives: r,
1641
1641
  types: s
@@ -1654,12 +1654,12 @@ class tt {
1654
1654
  * - Description? enum Name Directives[Const]? EnumValuesDefinition?
1655
1655
  */
1656
1656
  parseEnumTypeDefinition() {
1657
- const e = this._lexer.token, t = this.parseDescription();
1657
+ const n = this._lexer.token, e = this.parseDescription();
1658
1658
  this.expectKeyword("enum");
1659
1659
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1660
- return this.node(e, {
1660
+ return this.node(n, {
1661
1661
  kind: c.ENUM_TYPE_DEFINITION,
1662
- description: t,
1662
+ description: e,
1663
1663
  name: i,
1664
1664
  directives: r,
1665
1665
  values: s
@@ -1681,10 +1681,10 @@ class tt {
1681
1681
  * EnumValueDefinition : Description? EnumValue Directives[Const]?
1682
1682
  */
1683
1683
  parseEnumValueDefinition() {
1684
- const e = this._lexer.token, t = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1685
- return this.node(e, {
1684
+ const n = this._lexer.token, e = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1685
+ return this.node(n, {
1686
1686
  kind: c.ENUM_VALUE_DEFINITION,
1687
- description: t,
1687
+ description: e,
1688
1688
  name: i,
1689
1689
  directives: r
1690
1690
  });
@@ -1708,12 +1708,12 @@ class tt {
1708
1708
  * - Description? input Name Directives[Const]? InputFieldsDefinition?
1709
1709
  */
1710
1710
  parseInputObjectTypeDefinition() {
1711
- const e = this._lexer.token, t = this.parseDescription();
1711
+ const n = this._lexer.token, e = this.parseDescription();
1712
1712
  this.expectKeyword("input");
1713
1713
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1714
- return this.node(e, {
1714
+ return this.node(n, {
1715
1715
  kind: c.INPUT_OBJECT_TYPE_DEFINITION,
1716
- description: t,
1716
+ description: e,
1717
1717
  name: i,
1718
1718
  directives: r,
1719
1719
  fields: s
@@ -1745,9 +1745,9 @@ class tt {
1745
1745
  * - InputObjectTypeDefinition
1746
1746
  */
1747
1747
  parseTypeSystemExtension() {
1748
- const e = this._lexer.lookahead();
1749
- if (e.kind === a.NAME)
1750
- switch (e.value) {
1748
+ const n = this._lexer.lookahead();
1749
+ if (n.kind === a.NAME)
1750
+ switch (n.value) {
1751
1751
  case "schema":
1752
1752
  return this.parseSchemaExtension();
1753
1753
  case "scalar":
@@ -1763,7 +1763,7 @@ class tt {
1763
1763
  case "input":
1764
1764
  return this.parseInputObjectTypeExtension();
1765
1765
  }
1766
- throw this.unexpected(e);
1766
+ throw this.unexpected(n);
1767
1767
  }
1768
1768
  /**
1769
1769
  * ```
@@ -1773,18 +1773,18 @@ class tt {
1773
1773
  * ```
1774
1774
  */
1775
1775
  parseSchemaExtension() {
1776
- const e = this._lexer.token;
1776
+ const n = this._lexer.token;
1777
1777
  this.expectKeyword("extend"), this.expectKeyword("schema");
1778
- const t = this.parseConstDirectives(), i = this.optionalMany(
1778
+ const e = this.parseConstDirectives(), i = this.optionalMany(
1779
1779
  a.BRACE_L,
1780
1780
  this.parseOperationTypeDefinition,
1781
1781
  a.BRACE_R
1782
1782
  );
1783
- if (t.length === 0 && i.length === 0)
1783
+ if (e.length === 0 && i.length === 0)
1784
1784
  throw this.unexpected();
1785
- return this.node(e, {
1785
+ return this.node(n, {
1786
1786
  kind: c.SCHEMA_EXTENSION,
1787
- directives: t,
1787
+ directives: e,
1788
1788
  operationTypes: i
1789
1789
  });
1790
1790
  }
@@ -1793,14 +1793,14 @@ class tt {
1793
1793
  * - extend scalar Name Directives[Const]
1794
1794
  */
1795
1795
  parseScalarTypeExtension() {
1796
- const e = this._lexer.token;
1796
+ const n = this._lexer.token;
1797
1797
  this.expectKeyword("extend"), this.expectKeyword("scalar");
1798
- const t = this.parseName(), i = this.parseConstDirectives();
1798
+ const e = this.parseName(), i = this.parseConstDirectives();
1799
1799
  if (i.length === 0)
1800
1800
  throw this.unexpected();
1801
- return this.node(e, {
1801
+ return this.node(n, {
1802
1802
  kind: c.SCALAR_TYPE_EXTENSION,
1803
- name: t,
1803
+ name: e,
1804
1804
  directives: i
1805
1805
  });
1806
1806
  }
@@ -1811,14 +1811,14 @@ class tt {
1811
1811
  * - extend type Name ImplementsInterfaces
1812
1812
  */
1813
1813
  parseObjectTypeExtension() {
1814
- const e = this._lexer.token;
1814
+ const n = this._lexer.token;
1815
1815
  this.expectKeyword("extend"), this.expectKeyword("type");
1816
- const t = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1816
+ const e = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1817
1817
  if (i.length === 0 && r.length === 0 && s.length === 0)
1818
1818
  throw this.unexpected();
1819
- return this.node(e, {
1819
+ return this.node(n, {
1820
1820
  kind: c.OBJECT_TYPE_EXTENSION,
1821
- name: t,
1821
+ name: e,
1822
1822
  interfaces: i,
1823
1823
  directives: r,
1824
1824
  fields: s
@@ -1831,14 +1831,14 @@ class tt {
1831
1831
  * - extend interface Name ImplementsInterfaces
1832
1832
  */
1833
1833
  parseInterfaceTypeExtension() {
1834
- const e = this._lexer.token;
1834
+ const n = this._lexer.token;
1835
1835
  this.expectKeyword("extend"), this.expectKeyword("interface");
1836
- const t = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1836
+ const e = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1837
1837
  if (i.length === 0 && r.length === 0 && s.length === 0)
1838
1838
  throw this.unexpected();
1839
- return this.node(e, {
1839
+ return this.node(n, {
1840
1840
  kind: c.INTERFACE_TYPE_EXTENSION,
1841
- name: t,
1841
+ name: e,
1842
1842
  interfaces: i,
1843
1843
  directives: r,
1844
1844
  fields: s
@@ -1850,14 +1850,14 @@ class tt {
1850
1850
  * - extend union Name Directives[Const]
1851
1851
  */
1852
1852
  parseUnionTypeExtension() {
1853
- const e = this._lexer.token;
1853
+ const n = this._lexer.token;
1854
1854
  this.expectKeyword("extend"), this.expectKeyword("union");
1855
- const t = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1855
+ const e = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1856
1856
  if (i.length === 0 && r.length === 0)
1857
1857
  throw this.unexpected();
1858
- return this.node(e, {
1858
+ return this.node(n, {
1859
1859
  kind: c.UNION_TYPE_EXTENSION,
1860
- name: t,
1860
+ name: e,
1861
1861
  directives: i,
1862
1862
  types: r
1863
1863
  });
@@ -1868,14 +1868,14 @@ class tt {
1868
1868
  * - extend enum Name Directives[Const]
1869
1869
  */
1870
1870
  parseEnumTypeExtension() {
1871
- const e = this._lexer.token;
1871
+ const n = this._lexer.token;
1872
1872
  this.expectKeyword("extend"), this.expectKeyword("enum");
1873
- const t = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1873
+ const e = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1874
1874
  if (i.length === 0 && r.length === 0)
1875
1875
  throw this.unexpected();
1876
- return this.node(e, {
1876
+ return this.node(n, {
1877
1877
  kind: c.ENUM_TYPE_EXTENSION,
1878
- name: t,
1878
+ name: e,
1879
1879
  directives: i,
1880
1880
  values: r
1881
1881
  });
@@ -1886,14 +1886,14 @@ class tt {
1886
1886
  * - extend input Name Directives[Const]
1887
1887
  */
1888
1888
  parseInputObjectTypeExtension() {
1889
- const e = this._lexer.token;
1889
+ const n = this._lexer.token;
1890
1890
  this.expectKeyword("extend"), this.expectKeyword("input");
1891
- const t = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1891
+ const e = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1892
1892
  if (i.length === 0 && r.length === 0)
1893
1893
  throw this.unexpected();
1894
- return this.node(e, {
1894
+ return this.node(n, {
1895
1895
  kind: c.INPUT_OBJECT_TYPE_EXTENSION,
1896
- name: t,
1896
+ name: e,
1897
1897
  directives: i,
1898
1898
  fields: r
1899
1899
  });
@@ -1905,14 +1905,14 @@ class tt {
1905
1905
  * ```
1906
1906
  */
1907
1907
  parseDirectiveDefinition() {
1908
- const e = this._lexer.token, t = this.parseDescription();
1908
+ const n = this._lexer.token, e = this.parseDescription();
1909
1909
  this.expectKeyword("directive"), this.expectToken(a.AT);
1910
1910
  const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1911
1911
  this.expectKeyword("on");
1912
1912
  const o = this.parseDirectiveLocations();
1913
- return this.node(e, {
1913
+ return this.node(n, {
1914
1914
  kind: c.DIRECTIVE_DEFINITION,
1915
- description: t,
1915
+ description: e,
1916
1916
  name: i,
1917
1917
  arguments: r,
1918
1918
  repeatable: s,
@@ -1955,10 +1955,10 @@ class tt {
1955
1955
  * `INPUT_FIELD_DEFINITION`
1956
1956
  */
1957
1957
  parseDirectiveLocation() {
1958
- const e = this._lexer.token, t = this.parseName();
1959
- if (Object.prototype.hasOwnProperty.call(q, t.value))
1960
- return t;
1961
- throw this.unexpected(e);
1958
+ const n = this._lexer.token, e = this.parseName();
1959
+ if (Object.prototype.hasOwnProperty.call(q, e.value))
1960
+ return e;
1961
+ throw this.unexpected(n);
1962
1962
  }
1963
1963
  // Schema Coordinates
1964
1964
  /**
@@ -1970,27 +1970,27 @@ class tt {
1970
1970
  * - \@ Name ( Name : )
1971
1971
  */
1972
1972
  parseSchemaCoordinate() {
1973
- const e = this._lexer.token, t = this.expectOptionalToken(a.AT), i = this.parseName();
1973
+ const n = this._lexer.token, e = this.expectOptionalToken(a.AT), i = this.parseName();
1974
1974
  let r;
1975
- !t && this.expectOptionalToken(a.DOT) && (r = this.parseName());
1975
+ !e && this.expectOptionalToken(a.DOT) && (r = this.parseName());
1976
1976
  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, {
1977
+ return (e || r) && this.expectOptionalToken(a.PAREN_L) && (s = this.parseName(), this.expectToken(a.COLON), this.expectToken(a.PAREN_R)), e ? s ? this.node(n, {
1978
1978
  kind: c.DIRECTIVE_ARGUMENT_COORDINATE,
1979
1979
  name: i,
1980
1980
  argumentName: s
1981
- }) : this.node(e, {
1981
+ }) : this.node(n, {
1982
1982
  kind: c.DIRECTIVE_COORDINATE,
1983
1983
  name: i
1984
- }) : r ? s ? this.node(e, {
1984
+ }) : r ? s ? this.node(n, {
1985
1985
  kind: c.ARGUMENT_COORDINATE,
1986
1986
  name: i,
1987
1987
  fieldName: r,
1988
1988
  argumentName: s
1989
- }) : this.node(e, {
1989
+ }) : this.node(n, {
1990
1990
  kind: c.MEMBER_COORDINATE,
1991
1991
  name: i,
1992
1992
  memberName: r
1993
- }) : this.node(e, {
1993
+ }) : this.node(n, {
1994
1994
  kind: c.TYPE_COORDINATE,
1995
1995
  name: i
1996
1996
  });
@@ -2001,72 +2001,72 @@ class tt {
2001
2001
  * location object, used to identify the place in the source that created a
2002
2002
  * given parsed object.
2003
2003
  */
2004
- node(e, t) {
2005
- return this._options.noLocation !== !0 && (t.loc = new Pe(
2006
- e,
2004
+ node(n, e) {
2005
+ return this._options.noLocation !== !0 && (e.loc = new xe(
2006
+ n,
2007
2007
  this._lexer.lastToken,
2008
2008
  this._lexer.source
2009
- )), t;
2009
+ )), e;
2010
2010
  }
2011
2011
  /**
2012
2012
  * Determines if the next token is of a given kind
2013
2013
  */
2014
- peek(e) {
2015
- return this._lexer.token.kind === e;
2014
+ peek(n) {
2015
+ return this._lexer.token.kind === n;
2016
2016
  }
2017
2017
  /**
2018
2018
  * If the next token is of the given kind, return that token after advancing the lexer.
2019
2019
  * Otherwise, do not change the parser state and throw an error.
2020
2020
  */
2021
- expectToken(e) {
2022
- const t = this._lexer.token;
2023
- if (t.kind === e)
2024
- return this.advanceLexer(), t;
2021
+ expectToken(n) {
2022
+ const e = this._lexer.token;
2023
+ if (e.kind === n)
2024
+ return this.advanceLexer(), e;
2025
2025
  throw I(
2026
2026
  this._lexer.source,
2027
- t.start,
2028
- `Expected ${Ie(e)}, found ${_(t)}.`
2027
+ e.start,
2028
+ `Expected ${Ie(n)}, found ${_(e)}.`
2029
2029
  );
2030
2030
  }
2031
2031
  /**
2032
2032
  * If the next token is of the given kind, return "true" after advancing the lexer.
2033
2033
  * Otherwise, do not change the parser state and return "false".
2034
2034
  */
2035
- expectOptionalToken(e) {
2036
- return this._lexer.token.kind === e ? (this.advanceLexer(), !0) : !1;
2035
+ expectOptionalToken(n) {
2036
+ return this._lexer.token.kind === n ? (this.advanceLexer(), !0) : !1;
2037
2037
  }
2038
2038
  /**
2039
2039
  * If the next token is a given keyword, advance the lexer.
2040
2040
  * Otherwise, do not change the parser state and throw an error.
2041
2041
  */
2042
- expectKeyword(e) {
2043
- const t = this._lexer.token;
2044
- if (t.kind === a.NAME && t.value === e)
2042
+ expectKeyword(n) {
2043
+ const e = this._lexer.token;
2044
+ if (e.kind === a.NAME && e.value === n)
2045
2045
  this.advanceLexer();
2046
2046
  else
2047
2047
  throw I(
2048
2048
  this._lexer.source,
2049
- t.start,
2050
- `Expected "${e}", found ${_(t)}.`
2049
+ e.start,
2050
+ `Expected "${n}", found ${_(e)}.`
2051
2051
  );
2052
2052
  }
2053
2053
  /**
2054
2054
  * If the next token is a given keyword, return "true" after advancing the lexer.
2055
2055
  * Otherwise, do not change the parser state and return "false".
2056
2056
  */
2057
- expectOptionalKeyword(e) {
2058
- const t = this._lexer.token;
2059
- return t.kind === a.NAME && t.value === e ? (this.advanceLexer(), !0) : !1;
2057
+ expectOptionalKeyword(n) {
2058
+ const e = this._lexer.token;
2059
+ return e.kind === a.NAME && e.value === n ? (this.advanceLexer(), !0) : !1;
2060
2060
  }
2061
2061
  /**
2062
2062
  * Helper function for creating an error when an unexpected lexed token is encountered.
2063
2063
  */
2064
- unexpected(e) {
2065
- const t = e ?? this._lexer.token;
2064
+ unexpected(n) {
2065
+ const e = n ?? this._lexer.token;
2066
2066
  return I(
2067
2067
  this._lexer.source,
2068
- t.start,
2069
- `Unexpected ${_(t)}.`
2068
+ e.start,
2069
+ `Unexpected ${_(e)}.`
2070
2070
  );
2071
2071
  }
2072
2072
  /**
@@ -2074,11 +2074,11 @@ class tt {
2074
2074
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2075
2075
  * Advances the parser to the next lex token after the closing token.
2076
2076
  */
2077
- any(e, t, i) {
2078
- this.expectToken(e);
2077
+ any(n, e, i) {
2078
+ this.expectToken(n);
2079
2079
  const r = [];
2080
2080
  for (; !this.expectOptionalToken(i); )
2081
- r.push(t.call(this));
2081
+ r.push(e.call(this));
2082
2082
  return r;
2083
2083
  }
2084
2084
  /**
@@ -2087,11 +2087,11 @@ class tt {
2087
2087
  * that begins with a lex token of openKind and ends with a lex token of closeKind.
2088
2088
  * Advances the parser to the next lex token after the closing token.
2089
2089
  */
2090
- optionalMany(e, t, i) {
2091
- if (this.expectOptionalToken(e)) {
2090
+ optionalMany(n, e, i) {
2091
+ if (this.expectOptionalToken(n)) {
2092
2092
  const r = [];
2093
2093
  do
2094
- r.push(t.call(this));
2094
+ r.push(e.call(this));
2095
2095
  while (!this.expectOptionalToken(i));
2096
2096
  return r;
2097
2097
  }
@@ -2102,11 +2102,11 @@ class tt {
2102
2102
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
2103
2103
  * Advances the parser to the next lex token after the closing token.
2104
2104
  */
2105
- many(e, t, i) {
2106
- this.expectToken(e);
2105
+ many(n, e, i) {
2106
+ this.expectToken(n);
2107
2107
  const r = [];
2108
2108
  do
2109
- r.push(t.call(this));
2109
+ r.push(e.call(this));
2110
2110
  while (!this.expectOptionalToken(i));
2111
2111
  return r;
2112
2112
  }
@@ -2115,81 +2115,81 @@ class tt {
2115
2115
  * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
2116
2116
  * Advances the parser to the next lex token after last item in the list.
2117
2117
  */
2118
- delimitedMany(e, t) {
2119
- this.expectOptionalToken(e);
2118
+ delimitedMany(n, e) {
2119
+ this.expectOptionalToken(n);
2120
2120
  const i = [];
2121
2121
  do
2122
- i.push(t.call(this));
2123
- while (this.expectOptionalToken(e));
2122
+ i.push(e.call(this));
2123
+ while (this.expectOptionalToken(n));
2124
2124
  return i;
2125
2125
  }
2126
2126
  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))
2127
+ const { maxTokens: n } = this._options, e = this._lexer.advance();
2128
+ if (e.kind !== a.EOF && (++this._tokenCounter, n !== void 0 && this._tokenCounter > n))
2129
2129
  throw I(
2130
2130
  this._lexer.source,
2131
- t.start,
2132
- `Document contains more that ${e} tokens. Parsing aborted.`
2131
+ e.start,
2132
+ `Document contains more that ${n} tokens. Parsing aborted.`
2133
2133
  );
2134
2134
  }
2135
2135
  }
2136
- function _(n) {
2137
- const e = n.value;
2138
- return Ie(n.kind) + (e != null ? ` "${e}"` : "");
2136
+ function _(t) {
2137
+ const n = t.value;
2138
+ return Ie(t.kind) + (n != null ? ` "${n}"` : "");
2139
2139
  }
2140
- function Ie(n) {
2141
- return we(n) ? `"${n}"` : n;
2140
+ function Ie(t) {
2141
+ return we(t) ? `"${t}"` : t;
2142
2142
  }
2143
2143
  var L = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map(), Ee = !0, $ = !1;
2144
- function ye(n) {
2145
- return n.replace(/[\s,]+/g, " ").trim();
2144
+ function ye(t) {
2145
+ return t.replace(/[\s,]+/g, " ").trim();
2146
2146
  }
2147
- function nt(n) {
2148
- return ye(n.source.body.substring(n.start, n.end));
2147
+ function nt(t) {
2148
+ return ye(t.source.body.substring(t.start, t.end));
2149
2149
  }
2150
- function it(n) {
2151
- var e = /* @__PURE__ */ new Set(), t = [];
2152
- return n.definitions.forEach(function(i) {
2150
+ function it(t) {
2151
+ var n = /* @__PURE__ */ new Set(), e = [];
2152
+ return t.definitions.forEach(function(i) {
2153
2153
  if (i.kind === "FragmentDefinition") {
2154
2154
  var r = i.name.value, s = nt(i.loc), o = G.get(r);
2155
2155
  o && !o.has(s) ? Ee && console.warn("Warning: fragment with name " + r + ` already exists.
2156
2156
  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));
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), n.has(s) || (n.add(s), e.push(i));
2158
2158
  } else
2159
- t.push(i);
2160
- }), F(F({}, n), { definitions: t });
2159
+ e.push(i);
2160
+ }), F(F({}, t), { definitions: e });
2161
2161
  }
2162
- function rt(n) {
2163
- var e = new Set(n.definitions);
2164
- e.forEach(function(i) {
2162
+ function rt(t) {
2163
+ var n = new Set(t.definitions);
2164
+ n.forEach(function(i) {
2165
2165
  i.loc && delete i.loc, Object.keys(i).forEach(function(r) {
2166
2166
  var s = i[r];
2167
- s && typeof s == "object" && e.add(s);
2167
+ s && typeof s == "object" && n.add(s);
2168
2168
  });
2169
2169
  });
2170
- var t = n.loc;
2171
- return t && (delete t.startToken, delete t.endToken), n;
2170
+ var e = t.loc;
2171
+ return e && (delete e.startToken, delete e.endToken), t;
2172
2172
  }
2173
- function st(n) {
2174
- var e = ye(n);
2175
- if (!L.has(e)) {
2176
- var t = et(n, {
2173
+ function st(t) {
2174
+ var n = ye(t);
2175
+ if (!L.has(n)) {
2176
+ var e = et(t, {
2177
2177
  experimentalFragmentVariables: $,
2178
2178
  allowLegacyFragmentVariables: $
2179
2179
  });
2180
- if (!t || t.kind !== "Document")
2180
+ if (!e || e.kind !== "Document")
2181
2181
  throw new Error("Not a valid GraphQL document.");
2182
- L.set(e, rt(it(t)));
2182
+ L.set(n, rt(it(e)));
2183
2183
  }
2184
- return L.get(e);
2184
+ return L.get(n);
2185
2185
  }
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];
2191
- return e.forEach(function(r, s) {
2192
- r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += n[s + 1];
2186
+ function l(t) {
2187
+ for (var n = [], e = 1; e < arguments.length; e++)
2188
+ n[e - 1] = arguments[e];
2189
+ typeof t == "string" && (t = [t]);
2190
+ var i = t[0];
2191
+ return n.forEach(function(r, s) {
2192
+ r && r.kind === "Document" ? i += r.loc.source.body : i += r, i += t[s + 1];
2193
2193
  }), st(i);
2194
2194
  }
2195
2195
  function at() {
@@ -2204,15 +2204,15 @@ function ct() {
2204
2204
  function dt() {
2205
2205
  $ = !1;
2206
2206
  }
2207
- var P = {
2207
+ var x = {
2208
2208
  gql: l,
2209
2209
  resetCaches: at,
2210
2210
  disableFragmentWarnings: ot,
2211
2211
  enableExperimentalFragmentVariables: ct,
2212
2212
  disableExperimentalFragmentVariables: dt
2213
2213
  };
2214
- (function(n) {
2215
- n.gql = P.gql, n.resetCaches = P.resetCaches, n.disableFragmentWarnings = P.disableFragmentWarnings, n.enableExperimentalFragmentVariables = P.enableExperimentalFragmentVariables, n.disableExperimentalFragmentVariables = P.disableExperimentalFragmentVariables;
2214
+ (function(t) {
2215
+ t.gql = x.gql, t.resetCaches = x.resetCaches, t.disableFragmentWarnings = x.disableFragmentWarnings, t.enableExperimentalFragmentVariables = x.enableExperimentalFragmentVariables, t.disableExperimentalFragmentVariables = x.disableExperimentalFragmentVariables;
2216
2216
  })(l || (l = {}));
2217
2217
  l.default = l;
2218
2218
  const ut = l`
@@ -2399,110 +2399,110 @@ const ut = l`
2399
2399
  mutation deleteOrder($orderId: ID!) {
2400
2400
  cancelOrder(id: $orderId)
2401
2401
  }
2402
- `, yt = (n, e, t, i) => n();
2403
- function Ot(n, e = yt) {
2402
+ `, yt = (t, n, e, i) => t();
2403
+ function Ot(t, n = yt) {
2404
2404
  return {
2405
- findActiveOrderById(t, i, r) {
2406
- return e((s) => n.request({ document: ut, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", t);
2405
+ findActiveOrderById(e, i, r) {
2406
+ return n((s) => t.request({ document: ut, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findActiveOrderById", "query", e);
2407
2407
  },
2408
- findOrderById(t, i, r) {
2409
- return e((s) => n.request({ document: lt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findOrderById", "query", t);
2408
+ findOrderById(e, i, r) {
2409
+ return n((s) => t.request({ document: lt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findOrderById", "query", e);
2410
2410
  },
2411
- addToOrder(t, i, r) {
2412
- return e((s) => n.request({ document: ht, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", t);
2411
+ addToOrder(e, i, r) {
2412
+ return n((s) => t.request({ document: ht, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "addToOrder", "mutation", e);
2413
2413
  },
2414
- removeFromOrder(t, i, r) {
2415
- return e((s) => n.request({ document: pt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", t);
2414
+ removeFromOrder(e, i, r) {
2415
+ return n((s) => t.request({ document: pt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "removeFromOrder", "mutation", e);
2416
2416
  },
2417
- configurePackage(t, i, r) {
2418
- return e((s) => n.request({ document: mt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", t);
2417
+ configurePackage(e, i, r) {
2418
+ return n((s) => t.request({ document: mt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "configurePackage", "mutation", e);
2419
2419
  },
2420
- reserveAdditionalPackageItem(t, i, r) {
2421
- return e((s) => n.request({ document: ft, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", t);
2420
+ reserveAdditionalPackageItem(e, i, r) {
2421
+ return n((s) => t.request({ document: ft, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "reserveAdditionalPackageItem", "mutation", e);
2422
2422
  },
2423
- configureOrderDeliveryOption(t, i, r) {
2424
- return e((s) => n.request({ document: gt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", t);
2423
+ configureOrderDeliveryOption(e, i, r) {
2424
+ return n((s) => t.request({ document: gt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "configureOrderDeliveryOption", "mutation", e);
2425
2425
  },
2426
- createOrderCustomer(t, i, r) {
2427
- return e((s) => n.request({ document: It, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", t);
2426
+ createOrderCustomer(e, i, r) {
2427
+ return n((s) => t.request({ document: It, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "createOrderCustomer", "mutation", e);
2428
2428
  },
2429
- deleteOrder(t, i, r) {
2430
- return e((s) => n.request({ document: Et, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", t);
2429
+ deleteOrder(e, i, r) {
2430
+ return n((s) => t.request({ document: Et, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "deleteOrder", "mutation", e);
2431
2431
  }
2432
2432
  };
2433
2433
  }
2434
2434
  class kt {
2435
2435
  config;
2436
2436
  sdk;
2437
- constructor(e) {
2438
- this.config = e, this.sdk = Ot(new v(e.apiUrl));
2437
+ constructor(n) {
2438
+ this.config = n, this.sdk = Ot(new v(n.apiUrl));
2439
2439
  }
2440
2440
  // Basket update functions
2441
- async addProduct(e, t) {
2441
+ async addProduct(n, e) {
2442
2442
  try {
2443
2443
  return this.debugLog("Adding product", {
2444
- productId: t.id,
2445
- orderId: e,
2446
- amount: t.amount,
2447
- seat: t.seat
2444
+ productId: e.id,
2445
+ orderId: n,
2446
+ amount: e.amount,
2447
+ seat: e.seat
2448
2448
  }), (await this.sdk.addToOrder({
2449
- productId: t.id,
2450
- orderId: e,
2451
- additionalData: t.seat ? {
2449
+ productId: e.id,
2450
+ orderId: n,
2451
+ additionalData: e.seat ? {
2452
2452
  seat: {
2453
- seatId: t.seat.id,
2454
- seatLabel: t.seat.label,
2455
- holdToken: t.seat.holdToken
2453
+ seatId: e.seat.id,
2454
+ seatLabel: e.seat.label,
2455
+ holdToken: e.seat.holdToken
2456
2456
  }
2457
2457
  } : null,
2458
2458
  trackerId: this.config.trackerId,
2459
2459
  shopId: this.config.shopId,
2460
- amount: t.amount
2460
+ amount: e.amount
2461
2461
  })).reserveProduct;
2462
2462
  } catch (i) {
2463
2463
  throw this.debugLog("Error adding product", i), this.handleError(i), i;
2464
2464
  }
2465
2465
  }
2466
- async removeProduct(e, t) {
2466
+ async removeProduct(n, e) {
2467
2467
  try {
2468
2468
  return this.debugLog("Removing product", {
2469
- productId: t.id,
2470
- orderId: e,
2471
- amount: t.amount
2469
+ productId: e.id,
2470
+ orderId: n,
2471
+ amount: e.amount
2472
2472
  }), (await this.sdk.removeFromOrder({
2473
- productId: t.id,
2474
- orderId: e,
2475
- additionalData: t.seat ? {
2473
+ productId: e.id,
2474
+ orderId: n,
2475
+ additionalData: e.seat ? {
2476
2476
  seat: {
2477
- seatId: t.seat.id,
2478
- seatLabel: t.seat.label
2477
+ seatId: e.seat.id,
2478
+ seatLabel: e.seat.label
2479
2479
  }
2480
2480
  } : null,
2481
- amount: t.amount
2481
+ amount: e.amount
2482
2482
  })).releaseProduct ?? null;
2483
2483
  } catch (i) {
2484
2484
  throw this.debugLog("Error removing product", i), this.handleError(i), i;
2485
2485
  }
2486
2486
  }
2487
- async configurePackage(e, t) {
2487
+ async configurePackage(n, e) {
2488
2488
  try {
2489
- const i = t.items.map((s) => ({
2489
+ const i = e.items.map((s) => ({
2490
2490
  packageItemId: s.packageItemId,
2491
2491
  eventId: s.eventId
2492
2492
  }));
2493
2493
  this.debugLog("Configuring package", {
2494
- packageId: t.id,
2495
- orderId: e,
2496
- amount: t.amount,
2494
+ packageId: e.id,
2495
+ orderId: n,
2496
+ amount: e.amount,
2497
2497
  items: i,
2498
2498
  shopId: this.config.shopId
2499
2499
  });
2500
2500
  const r = await this.sdk.configurePackage({
2501
2501
  trackerId: this.config.trackerId,
2502
2502
  shopId: this.config.shopId,
2503
- packageId: t.id,
2504
- orderId: e,
2505
- amount: t.amount,
2503
+ packageId: e.id,
2504
+ orderId: n,
2505
+ amount: e.amount,
2506
2506
  items: i
2507
2507
  });
2508
2508
  return this.debugLog("Configure package response"), r.configurePackage ?? null;
@@ -2510,33 +2510,33 @@ class kt {
2510
2510
  throw this.debugLog("Error configuring package", i), this.handleError(i), i;
2511
2511
  }
2512
2512
  }
2513
- async configureCustomer(e, t) {
2514
- this.debugLog("Creating/replacing customer", { orderId: e, email: t.email });
2513
+ async configureCustomer(n, e) {
2514
+ this.debugLog("Creating/replacing customer", { orderId: n, email: e.email });
2515
2515
  try {
2516
2516
  const i = await this.sdk.createOrderCustomer({
2517
- orderId: e,
2518
- customer: t
2517
+ orderId: n,
2518
+ customer: e
2519
2519
  });
2520
2520
  this.debugLog("Customer set successfully", i);
2521
2521
  } catch (i) {
2522
2522
  throw this.debugLog("Failed to set customer", i), new Error(`Failed to set customer: ${i.message}`);
2523
2523
  }
2524
2524
  }
2525
- async reserveAdditionalPackageItem(e, t) {
2525
+ async reserveAdditionalPackageItem(n, e) {
2526
2526
  try {
2527
2527
  this.debugLog("reserve additional packageItem", {
2528
- orderId: e,
2529
- eventId: t.eventId,
2530
- amount: t.amount,
2531
- packageId: t.packageId,
2532
- packageItemId: t.packageItemId
2528
+ orderId: n,
2529
+ eventId: e.eventId,
2530
+ amount: e.amount,
2531
+ packageId: e.packageId,
2532
+ packageItemId: e.packageItemId
2533
2533
  });
2534
2534
  const i = await this.sdk.reserveAdditionalPackageItem({
2535
- orderId: e,
2536
- eventId: t.eventId,
2537
- amount: t.amount,
2538
- packageId: t.packageId,
2539
- packageItemId: t.packageItemId
2535
+ orderId: n,
2536
+ eventId: e.eventId,
2537
+ amount: e.amount,
2538
+ packageId: e.packageId,
2539
+ packageItemId: e.packageItemId
2540
2540
  });
2541
2541
  return this.debugLog("reserve additional packageItem"), i.reserveAdditionalPackageItem ?? null;
2542
2542
  } catch (i) {
@@ -2544,12 +2544,12 @@ class kt {
2544
2544
  }
2545
2545
  }
2546
2546
  // Cancel and clear order functions
2547
- async cancelOrder(e) {
2548
- e && (this.debugLog("Cancelling order", { orderId: e }), await this.sdk.deleteOrder({ orderId: e }), this.debugLog("Order cancelled successfully"));
2547
+ async cancelOrder(n) {
2548
+ n && (this.debugLog("Cancelling order", { orderId: n }), await this.sdk.deleteOrder({ orderId: n }), this.debugLog("Order cancelled successfully"));
2549
2549
  }
2550
- async findOrder(e, t) {
2550
+ async findOrder(n, e) {
2551
2551
  try {
2552
- const i = await this.sdk.findOrderById({ id: e, reference: t });
2552
+ const i = await this.sdk.findOrderById({ id: n, reference: e });
2553
2553
  return i.findOrder ? {
2554
2554
  id: i.findOrder.id,
2555
2555
  reference: i.findOrder.reference,
@@ -2574,13 +2574,13 @@ class kt {
2574
2574
  return this.debugLog("Error finding order", i), this.handleError(i), null;
2575
2575
  }
2576
2576
  }
2577
- async findActiveOrder(e) {
2578
- this.debugLog("Fetching order from server", { orderId: e });
2577
+ async findActiveOrder(n) {
2578
+ this.debugLog("Fetching order from server", { orderId: n });
2579
2579
  try {
2580
- const t = await this.sdk.findActiveOrderById({ id: e });
2581
- if (!t?.findOrder)
2580
+ const e = await this.sdk.findActiveOrderById({ id: n });
2581
+ if (!e?.findOrder)
2582
2582
  return null;
2583
- const i = t.findOrder;
2583
+ const i = e.findOrder;
2584
2584
  this.debugLog("Order fetched successfully", i);
2585
2585
  const r = i.items, s = r.filter((d) => d.product != null && d.amount > 0).map((d) => {
2586
2586
  let f = T.PRODUCT;
@@ -2657,21 +2657,21 @@ class kt {
2657
2657
  count: h,
2658
2658
  orderProtection: !1
2659
2659
  };
2660
- } catch (t) {
2661
- throw this.debugLog("Error fetching order", t), t;
2660
+ } catch (e) {
2661
+ throw this.debugLog("Error fetching order", e), e;
2662
2662
  }
2663
2663
  }
2664
- debugLog(e, t) {
2665
- this.config.debug && console.log(`[BasketService] ${e}`, t || "");
2664
+ debugLog(n, e) {
2665
+ this.config.debug && console.log(`[BasketService] ${n}`, e || "");
2666
2666
  }
2667
- handleError(e) {
2668
- const t = e;
2669
- if (t.graphQLErrors && t.graphQLErrors.length > 0) {
2670
- const i = t.graphQLErrors[0];
2667
+ handleError(n) {
2668
+ const e = n;
2669
+ if (e.graphQLErrors && e.graphQLErrors.length > 0) {
2670
+ const i = e.graphQLErrors[0];
2671
2671
  i.extensions?.status === "RATE_LIMIT" && console.error("Rate Limit reached"), i.extensions?.status === "SOLD_OUT" && console.error("Product sold out");
2672
2672
  }
2673
- if (t.response?.errors && t.response.errors.length > 0) {
2674
- const i = t.response.errors[0];
2673
+ if (e.response?.errors && e.response.errors.length > 0) {
2674
+ const i = e.response.errors[0];
2675
2675
  console.error("GraphQL Error:", i.message), i.extensions?.code && console.error("Error Code:", i.extensions.code);
2676
2676
  }
2677
2677
  }
@@ -2787,73 +2787,58 @@ const Tt = l`
2787
2787
  showEndSalesAtTag
2788
2788
  }
2789
2789
  }
2790
- `, Dt = (n, e, t, i) => n();
2791
- function vt(n, e = Dt) {
2790
+ `, Dt = (t, n, e, i) => t();
2791
+ function vt(t, n = Dt) {
2792
2792
  return {
2793
- EventOverviewPage(t, i, r) {
2794
- return e((s) => n.request({ document: Tt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", t);
2793
+ EventOverviewPage(e, i, r) {
2794
+ return n((s) => t.request({ document: Tt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "EventOverviewPage", "query", e);
2795
2795
  },
2796
- EventDetailPage(t, i, r) {
2797
- return e((s) => n.request({ document: At, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", t);
2796
+ EventDetailPage(e, i, r) {
2797
+ return n((s) => t.request({ document: At, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "EventDetailPage", "query", e);
2798
2798
  },
2799
- findProductsByEventId(t, i, r) {
2800
- return e((s) => n.request({ document: Nt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", t);
2799
+ findProductsByEventId(e, i, r) {
2800
+ return n((s) => t.request({ document: Nt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findProductsByEventId", "query", e);
2801
2801
  }
2802
2802
  };
2803
2803
  }
2804
- class xt {
2804
+ class Pt {
2805
2805
  config;
2806
2806
  sdk;
2807
- constructor(e) {
2808
- this.config = e, this.sdk = vt(new v(e.apiUrl));
2807
+ constructor(n) {
2808
+ this.config = n, this.sdk = vt(new v(n.apiUrl));
2809
2809
  }
2810
- async getEvents(e = {}) {
2810
+ async getEvents(n = {}) {
2811
2811
  try {
2812
- e.page && (e.page = {
2813
- index: e.page.index ?? 0,
2814
- size: e.page.size ?? 20
2812
+ n.page && (n.page = {
2813
+ index: n.page.index ?? 0,
2814
+ size: n.page.size ?? 20
2815
2815
  }), this.debugLog("Fetching events with parameters", {
2816
2816
  organizationId: this.config.organizationId,
2817
- hostingIds: e.hostingIds,
2818
- filterEventStatuses: e.statuses,
2819
- dateRange: e.dateRange,
2820
- page: e.page,
2821
- sorts: e.sorts,
2817
+ hostingIds: n.hostingIds,
2818
+ filterEventStatuses: n.statuses,
2819
+ dateRange: n.dateRange,
2820
+ page: n.page,
2821
+ sorts: n.sorts,
2822
2822
  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
2823
  });
2839
- const t = await this.sdk.EventOverviewPage({
2824
+ const e = await this.sdk.EventOverviewPage({
2840
2825
  organizationId: this.config.organizationId,
2841
- hostingIds: e.hostingIds,
2842
- locationIds: e.locationIds,
2843
- excludedEventIds: e.excludedEventIds,
2844
- filterEventStatuses: e.statuses,
2845
- dateRange: e.dateRange && e.dateRange.from && e.dateRange.till ? {
2846
- from: e.dateRange.from.toISO(),
2847
- till: e.dateRange.till.toISO()
2826
+ hostingIds: n.hostingIds,
2827
+ locationIds: n.locationIds,
2828
+ excludedEventIds: n.excludedEventIds,
2829
+ filterEventStatuses: n.statuses,
2830
+ dateRange: n.dateRange && n.dateRange.from && n.dateRange.till ? {
2831
+ from: n.dateRange.from.toISO(),
2832
+ till: n.dateRange.till.toISO()
2848
2833
  } : void 0,
2849
- page: e.page,
2850
- sorts: e.sorts,
2834
+ page: n.page,
2835
+ sorts: n.sorts,
2851
2836
  trackerId: this.config.trackerId,
2852
- searchTerm: e.searchTerm,
2853
- priceRange: e.priceRange
2837
+ searchTerm: n.searchTerm,
2838
+ priceRange: n.priceRange
2854
2839
  });
2855
- if (this.debugLog("Raw GraphQL response", t), t?.findAllPublicEventByOrganizationId?.data) {
2856
- const i = t.findAllPublicEventByOrganizationId.data.map((r) => ({
2840
+ if (this.debugLog("Raw GraphQL response", e), e?.findAllPublicEventByOrganizationId?.data) {
2841
+ const i = e.findAllPublicEventByOrganizationId.data.map((r) => ({
2857
2842
  id: r.id,
2858
2843
  name: r.name,
2859
2844
  icon: r.icon,
@@ -2881,19 +2866,19 @@ class xt {
2881
2866
  startingPrice: r.startingPrice,
2882
2867
  totalViews: r.totalViews
2883
2868
  }));
2884
- return this.debugLog("Processed events", { events: i, count: i.length }), [i, t.findAllPublicEventByOrganizationId.count ?? 0];
2869
+ return this.debugLog("Processed events", { events: i, count: i.length }), [i, e.findAllPublicEventByOrganizationId.count ?? 0];
2885
2870
  } else
2886
2871
  return this.debugLog("No events found in response"), [[], 0];
2887
- } catch (t) {
2888
- throw this.debugLog("Error fetching events", t), t;
2872
+ } catch (e) {
2873
+ throw this.debugLog("Error fetching events", e), e;
2889
2874
  }
2890
2875
  }
2891
- async getEvent(e) {
2876
+ async getEvent(n) {
2892
2877
  try {
2893
- 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 = {
2878
+ this.debugLog("Fetching single event", { eventId: n });
2879
+ const e = await this.sdk.EventDetailPage({ eventId: n });
2880
+ if (this.debugLog("Raw GraphQL response", e), e?.findPublicEventById) {
2881
+ const i = e.findPublicEventById, r = {
2897
2882
  id: i.id,
2898
2883
  name: i.name,
2899
2884
  icon: i.icon,
@@ -2923,26 +2908,26 @@ class xt {
2923
2908
  };
2924
2909
  return this.debugLog("Processed single event", r), r;
2925
2910
  } else {
2926
- this.debugLog("No event found for id", e);
2911
+ this.debugLog("No event found for id", n);
2927
2912
  return;
2928
2913
  }
2929
- } catch (t) {
2930
- throw this.debugLog("Error fetching single event", t), t;
2914
+ } catch (e) {
2915
+ throw this.debugLog("Error fetching single event", e), e;
2931
2916
  }
2932
2917
  }
2933
- async getProducts(e, t, i) {
2918
+ async getProducts(n, e, i) {
2934
2919
  try {
2935
2920
  this.debugLog("Fetching products for event", {
2936
- eventId: e,
2921
+ eventId: n,
2937
2922
  promoCode: i,
2938
2923
  trackerId: this.config.trackerId,
2939
- productTypes: t
2924
+ productTypes: e
2940
2925
  });
2941
2926
  const r = await this.sdk.findProductsByEventId({
2942
- eventId: e,
2927
+ eventId: n,
2943
2928
  promoCode: i,
2944
2929
  trackerId: this.config.trackerId,
2945
- productTypes: t
2930
+ productTypes: e
2946
2931
  });
2947
2932
  if (r?.findPublicProductsByEventId) {
2948
2933
  const s = r.findPublicProductsByEventId.map((o) => ({
@@ -2970,21 +2955,21 @@ class xt {
2970
2955
  type: o.type
2971
2956
  }));
2972
2957
  return this.debugLog("Products fetched", {
2973
- eventId: e,
2958
+ eventId: n,
2974
2959
  count: s.length,
2975
2960
  types: s.map((o) => o.type)
2976
2961
  }), s;
2977
2962
  }
2978
2963
  return;
2979
2964
  } catch (r) {
2980
- throw this.debugLog("Error fetching products", { eventId: e, error: r }), r;
2965
+ throw this.debugLog("Error fetching products", { eventId: n, error: r }), r;
2981
2966
  }
2982
2967
  }
2983
- debugLog(e, t) {
2984
- this.config.debug && console.log(`[EventService:${this.config.organizationId}] ${e}`, t || "");
2968
+ debugLog(n, e) {
2969
+ this.config.debug && console.log(`[EventService:${this.config.organizationId}] ${n}`, e || "");
2985
2970
  }
2986
2971
  }
2987
- const Pt = l`
2972
+ const xt = l`
2988
2973
  query findPaymentMethods($orderId: ID!, $orderItemId: String, $amountOfTickets: Int, $paymentMethodId: String, $withTicketProtection: Boolean) {
2989
2974
  findPaymentDetails(
2990
2975
  orderId: $orderId
@@ -3018,36 +3003,36 @@ const Pt = l`
3018
3003
  mutation createDigitalPayment($input: CreateDigitalOrderPaymentInput!) {
3019
3004
  createDigitalOrderPayment(input: $input)
3020
3005
  }
3021
- `, St = (n, e, t, i) => n();
3022
- function Ct(n, e = St) {
3006
+ `, St = (t, n, e, i) => t();
3007
+ function Ct(t, n = St) {
3023
3008
  return {
3024
- findPaymentMethods(t, i, r) {
3025
- return e((s) => n.request({ document: Pt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", t);
3009
+ findPaymentMethods(e, i, r) {
3010
+ return n((s) => t.request({ document: xt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findPaymentMethods", "query", e);
3026
3011
  },
3027
- createDigitalPayment(t, i, r) {
3028
- return e((s) => n.request({ document: bt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", t);
3012
+ createDigitalPayment(e, i, r) {
3013
+ return n((s) => t.request({ document: bt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "createDigitalPayment", "mutation", e);
3029
3014
  }
3030
3015
  };
3031
3016
  }
3032
3017
  class _t {
3033
3018
  config;
3034
3019
  sdk;
3035
- constructor(e) {
3036
- this.config = e, this.sdk = Ct(new v(e.apiUrl));
3020
+ constructor(n) {
3021
+ this.config = n, this.sdk = Ct(new v(n.apiUrl));
3037
3022
  }
3038
- async getPaymentDetails(e) {
3039
- this.debugLog("Fetching payment methods", e);
3023
+ async getPaymentDetails(n) {
3024
+ this.debugLog("Fetching payment methods", n);
3040
3025
  try {
3041
- const t = await this.sdk.findPaymentMethods({
3042
- orderId: e.orderId,
3043
- orderItemId: e.orderItemId,
3044
- amountOfTickets: e.amountOfTickets,
3045
- paymentMethodId: e.paymentMethodId,
3046
- withTicketProtection: e.withTicketProtection
3026
+ const e = await this.sdk.findPaymentMethods({
3027
+ orderId: n.orderId,
3028
+ orderItemId: n.orderItemId,
3029
+ amountOfTickets: n.amountOfTickets,
3030
+ paymentMethodId: n.paymentMethodId,
3031
+ withTicketProtection: n.withTicketProtection
3047
3032
  });
3048
- if (!t?.findPaymentDetails)
3033
+ if (!e?.findPaymentDetails)
3049
3034
  throw this.debugLog("No payment details found"), new Error("No payment details found for this order");
3050
- const i = t.findPaymentDetails;
3035
+ const i = e.findPaymentDetails;
3051
3036
  return this.debugLog("Payment methods fetched successfully", {
3052
3037
  methodCount: i.methods?.length ?? 0,
3053
3038
  transactionPrice: i.transactionPrice,
@@ -3076,39 +3061,39 @@ class _t {
3076
3061
  })) ?? null
3077
3062
  })) ?? null
3078
3063
  };
3079
- } catch (t) {
3080
- throw this.debugLog("Error fetching payment methods", t), t;
3064
+ } catch (e) {
3065
+ throw this.debugLog("Error fetching payment methods", e), e;
3081
3066
  }
3082
3067
  }
3083
- async createPayment(e) {
3084
- this.debugLog("Creating payment", e);
3068
+ async createPayment(n) {
3069
+ this.debugLog("Creating payment", n);
3085
3070
  try {
3086
- const t = {
3087
- orderId: e.orderId,
3088
- paymentMethodId: e.paymentMethodId,
3089
- issuerId: e.issuerId,
3090
- redirectUrl: e.redirectUrl,
3071
+ const e = {
3072
+ orderId: n.orderId,
3073
+ paymentMethodId: n.paymentMethodId,
3074
+ issuerId: n.issuerId,
3075
+ redirectUrl: n.redirectUrl,
3091
3076
  // For payment links this input in used
3092
- initiatedByUserId: e.initiatedByUserId,
3093
- initiatedByTeamId: e.initiatedByTeamId,
3094
- amountOfTickets: e.amountOfTickets,
3095
- orderItemId: e.orderItemId,
3096
- withTicketProtection: e.withTicketProtection
3077
+ initiatedByUserId: n.initiatedByUserId,
3078
+ initiatedByTeamId: n.initiatedByTeamId,
3079
+ amountOfTickets: n.amountOfTickets,
3080
+ orderItemId: n.orderItemId,
3081
+ withTicketProtection: n.withTicketProtection
3097
3082
  };
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);
3083
+ n.customer && (e.customer = n.customer), n.products && (e.products = n.products), n.description && (e.description = n.description), n.reference && (e.reference = n.reference), n.ipAddress && (e.ipAddress = n.ipAddress);
3099
3084
  const i = await this.sdk.createDigitalPayment({
3100
- input: t
3085
+ input: e
3101
3086
  });
3102
3087
  if (!i?.createDigitalOrderPayment)
3103
3088
  throw this.debugLog("Failed to create payment"), new Error("Failed to create payment for this order");
3104
3089
  const r = i.createDigitalOrderPayment;
3105
3090
  return this.debugLog("Payment created successfully", { paymentUrl: r }), { paymentUrl: r };
3106
- } catch (t) {
3107
- throw this.debugLog("Error creating payment", t), t;
3091
+ } catch (e) {
3092
+ throw this.debugLog("Error creating payment", e), e;
3108
3093
  }
3109
3094
  }
3110
- debugLog(e, t) {
3111
- this.config.debug && console.log(`[PaymentService] ${e}`, t || "");
3095
+ debugLog(n, e) {
3096
+ this.config.debug && console.log(`[PaymentService] ${n}`, e || "");
3112
3097
  }
3113
3098
  }
3114
3099
  const Lt = l`
@@ -3197,40 +3182,40 @@ const Lt = l`
3197
3182
  count
3198
3183
  }
3199
3184
  }
3200
- `, Ft = (n, e, t, i) => n();
3201
- function $t(n, e = Ft) {
3185
+ `, Ft = (t, n, e, i) => t();
3186
+ function $t(t, n = Ft) {
3202
3187
  return {
3203
- findAllPublicPackagesByOrganizationId(t, i, r) {
3204
- return e((s) => n.request({ document: Lt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", t);
3188
+ findAllPublicPackagesByOrganizationId(e, i, r) {
3189
+ return n((s) => t.request({ document: Lt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicPackagesByOrganizationId", "query", e);
3205
3190
  },
3206
- findPublicPackageById(t, i, r) {
3207
- return e((s) => n.request({ document: Rt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", t);
3191
+ findPublicPackageById(e, i, r) {
3192
+ return n((s) => t.request({ document: Rt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findPublicPackageById", "query", e);
3208
3193
  },
3209
- findPublicItemsByPackageId(t, i, r) {
3210
- return e((s) => n.request({ document: wt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", t);
3194
+ findPublicItemsByPackageId(e, i, r) {
3195
+ return n((s) => t.request({ document: wt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findPublicItemsByPackageId", "query", e);
3211
3196
  }
3212
3197
  };
3213
3198
  }
3214
3199
  class Bt {
3215
3200
  config;
3216
3201
  sdk;
3217
- constructor(e) {
3218
- this.config = e, this.sdk = $t(new v(e.apiUrl));
3202
+ constructor(n) {
3203
+ this.config = n, this.sdk = $t(new v(n.apiUrl));
3219
3204
  }
3220
- debugLog(e, t) {
3221
- this.config.debug && console.log(`[PackageService] ${e}`, t || "");
3205
+ debugLog(n, e) {
3206
+ this.config.debug && console.log(`[PackageService] ${n}`, e || "");
3222
3207
  }
3223
- async getPackages(e = {}) {
3208
+ async getPackages(n = {}) {
3224
3209
  try {
3225
- let t;
3226
- e.page && (t = {
3227
- index: e.page.index ?? 0,
3228
- size: e.page.size ?? 20
3210
+ let e;
3211
+ n.page && (e = {
3212
+ index: n.page.index ?? 0,
3213
+ size: n.page.size ?? 20
3229
3214
  }), this.debugLog("Fetching public packages", {
3230
3215
  organizationId: this.config.organizationId,
3231
- page: t,
3232
- tab: e.tab,
3233
- statuses: e.statuses
3216
+ page: e,
3217
+ tab: n.tab,
3218
+ statuses: n.statuses
3234
3219
  });
3235
3220
  const i = await this.sdk.findAllPublicPackagesByOrganizationId({
3236
3221
  organizationId: this.config.organizationId
@@ -3243,31 +3228,31 @@ class Bt {
3243
3228
  }), r.data;
3244
3229
  }
3245
3230
  return null;
3246
- } catch (t) {
3247
- throw this.debugLog("Error fetching public packages", t), t;
3231
+ } catch (e) {
3232
+ throw this.debugLog("Error fetching public packages", e), e;
3248
3233
  }
3249
3234
  }
3250
- async getPackage(e) {
3235
+ async getPackage(n) {
3251
3236
  try {
3252
3237
  this.debugLog("Fetching public packages", {
3253
- packageId: e
3238
+ packageId: n
3254
3239
  });
3255
- const t = await this.sdk.findPublicPackageById({ packageId: e });
3256
- if (t?.findPublicPackageById) {
3257
- const i = t.findPublicPackageById;
3240
+ const e = await this.sdk.findPublicPackageById({ packageId: n });
3241
+ if (e?.findPublicPackageById) {
3242
+ const i = e.findPublicPackageById;
3258
3243
  return this.debugLog("Public package fetched"), i;
3259
3244
  }
3260
3245
  return null;
3261
- } catch (t) {
3262
- throw this.debugLog("Error fetching public packages", t), t;
3246
+ } catch (e) {
3247
+ throw this.debugLog("Error fetching public packages", e), e;
3263
3248
  }
3264
3249
  }
3265
- async getPackageItems(e, t = [R.Regular, R.AdditionalEvent]) {
3250
+ async getPackageItems(n, e = [R.Regular, R.AdditionalEvent]) {
3266
3251
  try {
3267
- this.debugLog("Fetching public package items", { packageId: e, types: t });
3252
+ this.debugLog("Fetching public package items", { packageId: n, types: e });
3268
3253
  const i = await this.sdk.findPublicItemsByPackageId({
3269
- packageId: e,
3270
- types: t,
3254
+ packageId: n,
3255
+ types: e,
3271
3256
  page: { index: 0, size: 100 }
3272
3257
  });
3273
3258
  if (i?.findPublicItemsByPackageId) {
@@ -3303,37 +3288,37 @@ const Vt = l`
3303
3288
  count
3304
3289
  }
3305
3290
  }
3306
- `, Ut = (n, e, t, i) => n();
3307
- function Mt(n, e = Ut) {
3291
+ `, Ut = (t, n, e, i) => t();
3292
+ function Mt(t, n = Ut) {
3308
3293
  return {
3309
- findAllPublicCategoriesByOrganizationId(t, i, r) {
3310
- return e((s) => n.request({ document: Vt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", t);
3294
+ findAllPublicCategoriesByOrganizationId(e, i, r) {
3295
+ return n((s) => t.request({ document: Vt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "findAllPublicCategoriesByOrganizationId", "query", e);
3311
3296
  }
3312
3297
  };
3313
3298
  }
3314
3299
  class zt {
3315
3300
  config;
3316
3301
  sdk;
3317
- constructor(e) {
3318
- this.config = e, this.sdk = Mt(new v(e.apiUrl));
3302
+ constructor(n) {
3303
+ this.config = n, this.sdk = Mt(new v(n.apiUrl));
3319
3304
  }
3320
- debugLog(e, t) {
3321
- this.config.debug && console.log(`[CategoryService] ${e}`, t || "");
3305
+ debugLog(n, e) {
3306
+ this.config.debug && console.log(`[CategoryService] ${n}`, e || "");
3322
3307
  }
3323
- async getCategories(e) {
3308
+ async getCategories(n) {
3324
3309
  try {
3325
3310
  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;
3311
+ const e = await this.sdk.findAllPublicCategoriesByOrganizationId({ organizationId: this.config.organizationId, dateRange: n ?? null });
3312
+ if (e?.findAllPublicHostingsByOrganizationId) {
3313
+ const i = e.findAllPublicHostingsByOrganizationId, r = e.findAllPublicLocationsByOrganizationId;
3329
3314
  return this.debugLog("Categories fetched", { count: i.count + r.count, dataLength: i.data.length + r.data.length }), [
3330
3315
  ...i.data.map((s) => ({ id: s.id, name: s.name, icon: s.icon, activeEvents: s.amountOfActiveEvents, type: "HOSTING" })),
3331
3316
  ...r.data.map((s) => ({ id: s.id, name: s.name, activeEvents: s.amountOfActiveEvents, type: "LOCATION" }))
3332
3317
  ];
3333
3318
  }
3334
3319
  return [];
3335
- } catch (t) {
3336
- throw this.debugLog("Error fetching categories", t), t;
3320
+ } catch (e) {
3321
+ throw this.debugLog("Error fetching categories", e), e;
3337
3322
  }
3338
3323
  }
3339
3324
  }
@@ -3349,43 +3334,43 @@ const qt = l`
3349
3334
  mutation CreatePackageView($id: ID!, $shopId: ID, $trackerLinkId: ID) {
3350
3335
  createPackageView(id: $id, shopId: $shopId, trackerId: $trackerLinkId)
3351
3336
  }
3352
- `, Yt = (n, e, t, i) => n();
3353
- function Ht(n, e = Yt) {
3337
+ `, Yt = (t, n, e, i) => t();
3338
+ function Ht(t, n = Yt) {
3354
3339
  return {
3355
- CreateShopView(t, i, r) {
3356
- return e((s) => n.request({ document: qt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "CreateShopView", "mutation", t);
3340
+ CreateShopView(e, i, r) {
3341
+ return n((s) => t.request({ document: qt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "CreateShopView", "mutation", e);
3357
3342
  },
3358
- CreateEventView(t, i, r) {
3359
- return e((s) => n.request({ document: Gt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "CreateEventView", "mutation", t);
3343
+ CreateEventView(e, i, r) {
3344
+ return n((s) => t.request({ document: Gt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "CreateEventView", "mutation", e);
3360
3345
  },
3361
- CreatePackageView(t, i, r) {
3362
- return e((s) => n.request({ document: jt, variables: t, requestHeaders: { ...i, ...s }, signal: r }), "CreatePackageView", "mutation", t);
3346
+ CreatePackageView(e, i, r) {
3347
+ return n((s) => t.request({ document: jt, variables: e, requestHeaders: { ...i, ...s }, signal: r }), "CreatePackageView", "mutation", e);
3363
3348
  }
3364
3349
  };
3365
3350
  }
3366
3351
  class Jt {
3367
3352
  config;
3368
3353
  sdk;
3369
- constructor(e) {
3370
- this.config = e, this.sdk = Ht(new v(e.apiUrl));
3354
+ constructor(n) {
3355
+ this.config = n, this.sdk = Ht(new v(n.apiUrl));
3371
3356
  }
3372
- createMetric = async (e, t, i) => {
3373
- switch (!t && !i && await this.sdk.CreateShopView({
3374
- id: e,
3357
+ createMetric = async (n, e, i) => {
3358
+ switch (!e && !i && await this.sdk.CreateShopView({
3359
+ id: n,
3375
3360
  trackerLinkId: this.config.trackerId
3376
3361
  }), i) {
3377
3362
  case w.Event:
3378
3363
  await this.sdk.CreateEventView({
3379
- id: e,
3380
- shopId: t,
3364
+ id: n,
3365
+ shopId: e,
3381
3366
  trackerLinkId: this.config.trackerId
3382
3367
  });
3383
3368
  break;
3384
3369
  case w.Package:
3385
3370
  await this.sdk.CreatePackageView(
3386
3371
  {
3387
- id: e,
3388
- shopId: t,
3372
+ id: n,
3373
+ shopId: e,
3389
3374
  trackerLinkId: this.config.trackerId
3390
3375
  }
3391
3376
  );
@@ -3403,41 +3388,41 @@ class Zt {
3403
3388
  metric;
3404
3389
  // Attach selected public types to the SDK class
3405
3390
  static Types = Te;
3406
- 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 });
3391
+ constructor(n) {
3392
+ const { organizationId: e, debug: i = !1, apiUrl: r = Qt } = n, s = this.getOrInitTrackerId();
3393
+ this.basket = new kt({ debug: i, apiUrl: r, shopId: n.shopId, trackerId: s }), this.event = new Pt({ organizationId: e, debug: i, apiUrl: r, trackerId: s }), this.payment = new _t({ debug: i, apiUrl: r }), this.package = new Bt({ organizationId: e, debug: i, apiUrl: r }), this.category = new zt({ organizationId: e, debug: i, apiUrl: r }), this.metric = new Jt({ apiUrl: r, trackerId: s });
3409
3394
  }
3410
3395
  // Resolve tracker id from (in order): explicit config, URL query, or session storage
3411
3396
  // Persist to session when found via config or URL for subsequent page loads
3412
3397
  getOrInitTrackerId() {
3413
3398
  try {
3414
- let e = null, t = null;
3399
+ let n = null, e = null;
3415
3400
  if (typeof window < "u") {
3416
3401
  try {
3417
- t = new URL(window.location.href).searchParams.get("trackerId");
3402
+ e = new URL(window.location.href).searchParams.get("trackerId");
3418
3403
  } catch {
3419
3404
  }
3420
3405
  try {
3421
- e = window.sessionStorage?.getItem(Z) ?? null;
3406
+ n = window.sessionStorage?.getItem(Z) ?? null;
3422
3407
  } catch {
3423
3408
  }
3424
3409
  }
3425
- if (t && t.trim().length > 0) {
3410
+ if (e && e.trim().length > 0) {
3426
3411
  try {
3427
- typeof window < "u" && window.sessionStorage && sessionStorage.setItem(Z, t);
3412
+ typeof window < "u" && window.sessionStorage && sessionStorage.setItem(Z, e);
3428
3413
  } catch {
3429
3414
  }
3430
- return t;
3415
+ return e;
3431
3416
  }
3432
- if (e && e.trim().length > 0) {
3417
+ if (n && n.trim().length > 0) {
3433
3418
  try {
3434
3419
  if (typeof window < "u") {
3435
3420
  const i = new URL(window.location.href);
3436
- i.searchParams.get("trackerId") || (i.searchParams.set("trackerId", e), window.history.replaceState({}, "", i.toString()));
3421
+ i.searchParams.get("trackerId") || (i.searchParams.set("trackerId", n), window.history.replaceState({}, "", i.toString()));
3437
3422
  }
3438
3423
  } catch {
3439
3424
  }
3440
- return e;
3425
+ return n;
3441
3426
  }
3442
3427
  return;
3443
3428
  } catch {