chordsheetjs 10.9.1 → 10.9.2

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/lib/bundle.js CHANGED
@@ -14030,57 +14030,97 @@ to a key`);
14030
14030
  const peg$c10 = function(finger) {
14031
14031
  return finger;
14032
14032
  };
14033
- const peg$c11 = /^[1-9]/;
14033
+ const peg$c11 = /^[\-A-Za-z]/;
14034
14034
  const peg$c12 = peg$classExpectation([
14035
+ "-",
14035
14036
  [
14036
- "1",
14037
+ "A",
14038
+ "Z"
14039
+ ],
14040
+ [
14041
+ "a",
14042
+ "z"
14043
+ ]
14044
+ ], false, false);
14045
+ const peg$c13 = /^[0-9]/;
14046
+ const peg$c14 = peg$classExpectation([
14047
+ [
14048
+ "0",
14037
14049
  "9"
14038
14050
  ]
14039
14051
  ], false, false);
14040
- const peg$c13 = function(number) {
14052
+ const peg$c15 = function(number) {
14041
14053
  return parseInt(number, 10);
14042
14054
  };
14043
- const peg$c14 = function(fret) {
14055
+ const peg$c16 = /^[a-zA-Z]/;
14056
+ const peg$c17 = peg$classExpectation([
14057
+ [
14058
+ "a",
14059
+ "z"
14060
+ ],
14061
+ [
14062
+ "A",
14063
+ "Z"
14064
+ ]
14065
+ ], false, false);
14066
+ const peg$c18 = /^[\-NXnx]/;
14067
+ const peg$c19 = peg$classExpectation([
14068
+ "-",
14069
+ "N",
14070
+ "X",
14071
+ "n",
14072
+ "x"
14073
+ ], false, false);
14074
+ const peg$c20 = function(fret) {
14044
14075
  return fret;
14045
14076
  };
14046
- const peg$c15 = "0";
14047
- const peg$c16 = peg$literalExpectation("0", false);
14048
- const peg$c17 = function() {
14077
+ const peg$c21 = /^[1-9]/;
14078
+ const peg$c22 = peg$classExpectation([
14079
+ [
14080
+ "1",
14081
+ "9"
14082
+ ]
14083
+ ], false, false);
14084
+ const peg$c23 = "0";
14085
+ const peg$c24 = peg$literalExpectation("0", false);
14086
+ const peg$c25 = function() {
14049
14087
  return 0;
14050
14088
  };
14051
- const peg$c18 = "-1";
14052
- const peg$c19 = peg$literalExpectation("-1", false);
14053
- const peg$c20 = /^[Nx]/;
14054
- const peg$c21 = peg$classExpectation([
14089
+ const peg$c26 = "-1";
14090
+ const peg$c27 = peg$literalExpectation("-1", false);
14091
+ const peg$c28 = /^[NXnx]/;
14092
+ const peg$c29 = peg$classExpectation([
14055
14093
  "N",
14094
+ "X",
14095
+ "n",
14056
14096
  "x"
14057
14097
  ], false, false);
14058
- const peg$c22 = peg$otherExpectation("whitespace");
14059
- const peg$c23 = peg$otherExpectation("optional whitespace");
14060
- const peg$c24 = /^[ \t\n\r]/;
14061
- const peg$c25 = peg$classExpectation([
14098
+ const peg$c30 = peg$otherExpectation("whitespace");
14099
+ const peg$c31 = peg$otherExpectation("optional whitespace");
14100
+ const peg$c32 = /^[ \t\n\r]/;
14101
+ const peg$c33 = peg$classExpectation([
14062
14102
  " ",
14063
14103
  " ",
14064
14104
  "\n",
14065
14105
  "\r"
14066
14106
  ], false, false);
14067
- const peg$c26 = peg$otherExpectation("space");
14068
- const peg$c27 = /^[ \t]/;
14069
- const peg$c28 = peg$classExpectation([
14107
+ const peg$c34 = peg$otherExpectation("space");
14108
+ const peg$c35 = /^[ \t]/;
14109
+ const peg$c36 = peg$classExpectation([
14070
14110
  " ",
14071
14111
  " "
14072
14112
  ], false, false);
14073
- const peg$c29 = /^[\n\r]/;
14074
- const peg$c30 = peg$classExpectation([
14113
+ const peg$c37 = /^[\n\r]/;
14114
+ const peg$c38 = peg$classExpectation([
14075
14115
  "\n",
14076
14116
  "\r"
14077
14117
  ], false, false);
14078
- const peg$c31 = "\n";
14079
- const peg$c32 = peg$literalExpectation("\n", false);
14080
- const peg$c33 = "\r";
14081
- const peg$c34 = peg$literalExpectation("\r", false);
14082
- const peg$c35 = "\\";
14083
- const peg$c36 = peg$literalExpectation("\\", false);
14118
+ const peg$c39 = "\n";
14119
+ const peg$c40 = peg$literalExpectation("\n", false);
14120
+ const peg$c41 = "\r";
14121
+ const peg$c42 = peg$literalExpectation("\r", false);
14122
+ const peg$c43 = "\\";
14123
+ const peg$c44 = peg$literalExpectation("\\", false);
14084
14124
  let peg$currPos = 0;
14085
14125
  let peg$savedPos = 0;
14086
14126
  const peg$posDetailsCache = [
@@ -14314,10 +14354,10 @@ to a key`);
14314
14354
  }
14315
14355
  if (s2 !== peg$FAILED) {
14316
14356
  s3 = [];
14317
- s4 = peg$parseFingerNumberWithLeadingSpace();
14357
+ s4 = peg$parseFingerWithLeadingSpace();
14318
14358
  if (s4 !== peg$FAILED) while (s4 !== peg$FAILED) {
14319
14359
  s3.push(s4);
14320
- s4 = peg$parseFingerNumberWithLeadingSpace();
14360
+ s4 = peg$parseFingerWithLeadingSpace();
14321
14361
  }
14322
14362
  else s3 = peg$FAILED;
14323
14363
  if (s3 !== peg$FAILED) {
@@ -14338,12 +14378,12 @@ to a key`);
14338
14378
  }
14339
14379
  return s0;
14340
14380
  }
14341
- function peg$parseFingerNumberWithLeadingSpace() {
14381
+ function peg$parseFingerWithLeadingSpace() {
14342
14382
  let s0, s1, s2;
14343
14383
  s0 = peg$currPos;
14344
14384
  s1 = peg$parse__();
14345
14385
  if (s1 !== peg$FAILED) {
14346
- s2 = peg$parseFingerNumber();
14386
+ s2 = peg$parseFinger();
14347
14387
  if (s2 !== peg$FAILED) {
14348
14388
  peg$savedPos = s0;
14349
14389
  s1 = peg$c10(s2);
@@ -14358,23 +14398,59 @@ to a key`);
14358
14398
  }
14359
14399
  return s0;
14360
14400
  }
