@gmb/bitmark-parser-generator 4.7.0 → 4.9.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.
package/dist/index.cjs CHANGED
@@ -1297,6 +1297,7 @@ var propertyKeys = {
1297
1297
  property_reference: "@reference",
1298
1298
  property_refPublicationYear: "@refPublicationYear",
1299
1299
  property_refPublisher: "@refPublisher",
1300
+ property_relatedBook: "@relatedBook",
1300
1301
  property_releaseDate: "@releaseDate",
1301
1302
  property_releaseKind: "@releaseKind",
1302
1303
  property_releaseVersion: "@releaseVersion",
@@ -1572,6 +1573,16 @@ var StringUtils = class {
1572
1573
  if (!str) return str;
1573
1574
  return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
1574
1575
  }
1576
+ /**
1577
+ * Convert a camelCase string to kebab-case.
1578
+ *
1579
+ * @param str the string to convert
1580
+ * @returns the kebab-case version of the string
1581
+ */
1582
+ camelToKebab(str) {
1583
+ if (!str) return str;
1584
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
1585
+ }
1575
1586
  };
1576
1587
  var stringUtils = new StringUtils();
1577
1588
 
@@ -3246,6 +3257,12 @@ var GROUPS = {
3246
3257
  format: TagFormat.plainText,
3247
3258
  maxCount: Count.infinity
3248
3259
  },
