@0no-co/graphql.web 0.1.4 → 0.1.6

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.
@@ -22,17 +22,19 @@ class GraphQLError extends Error {
22
22
  if (a) {
23
23
  this.originalError = a;
24
24
  }
25
- if (!o && a) {
26
- var l = a.extensions;
27
- if (l && "object" == typeof l) {
28
- l;
25
+ var l = o;
26
+ if (!l && a) {
27
+ var u = a.extensions;
28
+ if (u && "object" == typeof u) {
29
+ l = u;
29
30
  }
30
31
  }
31
- this.extensions = o || {};
32
+ this.extensions = l || {};
32
33
  }
33
34
  toJSON() {
34
35
  return {
35
- ...this
36
+ ...this,
37
+ message: this.message
36
38
  };
37
39
  }
38
40
  toString() {
@@ -61,43 +63,44 @@ function advance(i) {
61
63
  var i = / +(?=[^\s])/y;
62
64
 
63
65
  function blockString(e) {
64
- var r = "";
65
- var n = 0;
66
+ var r = e.split("\n");
67
+ var n = "";
66
68
  var t = 0;
67
- var a = -1;
68
- var o = e.split("\n");
69
- for (var l = 0; l < o.length; l++) {
69
+ var a = 0;
70
+ var o = r.length - 1;
71
+ for (var l = 0; l < r.length; l++) {
70
72
  i.lastIndex = 0;
71
- if (i.test(o[l])) {
72
- if (l && (!n || i.lastIndex < n)) {
73
- n = i.lastIndex;
73
+ if (i.test(r[l])) {
74
+ if (l && (!t || i.lastIndex < t)) {
75
+ t = i.lastIndex;
74
76
  }
75
- t = t || l;
76
- a = l;
77
+ a = a || l;
78
+ o = l;
77
79
  }
78
80
  }
79
- for (var u = t; u <= a; u++) {
80
- if (u !== t) {
81
- r += "\n";
81
+ for (var u = a; u <= o; u++) {
82
+ if (u !== a) {
83
+ n += "\n";
82
84
  }
83
- r += o[u].slice(n).replace(/\\"""/g, '"""');
85
+ n += r[u].slice(t).replace(/\\"""/g, '"""');
84
86
  }
85
- return r;
87
+ return n;
86
88
  }
87
89
 
88
- var n = /(?:[\s,]*|#[^\n\r]*)*/y;
89
-
90
90
  function ignored() {
91
- n.lastIndex = r;
92
- n.test(e);
93
- r = n.lastIndex;
91
+ for (var i = 0 | e.charCodeAt(r++); 9 === i || 10 === i || 13 === i || 32 === i || 35 === i || 44 === i || 65279 === i; i = 0 | e.charCodeAt(r++)) {
92
+ if (35 === i) {
93
+ while (10 !== (i = e.charCodeAt(r++)) && 13 !== i) {}
94
+ }
95
+ }
96
+ r--;
94
97
  }
95
98
 
96
- var t = /[_\w][_\d\w]*/y;
99
+ var n = /[_\w][_\d\w]*/y;
97
100
 
98
101
  function name() {
99
102
  var e;
100
- if (e = advance(t)) {
103
+ if (e = advance(n)) {
101
104
  return {
102
105
  kind: "Name",
103
106
  value: e
@@ -105,66 +108,69 @@ function name() {
105
108
  }
106
109
  }
107
110
 
108
- var a = /null|true|false/y;
111
+ var t = /null|true|false/y;
109
112
 
110
- var o = /\$[_\w][_\d\w]*/y;
113
+ var a = /\$[_\w][_\d\w]*/y;
111
114
 
112
- var l = /[-]?\d+/y;
115
+ var o = /-?\d+/y;
113
116
 
114
- var u = /(?:[-]?\d+)?(?:\.\d+)(?:[eE][+-]?\d+)?/y;
117
+ var l = /(?:\.\d+)?(?:[eE][+-]?\d+)?/y;
115
118
 
116
- var s = /\\/g;
119
+ var u = /\\/g;
117
120
 
118
- var d = /"""(?:[\s\S]+(?="""))?"""/y;
121
+ var v = /"""(?:[\s\S]+(?="""))?"""/y;
119
122
 
120
- var v = /"(?:[^"\r\n]+)?"/y;
123
+ var d = /"(?:[^"\r\n]+)?"/y;
121
124
 
122
125
  function value(i) {
123
- var n;
126
+ var s;
124
127
  var c;
125
- if (c = advance(a)) {
126
- n = "null" === c ? {
128
+ if (c = advance(t)) {
129
+ s = "null" === c ? {
127
130
  kind: "NullValue"
128
131
  } : {
129
132
  kind: "BooleanValue",
130
133
  value: "true" === c
131
134
  };
132
- } else if (!i && (c = advance(o))) {
133
- n = {
135
+ } else if (!i && (c = advance(a))) {
136
+ s = {
134
137
  kind: "Variable",
135
138
  name: {
136
139
  kind: "Name",
137
140
  value: c.slice(1)
138
141
  }
139
142
  };
140
- } else if (c = advance(u)) {
141
- n = {
142
- kind: "FloatValue",
143
- value: c
144
- };
145
- } else if (c = advance(l)) {
146
- n = {
147
- kind: "IntValue",
148
- value: c
149
- };
150
- } else if (c = advance(t)) {
151
- n = {
143
+ } else if (c = advance(o)) {
144
+ var f = c;
145
+ if (c = advance(l)) {
146
+ s = {
147
+ kind: "FloatValue",
148
+ value: f + c
149
+ };
150
+ } else {
151
+ s = {
152
+ kind: "IntValue",
153
+ value: f
154
+ };
155
+ }
156
+ } else if (c = advance(n)) {
157
+ s = {
152
158
  kind: "EnumValue",
153
159
  value: c
154
160
  };
155
- } else if (c = advance(d)) {
156
- n = {
161
+ } else if (c = advance(v)) {
162
+ s = {
157
163
  kind: "StringValue",
158
164
  value: blockString(c.slice(3, -3)),
159
165
  block: !0
160
166
  };
161
- } else if (c = advance(v)) {
162
- n = {
167
+ } else if (c = advance(d)) {
168
+ s = {
163
169
  kind: "StringValue",
164
- value: s.test(c) ? JSON.parse(c) : c.slice(1, -1),
170
+ value: u.test(c) ? JSON.parse(c) : c.slice(1, -1),
165
171
  block: !1
166
172
  };
167
- } else if (n = function list(i) {
173
+ } else if (s = function list(i) {
168
174
  var n;
169
175
  if (91 === e.charCodeAt(r)) {
170
176
  r++;
@@ -214,10 +220,10 @@ function value(i) {
214
220
  };
215
221
  }
216
222
  }(i)) {
217
- return n;
223
+ return s;
218
224
  }
219
225
  ignored();
220
- return n;
226
+ return s;
221
227
  }
222
228
 
223
229
  function arguments_(i) {
@@ -271,7 +277,6 @@ function directives(i) {
271
277
  }
272
278
 
273
279
  function field() {
274
- ignored();
275
280
  var i = name();
276
281
  if (i) {
277
282
  ignored();
@@ -331,10 +336,10 @@ function type() {
331
336
  }
332
337
  }
333
338
 
334
- var c = /on/y;
339
+ var s = /on/y;
335
340
 
336
341
  function typeCondition() {
337
- if (advance(c)) {
342
+ if (advance(s)) {
338
343
  ignored();
339
344
  var e = name();
340
345
  if (!e) {
@@ -348,11 +353,10 @@ function typeCondition() {
348
353
  }
349
354
  }
350
355
 
351
- var f = /\.\.\./y;
356
+ var c = /\.\.\./y;
352
357
 
353
358
  function fragmentSpread() {
354
- ignored();
355
- if (advance(f)) {
359
+ if (advance(c)) {
356
360
  ignored();
357
361
  var e = r;
358
362
  var i;
@@ -401,10 +405,10 @@ function selectionSet() {
401
405
  }
402
406
  }
403
407
 
404
- var p = /fragment/y;
408
+ var f = /fragment/y;
405
409
 
406
410
  function fragmentDefinition() {
407
- if (advance(p)) {
411
+ if (advance(f)) {
408
412
  ignored();
409
413
  var e = name();
410
414
  if (!e) {
@@ -430,14 +434,14 @@ function fragmentDefinition() {
430
434
  }
431
435
  }
432
436
 
433
- var m = /query|mutation|subscription/y;
437
+ var p = /query|mutation|subscription/y;
434
438
 
435
439
  function operationDefinition() {
436
440
  var i;
437
441
  var n;
438
442
  var t = [];
439
- var a = [];
440
- if (i = advance(m)) {
443
+ var o = [];
444
+ if (i = advance(p)) {
441
445
  ignored();
442
446
  n = name();
443
447
  t = function variableDefinitions() {
@@ -447,20 +451,17 @@ function operationDefinition() {
447
451
  if (40 === e.charCodeAt(r)) {
448
452
  r++;
449
453
  ignored();
450
- while (i = advance(o)) {
454
+ while (i = advance(a)) {
451
455
  ignored();
452
456
  if (58 !== e.charCodeAt(r++)) {
453
457
  throw error("VariableDefinition");
454
458
  }
455
459
  var t = type();
456
- if (!t) {
457
- throw error("VariableDefinition");
458
- }
459
- var a = void 0;
460
+ var o = void 0;
460
461
  if (61 === e.charCodeAt(r)) {
461
462
  r++;
462
463
  ignored();
463
- if (!(a = value(!0))) {
464
+ if (!(o = value(!0))) {
464
465
  throw error("VariableDefinition");
465
466
  }
466
467
  }
@@ -475,7 +476,7 @@ function operationDefinition() {
475
476
  }
476
477
  },
477
478
  type: t,
478
- defaultValue: a,
479
+ defaultValue: o,
479
480
  directives: directives(!0)
480
481
  });
481
482
  }
@@ -486,7 +487,7 @@ function operationDefinition() {
486
487
  }
487
488
  return n;
488
489
  }();
489
- a = directives(!1);
490
+ o = directives(!1);
490
491
  }
491
492
  var l = selectionSet();
492
493
  if (l) {
@@ -495,13 +496,13 @@ function operationDefinition() {
495
496
  operation: i || "query",
496
497
  name: n,
497
498
  variableDefinitions: t,
498
- directives: a,
499
+ directives: o,
499
500
  selectionSet: l
500
501
  };
501
502
  }
502
503
  }
503
504
 
504
- var g = {};
505
+ var m = {};
505
506
 
506
507
  function printString(e) {
507
508
  return JSON.stringify(e);
@@ -513,7 +514,102 @@ function printBlockString(e) {
513
514
 
514
515
  var hasItems = e => !(!e || !e.length);
515
516
 
516
- var h = 80;
517
+ var g = {
518
+ OperationDefinition(e) {
519
+ if ("query" === e.operation && !e.name && !hasItems(e.variableDefinitions) && !hasItems(e.directives)) {
520
+ return g.SelectionSet(e.selectionSet);
521
+ }
522
+ var r = e.operation;
523
+ if (e.name) {
524
+ r += " " + e.name.value;
525
+ }
526
+ if (hasItems(e.variableDefinitions)) {
527
+ if (!e.name) {
528
+ r += " ";
529
+ }
530
+ r += "(" + e.variableDefinitions.map(g.VariableDefinition).join(", ") + ")";
531
+ }
532
+ if (hasItems(e.directives)) {
533
+ r += " " + e.directives.map(g.Directive).join(" ");
534
+ }
535
+ return r + " " + g.SelectionSet(e.selectionSet);
536
+ },
537
+ VariableDefinition(e) {
538
+ var r = g.Variable(e.variable) + ": " + print(e.type);
539
+ if (e.defaultValue) {
540
+ r += " = " + print(e.defaultValue);
541
+ }
542
+ if (hasItems(e.directives)) {
543
+ r += " " + e.directives.map(g.Directive).join(" ");
544
+ }
545
+ return r;
546
+ },
547
+ Field(e) {
548
+ var r = (e.alias ? e.alias.value + ": " : "") + e.name.value;
549
+ if (hasItems(e.arguments)) {
550
+ var i = e.arguments.map(g.Argument);
551
+ var n = r + "(" + i.join(", ") + ")";
552
+ r = n.length > 80 ? r + "(\n " + i.join("\n").replace(/\n/g, "\n ") + "\n)" : n;
553
+ }
554
+ if (hasItems(e.directives)) {
555
+ r += " " + e.directives.map(g.Directive).join(" ");
556
+ }
557
+ return e.selectionSet ? r + " " + g.SelectionSet(e.selectionSet) : r;
558
+ },
559
+ StringValue: e => e.block ? printBlockString(e.value) : printString(e.value),
560
+ BooleanValue: e => "" + e.value,
561
+ NullValue: e => "null",
562
+ IntValue: e => e.value,
563
+ FloatValue: e => e.value,
564
+ EnumValue: e => e.value,
565
+ Name: e => e.value,
566
+ Variable: e => "$" + e.name.value,
567
+ ListValue: e => "[" + e.values.map(print).join(", ") + "]",
568
+ ObjectValue: e => "{" + e.fields.map(g.ObjectField).join(", ") + "}",
569
+ ObjectField: e => e.name.value + ": " + print(e.value),
570
+ Document: e => hasItems(e.definitions) ? e.definitions.map(print).join("\n\n") : "",
571
+ SelectionSet: e => "{\n " + e.selections.map(print).join("\n").replace(/\n/g, "\n ") + "\n}",
572
+ Argument: e => e.name.value + ": " + print(e.value),
573
+ FragmentSpread(e) {
574
+ var r = "..." + e.name.value;
575
+ if (hasItems(e.directives)) {
576
+ r += " " + e.directives.map(g.Directive).join(" ");
577
+ }
578
+ return r;
579
+ },
580
+ InlineFragment(e) {
581
+ var r = "...";
582
+ if (e.typeCondition) {
583
+ r += " on " + e.typeCondition.name.value;
584
+ }
585
+ if (hasItems(e.directives)) {
586
+ r += " " + e.directives.map(g.Directive).join(" ");
587
+ }
588
+ return r + " " + print(e.selectionSet);
589
+ },
590
+ FragmentDefinition(e) {
591
+ var r = "fragment " + e.name.value;
592
+ r += " on " + e.typeCondition.name.value;
593
+ if (hasItems(e.directives)) {
594
+ r += " " + e.directives.map(g.Directive).join(" ");
595
+ }
596
+ return r + " " + print(e.selectionSet);
597
+ },
598
+ Directive(e) {
599
+ var r = "@" + e.name.value;
600
+ if (hasItems(e.arguments)) {
601
+ r += "(" + e.arguments.map(g.Argument).join(", ") + ")";
602
+ }
603
+ return r;
604
+ },
605
+ NamedType: e => e.name.value,
606
+ ListType: e => "[" + print(e.type) + "]",
607
+ NonNullType: e => print(e.type) + "!"
608
+ };
609
+
610
+ function print(e) {
611
+ return g[e.kind] ? g[e.kind](e) : "";
612
+ }
517
613
 
518
614
  function valueFromASTUntyped(e, r) {
519
615
  switch (e.kind) {
@@ -551,7 +647,7 @@ function valueFromASTUntyped(e, r) {
551
647
  }
552
648
  }
553
649
 
554
- exports.BREAK = g;
650
+ exports.BREAK = m;
555
651
 
556
652
  exports.GraphQLError = GraphQLError;
557
653
 
@@ -567,6 +663,13 @@ exports.Kind = {
567
663
  INLINE_FRAGMENT: "InlineFragment",
568
664
  FRAGMENT_DEFINITION: "FragmentDefinition",
569
665
  VARIABLE: "Variable",
666
+ INT: "IntValue",
667
+ FLOAT: "FloatValue",
668
+ STRING: "StringValue",
669
+ BOOLEAN: "BooleanValue",
670
+ NULL: "NullValue",
671
+ ENUM: "EnumValue",
672
+ LIST: "ListValue",
570
673
  OBJECT: "ObjectValue",
571
674
  OBJECT_FIELD: "ObjectField",
572
675
  DIRECTIVE: "Directive",
@@ -581,24 +684,19 @@ exports.OperationTypeNode = {
581
684
  SUBSCRIPTION: "subscription"
582
685
  };
583
686
 
584
- exports.blockString = blockString;
585
-
586
687
  exports.parse = function parse(i, n) {
587
688
  e = "string" == typeof i.body ? i.body : i;
588
689
  r = 0;
589
690
  return function document() {
590
- var i;
691
+ var e;
591
692
  ignored();
592
- var n = [];
593
- while (i = fragmentDefinition() || operationDefinition()) {
594
- n.push(i);
595
- }
596
- if (r !== e.length) {
597
- throw error("Document");
693
+ var r = [];
694
+ while (e = fragmentDefinition() || operationDefinition()) {
695
+ r.push(e);
598
696
  }
599
697
  return {
600
698
  kind: "Document",
601
- definitions: n
699
+ definitions: r
602
700
  };
603
701
  }();
604
702
  };
@@ -606,11 +704,7 @@ exports.parse = function parse(i, n) {
606
704
  exports.parseType = function parseType(i, n) {
607
705
  e = "string" == typeof i.body ? i.body : i;
608
706
  r = 0;
609
- var t = type();
610
- if (!t) {
611
- throw error("TypeNode");
612
- }
613
- return t;
707
+ return type();
614
708
  };
615
709
 
616
710
  exports.parseValue = function parseValue(i, n) {
@@ -624,129 +718,7 @@ exports.parseValue = function parseValue(i, n) {
624
718
  return t;
625
719
  };
626
720
 
627
- exports.print = function print(e) {
628
- var r;
629
- switch (e.kind) {
630
- case "OperationDefinition":
631
- if ("query" === e.operation && !e.name && !hasItems(e.variableDefinitions) && !hasItems(e.directives)) {
632
- return print(e.selectionSet);
633
- }
634
- r = e.operation;
635
- if (e.name) {
636
- r += " " + e.name.value;
637
- }
638
- if (hasItems(e.variableDefinitions)) {
639
- if (!e.name) {
640
- r += " ";
641
- }
642
- r += "(" + e.variableDefinitions.map(print).join(", ") + ")";
643
- }
644
- if (hasItems(e.directives)) {
645
- r += " " + e.directives.map(print).join(" ");
646
- }
647
- return r + " " + print(e.selectionSet);
648
-
649
- case "VariableDefinition":
650
- r = print(e.variable) + ": " + print(e.type);
651
- if (e.defaultValue) {
652
- r += " = " + print(e.defaultValue);
653
- }
654
- if (hasItems(e.directives)) {
655
- r += " " + e.directives.map(print).join(" ");
656
- }
657
- return r;
658
-
659
- case "Field":
660
- r = (e.alias ? print(e.alias) + ": " : "") + e.name.value;
661
- if (hasItems(e.arguments)) {
662
- var i = e.arguments.map(print);
663
- var n = r + "(" + i.join(", ") + ")";
664
- r = n.length > h ? r + "(\n " + i.join("\n").replace(/\n/g, "\n ") + "\n)" : n;
665
- }
666
- if (hasItems(e.directives)) {
667
- r += " " + e.directives.map(print).join(" ");
668
- }
669
- return e.selectionSet ? r + " " + print(e.selectionSet) : r;
670
-
671
- case "StringValue":
672
- return e.block ? printBlockString(e.value) : printString(e.value);
673
-
674
- case "BooleanValue":
675
- return "" + e.value;
676
-
677
- case "NullValue":
678
- return "null";
679
-
680
- case "IntValue":
681
- case "FloatValue":
682
- case "EnumValue":
683
- case "Name":
684
- return e.value;
685
-
686
- case "ListValue":
687
- return "[" + e.values.map(print).join(", ") + "]";
688
-
689
- case "ObjectValue":
690
- return "{" + e.fields.map(print).join(", ") + "}";
691
-
692
- case "ObjectField":
693
- case "Argument":
694
- return e.name.value + ": " + print(e.value);
695
-
696
- case "Variable":
697
- return "$" + e.name.value;
698
-
699
- case "Document":
700
- return hasItems(e.definitions) ? e.definitions.map(print).join("\n\n") : "";
701
-
702
- case "SelectionSet":
703
- return "{\n " + e.selections.map(print).join("\n").replace(/\n/g, "\n ") + "\n}";
704
-
705
- case "FragmentSpread":
706
- r = "..." + e.name.value;
707
- if (hasItems(e.directives)) {
708
- r += " " + e.directives.map(print).join(" ");
709
- }
710
- return r;
711
-
712
- case "InlineFragment":
713
- r = "...";
714
- if (e.typeCondition) {
715
- r += " on " + e.typeCondition.name.value;
716
- }
717
- if (hasItems(e.directives)) {
718
- r += " " + e.directives.map(print).join(" ");
719
- }
720
- return r + " " + print(e.selectionSet);
721
-
722
- case "FragmentDefinition":
723
- r = "fragment " + e.name.value;
724
- r += " on " + e.typeCondition.name.value;
725
- if (hasItems(e.directives)) {
726
- r += " " + e.directives.map(print).join(" ");
727
- }
728
- return r + " " + print(e.selectionSet);
729
-
730
- case "Directive":
731
- r = "@" + e.name.value;
732
- if (hasItems(e.arguments)) {
733
- r += "(" + e.arguments.map(print).join(", ") + ")";
734
- }
735
- return r;
736
-
737
- case "NamedType":
738
- return e.name.value;
739
-
740
- case "ListType":
741
- return "[" + print(e.type) + "]";
742
-
743
- case "NonNullType":
744
- return print(e.type) + "!";
745
-
746
- default:
747
- return "";
748
- }
749
- };
721
+ exports.print = print;
750
722
 
751
723
  exports.printBlockString = printBlockString;
752
724
 
@@ -794,14 +766,14 @@ exports.visit = function visit(e, r) {
794
766
  try {
795
767
  var t = function traverse(e, t, a) {
796
768
  var o = !1;
797
- var l = r[e.kind] && r[e.kind].enter || r[e.kind];
769
+ var l = r[e.kind] && r[e.kind].enter || r[e.kind] || r.enter;
798
770
  var u = l && l.call(r, e, t, a, n, i);
799
771
  if (!1 === u) {
800
772
  return e;
801
773
  } else if (null === u) {
802
774
  return null;
803
- } else if (u === g) {
804
- throw g;
775
+ } else if (u === m) {
776
+ throw m;
805
777
  } else if (u && "string" == typeof u.kind) {
806
778
  o = u !== e;
807
779
  e = u;
@@ -809,51 +781,49 @@ exports.visit = function visit(e, r) {
809
781
  if (a) {
810
782
  i.push(a);
811
783
  }
812
- var s;
784
+ var v;
813
785
  var d = {
814
786
  ...e
815
787
  };
816
- for (var v in e) {
817
- n.push(v);
818
- var c = e[v];
788
+ for (var s in e) {
789
+ n.push(s);
790
+ var c = e[s];
819
791
  if (Array.isArray(c)) {
820
792
  var f = [];
821
793
  for (var p = 0; p < c.length; p++) {
822
794
  if (null != c[p] && "string" == typeof c[p].kind) {
823
795
  i.push(e);
824
796
  n.push(p);
825
- s = traverse(c[p], p, c);
797
+ v = traverse(c[p], p, c);
826
798
  n.pop();
827
799
  i.pop();
828
- if (void 0 === s) {
829
- f.push(c[p]);
830
- } else if (null === s) {
800
+ if (null == v) {
831
801
  o = !0;
832
802
  } else {
833
- o = o || s !== c[p];
834
- f.push(s);
803
+ o = o || v !== c[p];
804
+ f.push(v);
835
805
  }
836
806
  }
837
807
  }
838
808
  c = f;
839
809
  } else if (null != c && "string" == typeof c.kind) {
840
- if (void 0 !== (s = traverse(c, v, e))) {
841
- o = o || c !== s;
842
- c = s;
810
+ if (void 0 !== (v = traverse(c, s, e))) {
811
+ o = o || c !== v;
812
+ c = v;
843
813
  }
844
814
  }
845
815
  n.pop();
846
816
  if (o) {
847
- d[v] = c;
817
+ d[s] = c;
848
818
  }
849
819
  }
850
820
  if (a) {
851
821
  i.pop();
852
822
  }
853
- var m = r[e.kind] && r[e.kind].leave;
854
- var h = m && m.call(r, e, t, a, n, i);
855
- if (h === g) {
856
- throw g;
823
+ var g = r[e.kind] && r[e.kind].leave || r.leave;
824
+ var h = g && g.call(r, e, t, a, n, i);
825
+ if (h === m) {
826
+ throw m;
857
827
  } else if (void 0 !== h) {
858
828
  return h;
859
829
  } else if (void 0 !== u) {
@@ -864,7 +834,7 @@ exports.visit = function visit(e, r) {
864
834
  }(e);
865
835
  return void 0 !== t && !1 !== t ? t : e;
866
836
  } catch (r) {
867
- if (r !== g) {
837
+ if (r !== m) {
868
838
  throw r;
869
839
  }
870
840
  return e;