14401
+ function peg$parseFinger() {
14402
+ let s0;
14403
+ s0 = peg$parseFingerNumber();
14404
+ if (s0 === peg$FAILED) {
14405
+ if (peg$c11.test(input.charAt(peg$currPos))) {
14406
+ s0 = input.charAt(peg$currPos);
14407
+ peg$currPos++;
14408
+ } else {
14409
+ s0 = peg$FAILED;
14410
+ if (peg$silentFails === 0) peg$fail(peg$c12);
14411
+ }
14412
+ }
14413
+ return s0;
14414
+ }
14361
14415
  function peg$parseFingerNumber() {
14362
14416
  let s0, s1;
14363
14417
  s0 = peg$currPos;
14364
- if (peg$c11.test(input.charAt(peg$currPos))) {
14418
+ if (peg$c13.test(input.charAt(peg$currPos))) {
14365
14419
  s1 = input.charAt(peg$currPos);
14366
14420
  peg$currPos++;
14367
14421
  } else {
14368
14422
  s1 = peg$FAILED;
14369
- if (peg$silentFails === 0) peg$fail(peg$c12);
14423
+ if (peg$silentFails === 0) peg$fail(peg$c14);
14370
14424
  }
14371
14425
  if (s1 !== peg$FAILED) {
14372
14426
  peg$savedPos = s0;
14373
- s1 = peg$c13(s1);
14427
+ s1 = peg$c15(s1);
14374
14428
  }
14375
14429
  s0 = s1;
14376
14430
  return s0;
14377
14431
  }
14432
+ function peg$parseFingerLetter() {
14433
+ let s0;
14434
+ if (peg$c16.test(input.charAt(peg$currPos))) {
14435
+ s0 = input.charAt(peg$currPos);
14436
+ peg$currPos++;
14437
+ } else {
14438
+ s0 = peg$FAILED;
14439
+ if (peg$silentFails === 0) peg$fail(peg$c17);
14440
+ }
14441
+ return s0;
14442
+ }
14443
+ function peg$parseNoFingerSetting() {
14444
+ let s0;
14445
+ if (peg$c18.test(input.charAt(peg$currPos))) {
14446
+ s0 = input.charAt(peg$currPos);
14447
+ peg$currPos++;
14448
+ } else {
14449
+ s0 = peg$FAILED;
14450
+ if (peg$silentFails === 0) peg$fail(peg$c19);
14451
+ }
14452
+ return s0;
14453
+ }
14378
14454
  function peg$parseFretWithLeadingSpace() {
14379
14455
  let s0, s1, s2;
14380
14456
  s0 = peg$currPos;
@@ -14383,7 +14459,7 @@ to a key`);
14383
14459
  s2 = peg$parseFret();
14384
14460
  if (s2 !== peg$FAILED) {
14385
14461
  peg$savedPos = s0;
14386
- s1 = peg$c14(s2);
14462
+ s1 = peg$c20(s2);
14387
14463
  s0 = s1;
14388
14464
  } else {
14389
14465
  peg$currPos = s0;
@@ -14407,7 +14483,7 @@ to a key`);
14407
14483
  }
14408
14484
  if (s2 !== peg$FAILED) {
14409
14485
  peg$savedPos = s0;
14410
- s1 = peg$c14(s2);
14486
+ s1 = peg$c20(s2);
14411
14487
  s0 = s1;
14412
14488
  } else {
14413
14489
  peg$currPos = s0;
@@ -14422,16 +14498,16 @@ to a key`);
14422
14498
  function peg$parseFretNumber() {
14423
14499
  let s0, s1;
14424
14500
  s0 = peg$currPos;
14425
- if (peg$c11.test(input.charAt(peg$currPos))) {
14501
+ if (peg$c21.test(input.charAt(peg$currPos))) {
14426
14502
  s1 = input.charAt(peg$currPos);
14427
14503
  peg$currPos++;
14428
14504
  } else {
14429
14505
  s1 = peg$FAILED;
14430
- if (peg$silentFails === 0) peg$fail(peg$c12);
14506
+ if (peg$silentFails === 0) peg$fail(peg$c22);
14431
14507
  }
14432
14508
  if (s1 !== peg$FAILED) {
14433
14509
  peg$savedPos = s0;
14434
- s1 = peg$c13(s1);
14510
+ s1 = peg$c15(s1);
14435
14511
  }
14436
14512
  s0 = s1;
14437
14513
  return s0;
@@ -14440,35 +14516,35 @@ to a key`);
14440
14516
  let s0, s1;
14441
14517
  s0 = peg$currPos;
14442
14518
  if (input.charCodeAt(peg$currPos) === 48) {
14443
- s1 = peg$c15;
14519
+ s1 = peg$c23;
14444
14520
  peg$currPos++;
14445
14521
  } else {
14446
14522
  s1 = peg$FAILED;
14447
- if (peg$silentFails === 0) peg$fail(peg$c16);
14523
+ if (peg$silentFails === 0) peg$fail(peg$c24);
14448
14524
  }
14449
14525
  if (s1 !== peg$FAILED) {
14450
14526
  peg$savedPos = s0;
14451
- s1 = peg$c17();
14527
+ s1 = peg$c25();
14452
14528
  }
14453
14529
  s0 = s1;
14454
14530
  return s0;
14455
14531
  }
14456
14532
  function peg$parseNonSoundingString() {
14457
14533
  let s0;
14458
- if (input.substr(peg$currPos, 2) === peg$c18) {
14459
- s0 = peg$c18;
14534
+ if (input.substr(peg$currPos, 2) === peg$c26) {
14535
+ s0 = peg$c26;
14460
14536
  peg$currPos += 2;
14461
14537
  } else {
14462
14538
  s0 = peg$FAILED;
14463
- if (peg$silentFails === 0) peg$fail(peg$c19);
14539
+ if (peg$silentFails === 0) peg$fail(peg$c27);
14464
14540
  }
14465
14541
  if (s0 === peg$FAILED) {
14466
- if (peg$c20.test(input.charAt(peg$currPos))) {
14542
+ if (peg$c28.test(input.charAt(peg$currPos))) {
14467
14543
  s0 = input.charAt(peg$currPos);
14468
14544
  peg$currPos++;
14469
14545
  } else {
14470
14546
  s0 = peg$FAILED;
14471
- if (peg$silentFails === 0) peg$fail(peg$c21);
14547
+ if (peg$silentFails === 0) peg$fail(peg$c29);
14472
14548
  }
14473
14549
  }
14474
14550
  return s0;
@@ -14486,7 +14562,7 @@ to a key`);
14486
14562
  peg$silentFails--;
14487
14563
  if (s0 === peg$FAILED) {
14488
14564
  s1 = peg$FAILED;
14489
- if (peg$silentFails === 0) peg$fail(peg$c22);
14565
+ if (peg$silentFails === 0) peg$fail(peg$c30);
14490
14566
  }
14491
14567
  return s0;
14492
14568
  }
@@ -14502,18 +14578,18 @@ to a key`);
14502
14578
  peg$silentFails--;
14503
14579
  if (s0 === peg$FAILED) {
14504
14580
  s1 = peg$FAILED;
14505
- if (peg$silentFails === 0) peg$fail(peg$c23);
14581
+ if (peg$silentFails === 0) peg$fail(peg$c31);
14506
14582
  }
14507
14583
  return s0;
14508
14584
  }
14509
14585
  function peg$parseWhitespaceCharacter() {
14510
14586
  let s0;
14511
- if (peg$c24.test(input.charAt(peg$currPos))) {
14587
+ if (peg$c32.test(input.charAt(peg$currPos))) {
14512
14588
  s0 = input.charAt(peg$currPos);
14513
14589
  peg$currPos++;
14514
14590
  } else {
14515
14591
  s0 = peg$FAILED;
14516
- if (peg$silentFails === 0) peg$fail(peg$c25);
14592
+ if (peg$silentFails === 0) peg$fail(peg$c33);
14517
14593
  }
14518
14594
  return s0;
14519
14595
  }
@@ -14522,21 +14598,21 @@ to a key`);
14522
14598
  peg$silentFails++;
14523
14599
  s0 = peg$currPos;
14524
14600
  s1 = [];
14525
- if (peg$c27.test(input.charAt(peg$currPos))) {
14601
+ if (peg$c35.test(input.charAt(peg$currPos))) {
14526
14602
  s2 = input.charAt(peg$currPos);
14527
14603
  peg$currPos++;
14528
14604
  } else {
14529
14605
  s2 = peg$FAILED;
14530
- if (peg$silentFails === 0) peg$fail(peg$c28);
14606
+ if (peg$silentFails === 0) peg$fail(peg$c36);
14531
14607
  }
14532
14608
  if (s2 !== peg$FAILED) while (s2 !== peg$FAILED) {
14533
14609
  s1.push(s2);
14534
- if (peg$c27.test(input.charAt(peg$currPos))) {
14610
+ if (peg$c35.test(input.charAt(peg$currPos))) {
14535
14611
  s2 = input.charAt(peg$currPos);
14536
14612
  peg$currPos++;
14537
14613
  } else {
14538
14614
  s2 = peg$FAILED;
14539
- if (peg$silentFails === 0) peg$fail(peg$c28);
14615
+ if (peg$silentFails === 0) peg$fail(peg$c36);
14540
14616
  }
14541
14617
  }
14542
14618
  else s1 = peg$FAILED;
@@ -14545,18 +14621,18 @@ to a key`);
14545
14621
  peg$silentFails--;
14546
14622
  if (s0 === peg$FAILED) {
14547
14623
  s1 = peg$FAILED;
14548
- if (peg$silentFails === 0) peg$fail(peg$c26);
14624
+ if (peg$silentFails === 0) peg$fail(peg$c34);
14549
14625
  }
14550
14626
  return s0;
14551
14627
  }
