@loancrate/json-selector 2.1.0 → 3.0.0

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.
@@ -25,16 +25,19 @@ function hasOwnProperties(value) {
25
25
  return false;
26
26
  }
27
27
  function getField(obj, name) {
28
- return isObject(obj) ? obj[name] ?? null : null;
28
+ var _a;
29
+ return isObject(obj) ? (_a = obj[name]) !== null && _a !== void 0 ? _a : null : null;
29
30
  }
30
31
  function getIndex(obj, index) {
32
+ var _a;
31
33
  return isArray(obj)
32
- ? obj[index < 0 ? obj.length + index : index] ?? null
34
+ ? (_a = obj[index < 0 ? obj.length + index : index]) !== null && _a !== void 0 ? _a : null
33
35
  : null;
34
36
  }
35
37
  function findId(obj, id) {
38
+ var _a;
36
39
  return isArray(obj)
37
- ? obj.find((e) => isObject(e) && e.id === id) ?? null
40
+ ? (_a = obj.find((e) => isObject(e) && e.id === id)) !== null && _a !== void 0 ? _a : null
38
41
  : null;
39
42
  }
40
43
  function findIdIndex(arr, id) {
@@ -59,6 +62,8 @@ function visitJsonSelector(selector, visitor, context) {
59
62
  switch (selector.type) {
60
63
  case "current":
61
64
  return visitor.current(selector, context);
65
+ case "root":
66
+ return visitor.root(selector, context);
62
67
  case "literal":
63
68
  return visitor.literal(selector, context);
64
69
  case "identifier":
@@ -90,11 +95,14 @@ function visitJsonSelector(selector, visitor, context) {
90
95
  }
91
96
  }
92
97
 
93
- function evaluateJsonSelector(selector, context) {
98
+ function evaluateJsonSelector(selector, context, rootContext = context) {
94
99
  return visitJsonSelector(selector, {
95
100
  current() {
96
101
  return context;
97
102
  },
103
+ root() {
104
+ return rootContext;
105
+ },
98
106
  literal({ value }) {
99
107
  return value;
100
108
  },
@@ -102,48 +110,52 @@ function evaluateJsonSelector(selector, context) {
102
110
  return getField(context, id);
103
111
  },
104
112
  fieldAccess({ expression, field }) {
105
- return getField(evaluateJsonSelector(expression, context), field);
113
+ return getField(evaluateJsonSelector(expression, context, rootContext), field);
106
114
  },
107
115
  indexAccess({ expression, index }) {
108
- return getIndex(evaluateJsonSelector(expression, context), index);
116
+ return getIndex(evaluateJsonSelector(expression, context, rootContext), index);
109
117
  },
110
118
  idAccess({ expression, id }) {
111
- return findId(evaluateJsonSelector(expression, context), id);
119
+ return findId(evaluateJsonSelector(expression, context, rootContext), id);
112
120
  },
113
121
  project({ expression, projection }) {
114
- return project(evaluateJsonSelector(expression, context), projection);
122
+ return project(evaluateJsonSelector(expression, context, rootContext), projection, rootContext);
115
123
  },
116
124
  filter({ expression, condition }) {
117
- return filter(evaluateJsonSelector(expression, context), condition);
125
+ return filter(evaluateJsonSelector(expression, context, rootContext), condition, rootContext);
118
126
  },
119
127
  slice({ expression, start, end, step }) {
120
- return slice(evaluateJsonSelector(expression, context), start, end, step);
128
+ return slice(evaluateJsonSelector(expression, context, rootContext), start, end, step);
121
129
  },
122
130
  flatten({ expression }) {
123
- return flatten(evaluateJsonSelector(expression, context));
131
+ return flatten(evaluateJsonSelector(expression, context, rootContext));
124
132
  },
125
133
  not({ expression }) {
126
- return isFalseOrEmpty(evaluateJsonSelector(expression, context));
134
+ return isFalseOrEmpty(evaluateJsonSelector(expression, context, rootContext));
127
135
  },
128
136
  compare({ lhs, rhs, operator }) {
129
- const lv = evaluateJsonSelector(lhs, context);
130
- const rv = evaluateJsonSelector(rhs, context);
137
+ const lv = evaluateJsonSelector(lhs, context, rootContext);
138
+ const rv = evaluateJsonSelector(rhs, context, rootContext);
131
139
  return compare(lv, rv, operator);
132
140
  },
133
141
  and({ lhs, rhs }) {
134
- const lv = evaluateJsonSelector(lhs, context);
135
- return isFalseOrEmpty(lv) ? lv : evaluateJsonSelector(rhs, context);
142
+ const lv = evaluateJsonSelector(lhs, context, rootContext);
143
+ return isFalseOrEmpty(lv)
144
+ ? lv
145
+ : evaluateJsonSelector(rhs, context, rootContext);
136
146
  },
137
147
  or({ lhs, rhs }) {
138
- const lv = evaluateJsonSelector(lhs, context);
139
- return !isFalseOrEmpty(lv) ? lv : evaluateJsonSelector(rhs, context);
148
+ const lv = evaluateJsonSelector(lhs, context, rootContext);
149
+ return !isFalseOrEmpty(lv)
150
+ ? lv
151
+ : evaluateJsonSelector(rhs, context, rootContext);
140
152
  },
141
153
  pipe({ lhs, rhs }) {
142
- return evaluateJsonSelector(rhs, evaluateJsonSelector(lhs, context));
154
+ return evaluateJsonSelector(rhs, evaluateJsonSelector(lhs, context, rootContext), rootContext);
143
155
  },
144
156
  }, context);
145
157
  }
146
- function project(value, projection) {
158
+ function project(value, projection, rootContext) {
147
159
  if (!isArray(value)) {
148
160
  return null;
149
161
  }
@@ -151,15 +163,15 @@ function project(value, projection) {
151
163
  return value;
152
164
  }
153
165
  const result = value
154
- .map((e) => evaluateJsonSelector(projection, e))
166
+ .map((e) => evaluateJsonSelector(projection, e, rootContext))
155
167
  .filter((e) => e != null);
156
168
  return result;
157
169
  }
158
- function filter(value, condition) {
170
+ function filter(value, condition, rootContext) {
159
171
  if (!isArray(value)) {
160
172
  return null;
161
173
  }
162
- const result = value.filter((e) => !isFalseOrEmpty(evaluateJsonSelector(condition, e)));
174
+ const result = value.filter((e) => !isFalseOrEmpty(evaluateJsonSelector(condition, e, rootContext)));
163
175
  return result;
164
176
  }
165
177
  function slice(value, start, end, step) {
@@ -266,7 +278,7 @@ const operatorPrecedence = {
266
278
  function formatSubexpression(expr, options, precedence) {
267
279
  // Ensure @ is only used as a bare expression
268
280
  if (!options.currentImplied) {
269
- options = { ...options, currentImplied: true };
281
+ options = Object.assign(Object.assign({}, options), { currentImplied: true });
270
282
  }
271
283
  let result = formatJsonSelector(expr, options);
272
284
  const subPrecedence = operatorPrecedence[expr.type];
@@ -286,6 +298,9 @@ function formatJsonSelector(selector, options = {}) {
286
298
  current() {
287
299
  return !options.currentImplied ? "@" : "";
288
300
  },
301
+ root() {
302
+ return "$";
303
+ },
289
304
  literal({ value }) {
290
305
  return formatLiteral(value);
291
306
  },
@@ -322,7 +337,7 @@ function formatJsonSelector(selector, options = {}) {
322
337
  },
323
338
  slice({ expression, start, end, step }) {
324
339
  const lv = formatSubexpression(expression, options, PRECEDENCE_ACCESS);
325
- const rv = `${start ?? ""}:${end ?? ""}${step != null ? `:${step}` : ""}`;
340
+ const rv = `${start !== null && start !== void 0 ? start : ""}:${end !== null && end !== void 0 ? end : ""}${step != null ? `:${step}` : ""}`;
326
341
  return `${lv}[${rv}]`;
327
342
  },
328
343
  flatten({ expression }) {
@@ -391,11 +406,22 @@ class ContextAccessor extends ReadOnlyAccessor {
391
406
  return context;
392
407
  }
393
408
  }
409
+ class RootContextAccessor extends ReadOnlyAccessor {
410
+ constructor() {
411
+ super({ type: "root" });
412
+ }
413
+ get(context, rootContext = context) {
414
+ return rootContext;
415
+ }
416
+ }
394
417
  function makeJsonSelectorAccessor(selector) {
395
418
  return visitJsonSelector(selector, {
396
419
  current() {
397
420
  return new ContextAccessor();
398
421
  },
422
+ root() {
423
+ return new RootContextAccessor();
424
+ },
399
425
  literal(selector) {
400
426
  return new ConstantAccessor(selector, selector.value);
401
427
  },
@@ -411,7 +437,7 @@ function makeJsonSelectorAccessor(selector) {
411
437
  get(context) {
412
438
  return getField(context, id);
413
439
  }
414
- set(context, value) {
440
+ set(value, context) {
415
441
  if (isObject(context)) {
416
442
  context[id] = value;
417
443
  }
@@ -431,20 +457,20 @@ function makeJsonSelectorAccessor(selector) {
431
457
  constructor() {
432
458
  super(selector);
433
459
  }
434
- isValidContext(context) {
435
- return isObject(base.get(context));
460
+ isValidContext(context, rootContext = context) {
461
+ return isObject(base.get(context, rootContext));
436
462
  }
437
- get(context) {
438
- return getField(base.get(context), field);
463
+ get(context, rootContext = context) {
464
+ return getField(base.get(context, rootContext), field);
439
465
  }
440
- set(context, value) {
441
- const obj = base.get(context);
466
+ set(value, context, rootContext = context) {
467
+ const obj = base.get(context, rootContext);
442
468
  if (isObject(obj)) {
443
469
  obj[field] = value;
444
470
  }
445
471
  }
446
- delete(context) {
447
- const obj = base.get(context);
472
+ delete(context, rootContext = context) {
473
+ const obj = base.get(context, rootContext);
448
474
  if (isObject(obj)) {
449
475
  delete obj[field];
450
476
  }
@@ -459,20 +485,20 @@ function makeJsonSelectorAccessor(selector) {
459
485
  constructor() {
460
486
  super(selector);
461
487
  }
462
- isValidContext(context) {
463
- return isArray(base.get(context));
488
+ isValidContext(context, rootContext = context) {
489
+ return isArray(base.get(context, rootContext));
464
490
  }
465
- get(context) {
466
- return getIndex(base.get(context), index);
491
+ get(context, rootContext = context) {
492
+ return getIndex(base.get(context, rootContext), index);
467
493
  }
468
- set(context, value) {
469
- const arr = base.get(context);
494
+ set(value, context, rootContext = context) {
495
+ const arr = base.get(context, rootContext);
470
496
  if (isArray(arr)) {
471
497
  arr[index] = value;
472
498
  }
473
499
  }
474
- delete(context) {
475
- const arr = base.get(context);
500
+ delete(context, rootContext = context) {
501
+ const arr = base.get(context, rootContext);
476
502
  if (isArray(arr)) {
477
503
  arr.splice(index, 1);
478
504
  }
@@ -487,14 +513,14 @@ function makeJsonSelectorAccessor(selector) {
487
513
  constructor() {
488
514
  super(selector);
489
515
  }
490
- isValidContext(context) {
491
- return isArray(base.get(context));
516
+ isValidContext(context, rootContext = context) {
517
+ return isArray(base.get(context, rootContext));
492
518
  }
493
- get(context) {
494
- return findId(base.get(context), id);
519
+ get(context, rootContext = context) {
520
+ return findId(base.get(context, rootContext), id);
495
521
  }
496
- set(context, value) {
497
- const arr = base.get(context);
522
+ set(value, context, rootContext = context) {
523
+ const arr = base.get(context, rootContext);
498
524
  if (isArray(arr)) {
499
525
  const index = findIdIndex(arr, id);
500
526
  if (index >= 0) {
@@ -502,8 +528,8 @@ function makeJsonSelectorAccessor(selector) {
502
528
  }
503
529
  }
504
530
  }
505
- delete(context) {
506
- const arr = base.get(context);
531
+ delete(context, rootContext = context) {
532
+ const arr = base.get(context, rootContext);
507
533
  if (isArray(arr)) {
508
534
  const index = findIdIndex(arr, id);
509
535
  if (index >= 0) {
@@ -522,18 +548,18 @@ function makeJsonSelectorAccessor(selector) {
522
548
  constructor() {
523
549
  super(selector);
524
550
  }
525
- isValidContext(context) {
526
- return isArray(base.get(context));
551
+ isValidContext(context, rootContext = context) {
552
+ return isArray(base.get(context, rootContext));
527
553
  }
528
- get(context) {
529
- return project(base.get(context), projection);
554
+ get(context, rootContext = context) {
555
+ return project(base.get(context, rootContext), projection, context);
530
556
  }
531
- set(context, value) {
532
- const arr = base.get(context);
557
+ set(value, context, rootContext = context) {
558
+ const arr = base.get(context, rootContext);
533
559
  if (isArray(arr)) {
534
560
  if (proj) {
535
561
  for (const element of arr) {
536
- proj.set(element, value);
562
+ proj.set(value, element, rootContext);
537
563
  }
538
564
  }
539
565
  else {
@@ -541,12 +567,12 @@ function makeJsonSelectorAccessor(selector) {
541
567
  }
542
568
  }
543
569
  }
544
- delete(context) {
545
- const arr = base.get(context);
570
+ delete(context, rootContext = context) {
571
+ const arr = base.get(context, rootContext);
546
572
  if (isArray(arr)) {
547
573
  if (proj) {
548
574
  for (const element of arr) {
549
- proj.delete(element);
575
+ proj.delete(element, rootContext);
550
576
  }
551
577
  }
552
578
  else {
@@ -564,22 +590,22 @@ function makeJsonSelectorAccessor(selector) {
564
590
  constructor() {
565
591
  super(selector);
566
592
  }
567
- isValidContext(context) {
568
- return isArray(base.get(context));
593
+ isValidContext(context, rootContext = context) {
594
+ return isArray(base.get(context, rootContext));
569
595
  }
570
- get(context) {
571
- return filter(base.get(context), condition);
596
+ get(context, rootContext = context) {
597
+ return filter(base.get(context, rootContext), condition, context);
572
598
  }
573
- set(context, value) {
574
- const arr = base.get(context);
599
+ set(value, context, rootContext = context) {
600
+ const arr = base.get(context, rootContext);
575
601
  if (isArray(arr)) {
576
- replaceArray(arr, invertedFilter(arr, condition).concat(asArray(value)));
602
+ replaceArray(arr, invertedFilter(arr, condition, rootContext).concat(asArray(value)));
577
603
  }
578
604
  }
579
- delete(context) {
580
- const arr = base.get(context);
605
+ delete(context, rootContext = context) {
606
+ const arr = base.get(context, rootContext);
581
607
  if (isArray(arr)) {
582
- replaceArray(arr, invertedFilter(arr, condition));
608
+ replaceArray(arr, invertedFilter(arr, condition, rootContext));
583
609
  }
584
610
  }
585
611
  };
@@ -592,20 +618,20 @@ function makeJsonSelectorAccessor(selector) {
592
618
  constructor() {
593
619
  super(selector);
594
620
  }
595
- isValidContext(context) {
596
- return isArray(base.get(context));
621
+ isValidContext(context, rootContext = context) {
622
+ return isArray(base.get(context, rootContext));
597
623
  }
598
- get(context) {
599
- return slice(base.get(context), start, end, step);
624
+ get(context, rootContext = context) {
625
+ return slice(base.get(context, rootContext), start, end, step);
600
626
  }
601
- set(context, value) {
602
- const arr = base.get(context);
627
+ set(value, context, rootContext = context) {
628
+ const arr = base.get(context, rootContext);
603
629
  if (isArray(arr)) {
604
630
  replaceArray(arr, invertedSlice(arr, start, end, step).concat(asArray(value)));
605
631
  }
606
632
  }
607
- delete(context) {
608
- const arr = base.get(context);
633
+ delete(context, rootContext = context) {
634
+ const arr = base.get(context, rootContext);
609
635
  if (isArray(arr)) {
610
636
  replaceArray(arr, invertedSlice(arr, start, end, step));
611
637
  }
@@ -620,20 +646,20 @@ function makeJsonSelectorAccessor(selector) {
620
646
  constructor() {
621
647
  super(selector);
622
648
  }
623
- isValidContext(context) {
624
- return isArray(base.get(context));
649
+ isValidContext(context, rootContext = context) {
650
+ return isArray(base.get(context, rootContext));
625
651
  }
626
- get(context) {
627
- return flatten(base.get(context));
652
+ get(context, rootContext = context) {
653
+ return flatten(base.get(context, rootContext));
628
654
  }
629
- set(context, value) {
630
- const arr = base.get(context);
655
+ set(value, context, rootContext = context) {
656
+ const arr = base.get(context, rootContext);
631
657
  if (isArray(arr)) {
632
658
  replaceArray(arr, asArray(value));
633
659
  }
634
660
  }
635
- delete(context) {
636
- const arr = base.get(context);
661
+ delete(context, rootContext = context) {
662
+ const arr = base.get(context, rootContext);
637
663
  if (isArray(arr)) {
638
664
  arr.length = 0;
639
665
  }
@@ -648,8 +674,8 @@ function makeJsonSelectorAccessor(selector) {
648
674
  constructor() {
649
675
  super(selector);
650
676
  }
651
- get(context) {
652
- return isFalseOrEmpty(base.get(context));
677
+ get(context, rootContext = context) {
678
+ return isFalseOrEmpty(base.get(context, rootContext));
653
679
  }
654
680
  };
655
681
  return new Accessor();
@@ -662,9 +688,9 @@ function makeJsonSelectorAccessor(selector) {
662
688
  constructor() {
663
689
  super(selector);
664
690
  }
665
- get(context) {
666
- const lv = la.get(context);
667
- const rv = ra.get(context);
691
+ get(context, rootContext = context) {
692
+ const lv = la.get(context, rootContext);
693
+ const rv = ra.get(context, rootContext);
668
694
  return compare(lv, rv, operator);
669
695
  }
670
696
  };
@@ -678,9 +704,9 @@ function makeJsonSelectorAccessor(selector) {
678
704
  constructor() {
679
705
  super(selector);
680
706
  }
681
- get(context) {
682
- const lv = la.get(context);
683
- return isFalseOrEmpty(lv) ? lv : ra.get(context);
707
+ get(context, rootContext = context) {
708
+ const lv = la.get(context, rootContext);
709
+ return isFalseOrEmpty(lv) ? lv : ra.get(context, rootContext);
684
710
  }
685
711
  };
686
712
  return new Accessor();
@@ -693,9 +719,9 @@ function makeJsonSelectorAccessor(selector) {
693
719
  constructor() {
694
720
  super(selector);
695
721
  }
696
- get(context) {
697
- const lv = la.get(context);
698
- return !isFalseOrEmpty(lv) ? lv : ra.get(context);
722
+ get(context, rootContext = context) {
723
+ const lv = la.get(context, rootContext);
724
+ return !isFalseOrEmpty(lv) ? lv : ra.get(context, rootContext);
699
725
  }
700
726
  };
701
727
  return new Accessor();
@@ -708,51 +734,51 @@ function makeJsonSelectorAccessor(selector) {
708
734
  constructor() {
709
735
  super(selector);
710
736
  }
711
- isValidContext(context) {
712
- return ra.isValidContext(la.get(context));
737
+ isValidContext(context, rootContext = context) {
738
+ return ra.isValidContext(la.get(context, rootContext), rootContext);
713
739
  }
714
- get(context) {
715
- return ra.get(la.get(context));
740
+ get(context, rootContext = context) {
741
+ return ra.get(la.get(context, rootContext), rootContext);
716
742
  }
717
- set(context, value) {
718
- ra.set(la.get(context), value);
743
+ set(value, context, rootContext = context) {
744
+ ra.set(value, la.get(context, rootContext), rootContext);
719
745
  }
720
- delete(context) {
721
- ra.delete(la.get(context));
746
+ delete(context, rootContext = context) {
747
+ ra.delete(la.get(context, rootContext), rootContext);
722
748
  }
723
749
  };
724
750
  return new Accessor();
725
751
  },
726
752
  }, undefined);
727
753
  }
728
- function bindJsonSelectorAccessor(unbound, context) {
754
+ function bindJsonSelectorAccessor(unbound, context, rootContext = context) {
729
755
  const { selector } = unbound;
730
- const valid = unbound.isValidContext(context);
756
+ const valid = unbound.isValidContext(context, rootContext);
731
757
  return {
732
758
  selector,
733
759
  valid,
734
760
  path: formatJsonSelector(selector),
735
761
  get() {
736
- return unbound.get(context);
762
+ return unbound.get(context, rootContext);
737
763
  },
738
- set(v) {
739
- unbound.set(context, v);
764
+ set(value) {
765
+ unbound.set(value, context, rootContext);
740
766
  },
741
767
  delete() {
742
- unbound.delete(context);
768
+ unbound.delete(context, rootContext);
743
769
  },
744
770
  };
745
771
  }
746
- function accessWithJsonSelector(selector, context) {
747
- return bindJsonSelectorAccessor(makeJsonSelectorAccessor(selector), context);
772
+ function accessWithJsonSelector(selector, context, rootContext = context) {
773
+ return bindJsonSelectorAccessor(makeJsonSelectorAccessor(selector), context, rootContext);
748
774
  }
749
775
  function replaceArray(target, source) {
750
776
  target.length = 0;
751
777
  target.push(...source);
752
778
  return target;
753
779
  }
754
- function invertedFilter(value, condition) {
755
- return value.filter((e) => isFalseOrEmpty(evaluateJsonSelector(condition, e)));
780
+ function invertedFilter(value, condition, rootContext) {
781
+ return value.filter((e) => isFalseOrEmpty(evaluateJsonSelector(condition, e, rootContext)));
756
782
  }
757
783
  function invertedSlice(value, start, end, step) {
758
784
  ({ start, end, step } = normalizeSlice(value.length, start, end, step));
@@ -833,16 +859,19 @@ peg$SyntaxError.prototype.format = function(sources) {
833
859
  }
834
860
  }
835
861
  var s = this.location.start;
836
- var loc = this.location.source + ":" + s.line + ":" + s.column;
862
+ var offset_s = (this.location.source && (typeof this.location.source.offset === "function"))
863
+ ? this.location.source.offset(s)
864
+ : s;
865
+ var loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;
837
866
  if (src) {
838
867
  var e = this.location.end;
839
- var filler = peg$padEnd("", s.line.toString().length, ' ');
868
+ var filler = peg$padEnd("", offset_s.line.toString().length, ' ');
840
869
  var line = src[s.line - 1];
841
870
  var last = s.line === e.line ? e.column : line.length + 1;
842
871
  var hatLen = (last - s.column) || 1;
843
872
  str += "\n --> " + loc + "\n"
844
873
  + filler + " |\n"
845
- + s.line + " | " + line + "\n"
874
+ + offset_s.line + " | " + line + "\n"
846
875
  + filler + " | " + peg$padEnd("", s.column - 1, ' ')
847
876
  + peg$padEnd("", hatLen, "^");
848
877
  } else {
@@ -979,27 +1008,28 @@ function peg$parse(input, options) {
979
1008
  var peg$c15 = ":";
980
1009
  var peg$c16 = ".";
981
1010
  var peg$c17 = "@";
982
- var peg$c18 = "(";
983
- var peg$c19 = ")";
984
- var peg$c20 = "`";
985
- var peg$c21 = "\"";
986
- var peg$c22 = "\\";
987
- var peg$c23 = "/";
988
- var peg$c24 = "b";
989
- var peg$c25 = "f";
990
- var peg$c26 = "n";
991
- var peg$c27 = "r";
992
- var peg$c28 = "t";
993
- var peg$c29 = "u";
994
- var peg$c30 = "'";
995
- var peg$c31 = "-";
996
- var peg$c32 = "0";
997
- var peg$c33 = "null";
998
- var peg$c34 = "false";
999
- var peg$c35 = "true";
1000
- var peg$c36 = "{";
1001
- var peg$c37 = ",";
1002
- var peg$c38 = "}";
1011
+ var peg$c18 = "$";
1012
+ var peg$c19 = "(";
1013
+ var peg$c20 = ")";
1014
+ var peg$c21 = "`";
1015
+ var peg$c22 = "\"";
1016
+ var peg$c23 = "\\";
1017
+ var peg$c24 = "/";
1018
+ var peg$c25 = "b";
1019
+ var peg$c26 = "f";
1020
+ var peg$c27 = "n";
1021
+ var peg$c28 = "r";
1022
+ var peg$c29 = "t";
1023
+ var peg$c30 = "u";
1024
+ var peg$c31 = "'";
1025
+ var peg$c32 = "-";
1026
+ var peg$c33 = "0";
1027
+ var peg$c34 = "null";
1028
+ var peg$c35 = "false";
1029
+ var peg$c36 = "true";
1030
+ var peg$c37 = "{";
1031
+ var peg$c38 = ",";
1032
+ var peg$c39 = "}";
1003
1033
 
1004
1034
  var peg$r0 = /^[a-z_]/i;
1005
1035
  var peg$r1 = /^[0-9a-z_]/i;
@@ -1032,40 +1062,41 @@ function peg$parse(input, options) {
1032
1062
  var peg$e15 = peg$literalExpectation(":", false);
1033
1063
  var peg$e16 = peg$literalExpectation(".", false);
1034
1064
  var peg$e17 = peg$literalExpectation("@", false);
1035
- var peg$e18 = peg$literalExpectation("(", false);
1036
- var peg$e19 = peg$literalExpectation(")", false);
1037
- var peg$e20 = peg$literalExpectation("`", false);
1038
- var peg$e21 = peg$classExpectation([["a", "z"], "_"], false, true);
1039
- var peg$e22 = peg$classExpectation([["0", "9"], ["a", "z"], "_"], false, true);
1040
- var peg$e23 = peg$literalExpectation("\"", false);
1041
- var peg$e24 = peg$classExpectation([["\0", "\x1F"], "\"", "\\"], true, false);
1042
- var peg$e25 = peg$literalExpectation("\\", false);
1043
- var peg$e26 = peg$literalExpectation("/", false);
1044
- var peg$e27 = peg$literalExpectation("b", false);
1045
- var peg$e28 = peg$literalExpectation("f", false);
1046
- var peg$e29 = peg$literalExpectation("n", false);
1047
- var peg$e30 = peg$literalExpectation("r", false);
1048
- var peg$e31 = peg$literalExpectation("t", false);
1049
- var peg$e32 = peg$literalExpectation("u", false);
1050
- var peg$e33 = peg$classExpectation([["0", "9"], ["a", "f"]], false, true);
1051
- var peg$e34 = peg$literalExpectation("'", false);
1052
- var peg$e35 = peg$classExpectation(["'", "\\"], true, false);
1053
- var peg$e36 = peg$classExpectation(["'"], true, false);
1054
- var peg$e37 = peg$literalExpectation("-", false);
1055
- var peg$e38 = peg$literalExpectation("0", false);
1056
- var peg$e39 = peg$classExpectation([["1", "9"]], false, false);
1057
- var peg$e40 = peg$classExpectation([["0", "9"]], false, false);
1058
- var peg$e41 = peg$literalExpectation("null", false);
1059
- var peg$e42 = peg$literalExpectation("false", false);
1060
- var peg$e43 = peg$literalExpectation("true", false);
1061
- var peg$e44 = peg$classExpectation(["e", "E"], false, false);
1062
- var peg$e45 = peg$classExpectation(["+", "-"], false, false);
1063
- var peg$e46 = peg$classExpectation([["\0", "\x1F"], "\"", "\\", "`"], true, false);
1064
- var peg$e47 = peg$literalExpectation("{", false);
1065
- var peg$e48 = peg$literalExpectation(",", false);
1066
- var peg$e49 = peg$literalExpectation("}", false);
1067
- var peg$e50 = peg$otherExpectation("whitespace");
1068
- var peg$e51 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false);
1065
+ var peg$e18 = peg$literalExpectation("$", false);
1066
+ var peg$e19 = peg$literalExpectation("(", false);
1067
+ var peg$e20 = peg$literalExpectation(")", false);
1068
+ var peg$e21 = peg$literalExpectation("`", false);
1069
+ var peg$e22 = peg$classExpectation([["a", "z"], "_"], false, true);
1070
+ var peg$e23 = peg$classExpectation([["0", "9"], ["a", "z"], "_"], false, true);
1071
+ var peg$e24 = peg$literalExpectation("\"", false);
1072
+ var peg$e25 = peg$classExpectation([["\0", "\x1F"], "\"", "\\"], true, false);
1073
+ var peg$e26 = peg$literalExpectation("\\", false);
1074
+ var peg$e27 = peg$literalExpectation("/", false);
1075
+ var peg$e28 = peg$literalExpectation("b", false);
1076
+ var peg$e29 = peg$literalExpectation("f", false);
1077
+ var peg$e30 = peg$literalExpectation("n", false);
1078
+ var peg$e31 = peg$literalExpectation("r", false);
1079
+ var peg$e32 = peg$literalExpectation("t", false);
1080
+ var peg$e33 = peg$literalExpectation("u", false);
1081
+ var peg$e34 = peg$classExpectation([["0", "9"], ["a", "f"]], false, true);
1082
+ var peg$e35 = peg$literalExpectation("'", false);
1083
+ var peg$e36 = peg$classExpectation(["'", "\\"], true, false);
1084
+ var peg$e37 = peg$classExpectation(["'"], true, false);
1085
+ var peg$e38 = peg$literalExpectation("-", false);
1086
+ var peg$e39 = peg$literalExpectation("0", false);
1087
+ var peg$e40 = peg$classExpectation([["1", "9"]], false, false);
1088
+ var peg$e41 = peg$classExpectation([["0", "9"]], false, false);
1089
+ var peg$e42 = peg$literalExpectation("null", false);
1090
+ var peg$e43 = peg$literalExpectation("false", false);
1091
+ var peg$e44 = peg$literalExpectation("true", false);
1092
+ var peg$e45 = peg$classExpectation(["e", "E"], false, false);
1093
+ var peg$e46 = peg$classExpectation(["+", "-"], false, false);
1094
+ var peg$e47 = peg$classExpectation([["\0", "\x1F"], "\"", "\\", "`"], true, false);
1095
+ var peg$e48 = peg$literalExpectation("{", false);
1096
+ var peg$e49 = peg$literalExpectation(",", false);
1097
+ var peg$e50 = peg$literalExpectation("}", false);
1098
+ var peg$e51 = peg$otherExpectation("whitespace");
1099
+ var peg$e52 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false);
1069
1100
 
1070
1101
  var peg$f0 = function(head, tail) { return binaryExpression("pipe", head, tail); };
1071
1102
  var peg$f1 = function(head, tail) { return binaryExpression("or", head, tail); };
@@ -1093,7 +1124,15 @@ function peg$parse(input, options) {
1093
1124
  var peg$f14 = function(projection) { return projection({ type: "current" }); };
1094
1125
  var peg$f15 = function(projection, pfns) { return (expression) => maybeProject(projection(expression), pfns); };
1095
1126
  var peg$f16 = function() { return (expression) => ({ type: "project", expression, projection: { type: "current" } }); };
1096
- var peg$f17 = function(start, end, step) { return (expression) => ({ type: "slice", expression, start, end, step }); };
1127
+ var peg$f17 = function(start, end, step) {
1128
+ return (expression) => ({
1129
+ type: "slice",
1130
+ expression,
1131
+ start: start ?? undefined,
1132
+ end: end ?? undefined,
1133
+ step: step ?? undefined,
1134
+ });
1135
+ };
1097
1136
  var peg$f18 = function(lhs, rhs) { return reduceProjection(lhs, rhs); };
1098
1137
  var peg$f19 = function(index) { return index({ type: "current" }); };
1099
1138
  var peg$f20 = function(index) { return (expression) => ({ type: "indexAccess", expression, index }); };
@@ -1102,31 +1141,32 @@ function peg$parse(input, options) {
1102
1141
  var peg$f23 = function(lhs, rhs) { return reduceProjection(lhs, rhs); };
1103
1142
  var peg$f24 = function(id) { return { type: "identifier", id }; };
1104
1143
  var peg$f25 = function() { return { type: "current" }; };
1105
- var peg$f26 = function(value) { return { type: "literal", value }; };
1144
+ var peg$f26 = function() { return { type: "root" }; };
1106
1145
  var peg$f27 = function(value) { return { type: "literal", value }; };
1107
- var peg$f28 = function(head, tail) { return head + tail.join(""); };
1108
- var peg$f29 = function(chars) { return chars.join(""); };
1109
- var peg$f30 = function() { return "\b"; };
1110
- var peg$f31 = function() { return "\f"; };
1111
- var peg$f32 = function() { return "\n"; };
1112
- var peg$f33 = function() { return "\r"; };
1113
- var peg$f34 = function() { return "\t"; };
1114
- var peg$f35 = function(digits) {
1146
+ var peg$f28 = function(value) { return { type: "literal", value }; };
1147
+ var peg$f29 = function(head, tail) { return head + tail.join(""); };
1148
+ var peg$f30 = function(chars) { return chars.join(""); };
1149
+ var peg$f31 = function() { return "\b"; };
1150
+ var peg$f32 = function() { return "\f"; };
1151
+ var peg$f33 = function() { return "\n"; };
1152
+ var peg$f34 = function() { return "\r"; };
1153
+ var peg$f35 = function() { return "\t"; };
1154
+ var peg$f36 = function(digits) {
1115
1155
  return String.fromCharCode(parseInt(digits, 16));
1116
1156
  };
1117
- var peg$f36 = function(chars) { return chars.join(""); };
1118
- var peg$f37 = function() { return text(); };
1119
- var peg$f38 = function() { return parseInt(text()); };
1120
- var peg$f39 = function() { return null; };
1121
- var peg$f40 = function() { return false; };
1122
- var peg$f41 = function() { return true; };
1123
- var peg$f42 = function() { return parseFloat(text()); };
1124
- var peg$f43 = function(chars) { return chars.join(""); };
1125
- var peg$f44 = function(head, tail) { return [head].concat(tail); };
1126
- var peg$f45 = function(members) { return Object.fromEntries(members ?? []); };
1127
- var peg$f46 = function(name, value) { return [name, value]; };
1128
- var peg$f47 = function(head, tail) { return [head].concat(tail); };
1129
- var peg$f48 = function(values) { return values ?? []; };
1157
+ var peg$f37 = function(chars) { return chars.join(""); };
1158
+ var peg$f38 = function() { return text(); };
1159
+ var peg$f39 = function() { return parseInt(text()); };
1160
+ var peg$f40 = function() { return null; };
1161
+ var peg$f41 = function() { return false; };
1162
+ var peg$f42 = function() { return true; };
1163
+ var peg$f43 = function() { return parseFloat(text()); };
1164
+ var peg$f44 = function(chars) { return chars.join(""); };
1165
+ var peg$f45 = function(head, tail) { return [head].concat(tail); };
1166
+ var peg$f46 = function(members) { return Object.fromEntries(members ?? []); };
1167
+ var peg$f47 = function(name, value) { return [name, value]; };
1168
+ var peg$f48 = function(head, tail) { return [head].concat(tail); };
1169
+ var peg$f49 = function(values) { return values ?? []; };
1130
1170
  var peg$currPos = 0;
1131
1171
  var peg$savedPos = 0;
1132
1172
  var peg$posDetailsCache = [{ line: 1, column: 1 }];
@@ -1199,11 +1239,11 @@ function peg$parse(input, options) {
1199
1239
  }
1200
1240
  }
1201
1241
 
1202
- function peg$computeLocation(startPos, endPos) {
1242
+ function peg$computeLocation(startPos, endPos, offset) {
1203
1243
  var startPosDetails = peg$computePosDetails(startPos);
1204
1244
  var endPosDetails = peg$computePosDetails(endPos);
1205
1245
 
1206
- return {
1246
+ var res = {
1207
1247
  source: peg$source,
1208
1248
  start: {
1209
1249
  offset: startPos,
@@ -1216,6 +1256,11 @@ function peg$parse(input, options) {
1216
1256
  column: endPosDetails.column
1217
1257
  }
1218
1258
  };
1259
+ if (offset && peg$source && (typeof peg$source.offset === "function")) {
1260
+ res.start = peg$source.offset(res.start);
1261
+ res.end = peg$source.offset(res.end);
1262
+ }
1263
+ return res;
1219
1264
  }
1220
1265
 
1221
1266
  function peg$fail(expected) {
@@ -2217,36 +2262,54 @@ function peg$parse(input, options) {
2217
2262
  }
2218
2263
  s0 = s1;
2219
2264
  if (s0 === peg$FAILED) {
2220
- s0 = peg$parseliteral();
2265
+ s0 = peg$currPos;
2266
+ if (input.charCodeAt(peg$currPos) === 36) {
2267
+ s1 = peg$c18;
2268
+ peg$currPos++;
2269
+ } else {
2270
+ s1 = peg$FAILED;
2271
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
2272
+ }
2273
+ if (s1 !== peg$FAILED) {
2274
+ peg$savedPos = s0;
2275
+ s1 = peg$f26();
2276
+ }
2277
+ s0 = s1;
2221
2278
  if (s0 === peg$FAILED) {
2222
- s0 = peg$currPos;
2223
- s1 = peg$parseraw_string();
2224
- if (s1 !== peg$FAILED) {
2225
- peg$savedPos = s0;
2226
- s1 = peg$f26(s1);
2227
- }
2228
- s0 = s1;
2279
+ s0 = peg$parseliteral();
2229
2280
  if (s0 === peg$FAILED) {
2230
2281
  s0 = peg$currPos;
2231
- if (input.charCodeAt(peg$currPos) === 40) {
2232
- s1 = peg$c18;
2233
- peg$currPos++;
2234
- } else {
2235
- s1 = peg$FAILED;
2236
- if (peg$silentFails === 0) { peg$fail(peg$e18); }
2237
- }
2282
+ s1 = peg$parseraw_string();
2238
2283
  if (s1 !== peg$FAILED) {
2239
- s2 = peg$parseselector();
2240
- if (s2 !== peg$FAILED) {
2241
- if (input.charCodeAt(peg$currPos) === 41) {
2242
- s3 = peg$c19;
2243
- peg$currPos++;
2244
- } else {
2245
- s3 = peg$FAILED;
2246
- if (peg$silentFails === 0) { peg$fail(peg$e19); }
2247
- }
2248
- if (s3 !== peg$FAILED) {
2249
- s0 = s2;
2284
+ peg$savedPos = s0;
2285
+ s1 = peg$f27(s1);
2286
+ }
2287
+ s0 = s1;
2288
+ if (s0 === peg$FAILED) {
2289
+ s0 = peg$currPos;
2290
+ if (input.charCodeAt(peg$currPos) === 40) {
2291
+ s1 = peg$c19;
2292
+ peg$currPos++;
2293
+ } else {
2294
+ s1 = peg$FAILED;
2295
+ if (peg$silentFails === 0) { peg$fail(peg$e19); }
2296
+ }
2297
+ if (s1 !== peg$FAILED) {
2298
+ s2 = peg$parseselector();
2299
+ if (s2 !== peg$FAILED) {
2300
+ if (input.charCodeAt(peg$currPos) === 41) {
2301
+ s3 = peg$c20;
2302
+ peg$currPos++;
2303
+ } else {
2304
+ s3 = peg$FAILED;
2305
+ if (peg$silentFails === 0) { peg$fail(peg$e20); }
2306
+ }
2307
+ if (s3 !== peg$FAILED) {
2308
+ s0 = s2;
2309
+ } else {
2310
+ peg$currPos = s0;
2311
+ s0 = peg$FAILED;
2312
+ }
2250
2313
  } else {
2251
2314
  peg$currPos = s0;
2252
2315
  s0 = peg$FAILED;
@@ -2255,9 +2318,6 @@ function peg$parse(input, options) {
2255
2318
  peg$currPos = s0;
2256
2319
  s0 = peg$FAILED;
2257
2320
  }
2258
- } else {
2259
- peg$currPos = s0;
2260
- s0 = peg$FAILED;
2261
2321
  }
2262
2322
  }
2263
2323
  }
@@ -2272,11 +2332,11 @@ function peg$parse(input, options) {
2272
2332
 
2273
2333
  s0 = peg$currPos;
2274
2334
  if (input.charCodeAt(peg$currPos) === 96) {
2275
- s1 = peg$c20;
2335
+ s1 = peg$c21;
2276
2336
  peg$currPos++;
2277
2337
  } else {
2278
2338
  s1 = peg$FAILED;
2279
- if (peg$silentFails === 0) { peg$fail(peg$e20); }
2339
+ if (peg$silentFails === 0) { peg$fail(peg$e21); }
2280
2340
  }
2281
2341
  if (s1 !== peg$FAILED) {
2282
2342
  peg$parsews();
@@ -2287,15 +2347,15 @@ function peg$parse(input, options) {
2287
2347
  if (s3 !== peg$FAILED) {
2288
2348
  peg$parsews();
2289
2349
  if (input.charCodeAt(peg$currPos) === 96) {
2290
- s5 = peg$c20;
2350
+ s5 = peg$c21;
2291
2351
  peg$currPos++;
2292
2352
  } else {
2293
2353
  s5 = peg$FAILED;
2294
- if (peg$silentFails === 0) { peg$fail(peg$e20); }
2354
+ if (peg$silentFails === 0) { peg$fail(peg$e21); }
2295
2355
  }
2296
2356
  if (s5 !== peg$FAILED) {
2297
2357
  peg$savedPos = s0;
2298
- s0 = peg$f27(s3);
2358
+ s0 = peg$f28(s3);
2299
2359
  } else {
2300
2360
  peg$currPos = s0;
2301
2361
  s0 = peg$FAILED;
@@ -2332,7 +2392,7 @@ function peg$parse(input, options) {
2332
2392
  peg$currPos++;
2333
2393
  } else {
2334
2394
  s1 = peg$FAILED;
2335
- if (peg$silentFails === 0) { peg$fail(peg$e21); }
2395
+ if (peg$silentFails === 0) { peg$fail(peg$e22); }
2336
2396
  }
2337
2397
  if (s1 !== peg$FAILED) {
2338
2398
  s2 = [];
@@ -2341,7 +2401,7 @@ function peg$parse(input, options) {
2341
2401
  peg$currPos++;
2342
2402
  } else {
2343
2403
  s3 = peg$FAILED;
2344
- if (peg$silentFails === 0) { peg$fail(peg$e22); }
2404
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
2345
2405
  }
2346
2406
  while (s3 !== peg$FAILED) {
2347
2407
  s2.push(s3);
@@ -2350,11 +2410,11 @@ function peg$parse(input, options) {
2350
2410
  peg$currPos++;
2351
2411
  } else {
2352
2412
  s3 = peg$FAILED;
2353
- if (peg$silentFails === 0) { peg$fail(peg$e22); }
2413
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
2354
2414
  }
2355
2415
  }
2356
2416
  peg$savedPos = s0;
2357
- s0 = peg$f28(s1, s2);
2417
+ s0 = peg$f29(s1, s2);
2358
2418
  } else {
2359
2419
  peg$currPos = s0;
2360
2420
  s0 = peg$FAILED;
@@ -2368,11 +2428,11 @@ function peg$parse(input, options) {
2368
2428
 
2369
2429
  s0 = peg$currPos;
2370
2430
  if (input.charCodeAt(peg$currPos) === 34) {
2371
- s1 = peg$c21;
2431
+ s1 = peg$c22;
2372
2432
  peg$currPos++;
2373
2433
  } else {
2374
2434
  s1 = peg$FAILED;
2375
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
2435
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
2376
2436
  }
2377
2437
  if (s1 !== peg$FAILED) {
2378
2438
  s2 = [];
@@ -2382,15 +2442,15 @@ function peg$parse(input, options) {
2382
2442
  s3 = peg$parsechar();
2383
2443
  }
2384
2444
  if (input.charCodeAt(peg$currPos) === 34) {
2385
- s3 = peg$c21;
2445
+ s3 = peg$c22;
2386
2446
  peg$currPos++;
2387
2447
  } else {
2388
2448
  s3 = peg$FAILED;
2389
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
2449
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
2390
2450
  }
2391
2451
  if (s3 !== peg$FAILED) {
2392
2452
  peg$savedPos = s0;
2393
- s0 = peg$f29(s2);
2453
+ s0 = peg$f30(s2);
2394
2454
  } else {
2395
2455
  peg$currPos = s0;
2396
2456
  s0 = peg$FAILED;
@@ -2422,7 +2482,7 @@ function peg$parse(input, options) {
2422
2482
  peg$currPos++;
2423
2483
  } else {
2424
2484
  s0 = peg$FAILED;
2425
- if (peg$silentFails === 0) { peg$fail(peg$e24); }
2485
+ if (peg$silentFails === 0) { peg$fail(peg$e25); }
2426
2486
  }
2427
2487
 
2428
2488
  return s0;
@@ -2433,114 +2493,114 @@ function peg$parse(input, options) {
2433
2493
 
2434
2494
  s0 = peg$currPos;
2435
2495
  if (input.charCodeAt(peg$currPos) === 92) {
2436
- s1 = peg$c22;
2496
+ s1 = peg$c23;
2437
2497
  peg$currPos++;
2438
2498
  } else {
2439
2499
  s1 = peg$FAILED;
2440
- if (peg$silentFails === 0) { peg$fail(peg$e25); }
2500
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
2441
2501
  }
2442
2502
  if (s1 !== peg$FAILED) {
2443
2503
  if (input.charCodeAt(peg$currPos) === 34) {
2444
- s2 = peg$c21;
2504
+ s2 = peg$c22;
2445
2505
  peg$currPos++;
2446
2506
  } else {
2447
2507
  s2 = peg$FAILED;
2448
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
2508
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
2449
2509
  }
2450
2510
  if (s2 === peg$FAILED) {
2451
2511
  if (input.charCodeAt(peg$currPos) === 92) {
2452
- s2 = peg$c22;
2512
+ s2 = peg$c23;
2453
2513
  peg$currPos++;
2454
2514
  } else {
2455
2515
  s2 = peg$FAILED;
2456
- if (peg$silentFails === 0) { peg$fail(peg$e25); }
2516
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
2457
2517
  }
2458
2518
  if (s2 === peg$FAILED) {
2459
2519
  if (input.charCodeAt(peg$currPos) === 47) {
2460
- s2 = peg$c23;
2520
+ s2 = peg$c24;
2461
2521
  peg$currPos++;
2462
2522
  } else {
2463
2523
  s2 = peg$FAILED;
2464
- if (peg$silentFails === 0) { peg$fail(peg$e26); }
2524
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
2465
2525
  }
2466
2526
  if (s2 === peg$FAILED) {
2467
2527
  s2 = peg$currPos;
2468
2528
  if (input.charCodeAt(peg$currPos) === 98) {
2469
- s3 = peg$c24;
2529
+ s3 = peg$c25;
2470
2530
  peg$currPos++;
2471
2531
  } else {
2472
2532
  s3 = peg$FAILED;
2473
- if (peg$silentFails === 0) { peg$fail(peg$e27); }
2533
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
2474
2534
  }
2475
2535
  if (s3 !== peg$FAILED) {
2476
2536
  peg$savedPos = s2;
2477
- s3 = peg$f30();
2537
+ s3 = peg$f31();
2478
2538
  }
2479
2539
  s2 = s3;
2480
2540
  if (s2 === peg$FAILED) {
2481
2541
  s2 = peg$currPos;
2482
2542
  if (input.charCodeAt(peg$currPos) === 102) {
2483
- s3 = peg$c25;
2543
+ s3 = peg$c26;
2484
2544
  peg$currPos++;
2485
2545
  } else {
2486
2546
  s3 = peg$FAILED;
2487
- if (peg$silentFails === 0) { peg$fail(peg$e28); }
2547
+ if (peg$silentFails === 0) { peg$fail(peg$e29); }
2488
2548
  }
2489
2549
  if (s3 !== peg$FAILED) {
2490
2550
  peg$savedPos = s2;
2491
- s3 = peg$f31();
2551
+ s3 = peg$f32();
2492
2552
  }
2493
2553
  s2 = s3;
2494
2554
  if (s2 === peg$FAILED) {
2495
2555
  s2 = peg$currPos;
2496
2556
  if (input.charCodeAt(peg$currPos) === 110) {
2497
- s3 = peg$c26;
2557
+ s3 = peg$c27;
2498
2558
  peg$currPos++;
2499
2559
  } else {
2500
2560
  s3 = peg$FAILED;
2501
- if (peg$silentFails === 0) { peg$fail(peg$e29); }
2561
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
2502
2562
  }
2503
2563
  if (s3 !== peg$FAILED) {
2504
2564
  peg$savedPos = s2;
2505
- s3 = peg$f32();
2565
+ s3 = peg$f33();
2506
2566
  }
2507
2567
  s2 = s3;
2508
2568
  if (s2 === peg$FAILED) {
2509
2569
  s2 = peg$currPos;
2510
2570
  if (input.charCodeAt(peg$currPos) === 114) {
2511
- s3 = peg$c27;
2571
+ s3 = peg$c28;
2512
2572
  peg$currPos++;
2513
2573
  } else {
2514
2574
  s3 = peg$FAILED;
2515
- if (peg$silentFails === 0) { peg$fail(peg$e30); }
2575
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
2516
2576
  }
2517
2577
  if (s3 !== peg$FAILED) {
2518
2578
  peg$savedPos = s2;
2519
- s3 = peg$f33();
2579
+ s3 = peg$f34();
2520
2580
  }
2521
2581
  s2 = s3;
2522
2582
  if (s2 === peg$FAILED) {
2523
2583
  s2 = peg$currPos;
2524
2584
  if (input.charCodeAt(peg$currPos) === 116) {
2525
- s3 = peg$c28;
2585
+ s3 = peg$c29;
2526
2586
  peg$currPos++;
2527
2587
  } else {
2528
2588
  s3 = peg$FAILED;
2529
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
2589
+ if (peg$silentFails === 0) { peg$fail(peg$e32); }
2530
2590
  }
2531
2591
  if (s3 !== peg$FAILED) {
2532
2592
  peg$savedPos = s2;
2533
- s3 = peg$f34();
2593
+ s3 = peg$f35();
2534
2594
  }
2535
2595
  s2 = s3;
2536
2596
  if (s2 === peg$FAILED) {
2537
2597
  s2 = peg$currPos;
2538
2598
  if (input.charCodeAt(peg$currPos) === 117) {
2539
- s3 = peg$c29;
2599
+ s3 = peg$c30;
2540
2600
  peg$currPos++;
2541
2601
  } else {
2542
2602
  s3 = peg$FAILED;
2543
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
2603
+ if (peg$silentFails === 0) { peg$fail(peg$e33); }
2544
2604
  }
2545
2605
  if (s3 !== peg$FAILED) {
2546
2606
  s4 = peg$currPos;
@@ -2578,7 +2638,7 @@ function peg$parse(input, options) {
2578
2638
  }
2579
2639
  if (s4 !== peg$FAILED) {
2580
2640
  peg$savedPos = s2;
2581
- s2 = peg$f35(s4);
2641
+ s2 = peg$f36(s4);
2582
2642
  } else {
2583
2643
  peg$currPos = s2;
2584
2644
  s2 = peg$FAILED;
@@ -2617,7 +2677,7 @@ function peg$parse(input, options) {
2617
2677
  peg$currPos++;
2618
2678
  } else {
2619
2679
  s0 = peg$FAILED;
2620
- if (peg$silentFails === 0) { peg$fail(peg$e33); }
2680
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
2621
2681
  }
2622
2682
 
2623
2683
  return s0;
@@ -2628,11 +2688,11 @@ function peg$parse(input, options) {
2628
2688
 
2629
2689
  s0 = peg$currPos;
2630
2690
  if (input.charCodeAt(peg$currPos) === 39) {
2631
- s1 = peg$c30;
2691
+ s1 = peg$c31;
2632
2692
  peg$currPos++;
2633
2693
  } else {
2634
2694
  s1 = peg$FAILED;
2635
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
2695
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
2636
2696
  }
2637
2697
  if (s1 !== peg$FAILED) {
2638
2698
  s2 = [];
@@ -2642,15 +2702,15 @@ function peg$parse(input, options) {
2642
2702
  s3 = peg$parseraw_string_char();
2643
2703
  }
2644
2704
  if (input.charCodeAt(peg$currPos) === 39) {
2645
- s3 = peg$c30;
2705
+ s3 = peg$c31;
2646
2706
  peg$currPos++;
2647
2707
  } else {
2648
2708
  s3 = peg$FAILED;
2649
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
2709
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
2650
2710
  }
2651
2711
  if (s3 !== peg$FAILED) {
2652
2712
  peg$savedPos = s0;
2653
- s0 = peg$f36(s2);
2713
+ s0 = peg$f37(s2);
2654
2714
  } else {
2655
2715
  peg$currPos = s0;
2656
2716
  s0 = peg$FAILED;
@@ -2685,7 +2745,7 @@ function peg$parse(input, options) {
2685
2745
  peg$currPos++;
2686
2746
  } else {
2687
2747
  s0 = peg$FAILED;
2688
- if (peg$silentFails === 0) { peg$fail(peg$e35); }
2748
+ if (peg$silentFails === 0) { peg$fail(peg$e36); }
2689
2749
  }
2690
2750
 
2691
2751
  return s0;
@@ -2696,11 +2756,11 @@ function peg$parse(input, options) {
2696
2756
 
2697
2757
  s0 = peg$currPos;
2698
2758
  if (input.charCodeAt(peg$currPos) === 92) {
2699
- s1 = peg$c22;
2759
+ s1 = peg$c23;
2700
2760
  peg$currPos++;
2701
2761
  } else {
2702
2762
  s1 = peg$FAILED;
2703
- if (peg$silentFails === 0) { peg$fail(peg$e25); }
2763
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
2704
2764
  }
2705
2765
  if (s1 !== peg$FAILED) {
2706
2766
  if (peg$r5.test(input.charAt(peg$currPos))) {
@@ -2708,11 +2768,11 @@ function peg$parse(input, options) {
2708
2768
  peg$currPos++;
2709
2769
  } else {
2710
2770
  s2 = peg$FAILED;
2711
- if (peg$silentFails === 0) { peg$fail(peg$e36); }
2771
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
2712
2772
  }
2713
2773
  if (s2 !== peg$FAILED) {
2714
2774
  peg$savedPos = s0;
2715
- s0 = peg$f37();
2775
+ s0 = peg$f38();
2716
2776
  } else {
2717
2777
  peg$currPos = s0;
2718
2778
  s0 = peg$FAILED;
@@ -2730,19 +2790,19 @@ function peg$parse(input, options) {
2730
2790
 
2731
2791
  s0 = peg$currPos;
2732
2792
  if (input.charCodeAt(peg$currPos) === 92) {
2733
- s1 = peg$c22;
2793
+ s1 = peg$c23;
2734
2794
  peg$currPos++;
2735
2795
  } else {
2736
2796
  s1 = peg$FAILED;
2737
- if (peg$silentFails === 0) { peg$fail(peg$e25); }
2797
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
2738
2798
  }
2739
2799
  if (s1 !== peg$FAILED) {
2740
2800
  if (input.charCodeAt(peg$currPos) === 39) {
2741
- s2 = peg$c30;
2801
+ s2 = peg$c31;
2742
2802
  peg$currPos++;
2743
2803
  } else {
2744
2804
  s2 = peg$FAILED;
2745
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
2805
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
2746
2806
  }
2747
2807
  if (s2 !== peg$FAILED) {
2748
2808
  s0 = s2;
@@ -2765,7 +2825,7 @@ function peg$parse(input, options) {
2765
2825
  s1 = peg$parseint();
2766
2826
  if (s1 !== peg$FAILED) {
2767
2827
  peg$savedPos = s0;
2768
- s1 = peg$f38();
2828
+ s1 = peg$f39();
2769
2829
  }
2770
2830
  s0 = s1;
2771
2831
 
@@ -2777,21 +2837,21 @@ function peg$parse(input, options) {
2777
2837
 
2778
2838
  s0 = peg$currPos;
2779
2839
  if (input.charCodeAt(peg$currPos) === 45) {
2780
- s1 = peg$c31;
2840
+ s1 = peg$c32;
2781
2841
  peg$currPos++;
2782
2842
  } else {
2783
2843
  s1 = peg$FAILED;
2784
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
2844
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
2785
2845
  }
2786
2846
  if (s1 === peg$FAILED) {
2787
2847
  s1 = null;
2788
2848
  }
2789
2849
  if (input.charCodeAt(peg$currPos) === 48) {
2790
- s2 = peg$c32;
2850
+ s2 = peg$c33;
2791
2851
  peg$currPos++;
2792
2852
  } else {
2793
2853
  s2 = peg$FAILED;
2794
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
2854
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
2795
2855
  }
2796
2856
  if (s2 === peg$FAILED) {
2797
2857
  s2 = peg$currPos;
@@ -2800,7 +2860,7 @@ function peg$parse(input, options) {
2800
2860
  peg$currPos++;
2801
2861
  } else {
2802
2862
  s3 = peg$FAILED;
2803
- if (peg$silentFails === 0) { peg$fail(peg$e39); }
2863
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
2804
2864
  }
2805
2865
  if (s3 !== peg$FAILED) {
2806
2866
  s4 = [];
@@ -2809,7 +2869,7 @@ function peg$parse(input, options) {
2809
2869
  peg$currPos++;
2810
2870
  } else {
2811
2871
  s5 = peg$FAILED;
2812
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
2872
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
2813
2873
  }
2814
2874
  while (s5 !== peg$FAILED) {
2815
2875
  s4.push(s5);
@@ -2818,7 +2878,7 @@ function peg$parse(input, options) {
2818
2878
  peg$currPos++;
2819
2879
  } else {
2820
2880
  s5 = peg$FAILED;
2821
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
2881
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
2822
2882
  }
2823
2883
  }
2824
2884
  s3 = [s3, s4];
@@ -2843,44 +2903,44 @@ function peg$parse(input, options) {
2843
2903
  var s0, s1;
2844
2904
 
2845
2905
  s0 = peg$currPos;
2846
- if (input.substr(peg$currPos, 4) === peg$c33) {
2847
- s1 = peg$c33;
2906
+ if (input.substr(peg$currPos, 4) === peg$c34) {
2907
+ s1 = peg$c34;
2848
2908
  peg$currPos += 4;
2849
2909
  } else {
2850
2910
  s1 = peg$FAILED;
2851
- if (peg$silentFails === 0) { peg$fail(peg$e41); }
2911
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
2852
2912
  }
2853
2913
  if (s1 !== peg$FAILED) {
2854
2914
  peg$savedPos = s0;
2855
- s1 = peg$f39();
2915
+ s1 = peg$f40();
2856
2916
  }
2857
2917
  s0 = s1;
2858
2918
  if (s0 === peg$FAILED) {
2859
2919
  s0 = peg$currPos;
2860
- if (input.substr(peg$currPos, 5) === peg$c34) {
2861
- s1 = peg$c34;
2920
+ if (input.substr(peg$currPos, 5) === peg$c35) {
2921
+ s1 = peg$c35;
2862
2922
  peg$currPos += 5;
2863
2923
  } else {
2864
2924
  s1 = peg$FAILED;
2865
- if (peg$silentFails === 0) { peg$fail(peg$e42); }
2925
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
2866
2926
  }
2867
2927
  if (s1 !== peg$FAILED) {
2868
2928
  peg$savedPos = s0;
2869
- s1 = peg$f40();
2929
+ s1 = peg$f41();
2870
2930
  }
2871
2931
  s0 = s1;
2872
2932
  if (s0 === peg$FAILED) {
2873
2933
  s0 = peg$currPos;
2874
- if (input.substr(peg$currPos, 4) === peg$c35) {
2875
- s1 = peg$c35;
2934
+ if (input.substr(peg$currPos, 4) === peg$c36) {
2935
+ s1 = peg$c36;
2876
2936
  peg$currPos += 4;
2877
2937
  } else {
2878
2938
  s1 = peg$FAILED;
2879
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
2939
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
2880
2940
  }
2881
2941
  if (s1 !== peg$FAILED) {
2882
2942
  peg$savedPos = s0;
2883
- s1 = peg$f41();
2943
+ s1 = peg$f42();
2884
2944
  }
2885
2945
  s0 = s1;
2886
2946
  if (s0 === peg$FAILED) {
@@ -2922,7 +2982,7 @@ function peg$parse(input, options) {
2922
2982
  peg$currPos++;
2923
2983
  } else {
2924
2984
  s5 = peg$FAILED;
2925
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
2985
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
2926
2986
  }
2927
2987
  if (s5 !== peg$FAILED) {
2928
2988
  while (s5 !== peg$FAILED) {
@@ -2932,7 +2992,7 @@ function peg$parse(input, options) {
2932
2992
  peg$currPos++;
2933
2993
  } else {
2934
2994
  s5 = peg$FAILED;
2935
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
2995
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
2936
2996
  }
2937
2997
  }
2938
2998
  } else {
@@ -2958,7 +3018,7 @@ function peg$parse(input, options) {
2958
3018
  peg$currPos++;
2959
3019
  } else {
2960
3020
  s4 = peg$FAILED;
2961
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
3021
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
2962
3022
  }
2963
3023
  if (s4 !== peg$FAILED) {
2964
3024
  if (peg$r9.test(input.charAt(peg$currPos))) {
@@ -2966,7 +3026,7 @@ function peg$parse(input, options) {
2966
3026
  peg$currPos++;
2967
3027
  } else {
2968
3028
  s5 = peg$FAILED;
2969
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3029
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
2970
3030
  }
2971
3031
  if (s5 === peg$FAILED) {
2972
3032
  s5 = null;
@@ -2977,7 +3037,7 @@ function peg$parse(input, options) {
2977
3037
  peg$currPos++;
2978
3038
  } else {
2979
3039
  s7 = peg$FAILED;
2980
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
3040
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
2981
3041
  }
2982
3042
  if (s7 !== peg$FAILED) {
2983
3043
  while (s7 !== peg$FAILED) {
@@ -2987,7 +3047,7 @@ function peg$parse(input, options) {
2987
3047
  peg$currPos++;
2988
3048
  } else {
2989
3049
  s7 = peg$FAILED;
2990
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
3050
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
2991
3051
  }
2992
3052
  }
2993
3053
  } else {
@@ -3008,7 +3068,7 @@ function peg$parse(input, options) {
3008
3068
  s3 = null;
3009
3069
  }
3010
3070
  peg$savedPos = s0;
3011
- s0 = peg$f42();
3071
+ s0 = peg$f43();
3012
3072
  } else {
3013
3073
  peg$currPos = s0;
3014
3074
  s0 = peg$FAILED;
@@ -3022,20 +3082,20 @@ function peg$parse(input, options) {
3022
3082
 
3023
3083
  s0 = peg$currPos;
3024
3084
  if (input.charCodeAt(peg$currPos) === 34) {
3025
- s1 = peg$c21;
3085
+ s1 = peg$c22;
3026
3086
  peg$currPos++;
3027
3087
  } else {
3028
3088
  s1 = peg$FAILED;
3029
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
3089
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
3030
3090
  }
3031
3091
  if (s1 !== peg$FAILED) {
3032
3092
  s2 = peg$parseunquoted_json_string();
3033
3093
  if (input.charCodeAt(peg$currPos) === 34) {
3034
- s3 = peg$c21;
3094
+ s3 = peg$c22;
3035
3095
  peg$currPos++;
3036
3096
  } else {
3037
3097
  s3 = peg$FAILED;
3038
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
3098
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
3039
3099
  }
3040
3100
  if (s3 !== peg$FAILED) {
3041
3101
  s0 = s2;
@@ -3068,7 +3128,7 @@ function peg$parse(input, options) {
3068
3128
  }
3069
3129
  }
3070
3130
  peg$savedPos = s0;
3071
- s1 = peg$f43(s1);
3131
+ s1 = peg$f44(s1);
3072
3132
  s0 = s1;
3073
3133
 
3074
3134
  return s0;
@@ -3082,7 +3142,7 @@ function peg$parse(input, options) {
3082
3142
  peg$currPos++;
3083
3143
  } else {
3084
3144
  s0 = peg$FAILED;
3085
- if (peg$silentFails === 0) { peg$fail(peg$e46); }
3145
+ if (peg$silentFails === 0) { peg$fail(peg$e47); }
3086
3146
  }
3087
3147
 
3088
3148
  return s0;
@@ -3095,19 +3155,19 @@ function peg$parse(input, options) {
3095
3155
  if (s0 === peg$FAILED) {
3096
3156
  s0 = peg$currPos;
3097
3157
  if (input.charCodeAt(peg$currPos) === 92) {
3098
- s1 = peg$c22;
3158
+ s1 = peg$c23;
3099
3159
  peg$currPos++;
3100
3160
  } else {
3101
3161
  s1 = peg$FAILED;
3102
- if (peg$silentFails === 0) { peg$fail(peg$e25); }
3162
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
3103
3163
  }
3104
3164
  if (s1 !== peg$FAILED) {
3105
3165
  if (input.charCodeAt(peg$currPos) === 96) {
3106
- s2 = peg$c20;
3166
+ s2 = peg$c21;
3107
3167
  peg$currPos++;
3108
3168
  } else {
3109
3169
  s2 = peg$FAILED;
3110
- if (peg$silentFails === 0) { peg$fail(peg$e20); }
3170
+ if (peg$silentFails === 0) { peg$fail(peg$e21); }
3111
3171
  }
3112
3172
  if (s2 !== peg$FAILED) {
3113
3173
  s0 = s2;
@@ -3129,11 +3189,11 @@ function peg$parse(input, options) {
3129
3189
 
3130
3190
  s0 = peg$currPos;
3131
3191
  if (input.charCodeAt(peg$currPos) === 123) {
3132
- s1 = peg$c36;
3192
+ s1 = peg$c37;
3133
3193
  peg$currPos++;
3134
3194
  } else {
3135
3195
  s1 = peg$FAILED;
3136
- if (peg$silentFails === 0) { peg$fail(peg$e47); }
3196
+ if (peg$silentFails === 0) { peg$fail(peg$e48); }
3137
3197
  }
3138
3198
  if (s1 !== peg$FAILED) {
3139
3199
  peg$parsews();
@@ -3144,11 +3204,11 @@ function peg$parse(input, options) {
3144
3204
  s6 = peg$currPos;
3145
3205
  peg$parsews();
3146
3206
  if (input.charCodeAt(peg$currPos) === 44) {
3147
- s8 = peg$c37;
3207
+ s8 = peg$c38;
3148
3208
  peg$currPos++;
3149
3209
  } else {
3150
3210
  s8 = peg$FAILED;
3151
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
3211
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
3152
3212
  }
3153
3213
  if (s8 !== peg$FAILED) {
3154
3214
  peg$parsews();
@@ -3168,11 +3228,11 @@ function peg$parse(input, options) {
3168
3228
  s6 = peg$currPos;
3169
3229
  peg$parsews();
3170
3230
  if (input.charCodeAt(peg$currPos) === 44) {
3171
- s8 = peg$c37;
3231
+ s8 = peg$c38;
3172
3232
  peg$currPos++;
3173
3233
  } else {
3174
3234
  s8 = peg$FAILED;
3175
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
3235
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
3176
3236
  }
3177
3237
  if (s8 !== peg$FAILED) {
3178
3238
  peg$parsews();
@@ -3189,7 +3249,7 @@ function peg$parse(input, options) {
3189
3249
  }
3190
3250
  }
3191
3251
  peg$savedPos = s3;
3192
- s3 = peg$f44(s4, s5);
3252
+ s3 = peg$f45(s4, s5);
3193
3253
  } else {
3194
3254
  peg$currPos = s3;
3195
3255
  s3 = peg$FAILED;
@@ -3199,15 +3259,15 @@ function peg$parse(input, options) {
3199
3259
  }
3200
3260
  s4 = peg$parsews();
3201
3261
  if (input.charCodeAt(peg$currPos) === 125) {
3202
- s5 = peg$c38;
3262
+ s5 = peg$c39;
3203
3263
  peg$currPos++;
3204
3264
  } else {
3205
3265
  s5 = peg$FAILED;
3206
- if (peg$silentFails === 0) { peg$fail(peg$e49); }
3266
+ if (peg$silentFails === 0) { peg$fail(peg$e50); }
3207
3267
  }
3208
3268
  if (s5 !== peg$FAILED) {
3209
3269
  peg$savedPos = s0;
3210
- s0 = peg$f45(s3);
3270
+ s0 = peg$f46(s3);
3211
3271
  } else {
3212
3272
  peg$currPos = s0;
3213
3273
  s0 = peg$FAILED;
@@ -3239,7 +3299,7 @@ function peg$parse(input, options) {
3239
3299
  s5 = peg$parsejson_value();
3240
3300
  if (s5 !== peg$FAILED) {
3241
3301
  peg$savedPos = s0;
3242
- s0 = peg$f46(s1, s5);
3302
+ s0 = peg$f47(s1, s5);
3243
3303
  } else {
3244
3304
  peg$currPos = s0;
3245
3305
  s0 = peg$FAILED;
@@ -3276,11 +3336,11 @@ function peg$parse(input, options) {
3276
3336
  s6 = peg$currPos;
3277
3337
  peg$parsews();
3278
3338
  if (input.charCodeAt(peg$currPos) === 44) {
3279
- s8 = peg$c37;
3339
+ s8 = peg$c38;
3280
3340
  peg$currPos++;
3281
3341
  } else {
3282
3342
  s8 = peg$FAILED;
3283
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
3343
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
3284
3344
  }
3285
3345
  if (s8 !== peg$FAILED) {
3286
3346
  peg$parsews();
@@ -3300,11 +3360,11 @@ function peg$parse(input, options) {
3300
3360
  s6 = peg$currPos;
3301
3361
  peg$parsews();
3302
3362
  if (input.charCodeAt(peg$currPos) === 44) {
3303
- s8 = peg$c37;
3363
+ s8 = peg$c38;
3304
3364
  peg$currPos++;
3305
3365
  } else {
3306
3366
  s8 = peg$FAILED;
3307
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
3367
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
3308
3368
  }
3309
3369
  if (s8 !== peg$FAILED) {
3310
3370
  peg$parsews();
@@ -3321,7 +3381,7 @@ function peg$parse(input, options) {
3321
3381
  }
3322
3382
  }
3323
3383
  peg$savedPos = s3;
3324
- s3 = peg$f47(s4, s5);
3384
+ s3 = peg$f48(s4, s5);
3325
3385
  } else {
3326
3386
  peg$currPos = s3;
3327
3387
  s3 = peg$FAILED;
@@ -3339,7 +3399,7 @@ function peg$parse(input, options) {
3339
3399
  }
3340
3400
  if (s5 !== peg$FAILED) {
3341
3401
  peg$savedPos = s0;
3342
- s0 = peg$f48(s3);
3402
+ s0 = peg$f49(s3);
3343
3403
  } else {
3344
3404
  peg$currPos = s0;
3345
3405
  s0 = peg$FAILED;
@@ -3362,7 +3422,7 @@ function peg$parse(input, options) {
3362
3422
  peg$currPos++;
3363
3423
  } else {
3364
3424
  s1 = peg$FAILED;
3365
- if (peg$silentFails === 0) { peg$fail(peg$e51); }
3425
+ if (peg$silentFails === 0) { peg$fail(peg$e52); }
3366
3426
  }
3367
3427
  while (s1 !== peg$FAILED) {
3368
3428
  s0.push(s1);
@@ -3371,12 +3431,12 @@ function peg$parse(input, options) {
3371
3431
  peg$currPos++;
3372
3432
  } else {
3373
3433
  s1 = peg$FAILED;
3374
- if (peg$silentFails === 0) { peg$fail(peg$e51); }
3434
+ if (peg$silentFails === 0) { peg$fail(peg$e52); }
3375
3435
  }
3376
3436
  }
3377
3437
  peg$silentFails--;
3378
3438
  s1 = peg$FAILED;
3379
- if (peg$silentFails === 0) { peg$fail(peg$e50); }
3439
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
3380
3440
 
3381
3441
  return s0;
3382
3442
  }