3260
+ {
3261
+ key: ConfigKey.property_relatedBook,
3262
+ description: "Books related to this book",
3263
+ format: TagFormat.plainText,
3264
+ maxCount: Count.infinity
3265
+ },
3249
3266
  {
3250
3267
  key: ConfigKey.property_duration,
3251
3268
  description: "The duration of the book",
@@ -9130,7 +9147,7 @@ var instance2 = new Config();
9130
9147
  // src/generated/package_info.ts
9131
9148
  var PACKAGE_INFO = {
9132
9149
  "name": "@gmb/bitmark-parser-generator",
9133
- "version": "4.7.0",
9150
+ "version": "4.9.0",
9134
9151
  "author": "Get More Brain Ltd",
9135
9152
  "license": "ISC",
9136
9153
  "description": "A bitmark parser and generator using Peggy.js"
@@ -9874,6 +9891,8 @@ var NodeType = (0, import_superenum20.superenum)({
9874
9891
  referencePropertyValue: "referencePropertyValue",
9875
9892
  refPublicationYear: "refPublicationYear",
9876
9893
  refPublisher: "refPublisher",
9894
+ relatedBook: "relatedBook",
9895
+ relatedBookValue: "relatedBookValue",
9877
9896
  releaseDate: "releaseDate",
9878
9897
  releaseDateValue: "releaseDateValue",
9879
9898
  releaseKind: "releaseKind",
@@ -11626,7 +11645,7 @@ var TextGenerator = class extends AstWalkerGenerator {
11626
11645
  };
11627
11646
 
11628
11647
  // src/generated/parser/text/text-peggy-parser.js
11629
- var VERSION = "8.34.3";
11648
+ var VERSION = "8.35.0";
11630
11649
  function unbreakscape(str) {
11631
11650
  if (typeof str !== "string") return null;
11632
11651
  return instance3.unbreakscape(str);
@@ -11816,100 +11835,101 @@ function peg$parse(input, options) {
11816
11835
  const peg$c35 = "=";
11817
11836
  const peg$c36 = "|latex|";
11818
11837
  const peg$c37 = "|imageInline:";
11819
- const peg$c38 = "alignmentVertical";
11820
- const peg$c39 = "size";
11821
- const peg$c40 = "top";
11822
- const peg$c41 = "middle";
11823
- const peg$c42 = "bottom";
11824
- const peg$c43 = "baseline";
11825
- const peg$c44 = "sub";
11826
- const peg$c45 = "super";
11827
- const peg$c46 = "text-bottom";
11828
- const peg$c47 = "text-top";
11829
- const peg$c48 = "line-height";
11830
- const peg$c49 = "font-height";
11831
- const peg$c50 = "explicit";
11832
- const peg$c51 = "link:";
11833
- const peg$c52 = "extref:";
11834
- const peg$c53 = "provider:";
11835
- const peg$c54 = "xref:";
11836
- const peg$c55 = "\u25BA";
11837
- const peg$c56 = "symbol:";
11838
- const peg$c57 = "footnote:";
11839
- const peg$c58 = "footnote*:";
11840
- const peg$c59 = "var:";
11841
- const peg$c60 = "code:";
11842
- const peg$c61 = "timer";
11843
- const peg$c62 = "timer:";
11844
- const peg$c63 = "duration:";
11845
- const peg$c64 = "P";
11846
- const peg$c65 = "color:";
11847
- const peg$c66 = "|\u25BA";
11848
- const peg$c67 = "bold";
11849
- const peg$c68 = "italic";
11850
- const peg$c69 = "light";
11851
- const peg$c70 = "highlight";
11852
- const peg$c71 = "strike";
11853
- const peg$c72 = "subscript";
11854
- const peg$c73 = "superscript";
11855
- const peg$c74 = "ins";
11856
- const peg$c75 = "del";
11857
- const peg$c76 = "underline";
11858
- const peg$c77 = "doubleUnderline";
11859
- const peg$c78 = "circle";
11860
- const peg$c79 = "languageEmRed";
11861
- const peg$c80 = "languageEmOrange";
11862
- const peg$c81 = "languageEmYellow";
11863
- const peg$c82 = "languageEmGreen";
11864
- const peg$c83 = "languageEmBlue";
11865
- const peg$c84 = "languageEmPurple";
11866
- const peg$c85 = "languageEmPink";
11867
- const peg$c86 = "languageEmBrown";
11868
- const peg$c87 = "languageEmBlack";
11869
- const peg$c88 = "languageEmWhite";
11870
- const peg$c89 = "languageEmGray";
11871
- const peg$c90 = "languageEm";
11872
- const peg$c91 = "userUnderline";
11873
- const peg$c92 = "userDoubleUnderline";
11874
- const peg$c93 = "userStrike";
11875
- const peg$c94 = "userCircle";
11876
- const peg$c95 = "userHighlight";
11877
- const peg$c96 = "notranslate";
11878
- const peg$c97 = "aqua";
11879
- const peg$c98 = "black";
11880
- const peg$c99 = "blue";
11881
- const peg$c100 = "brown";
11882
- const peg$c101 = "fuchsia";
11883
- const peg$c102 = "lightgrey";
11884
- const peg$c103 = "gray";
11885
- const peg$c104 = "darkgray";
11886
- const peg$c105 = "green";
11887
- const peg$c106 = "lime";
11888
- const peg$c107 = "magenta";
11889
- const peg$c108 = "maroon";
11890
- const peg$c109 = "navy";
11891
- const peg$c110 = "olive";
11892
- const peg$c111 = "orange";
11893
- const peg$c112 = "pink";
11894
- const peg$c113 = "purple";
11895
- const peg$c114 = "red";
11896
- const peg$c115 = "silver";
11897
- const peg$c116 = "teal";
11898
- const peg$c117 = "violet";
11899
- const peg$c118 = "white";
11900
- const peg$c119 = "yellow";
11901
- const peg$c120 = "*";
11902
- const peg$c121 = "_";
11903
- const peg$c122 = "`";
11904
- const peg$c123 = "!";
11905
- const peg$c124 = "[!";
11906
- const peg$c125 = "]";
11907
- const peg$c126 = "\n";
11908
- const peg$c127 = "\r\n";
11909
- const peg$c128 = "http";
11910
- const peg$c129 = "s";
11911
- const peg$c130 = "://";
11912
- const peg$c131 = "mailto:";
11838
+ const peg$c38 = "srcAlt";
11839
+ const peg$c39 = "alignmentVertical";
11840
+ const peg$c40 = "size";
11841
+ const peg$c41 = "top";
11842
+ const peg$c42 = "middle";
11843
+ const peg$c43 = "bottom";
11844
+ const peg$c44 = "baseline";
11845
+ const peg$c45 = "sub";
11846
+ const peg$c46 = "super";
11847
+ const peg$c47 = "text-bottom";
11848
+ const peg$c48 = "text-top";
11849
+ const peg$c49 = "line-height";
11850
+ const peg$c50 = "font-height";
11851
+ const peg$c51 = "explicit";
11852
+ const peg$c52 = "link:";
11853
+ const peg$c53 = "extref:";
11854
+ const peg$c54 = "provider:";
11855
+ const peg$c55 = "xref:";
11856
+ const peg$c56 = "\u25BA";
11857
+ const peg$c57 = "symbol:";
11858
+ const peg$c58 = "footnote:";
11859
+ const peg$c59 = "footnote*:";
11860
+ const peg$c60 = "var:";
11861
+ const peg$c61 = "code:";
11862
+ const peg$c62 = "timer";
11863
+ const peg$c63 = "timer:";
11864
+ const peg$c64 = "duration:";
11865
+ const peg$c65 = "P";
11866
+ const peg$c66 = "color:";
11867
+ const peg$c67 = "|\u25BA";
11868
+ const peg$c68 = "bold";
11869
+ const peg$c69 = "italic";
11870
+ const peg$c70 = "light";
11871
+ const peg$c71 = "highlight";
11872
+ const peg$c72 = "strike";
11873
+ const peg$c73 = "subscript";
11874
+ const peg$c74 = "superscript";
11875
+ const peg$c75 = "ins";
11876
+ const peg$c76 = "del";
11877
+ const peg$c77 = "underline";
11878
+ const peg$c78 = "doubleUnderline";
11879
+ const peg$c79 = "circle";
11880
+ const peg$c80 = "languageEmRed";
11881
+ const peg$c81 = "languageEmOrange";
11882
+ const peg$c82 = "languageEmYellow";
11883
+ const peg$c83 = "languageEmGreen";
11884
+ const peg$c84 = "languageEmBlue";
11885
+ const peg$c85 = "languageEmPurple";
11886
+ const peg$c86 = "languageEmPink";
11887
+ const peg$c87 = "languageEmBrown";
11888
+ const peg$c88 = "languageEmBlack";
11889
+ const peg$c89 = "languageEmWhite";
11890
+ const peg$c90 = "languageEmGray";
11891
+ const peg$c91 = "languageEm";
11892
+ const peg$c92 = "userUnderline";
11893
+ const peg$c93 = "userDoubleUnderline";
11894
+ const peg$c94 = "userStrike";
11895
+ const peg$c95 = "userCircle";
11896
+ const peg$c96 = "userHighlight";
11897
+ const peg$c97 = "notranslate";
11898
+ const peg$c98 = "aqua";
11899
+ const peg$c99 = "black";
11900
+ const peg$c100 = "blue";
11901
+ const peg$c101 = "brown";
11902
+ const peg$c102 = "fuchsia";
11903
+ const peg$c103 = "lightgrey";
11904
+ const peg$c104 = "gray";
11905
+ const peg$c105 = "darkgray";
11906
+ const peg$c106 = "green";
11907
+ const peg$c107 = "lime";
11908
+ const peg$c108 = "magenta";
11909
+ const peg$c109 = "maroon";
11910
+ const peg$c110 = "navy";
11911
+ const peg$c111 = "olive";
11912
+ const peg$c112 = "orange";
11913
+ const peg$c113 = "pink";
11914
+ const peg$c114 = "purple";
11915
+ const peg$c115 = "red";
11916
+ const peg$c116 = "silver";
11917
+ const peg$c117 = "teal";
11918
+ const peg$c118 = "violet";
11919
+ const peg$c119 = "white";
11920
+ const peg$c120 = "yellow";
11921
+ const peg$c121 = "*";
11922
+ const peg$c122 = "_";
11923
+ const peg$c123 = "`";
11924
+ const peg$c124 = "!";
11925
+ const peg$c125 = "[!";
11926
+ const peg$c126 = "]";
11927
+ const peg$c127 = "\n";
11928
+ const peg$c128 = "\r\n";
11929
+ const peg$c129 = "http";
11930
+ const peg$c130 = "s";
11931
+ const peg$c131 = "://";
11932
+ const peg$c132 = "mailto:";
11913
11933
  const peg$r0 = /^[ \t]/;
11914
11934
  const peg$r1 = /^[0-9]/;
11915
11935
  const peg$r2 = /^[\r\u2028-\u2029]/;
@@ -11957,104 +11977,105 @@ function peg$parse(input, options) {
11957
11977
  const peg$e39 = peg$literalExpectation("=", false);
11958
11978
  const peg$e40 = peg$literalExpectation("|latex|", false);
11959
11979
  const peg$e41 = peg$literalExpectation("|imageInline:", false);
11960
- const peg$e42 = peg$literalExpectation("alignmentVertical", false);
11961
- const peg$e43 = peg$literalExpectation("size", false);
11962
- const peg$e44 = peg$literalExpectation("top", false);
11963
- const peg$e45 = peg$literalExpectation("middle", false);
11964
- const peg$e46 = peg$literalExpectation("bottom", false);
11965
- const peg$e47 = peg$literalExpectation("baseline", false);
11966
- const peg$e48 = peg$literalExpectation("sub", false);
11967
- const peg$e49 = peg$literalExpectation("super", false);
11968
- const peg$e50 = peg$literalExpectation("text-bottom", false);
11969
- const peg$e51 = peg$literalExpectation("text-top", false);
11970
- const peg$e52 = peg$literalExpectation("line-height", false);
11971
- const peg$e53 = peg$literalExpectation("font-height", false);
11972
- const peg$e54 = peg$literalExpectation("explicit", false);
11973
- const peg$e55 = peg$literalExpectation("link:", false);
11974
- const peg$e56 = peg$literalExpectation("extref:", false);
11975
- const peg$e57 = peg$literalExpectation("provider:", false);
11976
- const peg$e58 = peg$literalExpectation("xref:", false);
11977
- const peg$e59 = peg$literalExpectation("\u25BA", false);
11978
- const peg$e60 = peg$literalExpectation("symbol:", false);
11979
- const peg$e61 = peg$literalExpectation("footnote:", false);
11980
- const peg$e62 = peg$literalExpectation("footnote*:", false);
11981
- const peg$e63 = peg$literalExpectation("var:", false);
11982
- const peg$e64 = peg$literalExpectation("code:", false);
11983
- const peg$e65 = peg$literalExpectation("timer", false);
11984
- const peg$e66 = peg$literalExpectation("timer:", false);
11985
- const peg$e67 = peg$literalExpectation("duration:", false);
11986
- const peg$e68 = peg$literalExpectation("P", false);
11987
- const peg$e69 = peg$literalExpectation("color:", false);
11988
- const peg$e70 = peg$literalExpectation("|\u25BA", false);
11989
- const peg$e71 = peg$literalExpectation("bold", false);
11990
- const peg$e72 = peg$literalExpectation("italic", false);
11991
- const peg$e73 = peg$literalExpectation("light", false);
11992
- const peg$e74 = peg$literalExpectation("highlight", false);
11993
- const peg$e75 = peg$literalExpectation("strike", false);
11994
- const peg$e76 = peg$literalExpectation("subscript", false);
11995
- const peg$e77 = peg$literalExpectation("superscript", false);
11996
- const peg$e78 = peg$literalExpectation("ins", false);
11997
- const peg$e79 = peg$literalExpectation("del", false);
11998
- const peg$e80 = peg$literalExpectation("underline", false);
11999
- const peg$e81 = peg$literalExpectation("doubleUnderline", false);
12000
- const peg$e82 = peg$literalExpectation("circle", false);
12001
- const peg$e83 = peg$literalExpectation("languageEmRed", false);
12002
- const peg$e84 = peg$literalExpectation("languageEmOrange", false);
12003
- const peg$e85 = peg$literalExpectation("languageEmYellow", false);
12004
- const peg$e86 = peg$literalExpectation("languageEmGreen", false);
12005
- const peg$e87 = peg$literalExpectation("languageEmBlue", false);
12006
- const peg$e88 = peg$literalExpectation("languageEmPurple", false);
12007
- const peg$e89 = peg$literalExpectation("languageEmPink", false);
12008
- const peg$e90 = peg$literalExpectation("languageEmBrown", false);
12009
- const peg$e91 = peg$literalExpectation("languageEmBlack", false);
12010
- const peg$e92 = peg$literalExpectation("languageEmWhite", false);
12011
- const peg$e93 = peg$literalExpectation("languageEmGray", false);
12012
- const peg$e94 = peg$literalExpectation("languageEm", false);
12013
- const peg$e95 = peg$literalExpectation("userUnderline", false);
12014
- const peg$e96 = peg$literalExpectation("userDoubleUnderline", false);
12015
- const peg$e97 = peg$literalExpectation("userStrike", false);
12016
- const peg$e98 = peg$literalExpectation("userCircle", false);
12017
- const peg$e99 = peg$literalExpectation("userHighlight", false);
12018
- const peg$e100 = peg$literalExpectation("notranslate", false);
12019
- const peg$e101 = peg$literalExpectation("aqua", false);
12020
- const peg$e102 = peg$literalExpectation("black", false);
12021
- const peg$e103 = peg$literalExpectation("blue", false);
12022
- const peg$e104 = peg$literalExpectation("brown", false);
12023
- const peg$e105 = peg$literalExpectation("fuchsia", false);
12024
- const peg$e106 = peg$literalExpectation("lightgrey", false);
12025
- const peg$e107 = peg$literalExpectation("gray", false);
12026
- const peg$e108 = peg$literalExpectation("darkgray", false);
12027
- const peg$e109 = peg$literalExpectation("green", false);
12028
- const peg$e110 = peg$literalExpectation("lime", false);
12029
- const peg$e111 = peg$literalExpectation("magenta", false);
12030
- const peg$e112 = peg$literalExpectation("maroon", false);
12031
- const peg$e113 = peg$literalExpectation("navy", false);
12032
- const peg$e114 = peg$literalExpectation("olive", false);
12033
- const peg$e115 = peg$literalExpectation("orange", false);
12034
- const peg$e116 = peg$literalExpectation("pink", false);
12035
- const peg$e117 = peg$literalExpectation("purple", false);
12036
- const peg$e118 = peg$literalExpectation("red", false);
12037
- const peg$e119 = peg$literalExpectation("silver", false);
12038
- const peg$e120 = peg$literalExpectation("teal", false);
12039
- const peg$e121 = peg$literalExpectation("violet", false);
12040
- const peg$e122 = peg$literalExpectation("white", false);
12041
- const peg$e123 = peg$literalExpectation("yellow", false);
12042
- const peg$e124 = peg$literalExpectation("*", false);
12043
- const peg$e125 = peg$literalExpectation("_", false);
12044
- const peg$e126 = peg$literalExpectation("`", false);
12045
- const peg$e127 = peg$literalExpectation("!", false);
12046
- const peg$e128 = peg$literalExpectation("[!", false);
12047
- const peg$e129 = peg$literalExpectation("]", false);
12048
- const peg$e130 = peg$otherExpectation("Line Terminator");
12049
- const peg$e131 = peg$literalExpectation("\n", false);
12050
- const peg$e132 = peg$literalExpectation("\r\n", false);
12051
- const peg$e133 = peg$classExpectation(["\r", ["\u2028", "\u2029"]], false, false, false);
12052
- const peg$e134 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], true, false, false);
12053
- const peg$e135 = peg$literalExpectation("http", false);
12054
- const peg$e136 = peg$literalExpectation("s", false);
12055
- const peg$e137 = peg$literalExpectation("://", false);
12056
- const peg$e138 = peg$literalExpectation("mailto:", false);
12057
- const peg$e139 = peg$classExpectation(["!", ["#", ";"], "=", ["?", "["], ["]", "_"], ["a", "{"], ["}", "~"]], false, false, false);
11980
+ const peg$e42 = peg$literalExpectation("srcAlt", false);
11981
+ const peg$e43 = peg$literalExpectation("alignmentVertical", false);
11982
+ const peg$e44 = peg$literalExpectation("size", false);
11983
+ const peg$e45 = peg$literalExpectation("top", false);
11984
+ const peg$e46 = peg$literalExpectation("middle", false);
11985
+ const peg$e47 = peg$literalExpectation("bottom", false);
11986
+ const peg$e48 = peg$literalExpectation("baseline", false);
11987
+ const peg$e49 = peg$literalExpectation("sub", false);
11988
+ const peg$e50 = peg$literalExpectation("super", false);
11989
+ const peg$e51 = peg$literalExpectation("text-bottom", false);
11990
+ const peg$e52 = peg$literalExpectation("text-top", false);
11991
+ const peg$e53 = peg$literalExpectation("line-height", false);
11992
+ const peg$e54 = peg$literalExpectation("font-height", false);
11993
+ const peg$e55 = peg$literalExpectation("explicit", false);
11994
+ const peg$e56 = peg$literalExpectation("link:", false);
11995
+ const peg$e57 = peg$literalExpectation("extref:", false);
11996
+ const peg$e58 = peg$literalExpectation("provider:", false);
11997
+ const peg$e59 = peg$literalExpectation("xref:", false);
11998
+ const peg$e60 = peg$literalExpectation("\u25BA", false);
11999
+ const peg$e61 = peg$literalExpectation("symbol:", false);
12000
+ const peg$e62 = peg$literalExpectation("footnote:", false);
12001
+ const peg$e63 = peg$literalExpectation("footnote*:", false);
12002
+ const peg$e64 = peg$literalExpectation("var:", false);
12003
+ const peg$e65 = peg$literalExpectation("code:", false);
12004
+ const peg$e66 = peg$literalExpectation("timer", false);
12005
+ const peg$e67 = peg$literalExpectation("timer:", false);
12006
+ const peg$e68 = peg$literalExpectation("duration:", false);
12007
+ const peg$e69 = peg$literalExpectation("P", false);
12008
+ const peg$e70 = peg$literalExpectation("color:", false);
12009
+ const peg$e71 = peg$literalExpectation("|\u25BA", false);
12010
+ const peg$e72 = peg$literalExpectation("bold", false);
12011
+ const peg$e73 = peg$literalExpectation("italic", false);
12012
+ const peg$e74 = peg$literalExpectation("light", false);
12013
+ const peg$e75 = peg$literalExpectation("highlight", false);
12014
+ const peg$e76 = peg$literalExpectation("strike", false);
12015
+ const peg$e77 = peg$literalExpectation("subscript", false);
12016
+ const peg$e78 = peg$literalExpectation("superscript", false);
12017
+ const peg$e79 = peg$literalExpectation("ins", false);
12018
+ const peg$e80 = peg$literalExpectation("del", false);
12019
+ const peg$e81 = peg$literalExpectation("underline", false);
12020
+ const peg$e82 = peg$literalExpectation("doubleUnderline", false);
12021
+ const peg$e83 = peg$literalExpectation("circle", false);
12022
+ const peg$e84 = peg$literalExpectation("languageEmRed", false);
12023
+ const peg$e85 = peg$literalExpectation("languageEmOrange", false);
12024
+ const peg$e86 = peg$literalExpectation("languageEmYellow", false);
12025
+ const peg$e87 = peg$literalExpectation("languageEmGreen", false);
12026
+ const peg$e88 = peg$literalExpectation("languageEmBlue", false);
12027
+ const peg$e89 = peg$literalExpectation("languageEmPurple", false);
12028
+ const peg$e90 = peg$literalExpectation("languageEmPink", false);
12029
+ const peg$e91 = peg$literalExpectation("languageEmBrown", false);
12030
+ const peg$e92 = peg$literalExpectation("languageEmBlack", false);
12031
+ const peg$e93 = peg$literalExpectation("languageEmWhite", false);
12032
+ const peg$e94 = peg$literalExpectation("languageEmGray", false);
12033
+ const peg$e95 = peg$literalExpectation("languageEm", false);
12034
+ const peg$e96 = peg$literalExpectation("userUnderline", false);
12035
+ const peg$e97 = peg$literalExpectation("userDoubleUnderline", false);
12036
+ const peg$e98 = peg$literalExpectation("userStrike", false);
12037
+ const peg$e99 = peg$literalExpectation("userCircle", false);
12038
+ const peg$e100 = peg$literalExpectation("userHighlight", false);
12039
+ const peg$e101 = peg$literalExpectation("notranslate", false);
12040
+ const peg$e102 = peg$literalExpectation("aqua", false);
12041
+ const peg$e103 = peg$literalExpectation("black", false);
12042
+ const peg$e104 = peg$literalExpectation("blue", false);
12043
+ const peg$e105 = peg$literalExpectation("brown", false);
12044
+ const peg$e106 = peg$literalExpectation("fuchsia", false);
12045
+ const peg$e107 = peg$literalExpectation("lightgrey", false);
12046
+ const peg$e108 = peg$literalExpectation("gray", false);
12047
+ const peg$e109 = peg$literalExpectation("darkgray", false);
12048
+ const peg$e110 = peg$literalExpectation("green", false);
12049
+ const peg$e111 = peg$literalExpectation("lime", false);
12050
+ const peg$e112 = peg$literalExpectation("magenta", false);
12051
+ const peg$e113 = peg$literalExpectation("maroon", false);
12052
+ const peg$e114 = peg$literalExpectation("navy", false);
12053
+ const peg$e115 = peg$literalExpectation("olive", false);
12054
+ const peg$e116 = peg$literalExpectation("orange", false);
12055
+ const peg$e117 = peg$literalExpectation("pink", false);
12056
+ const peg$e118 = peg$literalExpectation("purple", false);
12057
+ const peg$e119 = peg$literalExpectation("red", false);
12058
+ const peg$e120 = peg$literalExpectation("silver", false);
12059
+ const peg$e121 = peg$literalExpectation("teal", false);
12060
+ const peg$e122 = peg$literalExpectation("violet", false);
12061
+ const peg$e123 = peg$literalExpectation("white", false);
12062
+ const peg$e124 = peg$literalExpectation("yellow", false);
12063
+ const peg$e125 = peg$literalExpectation("*", false);
12064
+ const peg$e126 = peg$literalExpectation("_", false);
12065
+ const peg$e127 = peg$literalExpectation("`", false);
12066
+ const peg$e128 = peg$literalExpectation("!", false);
12067
+ const peg$e129 = peg$literalExpectation("[!", false);
12068
+ const peg$e130 = peg$literalExpectation("]", false);
12069
+ const peg$e131 = peg$otherExpectation("Line Terminator");
12070
+ const peg$e132 = peg$literalExpectation("\n", false);
12071
+ const peg$e133 = peg$literalExpectation("\r\n", false);
12072
+ const peg$e134 = peg$classExpectation(["\r", ["\u2028", "\u2029"]], false, false, false);
12073
+ const peg$e135 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], true, false, false);
12074
+ const peg$e136 = peg$literalExpectation("http", false);
12075
+ const peg$e137 = peg$literalExpectation("s", false);
12076
+ const peg$e138 = peg$literalExpectation("://", false);
12077
+ const peg$e139 = peg$literalExpectation("mailto:", false);
12078
+ const peg$e140 = peg$classExpectation(["!", ["#", ";"], "=", ["?", "["], ["]", "_"], ["a", "{"], ["}", "~"]], false, false, false);
12058
12079
  function peg$f0() {
12059
12080
  return VERSION;
12060
12081
  }
@@ -12361,101 +12382,104 @@ function peg$parse(input, options) {
12361
12382
  return { comment: str };
12362
12383
  }
12363
12384
  function peg$f67(p, v) {
12364
- return { [p]: parseInt(v) };
12385
+ return { [p]: v };
12365
12386
  }
12366
12387
  function peg$f68(p, v) {
12367
- return { type: "error", msg: p + " must be a positive integer.", found: v };
12388
+ return { [p]: parseInt(v) };
12368
12389
  }
12369
12390
  function peg$f69(p, v) {
12370
- return { [p]: v };
12391
+ return { type: "error", msg: p + " must be a positive integer.", found: v };
12371
12392
  }
12372
12393
  function peg$f70(p, v) {
12373
12394
  return { [p]: v };
12374
12395
  }
12375
- function peg$f71(str) {
12396
+ function peg$f71(p, v) {
12397
+ return { [p]: v };
12398
+ }
12399
+ function peg$f72(str) {
12376
12400
  return { type: "link", attrs: { href: str.trim(), target: "_blank" } };
12377
12401
  }
12378
- function peg$f72(str, rc, p) {
12402
+ function peg$f73(str, rc, p) {
12379
12403
  return { type: "extref", attrs: { extref: str.trim(), references: rc, provider: p.trim() } };
12380
12404
  }
12381
- function peg$f73(str, str2) {
12405
+ function peg$f74(str, str2) {
12382
12406
  return { type: "xref", attrs: { xref: str.trim(), reference: str2.trim() } };
12383
12407
  }
12384
- function peg$f74(str) {
12408
+ function peg$f75(str) {
12385
12409
  return { type: "xref", attrs: { xref: str.trim(), reference: "" } };
12386
12410
  }
12387
- function peg$f75(str) {
12411
+ function peg$f76(str) {
12388
12412
  return { type: "ref", attrs: { reference: str.trim() } };
12389
12413
  }
12390
- function peg$f76(str, ch) {
12414
+ function peg$f77(str, ch) {
12391
12415
  const chain = Object.assign({}, ...ch);
12392
12416
  return { type: "symbol", attrs: { src: str.trim(), ...chain } };
12393
12417
  }
12394
- function peg$f77(str) {
12418
+ function peg$f78(str) {
12395
12419
  return { type: "footnote", attrs: { content: bitmarkPlusString(str.trim()) } };
12396
12420
  }
12397
- function peg$f78(str) {
12421
+ function peg$f79(str) {
12398
12422
  return { type: "footnote*", attrs: { content: bitmarkPlusString(str.trim()) } };
12399
12423
  }
12400
- function peg$f79(str) {
12424
+ function peg$f80(str) {
12401
12425
  return { type: "var", attrs: { name: str.trim() } };
12402
12426
  }
12403
- function peg$f80() {
12427
+ function peg$f81() {
12404
12428
  return { type: "code", attrs: { language: "plain text" } };
12405
12429
  }
12406
- function peg$f81(lang) {
12430
+ function peg$f82(lang) {
12407
12431
  return { type: "code", attrs: { language: lang.trim().toLowerCase() } };
12408
12432
  }
12409
- function peg$f82() {
12433
+ function peg$f83() {
12410
12434
  return { type: "timer", attrs: { name: "" } };
12411
12435
  }
12412
- function peg$f83(str) {
12436
+ function peg$f84(str) {
12413
12437
  return { type: "timer", attrs: { name: str.trim() } };
12414
12438
  }
12415
- function peg$f84(str) {
12439
+ function peg$f85(str) {
12416
12440
  return { type: "duration", attrs: { duration: str } };
12417
12441
  }
12418
- function peg$f85(color) {
12442
+ function peg$f86(color) {
12419
12443
  return { type: "color", attrs: { color } };
12420
12444
  }
12421
- function peg$f86(style) {
12445
+ function peg$f87(style) {
12422
12446
  return { type: style };
12423
12447
  }
12424
- function peg$f87(str) {
12448
+ function peg$f88(str) {
12425
12449
  return { type: "comment", comment: str };
12426
12450
  }
12427
- function peg$f88(r) {
12451
+ function peg$f89(r) {
12428
12452
  return r.trim();
12429
12453
  }
12430
- function peg$f89(bs) {
12454
+ function peg$f90(bs) {
12431
12455
  return [{ type: "paragraph", content: bs, attrs: {} }];
12432
12456
  }
12433
- function peg$f90(first, more) {
12457
+ function peg$f91(first, more) {
12434
12458
  const cleaned_ = cleanEmptyTextNodes(first ? [first, ...more.flat()] : more.flat());
12435
12459
  return cleaned_;
12436
12460
  }
12437
- function peg$f91() {
12461
+ function peg$f92() {
12438
12462
  return { "type": "hardBreak" };
12439
12463
  }
12440
- function peg$f92(t) {
12464
+ function peg$f93(t) {
12441
12465
  return { text: unbreakscape(t), type: "text" };
12442
12466
  }
12443
- function peg$f93(t) {
12467
+ function peg$f94(t) {
12444
12468
  return { index: +t, type: "bit" };
12445
12469
  }
12446
- function peg$f94(t) {
12470
+ function peg$f95(t) {
12447
12471
  return { marks: [{ type: "bold" }], text: unbreakscape(t), type: "text" };
12448
12472
  }
12449
- function peg$f95(t) {
12473
+ function peg$f96(t) {
12450
12474
  return { marks: [{ type: "italic" }], text: unbreakscape(t), type: "text" };
12451
12475
  }
12452
- function peg$f96(t) {
12476
+ function peg$f97(t) {
12453
12477
  return { marks: [{ type: "light" }], text: unbreakscape(t), type: "text" };
12454
12478
  }
12455
- function peg$f97(t) {
12479
+ function peg$f98(t) {
12456
12480
  return { marks: [{ type: "highlight" }], text: unbreakscape(t), type: "text" };
12457
12481
  }
12458
- function peg$f98(pr, t) {
12482
+ function peg$f99(pr, t) {
12459
12483
  return { pr, t };
12460
12484
  }
12461
12485
  let peg$currPos = options.peg$currPos | 0;
@@ -16637,7 +16661,15 @@ function peg$parse(input, options) {
16637
16661
  if (s1 === peg$FAILED) {
16638
16662
  s1 = null;
16639
16663
  }
16640
- s2 = peg$parseMediaSizeTags();
16664
+ if (input.substr(peg$currPos, 6) === peg$c38) {
16665
+ s2 = peg$c38;
16666
+ peg$currPos += 6;
16667
+ } else {
16668
+ s2 = peg$FAILED;
16669
+ if (peg$silentFails === 0) {
16670
+ peg$fail(peg$e42);
16671
+ }
16672
+ }
16641
16673
  if (s2 !== peg$FAILED) {
16642
16674
  if (input.charCodeAt(peg$currPos) === 58) {
16643
16675
  s3 = peg$c5;
@@ -16685,15 +16717,7 @@ function peg$parse(input, options) {
16685
16717
  s8 = peg$FAILED;
16686
16718
  }
16687
16719
  if (s8 !== peg$FAILED) {
16688
- s9 = input.charAt(peg$currPos);
16689
- if (peg$r1.test(s9)) {
16690
- peg$currPos++;
16691
- } else {
16692
- s9 = peg$FAILED;
16693
- if (peg$silentFails === 0) {
16694
- peg$fail(peg$e15);
16695
- }
16696
- }
16720
+ s9 = peg$parsechar();
16697
16721
  if (s9 !== peg$FAILED) {
16698
16722
  s8 = [s8, s9];
16699
16723
  s7 = s8;
@@ -16705,59 +16729,38 @@ function peg$parse(input, options) {
16705
16729
  peg$currPos = s7;
16706
16730
  s7 = peg$FAILED;
16707
16731
  }
16708
- if (s7 !== peg$FAILED) {
16709
- while (s7 !== peg$FAILED) {
16710
- s6.push(s7);
16711
- s7 = peg$currPos;
16712
- s8 = peg$currPos;
16713
- peg$silentFails++;
16714
- s9 = peg$parseBlockTag();
16715
- peg$silentFails--;
16716
- if (s9 === peg$FAILED) {
16717
- s8 = void 0;
16718
- } else {
16719
- peg$currPos = s8;
16720
- s8 = peg$FAILED;
16721
- }
16722
- if (s8 !== peg$FAILED) {
16723
- s9 = input.charAt(peg$currPos);
16724
- if (peg$r1.test(s9)) {
16725
- peg$currPos++;
16726
- } else {
16727
- s9 = peg$FAILED;
16728
- if (peg$silentFails === 0) {
16729
- peg$fail(peg$e15);
16730
- }
16731
- }
16732
- if (s9 !== peg$FAILED) {
16733
- s8 = [s8, s9];
16734
- s7 = s8;
16735
- } else {
16736
- peg$currPos = s7;
16737
- s7 = peg$FAILED;
16738
- }
16732
+ while (s7 !== peg$FAILED) {
16733
+ s6.push(s7);
16734
+ s7 = peg$currPos;
16735
+ s8 = peg$currPos;
16736
+ peg$silentFails++;
16737
+ s9 = peg$parseBlockTag();
16738
+ peg$silentFails--;
16739
+ if (s9 === peg$FAILED) {
16740
+ s8 = void 0;
16741
+ } else {
16742
+ peg$currPos = s8;
16743
+ s8 = peg$FAILED;
16744
+ }
16745
+ if (s8 !== peg$FAILED) {
16746
+ s9 = peg$parsechar();
16747
+ if (s9 !== peg$FAILED) {
16748
+ s8 = [s8, s9];
16749
+ s7 = s8;
16739
16750
  } else {
16740
16751
  peg$currPos = s7;
16741
16752
  s7 = peg$FAILED;
16742
16753
  }
16754
+ } else {
16755
+ peg$currPos = s7;
16756
+ s7 = peg$FAILED;
16743
16757
  }
16744
- } else {
16745
- s6 = peg$FAILED;
16746
16758
  }
16759
+ s5 = input.substring(s5, peg$currPos);
16760
+ s6 = peg$parseBlockTag();
16747
16761
  if (s6 !== peg$FAILED) {
16748
- s5 = input.substring(s5, peg$currPos);
16749
- } else {
16750
- s5 = s6;
16751
- }
16752
- if (s5 !== peg$FAILED) {
16753
- s6 = peg$parseBlockTag();
16754
- if (s6 !== peg$FAILED) {
16755
- peg$savedPos = s0;
16756
- s0 = peg$f67(s2, s5);
16757
- } else {
16758
- peg$currPos = s0;
16759
- s0 = peg$FAILED;
16760
- }
16762
+ peg$savedPos = s0;
16763
+ s0 = peg$f67(s2, s5);
16761
16764
  } else {
16762
16765
  peg$currPos = s0;
16763
16766
  s0 = peg$FAILED;
@@ -16832,7 +16835,15 @@ function peg$parse(input, options) {
16832
16835
  s8 = peg$FAILED;
16833
16836
  }
16834
16837
  if (s8 !== peg$FAILED) {
16835
- s9 = peg$parsechar();
16838
+ s9 = input.charAt(peg$currPos);
16839
+ if (peg$r1.test(s9)) {
16840
+ peg$currPos++;
16841
+ } else {
16842
+ s9 = peg$FAILED;
16843
+ if (peg$silentFails === 0) {
16844
+ peg$fail(peg$e15);
16845
+ }
16846
+ }
16836
16847
  if (s9 !== peg$FAILED) {
16837
16848
  s8 = [s8, s9];
16838
16849
  s7 = s8;
@@ -16844,38 +16855,59 @@ function peg$parse(input, options) {
16844
16855
  peg$currPos = s7;
16845
16856
  s7 = peg$FAILED;
16846
16857
  }
16847
- while (s7 !== peg$FAILED) {
16848
- s6.push(s7);
16849
- s7 = peg$currPos;
16850
- s8 = peg$currPos;
16851
- peg$silentFails++;
16852
- s9 = peg$parseBlockTag();
16853
- peg$silentFails--;
16854
- if (s9 === peg$FAILED) {
16855
- s8 = void 0;
16856
- } else {
16857
- peg$currPos = s8;
16858
- s8 = peg$FAILED;
16859
- }
16860
- if (s8 !== peg$FAILED) {
16861
- s9 = peg$parsechar();
16862
- if (s9 !== peg$FAILED) {
16863
- s8 = [s8, s9];
16864
- s7 = s8;
16858
+ if (s7 !== peg$FAILED) {
16859
+ while (s7 !== peg$FAILED) {
16860
+ s6.push(s7);
16861
+ s7 = peg$currPos;
16862
+ s8 = peg$currPos;
16863
+ peg$silentFails++;
16864
+ s9 = peg$parseBlockTag();
16865
+ peg$silentFails--;
16866
+ if (s9 === peg$FAILED) {
16867
+ s8 = void 0;
16868
+ } else {
16869
+ peg$currPos = s8;
16870
+ s8 = peg$FAILED;
16871
+ }
16872
+ if (s8 !== peg$FAILED) {
16873
+ s9 = input.charAt(peg$currPos);
16874
+ if (peg$r1.test(s9)) {
16875
+ peg$currPos++;
16876
+ } else {
16877
+ s9 = peg$FAILED;
16878
+ if (peg$silentFails === 0) {
16879
+ peg$fail(peg$e15);
16880
+ }
16881
+ }
16882
+ if (s9 !== peg$FAILED) {
16883
+ s8 = [s8, s9];
16884
+ s7 = s8;
16885
+ } else {
16886
+ peg$currPos = s7;
16887
+ s7 = peg$FAILED;
16888
+ }
16865
16889
  } else {
16866
16890
  peg$currPos = s7;
16867
16891
  s7 = peg$FAILED;
16868
16892
  }
16869
- } else {
16870
- peg$currPos = s7;
16871
- s7 = peg$FAILED;
16872
16893
  }
16894
+ } else {
16895
+ s6 = peg$FAILED;
16873
16896
  }
16874
- s5 = input.substring(s5, peg$currPos);
16875
- s6 = peg$parseBlockTag();
16876
16897
  if (s6 !== peg$FAILED) {
16877
- peg$savedPos = s0;
16878
- s0 = peg$f68(s2, s5);
16898
+ s5 = input.substring(s5, peg$currPos);
16899
+ } else {
16900
+ s5 = s6;
16901
+ }
16902
+ if (s5 !== peg$FAILED) {
16903
+ s6 = peg$parseBlockTag();
16904
+ if (s6 !== peg$FAILED) {
16905
+ peg$savedPos = s0;
16906
+ s0 = peg$f68(s2, s5);
16907
+ } else {
16908
+ peg$currPos = s0;
16909
+ s0 = peg$FAILED;
16910
+ }
16879
16911
  } else {
16880
16912
  peg$currPos = s0;
16881
16913
  s0 = peg$FAILED;
@@ -16902,15 +16934,7 @@ function peg$parse(input, options) {
16902
16934
  if (s1 === peg$FAILED) {
16903
16935
  s1 = null;
16904
16936
  }
16905
- if (input.substr(peg$currPos, 17) === peg$c38) {
16906
- s2 = peg$c38;
16907
- peg$currPos += 17;
16908
- } else {
16909
- s2 = peg$FAILED;
16910
- if (peg$silentFails === 0) {
16911
- peg$fail(peg$e42);
16912
- }
16913
- }
16937
+ s2 = peg$parseMediaSizeTags();
16914
16938
  if (s2 !== peg$FAILED) {
16915
16939
  if (input.charCodeAt(peg$currPos) === 58) {
16916
16940
  s3 = peg$c5;
@@ -16944,16 +16968,64 @@ function peg$parse(input, options) {
16944
16968
  }
16945
16969
  }
16946
16970
  }
16947
- s5 = peg$parseInlineMediaAlignment();
16948
- if (s5 !== peg$FAILED) {
16949
- s6 = peg$parseBlockTag();
16950
- if (s6 !== peg$FAILED) {
16951
- peg$savedPos = s0;
16952
- s0 = peg$f69(s2, s5);
16971
+ s5 = peg$currPos;
16972
+ s6 = [];
16973
+ s7 = peg$currPos;
16974
+ s8 = peg$currPos;
16975
+ peg$silentFails++;
16976
+ s9 = peg$parseBlockTag();
16977
+ peg$silentFails--;
16978
+ if (s9 === peg$FAILED) {
16979
+ s8 = void 0;
16980
+ } else {
16981
+ peg$currPos = s8;
16982
+ s8 = peg$FAILED;
16983
+ }
16984
+ if (s8 !== peg$FAILED) {
16985
+ s9 = peg$parsechar();
16986
+ if (s9 !== peg$FAILED) {
16987
+ s8 = [s8, s9];
16988
+ s7 = s8;
16953
16989
  } else {
16954
- peg$currPos = s0;
16955
- s0 = peg$FAILED;
16990
+ peg$currPos = s7;
16991
+ s7 = peg$FAILED;
16956
16992
  }
16993
+ } else {
16994
+ peg$currPos = s7;
16995
+ s7 = peg$FAILED;
16996
+ }
16997
+ while (s7 !== peg$FAILED) {
16998
+ s6.push(s7);
16999
+ s7 = peg$currPos;
17000
+ s8 = peg$currPos;
17001
+ peg$silentFails++;
17002
+ s9 = peg$parseBlockTag();
17003
+ peg$silentFails--;
17004
+ if (s9 === peg$FAILED) {
17005
+ s8 = void 0;
17006
+ } else {
17007
+ peg$currPos = s8;
17008
+ s8 = peg$FAILED;
17009
+ }
17010
+ if (s8 !== peg$FAILED) {
17011
+ s9 = peg$parsechar();
17012
+ if (s9 !== peg$FAILED) {
17013
+ s8 = [s8, s9];
17014
+ s7 = s8;
17015
+ } else {
17016
+ peg$currPos = s7;
17017
+ s7 = peg$FAILED;
17018
+ }
17019
+ } else {
17020
+ peg$currPos = s7;
17021
+ s7 = peg$FAILED;
17022
+ }
17023
+ }
17024
+ s5 = input.substring(s5, peg$currPos);
17025
+ s6 = peg$parseBlockTag();
17026
+ if (s6 !== peg$FAILED) {
17027
+ peg$savedPos = s0;
17028
+ s0 = peg$f69(s2, s5);
16957
17029
  } else {
16958
17030
  peg$currPos = s0;
16959
17031
  s0 = peg$FAILED;
@@ -16980,9 +17052,9 @@ function peg$parse(input, options) {
16980
17052
  if (s1 === peg$FAILED) {
16981
17053
  s1 = null;
16982
17054
  }
16983
- if (input.substr(peg$currPos, 4) === peg$c39) {
17055
+ if (input.substr(peg$currPos, 17) === peg$c39) {
16984
17056
  s2 = peg$c39;
16985
- peg$currPos += 4;
17057
+ peg$currPos += 17;
16986
17058
  } else {
16987
17059
  s2 = peg$FAILED;
16988
17060
  if (peg$silentFails === 0) {
@@ -17022,7 +17094,7 @@ function peg$parse(input, options) {
17022
17094
  }
17023
17095
  }
17024
17096
  }
17025
- s5 = peg$parseInlineMediaSize();
17097
+ s5 = peg$parseInlineMediaAlignment();
17026
17098
  if (s5 !== peg$FAILED) {
17027
17099
  s6 = peg$parseBlockTag();
17028
17100
  if (s6 !== peg$FAILED) {
@@ -17044,6 +17116,85 @@ function peg$parse(input, options) {
17044
17116
  peg$currPos = s0;
17045
17117
  s0 = peg$FAILED;
17046
17118
  }
17119
+ if (s0 === peg$FAILED) {
17120
+ s0 = peg$currPos;
17121
+ if (input.charCodeAt(peg$currPos) === 64) {
17122
+ s1 = peg$c22;
17123
+ peg$currPos++;
17124
+ } else {
17125
+ s1 = peg$FAILED;
17126
+ if (peg$silentFails === 0) {
17127
+ peg$fail(peg$e26);
17128
+ }
17129
+ }
17130
+ if (s1 === peg$FAILED) {
17131
+ s1 = null;
17132
+ }
17133
+ if (input.substr(peg$currPos, 4) === peg$c40) {
17134
+ s2 = peg$c40;
17135
+ peg$currPos += 4;
17136
+ } else {
17137
+ s2 = peg$FAILED;
17138
+ if (peg$silentFails === 0) {
17139
+ peg$fail(peg$e44);
17140
+ }
17141
+ }
17142
+ if (s2 !== peg$FAILED) {
17143
+ if (input.charCodeAt(peg$currPos) === 58) {
17144
+ s3 = peg$c5;
17145
+ peg$currPos++;
17146
+ } else {
17147
+ s3 = peg$FAILED;
17148
+ if (peg$silentFails === 0) {
17149
+ peg$fail(peg$e8);
17150
+ }
17151
+ }
17152
+ if (s3 !== peg$FAILED) {
17153
+ s4 = [];
17154
+ if (input.charCodeAt(peg$currPos) === 32) {
17155
+ s5 = peg$c12;
17156
+ peg$currPos++;
17157
+ } else {
17158
+ s5 = peg$FAILED;
17159
+ if (peg$silentFails === 0) {
17160
+ peg$fail(peg$e16);
17161
+ }
17162
+ }
17163
+ while (s5 !== peg$FAILED) {
17164
+ s4.push(s5);
17165
+ if (input.charCodeAt(peg$currPos) === 32) {
17166
+ s5 = peg$c12;
17167
+ peg$currPos++;
17168
+ } else {
17169
+ s5 = peg$FAILED;
17170
+ if (peg$silentFails === 0) {
17171
+ peg$fail(peg$e16);
17172
+ }
17173
+ }
17174
+ }
17175
+ s5 = peg$parseInlineMediaSize();
17176
+ if (s5 !== peg$FAILED) {
17177
+ s6 = peg$parseBlockTag();
17178
+ if (s6 !== peg$FAILED) {
17179
+ peg$savedPos = s0;
17180
+ s0 = peg$f71(s2, s5);
17181
+ } else {
17182
+ peg$currPos = s0;
17183
+ s0 = peg$FAILED;
17184
+ }
17185
+ } else {
17186
+ peg$currPos = s0;
17187
+ s0 = peg$FAILED;
17188
+ }
17189
+ } else {
17190
+ peg$currPos = s0;
17191
+ s0 = peg$FAILED;
17192
+ }
17193
+ } else {
17194
+ peg$currPos = s0;
17195
+ s0 = peg$FAILED;
17196
+ }
17197
+ }
17047
17198
  }
17048
17199
  }
17049
17200
  }
@@ -17052,83 +17203,83 @@ function peg$parse(input, options) {
17052
17203
  }
17053
17204
  function peg$parseInlineMediaAlignment() {
17054
17205
  let s0;
17055
- if (input.substr(peg$currPos, 3) === peg$c40) {
17056
- s0 = peg$c40;
17206
+ if (input.substr(peg$currPos, 3) === peg$c41) {
17207
+ s0 = peg$c41;
17057
17208
  peg$currPos += 3;
17058
17209
  } else {
17059
17210
  s0 = peg$FAILED;
17060
17211
  if (peg$silentFails === 0) {
17061
- peg$fail(peg$e44);
17212
+ peg$fail(peg$e45);
17062
17213
  }
17063
17214
  }
17064
17215
  if (s0 === peg$FAILED) {
17065
- if (input.substr(peg$currPos, 6) === peg$c41) {
17066
- s0 = peg$c41;
17216
+ if (input.substr(peg$currPos, 6) === peg$c42) {
17217
+ s0 = peg$c42;
17067
17218
  peg$currPos += 6;
17068
17219
  } else {
17069
17220
  s0 = peg$FAILED;
17070
17221
  if (peg$silentFails === 0) {
17071
- peg$fail(peg$e45);
17222
+ peg$fail(peg$e46);
17072
17223
  }
17073
17224
  }
17074
17225
  if (s0 === peg$FAILED) {
17075
- if (input.substr(peg$currPos, 6) === peg$c42) {
17076
- s0 = peg$c42;
17226
+ if (input.substr(peg$currPos, 6) === peg$c43) {
17227
+ s0 = peg$c43;
17077
17228
  peg$currPos += 6;
17078
17229
  } else {
17079
17230
  s0 = peg$FAILED;
17080
17231
  if (peg$silentFails === 0) {
17081
- peg$fail(peg$e46);
17232
+ peg$fail(peg$e47);
17082
17233
  }
17083
17234
  }
17084
17235
  if (s0 === peg$FAILED) {
17085
- if (input.substr(peg$currPos, 8) === peg$c43) {
17086
- s0 = peg$c43;
17236
+ if (input.substr(peg$currPos, 8) === peg$c44) {
17237
+ s0 = peg$c44;
17087
17238
  peg$currPos += 8;
17088
17239
  } else {
17089
17240
  s0 = peg$FAILED;
17090
17241
  if (peg$silentFails === 0) {
17091
- peg$fail(peg$e47);
17242
+ peg$fail(peg$e48);
17092
17243
  }
17093
17244
  }
17094
17245
  if (s0 === peg$FAILED) {
17095
- if (input.substr(peg$currPos, 3) === peg$c44) {
17096
- s0 = peg$c44;
17246
+ if (input.substr(peg$currPos, 3) === peg$c45) {
17247
+ s0 = peg$c45;
17097
17248
  peg$currPos += 3;
17098
17249
  } else {
17099
17250
  s0 = peg$FAILED;
17100
17251
  if (peg$silentFails === 0) {
17101
- peg$fail(peg$e48);
17252
+ peg$fail(peg$e49);
17102
17253
  }
17103
17254
  }
17104
17255
  if (s0 === peg$FAILED) {
17105
- if (input.substr(peg$currPos, 5) === peg$c45) {
17106
- s0 = peg$c45;
17256
+ if (input.substr(peg$currPos, 5) === peg$c46) {
17257
+ s0 = peg$c46;
17107
17258
  peg$currPos += 5;
17108
17259
  } else {
17109
17260
  s0 = peg$FAILED;
17110
17261
  if (peg$silentFails === 0) {
17111
- peg$fail(peg$e49);
17262
+ peg$fail(peg$e50);
17112
17263
  }
17113
17264
  }
17114
17265
  if (s0 === peg$FAILED) {
17115
- if (input.substr(peg$currPos, 11) === peg$c46) {
17116
- s0 = peg$c46;
17266
+ if (input.substr(peg$currPos, 11) === peg$c47) {
17267
+ s0 = peg$c47;
17117
17268
  peg$currPos += 11;
17118
17269
  } else {
17119
17270
  s0 = peg$FAILED;
17120
17271
  if (peg$silentFails === 0) {
17121
- peg$fail(peg$e50);
17272
+ peg$fail(peg$e51);
17122
17273
  }
17123
17274
  }
17124
17275
  if (s0 === peg$FAILED) {
17125
- if (input.substr(peg$currPos, 8) === peg$c47) {
17126
- s0 = peg$c47;
17276
+ if (input.substr(peg$currPos, 8) === peg$c48) {
17277
+ s0 = peg$c48;
17127
17278
  peg$currPos += 8;
17128
17279
  } else {
17129
17280
  s0 = peg$FAILED;
17130
17281
  if (peg$silentFails === 0) {
17131
- peg$fail(peg$e51);
17282
+ peg$fail(peg$e52);
17132
17283
  }
17133
17284
  }
17134
17285
  }
@@ -17142,53 +17293,53 @@ function peg$parse(input, options) {
17142
17293
  }
17143
17294
  function peg$parseInlineMediaSize() {
17144
17295
  let s0;
17145
- if (input.substr(peg$currPos, 11) === peg$c48) {
17146
- s0 = peg$c48;
17296
+ if (input.substr(peg$currPos, 11) === peg$c49) {
17297
+ s0 = peg$c49;
17147
17298
  peg$currPos += 11;
17148
17299
  } else {
17149
17300
  s0 = peg$FAILED;
17150
17301
  if (peg$silentFails === 0) {
17151
- peg$fail(peg$e52);
17302
+ peg$fail(peg$e53);
17152
17303
  }
17153
17304
  }
17154
17305
  if (s0 === peg$FAILED) {
17155
- if (input.substr(peg$currPos, 11) === peg$c49) {
17156
- s0 = peg$c49;
17306
+ if (input.substr(peg$currPos, 11) === peg$c50) {
17307
+ s0 = peg$c50;
17157
17308
  peg$currPos += 11;
17158
17309
  } else {
17159
17310
  s0 = peg$FAILED;
17160
17311
  if (peg$silentFails === 0) {
17161
- peg$fail(peg$e53);
17312
+ peg$fail(peg$e54);
17162
17313
  }
17163
17314
  }
17164
17315
  if (s0 === peg$FAILED) {
17165
- if (input.substr(peg$currPos, 5) === peg$c45) {
17166
- s0 = peg$c45;
17316
+ if (input.substr(peg$currPos, 5) === peg$c46) {
17317
+ s0 = peg$c46;
17167
17318
  peg$currPos += 5;
17168
17319
  } else {
17169
17320
  s0 = peg$FAILED;
17170
17321
  if (peg$silentFails === 0) {
17171
- peg$fail(peg$e49);
17322
+ peg$fail(peg$e50);
17172
17323
  }
17173
17324
  }
17174
17325
  if (s0 === peg$FAILED) {
17175
- if (input.substr(peg$currPos, 3) === peg$c44) {
17176
- s0 = peg$c44;
17326
+ if (input.substr(peg$currPos, 3) === peg$c45) {
17327
+ s0 = peg$c45;
17177
17328
  peg$currPos += 3;
17178
17329
  } else {
17179
17330
  s0 = peg$FAILED;
17180
17331
  if (peg$silentFails === 0) {
17181
- peg$fail(peg$e48);
17332
+ peg$fail(peg$e49);
17182
17333
  }
17183
17334
  }
17184
17335
  if (s0 === peg$FAILED) {
17185
- if (input.substr(peg$currPos, 8) === peg$c50) {
17186
- s0 = peg$c50;
17336
+ if (input.substr(peg$currPos, 8) === peg$c51) {
17337
+ s0 = peg$c51;
17187
17338
  peg$currPos += 8;
17188
17339
  } else {
17189
17340
  s0 = peg$FAILED;
17190
17341
  if (peg$silentFails === 0) {
17191
- peg$fail(peg$e54);
17342
+ peg$fail(peg$e55);
17192
17343
  }
17193
17344
  }
17194
17345
  }
@@ -17200,13 +17351,13 @@ function peg$parse(input, options) {
17200
17351
  function peg$parseAttrChainItem() {
17201
17352
  let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
17202
17353
  s0 = peg$currPos;
17203
- if (input.substr(peg$currPos, 5) === peg$c51) {
17204
- s1 = peg$c51;
17354
+ if (input.substr(peg$currPos, 5) === peg$c52) {
17355
+ s1 = peg$c52;
17205
17356
  peg$currPos += 5;
17206
17357
  } else {
17207
17358
  s1 = peg$FAILED;
17208
17359
  if (peg$silentFails === 0) {
17209
- peg$fail(peg$e55);
17360
+ peg$fail(peg$e56);
17210
17361
  }
17211
17362
  }
17212
17363
  if (s1 !== peg$FAILED) {
@@ -17267,7 +17418,7 @@ function peg$parse(input, options) {
17267
17418
  s3 = peg$parseBlockTag();
17268
17419
  if (s3 !== peg$FAILED) {
17269
17420
  peg$savedPos = s0;
17270
- s0 = peg$f71(s2);
17421
+ s0 = peg$f72(s2);
17271
17422
  } else {
17272
17423
  peg$currPos = s0;
17273
17424
  s0 = peg$FAILED;
@@ -17278,13 +17429,13 @@ function peg$parse(input, options) {
17278
17429
  }
17279
17430
  if (s0 === peg$FAILED) {
17280
17431
  s0 = peg$currPos;
17281
- if (input.substr(peg$currPos, 7) === peg$c52) {
17282
- s1 = peg$c52;
17432
+ if (input.substr(peg$currPos, 7) === peg$c53) {
17433
+ s1 = peg$c53;
17283
17434
  peg$currPos += 7;
17284
17435
  } else {
17285
17436
  s1 = peg$FAILED;
17286
17437
  if (peg$silentFails === 0) {
17287
- peg$fail(peg$e56);
17438
+ peg$fail(peg$e57);
17288
17439
  }
17289
17440
  }
17290
17441
  if (s1 !== peg$FAILED) {
@@ -17345,13 +17496,13 @@ function peg$parse(input, options) {
17345
17496
  s3 = peg$parseRefsChain();
17346
17497
  s4 = peg$parseBlockTag();
17347
17498
  if (s4 !== peg$FAILED) {
17348
- if (input.substr(peg$currPos, 9) === peg$c53) {
17349
- s5 = peg$c53;
17499
+ if (input.substr(peg$currPos, 9) === peg$c54) {
17500
+ s5 = peg$c54;
17350
17501
  peg$currPos += 9;
17351
17502
  } else {
17352
17503
  s5 = peg$FAILED;
17353
17504
  if (peg$silentFails === 0) {
17354
- peg$fail(peg$e57);
17505
+ peg$fail(peg$e58);
17355
17506
  }
17356
17507
  }
17357
17508
  if (s5 !== peg$FAILED) {
@@ -17412,7 +17563,7 @@ function peg$parse(input, options) {
17412
17563
  s7 = peg$parseBlockTag();
17413
17564
  if (s7 !== peg$FAILED) {
17414
17565
  peg$savedPos = s0;
17415
- s0 = peg$f72(s2, s3, s6);
17566
+ s0 = peg$f73(s2, s3, s6);
17416
17567
  } else {
17417
17568
  peg$currPos = s0;
17418
17569
  s0 = peg$FAILED;
@@ -17431,13 +17582,13 @@ function peg$parse(input, options) {
17431
17582
  }
17432
17583
  if (s0 === peg$FAILED) {
17433
17584
  s0 = peg$currPos;
17434
- if (input.substr(peg$currPos, 5) === peg$c54) {
17435
- s1 = peg$c54;
17585
+ if (input.substr(peg$currPos, 5) === peg$c55) {
17586
+ s1 = peg$c55;
17436
17587
  peg$currPos += 5;
17437
17588
  } else {
17438
17589
  s1 = peg$FAILED;
17439
17590
  if (peg$silentFails === 0) {
17440
- peg$fail(peg$e58);
17591
+ peg$fail(peg$e59);
17441
17592
  }
17442
17593
  }
17443
17594
  if (s1 !== peg$FAILED) {
@@ -17498,12 +17649,12 @@ function peg$parse(input, options) {
17498
17649
  s3 = peg$parseBlockTag();
17499
17650
  if (s3 !== peg$FAILED) {
17500
17651
  if (input.charCodeAt(peg$currPos) === 9658) {
17501
- s4 = peg$c55;
17652
+ s4 = peg$c56;
17502
17653
  peg$currPos++;
17503
17654
  } else {
17504
17655
  s4 = peg$FAILED;
17505
17656
  if (peg$silentFails === 0) {
17506
- peg$fail(peg$e59);
17657
+ peg$fail(peg$e60);
17507
17658
  }
17508
17659
  }
17509
17660
  if (s4 !== peg$FAILED) {
@@ -17564,7 +17715,7 @@ function peg$parse(input, options) {
17564
17715
  s6 = peg$parseBlockTag();
17565
17716
  if (s6 !== peg$FAILED) {
17566
17717
  peg$savedPos = s0;
17567
- s0 = peg$f73(s2, s5);
17718
+ s0 = peg$f74(s2, s5);
17568
17719
  } else {
17569
17720
  peg$currPos = s0;
17570
17721
  s0 = peg$FAILED;
@@ -17583,13 +17734,13 @@ function peg$parse(input, options) {
17583
17734
  }
17584
17735
  if (s0 === peg$FAILED) {
17585
17736
  s0 = peg$currPos;
17586
- if (input.substr(peg$currPos, 5) === peg$c54) {
17587
- s1 = peg$c54;
17737
+ if (input.substr(peg$currPos, 5) === peg$c55) {
17738
+ s1 = peg$c55;
17588
17739
  peg$currPos += 5;
17589
17740
  } else {
17590
17741
  s1 = peg$FAILED;
17591
17742
  if (peg$silentFails === 0) {
17592
- peg$fail(peg$e58);
17743
+ peg$fail(peg$e59);
17593
17744
  }
17594
17745
  }
17595
17746
  if (s1 !== peg$FAILED) {
@@ -17650,7 +17801,7 @@ function peg$parse(input, options) {
17650
17801
  s3 = peg$parseBlockTag();
17651
17802
  if (s3 !== peg$FAILED) {
17652
17803
  peg$savedPos = s0;
17653
- s0 = peg$f74(s2);
17804
+ s0 = peg$f75(s2);
17654
17805
  } else {
17655
17806
  peg$currPos = s0;
17656
17807
  s0 = peg$FAILED;
@@ -17662,12 +17813,12 @@ function peg$parse(input, options) {
17662
17813
  if (s0 === peg$FAILED) {
17663
17814
  s0 = peg$currPos;
17664
17815
  if (input.charCodeAt(peg$currPos) === 9658) {
17665
- s1 = peg$c55;
17816
+ s1 = peg$c56;
17666
17817
  peg$currPos++;
17667
17818
  } else {
17668
17819
  s1 = peg$FAILED;
17669
17820
  if (peg$silentFails === 0) {
17670
- peg$fail(peg$e59);
17821
+ peg$fail(peg$e60);
17671
17822
  }
17672
17823
  }
17673
17824
  if (s1 !== peg$FAILED) {
@@ -17728,7 +17879,7 @@ function peg$parse(input, options) {
17728
17879
  s3 = peg$parseBlockTag();
17729
17880
  if (s3 !== peg$FAILED) {
17730
17881
  peg$savedPos = s0;
17731
- s0 = peg$f75(s2);
17882
+ s0 = peg$f76(s2);
17732
17883
  } else {
17733
17884
  peg$currPos = s0;
17734
17885
  s0 = peg$FAILED;
@@ -17739,13 +17890,13 @@ function peg$parse(input, options) {
17739
17890
  }
17740
17891
  if (s0 === peg$FAILED) {
17741
17892
  s0 = peg$currPos;
17742
- if (input.substr(peg$currPos, 7) === peg$c56) {
17743
- s1 = peg$c56;
17893
+ if (input.substr(peg$currPos, 7) === peg$c57) {
17894
+ s1 = peg$c57;
17744
17895
  peg$currPos += 7;
17745
17896
  } else {
17746
17897
  s1 = peg$FAILED;
17747
17898
  if (peg$silentFails === 0) {
17748
- peg$fail(peg$e60);
17899
+ peg$fail(peg$e61);
17749
17900
  }
17750
17901
  }
17751
17902
  if (s1 !== peg$FAILED) {
@@ -17807,7 +17958,7 @@ function peg$parse(input, options) {
17807
17958
  if (s3 !== peg$FAILED) {
17808
17959
  s4 = peg$parseMediaChain();
17809
17960
  peg$savedPos = s0;
17810
- s0 = peg$f76(s2, s4);
17961
+ s0 = peg$f77(s2, s4);
17811
17962
  } else {
17812
17963
  peg$currPos = s0;
17813
17964
  s0 = peg$FAILED;
@@ -17818,13 +17969,13 @@ function peg$parse(input, options) {
17818
17969
  }
17819
17970
  if (s0 === peg$FAILED) {
17820
17971
  s0 = peg$currPos;
17821
- if (input.substr(peg$currPos, 9) === peg$c57) {
17822
- s1 = peg$c57;
17972
+ if (input.substr(peg$currPos, 9) === peg$c58) {
17973
+ s1 = peg$c58;
17823
17974
  peg$currPos += 9;
17824
17975
  } else {
17825
17976
  s1 = peg$FAILED;
17826
17977
  if (peg$silentFails === 0) {
17827
- peg$fail(peg$e61);
17978
+ peg$fail(peg$e62);
17828
17979
  }
17829
17980
  }
17830
17981
  if (s1 !== peg$FAILED) {
@@ -17885,7 +18036,7 @@ function peg$parse(input, options) {
17885
18036
  s3 = peg$parseBlockTag();
17886
18037
  if (s3 !== peg$FAILED) {
17887
18038
  peg$savedPos = s0;
17888
- s0 = peg$f77(s2);
18039
+ s0 = peg$f78(s2);
17889
18040
  } else {
17890
18041
  peg$currPos = s0;
17891
18042
  s0 = peg$FAILED;
@@ -17896,13 +18047,13 @@ function peg$parse(input, options) {
17896
18047
  }
17897
18048
  if (s0 === peg$FAILED) {
17898
18049
  s0 = peg$currPos;
17899
- if (input.substr(peg$currPos, 10) === peg$c58) {
17900
- s1 = peg$c58;
18050
+ if (input.substr(peg$currPos, 10) === peg$c59) {
18051
+ s1 = peg$c59;
17901
18052
  peg$currPos += 10;
17902
18053
  } else {
17903
18054
  s1 = peg$FAILED;
17904
18055
  if (peg$silentFails === 0) {
17905
- peg$fail(peg$e62);
18056
+ peg$fail(peg$e63);
17906
18057
  }
17907
18058
  }
17908
18059
  if (s1 !== peg$FAILED) {
@@ -17963,7 +18114,7 @@ function peg$parse(input, options) {
17963
18114
  s3 = peg$parseBlockTag();
17964
18115
  if (s3 !== peg$FAILED) {
17965
18116
  peg$savedPos = s0;
17966
- s0 = peg$f78(s2);
18117
+ s0 = peg$f79(s2);
17967
18118
  } else {
17968
18119
  peg$currPos = s0;
17969
18120
  s0 = peg$FAILED;
@@ -17974,13 +18125,13 @@ function peg$parse(input, options) {
17974
18125
  }
17975
18126
  if (s0 === peg$FAILED) {
17976
18127
  s0 = peg$currPos;
17977
- if (input.substr(peg$currPos, 4) === peg$c59) {
17978
- s1 = peg$c59;
18128
+ if (input.substr(peg$currPos, 4) === peg$c60) {
18129
+ s1 = peg$c60;
17979
18130
  peg$currPos += 4;
17980
18131
  } else {
17981
18132
  s1 = peg$FAILED;
17982
18133
  if (peg$silentFails === 0) {
17983
- peg$fail(peg$e63);
18134
+ peg$fail(peg$e64);
17984
18135
  }
17985
18136
  }
17986
18137
  if (s1 !== peg$FAILED) {
@@ -18041,7 +18192,7 @@ function peg$parse(input, options) {
18041
18192
  s3 = peg$parseBlockTag();
18042
18193
  if (s3 !== peg$FAILED) {
18043
18194
  peg$savedPos = s0;
18044
- s0 = peg$f79(s2);
18195
+ s0 = peg$f80(s2);
18045
18196
  } else {
18046
18197
  peg$currPos = s0;
18047
18198
  s0 = peg$FAILED;
@@ -18065,7 +18216,7 @@ function peg$parse(input, options) {
18065
18216
  s2 = peg$parseBlockTag();
18066
18217
  if (s2 !== peg$FAILED) {
18067
18218
  peg$savedPos = s0;
18068
- s0 = peg$f80();
18219
+ s0 = peg$f81();
18069
18220
  } else {
18070
18221
  peg$currPos = s0;
18071
18222
  s0 = peg$FAILED;
@@ -18076,13 +18227,13 @@ function peg$parse(input, options) {
18076
18227
  }
18077
18228
  if (s0 === peg$FAILED) {
18078
18229
  s0 = peg$currPos;
18079
- if (input.substr(peg$currPos, 5) === peg$c60) {
18080
- s1 = peg$c60;
18230
+ if (input.substr(peg$currPos, 5) === peg$c61) {
18231
+ s1 = peg$c61;
18081
18232
  peg$currPos += 5;
18082
18233
  } else {
18083
18234
  s1 = peg$FAILED;
18084
18235
  if (peg$silentFails === 0) {
18085
- peg$fail(peg$e64);
18236
+ peg$fail(peg$e65);
18086
18237
  }
18087
18238
  }
18088
18239
  if (s1 !== peg$FAILED) {
@@ -18143,7 +18294,7 @@ function peg$parse(input, options) {
18143
18294
  s3 = peg$parseBlockTag();
18144
18295
  if (s3 !== peg$FAILED) {
18145
18296
  peg$savedPos = s0;
18146
- s0 = peg$f81(s2);
18297
+ s0 = peg$f82(s2);
18147
18298
  } else {
18148
18299
  peg$currPos = s0;
18149
18300
  s0 = peg$FAILED;
@@ -18154,20 +18305,20 @@ function peg$parse(input, options) {
18154
18305
  }
18155
18306
  if (s0 === peg$FAILED) {
18156
18307
  s0 = peg$currPos;
18157
- if (input.substr(peg$currPos, 5) === peg$c61) {
18158
- s1 = peg$c61;
18308
+ if (input.substr(peg$currPos, 5) === peg$c62) {
18309
+ s1 = peg$c62;
18159
18310
  peg$currPos += 5;
18160
18311
  } else {
18161
18312
  s1 = peg$FAILED;
18162
18313
  if (peg$silentFails === 0) {
18163
- peg$fail(peg$e65);
18314
+ peg$fail(peg$e66);
18164
18315
  }
18165
18316
  }
18166
18317
  if (s1 !== peg$FAILED) {
18167
18318
  s2 = peg$parseBlockTag();
18168
18319
  if (s2 !== peg$FAILED) {
18169
18320
  peg$savedPos = s0;
18170
- s0 = peg$f82();
18321
+ s0 = peg$f83();
18171
18322
  } else {
18172
18323
  peg$currPos = s0;
18173
18324
  s0 = peg$FAILED;
@@ -18178,13 +18329,13 @@ function peg$parse(input, options) {
18178
18329
  }
18179
18330
  if (s0 === peg$FAILED) {
18180
18331
  s0 = peg$currPos;
18181
- if (input.substr(peg$currPos, 6) === peg$c62) {
18182
- s1 = peg$c62;
18332
+ if (input.substr(peg$currPos, 6) === peg$c63) {
18333
+ s1 = peg$c63;
18183
18334
  peg$currPos += 6;
18184
18335
  } else {
18185
18336
  s1 = peg$FAILED;
18186
18337
  if (peg$silentFails === 0) {
18187
- peg$fail(peg$e66);
18338
+ peg$fail(peg$e67);
18188
18339
  }
18189
18340
  }
18190
18341
  if (s1 !== peg$FAILED) {
@@ -18245,7 +18396,7 @@ function peg$parse(input, options) {
18245
18396
  s3 = peg$parseBlockTag();
18246
18397
  if (s3 !== peg$FAILED) {
18247
18398
  peg$savedPos = s0;
18248
- s0 = peg$f83(s2);
18399
+ s0 = peg$f84(s2);
18249
18400
  } else {
18250
18401
  peg$currPos = s0;
18251
18402
  s0 = peg$FAILED;
@@ -18256,25 +18407,25 @@ function peg$parse(input, options) {
18256
18407
  }
18257
18408
  if (s0 === peg$FAILED) {
18258
18409
  s0 = peg$currPos;
18259
- if (input.substr(peg$currPos, 9) === peg$c63) {
18260
- s1 = peg$c63;
18410
+ if (input.substr(peg$currPos, 9) === peg$c64) {
18411
+ s1 = peg$c64;
18261
18412
  peg$currPos += 9;
18262
18413
  } else {
18263
18414
  s1 = peg$FAILED;
18264
18415
  if (peg$silentFails === 0) {
18265
- peg$fail(peg$e67);
18416
+ peg$fail(peg$e68);
18266
18417
  }
18267
18418
  }
18268
18419
  if (s1 !== peg$FAILED) {
18269
18420
  s2 = peg$currPos;
18270
18421
  s3 = peg$currPos;
18271
18422
  if (input.charCodeAt(peg$currPos) === 80) {
18272
- s4 = peg$c64;
18423
+ s4 = peg$c65;
18273
18424
  peg$currPos++;
18274
18425
  } else {
18275
18426
  s4 = peg$FAILED;
18276
18427
  if (peg$silentFails === 0) {
18277
- peg$fail(peg$e68);
18428
+ peg$fail(peg$e69);
18278
18429
  }
18279
18430
  }
18280
18431
  if (s4 !== peg$FAILED) {
@@ -18347,7 +18498,7 @@ function peg$parse(input, options) {
18347
18498
  s3 = peg$parseBlockTag();
18348
18499
  if (s3 !== peg$FAILED) {
18349
18500
  peg$savedPos = s0;
18350
- s0 = peg$f84(s2);
18501
+ s0 = peg$f85(s2);
18351
18502
  } else {
18352
18503
  peg$currPos = s0;
18353
18504
  s0 = peg$FAILED;
@@ -18362,13 +18513,13 @@ function peg$parse(input, options) {
18362
18513
  }
18363
18514
  if (s0 === peg$FAILED) {
18364
18515
  s0 = peg$currPos;
18365
- if (input.substr(peg$currPos, 6) === peg$c65) {
18366
- s1 = peg$c65;
18516
+ if (input.substr(peg$currPos, 6) === peg$c66) {
18517
+ s1 = peg$c66;
18367
18518
  peg$currPos += 6;
18368
18519
  } else {
18369
18520
  s1 = peg$FAILED;
18370
18521
  if (peg$silentFails === 0) {
18371
- peg$fail(peg$e69);
18522
+ peg$fail(peg$e70);
18372
18523
  }
18373
18524
  }
18374
18525
  if (s1 !== peg$FAILED) {
@@ -18377,7 +18528,7 @@ function peg$parse(input, options) {
18377
18528
  s3 = peg$parseBlockTag();
18378
18529
  if (s3 !== peg$FAILED) {
18379
18530
  peg$savedPos = s0;
18380
- s0 = peg$f85(s2);
18531
+ s0 = peg$f86(s2);
18381
18532
  } else {
18382
18533
  peg$currPos = s0;
18383
18534
  s0 = peg$FAILED;
@@ -18397,7 +18548,7 @@ function peg$parse(input, options) {
18397
18548
  s2 = peg$parseBlockTag();
18398
18549
  if (s2 !== peg$FAILED) {
18399
18550
  peg$savedPos = s0;
18400
- s0 = peg$f86(s1);
18551
+ s0 = peg$f87(s1);
18401
18552
  } else {
18402
18553
  peg$currPos = s0;
18403
18554
  s0 = peg$FAILED;
@@ -18475,7 +18626,7 @@ function peg$parse(input, options) {
18475
18626
  s3 = peg$parseBlockTag();
18476
18627
  if (s3 !== peg$FAILED) {
18477
18628
  peg$savedPos = s0;
18478
- s0 = peg$f87(s2);
18629
+ s0 = peg$f88(s2);
18479
18630
  } else {
18480
18631
  peg$currPos = s0;
18481
18632
  s0 = peg$FAILED;
@@ -18515,13 +18666,13 @@ function peg$parse(input, options) {
18515
18666
  function peg$parseRef() {
18516
18667
  let s0, s1, s2, s3, s4, s5, s6;
18517
18668
  s0 = peg$currPos;
18518
- if (input.substr(peg$currPos, 2) === peg$c66) {
18519
- s1 = peg$c66;
18669
+ if (input.substr(peg$currPos, 2) === peg$c67) {
18670
+ s1 = peg$c67;
18520
18671
  peg$currPos += 2;
18521
18672
  } else {
18522
18673
  s1 = peg$FAILED;
18523
18674
  if (peg$silentFails === 0) {
18524
- peg$fail(peg$e70);
18675
+ peg$fail(peg$e71);
18525
18676
  }
18526
18677
  }
18527
18678
  if (s1 !== peg$FAILED) {
@@ -18580,7 +18731,7 @@ function peg$parse(input, options) {
18580
18731
  }
18581
18732
  s2 = input.substring(s2, peg$currPos);
18582
18733
  peg$savedPos = s0;
18583
- s0 = peg$f88(s2);
18734
+ s0 = peg$f89(s2);
18584
18735
  } else {
18585
18736
  peg$currPos = s0;
18586
18737
  s0 = peg$FAILED;
@@ -18589,303 +18740,303 @@ function peg$parse(input, options) {
18589
18740
  }
18590
18741
  function peg$parseAlternativeStyleTags() {
18591
18742
  let s0;
18592
- if (input.substr(peg$currPos, 4) === peg$c67) {
18593
- s0 = peg$c67;
18743
+ if (input.substr(peg$currPos, 4) === peg$c68) {
18744
+ s0 = peg$c68;
18594
18745
  peg$currPos += 4;
18595
18746
  } else {
18596
18747
  s0 = peg$FAILED;
18597
18748
  if (peg$silentFails === 0) {
18598
- peg$fail(peg$e71);
18749
+ peg$fail(peg$e72);
18599
18750
  }
18600
18751
  }
18601
18752
  if (s0 === peg$FAILED) {
18602
- if (input.substr(peg$currPos, 6) === peg$c68) {
18603
- s0 = peg$c68;
18753
+ if (input.substr(peg$currPos, 6) === peg$c69) {
18754
+ s0 = peg$c69;
18604
18755
  peg$currPos += 6;
18605
18756
  } else {
18606
18757
  s0 = peg$FAILED;
18607
18758
  if (peg$silentFails === 0) {
18608
- peg$fail(peg$e72);
18759
+ peg$fail(peg$e73);
18609
18760
  }
18610
18761
  }
18611
18762
  if (s0 === peg$FAILED) {
18612
- if (input.substr(peg$currPos, 5) === peg$c69) {
18613
- s0 = peg$c69;
18763
+ if (input.substr(peg$currPos, 5) === peg$c70) {
18764
+ s0 = peg$c70;
18614
18765
  peg$currPos += 5;
18615
18766
  } else {
18616
18767
  s0 = peg$FAILED;
18617
18768
  if (peg$silentFails === 0) {
18618
- peg$fail(peg$e73);
18769
+ peg$fail(peg$e74);
18619
18770
  }
18620
18771
  }
18621
18772
  if (s0 === peg$FAILED) {
18622
- if (input.substr(peg$currPos, 9) === peg$c70) {
18623
- s0 = peg$c70;
18773
+ if (input.substr(peg$currPos, 9) === peg$c71) {
18774
+ s0 = peg$c71;
18624
18775
  peg$currPos += 9;
18625
18776
  } else {
18626
18777
  s0 = peg$FAILED;
18627
18778
  if (peg$silentFails === 0) {
18628
- peg$fail(peg$e74);
18779
+ peg$fail(peg$e75);
18629
18780
  }
18630
18781
  }
18631
18782
  if (s0 === peg$FAILED) {
18632
- if (input.substr(peg$currPos, 6) === peg$c71) {
18633
- s0 = peg$c71;
18783
+ if (input.substr(peg$currPos, 6) === peg$c72) {
18784
+ s0 = peg$c72;
18634
18785
  peg$currPos += 6;
18635
18786
  } else {
18636
18787
  s0 = peg$FAILED;
18637
18788
  if (peg$silentFails === 0) {
18638
- peg$fail(peg$e75);
18789
+ peg$fail(peg$e76);
18639
18790
  }
18640
18791
  }
18641
18792
  if (s0 === peg$FAILED) {
18642
- if (input.substr(peg$currPos, 9) === peg$c72) {
18643
- s0 = peg$c72;
18793
+ if (input.substr(peg$currPos, 9) === peg$c73) {
18794
+ s0 = peg$c73;
18644
18795
  peg$currPos += 9;
18645
18796
  } else {
18646
18797
  s0 = peg$FAILED;
18647
18798
  if (peg$silentFails === 0) {
18648
- peg$fail(peg$e76);
18799
+ peg$fail(peg$e77);
18649
18800
  }
18650
18801
  }
18651
18802
  if (s0 === peg$FAILED) {
18652
- if (input.substr(peg$currPos, 11) === peg$c73) {
18653
- s0 = peg$c73;
18803
+ if (input.substr(peg$currPos, 11) === peg$c74) {
18804
+ s0 = peg$c74;
18654
18805
  peg$currPos += 11;
18655
18806
  } else {
18656
18807
  s0 = peg$FAILED;
18657
18808
  if (peg$silentFails === 0) {
18658
- peg$fail(peg$e77);
18809
+ peg$fail(peg$e78);
18659
18810
  }
18660
18811
  }
18661
18812
  if (s0 === peg$FAILED) {
18662
- if (input.substr(peg$currPos, 3) === peg$c74) {
18663
- s0 = peg$c74;
18813
+ if (input.substr(peg$currPos, 3) === peg$c75) {
18814
+ s0 = peg$c75;
18664
18815
  peg$currPos += 3;
18665
18816
  } else {
18666
18817
  s0 = peg$FAILED;
18667
18818
  if (peg$silentFails === 0) {
18668
- peg$fail(peg$e78);
18819
+ peg$fail(peg$e79);
18669
18820
  }
18670
18821
  }
18671
18822
  if (s0 === peg$FAILED) {
18672
- if (input.substr(peg$currPos, 3) === peg$c75) {
18673
- s0 = peg$c75;
18823
+ if (input.substr(peg$currPos, 3) === peg$c76) {
18824
+ s0 = peg$c76;
18674
18825
  peg$currPos += 3;
18675
18826
  } else {
18676
18827
  s0 = peg$FAILED;
18677
18828
  if (peg$silentFails === 0) {
18678
- peg$fail(peg$e79);
18829
+ peg$fail(peg$e80);
18679
18830
  }
18680
18831
  }
18681
18832
  if (s0 === peg$FAILED) {
18682
- if (input.substr(peg$currPos, 9) === peg$c76) {
18683
- s0 = peg$c76;
18833
+ if (input.substr(peg$currPos, 9) === peg$c77) {
18834
+ s0 = peg$c77;
18684
18835
  peg$currPos += 9;
18685
18836
  } else {
18686
18837
  s0 = peg$FAILED;
18687
18838
  if (peg$silentFails === 0) {
18688
- peg$fail(peg$e80);
18839
+ peg$fail(peg$e81);
18689
18840
  }
18690
18841
  }
18691
18842
  if (s0 === peg$FAILED) {
18692
- if (input.substr(peg$currPos, 15) === peg$c77) {
18693
- s0 = peg$c77;
18843
+ if (input.substr(peg$currPos, 15) === peg$c78) {
18844
+ s0 = peg$c78;
18694
18845
  peg$currPos += 15;
18695
18846
  } else {
18696
18847
  s0 = peg$FAILED;
18697
18848
  if (peg$silentFails === 0) {
18698
- peg$fail(peg$e81);
18849
+ peg$fail(peg$e82);
18699
18850
  }
18700
18851
  }
18701
18852
  if (s0 === peg$FAILED) {
18702
- if (input.substr(peg$currPos, 6) === peg$c78) {
18703
- s0 = peg$c78;
18853
+ if (input.substr(peg$currPos, 6) === peg$c79) {
18854
+ s0 = peg$c79;
18704
18855
  peg$currPos += 6;
18705
18856
  } else {
18706
18857
  s0 = peg$FAILED;
18707
18858
  if (peg$silentFails === 0) {
18708
- peg$fail(peg$e82);
18859
+ peg$fail(peg$e83);
18709
18860
  }
18710
18861
  }
18711
18862
  if (s0 === peg$FAILED) {
18712
- if (input.substr(peg$currPos, 13) === peg$c79) {
18713
- s0 = peg$c79;
18863
+ if (input.substr(peg$currPos, 13) === peg$c80) {
18864
+ s0 = peg$c80;
18714
18865
  peg$currPos += 13;
18715
18866
  } else {
18716
18867
  s0 = peg$FAILED;
18717
18868
  if (peg$silentFails === 0) {
18718
- peg$fail(peg$e83);
18869
+ peg$fail(peg$e84);
18719
18870
  }
18720
18871
  }
18721
18872
  if (s0 === peg$FAILED) {
18722
- if (input.substr(peg$currPos, 16) === peg$c80) {
18723
- s0 = peg$c80;
18873
+ if (input.substr(peg$currPos, 16) === peg$c81) {
18874
+ s0 = peg$c81;
18724
18875
  peg$currPos += 16;
18725
18876
  } else {
18726
18877
  s0 = peg$FAILED;
18727
18878
  if (peg$silentFails === 0) {
18728
- peg$fail(peg$e84);
18879
+ peg$fail(peg$e85);
18729
18880
  }
18730
18881
  }
18731
18882
  if (s0 === peg$FAILED) {
18732
- if (input.substr(peg$currPos, 16) === peg$c81) {
18733
- s0 = peg$c81;
18883
+ if (input.substr(peg$currPos, 16) === peg$c82) {
18884
+ s0 = peg$c82;
18734
18885
  peg$currPos += 16;
18735
18886
  } else {
18736
18887
  s0 = peg$FAILED;
18737
18888
  if (peg$silentFails === 0) {
18738
- peg$fail(peg$e85);
18889
+ peg$fail(peg$e86);
18739
18890
  }
18740
18891
  }
18741
18892
  if (s0 === peg$FAILED) {
18742
- if (input.substr(peg$currPos, 15) === peg$c82) {
18743
- s0 = peg$c82;
18893
+ if (input.substr(peg$currPos, 15) === peg$c83) {
18894
+ s0 = peg$c83;
18744
18895
  peg$currPos += 15;
18745
18896
  } else {
18746
18897
  s0 = peg$FAILED;
18747
18898
  if (peg$silentFails === 0) {
18748
- peg$fail(peg$e86);
18899
+ peg$fail(peg$e87);
18749
18900
  }
18750
18901
  }
18751
18902
  if (s0 === peg$FAILED) {
18752
- if (input.substr(peg$currPos, 14) === peg$c83) {
18753
- s0 = peg$c83;
18903
+ if (input.substr(peg$currPos, 14) === peg$c84) {
18904
+ s0 = peg$c84;
18754
18905
  peg$currPos += 14;
18755
18906
  } else {
18756
18907
  s0 = peg$FAILED;
18757
18908
  if (peg$silentFails === 0) {
18758
- peg$fail(peg$e87);
18909
+ peg$fail(peg$e88);
18759
18910
  }
18760
18911
  }
18761
18912
  if (s0 === peg$FAILED) {
18762
- if (input.substr(peg$currPos, 16) === peg$c84) {
18763
- s0 = peg$c84;
18913
+ if (input.substr(peg$currPos, 16) === peg$c85) {
18914
+ s0 = peg$c85;
18764
18915
  peg$currPos += 16;
18765
18916
  } else {
18766
18917
  s0 = peg$FAILED;
18767
18918
  if (peg$silentFails === 0) {
18768
- peg$fail(peg$e88);
18919
+ peg$fail(peg$e89);
18769
18920
  }
18770
18921
  }
18771
18922
  if (s0 === peg$FAILED) {
18772
- if (input.substr(peg$currPos, 14) === peg$c85) {
18773
- s0 = peg$c85;
18923
+ if (input.substr(peg$currPos, 14) === peg$c86) {
18924
+ s0 = peg$c86;
18774
18925
  peg$currPos += 14;
18775
18926
  } else {
18776
18927
  s0 = peg$FAILED;
18777
18928
  if (peg$silentFails === 0) {
18778
- peg$fail(peg$e89);
18929
+ peg$fail(peg$e90);
18779
18930
  }
18780
18931
  }
18781
18932
  if (s0 === peg$FAILED) {
18782
- if (input.substr(peg$currPos, 15) === peg$c86) {
18783
- s0 = peg$c86;
18933
+ if (input.substr(peg$currPos, 15) === peg$c87) {
18934
+ s0 = peg$c87;
18784
18935
  peg$currPos += 15;
18785
18936
  } else {
18786
18937
  s0 = peg$FAILED;
18787
18938
  if (peg$silentFails === 0) {
18788
- peg$fail(peg$e90);
18939
+ peg$fail(peg$e91);
18789
18940
  }
18790
18941
  }
18791
18942
  if (s0 === peg$FAILED) {
18792
- if (input.substr(peg$currPos, 15) === peg$c87) {
18793
- s0 = peg$c87;
18943
+ if (input.substr(peg$currPos, 15) === peg$c88) {
18944
+ s0 = peg$c88;
18794
18945
  peg$currPos += 15;
18795
18946
  } else {
18796
18947
  s0 = peg$FAILED;
18797
18948
  if (peg$silentFails === 0) {
18798
- peg$fail(peg$e91);
18949
+ peg$fail(peg$e92);
18799
18950
  }
18800
18951
  }
18801
18952
  if (s0 === peg$FAILED) {
18802
- if (input.substr(peg$currPos, 15) === peg$c88) {
18803
- s0 = peg$c88;
18953
+ if (input.substr(peg$currPos, 15) === peg$c89) {
18954
+ s0 = peg$c89;
18804
18955
  peg$currPos += 15;
18805
18956
  } else {
18806
18957
  s0 = peg$FAILED;
18807
18958
  if (peg$silentFails === 0) {
18808
- peg$fail(peg$e92);
18959
+ peg$fail(peg$e93);
18809
18960
  }
18810
18961
  }
18811
18962
  if (s0 === peg$FAILED) {
18812
- if (input.substr(peg$currPos, 14) === peg$c89) {
18813
- s0 = peg$c89;
18963
+ if (input.substr(peg$currPos, 14) === peg$c90) {
18964
+ s0 = peg$c90;
18814
18965
  peg$currPos += 14;
18815
18966
  } else {
18816
18967
  s0 = peg$FAILED;
18817
18968
  if (peg$silentFails === 0) {
18818
- peg$fail(peg$e93);
18969
+ peg$fail(peg$e94);
18819
18970
  }
18820
18971
  }
18821
18972
  if (s0 === peg$FAILED) {
18822
- if (input.substr(peg$currPos, 10) === peg$c90) {
18823
- s0 = peg$c90;
18973
+ if (input.substr(peg$currPos, 10) === peg$c91) {
18974
+ s0 = peg$c91;
18824
18975
  peg$currPos += 10;
18825
18976
  } else {
18826
18977
  s0 = peg$FAILED;
18827
18978
  if (peg$silentFails === 0) {
18828
- peg$fail(peg$e94);
18979
+ peg$fail(peg$e95);
18829
18980
  }
18830
18981
  }
18831
18982
  if (s0 === peg$FAILED) {
18832
- if (input.substr(peg$currPos, 13) === peg$c91) {
18833
- s0 = peg$c91;
18983
+ if (input.substr(peg$currPos, 13) === peg$c92) {
18984
+ s0 = peg$c92;
18834
18985
  peg$currPos += 13;
18835
18986
  } else {
18836
18987
  s0 = peg$FAILED;
18837
18988
  if (peg$silentFails === 0) {
18838
- peg$fail(peg$e95);
18989
+ peg$fail(peg$e96);
18839
18990
  }
18840
18991
  }
18841
18992
  if (s0 === peg$FAILED) {
18842
- if (input.substr(peg$currPos, 19) === peg$c92) {
18843
- s0 = peg$c92;
18993
+ if (input.substr(peg$currPos, 19) === peg$c93) {
18994
+ s0 = peg$c93;
18844
18995
  peg$currPos += 19;
18845
18996
  } else {
18846
18997
  s0 = peg$FAILED;
18847
18998
  if (peg$silentFails === 0) {
18848
- peg$fail(peg$e96);
18999
+ peg$fail(peg$e97);
18849
19000
  }
18850
19001
  }
18851
19002
  if (s0 === peg$FAILED) {
18852
- if (input.substr(peg$currPos, 10) === peg$c93) {
18853
- s0 = peg$c93;
19003
+ if (input.substr(peg$currPos, 10) === peg$c94) {
19004
+ s0 = peg$c94;
18854
19005
  peg$currPos += 10;
18855
19006
  } else {
18856
19007
  s0 = peg$FAILED;
18857
19008
  if (peg$silentFails === 0) {
18858
- peg$fail(peg$e97);
19009
+ peg$fail(peg$e98);
18859
19010
  }
18860
19011
  }
18861
19012
  if (s0 === peg$FAILED) {
18862
- if (input.substr(peg$currPos, 10) === peg$c94) {
18863
- s0 = peg$c94;
19013
+ if (input.substr(peg$currPos, 10) === peg$c95) {
19014
+ s0 = peg$c95;
18864
19015
  peg$currPos += 10;
18865
19016
  } else {
18866
19017
  s0 = peg$FAILED;
18867
19018
  if (peg$silentFails === 0) {
18868
- peg$fail(peg$e98);
19019
+ peg$fail(peg$e99);
18869
19020
  }
18870
19021
  }
18871
19022
  if (s0 === peg$FAILED) {
18872
- if (input.substr(peg$currPos, 13) === peg$c95) {
18873
- s0 = peg$c95;
19023
+ if (input.substr(peg$currPos, 13) === peg$c96) {
19024
+ s0 = peg$c96;
18874
19025
  peg$currPos += 13;
18875
19026
  } else {
18876
19027
  s0 = peg$FAILED;
18877
19028
  if (peg$silentFails === 0) {
18878
- peg$fail(peg$e99);
19029
+ peg$fail(peg$e100);
18879
19030
  }
18880
19031
  }
18881
19032
  if (s0 === peg$FAILED) {
18882
- if (input.substr(peg$currPos, 11) === peg$c96) {
18883
- s0 = peg$c96;
19033
+ if (input.substr(peg$currPos, 11) === peg$c97) {
19034
+ s0 = peg$c97;
18884
19035
  peg$currPos += 11;
18885
19036
  } else {
18886
19037
  s0 = peg$FAILED;
18887
19038
  if (peg$silentFails === 0) {
18888
- peg$fail(peg$e100);
19039
+ peg$fail(peg$e101);
18889
19040
  }
18890
19041
  }
18891
19042
  }
@@ -18921,233 +19072,233 @@ function peg$parse(input, options) {
18921
19072
  }
18922
19073
  function peg$parseColor() {
18923
19074
  let s0;
18924
- if (input.substr(peg$currPos, 4) === peg$c97) {
18925
- s0 = peg$c97;
19075
+ if (input.substr(peg$currPos, 4) === peg$c98) {
19076
+ s0 = peg$c98;
18926
19077
  peg$currPos += 4;
18927
19078
  } else {
18928
19079
  s0 = peg$FAILED;
18929
19080
  if (peg$silentFails === 0) {
18930
- peg$fail(peg$e101);
19081
+ peg$fail(peg$e102);
18931
19082
  }
18932
19083
  }
18933
19084
  if (s0 === peg$FAILED) {
18934
- if (input.substr(peg$currPos, 5) === peg$c98) {
18935
- s0 = peg$c98;
19085
+ if (input.substr(peg$currPos, 5) === peg$c99) {
19086
+ s0 = peg$c99;
18936
19087
  peg$currPos += 5;
18937
19088
  } else {
18938
19089
  s0 = peg$FAILED;
18939
19090
  if (peg$silentFails === 0) {
18940
- peg$fail(peg$e102);
19091
+ peg$fail(peg$e103);
18941
19092
  }
18942
19093
  }
18943
19094
  if (s0 === peg$FAILED) {
18944
- if (input.substr(peg$currPos, 4) === peg$c99) {
18945
- s0 = peg$c99;
19095
+ if (input.substr(peg$currPos, 4) === peg$c100) {
19096
+ s0 = peg$c100;
18946
19097
  peg$currPos += 4;
18947
19098
  } else {
18948
19099
  s0 = peg$FAILED;
18949
19100
  if (peg$silentFails === 0) {
18950
- peg$fail(peg$e103);
19101
+ peg$fail(peg$e104);
18951
19102
  }
18952
19103
  }
18953
19104
  if (s0 === peg$FAILED) {
18954
- if (input.substr(peg$currPos, 5) === peg$c100) {
18955
- s0 = peg$c100;
19105
+ if (input.substr(peg$currPos, 5) === peg$c101) {
19106
+ s0 = peg$c101;
18956
19107
  peg$currPos += 5;
18957
19108
  } else {
18958
19109
  s0 = peg$FAILED;
18959
19110
  if (peg$silentFails === 0) {
18960
- peg$fail(peg$e104);
19111
+ peg$fail(peg$e105);
18961
19112
  }
18962
19113
  }
18963
19114
  if (s0 === peg$FAILED) {
18964
- if (input.substr(peg$currPos, 7) === peg$c101) {
18965
- s0 = peg$c101;
19115
+ if (input.substr(peg$currPos, 7) === peg$c102) {
19116
+ s0 = peg$c102;
18966
19117
  peg$currPos += 7;
18967
19118
  } else {
18968
19119
  s0 = peg$FAILED;
18969
19120
  if (peg$silentFails === 0) {
18970
- peg$fail(peg$e105);
19121
+ peg$fail(peg$e106);
18971
19122
  }
18972
19123
  }
18973
19124
  if (s0 === peg$FAILED) {
18974
- if (input.substr(peg$currPos, 9) === peg$c102) {
18975
- s0 = peg$c102;
19125
+ if (input.substr(peg$currPos, 9) === peg$c103) {
19126
+ s0 = peg$c103;
18976
19127
  peg$currPos += 9;
18977
19128
  } else {
18978
19129
  s0 = peg$FAILED;
18979
19130
  if (peg$silentFails === 0) {
18980
- peg$fail(peg$e106);
19131
+ peg$fail(peg$e107);
18981
19132
  }
18982
19133
  }
18983
19134
  if (s0 === peg$FAILED) {
18984
- if (input.substr(peg$currPos, 4) === peg$c103) {
18985
- s0 = peg$c103;
19135
+ if (input.substr(peg$currPos, 4) === peg$c104) {
19136
+ s0 = peg$c104;
18986
19137
  peg$currPos += 4;
18987
19138
  } else {
18988
19139
  s0 = peg$FAILED;
18989
19140
  if (peg$silentFails === 0) {
18990
- peg$fail(peg$e107);
19141
+ peg$fail(peg$e108);
18991
19142
  }
18992
19143
  }
18993
19144
  if (s0 === peg$FAILED) {
18994
- if (input.substr(peg$currPos, 8) === peg$c104) {
18995
- s0 = peg$c104;
19145
+ if (input.substr(peg$currPos, 8) === peg$c105) {
19146
+ s0 = peg$c105;
18996
19147
  peg$currPos += 8;
18997
19148
  } else {
18998
19149
  s0 = peg$FAILED;
18999
19150
  if (peg$silentFails === 0) {
19000
- peg$fail(peg$e108);
19151
+ peg$fail(peg$e109);
19001
19152
  }
19002
19153
  }
19003
19154
  if (s0 === peg$FAILED) {
19004
- if (input.substr(peg$currPos, 5) === peg$c105) {
19005
- s0 = peg$c105;
19155
+ if (input.substr(peg$currPos, 5) === peg$c106) {
19156
+ s0 = peg$c106;
19006
19157
  peg$currPos += 5;
19007
19158
  } else {
19008
19159
  s0 = peg$FAILED;
19009
19160
  if (peg$silentFails === 0) {
19010
- peg$fail(peg$e109);
19161
+ peg$fail(peg$e110);
19011
19162
  }
19012
19163
  }
19013
19164
  if (s0 === peg$FAILED) {
19014
- if (input.substr(peg$currPos, 4) === peg$c106) {
19015
- s0 = peg$c106;
19165
+ if (input.substr(peg$currPos, 4) === peg$c107) {
19166
+ s0 = peg$c107;
19016
19167
  peg$currPos += 4;
19017
19168
  } else {
19018
19169
  s0 = peg$FAILED;
19019
19170
  if (peg$silentFails === 0) {
19020
- peg$fail(peg$e110);
19171
+ peg$fail(peg$e111);
19021
19172
  }
19022
19173
  }
19023
19174
  if (s0 === peg$FAILED) {
19024
- if (input.substr(peg$currPos, 7) === peg$c107) {
19025
- s0 = peg$c107;
19175
+ if (input.substr(peg$currPos, 7) === peg$c108) {
19176
+ s0 = peg$c108;
19026
19177
  peg$currPos += 7;
19027
19178
  } else {
19028
19179
  s0 = peg$FAILED;
19029
19180
  if (peg$silentFails === 0) {
19030
- peg$fail(peg$e111);
19181
+ peg$fail(peg$e112);
19031
19182
  }
19032
19183
  }
19033
19184
  if (s0 === peg$FAILED) {
19034
- if (input.substr(peg$currPos, 6) === peg$c108) {
19035
- s0 = peg$c108;
19185
+ if (input.substr(peg$currPos, 6) === peg$c109) {
19186
+ s0 = peg$c109;
19036
19187
  peg$currPos += 6;
19037
19188
  } else {
19038
19189
  s0 = peg$FAILED;
19039
19190
  if (peg$silentFails === 0) {
19040
- peg$fail(peg$e112);
19191
+ peg$fail(peg$e113);
19041
19192
  }
19042
19193
  }
19043
19194
  if (s0 === peg$FAILED) {
19044
- if (input.substr(peg$currPos, 4) === peg$c109) {
19045
- s0 = peg$c109;
19195
+ if (input.substr(peg$currPos, 4) === peg$c110) {
19196
+ s0 = peg$c110;
19046
19197
  peg$currPos += 4;
19047
19198
  } else {
19048
19199
  s0 = peg$FAILED;
19049
19200
  if (peg$silentFails === 0) {
19050
- peg$fail(peg$e113);
19201
+ peg$fail(peg$e114);
19051
19202
  }
19052
19203
  }
19053
19204
  if (s0 === peg$FAILED) {
19054
- if (input.substr(peg$currPos, 5) === peg$c110) {
19055
- s0 = peg$c110;
19205
+ if (input.substr(peg$currPos, 5) === peg$c111) {
19206
+ s0 = peg$c111;
19056
19207
  peg$currPos += 5;
19057
19208
  } else {
19058
19209
  s0 = peg$FAILED;
19059
19210
  if (peg$silentFails === 0) {
19060
- peg$fail(peg$e114);
19211
+ peg$fail(peg$e115);
19061
19212
  }
19062
19213
  }
19063
19214
  if (s0 === peg$FAILED) {
19064
- if (input.substr(peg$currPos, 6) === peg$c111) {
19065
- s0 = peg$c111;
19215
+ if (input.substr(peg$currPos, 6) === peg$c112) {
19216
+ s0 = peg$c112;
19066
19217
  peg$currPos += 6;
19067
19218
  } else {
19068
19219
  s0 = peg$FAILED;
19069
19220
  if (peg$silentFails === 0) {
19070
- peg$fail(peg$e115);
19221
+ peg$fail(peg$e116);
19071
19222
  }
19072
19223
  }
19073
19224
  if (s0 === peg$FAILED) {
19074
- if (input.substr(peg$currPos, 4) === peg$c112) {
19075
- s0 = peg$c112;
19225
+ if (input.substr(peg$currPos, 4) === peg$c113) {
19226
+ s0 = peg$c113;
19076
19227
  peg$currPos += 4;
19077
19228
  } else {
19078
19229
  s0 = peg$FAILED;
19079
19230
  if (peg$silentFails === 0) {
19080
- peg$fail(peg$e116);
19231
+ peg$fail(peg$e117);
19081
19232
  }
19082
19233
  }
19083
19234
  if (s0 === peg$FAILED) {
19084
- if (input.substr(peg$currPos, 6) === peg$c113) {
19085
- s0 = peg$c113;
19235
+ if (input.substr(peg$currPos, 6) === peg$c114) {
19236
+ s0 = peg$c114;
19086
19237
  peg$currPos += 6;
19087
19238
  } else {
19088
19239
  s0 = peg$FAILED;
19089
19240
  if (peg$silentFails === 0) {
19090
- peg$fail(peg$e117);
19241
+ peg$fail(peg$e118);
19091
19242
  }
19092
19243
  }
19093
19244
  if (s0 === peg$FAILED) {
19094
- if (input.substr(peg$currPos, 3) === peg$c114) {
19095
- s0 = peg$c114;
19245
+ if (input.substr(peg$currPos, 3) === peg$c115) {
19246
+ s0 = peg$c115;
19096
19247
  peg$currPos += 3;
19097
19248
  } else {
19098
19249
  s0 = peg$FAILED;
19099
19250
  if (peg$silentFails === 0) {
19100
- peg$fail(peg$e118);
19251
+ peg$fail(peg$e119);
19101
19252
  }
19102
19253
  }
19103
19254
  if (s0 === peg$FAILED) {
19104
- if (input.substr(peg$currPos, 6) === peg$c115) {
19105
- s0 = peg$c115;
19255
+ if (input.substr(peg$currPos, 6) === peg$c116) {
19256
+ s0 = peg$c116;
19106
19257
  peg$currPos += 6;
19107
19258
  } else {
19108
19259
  s0 = peg$FAILED;
19109
19260
  if (peg$silentFails === 0) {
19110
- peg$fail(peg$e119);
19261
+ peg$fail(peg$e120);
19111
19262
  }
19112
19263
  }
19113
19264
  if (s0 === peg$FAILED) {
19114
- if (input.substr(peg$currPos, 4) === peg$c116) {
19115
- s0 = peg$c116;
19265
+ if (input.substr(peg$currPos, 4) === peg$c117) {
19266
+ s0 = peg$c117;
19116
19267
  peg$currPos += 4;
19117
19268
  } else {
19118
19269
  s0 = peg$FAILED;
19119
19270
  if (peg$silentFails === 0) {
19120
- peg$fail(peg$e120);
19271
+ peg$fail(peg$e121);
19121
19272
  }
19122
19273
  }
19123
19274
  if (s0 === peg$FAILED) {
19124
- if (input.substr(peg$currPos, 6) === peg$c117) {
19125
- s0 = peg$c117;
19275
+ if (input.substr(peg$currPos, 6) === peg$c118) {
19276
+ s0 = peg$c118;
19126
19277
  peg$currPos += 6;
19127
19278
  } else {
19128
19279
  s0 = peg$FAILED;
19129
19280
  if (peg$silentFails === 0) {
19130
- peg$fail(peg$e121);
19281
+ peg$fail(peg$e122);
19131
19282
  }
19132
19283
  }
19133
19284
  if (s0 === peg$FAILED) {
19134
- if (input.substr(peg$currPos, 5) === peg$c118) {
19135
- s0 = peg$c118;
19285
+ if (input.substr(peg$currPos, 5) === peg$c119) {
19286
+ s0 = peg$c119;
19136
19287
  peg$currPos += 5;
19137
19288
  } else {
19138
19289
  s0 = peg$FAILED;
19139
19290
  if (peg$silentFails === 0) {
19140
- peg$fail(peg$e122);
19291
+ peg$fail(peg$e123);
19141
19292
  }
19142
19293
  }
19143
19294
  if (s0 === peg$FAILED) {
19144
- if (input.substr(peg$currPos, 6) === peg$c119) {
19145
- s0 = peg$c119;
19295
+ if (input.substr(peg$currPos, 6) === peg$c120) {
19296
+ s0 = peg$c120;
19146
19297
  peg$currPos += 6;
19147
19298
  } else {
19148
19299
  s0 = peg$FAILED;
19149
19300
  if (peg$silentFails === 0) {
19150
- peg$fail(peg$e123);
19301
+ peg$fail(peg$e124);
19151
19302
  }
19152
19303
  }
19153
19304
  }
@@ -19180,7 +19331,7 @@ function peg$parse(input, options) {
19180
19331
  s0 = peg$currPos;
19181
19332
  s1 = peg$parsebitmarkMinusMinusString();
19182
19333
  peg$savedPos = s0;
19183
- s1 = peg$f89(s1);
19334
+ s1 = peg$f90(s1);
19184
19335
  s0 = s1;
19185
19336
  peg$silentFails--;
19186
19337
  return s0;
@@ -19206,7 +19357,7 @@ function peg$parse(input, options) {
19206
19357
  }
19207
19358
  }
19208
19359
  peg$savedPos = s0;
19209
- s0 = peg$f90(s1, s2);
19360
+ s0 = peg$f91(s1, s2);
19210
19361
  peg$silentFails--;
19211
19362
  return s0;
19212
19363
  }
@@ -19216,7 +19367,7 @@ function peg$parse(input, options) {
19216
19367
  s1 = peg$parseNL();
19217
19368
  if (s1 !== peg$FAILED) {
19218
19369
  peg$savedPos = s0;
19219
- s1 = peg$f91();
19370
+ s1 = peg$f92();
19220
19371
  }
19221
19372
  s0 = s1;
19222
19373
  if (s0 === peg$FAILED) {
@@ -19345,7 +19496,7 @@ function peg$parse(input, options) {
19345
19496
  }
19346
19497
  if (s1 !== peg$FAILED) {
19347
19498
  peg$savedPos = s0;
19348
- s1 = peg$f92(s1);
19499
+ s1 = peg$f93(s1);
19349
19500
  }
19350
19501
  s0 = s1;
19351
19502
  }
@@ -19354,12 +19505,12 @@ function peg$parse(input, options) {
19354
19505
  function peg$parseBoldHalfTag() {
19355
19506
  let s0;
19356
19507
  if (input.charCodeAt(peg$currPos) === 42) {
19357
- s0 = peg$c120;
19508
+ s0 = peg$c121;
19358
19509
  peg$currPos++;
19359
19510
  } else {
19360
19511
  s0 = peg$FAILED;
19361
19512
  if (peg$silentFails === 0) {
19362
- peg$fail(peg$e124);
19513
+ peg$fail(peg$e125);
19363
19514
  }
19364
19515
  }
19365
19516
  return s0;
@@ -19367,12 +19518,12 @@ function peg$parse(input, options) {
19367
19518
  function peg$parseItalicHalfTag() {
19368
19519
  let s0;
19369
19520
  if (input.charCodeAt(peg$currPos) === 95) {
19370
- s0 = peg$c121;
19521
+ s0 = peg$c122;
19371
19522
  peg$currPos++;
19372
19523
  } else {
19373
19524
  s0 = peg$FAILED;
19374
19525
  if (peg$silentFails === 0) {
19375
- peg$fail(peg$e125);
19526
+ peg$fail(peg$e126);
19376
19527
  }
19377
19528
  }
19378
19529
  return s0;
@@ -19380,12 +19531,12 @@ function peg$parse(input, options) {
19380
19531
  function peg$parseLightHalfTag() {
19381
19532
  let s0;
19382
19533
  if (input.charCodeAt(peg$currPos) === 96) {
19383
- s0 = peg$c122;
19534
+ s0 = peg$c123;
19384
19535
  peg$currPos++;
19385
19536
  } else {
19386
19537
  s0 = peg$FAILED;
19387
19538
  if (peg$silentFails === 0) {
19388
- peg$fail(peg$e126);
19539
+ peg$fail(peg$e127);
19389
19540
  }
19390
19541
  }
19391
19542
  return s0;
@@ -19393,12 +19544,12 @@ function peg$parse(input, options) {
19393
19544
  function peg$parseHighlightHalfTag() {
19394
19545
  let s0;
19395
19546
  if (input.charCodeAt(peg$currPos) === 33) {
19396
- s0 = peg$c123;
19547
+ s0 = peg$c124;
19397
19548
  peg$currPos++;
19398
19549
  } else {
19399
19550
  s0 = peg$FAILED;
19400
19551
  if (peg$silentFails === 0) {
19401
- peg$fail(peg$e127);
19552
+ peg$fail(peg$e128);
19402
19553
  }
19403
19554
  }
19404
19555
  return s0;
@@ -19481,13 +19632,13 @@ function peg$parse(input, options) {
19481
19632
  }
19482
19633
  function peg$parseBodyBitOpenTag() {
19483
19634
  let s0;
19484
- if (input.substr(peg$currPos, 2) === peg$c124) {
19485
- s0 = peg$c124;
19635
+ if (input.substr(peg$currPos, 2) === peg$c125) {
19636
+ s0 = peg$c125;
19486
19637
  peg$currPos += 2;
19487
19638
  } else {
19488
19639
  s0 = peg$FAILED;
19489
19640
  if (peg$silentFails === 0) {
19490
- peg$fail(peg$e128);
19641
+ peg$fail(peg$e129);
19491
19642
  }
19492
19643
  }
19493
19644
  return s0;
@@ -19495,12 +19646,12 @@ function peg$parse(input, options) {
19495
19646
  function peg$parseBodyBitCloseTag() {
19496
19647
  let s0;
19497
19648
  if (input.charCodeAt(peg$currPos) === 93) {
19498
- s0 = peg$c125;
19649
+ s0 = peg$c126;
19499
19650
  peg$currPos++;
19500
19651
  } else {
19501
19652
  s0 = peg$FAILED;
19502
19653
  if (peg$silentFails === 0) {
19503
- peg$fail(peg$e129);
19654
+ peg$fail(peg$e130);
19504
19655
  }
19505
19656
  }
19506
19657
  return s0;
@@ -19546,7 +19697,7 @@ function peg$parse(input, options) {
19546
19697
  s3 = peg$parseBodyBitCloseTag();
19547
19698
  if (s3 !== peg$FAILED) {
19548
19699
  peg$savedPos = s0;
19549
- s0 = peg$f93(s2);
19700
+ s0 = peg$f94(s2);
19550
19701
  } else {
19551
19702
  peg$currPos = s0;
19552
19703
  s0 = peg$FAILED;
@@ -19636,7 +19787,7 @@ function peg$parse(input, options) {
19636
19787
  s3 = peg$parseBoldTag();
19637
19788
  if (s3 !== peg$FAILED) {
19638
19789
  peg$savedPos = s0;
19639
- s0 = peg$f94(s2);
19790
+ s0 = peg$f95(s2);
19640
19791
  } else {
19641
19792
  peg$currPos = s0;
19642
19793
  s0 = peg$FAILED;
@@ -19722,7 +19873,7 @@ function peg$parse(input, options) {
19722
19873
  s3 = peg$parseItalicTag();
19723
19874
  if (s3 !== peg$FAILED) {
19724
19875
  peg$savedPos = s0;
19725
- s0 = peg$f95(s2);
19876
+ s0 = peg$f96(s2);
19726
19877
  } else {
19727
19878
  peg$currPos = s0;
19728
19879
  s0 = peg$FAILED;
@@ -19808,7 +19959,7 @@ function peg$parse(input, options) {
19808
19959
  s3 = peg$parseLightTag();
19809
19960
  if (s3 !== peg$FAILED) {
19810
19961
  peg$savedPos = s0;
19811
- s0 = peg$f96(s2);
19962
+ s0 = peg$f97(s2);
19812
19963
  } else {
19813
19964
  peg$currPos = s0;
19814
19965
  s0 = peg$FAILED;
@@ -19894,7 +20045,7 @@ function peg$parse(input, options) {
19894
20045
  s3 = peg$parseHighlightTag();
19895
20046
  if (s3 !== peg$FAILED) {
19896
20047
  peg$savedPos = s0;
19897
- s0 = peg$f97(s2);
20048
+ s0 = peg$f98(s2);
19898
20049
  } else {
19899
20050
  peg$currPos = s0;
19900
20051
  s0 = peg$FAILED;
@@ -19979,22 +20130,22 @@ function peg$parse(input, options) {
19979
20130
  let s0, s1;
19980
20131
  peg$silentFails++;
19981
20132
  if (input.charCodeAt(peg$currPos) === 10) {
19982
- s0 = peg$c126;
20133
+ s0 = peg$c127;
19983
20134
  peg$currPos++;
19984
20135
  } else {
19985
20136
  s0 = peg$FAILED;
19986
20137
  if (peg$silentFails === 0) {
19987
- peg$fail(peg$e131);
20138
+ peg$fail(peg$e132);
19988
20139
  }
19989
20140
  }
19990
20141
  if (s0 === peg$FAILED) {
19991
- if (input.substr(peg$currPos, 2) === peg$c127) {
19992
- s0 = peg$c127;
20142
+ if (input.substr(peg$currPos, 2) === peg$c128) {
20143
+ s0 = peg$c128;
19993
20144
  peg$currPos += 2;
19994
20145
  } else {
19995
20146
  s0 = peg$FAILED;
19996
20147
  if (peg$silentFails === 0) {
19997
- peg$fail(peg$e132);
20148
+ peg$fail(peg$e133);
19998
20149
  }
19999
20150
  }
20000
20151
  if (s0 === peg$FAILED) {
@@ -20004,7 +20155,7 @@ function peg$parse(input, options) {
20004
20155
  } else {
20005
20156
  s0 = peg$FAILED;
20006
20157
  if (peg$silentFails === 0) {
20007
- peg$fail(peg$e133);
20158
+ peg$fail(peg$e134);
20008
20159
  }
20009
20160
  }
20010
20161
  }
@@ -20013,7 +20164,7 @@ function peg$parse(input, options) {
20013
20164
  if (s0 === peg$FAILED) {
20014
20165
  s1 = peg$FAILED;
20015
20166
  if (peg$silentFails === 0) {
20016
- peg$fail(peg$e130);
20167
+ peg$fail(peg$e131);
20017
20168
  }
20018
20169
  }
20019
20170
  return s0;
@@ -20026,7 +20177,7 @@ function peg$parse(input, options) {
20026
20177
  } else {
20027
20178
  s0 = peg$FAILED;
20028
20179
  if (peg$silentFails === 0) {
20029
- peg$fail(peg$e134);
20180
+ peg$fail(peg$e135);
20030
20181
  }
20031
20182
  }
20032
20183
  return s0;
@@ -20060,35 +20211,35 @@ function peg$parse(input, options) {
20060
20211
  let s0, s1, s2, s3, s4, s5, s6, s7, s8;
20061
20212
  s0 = peg$currPos;
20062
20213
  s1 = peg$currPos;
20063
- if (input.substr(peg$currPos, 4) === peg$c128) {
20064
- s2 = peg$c128;
20214
+ if (input.substr(peg$currPos, 4) === peg$c129) {
20215
+ s2 = peg$c129;
20065
20216
  peg$currPos += 4;
20066
20217
  } else {
20067
20218
  s2 = peg$FAILED;
20068
20219
  if (peg$silentFails === 0) {
20069
- peg$fail(peg$e135);
20220
+ peg$fail(peg$e136);
20070
20221
  }
20071
20222
  }
20072
20223
  if (s2 !== peg$FAILED) {
20073
20224
  if (input.charCodeAt(peg$currPos) === 115) {
20074
- s3 = peg$c129;
20225
+ s3 = peg$c130;
20075
20226
  peg$currPos++;
20076
20227
  } else {
20077
20228
  s3 = peg$FAILED;
20078
20229
  if (peg$silentFails === 0) {
20079
- peg$fail(peg$e136);
20230
+ peg$fail(peg$e137);
20080
20231
  }
20081
20232
  }
20082
20233
  if (s3 === peg$FAILED) {
20083
20234
  s3 = null;
20084
20235
  }
20085
- if (input.substr(peg$currPos, 3) === peg$c130) {
20086
- s4 = peg$c130;
20236
+ if (input.substr(peg$currPos, 3) === peg$c131) {
20237
+ s4 = peg$c131;
20087
20238
  peg$currPos += 3;
20088
20239
  } else {
20089
20240
  s4 = peg$FAILED;
20090
20241
  if (peg$silentFails === 0) {
20091
- peg$fail(peg$e137);
20242
+ peg$fail(peg$e138);
20092
20243
  }
20093
20244
  }
20094
20245
  if (s4 !== peg$FAILED) {
@@ -20166,35 +20317,35 @@ function peg$parse(input, options) {
20166
20317
  s0 = peg$currPos;
20167
20318
  s1 = peg$currPos;
20168
20319
  s2 = peg$currPos;
20169
- if (input.substr(peg$currPos, 4) === peg$c128) {
20170
- s3 = peg$c128;
20320
+ if (input.substr(peg$currPos, 4) === peg$c129) {
20321
+ s3 = peg$c129;
20171
20322
  peg$currPos += 4;
20172
20323
  } else {
20173
20324
  s3 = peg$FAILED;
20174
20325
  if (peg$silentFails === 0) {
20175
- peg$fail(peg$e135);
20326
+ peg$fail(peg$e136);
20176
20327
  }
20177
20328
  }
20178
20329
  if (s3 !== peg$FAILED) {
20179
20330
  if (input.charCodeAt(peg$currPos) === 115) {
20180
- s4 = peg$c129;
20331
+ s4 = peg$c130;
20181
20332
  peg$currPos++;
20182
20333
  } else {
20183
20334
  s4 = peg$FAILED;
20184
20335
  if (peg$silentFails === 0) {
20185
- peg$fail(peg$e136);
20336
+ peg$fail(peg$e137);
20186
20337
  }
20187
20338
  }
20188
20339
  if (s4 === peg$FAILED) {
20189
20340
  s4 = null;
20190
20341
  }
20191
- if (input.substr(peg$currPos, 3) === peg$c130) {
20192
- s5 = peg$c130;
20342
+ if (input.substr(peg$currPos, 3) === peg$c131) {
20343
+ s5 = peg$c131;
20193
20344
  peg$currPos += 3;
20194
20345
  } else {
20195
20346
  s5 = peg$FAILED;
20196
20347
  if (peg$silentFails === 0) {
20197
- peg$fail(peg$e137);
20348
+ peg$fail(peg$e138);
20198
20349
  }
20199
20350
  }
20200
20351
  if (s5 !== peg$FAILED) {
@@ -20209,13 +20360,13 @@ function peg$parse(input, options) {
20209
20360
  s2 = peg$FAILED;
20210
20361
  }
20211
20362
  if (s2 === peg$FAILED) {
20212
- if (input.substr(peg$currPos, 7) === peg$c131) {
20213
- s2 = peg$c131;
20363
+ if (input.substr(peg$currPos, 7) === peg$c132) {
20364
+ s2 = peg$c132;
20214
20365
  peg$currPos += 7;
20215
20366
  } else {
20216
20367
  s2 = peg$FAILED;
20217
20368
  if (peg$silentFails === 0) {
20218
- peg$fail(peg$e138);
20369
+ peg$fail(peg$e139);
20219
20370
  }
20220
20371
  }
20221
20372
  }
@@ -20280,7 +20431,7 @@ function peg$parse(input, options) {
20280
20431
  }
20281
20432
  s2 = input.substring(s2, peg$currPos);
20282
20433
  peg$savedPos = s0;
20283
- s0 = peg$f98(s1, s2);
20434
+ s0 = peg$f99(s1, s2);
20284
20435
  } else {
20285
20436
  peg$currPos = s0;
20286
20437
  s0 = peg$FAILED;
@@ -20295,7 +20446,7 @@ function peg$parse(input, options) {
20295
20446
  } else {
20296
20447
  s0 = peg$FAILED;
20297
20448
  if (peg$silentFails === 0) {
20298
- peg$fail(peg$e139);
20449
+ peg$fail(peg$e140);
20299
20450
  }
20300
20451
  }
20301
20452
  return s0;
@@ -22402,6 +22553,12 @@ var Builder = class extends BaseBuilder {
22402
22553
  data.publications,
22403
22554
  options
22404
22555
  ),
22556
+ relatedBook: this.toAstProperty(
22557
+ bitType,
22558
+ ConfigKey.property_relatedBook,
22559
+ data.relatedBook,
22560
+ options
22561
+ ),
22405
22562
  author: this.toAstProperty(bitType, ConfigKey.property_author, data.author, options),
22406
22563
  subject: this.toAstProperty(bitType, ConfigKey.property_subject, data.subject, options),
22407
22564
  date: this.toAstProperty(bitType, ConfigKey.property_date, data.date, options),
@@ -35812,6 +35969,264 @@ var ConfigBuilder = class {
35812
35969
  build(options) {
35813
35970
  const opts = Object.assign({}, options);
35814
35971
  this.buildFlat(opts);
35972
+ const bitConfigs = [];
35973
+ const groupConfigs = [];
35974
+ for (const bt of BitType.values()) {
35975
+ const bitType = instance2.getBitType(bt);
35976
+ const _bitConfig = BITS[bitType];
35977
+ if (_bitConfig) {
35978
+ _bitConfig.bitType = bitType;
35979
+ bitConfigs.push(_bitConfig);
35980
+ }
35981
+ }
35982
+ for (const [k, g] of Object.entries(GROUPS)) {
35983
+ const g2 = g;
35984
+ let k2 = k;
35985
+ if (k.startsWith("group_")) k2 = k2.substring(6);
35986
+ k2 = /*'_' +*/
35987
+ stringUtils.camelToKebab(k2);
35988
+ g2.key = k2;
35989
+ groupConfigs.push(g2);
35990
+ }
35991
+ const outputFolder = opts.outputDir ?? "assets/config";
35992
+ const outputFolderBits = import_node_path3.default.join(outputFolder, "bits");
35993
+ const outputFolderGroups = import_node_path3.default.join(outputFolder, "partials");
35994
+ import_fs_extra3.default.ensureDirSync(outputFolderBits);
35995
+ import_fs_extra3.default.ensureDirSync(outputFolderGroups);
35996
+ const fileWrites = [];
35997
+ for (const b of bitConfigs) {
35998
+ const inherits = [];
35999
+ const tags2 = [];
36000
+ const tagEntriesTypeOrder = [
36001
+ BitTagConfigKeyType.tag,
36002
+ BitTagConfigKeyType.property,
36003
+ BitTagConfigKeyType.resource,
36004
+ BitTagConfigKeyType.group,
36005
+ BitTagConfigKeyType.unknown
36006
+ ];
36007
+ const tagEntries = Object.entries(b.tags ?? []).sort((a, b2) => {
36008
+ const tagA = a[1];
36009
+ const tagB = b2[1];
36010
+ const typeA = typeFromConfigKey(tagA.key);
36011
+ const typeB = typeFromConfigKey(tagB.key);
36012
+ const typeOrder = tagEntriesTypeOrder.indexOf(typeA) - tagEntriesTypeOrder.indexOf(typeB);
36013
+ return typeOrder;
36014
+ });
36015
+ if (b.baseBitType) inherits.push(b.baseBitType);
36016
+ for (const [_tagKey, tag] of tagEntries) {
36017
+ const tagName = tag.key;
36018
+ let format = "";
36019
+ let chain = void 0;
36020
+ const tagType = typeFromConfigKey(tag.key);
36021
+ if (tagType === BitTagConfigKeyType.tag) {
36022
+ if (tagName === "%") {
36023
+ chain = {
36024
+ key: "%",
36025
+ format,
36026
+ min: tag.minCount,
36027
+ max: tag.maxCount,
36028
+ description: "Lead",
36029
+ chain: {
36030
+ key: "%",
36031
+ format,
36032
+ min: tag.minCount,
36033
+ max: tag.maxCount,
36034
+ description: "Page number",
36035
+ chain: {
36036
+ key: "%",
36037
+ format,
36038
+ min: tag.minCount,
36039
+ max: tag.maxCount,
36040
+ description: "Margin number"
36041
+ }
36042
+ }
36043
+ };
36044
+ }
36045
+ format = "bitmark--";
36046
+ } else if (tagType === BitTagConfigKeyType.property) {
36047
+ if (tag.format === TagFormat.plainText) {
36048
+ format = "string";
36049
+ } else if (tag.format === TagFormat.boolean) {
36050
+ format = "bool";
36051
+ } else if (tag.format === TagFormat.bitmarkText) {
36052
+ format = "bitmark";
36053
+ } else if (tag.format === TagFormat.number) {
36054
+ format = "number";
36055
+ }
36056
+ } else if (tagType === BitTagConfigKeyType.resource) {
36057
+ } else if (tagType === BitTagConfigKeyType.group) {
36058
+ let k = tag.key;
36059
+ if (k.startsWith("group_")) k = k.substring(6);
36060
+ k = "_" + k;
36061
+ inherits.push(k);
36062
+ continue;
36063
+ }
36064
+ const t = {
36065
+ key: tagName,
36066
+ format,
36067
+ default: null,
36068
+ alwaysInclude: false,
36069
+ min: tag.minCount == null ? 0 : tag.minCount,
36070
+ max: tag.maxCount == null ? 1 : tag.maxCount,
36071
+ description: tag.description ?? "",
36072
+ chain
36073
+ // raw: {
36074
+ // ...tag,
36075
+ // },
36076
+ };
36077
+ tags2.push(t);
36078
+ }
36079
+ const bitJson = {
36080
+ name: b.bitType,
36081
+ description: b.description ?? "",
36082
+ since: b.since,
36083
+ deprecated: b.deprecated,
36084
+ history: [
36085
+ {
36086
+ version: b.since,
36087
+ changes: ["Initial version"]
36088
+ }
36089
+ ],
36090
+ format: b.textFormatDefault ?? "bitmark--",
36091
+ bodyAllowed: b.bodyAllowed ?? true,
36092
+ bodyRequired: b.bodyRequired ?? false,
36093
+ footerAllowed: b.footerAllowed ?? true,
36094
+ footerRequired: b.footerRequired ?? false,
36095
+ resourceAttachmentAllowed: b.resourceAttachmentAllowed ?? true,
36096
+ inherits,
36097
+ tags: tags2
36098
+ };
36099
+ const output = import_node_path3.default.join(outputFolderBits, `${b.bitType}.jsonc`);
36100
+ const str = JSON.stringify(bitJson, null, 2);
36101
+ fileWrites.push(import_fs_extra3.default.writeFile(output, str));
36102
+ }
36103
+ const writeGroupConfigs = (groupConfigs2) => {
36104
+ for (const g of groupConfigs2) {
36105
+ const inherits = [];
36106
+ const tags2 = [];
36107
+ const groupKey = stringUtils.camelToKebab(g.key);
36108
+ const tagEntriesTypeOrder = [
36109
+ BitTagConfigKeyType.tag,
36110
+ BitTagConfigKeyType.property,
36111
+ BitTagConfigKeyType.resource,
36112
+ BitTagConfigKeyType.group
36113
+ ];
36114
+ const tagEntries = Object.entries(g.tags ?? []).sort((a, b) => {
36115
+ const tagA = a[1];
36116
+ const tagB = b[1];
36117
+ const typeOrder = tagEntriesTypeOrder.indexOf(tagA.type) - tagEntriesTypeOrder.indexOf(tagB.type);
36118
+ return typeOrder;
36119
+ });
36120
+ for (const [_tagKey, tag] of tagEntries) {
36121
+ let tagName = tag.key;
36122
+ const tagType = typeFromConfigKey(tag.key);
36123
+ let format = "";
36124
+ let chain = void 0;
36125
+ if (tagType === BitTagConfigKeyType.tag) {
36126
+ tagName = tag.name;
36127
+ if (tagName === "%") {
36128
+ chain = {
36129
+ key: "%",
36130
+ format,
36131
+ min: tag.minCount,
36132
+ max: tag.maxCount,
36133
+ description: "Lead",
36134
+ chain: {
36135
+ key: "%",
36136
+ format,
36137
+ min: tag.minCount,
36138
+ max: tag.maxCount,
36139
+ description: "Page number",
36140
+ chain: {
36141
+ key: "%",
36142
+ format,
36143
+ min: tag.minCount,
36144
+ max: tag.maxCount,
36145
+ description: "Margin number"
36146
+ }
36147
+ }
36148
+ };
36149
+ }
36150
+ format = "bitmark--";
36151
+ } else if (tagType === BitTagConfigKeyType.property) {
36152
+ tagName = tag.key;
36153
+ if (tag.format === TagFormat.plainText) {
36154
+ format = "string";
36155
+ } else if (tag.format === TagFormat.boolean) {
36156
+ format = "bool";
36157
+ } else if (tag.format === TagFormat.bitmarkText) {
36158
+ format = "bitmark";
36159
+ } else if (tag.format === TagFormat.number) {
36160
+ format = "number";
36161
+ }
36162
+ } else if (tagType === BitTagConfigKeyType.resource) {
36163
+ format = "string";
36164
+ } else if (tagType === BitTagConfigKeyType.group) {
36165
+ let k = tag.key;
36166
+ if (k.startsWith("group_")) k = k.substring(6);
36167
+ k = /*'_' +*/
36168
+ stringUtils.camelToKebab(k);
36169
+ inherits.push(k);
36170
+ continue;
36171
+ }
36172
+ const t = {
36173
+ key: tagName,
36174
+ format,
36175
+ default: null,
36176
+ alwaysInclude: false,
36177
+ min: tag.minCount == null ? 0 : tag.minCount,
36178
+ max: tag.maxCount == null ? 1 : tag.maxCount,
36179
+ description: tag.description ?? "",
36180
+ chain
36181
+ // raw: {
36182
+ // ...tag,
36183
+ // },
36184
+ };
36185
+ tags2.push(t);
36186
+ }
36187
+ const bitJson = {
36188
+ name: groupKey,
36189
+ description: g.description ?? "",
36190
+ since: "UNKNOWN",
36191
+ deprecated: g.deprecated,
36192
+ history: [
36193
+ {
36194
+ version: "UNKNOWN",
36195
+ changes: ["Initial version"]
36196
+ }
36197
+ ],
36198
+ inherits,
36199
+ tags: tags2
36200
+ // cards: [
36201
+ // {
36202
+ // card: null,
36203
+ // side: 1,
36204
+ // variant: null,
36205
+ // description: '',
36206
+ // tags: [],
36207
+ // },
36208
+ // {
36209
+ // card: null,
36210
+ // side: 2,
36211
+ // variant: 1,
36212
+ // description: '',
36213
+ // tags: [],
36214
+ // },
36215
+ // {
36216
+ // card: null,
36217
+ // side: 2,
36218
+ // variant: null,
36219
+ // description: '',
36220
+ // tags: [],
36221
+ // },
36222
+ // ],
36223
+ };
36224
+ const output = import_node_path3.default.join(outputFolderGroups, `${groupKey}.jsonc`);
36225
+ const str = JSON.stringify(bitJson, null, 2);
36226
+ import_fs_extra3.default.writeFileSync(output, str);
36227
+ }
36228
+ };
36229
+ writeGroupConfigs(groupConfigs);
35815
36230
  }
35816
36231
  buildFlat(options) {
35817
36232
  const opts = Object.assign({}, options);