14552
14628
  function peg$parseNewLine() {
14553
14629
  let s0;
14554
- if (peg$c29.test(input.charAt(peg$currPos))) {
14630
+ if (peg$c37.test(input.charAt(peg$currPos))) {
14555
14631
  s0 = input.charAt(peg$currPos);
14556
14632
  peg$currPos++;
14557
14633
  } else {
14558
14634
  s0 = peg$FAILED;
14559
- if (peg$silentFails === 0) peg$fail(peg$c30);
14635
+ if (peg$silentFails === 0) peg$fail(peg$c38);
14560
14636
  }
14561
14637
  if (s0 === peg$FAILED) s0 = peg$parseCarriageReturnLineFeed();
14562
14638
  return s0;
@@ -14586,33 +14662,33 @@ to a key`);
14586
14662
  function peg$parseLineFeed() {
14587
14663
  let s0;
14588
14664
  if (input.charCodeAt(peg$currPos) === 10) {
14589
- s0 = peg$c31;
14665
+ s0 = peg$c39;
14590
14666
  peg$currPos++;
14591
14667
  } else {
14592
14668
  s0 = peg$FAILED;
14593
- if (peg$silentFails === 0) peg$fail(peg$c32);
14669
+ if (peg$silentFails === 0) peg$fail(peg$c40);
14594
14670
  }
14595
14671
  return s0;
14596
14672
  }
14597
14673
  function peg$parseCarriageReturn() {
14598
14674
  let s0;
14599
14675
  if (input.charCodeAt(peg$currPos) === 13) {
14600
- s0 = peg$c33;
14676
+ s0 = peg$c41;
14601
14677
  peg$currPos++;
14602
14678
  } else {
14603
14679
  s0 = peg$FAILED;
14604
- if (peg$silentFails === 0) peg$fail(peg$c34);
14680
+ if (peg$silentFails === 0) peg$fail(peg$c42);
14605
14681
  }
14606
14682
  return s0;
14607
14683
  }
14608
14684
  function peg$parseEscape() {
14609
14685
  let s0;
14610
14686
  if (input.charCodeAt(peg$currPos) === 92) {
14611
- s0 = peg$c35;
14687
+ s0 = peg$c43;
14612
14688
  peg$currPos++;
14613
14689
  } else {
14614
14690
  s0 = peg$FAILED;
14615
- if (peg$silentFails === 0) peg$fail(peg$c36);
14691
+ if (peg$silentFails === 0) peg$fail(peg$c44);
14616
14692
  }
14617
14693
  return s0;
14618
14694
  }
@@ -15243,9 +15319,15 @@ to a key`);
15243
15319
  return "";
15244
15320
  }
15245
15321
  formatTag(tag) {
15322
+ if (tag.hasAttributes()) return `{${tag.originalName}: ${this.formatTagAttributes(tag)}}`;
15246
15323
  if (tag.hasValue()) return `{${tag.originalName}: ${tag.value}}`;
15247
15324
  return `{${tag.originalName}}`;
15248
15325
  }
15326
+ formatTagAttributes(tag) {
15327
+ const keys = Object.keys(tag.attributes);
15328
+ if (keys.length === 0) return "";
15329
+ return keys.map((key) => `${key}="${tag.attributes[key]}"`).join(" ");
15330
+ }
15249
15331
  formatChordLyricsPair(chordLyricsPair) {
15250
15332
  return [
15251
15333
  this.formatChordLyricsPairChords(chordLyricsPair),
@@ -15296,8 +15378,9 @@ to a key`);
15296
15378
  return {
15297
15379
  type: "tag",
15298
15380
  name,
15299
- value: value || "",
15300
- location: location.start
15381
+ location: location.start,
15382
+ value: value?.value || "",
15383
+ attributes: value?.attributes || {}
15301
15384
  };
15302
15385
  }
15303
15386
  function $51ced2cf8b50f946$export$4bae24da7c5e47c7(string, search, replaceMatch, replaceRest = (subString) => subString) {
@@ -15790,86 +15873,126 @@ to a key`);
15790
15873
  const peg$c94 = function(finger) {
15791
15874
  return finger;
15792
15875
  };
15793
- const peg$c95 = /^[1-9]/;
15876
+ const peg$c95 = /^[\-A-Za-z]/;
15794
15877
  const peg$c96 = peg$classExpectation([
15878
+ "-",
15795
15879
  [
15796
- "1",
15880
+ "A",
15881
+ "Z"
15882
+ ],
15883
+ [
15884
+ "a",
15885
+ "z"
15886
+ ]
15887
+ ], false, false);
15888
+ const peg$c97 = /^[0-9]/;
15889
+ const peg$c98 = peg$classExpectation([
15890
+ [
15891
+ "0",
15797
15892
  "9"
15798
15893
  ]
15799
15894
  ], false, false);
15800
- const peg$c97 = function(number) {
15895
+ const peg$c99 = function(number) {
15801
15896
  return parseInt(number, 10);
15802
15897
  };
15803
- const peg$c98 = function(fret) {
15898
+ const peg$c100 = /^[a-zA-Z]/;
15899
+ const peg$c101 = peg$classExpectation([
15900
+ [
15901
+ "a",
15902
+ "z"
15903
+ ],
15904
+ [
15905
+ "A",
15906
+ "Z"
15907
+ ]
15908
+ ], false, false);
15909
+ const peg$c102 = /^[\-NXnx]/;
15910
+ const peg$c103 = peg$classExpectation([
15911
+ "-",
15912
+ "N",
15913
+ "X",
15914
+ "n",
15915
+ "x"
15916
+ ], false, false);
15917
+ const peg$c104 = function(fret) {
15804
15918
  return fret;
15805
15919
  };
15806
- const peg$c99 = "0";
15807
- const peg$c100 = peg$literalExpectation("0", false);
15808
- const peg$c101 = function() {
15920
+ const peg$c105 = /^[1-9]/;
15921
+ const peg$c106 = peg$classExpectation([
15922
+ [
15923
+ "1",
15924
+ "9"
15925
+ ]
15926
+ ], false, false);
15927
+ const peg$c107 = "0";
15928
+ const peg$c108 = peg$literalExpectation("0", false);
15929
+ const peg$c109 = function() {
15809
15930
  return 0;
15810
15931
  };
15811
- const peg$c102 = "-1";
15812
- const peg$c103 = peg$literalExpectation("-1", false);
15813
- const peg$c104 = /^[Nx]/;
15814
- const peg$c105 = peg$classExpectation([
15932
+ const peg$c110 = "-1";
15933
+ const peg$c111 = peg$literalExpectation("-1", false);
15934
+ const peg$c112 = /^[NXnx]/;
15935
+ const peg$c113 = peg$classExpectation([
15815
15936
  "N",
15937
+ "X",
15938
+ "n",
15816
15939
  "x"
15817
15940
  ], false, false);
15818
- const peg$c106 = function(startTag, content, endTag) {
15941
+ const peg$c114 = function(startTag, content, endTag) {
15819
15942
  return $51ced2cf8b50f946$export$665e0f4515a68234(startTag, endTag, content);
15820
15943
  };
15821
- const peg$c107 = "start_of_abc";
15822
- const peg$c108 = peg$literalExpectation("start_of_abc", false);
15823
- const peg$c109 = "end_of_abc";
15824
- const peg$c110 = peg$literalExpectation("end_of_abc", false);
15825
- const peg$c111 = function(tagName) {
15944
+ const peg$c115 = "start_of_abc";
15945
+ const peg$c116 = peg$literalExpectation("start_of_abc", false);
15946
+ const peg$c117 = "end_of_abc";
15947
+ const peg$c118 = peg$literalExpectation("end_of_abc", false);
15948
+ const peg$c119 = function(tagName) {
15826
15949
  return $51ced2cf8b50f946$export$4478cda40be33ba2(tagName, null, location());
15827
15950
  };
15828
- const peg$c112 = "start_of_grid";
15829
- const peg$c113 = peg$literalExpectation("start_of_grid", false);
15830
- const peg$c114 = "sog";
15831
- const peg$c115 = peg$literalExpectation("sog", false);
15832
- const peg$c116 = "end_of_grid";
15833
- const peg$c117 = peg$literalExpectation("end_of_grid", false);
15834
- const peg$c118 = "eog";
15835
- const peg$c119 = peg$literalExpectation("eog", false);
15836
- const peg$c120 = "start_of_ly";
15837
- const peg$c121 = peg$literalExpectation("start_of_ly", false);
15838
- const peg$c122 = "end_of_ly";
15839
- const peg$c123 = peg$literalExpectation("end_of_ly", false);
15840
- const peg$c124 = "start_of_tab";
15841
- const peg$c125 = peg$literalExpectation("start_of_tab", false);
15842
- const peg$c126 = "sot";
15843
- const peg$c127 = peg$literalExpectation("sot", false);
15844
- const peg$c128 = "end_of_tab";
15845
- const peg$c129 = peg$literalExpectation("end_of_tab", false);
15846
- const peg$c130 = "eot";
15847
- const peg$c131 = peg$literalExpectation("eot", false);
15848
- const peg$c132 = peg$anyExpectation();
15849
- const peg$c133 = peg$otherExpectation("whitespace");
15850
- const peg$c134 = peg$otherExpectation("optional whitespace");
15851
- const peg$c135 = /^[ \t\n\r]/;
15852
- const peg$c136 = peg$classExpectation([
15951
+ const peg$c120 = "start_of_grid";
15952
+ const peg$c121 = peg$literalExpectation("start_of_grid", false);
15953
+ const peg$c122 = "sog";
15954
+ const peg$c123 = peg$literalExpectation("sog", false);
15955
+ const peg$c124 = "end_of_grid";
15956
+ const peg$c125 = peg$literalExpectation("end_of_grid", false);
15957
+ const peg$c126 = "eog";
15958
+ const peg$c127 = peg$literalExpectation("eog", false);
15959
+ const peg$c128 = "start_of_ly";
15960
+ const peg$c129 = peg$literalExpectation("start_of_ly", false);
15961
+ const peg$c130 = "end_of_ly";
15962
+ const peg$c131 = peg$literalExpectation("end_of_ly", false);
15963
+ const peg$c132 = "start_of_tab";
15964
+ const peg$c133 = peg$literalExpectation("start_of_tab", false);
15965
+ const peg$c134 = "sot";
15966
+ const peg$c135 = peg$literalExpectation("sot", false);
15967
+ const peg$c136 = "end_of_tab";
15968
+ const peg$c137 = peg$literalExpectation("end_of_tab", false);
15969
+ const peg$c138 = "eot";
15970
+ const peg$c139 = peg$literalExpectation("eot", false);
15971
+ const peg$c140 = peg$anyExpectation();
15972
+ const peg$c141 = peg$otherExpectation("whitespace");
15973
+ const peg$c142 = peg$otherExpectation("optional whitespace");
15974
+ const peg$c143 = /^[ \t\n\r]/;
15975
+ const peg$c144 = peg$classExpectation([
15853
15976
  " ",
15854
15977
  " ",
15855
15978
  "\n",
15856
15979
  "\r"
15857
15980
  ], false, false);
15858
- const peg$c137 = peg$otherExpectation("space");
15859
- const peg$c138 = /^[ \t]/;
15860
- const peg$c139 = peg$classExpectation([
15981
+ const peg$c145 = peg$otherExpectation("space");
15982
+ const peg$c146 = /^[ \t]/;
15983
+ const peg$c147 = peg$classExpectation([
15861
15984
  " ",
15862
15985
  " "
15863
15986
  ], false, false);
15864
- const peg$c140 = /^[\n\r]/;
15865
- const peg$c141 = peg$classExpectation([
15987
+ const peg$c148 = /^[\n\r]/;
15988
+ const peg$c149 = peg$classExpectation([
15866
15989
  "\n",
15867
15990
  "\r"
15868
15991
  ], false, false);
15869
- const peg$c142 = "\n";
15870
- const peg$c143 = peg$literalExpectation("\n", false);
15871
- const peg$c144 = "\r";
15872
- const peg$c145 = peg$literalExpectation("\r", false);
15992
+ const peg$c150 = "\n";
15993
+ const peg$c151 = peg$literalExpectation("\n", false);
15994
+ const peg$c152 = "\r";
15995
+ const peg$c153 = peg$literalExpectation("\r", false);
15873
15996
  let peg$currPos = 0;
15874
15997
  let peg$savedPos = 0;
15875
15998
  const peg$posDetailsCache = [
@@ -17639,10 +17762,10 @@ to a key`);
17639
17762
  }
17640
17763
  if (s2 !== peg$FAILED) {
17641
17764
  s3 = [];
17642
- s4 = peg$parseFingerNumberWithLeadingSpace();
17765
+ s4 = peg$parseFingerWithLeadingSpace();
17643
17766
  if (s4 !== peg$FAILED) while (s4 !== peg$FAILED) {
17644
17767
  s3.push(s4);
17645
- s4 = peg$parseFingerNumberWithLeadingSpace();
17768
+ s4 = peg$parseFingerWithLeadingSpace();
17646
17769
  }
17647
17770
  else s3 = peg$FAILED;
17648
17771
  if (s3 !== peg$FAILED) {
@@ -17663,12 +17786,12 @@ to a key`);
17663
17786
  }
17664
17787
  return s0;
17665
17788
  }
17666
- function peg$parseFingerNumberWithLeadingSpace() {
17789
+ function peg$parseFingerWithLeadingSpace() {
17667
17790
  let s0, s1, s2;
17668
17791
  s0 = peg$currPos;
17669
17792
  s1 = peg$parse__();
17670
17793
  if (s1 !== peg$FAILED) {
17671
- s2 = peg$parseFingerNumber();
17794
+ s2 = peg$parseFinger();
17672
17795
  if (s2 !== peg$FAILED) {
17673
17796
  peg$savedPos = s0;
17674
17797
  s1 = peg$c94(s2);
@@ -17683,23 +17806,59 @@ to a key`);
17683
17806
  }
17684
17807
  return s0;
17685
17808
  }
17809
+ function peg$parseFinger() {
17810
+ let s0;
17811
+ s0 = peg$parseFingerNumber();
17812
+ if (s0 === peg$FAILED) {
17813
+ if (peg$c95.test(input.charAt(peg$currPos))) {
17814
+ s0 = input.charAt(peg$currPos);
17815
+ peg$currPos++;
17816
+ } else {
17817
+ s0 = peg$FAILED;
17818
+ if (peg$silentFails === 0) peg$fail(peg$c96);
17819
+ }
17820
+ }
17821
+ return s0;
17822
+ }
17686
17823
  function peg$parseFingerNumber() {
17687
17824
  let s0, s1;
17688
17825
  s0 = peg$currPos;
17689
- if (peg$c95.test(input.charAt(peg$currPos))) {
17826
+ if (peg$c97.test(input.charAt(peg$currPos))) {
17690
17827
  s1 = input.charAt(peg$currPos);
17691
17828
  peg$currPos++;
17692
17829
  } else {
17693
17830
  s1 = peg$FAILED;
17694
- if (peg$silentFails === 0) peg$fail(peg$c96);
17831
+ if (peg$silentFails === 0) peg$fail(peg$c98);
17695
17832
  }
17696
17833
  if (s1 !== peg$FAILED) {
17697
17834
  peg$savedPos = s0;
17698
- s1 = peg$c97(s1);
17835
+ s1 = peg$c99(s1);
17699
17836
  }
17700
17837
  s0 = s1;
17701
17838
  return s0;
17702
17839
  }
17840
+ function peg$parseFingerLetter() {
17841
+ let s0;
17842
+ if (peg$c100.test(input.charAt(peg$currPos))) {
17843
+ s0 = input.charAt(peg$currPos);
17844
+ peg$currPos++;
17845
+ } else {
17846
+ s0 = peg$FAILED;
17847
+ if (peg$silentFails === 0) peg$fail(peg$c101);
17848
+ }
17849
+ return s0;
17850
+ }
17851
+ function peg$parseNoFingerSetting() {
17852
+ let s0;
17853
+ if (peg$c102.test(input.charAt(peg$currPos))) {
17854
+ s0 = input.charAt(peg$currPos);
17855
+ peg$currPos++;
17856
+ } else {
17857
+ s0 = peg$FAILED;
17858
+ if (peg$silentFails === 0) peg$fail(peg$c103);
17859
+ }
17860
+ return s0;
17861
+ }
17703
17862
  function peg$parseFretWithLeadingSpace() {
17704
17863
  let s0, s1, s2;
17705
17864
  s0 = peg$currPos;
@@ -17708,7 +17867,7 @@ to a key`);
17708
17867
  s2 = peg$parseFret();
17709
17868
  if (s2 !== peg$FAILED) {
17710
17869
  peg$savedPos = s0;
17711
- s1 = peg$c98(s2);
17870
+ s1 = peg$c104(s2);
17712
17871
  s0 = s1;
17713
17872
  } else {
17714
17873
  peg$currPos = s0;
@@ -17732,7 +17891,7 @@ to a key`);
17732
17891
  }
17733
17892
  if (s2 !== peg$FAILED) {
17734
17893
  peg$savedPos = s0;
17735
- s1 = peg$c98(s2);
17894
+ s1 = peg$c104(s2);
17736
17895
  s0 = s1;
17737
17896
  } else {
17738
17897
  peg$currPos = s0;
@@ -17747,16 +17906,16 @@ to a key`);
17747
17906
  function peg$parseFretNumber() {
17748
17907
  let s0, s1;
17749
17908
  s0 = peg$currPos;
17750
- if (peg$c95.test(input.charAt(peg$currPos))) {
17909
+ if (peg$c105.test(input.charAt(peg$currPos))) {
17751
17910
  s1 = input.charAt(peg$currPos);
17752
17911
  peg$currPos++;
17753
17912
  } else {
17754
17913
  s1 = peg$FAILED;
17755
- if (peg$silentFails === 0) peg$fail(peg$c96);
17914
+ if (peg$silentFails === 0) peg$fail(peg$c106);
17756
17915
  }
17757
17916
  if (s1 !== peg$FAILED) {
17758
17917
  peg$savedPos = s0;
17759
- s1 = peg$c97(s1);
17918
+ s1 = peg$c99(s1);
17760
17919
  }
17761
17920
  s0 = s1;
17762
17921
  return s0;
@@ -17765,35 +17924,35 @@ to a key`);
17765
17924
  let s0, s1;
17766
17925
  s0 = peg$currPos;
17767
17926
  if (input.charCodeAt(peg$currPos) === 48) {
17768
- s1 = peg$c99;
17927
+ s1 = peg$c107;
17769
17928
  peg$currPos++;
17770
17929
  } else {
17771
17930
  s1 = peg$FAILED;
17772
- if (peg$silentFails === 0) peg$fail(peg$c100);
17931
+ if (peg$silentFails === 0) peg$fail(peg$c108);
17773
17932
  }
17774
17933
  if (s1 !== peg$FAILED) {
17775
17934
  peg$savedPos = s0;
17776
- s1 = peg$c101();
17935
+ s1 = peg$c109();
17777
17936
  }
17778
17937
  s0 = s1;
17779
17938
  return s0;
17780
17939
  }
17781
17940
  function peg$parseNonSoundingString() {
17782
17941
  let s0;
17783
- if (input.substr(peg$currPos, 2) === peg$c102) {
17784
- s0 = peg$c102;
17942
+ if (input.substr(peg$currPos, 2) === peg$c110) {
17943
+ s0 = peg$c110;
17785
17944
  peg$currPos += 2;
17786
17945
  } else {
17787
17946
  s0 = peg$FAILED;
17788
- if (peg$silentFails === 0) peg$fail(peg$c103);
17947
+ if (peg$silentFails === 0) peg$fail(peg$c111);
17789
17948
  }
17790
17949
  if (s0 === peg$FAILED) {
17791
- if (peg$c104.test(input.charAt(peg$currPos))) {
17950
+ if (peg$c112.test(input.charAt(peg$currPos))) {
17792
17951
  s0 = input.charAt(peg$currPos);
17793
17952
  peg$currPos++;
17794
17953
  } else {
17795
17954
  s0 = peg$FAILED;
17796
- if (peg$silentFails === 0) peg$fail(peg$c105);
17955
+ if (peg$silentFails === 0) peg$fail(peg$c113);
17797
17956
  }
17798
17957
  }
17799
17958
  return s0;
@@ -17880,7 +18039,7 @@ to a key`);
17880
18039
  s4 = peg$parseAbcEndTag();
17881
18040
  if (s4 !== peg$FAILED) {
17882
18041
  peg$savedPos = s0;
17883
- s1 = peg$c106(s1, s3, s4);
18042
+ s1 = peg$c114(s1, s3, s4);
17884
18043
  s0 = s1;
17885
18044
  } else {
17886
18045
  peg$currPos = s0;
@@ -17913,12 +18072,12 @@ to a key`);
17913
18072
  if (s1 !== peg$FAILED) {
17914
18073
  s2 = peg$parse_();
17915
18074
  if (s2 !== peg$FAILED) {
17916
- if (input.substr(peg$currPos, 12) === peg$c107) {
17917
- s3 = peg$c107;
18075
+ if (input.substr(peg$currPos, 12) === peg$c115) {
18076
+ s3 = peg$c115;
17918
18077
  peg$currPos += 12;
17919
18078
  } else {
17920
18079
  s3 = peg$FAILED;
17921
- if (peg$silentFails === 0) peg$fail(peg$c108);
18080
+ if (peg$silentFails === 0) peg$fail(peg$c116);
17922
18081
  }
17923
18082
  if (s3 !== peg$FAILED) {
17924
18083
  s4 = peg$parse_();
@@ -17982,12 +18141,12 @@ to a key`);
17982
18141
  if (s1 !== peg$FAILED) {
17983
18142
  s2 = peg$parse_();
17984
18143
  if (s2 !== peg$FAILED) {
17985
- if (input.substr(peg$currPos, 10) === peg$c109) {
17986
- s3 = peg$c109;
18144
+ if (input.substr(peg$currPos, 10) === peg$c117) {
18145
+ s3 = peg$c117;
17987
18146
  peg$currPos += 10;
17988
18147
  } else {
17989
18148
  s3 = peg$FAILED;
17990
- if (peg$silentFails === 0) peg$fail(peg$c110);
18149
+ if (peg$silentFails === 0) peg$fail(peg$c118);
17991
18150
  }
17992
18151
  if (s3 !== peg$FAILED) {
17993
18152
  s4 = peg$parse_();
@@ -18001,7 +18160,7 @@ to a key`);
18001
18160
  }
18002
18161
  if (s5 !== peg$FAILED) {
18003
18162
  peg$savedPos = s0;
18004
- s1 = peg$c111(s3);
18163
+ s1 = peg$c119(s3);
18005
18164
  s0 = s1;
18006
18165
  } else {
18007
18166
  peg$currPos = s0;
@@ -18095,7 +18254,7 @@ to a key`);
18095
18254
  s4 = peg$parseGridEndTag();
18096
18255
  if (s4 !== peg$FAILED) {
18097
18256
  peg$savedPos = s0;
18098
- s1 = peg$c106(s1, s3, s4);
18257
+ s1 = peg$c114(s1, s3, s4);
18099
18258
  s0 = s1;
18100
18259
  } else {
18101
18260
  peg$currPos = s0;
@@ -18128,20 +18287,20 @@ to a key`);
18128
18287
  if (s1 !== peg$FAILED) {
18129
18288
  s2 = peg$parse_();
18130
18289
  if (s2 !== peg$FAILED) {
18131
- if (input.substr(peg$currPos, 13) === peg$c112) {
18132
- s3 = peg$c112;
18290
+ if (input.substr(peg$currPos, 13) === peg$c120) {
18291
+ s3 = peg$c120;
18133
18292
  peg$currPos += 13;
18134
18293
  } else {
18135
18294
  s3 = peg$FAILED;
18136
- if (peg$silentFails === 0) peg$fail(peg$c113);
18295
+ if (peg$silentFails === 0) peg$fail(peg$c121);
18137
18296
  }
18138
18297
  if (s3 === peg$FAILED) {
18139
- if (input.substr(peg$currPos, 3) === peg$c114) {
18140
- s3 = peg$c114;
18298
+ if (input.substr(peg$currPos, 3) === peg$c122) {
18299
+ s3 = peg$c122;
18141
18300
  peg$currPos += 3;
18142
18301
  } else {
18143
18302
  s3 = peg$FAILED;
18144
- if (peg$silentFails === 0) peg$fail(peg$c115);
18303
+ if (peg$silentFails === 0) peg$fail(peg$c123);
18145
18304
  }
18146
18305
  }
18147
18306
  if (s3 !== peg$FAILED) {
@@ -18206,20 +18365,20 @@ to a key`);
18206
18365
  if (s1 !== peg$FAILED) {
18207
18366
  s2 = peg$parse_();
18208
18367
  if (s2 !== peg$FAILED) {
18209
- if (input.substr(peg$currPos, 11) === peg$c116) {
18210
- s3 = peg$c116;
18368
+ if (input.substr(peg$currPos, 11) === peg$c124) {
18369
+ s3 = peg$c124;
18211
18370
  peg$currPos += 11;
18212
18371
  } else {
18213
18372
  s3 = peg$FAILED;
18214
- if (peg$silentFails === 0) peg$fail(peg$c117);
18373
+ if (peg$silentFails === 0) peg$fail(peg$c125);
18215
18374
  }
18216
18375
  if (s3 === peg$FAILED) {
18217
- if (input.substr(peg$currPos, 3) === peg$c118) {
18218
- s3 = peg$c118;
18376
+ if (input.substr(peg$currPos, 3) === peg$c126) {
18377
+ s3 = peg$c126;
18219
18378
  peg$currPos += 3;
18220
18379
  } else {
18221
18380
  s3 = peg$FAILED;
18222
- if (peg$silentFails === 0) peg$fail(peg$c119);
18381
+ if (peg$silentFails === 0) peg$fail(peg$c127);
18223
18382
  }
18224
18383
  }
18225
18384
  if (s3 !== peg$FAILED) {
@@ -18234,7 +18393,7 @@ to a key`);
18234
18393
  }
18235
18394
  if (s5 !== peg$FAILED) {
18236
18395
  peg$savedPos = s0;
18237
- s1 = peg$c111(s3);
18396
+ s1 = peg$c119(s3);
18238
18397
  s0 = s1;
18239
18398
  } else {
18240
18399
  peg$currPos = s0;
@@ -18328,7 +18487,7 @@ to a key`);
18328
18487
  s4 = peg$parseLyEndTag();
18329
18488
  if (s4 !== peg$FAILED) {
18330
18489
  peg$savedPos = s0;
18331
- s1 = peg$c106(s1, s3, s4);
18490
+ s1 = peg$c114(s1, s3, s4);
18332
18491
  s0 = s1;
18333
18492
  } else {
18334
18493
  peg$currPos = s0;
@@ -18361,12 +18520,12 @@ to a key`);
18361
18520
  if (s1 !== peg$FAILED) {
18362
18521
  s2 = peg$parse_();
18363
18522
  if (s2 !== peg$FAILED) {
18364
- if (input.substr(peg$currPos, 11) === peg$c120) {
18365
- s3 = peg$c120;
18523
+ if (input.substr(peg$currPos, 11) === peg$c128) {
18524
+ s3 = peg$c128;
18366
18525
  peg$currPos += 11;
18367
18526
  } else {
18368
18527
  s3 = peg$FAILED;
18369
- if (peg$silentFails === 0) peg$fail(peg$c121);
18528
+ if (peg$silentFails === 0) peg$fail(peg$c129);
18370
18529
  }
18371
18530
  if (s3 !== peg$FAILED) {
18372
18531
  s4 = peg$parse_();
@@ -18430,12 +18589,12 @@ to a key`);
18430
18589
  if (s1 !== peg$FAILED) {
18431
18590
  s2 = peg$parse_();
18432
18591
  if (s2 !== peg$FAILED) {
18433
- if (input.substr(peg$currPos, 9) === peg$c122) {
18434
- s3 = peg$c122;
18592
+ if (input.substr(peg$currPos, 9) === peg$c130) {
18593
+ s3 = peg$c130;
18435
18594
  peg$currPos += 9;
18436
18595
  } else {
18437
18596
  s3 = peg$FAILED;
18438
- if (peg$silentFails === 0) peg$fail(peg$c123);
18597
+ if (peg$silentFails === 0) peg$fail(peg$c131);
18439
18598
  }
18440
18599
  if (s3 !== peg$FAILED) {
18441
18600
  s4 = peg$parse_();
@@ -18449,7 +18608,7 @@ to a key`);
18449
18608
  }
18450
18609
  if (s5 !== peg$FAILED) {
18451
18610
  peg$savedPos = s0;
18452
- s1 = peg$c111(s3);
18611
+ s1 = peg$c119(s3);
18453
18612
  s0 = s1;
18454
18613
  } else {
18455
18614
  peg$currPos = s0;
@@ -18543,7 +18702,7 @@ to a key`);
18543
18702
  s4 = peg$parseTabEndTag();
18544
18703
  if (s4 !== peg$FAILED) {
18545
18704
  peg$savedPos = s0;
18546
- s1 = peg$c106(s1, s3, s4);
18705
+ s1 = peg$c114(s1, s3, s4);
18547
18706
  s0 = s1;
18548
18707
  } else {
18549
18708
  peg$currPos = s0;
@@ -18576,20 +18735,20 @@ to a key`);
18576
18735
  if (s1 !== peg$FAILED) {
18577
18736
  s2 = peg$parse_();
18578
18737
  if (s2 !== peg$FAILED) {
18579
- if (input.substr(peg$currPos, 12) === peg$c124) {
18580
- s3 = peg$c124;
18738
+ if (input.substr(peg$currPos, 12) === peg$c132) {
18739
+ s3 = peg$c132;
18581
18740
  peg$currPos += 12;
18582
18741
  } else {
18583
18742
  s3 = peg$FAILED;
18584
- if (peg$silentFails === 0) peg$fail(peg$c125);
18743
+ if (peg$silentFails === 0) peg$fail(peg$c133);
18585
18744
  }
18586
18745
  if (s3 === peg$FAILED) {
18587
- if (input.substr(peg$currPos, 3) === peg$c126) {
18588
- s3 = peg$c126;
18746
+ if (input.substr(peg$currPos, 3) === peg$c134) {
18747
+ s3 = peg$c134;
18589
18748
  peg$currPos += 3;
18590
18749
  } else {
18591
18750
  s3 = peg$FAILED;
18592
- if (peg$silentFails === 0) peg$fail(peg$c127);
18751
+ if (peg$silentFails === 0) peg$fail(peg$c135);
18593
18752
  }
18594
18753
  }
18595
18754
  if (s3 !== peg$FAILED) {
@@ -18654,20 +18813,20 @@ to a key`);
18654
18813
  if (s1 !== peg$FAILED) {
18655
18814
  s2 = peg$parse_();
18656
18815
  if (s2 !== peg$FAILED) {
18657
- if (input.substr(peg$currPos, 10) === peg$c128) {
18658
- s3 = peg$c128;
18816
+ if (input.substr(peg$currPos, 10) === peg$c136) {
18817
+ s3 = peg$c136;
18659
18818
  peg$currPos += 10;
18660
18819
  } else {
18661
18820
  s3 = peg$FAILED;
18662
- if (peg$silentFails === 0) peg$fail(peg$c129);
18821
+ if (peg$silentFails === 0) peg$fail(peg$c137);
18663
18822
  }
18664
18823
  if (s3 === peg$FAILED) {
18665
- if (input.substr(peg$currPos, 3) === peg$c130) {
18666
- s3 = peg$c130;
18824
+ if (input.substr(peg$currPos, 3) === peg$c138) {
18825
+ s3 = peg$c138;
18667
18826
  peg$currPos += 3;
18668
18827
  } else {
18669
18828
  s3 = peg$FAILED;
18670
- if (peg$silentFails === 0) peg$fail(peg$c131);
18829
+ if (peg$silentFails === 0) peg$fail(peg$c139);
18671
18830
  }
18672
18831
  }
18673
18832
  if (s3 !== peg$FAILED) {
@@ -18682,7 +18841,7 @@ to a key`);
18682
18841
  }
18683
18842
  if (s5 !== peg$FAILED) {
18684
18843
  peg$savedPos = s0;
18685
- s1 = peg$c111(s3);
18844
+ s1 = peg$c119(s3);
18686
18845
  s0 = s1;
18687
18846
  } else {
18688
18847
  peg$currPos = s0;
@@ -18713,7 +18872,7 @@ to a key`);
18713
18872
  peg$currPos++;
18714
18873
  } else {
18715
18874
  s0 = peg$FAILED;
18716
- if (peg$silentFails === 0) peg$fail(peg$c132);
18875
+ if (peg$silentFails === 0) peg$fail(peg$c140);
18717
18876
  }
18718
18877
  return s0;
18719
18878
  }
@@ -18730,7 +18889,7 @@ to a key`);
18730
18889
  peg$silentFails--;
18731
18890
  if (s0 === peg$FAILED) {
18732
18891
  s1 = peg$FAILED;
18733
- if (peg$silentFails === 0) peg$fail(peg$c133);
18892
+ if (peg$silentFails === 0) peg$fail(peg$c141);
18734
18893
  }
18735
18894
  return s0;
18736
18895
  }
@@ -18746,18 +18905,18 @@ to a key`);
18746
18905
  peg$silentFails--;
18747
18906
  if (s0 === peg$FAILED) {
18748
18907
  s1 = peg$FAILED;
18749
- if (peg$silentFails === 0) peg$fail(peg$c134);
18908
+ if (peg$silentFails === 0) peg$fail(peg$c142);
18750
18909
  }
18751
18910
  return s0;
18752
18911
  }
18753
18912
  function peg$parseWhitespaceCharacter() {
18754
18913
  let s0;
18755
- if (peg$c135.test(input.charAt(peg$currPos))) {
18914
+ if (peg$c143.test(input.charAt(peg$currPos))) {
18756
18915
  s0 = input.charAt(peg$currPos);
18757
18916
  peg$currPos++;
18758
18917
  } else {
18759
18918
  s0 = peg$FAILED;
18760
- if (peg$silentFails === 0) peg$fail(peg$c136);
18919
+ if (peg$silentFails === 0) peg$fail(peg$c144);
18761
18920
  }
18762
18921
  return s0;
18763
18922
  }
@@ -18766,21 +18925,21 @@ to a key`);
18766
18925
  peg$silentFails++;
18767
18926
  s0 = peg$currPos;
18768
18927
  s1 = [];
18769
- if (peg$c138.test(input.charAt(peg$currPos))) {
18928
+ if (peg$c146.test(input.charAt(peg$currPos))) {
18770
18929
  s2 = input.charAt(peg$currPos);
18771
18930
  peg$currPos++;
18772
18931
  } else {
18773
18932
  s2 = peg$FAILED;
18774
- if (peg$silentFails === 0) peg$fail(peg$c139);
18933
+ if (peg$silentFails === 0) peg$fail(peg$c147);
18775
18934
  }
18776
18935
  if (s2 !== peg$FAILED) while (s2 !== peg$FAILED) {
18777
18936
  s1.push(s2);
18778
- if (peg$c138.test(input.charAt(peg$currPos))) {
18937
+ if (peg$c146.test(input.charAt(peg$currPos))) {
18779
18938
  s2 = input.charAt(peg$currPos);
18780
18939
  peg$currPos++;
18781
18940
  } else {
18782
18941
  s2 = peg$FAILED;
18783
- if (peg$silentFails === 0) peg$fail(peg$c139);
18942
+ if (peg$silentFails === 0) peg$fail(peg$c147);
18784
18943
  }
18785
18944
  }
18786
18945
  else s1 = peg$FAILED;
@@ -18789,18 +18948,18 @@ to a key`);
18789
18948
  peg$silentFails--;
18790
18949
  if (s0 === peg$FAILED) {
18791
18950
  s1 = peg$FAILED;
18792
- if (peg$silentFails === 0) peg$fail(peg$c137);
18951
+ if (peg$silentFails === 0) peg$fail(peg$c145);
18793
18952
  }
18794
18953
  return s0;
18795
18954
  }
18796
18955
  function peg$parseNewLine() {
18797
18956
  let s0;
18798
- if (peg$c140.test(input.charAt(peg$currPos))) {
18957
+ if (peg$c148.test(input.charAt(peg$currPos))) {
18799
18958
  s0 = input.charAt(peg$currPos);
18800
18959
  peg$currPos++;
18801
18960
  } else {
18802
18961
  s0 = peg$FAILED;
18803
- if (peg$silentFails === 0) peg$fail(peg$c141);
18962
+ if (peg$silentFails === 0) peg$fail(peg$c149);
18804
18963
  }
18805
18964
  if (s0 === peg$FAILED) s0 = peg$parseCarriageReturnLineFeed();
18806
18965
  return s0;
@@ -18830,22 +18989,22 @@ to a key`);
18830
18989
  function peg$parseLineFeed() {
18831
18990
  let s0;
18832
18991
  if (input.charCodeAt(peg$currPos) === 10) {
18833
- s0 = peg$c142;
18992
+ s0 = peg$c150;
18834
18993
  peg$currPos++;
18835
18994
  } else {
18836
18995
  s0 = peg$FAILED;
18837
- if (peg$silentFails === 0) peg$fail(peg$c143);
18996
+ if (peg$silentFails === 0) peg$fail(peg$c151);
18838
18997
  }
18839
18998
  return s0;
18840
18999
  }
18841
19000
  function peg$parseCarriageReturn() {
18842
19001
  let s0;
18843
19002
  if (input.charCodeAt(peg$currPos) === 13) {
18844
- s0 = peg$c144;
19003
+ s0 = peg$c152;
18845
19004
  peg$currPos++;
18846
19005
  } else {
18847
19006
  s0 = peg$FAILED;
18848
- if (peg$silentFails === 0) peg$fail(peg$c145);
19007
+ if (peg$silentFails === 0) peg$fail(peg$c153);
18849
19008
  }
18850
19009
  return s0;
18851
19010
  }
@@ -19432,24 +19591,6 @@ to a key`);
19432
19591
  }
19433
19592
  };
19434
19593
  var $7981c56ae667de5e$export$2e2bcd8739ae039 = $7981c56ae667de5e$var$ParserWarning;
19435
- var $69c885ea9d252cfd$var$START_TAG_TO_SECTION_TYPE = {
19436
- [(0, $7251dad5f4a4c35f$export$9e9edc166b8d0233)]: (0, $dce48cb70c4120bb$export$92249c36c213e508),
19437
- [(0, $7251dad5f4a4c35f$export$3550cc87694d54e0)]: (0, $dce48cb70c4120bb$export$78d8c50e853acd10),
19438
- [(0, $7251dad5f4a4c35f$export$4f5168acae064e01)]: (0, $dce48cb70c4120bb$export$8db6c706fc9142b2),
19439
- [(0, $7251dad5f4a4c35f$export$b7e6dcd848b88f43)]: (0, $dce48cb70c4120bb$export$e2b0b9a5e613f348),
19440
- [(0, $7251dad5f4a4c35f$export$634ff7795b596e62)]: (0, $dce48cb70c4120bb$export$6a5a2eab72b6e3d),
19441
- [(0, $7251dad5f4a4c35f$export$8dd1111100e0e88d)]: (0, $dce48cb70c4120bb$export$f1c9dd0f5207dd5e),
19442
- [(0, $7251dad5f4a4c35f$export$deca399f8cd9b7dc)]: (0, $dce48cb70c4120bb$export$4b194284baed1659)
19443
- };
19444
- var $69c885ea9d252cfd$var$END_TAG_TO_SECTION_TYPE = {
19445
- [(0, $7251dad5f4a4c35f$export$37c7b13f53af2469)]: (0, $dce48cb70c4120bb$export$92249c36c213e508),
19446
- [(0, $7251dad5f4a4c35f$export$1c874e9780385ecd)]: (0, $dce48cb70c4120bb$export$78d8c50e853acd10),
19447
- [(0, $7251dad5f4a4c35f$export$473c1a4819e5180b)]: (0, $dce48cb70c4120bb$export$8db6c706fc9142b2),
19448
- [(0, $7251dad5f4a4c35f$export$4b28ac1ae75aff60)]: (0, $dce48cb70c4120bb$export$e2b0b9a5e613f348),
19449
- [(0, $7251dad5f4a4c35f$export$e3f6cdbd95b1f8f)]: (0, $dce48cb70c4120bb$export$6a5a2eab72b6e3d),
19450
- [(0, $7251dad5f4a4c35f$export$66a0ef3ffeab32b7)]: (0, $dce48cb70c4120bb$export$f1c9dd0f5207dd5e),
19451
- [(0, $7251dad5f4a4c35f$export$640d294ab83f9040)]: (0, $dce48cb70c4120bb$export$4b194284baed1659)
19452
- };
19453
19594
  var $69c885ea9d252cfd$var$SongBuilder = class {
19454
19595
  constructor(song) {
19455
19596
  this.currentKey = null;
@@ -19530,11 +19671,10 @@ to a key`);
19530
19671
  this.metadata.add(name, value);
19531
19672
  }
19532
19673
  setSectionTypeFromTag(tag) {
19533
- if (tag.name in $69c885ea9d252cfd$var$START_TAG_TO_SECTION_TYPE) {
19534
- this.startSection($69c885ea9d252cfd$var$START_TAG_TO_SECTION_TYPE[tag.name], tag);
19535
- return;
19536
- }
19537
- if (tag.name in $69c885ea9d252cfd$var$END_TAG_TO_SECTION_TYPE) this.endSection($69c885ea9d252cfd$var$END_TAG_TO_SECTION_TYPE[tag.name], tag);
19674
+ const [tagType, sectionType] = (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039).recognizeSectionTag(tag.name);
19675
+ if (!sectionType) return;
19676
+ if (tagType === (0, $7251dad5f4a4c35f$export$dfea9b8ecbbb8623)) this.startSection(sectionType, tag);
19677
+ else if (tagType === (0, $7251dad5f4a4c35f$export$3d329a2c209fbc28)) this.endSection(sectionType, tag);
19538
19678
  }
19539
19679
  startSection(sectionType, tag) {
19540
19680
  this.checkCurrentSectionType((0, $dce48cb70c4120bb$export$c53d0f541b41b88e), tag);
@@ -19861,7 +20001,10 @@ Or set the song key before changing key:
19861
20001
  this.foreachItem((item) => {
19862
20002
  if (!(item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039))) return;
19863
20003
  const itemChords = item.chords;
19864
- if (itemChords && itemChords.length > 0) chords.add(itemChords);
20004
+ if (itemChords && itemChords.length > 0) {
20005
+ const parsedChord = (0, $177a605b8569b31c$export$2e2bcd8739ae039).parse(itemChords);
20006
+ if (parsedChord) chords.add(parsedChord.toString());
20007
+ }
19865
20008
  });
19866
20009
  return Array.from(chords);
19867
20010
  }
@@ -20463,7 +20606,7 @@ Or set the song key before changing key:
20463
20606
  return Math.max(contentLength, lyricsLength);
20464
20607
  }
20465
20608
  formatItemTop(item, _metadata, line) {
20466
- if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.value || "";
20609
+ if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.label;
20467
20610
  if (item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) {
20468
20611
  const content = item.annotation || this.renderChord(item, line);
20469
20612
  return (0, $28a2fcb6fb95a147$export$bc3bea8325045070)(content, this.chordLyricsPairLength(item, line));
@@ -20485,7 +20628,7 @@ Or set the song key before changing key:
20485
20628
  }
20486
20629
  formatItemBottom(item, metadata, line) {
20487
20630
  if (typeof item === "string") return item;
20488
- if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.value || "";
20631
+ if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.label;
20489
20632
  if (item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) return this.formatChordLyricsPair(item, line);
20490
20633
  if ("evaluate" in item) return this.formatEvaluatable(item, metadata);
20491
20634
  return "";
@@ -32661,7 +32804,7 @@ Or set the song key before changing key:
32661
32804
  `)}
32662
32805
 
32663
32806
  ${(0, $f9c5006b26957916$export$a55877ca9db47377)(item.hasRenderableLabel(), () => `
32664
- <h3 class="label">${item.value}</h3>
32807
+ <h3 class="label">${item.label}</h3>
32665
32808
  `)}
32666
32809
  `).elseWhen((0, $28a2fcb6fb95a147$export$e3f63561d52b936d)(item), () => `
32667
32810
  <div class="column">
@@ -32756,7 +32899,7 @@ Or set the song key before changing key:
32756
32899
  `)}
32757
32900
 
32758
32901
  ${(0, $f9c5006b26957916$export$a55877ca9db47377)(item.hasRenderableLabel(), () => `
32759
- <td><h3 class="label"${(0, $f9c5006b26957916$export$ca030c9435779e4b)(line.textFont)}>${item.value}</h3></td>
32902
+ <td><h3 class="label"${(0, $f9c5006b26957916$export$ca030c9435779e4b)(line.textFont)}>${item.label}</h3></td>
32760
32903
  `)}
32761
32904
  `).elseWhen((0, $f9c5006b26957916$export$899158ea22bb4609)(item), () => `
32762
32905
  <td class="literal">${item.string}</td>
@@ -32879,7 +33022,7 @@ Or set the song key before changing key:
32879
33022
  return chords;
32880
33023
  }
32881
33024
  formatItemTop(item, _metadata, line) {
32882
- if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.value || "";
33025
+ if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.label;
32883
33026
  if (item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) {
32884
33027
  const content = item.annotation || this.renderChords(item, line);
32885
33028
  return (0, $28a2fcb6fb95a147$export$bc3bea8325045070)(content, this.chordLyricsPairLength(item, line));
@@ -32894,7 +33037,7 @@ Or set the song key before changing key:
32894
33037
  return line.items.map((item) => formatter.call(this, item, metadata, line)).join("");
32895
33038
  }
32896
33039
  formatItemBottom(item, metadata, line) {
32897
- if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.value || "";
33040
+ if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) && item.isRenderable()) return item.label;
32898
33041
  if (item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) return (0, $28a2fcb6fb95a147$export$bc3bea8325045070)(item.lyrics || "", this.chordLyricsPairLength(item, line));
32899
33042
  if ("evaluate" in item) return item.evaluate(metadata, this.configuration.get("metadata.separator"));
32900
33043
  return "";