@cristianormazabal/triton-core 0.1.7 → 0.1.9

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.
Files changed (48) hide show
  1. package/dist/contracts/anchors.d.ts +9 -0
  2. package/dist/contracts/anchors.d.ts.map +1 -1
  3. package/dist/contracts/connector-tokens.d.ts +40 -0
  4. package/dist/contracts/connector-tokens.d.ts.map +1 -0
  5. package/dist/contracts/connector-tokens.js +60 -0
  6. package/dist/contracts/connector-tokens.js.map +1 -0
  7. package/dist/contracts/crosslink.d.ts +24 -7
  8. package/dist/contracts/crosslink.d.ts.map +1 -1
  9. package/dist/contracts/index.d.ts +1 -1
  10. package/dist/contracts/index.d.ts.map +1 -1
  11. package/dist/crosslink/engine2.d.ts.map +1 -1
  12. package/dist/crosslink/engine2.js +20 -5
  13. package/dist/crosslink/engine2.js.map +1 -1
  14. package/dist/crosslink/engine3.d.ts.map +1 -1
  15. package/dist/crosslink/engine3.js +19 -5
  16. package/dist/crosslink/engine3.js.map +1 -1
  17. package/dist/crosslink/index.d.ts +1 -1
  18. package/dist/crosslink/index.d.ts.map +1 -1
  19. package/dist/crosslink/index.js +1 -1
  20. package/dist/crosslink/index.js.map +1 -1
  21. package/dist/crosslink/render.d.ts +16 -1
  22. package/dist/crosslink/render.d.ts.map +1 -1
  23. package/dist/crosslink/render.js +141 -6
  24. package/dist/crosslink/render.js.map +1 -1
  25. package/dist/diagrams/mermaid/flowchart/index.d.ts +1 -1
  26. package/dist/diagrams/mermaid/flowchart/index.d.ts.map +1 -1
  27. package/dist/diagrams/mermaid/flowchart/ir.d.ts +4 -3
  28. package/dist/diagrams/mermaid/flowchart/ir.d.ts.map +1 -1
  29. package/dist/diagrams/mermaid/flowchart/layout.d.ts.map +1 -1
  30. package/dist/diagrams/mermaid/flowchart/layout.js +5 -3
  31. package/dist/diagrams/mermaid/flowchart/layout.js.map +1 -1
  32. package/dist/diagrams/triton/ds/struct/page.d.ts.map +1 -1
  33. package/dist/diagrams/triton/ds/struct/page.js +4 -1
  34. package/dist/diagrams/triton/ds/struct/page.js.map +1 -1
  35. package/dist/diagrams/triton/poster/layout.d.ts.map +1 -1
  36. package/dist/diagrams/triton/poster/layout.js +10 -0
  37. package/dist/diagrams/triton/poster/layout.js.map +1 -1
  38. package/dist/frontend/index.d.ts +18 -1
  39. package/dist/frontend/index.d.ts.map +1 -1
  40. package/dist/frontend/index.js +31 -0
  41. package/dist/frontend/index.js.map +1 -1
  42. package/dist/index.js +1338 -650
  43. package/dist/index.js.map +4 -4
  44. package/dist/render/svg.d.ts +10 -1
  45. package/dist/render/svg.d.ts.map +1 -1
  46. package/dist/render/svg.js +18 -0
  47. package/dist/render/svg.js.map +1 -1
  48. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1479,9 +1479,11 @@ function layoutFlowchart(ir, theme, options) {
1479
1479
  const toRect2 = nodePos.get(edge.to);
1480
1480
  if (!fromRect || !toRect2) continue;
1481
1481
  const dash = edge.style === "dotted" ? "6 3" : edge.style === "dashed" ? "8 4" : void 0;
1482
+ const sw = edge.style === "thick" ? edgeTheme.strokeWidth * 2 : edgeTheme.strokeWidth;
1483
+ const color = edge.style === "dotted" ? palette.textMuted : palette.primary;
1482
1484
  if (edge.from === edge.to) {
1483
1485
  const loop = selfLoopRoute(fromRect, isLR);
1484
- elements.push(p.path(loop.path, edge.kind === "async" ? palette.textMuted : palette.primary, edgeTheme.strokeWidth, {
1486
+ elements.push(p.path(loop.path, color, sw, {
1485
1487
  ...dash !== void 0 ? { dash } : {},
1486
1488
  markerEnd: ARROW_MARKER_ID
1487
1489
  }));
@@ -1494,7 +1496,7 @@ function layoutFlowchart(ir, theme, options) {
1494
1496
  }
1495
1497
  if (backEdges.has(ei)) {
1496
1498
  const bow = backEdgeRoute(fromRect, toRect2, isLR);
1497
- elements.push(p.path(bow.path, edge.kind === "async" ? palette.textMuted : palette.primary, edgeTheme.strokeWidth, {
1499
+ elements.push(p.path(bow.path, color, sw, {
1498
1500
  ...dash !== void 0 ? { dash } : {},
1499
1501
  markerEnd: ARROW_MARKER_ID
1500
1502
  }));
@@ -1519,7 +1521,7 @@ function layoutFlowchart(ir, theme, options) {
1519
1521
  fromDir: fromAnchor.portDir,
1520
1522
  toDir: toAnchor.portDir
1521
1523
  });
1522
- elements.push(p.path(route.path, edge.kind === "async" ? palette.textMuted : palette.primary, edgeTheme.strokeWidth, {
1524
+ elements.push(p.path(route.path, color, sw, {
1523
1525
  ...dash !== void 0 ? { dash } : {},
1524
1526
  markerEnd: ARROW_MARKER_ID
1525
1527
  }));
@@ -1941,8 +1943,13 @@ function registerNode(rawId, label, shape) {
1941
1943
  }
1942
1944
  return id;
1943
1945
  }
1944
- function addEdge(from, to, label, kind, style, ann) {
1945
- const e = { from, to, label: label || void 0, kind: kind || "sync", style: style || "solid" };
1946
+ function addEdge(from, to, label, style, ann, edgeProps) {
1947
+ const e = { from, to, label: label || void 0, style: style || "solid" };
1948
+ if (edgeProps) {
1949
+ if (edgeProps.bidirectional) e.bidirectional = true;
1950
+ if (edgeProps.undirected) e.undirected = true;
1951
+ if (edgeProps.endMarker) e.endMarker = edgeProps.endMarker;
1952
+ }
1946
1953
  if (ann) {
1947
1954
  if (ann.routing) e.routing = ann.routing;
1948
1955
  if (ann.exitWall) e.exitWall = ann.exitWall;
@@ -2101,59 +2108,65 @@ function peg$parse(input, options) {
2101
2108
  var peg$c13 = "]";
2102
2109
  var peg$c14 = "@";
2103
2110
  var peg$c15 = "|";
2104
- var peg$c16 = "<-.->";
2105
- var peg$c17 = "<-->";
2106
- var peg$c18 = "<==>";
2107
- var peg$c19 = "-..->";
2108
- var peg$c20 = "-.-> ";
2109
- var peg$c21 = "-.->";
2110
- var peg$c22 = "--->";
2111
- var peg$c23 = "-->";
2112
- var peg$c24 = "==>";
2113
- var peg$c25 = "--x";
2114
- var peg$c26 = "--o";
2115
- var peg$c27 = "-.-";
2116
- var peg$c28 = "===";
2117
- var peg$c29 = ":";
2118
- var peg$c30 = "straight";
2119
- var peg$c31 = "orthogonal";
2120
- var peg$c32 = "bezier";
2121
- var peg$c33 = "polyline";
2122
- var peg$c34 = "((";
2123
- var peg$c35 = "))";
2124
- var peg$c36 = "([";
2125
- var peg$c37 = "])";
2126
- var peg$c38 = "[[";
2127
- var peg$c39 = "]]";
2128
- var peg$c40 = "[(";
2129
- var peg$c41 = ")]";
2130
- var peg$c42 = "{{";
2131
- var peg$c43 = "}}";
2132
- var peg$c44 = "[/";
2133
- var peg$c45 = "/]";
2134
- var peg$c46 = "[\\";
2135
- var peg$c47 = "\\]";
2136
- var peg$c48 = ">";
2137
- var peg$c49 = "{";
2138
- var peg$c50 = "}";
2139
- var peg$c51 = "(";
2140
- var peg$c52 = ")";
2141
- var peg$c53 = "style";
2142
- var peg$c54 = "classDef";
2143
- var peg$c55 = "class";
2144
- var peg$c56 = "click";
2145
- var peg$c57 = "note";
2146
- var peg$c58 = '"';
2147
- var peg$c59 = "at";
2148
- var peg$c60 = "offset";
2149
- var peg$c61 = ",";
2150
- var peg$c62 = "-";
2151
- var peg$c63 = "legend";
2152
- var peg$c64 = "bottom-right";
2153
- var peg$c65 = "bottom-left";
2154
- var peg$c66 = "top-right";
2155
- var peg$c67 = "top-left";
2156
- var peg$c68 = "\r\n";
2111
+ var peg$c16 = "<-~->";
2112
+ var peg$c17 = "<-_->";
2113
+ var peg$c18 = "<-.->";
2114
+ var peg$c19 = "<==>";
2115
+ var peg$c20 = "<-->";
2116
+ var peg$c21 = "-~->";
2117
+ var peg$c22 = "-_->";
2118
+ var peg$c23 = "-..->";
2119
+ var peg$c24 = "-.->";
2120
+ var peg$c25 = "===>";
2121
+ var peg$c26 = "==>";
2122
+ var peg$c27 = "--->";
2123
+ var peg$c28 = "-->";
2124
+ var peg$c29 = "--x";
2125
+ var peg$c30 = "--o";
2126
+ var peg$c31 = "-~-";
2127
+ var peg$c32 = "-_-";
2128
+ var peg$c33 = "-.-";
2129
+ var peg$c34 = "===";
2130
+ var peg$c35 = ":";
2131
+ var peg$c36 = "straight";
2132
+ var peg$c37 = "orthogonal";
2133
+ var peg$c38 = "bezier";
2134
+ var peg$c39 = "polyline";
2135
+ var peg$c40 = "((";
2136
+ var peg$c41 = "))";
2137
+ var peg$c42 = "([";
2138
+ var peg$c43 = "])";
2139
+ var peg$c44 = "[[";
2140
+ var peg$c45 = "]]";
2141
+ var peg$c46 = "[(";
2142
+ var peg$c47 = ")]";
2143
+ var peg$c48 = "{{";
2144
+ var peg$c49 = "}}";
2145
+ var peg$c50 = "[/";
2146
+ var peg$c51 = "/]";
2147
+ var peg$c52 = "[\\";
2148
+ var peg$c53 = "\\]";
2149
+ var peg$c54 = ">";
2150
+ var peg$c55 = "{";
2151
+ var peg$c56 = "}";
2152
+ var peg$c57 = "(";
2153
+ var peg$c58 = ")";
2154
+ var peg$c59 = "style";
2155
+ var peg$c60 = "classDef";
2156
+ var peg$c61 = "class";
2157
+ var peg$c62 = "click";
2158
+ var peg$c63 = "note";
2159
+ var peg$c64 = '"';
2160
+ var peg$c65 = "at";
2161
+ var peg$c66 = "offset";
2162
+ var peg$c67 = ",";
2163
+ var peg$c68 = "-";
2164
+ var peg$c69 = "legend";
2165
+ var peg$c70 = "bottom-right";
2166
+ var peg$c71 = "bottom-left";
2167
+ var peg$c72 = "top-right";
2168
+ var peg$c73 = "top-left";
2169
+ var peg$c74 = "\r\n";
2157
2170
  var peg$r0 = /^[^\n]/;
2158
2171
  var peg$r1 = /^[a-zA-Z_]/;
2159
2172
  var peg$r2 = /^[a-zA-Z0-9_]/;
@@ -2194,73 +2207,79 @@ function peg$parse(input, options) {
2194
2207
  var peg$e20 = peg$literalExpectation("@", false);
2195
2208
  var peg$e21 = peg$literalExpectation("|", false);
2196
2209
  var peg$e22 = peg$classExpectation(["|"], true, false);
2197
- var peg$e23 = peg$literalExpectation("<-.->", false);
2198
- var peg$e24 = peg$literalExpectation("<-->", false);
2199
- var peg$e25 = peg$literalExpectation("<==>", false);
2200
- var peg$e26 = peg$literalExpectation("-..->", false);
2201
- var peg$e27 = peg$literalExpectation("-.-> ", false);
2202
- var peg$e28 = peg$literalExpectation("-.->", false);
2203
- var peg$e29 = peg$literalExpectation("--->", false);
2204
- var peg$e30 = peg$literalExpectation("-->", false);
2205
- var peg$e31 = peg$literalExpectation("==>", false);
2206
- var peg$e32 = peg$literalExpectation("--x", false);
2207
- var peg$e33 = peg$literalExpectation("--o", false);
2208
- var peg$e34 = peg$literalExpectation("-.-", false);
2209
- var peg$e35 = peg$literalExpectation("===", false);
2210
- var peg$e36 = peg$literalExpectation(":", false);
2211
- var peg$e37 = peg$literalExpectation("straight", false);
2212
- var peg$e38 = peg$literalExpectation("orthogonal", false);
2213
- var peg$e39 = peg$literalExpectation("bezier", false);
2214
- var peg$e40 = peg$literalExpectation("polyline", false);
2215
- var peg$e41 = peg$classExpectation(["E", "N", "S", "W"], false, false);
2216
- var peg$e42 = peg$literalExpectation("((", false);
2217
- var peg$e43 = peg$classExpectation([")"], true, false);
2218
- var peg$e44 = peg$literalExpectation("))", false);
2219
- var peg$e45 = peg$literalExpectation("([", false);
2220
- var peg$e46 = peg$literalExpectation("])", false);
2221
- var peg$e47 = peg$literalExpectation("[[", false);
2222
- var peg$e48 = peg$literalExpectation("]]", false);
2223
- var peg$e49 = peg$literalExpectation("[(", false);
2224
- var peg$e50 = peg$literalExpectation(")]", false);
2225
- var peg$e51 = peg$literalExpectation("{{", false);
2226
- var peg$e52 = peg$classExpectation(["}"], true, false);
2227
- var peg$e53 = peg$literalExpectation("}}", false);
2228
- var peg$e54 = peg$literalExpectation("[/", false);
2229
- var peg$e55 = peg$classExpectation(["/"], true, false);
2230
- var peg$e56 = peg$literalExpectation("/]", false);
2231
- var peg$e57 = peg$literalExpectation("[\\", false);
2232
- var peg$e58 = peg$classExpectation(["\\"], true, false);
2233
- var peg$e59 = peg$literalExpectation("\\]", false);
2234
- var peg$e60 = peg$literalExpectation(">", false);
2235
- var peg$e61 = peg$literalExpectation("{", false);
2236
- var peg$e62 = peg$literalExpectation("}", false);
2237
- var peg$e63 = peg$literalExpectation("(", false);
2238
- var peg$e64 = peg$literalExpectation(")", false);
2239
- var peg$e65 = peg$literalExpectation("style", false);
2240
- var peg$e66 = peg$classExpectation(["\n", ";"], true, false);
2241
- var peg$e67 = peg$literalExpectation("classDef", false);
2242
- var peg$e68 = peg$literalExpectation("class", false);
2243
- var peg$e69 = peg$literalExpectation("click", false);
2244
- var peg$e70 = peg$literalExpectation("note", false);
2245
- var peg$e71 = peg$literalExpectation('"', false);
2246
- var peg$e72 = peg$classExpectation(['"'], true, false);
2247
- var peg$e73 = peg$literalExpectation("at", false);
2248
- var peg$e74 = peg$literalExpectation("offset", false);
2249
- var peg$e75 = peg$literalExpectation(",", false);
2250
- var peg$e76 = peg$literalExpectation("-", false);
2251
- var peg$e77 = peg$classExpectation([["0", "9"]], false, false);
2252
- var peg$e78 = peg$literalExpectation("legend", false);
2253
- var peg$e79 = peg$literalExpectation("bottom-right", false);
2254
- var peg$e80 = peg$literalExpectation("bottom-left", false);
2255
- var peg$e81 = peg$literalExpectation("top-right", false);
2256
- var peg$e82 = peg$literalExpectation("top-left", false);
2257
- var peg$e83 = peg$classExpectation([":", "\n"], true, false);
2258
- var peg$e84 = peg$otherExpectation("optional whitespace");
2259
- var peg$e85 = peg$classExpectation([" ", " "], false, false);
2260
- var peg$e86 = peg$otherExpectation("required whitespace");
2261
- var peg$e87 = peg$otherExpectation("newline");
2262
- var peg$e88 = peg$literalExpectation("\r\n", false);
2263
- var peg$e89 = peg$classExpectation(["\n", "\r"], false, false);
2210
+ var peg$e23 = peg$literalExpectation("<-~->", false);
2211
+ var peg$e24 = peg$literalExpectation("<-_->", false);
2212
+ var peg$e25 = peg$literalExpectation("<-.->", false);
2213
+ var peg$e26 = peg$literalExpectation("<==>", false);
2214
+ var peg$e27 = peg$literalExpectation("<-->", false);
2215
+ var peg$e28 = peg$literalExpectation("-~->", false);
2216
+ var peg$e29 = peg$literalExpectation("-_->", false);
2217
+ var peg$e30 = peg$literalExpectation("-..->", false);
2218
+ var peg$e31 = peg$literalExpectation("-.->", false);
2219
+ var peg$e32 = peg$literalExpectation("===>", false);
2220
+ var peg$e33 = peg$literalExpectation("==>", false);
2221
+ var peg$e34 = peg$literalExpectation("--->", false);
2222
+ var peg$e35 = peg$literalExpectation("-->", false);
2223
+ var peg$e36 = peg$literalExpectation("--x", false);
2224
+ var peg$e37 = peg$literalExpectation("--o", false);
2225
+ var peg$e38 = peg$literalExpectation("-~-", false);
2226
+ var peg$e39 = peg$literalExpectation("-_-", false);
2227
+ var peg$e40 = peg$literalExpectation("-.-", false);
2228
+ var peg$e41 = peg$literalExpectation("===", false);
2229
+ var peg$e42 = peg$literalExpectation(":", false);
2230
+ var peg$e43 = peg$literalExpectation("straight", false);
2231
+ var peg$e44 = peg$literalExpectation("orthogonal", false);
2232
+ var peg$e45 = peg$literalExpectation("bezier", false);
2233
+ var peg$e46 = peg$literalExpectation("polyline", false);
2234
+ var peg$e47 = peg$classExpectation(["E", "N", "S", "W"], false, false);
2235
+ var peg$e48 = peg$literalExpectation("((", false);
2236
+ var peg$e49 = peg$classExpectation([")"], true, false);
2237
+ var peg$e50 = peg$literalExpectation("))", false);
2238
+ var peg$e51 = peg$literalExpectation("([", false);
2239
+ var peg$e52 = peg$literalExpectation("])", false);
2240
+ var peg$e53 = peg$literalExpectation("[[", false);
2241
+ var peg$e54 = peg$literalExpectation("]]", false);
2242
+ var peg$e55 = peg$literalExpectation("[(", false);
2243
+ var peg$e56 = peg$literalExpectation(")]", false);
2244
+ var peg$e57 = peg$literalExpectation("{{", false);
2245
+ var peg$e58 = peg$classExpectation(["}"], true, false);
2246
+ var peg$e59 = peg$literalExpectation("}}", false);
2247
+ var peg$e60 = peg$literalExpectation("[/", false);
2248
+ var peg$e61 = peg$classExpectation(["/"], true, false);
2249
+ var peg$e62 = peg$literalExpectation("/]", false);
2250
+ var peg$e63 = peg$literalExpectation("[\\", false);
2251
+ var peg$e64 = peg$classExpectation(["\\"], true, false);
2252
+ var peg$e65 = peg$literalExpectation("\\]", false);
2253
+ var peg$e66 = peg$literalExpectation(">", false);
2254
+ var peg$e67 = peg$literalExpectation("{", false);
2255
+ var peg$e68 = peg$literalExpectation("}", false);
2256
+ var peg$e69 = peg$literalExpectation("(", false);
2257
+ var peg$e70 = peg$literalExpectation(")", false);
2258
+ var peg$e71 = peg$literalExpectation("style", false);
2259
+ var peg$e72 = peg$classExpectation(["\n", ";"], true, false);
2260
+ var peg$e73 = peg$literalExpectation("classDef", false);
2261
+ var peg$e74 = peg$literalExpectation("class", false);
2262
+ var peg$e75 = peg$literalExpectation("click", false);
2263
+ var peg$e76 = peg$literalExpectation("note", false);
2264
+ var peg$e77 = peg$literalExpectation('"', false);
2265
+ var peg$e78 = peg$classExpectation(['"'], true, false);
2266
+ var peg$e79 = peg$literalExpectation("at", false);
2267
+ var peg$e80 = peg$literalExpectation("offset", false);
2268
+ var peg$e81 = peg$literalExpectation(",", false);
2269
+ var peg$e82 = peg$literalExpectation("-", false);
2270
+ var peg$e83 = peg$classExpectation([["0", "9"]], false, false);
2271
+ var peg$e84 = peg$literalExpectation("legend", false);
2272
+ var peg$e85 = peg$literalExpectation("bottom-right", false);
2273
+ var peg$e86 = peg$literalExpectation("bottom-left", false);
2274
+ var peg$e87 = peg$literalExpectation("top-right", false);
2275
+ var peg$e88 = peg$literalExpectation("top-left", false);
2276
+ var peg$e89 = peg$classExpectation([":", "\n"], true, false);
2277
+ var peg$e90 = peg$otherExpectation("optional whitespace");
2278
+ var peg$e91 = peg$classExpectation([" ", " "], false, false);
2279
+ var peg$e92 = peg$otherExpectation("required whitespace");
2280
+ var peg$e93 = peg$otherExpectation("newline");
2281
+ var peg$e94 = peg$literalExpectation("\r\n", false);
2282
+ var peg$e95 = peg$classExpectation(["\n", "\r"], false, false);
2264
2283
  var peg$f0 = function(frontmatter, header, statements) {
2265
2284
  return {
2266
2285
  version: "1.0",
@@ -2308,7 +2327,7 @@ function peg$parse(input, options) {
2308
2327
  var peg$f11 = function(head, rest) {
2309
2328
  let prev = head;
2310
2329
  for (const { edge, target, ann } of rest) {
2311
- addEdge(prev.id, target.id, edge.label, edge.kind, edge.style, ann);
2330
+ addEdge(prev.id, target.id, edge.label, edge.style, ann, edge);
2312
2331
  prev = target;
2313
2332
  }
2314
2333
  return { type: "chain" };
@@ -2320,145 +2339,163 @@ function peg$parse(input, options) {
2320
2339
  return text2.trim();
2321
2340
  };
2322
2341
  var peg$f14 = function() {
2323
- return { kind: "async", style: "dotted" };
2342
+ return { style: "wavy", bidirectional: true };
2324
2343
  };
2325
2344
  var peg$f15 = function() {
2326
- return { kind: "sync", style: "solid" };
2345
+ return { style: "dashed", bidirectional: true };
2327
2346
  };
2328
2347
  var peg$f16 = function() {
2329
- return { kind: "sync", style: "solid" };
2348
+ return { style: "dotted", bidirectional: true };
2330
2349
  };
2331
2350
  var peg$f17 = function() {
2332
- return { kind: "async", style: "dotted" };
2351
+ return { style: "thick", bidirectional: true };
2333
2352
  };
2334
2353
  var peg$f18 = function() {
2335
- return { kind: "async", style: "dotted" };
2354
+ return { style: "solid", bidirectional: true };
2336
2355
  };
2337
2356
  var peg$f19 = function() {
2338
- return { kind: "async", style: "dotted" };
2357
+ return { style: "wavy" };
2339
2358
  };
2340
2359
  var peg$f20 = function() {
2341
- return { kind: "sync", style: "solid" };
2360
+ return { style: "dashed" };
2342
2361
  };
2343
2362
  var peg$f21 = function() {
2344
- return { kind: "sync", style: "solid" };
2363
+ return { style: "dotted" };
2345
2364
  };
2346
2365
  var peg$f22 = function() {
2347
- return { kind: "sync", style: "solid" };
2366
+ return { style: "dotted" };
2348
2367
  };
2349
2368
  var peg$f23 = function() {
2350
- return { kind: "sync", style: "solid" };
2369
+ return { style: "thick" };
2351
2370
  };
2352
2371
  var peg$f24 = function() {
2353
- return { kind: "sync", style: "solid" };
2372
+ return { style: "thick" };
2354
2373
  };
2355
2374
  var peg$f25 = function() {
2356
- return { kind: "async", style: "dotted" };
2375
+ return { style: "solid" };
2357
2376
  };
2358
2377
  var peg$f26 = function() {
2359
- return { kind: "sync", style: "solid" };
2378
+ return { style: "solid" };
2360
2379
  };
2361
2380
  var peg$f27 = function() {
2362
- return { kind: "sync", style: "solid" };
2381
+ return { style: "solid", endMarker: "cross" };
2382
+ };
2383
+ var peg$f28 = function() {
2384
+ return { style: "solid", endMarker: "circle" };
2385
+ };
2386
+ var peg$f29 = function() {
2387
+ return { style: "wavy", undirected: true };
2388
+ };
2389
+ var peg$f30 = function() {
2390
+ return { style: "dashed", undirected: true };
2391
+ };
2392
+ var peg$f31 = function() {
2393
+ return { style: "dotted", undirected: true };
2394
+ };
2395
+ var peg$f32 = function() {
2396
+ return { style: "thick", undirected: true };
2363
2397
  };
2364
- var peg$f28 = function(route, walls) {
2398
+ var peg$f33 = function() {
2399
+ return { style: "solid", undirected: true };
2400
+ };
2401
+ var peg$f34 = function(route, walls) {
2365
2402
  return { routing: route, ...walls ? walls[1] : {} };
2366
2403
  };
2367
- var peg$f29 = function(walls) {
2404
+ var peg$f35 = function(walls) {
2368
2405
  return walls;
2369
2406
  };
2370
- var peg$f30 = function() {
2407
+ var peg$f36 = function() {
2371
2408
  return "straight";
2372
2409
  };
2373
- var peg$f31 = function() {
2410
+ var peg$f37 = function() {
2374
2411
  return "orthogonal";
2375
2412
  };
2376
- var peg$f32 = function() {
2413
+ var peg$f38 = function() {
2377
2414
  return "bezier";
2378
2415
  };
2379
- var peg$f33 = function() {
2416
+ var peg$f39 = function() {
2380
2417
  return "polyline";
2381
2418
  };
2382
- var peg$f34 = function(exit, entry) {
2419
+ var peg$f40 = function(exit, entry) {
2383
2420
  return { exitWall: exit, entryWall: entry };
2384
2421
  };
2385
- var peg$f35 = function(exit) {
2422
+ var peg$f41 = function(exit) {
2386
2423
  return { exitWall: exit };
2387
2424
  };
2388
- var peg$f36 = function(w) {
2425
+ var peg$f42 = function(w) {
2389
2426
  return w;
2390
2427
  };
2391
- var peg$f37 = function(id, shape) {
2428
+ var peg$f43 = function(id, shape) {
2392
2429
  return { id: registerNode(id, shape ? shape.label : null, shape ? shape.shape : null) };
2393
2430
  };
2394
- var peg$f38 = function(ref) {
2431
+ var peg$f44 = function(ref) {
2395
2432
  return { type: "node", ...ref };
2396
2433
  };
2397
- var peg$f39 = function(id) {
2434
+ var peg$f45 = function(id) {
2398
2435
  return id;
2399
2436
  };
2400
- var peg$f40 = function(text2) {
2437
+ var peg$f46 = function(text2) {
2401
2438
  return { shape: "circle", label: stripQuotes(text2.trim()) };
2402
2439
  };
2403
- var peg$f41 = function(text2) {
2440
+ var peg$f47 = function(text2) {
2404
2441
  return { shape: "stadium", label: stripQuotes(text2.trim()) };
2405
2442
  };
2406
- var peg$f42 = function(text2) {
2443
+ var peg$f48 = function(text2) {
2407
2444
  return { shape: "subroutine", label: stripQuotes(text2.trim()) };
2408
2445
  };
2409
- var peg$f43 = function(text2) {
2446
+ var peg$f49 = function(text2) {
2410
2447
  return { shape: "cylinder", label: stripQuotes(text2.trim()) };
2411
2448
  };
2412
- var peg$f44 = function(text2) {
2449
+ var peg$f50 = function(text2) {
2413
2450
  return { shape: "hexagon", label: stripQuotes(text2.trim()) };
2414
2451
  };
2415
- var peg$f45 = function(text2) {
2452
+ var peg$f51 = function(text2) {
2416
2453
  return { shape: "parallelogram", label: stripQuotes(text2.trim()) };
2417
2454
  };
2418
- var peg$f46 = function(text2) {
2455
+ var peg$f52 = function(text2) {
2419
2456
  return { shape: "parallelogram-alt", label: stripQuotes(text2.trim()) };
2420
2457
  };
2421
- var peg$f47 = function(text2) {
2458
+ var peg$f53 = function(text2) {
2422
2459
  return { shape: "asymmetric", label: stripQuotes(text2.trim()) };
2423
2460
  };
2424
- var peg$f48 = function(text2) {
2461
+ var peg$f54 = function(text2) {
2425
2462
  return { shape: "rect", label: stripQuotes(text2.trim()) };
2426
2463
  };
2427
- var peg$f49 = function(text2) {
2464
+ var peg$f55 = function(text2) {
2428
2465
  return { shape: "diamond", label: stripQuotes(text2.trim()) };
2429
2466
  };
2430
- var peg$f50 = function(text2) {
2467
+ var peg$f56 = function(text2) {
2431
2468
  return { shape: "rounded-rect", label: stripQuotes(text2.trim()) };
2432
2469
  };
2433
- var peg$f51 = function(content) {
2470
+ var peg$f57 = function(content) {
2434
2471
  return { type: "style", raw: content };
2435
2472
  };
2436
- var peg$f52 = function(content) {
2473
+ var peg$f58 = function(content) {
2437
2474
  return { type: "class", raw: content };
2438
2475
  };
2439
- var peg$f53 = function(content) {
2476
+ var peg$f59 = function(content) {
2440
2477
  return { type: "click", raw: content };
2441
2478
  };
2442
- var peg$f54 = function(text2, target, offset2) {
2479
+ var peg$f60 = function(text2, target, offset2) {
2443
2480
  const note = { type: "note", text: text2, target, offset: offset2 || void 0 };
2444
2481
  overlays.push(note);
2445
2482
  return note;
2446
2483
  };
2447
- var peg$f55 = function(dx, dy) {
2484
+ var peg$f61 = function(dx, dy) {
2448
2485
  return { dx, dy };
2449
2486
  };
2450
- var peg$f56 = function(sign, digits) {
2487
+ var peg$f62 = function(sign, digits) {
2451
2488
  return parseInt((sign || "") + digits, 10);
2452
2489
  };
2453
- var peg$f57 = function(corner, t) {
2490
+ var peg$f63 = function(corner, t) {
2454
2491
  return t;
2455
2492
  };
2456
- var peg$f58 = function(corner, title, entries) {
2493
+ var peg$f64 = function(corner, title, entries) {
2457
2494
  const legend = { type: "legend", corner, title: title || void 0, entries };
2458
2495
  overlays.push(legend);
2459
2496
  return legend;
2460
2497
  };
2461
- var peg$f59 = function(key, value) {
2498
+ var peg$f65 = function(key, value) {
2462
2499
  return { key: key.trim(), value: value.trim() };
2463
2500
  };
2464
2501
  var peg$currPos = options.peg$currPos | 0;
@@ -3518,9 +3555,9 @@ function peg$parse(input, options) {
3518
3555
  s0 = s1;
3519
3556
  if (s0 === peg$FAILED) {
3520
3557
  s0 = peg$currPos;
3521
- if (input.substr(peg$currPos, 4) === peg$c17) {
3558
+ if (input.substr(peg$currPos, 5) === peg$c17) {
3522
3559
  s1 = peg$c17;
3523
- peg$currPos += 4;
3560
+ peg$currPos += 5;
3524
3561
  } else {
3525
3562
  s1 = peg$FAILED;
3526
3563
  if (peg$silentFails === 0) {
@@ -3534,9 +3571,9 @@ function peg$parse(input, options) {
3534
3571
  s0 = s1;
3535
3572
  if (s0 === peg$FAILED) {
3536
3573
  s0 = peg$currPos;
3537
- if (input.substr(peg$currPos, 4) === peg$c18) {
3574
+ if (input.substr(peg$currPos, 5) === peg$c18) {
3538
3575
  s1 = peg$c18;
3539
- peg$currPos += 4;
3576
+ peg$currPos += 5;
3540
3577
  } else {
3541
3578
  s1 = peg$FAILED;
3542
3579
  if (peg$silentFails === 0) {
@@ -3550,9 +3587,9 @@ function peg$parse(input, options) {
3550
3587
  s0 = s1;
3551
3588
  if (s0 === peg$FAILED) {
3552
3589
  s0 = peg$currPos;
3553
- if (input.substr(peg$currPos, 5) === peg$c19) {
3590
+ if (input.substr(peg$currPos, 4) === peg$c19) {
3554
3591
  s1 = peg$c19;
3555
- peg$currPos += 5;
3592
+ peg$currPos += 4;
3556
3593
  } else {
3557
3594
  s1 = peg$FAILED;
3558
3595
  if (peg$silentFails === 0) {
@@ -3566,9 +3603,9 @@ function peg$parse(input, options) {
3566
3603
  s0 = s1;
3567
3604
  if (s0 === peg$FAILED) {
3568
3605
  s0 = peg$currPos;
3569
- if (input.substr(peg$currPos, 5) === peg$c20) {
3606
+ if (input.substr(peg$currPos, 4) === peg$c20) {
3570
3607
  s1 = peg$c20;
3571
- peg$currPos += 5;
3608
+ peg$currPos += 4;
3572
3609
  } else {
3573
3610
  s1 = peg$FAILED;
3574
3611
  if (peg$silentFails === 0) {
@@ -3614,9 +3651,9 @@ function peg$parse(input, options) {
3614
3651
  s0 = s1;
3615
3652
  if (s0 === peg$FAILED) {
3616
3653
  s0 = peg$currPos;
3617
- if (input.substr(peg$currPos, 3) === peg$c23) {
3654
+ if (input.substr(peg$currPos, 5) === peg$c23) {
3618
3655
  s1 = peg$c23;
3619
- peg$currPos += 3;
3656
+ peg$currPos += 5;
3620
3657
  } else {
3621
3658
  s1 = peg$FAILED;
3622
3659
  if (peg$silentFails === 0) {
@@ -3630,9 +3667,9 @@ function peg$parse(input, options) {
3630
3667
  s0 = s1;
3631
3668
  if (s0 === peg$FAILED) {
3632
3669
  s0 = peg$currPos;
3633
- if (input.substr(peg$currPos, 3) === peg$c24) {
3670
+ if (input.substr(peg$currPos, 4) === peg$c24) {
3634
3671
  s1 = peg$c24;
3635
- peg$currPos += 3;
3672
+ peg$currPos += 4;
3636
3673
  } else {
3637
3674
  s1 = peg$FAILED;
3638
3675
  if (peg$silentFails === 0) {
@@ -3646,9 +3683,9 @@ function peg$parse(input, options) {
3646
3683
  s0 = s1;
3647
3684
  if (s0 === peg$FAILED) {
3648
3685
  s0 = peg$currPos;
3649
- if (input.substr(peg$currPos, 3) === peg$c25) {
3686
+ if (input.substr(peg$currPos, 4) === peg$c25) {
3650
3687
  s1 = peg$c25;
3651
- peg$currPos += 3;
3688
+ peg$currPos += 4;
3652
3689
  } else {
3653
3690
  s1 = peg$FAILED;
3654
3691
  if (peg$silentFails === 0) {
@@ -3678,9 +3715,9 @@ function peg$parse(input, options) {
3678
3715
  s0 = s1;
3679
3716
  if (s0 === peg$FAILED) {
3680
3717
  s0 = peg$currPos;
3681
- if (input.substr(peg$currPos, 3) === peg$c27) {
3718
+ if (input.substr(peg$currPos, 4) === peg$c27) {
3682
3719
  s1 = peg$c27;
3683
- peg$currPos += 3;
3720
+ peg$currPos += 4;
3684
3721
  } else {
3685
3722
  s1 = peg$FAILED;
3686
3723
  if (peg$silentFails === 0) {
@@ -3694,13 +3731,13 @@ function peg$parse(input, options) {
3694
3731
  s0 = s1;
3695
3732
  if (s0 === peg$FAILED) {
3696
3733
  s0 = peg$currPos;
3697
- if (input.substr(peg$currPos, 3) === peg$c0) {
3698
- s1 = peg$c0;
3734
+ if (input.substr(peg$currPos, 3) === peg$c28) {
3735
+ s1 = peg$c28;
3699
3736
  peg$currPos += 3;
3700
3737
  } else {
3701
3738
  s1 = peg$FAILED;
3702
3739
  if (peg$silentFails === 0) {
3703
- peg$fail(peg$e0);
3740
+ peg$fail(peg$e35);
3704
3741
  }
3705
3742
  }
3706
3743
  if (s1 !== peg$FAILED) {
@@ -3710,13 +3747,13 @@ function peg$parse(input, options) {
3710
3747
  s0 = s1;
3711
3748
  if (s0 === peg$FAILED) {
3712
3749
  s0 = peg$currPos;
3713
- if (input.substr(peg$currPos, 3) === peg$c28) {
3714
- s1 = peg$c28;
3750
+ if (input.substr(peg$currPos, 3) === peg$c29) {
3751
+ s1 = peg$c29;
3715
3752
  peg$currPos += 3;
3716
3753
  } else {
3717
3754
  s1 = peg$FAILED;
3718
3755
  if (peg$silentFails === 0) {
3719
- peg$fail(peg$e35);
3756
+ peg$fail(peg$e36);
3720
3757
  }
3721
3758
  }
3722
3759
  if (s1 !== peg$FAILED) {
@@ -3724,6 +3761,108 @@ function peg$parse(input, options) {
3724
3761
  s1 = peg$f27();
3725
3762
  }
3726
3763
  s0 = s1;
3764
+ if (s0 === peg$FAILED) {
3765
+ s0 = peg$currPos;
3766
+ if (input.substr(peg$currPos, 3) === peg$c30) {
3767
+ s1 = peg$c30;
3768
+ peg$currPos += 3;
3769
+ } else {
3770
+ s1 = peg$FAILED;
3771
+ if (peg$silentFails === 0) {
3772
+ peg$fail(peg$e37);
3773
+ }
3774
+ }
3775
+ if (s1 !== peg$FAILED) {
3776
+ peg$savedPos = s0;
3777
+ s1 = peg$f28();
3778
+ }
3779
+ s0 = s1;
3780
+ if (s0 === peg$FAILED) {
3781
+ s0 = peg$currPos;
3782
+ if (input.substr(peg$currPos, 3) === peg$c31) {
3783
+ s1 = peg$c31;
3784
+ peg$currPos += 3;
3785
+ } else {
3786
+ s1 = peg$FAILED;
3787
+ if (peg$silentFails === 0) {
3788
+ peg$fail(peg$e38);
3789
+ }
3790
+ }
3791
+ if (s1 !== peg$FAILED) {
3792
+ peg$savedPos = s0;
3793
+ s1 = peg$f29();
3794
+ }
3795
+ s0 = s1;
3796
+ if (s0 === peg$FAILED) {
3797
+ s0 = peg$currPos;
3798
+ if (input.substr(peg$currPos, 3) === peg$c32) {
3799
+ s1 = peg$c32;
3800
+ peg$currPos += 3;
3801
+ } else {
3802
+ s1 = peg$FAILED;
3803
+ if (peg$silentFails === 0) {
3804
+ peg$fail(peg$e39);
3805
+ }
3806
+ }
3807
+ if (s1 !== peg$FAILED) {
3808
+ peg$savedPos = s0;
3809
+ s1 = peg$f30();
3810
+ }
3811
+ s0 = s1;
3812
+ if (s0 === peg$FAILED) {
3813
+ s0 = peg$currPos;
3814
+ if (input.substr(peg$currPos, 3) === peg$c33) {
3815
+ s1 = peg$c33;
3816
+ peg$currPos += 3;
3817
+ } else {
3818
+ s1 = peg$FAILED;
3819
+ if (peg$silentFails === 0) {
3820
+ peg$fail(peg$e40);
3821
+ }
3822
+ }
3823
+ if (s1 !== peg$FAILED) {
3824
+ peg$savedPos = s0;
3825
+ s1 = peg$f31();
3826
+ }
3827
+ s0 = s1;
3828
+ if (s0 === peg$FAILED) {
3829
+ s0 = peg$currPos;
3830
+ if (input.substr(peg$currPos, 3) === peg$c34) {
3831
+ s1 = peg$c34;
3832
+ peg$currPos += 3;
3833
+ } else {
3834
+ s1 = peg$FAILED;
3835
+ if (peg$silentFails === 0) {
3836
+ peg$fail(peg$e41);
3837
+ }
3838
+ }
3839
+ if (s1 !== peg$FAILED) {
3840
+ peg$savedPos = s0;
3841
+ s1 = peg$f32();
3842
+ }
3843
+ s0 = s1;
3844
+ if (s0 === peg$FAILED) {
3845
+ s0 = peg$currPos;
3846
+ if (input.substr(peg$currPos, 3) === peg$c0) {
3847
+ s1 = peg$c0;
3848
+ peg$currPos += 3;
3849
+ } else {
3850
+ s1 = peg$FAILED;
3851
+ if (peg$silentFails === 0) {
3852
+ peg$fail(peg$e0);
3853
+ }
3854
+ }
3855
+ if (s1 !== peg$FAILED) {
3856
+ peg$savedPos = s0;
3857
+ s1 = peg$f33();
3858
+ }
3859
+ s0 = s1;
3860
+ }
3861
+ }
3862
+ }
3863
+ }
3864
+ }
3865
+ }
3727
3866
  }
3728
3867
  }
3729
3868
  }
@@ -3746,12 +3885,12 @@ function peg$parse(input, options) {
3746
3885
  if (s1 !== peg$FAILED) {
3747
3886
  s2 = peg$currPos;
3748
3887
  if (input.charCodeAt(peg$currPos) === 58) {
3749
- s3 = peg$c29;
3888
+ s3 = peg$c35;
3750
3889
  peg$currPos++;
3751
3890
  } else {
3752
3891
  s3 = peg$FAILED;
3753
3892
  if (peg$silentFails === 0) {
3754
- peg$fail(peg$e36);
3893
+ peg$fail(peg$e42);
3755
3894
  }
3756
3895
  }
3757
3896
  if (s3 !== peg$FAILED) {
@@ -3771,7 +3910,7 @@ function peg$parse(input, options) {
3771
3910
  s2 = null;
3772
3911
  }
3773
3912
  peg$savedPos = s0;
3774
- s0 = peg$f28(s1, s2);
3913
+ s0 = peg$f34(s1, s2);
3775
3914
  } else {
3776
3915
  peg$currPos = s0;
3777
3916
  s0 = peg$FAILED;
@@ -3781,7 +3920,7 @@ function peg$parse(input, options) {
3781
3920
  s1 = peg$parseWallPair();
3782
3921
  if (s1 !== peg$FAILED) {
3783
3922
  peg$savedPos = s0;
3784
- s1 = peg$f29(s1);
3923
+ s1 = peg$f35(s1);
3785
3924
  }
3786
3925
  s0 = s1;
3787
3926
  }
@@ -3790,66 +3929,66 @@ function peg$parse(input, options) {
3790
3929
  function peg$parseRouteWord() {
3791
3930
  var s0, s1;
3792
3931
  s0 = peg$currPos;
3793
- if (input.substr(peg$currPos, 8) === peg$c30) {
3794
- s1 = peg$c30;
3932
+ if (input.substr(peg$currPos, 8) === peg$c36) {
3933
+ s1 = peg$c36;
3795
3934
  peg$currPos += 8;
3796
3935
  } else {
3797
3936
  s1 = peg$FAILED;
3798
3937
  if (peg$silentFails === 0) {
3799
- peg$fail(peg$e37);
3938
+ peg$fail(peg$e43);
3800
3939
  }
3801
3940
  }
3802
3941
  if (s1 !== peg$FAILED) {
3803
3942
  peg$savedPos = s0;
3804
- s1 = peg$f30();
3943
+ s1 = peg$f36();
3805
3944
  }
3806
3945
  s0 = s1;
3807
3946
  if (s0 === peg$FAILED) {
3808
3947
  s0 = peg$currPos;
3809
- if (input.substr(peg$currPos, 10) === peg$c31) {
3810
- s1 = peg$c31;
3948
+ if (input.substr(peg$currPos, 10) === peg$c37) {
3949
+ s1 = peg$c37;
3811
3950
  peg$currPos += 10;
3812
3951
  } else {
3813
3952
  s1 = peg$FAILED;
3814
3953
  if (peg$silentFails === 0) {
3815
- peg$fail(peg$e38);
3954
+ peg$fail(peg$e44);
3816
3955
  }
3817
3956
  }
3818
3957
  if (s1 !== peg$FAILED) {
3819
3958
  peg$savedPos = s0;
3820
- s1 = peg$f31();
3959
+ s1 = peg$f37();
3821
3960
  }
3822
3961
  s0 = s1;
3823
3962
  if (s0 === peg$FAILED) {
3824
3963
  s0 = peg$currPos;
3825
- if (input.substr(peg$currPos, 6) === peg$c32) {
3826
- s1 = peg$c32;
3964
+ if (input.substr(peg$currPos, 6) === peg$c38) {
3965
+ s1 = peg$c38;
3827
3966
  peg$currPos += 6;
3828
3967
  } else {
3829
3968
  s1 = peg$FAILED;
3830
3969
  if (peg$silentFails === 0) {
3831
- peg$fail(peg$e39);
3970
+ peg$fail(peg$e45);
3832
3971
  }
3833
3972
  }
3834
3973
  if (s1 !== peg$FAILED) {
3835
3974
  peg$savedPos = s0;
3836
- s1 = peg$f32();
3975
+ s1 = peg$f38();
3837
3976
  }
3838
3977
  s0 = s1;
3839
3978
  if (s0 === peg$FAILED) {
3840
3979
  s0 = peg$currPos;
3841
- if (input.substr(peg$currPos, 8) === peg$c33) {
3842
- s1 = peg$c33;
3980
+ if (input.substr(peg$currPos, 8) === peg$c39) {
3981
+ s1 = peg$c39;
3843
3982
  peg$currPos += 8;
3844
3983
  } else {
3845
3984
  s1 = peg$FAILED;
3846
3985
  if (peg$silentFails === 0) {
3847
- peg$fail(peg$e40);
3986
+ peg$fail(peg$e46);
3848
3987
  }
3849
3988
  }
3850
3989
  if (s1 !== peg$FAILED) {
3851
3990
  peg$savedPos = s0;
3852
- s1 = peg$f33();
3991
+ s1 = peg$f39();
3853
3992
  }
3854
3993
  s0 = s1;
3855
3994
  }
@@ -3865,7 +4004,7 @@ function peg$parse(input, options) {
3865
4004
  s2 = peg$parseWall();
3866
4005
  if (s2 !== peg$FAILED) {
3867
4006
  peg$savedPos = s0;
3868
- s0 = peg$f34(s1, s2);
4007
+ s0 = peg$f40(s1, s2);
3869
4008
  } else {
3870
4009
  peg$currPos = s0;
3871
4010
  s0 = peg$FAILED;
@@ -3879,7 +4018,7 @@ function peg$parse(input, options) {
3879
4018
  s1 = peg$parseWall();
3880
4019
  if (s1 !== peg$FAILED) {
3881
4020
  peg$savedPos = s0;
3882
- s1 = peg$f35(s1);
4021
+ s1 = peg$f41(s1);
3883
4022
  }
3884
4023
  s0 = s1;
3885
4024
  }
@@ -3894,12 +4033,12 @@ function peg$parse(input, options) {
3894
4033
  } else {
3895
4034
  s1 = peg$FAILED;
3896
4035
  if (peg$silentFails === 0) {
3897
- peg$fail(peg$e41);
4036
+ peg$fail(peg$e47);
3898
4037
  }
3899
4038
  }
3900
4039
  if (s1 !== peg$FAILED) {
3901
4040
  peg$savedPos = s0;
3902
- s1 = peg$f36(s1);
4041
+ s1 = peg$f42(s1);
3903
4042
  }
3904
4043
  s0 = s1;
3905
4044
  return s0;
@@ -3914,7 +4053,7 @@ function peg$parse(input, options) {
3914
4053
  s2 = null;
3915
4054
  }
3916
4055
  peg$savedPos = s0;
3917
- s0 = peg$f37(s1, s2);
4056
+ s0 = peg$f43(s1, s2);
3918
4057
  } else {
3919
4058
  peg$currPos = s0;
3920
4059
  s0 = peg$FAILED;
@@ -3947,7 +4086,7 @@ function peg$parse(input, options) {
3947
4086
  }
3948
4087
  if (s2 !== peg$FAILED) {
3949
4088
  peg$savedPos = s0;
3950
- s0 = peg$f38(s1);
4089
+ s0 = peg$f44(s1);
3951
4090
  } else {
3952
4091
  peg$currPos = s0;
3953
4092
  s0 = peg$FAILED;
@@ -4108,7 +4247,7 @@ function peg$parse(input, options) {
4108
4247
  }
4109
4248
  if (s3 !== peg$FAILED) {
4110
4249
  peg$savedPos = s0;
4111
- s0 = peg$f39(s3);
4250
+ s0 = peg$f45(s3);
4112
4251
  } else {
4113
4252
  peg$currPos = s0;
4114
4253
  s0 = peg$FAILED;
@@ -4126,13 +4265,13 @@ function peg$parse(input, options) {
4126
4265
  function peg$parseShape() {
4127
4266
  var s0, s1, s2, s3, s4;
4128
4267
  s0 = peg$currPos;
4129
- if (input.substr(peg$currPos, 2) === peg$c34) {
4130
- s1 = peg$c34;
4268
+ if (input.substr(peg$currPos, 2) === peg$c40) {
4269
+ s1 = peg$c40;
4131
4270
  peg$currPos += 2;
4132
4271
  } else {
4133
4272
  s1 = peg$FAILED;
4134
4273
  if (peg$silentFails === 0) {
4135
- peg$fail(peg$e42);
4274
+ peg$fail(peg$e48);
4136
4275
  }
4137
4276
  }
4138
4277
  if (s1 !== peg$FAILED) {
@@ -4144,7 +4283,7 @@ function peg$parse(input, options) {
4144
4283
  } else {
4145
4284
  s4 = peg$FAILED;
4146
4285
  if (peg$silentFails === 0) {
4147
- peg$fail(peg$e43);
4286
+ peg$fail(peg$e49);
4148
4287
  }
4149
4288
  }
4150
4289
  if (s4 !== peg$FAILED) {
@@ -4156,7 +4295,7 @@ function peg$parse(input, options) {
4156
4295
  } else {
4157
4296
  s4 = peg$FAILED;
4158
4297
  if (peg$silentFails === 0) {
4159
- peg$fail(peg$e43);
4298
+ peg$fail(peg$e49);
4160
4299
  }
4161
4300
  }
4162
4301
  }
@@ -4169,18 +4308,18 @@ function peg$parse(input, options) {
4169
4308
  s2 = s3;
4170
4309
  }
4171
4310
  if (s2 !== peg$FAILED) {
4172
- if (input.substr(peg$currPos, 2) === peg$c35) {
4173
- s3 = peg$c35;
4311
+ if (input.substr(peg$currPos, 2) === peg$c41) {
4312
+ s3 = peg$c41;
4174
4313
  peg$currPos += 2;
4175
4314
  } else {
4176
4315
  s3 = peg$FAILED;
4177
4316
  if (peg$silentFails === 0) {
4178
- peg$fail(peg$e44);
4317
+ peg$fail(peg$e50);
4179
4318
  }
4180
4319
  }
4181
4320
  if (s3 !== peg$FAILED) {
4182
4321
  peg$savedPos = s0;
4183
- s0 = peg$f40(s2);
4322
+ s0 = peg$f46(s2);
4184
4323
  } else {
4185
4324
  peg$currPos = s0;
4186
4325
  s0 = peg$FAILED;
@@ -4195,13 +4334,13 @@ function peg$parse(input, options) {
4195
4334
  }
4196
4335
  if (s0 === peg$FAILED) {
4197
4336
  s0 = peg$currPos;
4198
- if (input.substr(peg$currPos, 2) === peg$c36) {
4199
- s1 = peg$c36;
4337
+ if (input.substr(peg$currPos, 2) === peg$c42) {
4338
+ s1 = peg$c42;
4200
4339
  peg$currPos += 2;
4201
4340
  } else {
4202
4341
  s1 = peg$FAILED;
4203
4342
  if (peg$silentFails === 0) {
4204
- peg$fail(peg$e45);
4343
+ peg$fail(peg$e51);
4205
4344
  }
4206
4345
  }
4207
4346
  if (s1 !== peg$FAILED) {
@@ -4229,18 +4368,18 @@ function peg$parse(input, options) {
4229
4368
  }
4230
4369
  }
4231
4370
  s2 = input.substring(s2, peg$currPos);
4232
- if (input.substr(peg$currPos, 2) === peg$c37) {
4233
- s3 = peg$c37;
4371
+ if (input.substr(peg$currPos, 2) === peg$c43) {
4372
+ s3 = peg$c43;
4234
4373
  peg$currPos += 2;
4235
4374
  } else {
4236
4375
  s3 = peg$FAILED;
4237
4376
  if (peg$silentFails === 0) {
4238
- peg$fail(peg$e46);
4377
+ peg$fail(peg$e52);
4239
4378
  }
4240
4379
  }
4241
4380
  if (s3 !== peg$FAILED) {
4242
4381
  peg$savedPos = s0;
4243
- s0 = peg$f41(s2);
4382
+ s0 = peg$f47(s2);
4244
4383
  } else {
4245
4384
  peg$currPos = s0;
4246
4385
  s0 = peg$FAILED;
@@ -4251,13 +4390,13 @@ function peg$parse(input, options) {
4251
4390
  }
4252
4391
  if (s0 === peg$FAILED) {
4253
4392
  s0 = peg$currPos;
4254
- if (input.substr(peg$currPos, 2) === peg$c38) {
4255
- s1 = peg$c38;
4393
+ if (input.substr(peg$currPos, 2) === peg$c44) {
4394
+ s1 = peg$c44;
4256
4395
  peg$currPos += 2;
4257
4396
  } else {
4258
4397
  s1 = peg$FAILED;
4259
4398
  if (peg$silentFails === 0) {
4260
- peg$fail(peg$e47);
4399
+ peg$fail(peg$e53);
4261
4400
  }
4262
4401
  }
4263
4402
  if (s1 !== peg$FAILED) {
@@ -4285,18 +4424,18 @@ function peg$parse(input, options) {
4285
4424
  }
4286
4425
  }
4287
4426
  s2 = input.substring(s2, peg$currPos);
4288
- if (input.substr(peg$currPos, 2) === peg$c39) {
4289
- s3 = peg$c39;
4427
+ if (input.substr(peg$currPos, 2) === peg$c45) {
4428
+ s3 = peg$c45;
4290
4429
  peg$currPos += 2;
4291
4430
  } else {
4292
4431
  s3 = peg$FAILED;
4293
4432
  if (peg$silentFails === 0) {
4294
- peg$fail(peg$e48);
4433
+ peg$fail(peg$e54);
4295
4434
  }
4296
4435
  }
4297
4436
  if (s3 !== peg$FAILED) {
4298
4437
  peg$savedPos = s0;
4299
- s0 = peg$f42(s2);
4438
+ s0 = peg$f48(s2);
4300
4439
  } else {
4301
4440
  peg$currPos = s0;
4302
4441
  s0 = peg$FAILED;
@@ -4307,13 +4446,13 @@ function peg$parse(input, options) {
4307
4446
  }
4308
4447
  if (s0 === peg$FAILED) {
4309
4448
  s0 = peg$currPos;
4310
- if (input.substr(peg$currPos, 2) === peg$c40) {
4311
- s1 = peg$c40;
4449
+ if (input.substr(peg$currPos, 2) === peg$c46) {
4450
+ s1 = peg$c46;
4312
4451
  peg$currPos += 2;
4313
4452
  } else {
4314
4453
  s1 = peg$FAILED;
4315
4454
  if (peg$silentFails === 0) {
4316
- peg$fail(peg$e49);
4455
+ peg$fail(peg$e55);
4317
4456
  }
4318
4457
  }
4319
4458
  if (s1 !== peg$FAILED) {
@@ -4325,7 +4464,7 @@ function peg$parse(input, options) {
4325
4464
  } else {
4326
4465
  s4 = peg$FAILED;
4327
4466
  if (peg$silentFails === 0) {
4328
- peg$fail(peg$e43);
4467
+ peg$fail(peg$e49);
4329
4468
  }
4330
4469
  }
4331
4470
  while (s4 !== peg$FAILED) {
@@ -4336,23 +4475,23 @@ function peg$parse(input, options) {
4336
4475
  } else {
4337
4476
  s4 = peg$FAILED;
4338
4477
  if (peg$silentFails === 0) {
4339
- peg$fail(peg$e43);
4478
+ peg$fail(peg$e49);
4340
4479
  }
4341
4480
  }
4342
4481
  }
4343
4482
  s2 = input.substring(s2, peg$currPos);
4344
- if (input.substr(peg$currPos, 2) === peg$c41) {
4345
- s3 = peg$c41;
4483
+ if (input.substr(peg$currPos, 2) === peg$c47) {
4484
+ s3 = peg$c47;
4346
4485
  peg$currPos += 2;
4347
4486
  } else {
4348
4487
  s3 = peg$FAILED;
4349
4488
  if (peg$silentFails === 0) {
4350
- peg$fail(peg$e50);
4489
+ peg$fail(peg$e56);
4351
4490
  }
4352
4491
  }
4353
4492
  if (s3 !== peg$FAILED) {
4354
4493
  peg$savedPos = s0;
4355
- s0 = peg$f43(s2);
4494
+ s0 = peg$f49(s2);
4356
4495
  } else {
4357
4496
  peg$currPos = s0;
4358
4497
  s0 = peg$FAILED;
@@ -4363,13 +4502,13 @@ function peg$parse(input, options) {
4363
4502
  }
4364
4503
  if (s0 === peg$FAILED) {
4365
4504
  s0 = peg$currPos;
4366
- if (input.substr(peg$currPos, 2) === peg$c42) {
4367
- s1 = peg$c42;
4505
+ if (input.substr(peg$currPos, 2) === peg$c48) {
4506
+ s1 = peg$c48;
4368
4507
  peg$currPos += 2;
4369
4508
  } else {
4370
4509
  s1 = peg$FAILED;
4371
4510
  if (peg$silentFails === 0) {
4372
- peg$fail(peg$e51);
4511
+ peg$fail(peg$e57);
4373
4512
  }
4374
4513
  }
4375
4514
  if (s1 !== peg$FAILED) {
@@ -4381,7 +4520,7 @@ function peg$parse(input, options) {
4381
4520
  } else {
4382
4521
  s4 = peg$FAILED;
4383
4522
  if (peg$silentFails === 0) {
4384
- peg$fail(peg$e52);
4523
+ peg$fail(peg$e58);
4385
4524
  }
4386
4525
  }
4387
4526
  while (s4 !== peg$FAILED) {
@@ -4392,23 +4531,23 @@ function peg$parse(input, options) {
4392
4531
  } else {
4393
4532
  s4 = peg$FAILED;
4394
4533
  if (peg$silentFails === 0) {
4395
- peg$fail(peg$e52);
4534
+ peg$fail(peg$e58);
4396
4535
  }
4397
4536
  }
4398
4537
  }
4399
4538
  s2 = input.substring(s2, peg$currPos);
4400
- if (input.substr(peg$currPos, 2) === peg$c43) {
4401
- s3 = peg$c43;
4539
+ if (input.substr(peg$currPos, 2) === peg$c49) {
4540
+ s3 = peg$c49;
4402
4541
  peg$currPos += 2;
4403
4542
  } else {
4404
4543
  s3 = peg$FAILED;
4405
4544
  if (peg$silentFails === 0) {
4406
- peg$fail(peg$e53);
4545
+ peg$fail(peg$e59);
4407
4546
  }
4408
4547
  }
4409
4548
  if (s3 !== peg$FAILED) {
4410
4549
  peg$savedPos = s0;
4411
- s0 = peg$f44(s2);
4550
+ s0 = peg$f50(s2);
4412
4551
  } else {
4413
4552
  peg$currPos = s0;
4414
4553
  s0 = peg$FAILED;
@@ -4419,13 +4558,13 @@ function peg$parse(input, options) {
4419
4558
  }
4420
4559
  if (s0 === peg$FAILED) {
4421
4560
  s0 = peg$currPos;
4422
- if (input.substr(peg$currPos, 2) === peg$c44) {
4423
- s1 = peg$c44;
4561
+ if (input.substr(peg$currPos, 2) === peg$c50) {
4562
+ s1 = peg$c50;
4424
4563
  peg$currPos += 2;
4425
4564
  } else {
4426
4565
  s1 = peg$FAILED;
4427
4566
  if (peg$silentFails === 0) {
4428
- peg$fail(peg$e54);
4567
+ peg$fail(peg$e60);
4429
4568
  }
4430
4569
  }
4431
4570
  if (s1 !== peg$FAILED) {
@@ -4437,7 +4576,7 @@ function peg$parse(input, options) {
4437
4576
  } else {
4438
4577
  s4 = peg$FAILED;
4439
4578
  if (peg$silentFails === 0) {
4440
- peg$fail(peg$e55);
4579
+ peg$fail(peg$e61);
4441
4580
  }
4442
4581
  }
4443
4582
  while (s4 !== peg$FAILED) {
@@ -4448,23 +4587,23 @@ function peg$parse(input, options) {
4448
4587
  } else {
4449
4588
  s4 = peg$FAILED;
4450
4589
  if (peg$silentFails === 0) {
4451
- peg$fail(peg$e55);
4590
+ peg$fail(peg$e61);
4452
4591
  }
4453
4592
  }
4454
4593
  }
4455
4594
  s2 = input.substring(s2, peg$currPos);
4456
- if (input.substr(peg$currPos, 2) === peg$c45) {
4457
- s3 = peg$c45;
4595
+ if (input.substr(peg$currPos, 2) === peg$c51) {
4596
+ s3 = peg$c51;
4458
4597
  peg$currPos += 2;
4459
4598
  } else {
4460
4599
  s3 = peg$FAILED;
4461
4600
  if (peg$silentFails === 0) {
4462
- peg$fail(peg$e56);
4601
+ peg$fail(peg$e62);
4463
4602
  }
4464
4603
  }
4465
4604
  if (s3 !== peg$FAILED) {
4466
4605
  peg$savedPos = s0;
4467
- s0 = peg$f45(s2);
4606
+ s0 = peg$f51(s2);
4468
4607
  } else {
4469
4608
  peg$currPos = s0;
4470
4609
  s0 = peg$FAILED;
@@ -4475,13 +4614,13 @@ function peg$parse(input, options) {
4475
4614
  }
4476
4615
  if (s0 === peg$FAILED) {
4477
4616
  s0 = peg$currPos;
4478
- if (input.substr(peg$currPos, 2) === peg$c46) {
4479
- s1 = peg$c46;
4617
+ if (input.substr(peg$currPos, 2) === peg$c52) {
4618
+ s1 = peg$c52;
4480
4619
  peg$currPos += 2;
4481
4620
  } else {
4482
4621
  s1 = peg$FAILED;
4483
4622
  if (peg$silentFails === 0) {
4484
- peg$fail(peg$e57);
4623
+ peg$fail(peg$e63);
4485
4624
  }
4486
4625
  }
4487
4626
  if (s1 !== peg$FAILED) {
@@ -4493,7 +4632,7 @@ function peg$parse(input, options) {
4493
4632
  } else {
4494
4633
  s4 = peg$FAILED;
4495
4634
  if (peg$silentFails === 0) {
4496
- peg$fail(peg$e58);
4635
+ peg$fail(peg$e64);
4497
4636
  }
4498
4637
  }
4499
4638
  while (s4 !== peg$FAILED) {
@@ -4504,23 +4643,23 @@ function peg$parse(input, options) {
4504
4643
  } else {
4505
4644
  s4 = peg$FAILED;
4506
4645
  if (peg$silentFails === 0) {
4507
- peg$fail(peg$e58);
4646
+ peg$fail(peg$e64);
4508
4647
  }
4509
4648
  }
4510
4649
  }
4511
4650
  s2 = input.substring(s2, peg$currPos);
4512
- if (input.substr(peg$currPos, 2) === peg$c47) {
4513
- s3 = peg$c47;
4651
+ if (input.substr(peg$currPos, 2) === peg$c53) {
4652
+ s3 = peg$c53;
4514
4653
  peg$currPos += 2;
4515
4654
  } else {
4516
4655
  s3 = peg$FAILED;
4517
4656
  if (peg$silentFails === 0) {
4518
- peg$fail(peg$e59);
4657
+ peg$fail(peg$e65);
4519
4658
  }
4520
4659
  }
4521
4660
  if (s3 !== peg$FAILED) {
4522
4661
  peg$savedPos = s0;
4523
- s0 = peg$f46(s2);
4662
+ s0 = peg$f52(s2);
4524
4663
  } else {
4525
4664
  peg$currPos = s0;
4526
4665
  s0 = peg$FAILED;
@@ -4532,12 +4671,12 @@ function peg$parse(input, options) {
4532
4671
  if (s0 === peg$FAILED) {
4533
4672
  s0 = peg$currPos;
4534
4673
  if (input.charCodeAt(peg$currPos) === 62) {
4535
- s1 = peg$c48;
4674
+ s1 = peg$c54;
4536
4675
  peg$currPos++;
4537
4676
  } else {
4538
4677
  s1 = peg$FAILED;
4539
4678
  if (peg$silentFails === 0) {
4540
- peg$fail(peg$e60);
4679
+ peg$fail(peg$e66);
4541
4680
  }
4542
4681
  }
4543
4682
  if (s1 !== peg$FAILED) {
@@ -4576,7 +4715,7 @@ function peg$parse(input, options) {
4576
4715
  }
4577
4716
  if (s3 !== peg$FAILED) {
4578
4717
  peg$savedPos = s0;
4579
- s0 = peg$f47(s2);
4718
+ s0 = peg$f53(s2);
4580
4719
  } else {
4581
4720
  peg$currPos = s0;
4582
4721
  s0 = peg$FAILED;
@@ -4632,7 +4771,7 @@ function peg$parse(input, options) {
4632
4771
  }
4633
4772
  if (s3 !== peg$FAILED) {
4634
4773
  peg$savedPos = s0;
4635
- s0 = peg$f48(s2);
4774
+ s0 = peg$f54(s2);
4636
4775
  } else {
4637
4776
  peg$currPos = s0;
4638
4777
  s0 = peg$FAILED;
@@ -4644,12 +4783,12 @@ function peg$parse(input, options) {
4644
4783
  if (s0 === peg$FAILED) {
4645
4784
  s0 = peg$currPos;
4646
4785
  if (input.charCodeAt(peg$currPos) === 123) {
4647
- s1 = peg$c49;
4786
+ s1 = peg$c55;
4648
4787
  peg$currPos++;
4649
4788
  } else {
4650
4789
  s1 = peg$FAILED;
4651
4790
  if (peg$silentFails === 0) {
4652
- peg$fail(peg$e61);
4791
+ peg$fail(peg$e67);
4653
4792
  }
4654
4793
  }
4655
4794
  if (s1 !== peg$FAILED) {
@@ -4661,7 +4800,7 @@ function peg$parse(input, options) {
4661
4800
  } else {
4662
4801
  s4 = peg$FAILED;
4663
4802
  if (peg$silentFails === 0) {
4664
- peg$fail(peg$e52);
4803
+ peg$fail(peg$e58);
4665
4804
  }
4666
4805
  }
4667
4806
  while (s4 !== peg$FAILED) {
@@ -4672,23 +4811,23 @@ function peg$parse(input, options) {
4672
4811
  } else {
4673
4812
  s4 = peg$FAILED;
4674
4813
  if (peg$silentFails === 0) {
4675
- peg$fail(peg$e52);
4814
+ peg$fail(peg$e58);
4676
4815
  }
4677
4816
  }
4678
4817
  }
4679
4818
  s2 = input.substring(s2, peg$currPos);
4680
4819
  if (input.charCodeAt(peg$currPos) === 125) {
4681
- s3 = peg$c50;
4820
+ s3 = peg$c56;
4682
4821
  peg$currPos++;
4683
4822
  } else {
4684
4823
  s3 = peg$FAILED;
4685
4824
  if (peg$silentFails === 0) {
4686
- peg$fail(peg$e62);
4825
+ peg$fail(peg$e68);
4687
4826
  }
4688
4827
  }
4689
4828
  if (s3 !== peg$FAILED) {
4690
4829
  peg$savedPos = s0;
4691
- s0 = peg$f49(s2);
4830
+ s0 = peg$f55(s2);
4692
4831
  } else {
4693
4832
  peg$currPos = s0;
4694
4833
  s0 = peg$FAILED;
@@ -4700,12 +4839,12 @@ function peg$parse(input, options) {
4700
4839
  if (s0 === peg$FAILED) {
4701
4840
  s0 = peg$currPos;
4702
4841
  if (input.charCodeAt(peg$currPos) === 40) {
4703
- s1 = peg$c51;
4842
+ s1 = peg$c57;
4704
4843
  peg$currPos++;
4705
4844
  } else {
4706
4845
  s1 = peg$FAILED;
4707
4846
  if (peg$silentFails === 0) {
4708
- peg$fail(peg$e63);
4847
+ peg$fail(peg$e69);
4709
4848
  }
4710
4849
  }
4711
4850
  if (s1 !== peg$FAILED) {
@@ -4717,7 +4856,7 @@ function peg$parse(input, options) {
4717
4856
  } else {
4718
4857
  s4 = peg$FAILED;
4719
4858
  if (peg$silentFails === 0) {
4720
- peg$fail(peg$e43);
4859
+ peg$fail(peg$e49);
4721
4860
  }
4722
4861
  }
4723
4862
  while (s4 !== peg$FAILED) {
@@ -4728,23 +4867,23 @@ function peg$parse(input, options) {
4728
4867
  } else {
4729
4868
  s4 = peg$FAILED;
4730
4869
  if (peg$silentFails === 0) {
4731
- peg$fail(peg$e43);
4870
+ peg$fail(peg$e49);
4732
4871
  }
4733
4872
  }
4734
4873
  }
4735
4874
  s2 = input.substring(s2, peg$currPos);
4736
4875
  if (input.charCodeAt(peg$currPos) === 41) {
4737
- s3 = peg$c52;
4876
+ s3 = peg$c58;
4738
4877
  peg$currPos++;
4739
4878
  } else {
4740
4879
  s3 = peg$FAILED;
4741
4880
  if (peg$silentFails === 0) {
4742
- peg$fail(peg$e64);
4881
+ peg$fail(peg$e70);
4743
4882
  }
4744
4883
  }
4745
4884
  if (s3 !== peg$FAILED) {
4746
4885
  peg$savedPos = s0;
4747
- s0 = peg$f50(s2);
4886
+ s0 = peg$f56(s2);
4748
4887
  } else {
4749
4888
  peg$currPos = s0;
4750
4889
  s0 = peg$FAILED;
@@ -4768,13 +4907,13 @@ function peg$parse(input, options) {
4768
4907
  function peg$parseStyleDirective() {
4769
4908
  var s0, s1, s2, s3, s4, s5;
4770
4909
  s0 = peg$currPos;
4771
- if (input.substr(peg$currPos, 5) === peg$c53) {
4772
- s1 = peg$c53;
4910
+ if (input.substr(peg$currPos, 5) === peg$c59) {
4911
+ s1 = peg$c59;
4773
4912
  peg$currPos += 5;
4774
4913
  } else {
4775
4914
  s1 = peg$FAILED;
4776
4915
  if (peg$silentFails === 0) {
4777
- peg$fail(peg$e65);
4916
+ peg$fail(peg$e71);
4778
4917
  }
4779
4918
  }
4780
4919
  if (s1 !== peg$FAILED) {
@@ -4788,7 +4927,7 @@ function peg$parse(input, options) {
4788
4927
  } else {
4789
4928
  s5 = peg$FAILED;
4790
4929
  if (peg$silentFails === 0) {
4791
- peg$fail(peg$e66);
4930
+ peg$fail(peg$e72);
4792
4931
  }
4793
4932
  }
4794
4933
  if (s5 !== peg$FAILED) {
@@ -4800,7 +4939,7 @@ function peg$parse(input, options) {
4800
4939
  } else {
4801
4940
  s5 = peg$FAILED;
4802
4941
  if (peg$silentFails === 0) {
4803
- peg$fail(peg$e66);
4942
+ peg$fail(peg$e72);
4804
4943
  }
4805
4944
  }
4806
4945
  }
@@ -4814,7 +4953,7 @@ function peg$parse(input, options) {
4814
4953
  }
4815
4954
  if (s3 !== peg$FAILED) {
4816
4955
  peg$savedPos = s0;
4817
- s0 = peg$f51(s3);
4956
+ s0 = peg$f57(s3);
4818
4957
  } else {
4819
4958
  peg$currPos = s0;
4820
4959
  s0 = peg$FAILED;
@@ -4832,23 +4971,23 @@ function peg$parse(input, options) {
4832
4971
  function peg$parseClassDirective() {
4833
4972
  var s0, s1, s2, s3, s4, s5;
4834
4973
  s0 = peg$currPos;
4835
- if (input.substr(peg$currPos, 8) === peg$c54) {
4836
- s1 = peg$c54;
4974
+ if (input.substr(peg$currPos, 8) === peg$c60) {
4975
+ s1 = peg$c60;
4837
4976
  peg$currPos += 8;
4838
4977
  } else {
4839
4978
  s1 = peg$FAILED;
4840
4979
  if (peg$silentFails === 0) {
4841
- peg$fail(peg$e67);
4980
+ peg$fail(peg$e73);
4842
4981
  }
4843
4982
  }
4844
4983
  if (s1 === peg$FAILED) {
4845
- if (input.substr(peg$currPos, 5) === peg$c55) {
4846
- s1 = peg$c55;
4984
+ if (input.substr(peg$currPos, 5) === peg$c61) {
4985
+ s1 = peg$c61;
4847
4986
  peg$currPos += 5;
4848
4987
  } else {
4849
4988
  s1 = peg$FAILED;
4850
4989
  if (peg$silentFails === 0) {
4851
- peg$fail(peg$e68);
4990
+ peg$fail(peg$e74);
4852
4991
  }
4853
4992
  }
4854
4993
  }
@@ -4863,7 +5002,7 @@ function peg$parse(input, options) {
4863
5002
  } else {
4864
5003
  s5 = peg$FAILED;
4865
5004
  if (peg$silentFails === 0) {
4866
- peg$fail(peg$e66);
5005
+ peg$fail(peg$e72);
4867
5006
  }
4868
5007
  }
4869
5008
  if (s5 !== peg$FAILED) {
@@ -4875,7 +5014,7 @@ function peg$parse(input, options) {
4875
5014
  } else {
4876
5015
  s5 = peg$FAILED;
4877
5016
  if (peg$silentFails === 0) {
4878
- peg$fail(peg$e66);
5017
+ peg$fail(peg$e72);
4879
5018
  }
4880
5019
  }
4881
5020
  }
@@ -4889,7 +5028,7 @@ function peg$parse(input, options) {
4889
5028
  }
4890
5029
  if (s3 !== peg$FAILED) {
4891
5030
  peg$savedPos = s0;
4892
- s0 = peg$f52(s3);
5031
+ s0 = peg$f58(s3);
4893
5032
  } else {
4894
5033
  peg$currPos = s0;
4895
5034
  s0 = peg$FAILED;
@@ -4907,13 +5046,13 @@ function peg$parse(input, options) {
4907
5046
  function peg$parseClickDirective() {
4908
5047
  var s0, s1, s2, s3, s4, s5;
4909
5048
  s0 = peg$currPos;
4910
- if (input.substr(peg$currPos, 5) === peg$c56) {
4911
- s1 = peg$c56;
5049
+ if (input.substr(peg$currPos, 5) === peg$c62) {
5050
+ s1 = peg$c62;
4912
5051
  peg$currPos += 5;
4913
5052
  } else {
4914
5053
  s1 = peg$FAILED;
4915
5054
  if (peg$silentFails === 0) {
4916
- peg$fail(peg$e69);
5055
+ peg$fail(peg$e75);
4917
5056
  }
4918
5057
  }
4919
5058
  if (s1 !== peg$FAILED) {
@@ -4927,7 +5066,7 @@ function peg$parse(input, options) {
4927
5066
  } else {
4928
5067
  s5 = peg$FAILED;
4929
5068
  if (peg$silentFails === 0) {
4930
- peg$fail(peg$e66);
5069
+ peg$fail(peg$e72);
4931
5070
  }
4932
5071
  }
4933
5072
  if (s5 !== peg$FAILED) {
@@ -4939,7 +5078,7 @@ function peg$parse(input, options) {
4939
5078
  } else {
4940
5079
  s5 = peg$FAILED;
4941
5080
  if (peg$silentFails === 0) {
4942
- peg$fail(peg$e66);
5081
+ peg$fail(peg$e72);
4943
5082
  }
4944
5083
  }
4945
5084
  }
@@ -4953,7 +5092,7 @@ function peg$parse(input, options) {
4953
5092
  }
4954
5093
  if (s3 !== peg$FAILED) {
4955
5094
  peg$savedPos = s0;
4956
- s0 = peg$f53(s3);
5095
+ s0 = peg$f59(s3);
4957
5096
  } else {
4958
5097
  peg$currPos = s0;
4959
5098
  s0 = peg$FAILED;
@@ -4971,25 +5110,25 @@ function peg$parse(input, options) {
4971
5110
  function peg$parseNoteDirective() {
4972
5111
  var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
4973
5112
  s0 = peg$currPos;
4974
- if (input.substr(peg$currPos, 4) === peg$c57) {
4975
- s1 = peg$c57;
5113
+ if (input.substr(peg$currPos, 4) === peg$c63) {
5114
+ s1 = peg$c63;
4976
5115
  peg$currPos += 4;
4977
5116
  } else {
4978
5117
  s1 = peg$FAILED;
4979
5118
  if (peg$silentFails === 0) {
4980
- peg$fail(peg$e70);
5119
+ peg$fail(peg$e76);
4981
5120
  }
4982
5121
  }
4983
5122
  if (s1 !== peg$FAILED) {
4984
5123
  s2 = peg$parse__();
4985
5124
  if (s2 !== peg$FAILED) {
4986
5125
  if (input.charCodeAt(peg$currPos) === 34) {
4987
- s3 = peg$c58;
5126
+ s3 = peg$c64;
4988
5127
  peg$currPos++;
4989
5128
  } else {
4990
5129
  s3 = peg$FAILED;
4991
5130
  if (peg$silentFails === 0) {
4992
- peg$fail(peg$e71);
5131
+ peg$fail(peg$e77);
4993
5132
  }
4994
5133
  }
4995
5134
  if (s3 !== peg$FAILED) {
@@ -5001,7 +5140,7 @@ function peg$parse(input, options) {
5001
5140
  } else {
5002
5141
  s6 = peg$FAILED;
5003
5142
  if (peg$silentFails === 0) {
5004
- peg$fail(peg$e72);
5143
+ peg$fail(peg$e78);
5005
5144
  }
5006
5145
  }
5007
5146
  while (s6 !== peg$FAILED) {
@@ -5012,30 +5151,30 @@ function peg$parse(input, options) {
5012
5151
  } else {
5013
5152
  s6 = peg$FAILED;
5014
5153
  if (peg$silentFails === 0) {
5015
- peg$fail(peg$e72);
5154
+ peg$fail(peg$e78);
5016
5155
  }
5017
5156
  }
5018
5157
  }
5019
5158
  s4 = input.substring(s4, peg$currPos);
5020
5159
  if (input.charCodeAt(peg$currPos) === 34) {
5021
- s5 = peg$c58;
5160
+ s5 = peg$c64;
5022
5161
  peg$currPos++;
5023
5162
  } else {
5024
5163
  s5 = peg$FAILED;
5025
5164
  if (peg$silentFails === 0) {
5026
- peg$fail(peg$e71);
5165
+ peg$fail(peg$e77);
5027
5166
  }
5028
5167
  }
5029
5168
  if (s5 !== peg$FAILED) {
5030
5169
  s6 = peg$parse__();
5031
5170
  if (s6 !== peg$FAILED) {
5032
- if (input.substr(peg$currPos, 2) === peg$c59) {
5033
- s7 = peg$c59;
5171
+ if (input.substr(peg$currPos, 2) === peg$c65) {
5172
+ s7 = peg$c65;
5034
5173
  peg$currPos += 2;
5035
5174
  } else {
5036
5175
  s7 = peg$FAILED;
5037
5176
  if (peg$silentFails === 0) {
5038
- peg$fail(peg$e73);
5177
+ peg$fail(peg$e79);
5039
5178
  }
5040
5179
  }
5041
5180
  if (s7 !== peg$FAILED) {
@@ -5092,7 +5231,7 @@ function peg$parse(input, options) {
5092
5231
  s10 = null;
5093
5232
  }
5094
5233
  peg$savedPos = s0;
5095
- s0 = peg$f54(s4, s9, s10);
5234
+ s0 = peg$f60(s4, s9, s10);
5096
5235
  } else {
5097
5236
  peg$currPos = s0;
5098
5237
  s0 = peg$FAILED;
@@ -5132,13 +5271,13 @@ function peg$parse(input, options) {
5132
5271
  s0 = peg$currPos;
5133
5272
  s1 = peg$parse__();
5134
5273
  if (s1 !== peg$FAILED) {
5135
- if (input.substr(peg$currPos, 6) === peg$c60) {
5136
- s2 = peg$c60;
5274
+ if (input.substr(peg$currPos, 6) === peg$c66) {
5275
+ s2 = peg$c66;
5137
5276
  peg$currPos += 6;
5138
5277
  } else {
5139
5278
  s2 = peg$FAILED;
5140
5279
  if (peg$silentFails === 0) {
5141
- peg$fail(peg$e74);
5280
+ peg$fail(peg$e80);
5142
5281
  }
5143
5282
  }
5144
5283
  if (s2 !== peg$FAILED) {
@@ -5148,12 +5287,12 @@ function peg$parse(input, options) {
5148
5287
  if (s4 !== peg$FAILED) {
5149
5288
  s5 = peg$parse_();
5150
5289
  if (input.charCodeAt(peg$currPos) === 44) {
5151
- s6 = peg$c61;
5290
+ s6 = peg$c67;
5152
5291
  peg$currPos++;
5153
5292
  } else {
5154
5293
  s6 = peg$FAILED;
5155
5294
  if (peg$silentFails === 0) {
5156
- peg$fail(peg$e75);
5295
+ peg$fail(peg$e81);
5157
5296
  }
5158
5297
  }
5159
5298
  if (s6 !== peg$FAILED) {
@@ -5161,7 +5300,7 @@ function peg$parse(input, options) {
5161
5300
  s8 = peg$parseSignedInt();
5162
5301
  if (s8 !== peg$FAILED) {
5163
5302
  peg$savedPos = s0;
5164
- s0 = peg$f55(s4, s8);
5303
+ s0 = peg$f61(s4, s8);
5165
5304
  } else {
5166
5305
  peg$currPos = s0;
5167
5306
  s0 = peg$FAILED;
@@ -5192,12 +5331,12 @@ function peg$parse(input, options) {
5192
5331
  var s0, s1, s2, s3, s4;
5193
5332
  s0 = peg$currPos;
5194
5333
  if (input.charCodeAt(peg$currPos) === 45) {
5195
- s1 = peg$c62;
5334
+ s1 = peg$c68;
5196
5335
  peg$currPos++;
5197
5336
  } else {
5198
5337
  s1 = peg$FAILED;
5199
5338
  if (peg$silentFails === 0) {
5200
- peg$fail(peg$e76);
5339
+ peg$fail(peg$e82);
5201
5340
  }
5202
5341
  }
5203
5342
  if (s1 === peg$FAILED) {
@@ -5211,7 +5350,7 @@ function peg$parse(input, options) {
5211
5350
  } else {
5212
5351
  s4 = peg$FAILED;
5213
5352
  if (peg$silentFails === 0) {
5214
- peg$fail(peg$e77);
5353
+ peg$fail(peg$e83);
5215
5354
  }
5216
5355
  }
5217
5356
  if (s4 !== peg$FAILED) {
@@ -5223,7 +5362,7 @@ function peg$parse(input, options) {
5223
5362
  } else {
5224
5363
  s4 = peg$FAILED;
5225
5364
  if (peg$silentFails === 0) {
5226
- peg$fail(peg$e77);
5365
+ peg$fail(peg$e83);
5227
5366
  }
5228
5367
  }
5229
5368
  }
@@ -5237,7 +5376,7 @@ function peg$parse(input, options) {
5237
5376
  }
5238
5377
  if (s2 !== peg$FAILED) {
5239
5378
  peg$savedPos = s0;
5240
- s0 = peg$f56(s1, s2);
5379
+ s0 = peg$f62(s1, s2);
5241
5380
  } else {
5242
5381
  peg$currPos = s0;
5243
5382
  s0 = peg$FAILED;
@@ -5247,13 +5386,13 @@ function peg$parse(input, options) {
5247
5386
  function peg$parseLegendBlock() {
5248
5387
  var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
5249
5388
  s0 = peg$currPos;
5250
- if (input.substr(peg$currPos, 6) === peg$c63) {
5251
- s1 = peg$c63;
5389
+ if (input.substr(peg$currPos, 6) === peg$c69) {
5390
+ s1 = peg$c69;
5252
5391
  peg$currPos += 6;
5253
5392
  } else {
5254
5393
  s1 = peg$FAILED;
5255
5394
  if (peg$silentFails === 0) {
5256
- peg$fail(peg$e78);
5395
+ peg$fail(peg$e84);
5257
5396
  }
5258
5397
  }
5259
5398
  if (s1 !== peg$FAILED) {
@@ -5264,12 +5403,12 @@ function peg$parse(input, options) {
5264
5403
  s4 = peg$currPos;
5265
5404
  s5 = peg$parse_();
5266
5405
  if (input.charCodeAt(peg$currPos) === 34) {
5267
- s6 = peg$c58;
5406
+ s6 = peg$c64;
5268
5407
  peg$currPos++;
5269
5408
  } else {
5270
5409
  s6 = peg$FAILED;
5271
5410
  if (peg$silentFails === 0) {
5272
- peg$fail(peg$e71);
5411
+ peg$fail(peg$e77);
5273
5412
  }
5274
5413
  }
5275
5414
  if (s6 !== peg$FAILED) {
@@ -5281,7 +5420,7 @@ function peg$parse(input, options) {
5281
5420
  } else {
5282
5421
  s9 = peg$FAILED;
5283
5422
  if (peg$silentFails === 0) {
5284
- peg$fail(peg$e72);
5423
+ peg$fail(peg$e78);
5285
5424
  }
5286
5425
  }
5287
5426
  while (s9 !== peg$FAILED) {
@@ -5292,23 +5431,23 @@ function peg$parse(input, options) {
5292
5431
  } else {
5293
5432
  s9 = peg$FAILED;
5294
5433
  if (peg$silentFails === 0) {
5295
- peg$fail(peg$e72);
5434
+ peg$fail(peg$e78);
5296
5435
  }
5297
5436
  }
5298
5437
  }
5299
5438
  s7 = input.substring(s7, peg$currPos);
5300
5439
  if (input.charCodeAt(peg$currPos) === 34) {
5301
- s8 = peg$c58;
5440
+ s8 = peg$c64;
5302
5441
  peg$currPos++;
5303
5442
  } else {
5304
5443
  s8 = peg$FAILED;
5305
5444
  if (peg$silentFails === 0) {
5306
- peg$fail(peg$e71);
5445
+ peg$fail(peg$e77);
5307
5446
  }
5308
5447
  }
5309
5448
  if (s8 !== peg$FAILED) {
5310
5449
  peg$savedPos = s4;
5311
- s4 = peg$f57(s3, s7);
5450
+ s4 = peg$f63(s3, s7);
5312
5451
  } else {
5313
5452
  peg$currPos = s4;
5314
5453
  s4 = peg$FAILED;
@@ -5341,7 +5480,7 @@ function peg$parse(input, options) {
5341
5480
  }
5342
5481
  if (s9 !== peg$FAILED) {
5343
5482
  peg$savedPos = s0;
5344
- s0 = peg$f58(s3, s4, s7);
5483
+ s0 = peg$f64(s3, s4, s7);
5345
5484
  } else {
5346
5485
  peg$currPos = s0;
5347
5486
  s0 = peg$FAILED;
@@ -5366,43 +5505,43 @@ function peg$parse(input, options) {
5366
5505
  }
5367
5506
  function peg$parseLegendCorner() {
5368
5507
  var s0;
5369
- if (input.substr(peg$currPos, 12) === peg$c64) {
5370
- s0 = peg$c64;
5508
+ if (input.substr(peg$currPos, 12) === peg$c70) {
5509
+ s0 = peg$c70;
5371
5510
  peg$currPos += 12;
5372
5511
  } else {
5373
5512
  s0 = peg$FAILED;
5374
5513
  if (peg$silentFails === 0) {
5375
- peg$fail(peg$e79);
5514
+ peg$fail(peg$e85);
5376
5515
  }
5377
5516
  }
5378
5517
  if (s0 === peg$FAILED) {
5379
- if (input.substr(peg$currPos, 11) === peg$c65) {
5380
- s0 = peg$c65;
5518
+ if (input.substr(peg$currPos, 11) === peg$c71) {
5519
+ s0 = peg$c71;
5381
5520
  peg$currPos += 11;
5382
5521
  } else {
5383
5522
  s0 = peg$FAILED;
5384
5523
  if (peg$silentFails === 0) {
5385
- peg$fail(peg$e80);
5524
+ peg$fail(peg$e86);
5386
5525
  }
5387
5526
  }
5388
5527
  if (s0 === peg$FAILED) {
5389
- if (input.substr(peg$currPos, 9) === peg$c66) {
5390
- s0 = peg$c66;
5528
+ if (input.substr(peg$currPos, 9) === peg$c72) {
5529
+ s0 = peg$c72;
5391
5530
  peg$currPos += 9;
5392
5531
  } else {
5393
5532
  s0 = peg$FAILED;
5394
5533
  if (peg$silentFails === 0) {
5395
- peg$fail(peg$e81);
5534
+ peg$fail(peg$e87);
5396
5535
  }
5397
5536
  }
5398
5537
  if (s0 === peg$FAILED) {
5399
- if (input.substr(peg$currPos, 8) === peg$c67) {
5400
- s0 = peg$c67;
5538
+ if (input.substr(peg$currPos, 8) === peg$c73) {
5539
+ s0 = peg$c73;
5401
5540
  peg$currPos += 8;
5402
5541
  } else {
5403
5542
  s0 = peg$FAILED;
5404
5543
  if (peg$silentFails === 0) {
5405
- peg$fail(peg$e82);
5544
+ peg$fail(peg$e88);
5406
5545
  }
5407
5546
  }
5408
5547
  }
@@ -5472,7 +5611,7 @@ function peg$parse(input, options) {
5472
5611
  } else {
5473
5612
  s5 = peg$FAILED;
5474
5613
  if (peg$silentFails === 0) {
5475
- peg$fail(peg$e83);
5614
+ peg$fail(peg$e89);
5476
5615
  }
5477
5616
  }
5478
5617
  if (s5 !== peg$FAILED) {
@@ -5484,7 +5623,7 @@ function peg$parse(input, options) {
5484
5623
  } else {
5485
5624
  s5 = peg$FAILED;
5486
5625
  if (peg$silentFails === 0) {
5487
- peg$fail(peg$e83);
5626
+ peg$fail(peg$e89);
5488
5627
  }
5489
5628
  }
5490
5629
  }
@@ -5498,12 +5637,12 @@ function peg$parse(input, options) {
5498
5637
  }
5499
5638
  if (s3 !== peg$FAILED) {
5500
5639
  if (input.charCodeAt(peg$currPos) === 58) {
5501
- s4 = peg$c29;
5640
+ s4 = peg$c35;
5502
5641
  peg$currPos++;
5503
5642
  } else {
5504
5643
  s4 = peg$FAILED;
5505
5644
  if (peg$silentFails === 0) {
5506
- peg$fail(peg$e36);
5645
+ peg$fail(peg$e42);
5507
5646
  }
5508
5647
  }
5509
5648
  if (s4 !== peg$FAILED) {
@@ -5543,7 +5682,7 @@ function peg$parse(input, options) {
5543
5682
  s6 = peg$parseNL();
5544
5683
  if (s6 !== peg$FAILED) {
5545
5684
  peg$savedPos = s0;
5546
- s0 = peg$f59(s3, s5);
5685
+ s0 = peg$f65(s3, s5);
5547
5686
  } else {
5548
5687
  peg$currPos = s0;
5549
5688
  s0 = peg$FAILED;
@@ -5576,7 +5715,7 @@ function peg$parse(input, options) {
5576
5715
  } else {
5577
5716
  s1 = peg$FAILED;
5578
5717
  if (peg$silentFails === 0) {
5579
- peg$fail(peg$e85);
5718
+ peg$fail(peg$e91);
5580
5719
  }
5581
5720
  }
5582
5721
  while (s1 !== peg$FAILED) {
@@ -5587,14 +5726,14 @@ function peg$parse(input, options) {
5587
5726
  } else {
5588
5727
  s1 = peg$FAILED;
5589
5728
  if (peg$silentFails === 0) {
5590
- peg$fail(peg$e85);
5729
+ peg$fail(peg$e91);
5591
5730
  }
5592
5731
  }
5593
5732
  }
5594
5733
  peg$silentFails--;
5595
5734
  s1 = peg$FAILED;
5596
5735
  if (peg$silentFails === 0) {
5597
- peg$fail(peg$e84);
5736
+ peg$fail(peg$e90);
5598
5737
  }
5599
5738
  return s0;
5600
5739
  }
@@ -5608,7 +5747,7 @@ function peg$parse(input, options) {
5608
5747
  } else {
5609
5748
  s1 = peg$FAILED;
5610
5749
  if (peg$silentFails === 0) {
5611
- peg$fail(peg$e85);
5750
+ peg$fail(peg$e91);
5612
5751
  }
5613
5752
  }
5614
5753
  if (s1 !== peg$FAILED) {
@@ -5620,7 +5759,7 @@ function peg$parse(input, options) {
5620
5759
  } else {
5621
5760
  s1 = peg$FAILED;
5622
5761
  if (peg$silentFails === 0) {
5623
- peg$fail(peg$e85);
5762
+ peg$fail(peg$e91);
5624
5763
  }
5625
5764
  }
5626
5765
  }
@@ -5631,7 +5770,7 @@ function peg$parse(input, options) {
5631
5770
  if (s0 === peg$FAILED) {
5632
5771
  s1 = peg$FAILED;
5633
5772
  if (peg$silentFails === 0) {
5634
- peg$fail(peg$e86);
5773
+ peg$fail(peg$e92);
5635
5774
  }
5636
5775
  }
5637
5776
  return s0;
@@ -5639,13 +5778,13 @@ function peg$parse(input, options) {
5639
5778
  function peg$parseNL() {
5640
5779
  var s0, s1;
5641
5780
  peg$silentFails++;
5642
- if (input.substr(peg$currPos, 2) === peg$c68) {
5643
- s0 = peg$c68;
5781
+ if (input.substr(peg$currPos, 2) === peg$c74) {
5782
+ s0 = peg$c74;
5644
5783
  peg$currPos += 2;
5645
5784
  } else {
5646
5785
  s0 = peg$FAILED;
5647
5786
  if (peg$silentFails === 0) {
5648
- peg$fail(peg$e88);
5787
+ peg$fail(peg$e94);
5649
5788
  }
5650
5789
  }
5651
5790
  if (s0 === peg$FAILED) {
@@ -5655,7 +5794,7 @@ function peg$parse(input, options) {
5655
5794
  } else {
5656
5795
  s0 = peg$FAILED;
5657
5796
  if (peg$silentFails === 0) {
5658
- peg$fail(peg$e89);
5797
+ peg$fail(peg$e95);
5659
5798
  }
5660
5799
  }
5661
5800
  }
@@ -5663,7 +5802,7 @@ function peg$parse(input, options) {
5663
5802
  if (s0 === peg$FAILED) {
5664
5803
  s1 = peg$FAILED;
5665
5804
  if (peg$silentFails === 0) {
5666
- peg$fail(peg$e87);
5805
+ peg$fail(peg$e93);
5667
5806
  }
5668
5807
  }
5669
5808
  return s0;
@@ -5976,8 +6115,8 @@ function rhuInt(v) {
5976
6115
  return Math.floor(v + 0.5);
5977
6116
  }
5978
6117
  function rhu(v, decimals = 2) {
5979
- const f = 10 ** decimals;
5980
- return Math.floor(v * f + 0.5) / f;
6118
+ const f2 = 10 ** decimals;
6119
+ return Math.floor(v * f2 + 0.5) / f2;
5981
6120
  }
5982
6121
 
5983
6122
  // src/text/metrics.ts
@@ -9531,6 +9670,98 @@ var timeline = {
9531
9670
  }
9532
9671
  };
9533
9672
 
9673
+ // src/crosslink/render.ts
9674
+ function wavifyPath(points, amplitude, wavelength) {
9675
+ if (points.length < 2) {
9676
+ return points.map((p, i) => `${i === 0 ? "M" : "L"} ${p.x} ${p.y}`).join(" ");
9677
+ }
9678
+ const sampleInterval = wavelength / 4;
9679
+ const arcLen = [0];
9680
+ for (let i = 1; i < points.length; i++) {
9681
+ const a = points[i - 1], b = points[i];
9682
+ const dx = b.x - a.x, dy = b.y - a.y;
9683
+ arcLen.push(arcLen[i - 1] + Math.sqrt(dx * dx + dy * dy));
9684
+ }
9685
+ const totalLen = arcLen[arcLen.length - 1];
9686
+ if (totalLen < 1) {
9687
+ return `M ${points[0].x} ${points[0].y}`;
9688
+ }
9689
+ const sampleCount = Math.max(2, Math.ceil(totalLen / sampleInterval) + 1);
9690
+ const samples = [];
9691
+ const sampleArcLens = [];
9692
+ function polylineAt(s) {
9693
+ s = Math.max(0, Math.min(s, totalLen));
9694
+ for (let i = 1; i < points.length; i++) {
9695
+ if (arcLen[i] >= s - 1e-9) {
9696
+ const segStart = arcLen[i - 1];
9697
+ const segEnd = arcLen[i];
9698
+ const segLen = segEnd - segStart;
9699
+ const t = segLen < 1e-9 ? 0 : (s - segStart) / segLen;
9700
+ const a = points[i - 1], b = points[i];
9701
+ const pt = { x: a.x + t * (b.x - a.x), y: a.y + t * (b.y - a.y) };
9702
+ const dx2 = b.x - a.x, dy2 = b.y - a.y;
9703
+ const len2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);
9704
+ const tx = len2 > 1e-9 ? dx2 / len2 : 1;
9705
+ const ty = len2 > 1e-9 ? dy2 / len2 : 0;
9706
+ return { pt, tangentX: tx, tangentY: ty };
9707
+ }
9708
+ }
9709
+ const last = points[points.length - 1], prev = points[points.length - 2];
9710
+ const dx = last.x - prev.x, dy = last.y - prev.y;
9711
+ const len = Math.sqrt(dx * dx + dy * dy);
9712
+ return { pt: last, tangentX: len > 1e-9 ? dx / len : 1, tangentY: len > 1e-9 ? dy / len : 0 };
9713
+ }
9714
+ const cornerArcLens = [];
9715
+ for (let i = 1; i < points.length - 1; i++) {
9716
+ const a = points[i - 1], b = points[i], c = points[i + 1];
9717
+ const d1x = b.x - a.x, d1y = b.y - a.y;
9718
+ const d2x = c.x - b.x, d2y = c.y - b.y;
9719
+ const len1 = Math.sqrt(d1x * d1x + d1y * d1y);
9720
+ const len2 = Math.sqrt(d2x * d2x + d2y * d2y);
9721
+ if (len1 < 1e-9 || len2 < 1e-9) continue;
9722
+ const dot = d1x / len1 * (d2x / len2) + d1y / len1 * (d2y / len2);
9723
+ if (dot < 0.7) {
9724
+ cornerArcLens.push(arcLen[i]);
9725
+ }
9726
+ }
9727
+ function cornerAmplitudeFactor(s) {
9728
+ let minDist = Infinity;
9729
+ for (const cs of cornerArcLens) {
9730
+ minDist = Math.min(minDist, Math.abs(s - cs));
9731
+ }
9732
+ if (minDist >= wavelength) return 1;
9733
+ return minDist / wavelength;
9734
+ }
9735
+ for (let k = 0; k < sampleCount; k++) {
9736
+ const s = k / (sampleCount - 1) * totalLen;
9737
+ const { pt, tangentX, tangentY } = polylineAt(s);
9738
+ const nx = -tangentY;
9739
+ const ny = tangentX;
9740
+ const phase = 2 * Math.PI * s / wavelength;
9741
+ const cornerFactor = cornerAmplitudeFactor(s);
9742
+ const displacement = amplitude * cornerFactor * Math.sin(phase);
9743
+ samples.push({ x: pt.x + nx * displacement, y: pt.y + ny * displacement });
9744
+ sampleArcLens.push(s);
9745
+ }
9746
+ const tension = 0.5;
9747
+ let d = `M ${f(samples[0].x)} ${f(samples[0].y)}`;
9748
+ for (let i = 1; i < samples.length; i++) {
9749
+ const p0 = samples[Math.max(0, i - 2)];
9750
+ const p1 = samples[i - 1];
9751
+ const p2 = samples[i];
9752
+ const p3 = samples[Math.min(samples.length - 1, i + 1)];
9753
+ const cp1x = p1.x + (p2.x - p0.x) * tension / 3;
9754
+ const cp1y = p1.y + (p2.y - p0.y) * tension / 3;
9755
+ const cp2x = p2.x - (p3.x - p1.x) * tension / 3;
9756
+ const cp2y = p2.y - (p3.y - p1.y) * tension / 3;
9757
+ d += ` C ${f(cp1x)} ${f(cp1y)} ${f(cp2x)} ${f(cp2y)} ${f(p2.x)} ${f(p2.y)}`;
9758
+ }
9759
+ return d;
9760
+ }
9761
+ function f(n) {
9762
+ return Math.round(n * 100) / 100 + "";
9763
+ }
9764
+
9534
9765
  // src/crosslink/engine3.ts
9535
9766
  var W_CROSS = 1e4;
9536
9767
  var W_INTER = 3e3;
@@ -9598,7 +9829,7 @@ function routeAndRenderCrossLinks3(links2, theme, anchors, intraPorts, occupiedR
9598
9829
  explicitColorIdx++;
9599
9830
  }
9600
9831
  const dash = edgeStyleToDash(link.style);
9601
- const animation = link.animation === "none" ? void 0 : isRenderedConnectorAnimation(link.animation) ? link.animation : dash ? "march" : void 0;
9832
+ const animation = link.animation === "none" ? void 0 : isRenderedConnectorAnimation(link.animation) ? link.animation : void 0;
9602
9833
  let markerEnd;
9603
9834
  let markerStart;
9604
9835
  if (link.direction === "directed") {
@@ -9607,12 +9838,18 @@ function routeAndRenderCrossLinks3(links2, theme, anchors, intraPorts, occupiedR
9607
9838
  markerEnd = ARROW_ID;
9608
9839
  markerStart = BI_ARROW_ID;
9609
9840
  }
9841
+ const strokeWidth = link.style === "thick" ? (edgeTheme.strokeWidth + 0.5) * 2 : void 0;
9842
+ const isWavy = link.style === "wavy";
9843
+ const wavyAmp = link.props?.amplitude ?? 3;
9844
+ const wavyLambda = link.props?.wavelength ?? 12;
9610
9845
  const origIdx = links2.indexOf(link);
9611
9846
  workingByOriginalIdx.set(origIdx >= 0 ? origIdx : workingByOriginalIdx.size, {
9612
9847
  points: [...best.rawPts],
9613
9848
  ...best.committed.isBezier ? { isBezier: true } : {},
9614
9849
  color,
9615
9850
  ...dash ? { dash } : {},
9851
+ ...strokeWidth ? { strokeWidth } : {},
9852
+ ...isWavy ? { isWavy: true, wavyAmplitude: wavyAmp, wavyWavelength: wavyLambda } : {},
9616
9853
  ...animation ? { animation } : {},
9617
9854
  ...markerEnd ? { markerEnd } : {},
9618
9855
  ...markerStart ? { markerStart } : {},
@@ -9662,14 +9899,17 @@ function routeAndRenderCrossLinks3(links2, theme, anchors, intraPorts, occupiedR
9662
9899
  const pendingLabels = [];
9663
9900
  for (let i = 0; i < workingRoutes.length; i++) {
9664
9901
  const wr = workingRoutes[i];
9665
- const path = wr.isBezier ? `M ${wr.points[0].x} ${wr.points[0].y} C ${wr.points[1].x} ${wr.points[1].y} ${wr.points[2].x} ${wr.points[2].y} ${wr.points[3].x} ${wr.points[3].y}` : wr.points.map((p, pi) => `${pi === 0 ? "M" : "L"} ${p.x} ${p.y}`).join(" ");
9902
+ let path = wr.isBezier ? `M ${wr.points[0].x} ${wr.points[0].y} C ${wr.points[1].x} ${wr.points[1].y} ${wr.points[2].x} ${wr.points[2].y} ${wr.points[3].x} ${wr.points[3].y}` : wr.points.map((p, pi) => `${pi === 0 ? "M" : "L"} ${p.x} ${p.y}`).join(" ");
9903
+ if (wr.isWavy) {
9904
+ path = wavifyPath([...wr.points], wr.wavyAmplitude ?? 3, wr.wavyWavelength ?? 12);
9905
+ }
9666
9906
  if (wr.markerEnd === ARROW_ID) needsArrow = true;
9667
9907
  if (wr.markerStart === BI_ARROW_ID) needsBiArrow = true;
9668
9908
  elements.push({
9669
9909
  type: "path",
9670
9910
  d: path,
9671
9911
  stroke: wr.color,
9672
- strokeWidth: edgeTheme.strokeWidth + 0.5,
9912
+ strokeWidth: wr.strokeWidth ?? edgeTheme.strokeWidth + 0.5,
9673
9913
  ...wr.dash ? { strokeDasharray: wr.dash } : {},
9674
9914
  ...wr.animation ? { animated: wr.animation } : {},
9675
9915
  ...wr.markerEnd ? { markerEnd: wr.markerEnd } : {},
@@ -10211,8 +10451,8 @@ function labelAnchor(pts) {
10211
10451
  return hMid ?? anyMid;
10212
10452
  }
10213
10453
  function edgeStyleToDash(style) {
10454
+ if (style === "dotted") return "4 3";
10214
10455
  if (style === "dashed") return "8 4";
10215
- if (style === "dotted") return "3 4";
10216
10456
  return void 0;
10217
10457
  }
10218
10458
  function nudgeOffBorders(routes, borders) {
@@ -11090,6 +11330,14 @@ function layoutPoster(ir, theme) {
11090
11330
  for (const op of result.occupiedPorts ?? []) {
11091
11331
  allOccupiedPorts.push({ ...op, nodeKey: `${cellId}.${op.nodeKey}` });
11092
11332
  }
11333
+ for (const cr of result.chromeRects ?? []) {
11334
+ textOccupied.push({
11335
+ x: cr.x * scale + offsetX,
11336
+ y: cr.y * scale + offsetY,
11337
+ width: cr.width * scale,
11338
+ height: cr.height * scale
11339
+ });
11340
+ }
11093
11341
  }
11094
11342
  const totalW = padding * 2 + sumWithGaps(colWidths, 0, grid.columns, gap) - gap;
11095
11343
  const totalH = padding * 2 + headerH + sumWithGaps(rowHeights, 0, numRows, gap) - gap;
@@ -11576,26 +11824,45 @@ function peg$parse3(input, options) {
11576
11824
  var peg$c16 = "text";
11577
11825
  var peg$c17 = "link";
11578
11826
  var peg$c18 = "@";
11579
- var peg$c19 = ":";
11580
- var peg$c20 = "straight";
11581
- var peg$c21 = "orthogonal";
11582
- var peg$c22 = "bezier";
11583
- var peg$c23 = "polyline";
11584
- var peg$c24 = "{";
11585
- var peg$c25 = ",";
11586
- var peg$c26 = "}";
11587
- var peg$c27 = ".";
11588
- var peg$c28 = "<-->";
11589
- var peg$c29 = "<-.->";
11590
- var peg$c30 = "<..>";
11591
- var peg$c31 = "-->";
11592
- var peg$c32 = "-.->";
11593
- var peg$c33 = "..>";
11594
- var peg$c34 = "-.-";
11595
- var peg$c35 = "...";
11596
- var peg$c36 = '"';
11597
- var peg$c37 = "%%";
11598
- var peg$c38 = "\r\n";
11827
+ var peg$c19 = "anim:";
11828
+ var peg$c20 = ":";
11829
+ var peg$c21 = "march";
11830
+ var peg$c22 = "particle";
11831
+ var peg$c23 = "draw";
11832
+ var peg$c24 = "pulse";
11833
+ var peg$c25 = "glow";
11834
+ var peg$c26 = "comet";
11835
+ var peg$c27 = "stream";
11836
+ var peg$c28 = "colorcycle";
11837
+ var peg$c29 = "none";
11838
+ var peg$c30 = "straight";
11839
+ var peg$c31 = "orthogonal";
11840
+ var peg$c32 = "bezier";
11841
+ var peg$c33 = "polyline";
11842
+ var peg$c34 = "{";
11843
+ var peg$c35 = ",";
11844
+ var peg$c36 = "}";
11845
+ var peg$c37 = ".";
11846
+ var peg$c38 = "<-~->";
11847
+ var peg$c39 = "<-_->";
11848
+ var peg$c40 = "<-.->";
11849
+ var peg$c41 = "<==>";
11850
+ var peg$c42 = "<-->";
11851
+ var peg$c43 = "-~->";
11852
+ var peg$c44 = "-_->";
11853
+ var peg$c45 = "-..->";
11854
+ var peg$c46 = "-.->";
11855
+ var peg$c47 = "===>";
11856
+ var peg$c48 = "==>";
11857
+ var peg$c49 = "--->";
11858
+ var peg$c50 = "-->";
11859
+ var peg$c51 = "-~-";
11860
+ var peg$c52 = "-_-";
11861
+ var peg$c53 = "-.-";
11862
+ var peg$c54 = "===";
11863
+ var peg$c55 = '"';
11864
+ var peg$c56 = "%%";
11865
+ var peg$c57 = "\r\n";
11599
11866
  var peg$r0 = /^[^\n]/;
11600
11867
  var peg$r1 = /^[ENSW]/;
11601
11868
  var peg$r2 = /^[0-9]/;
@@ -11625,35 +11892,54 @@ function peg$parse3(input, options) {
11625
11892
  var peg$e17 = peg$literalExpectation("text", false);
11626
11893
  var peg$e18 = peg$literalExpectation("link", false);
11627
11894
  var peg$e19 = peg$literalExpectation("@", false);
11628
- var peg$e20 = peg$literalExpectation(":", false);
11629
- var peg$e21 = peg$literalExpectation("straight", false);
11630
- var peg$e22 = peg$literalExpectation("orthogonal", false);
11631
- var peg$e23 = peg$literalExpectation("bezier", false);
11632
- var peg$e24 = peg$literalExpectation("polyline", false);
11633
- var peg$e25 = peg$classExpectation(["E", "N", "S", "W"], false, false);
11634
- var peg$e26 = peg$literalExpectation("{", false);
11635
- var peg$e27 = peg$literalExpectation(",", false);
11636
- var peg$e28 = peg$literalExpectation("}", false);
11637
- var peg$e29 = peg$classExpectation([["0", "9"]], false, false);
11638
- var peg$e30 = peg$literalExpectation(".", false);
11639
- var peg$e31 = peg$literalExpectation("<-->", false);
11640
- var peg$e32 = peg$literalExpectation("<-.->", false);
11641
- var peg$e33 = peg$literalExpectation("<..>", false);
11642
- var peg$e34 = peg$literalExpectation("-->", false);
11643
- var peg$e35 = peg$literalExpectation("-.->", false);
11644
- var peg$e36 = peg$literalExpectation("..>", false);
11645
- var peg$e37 = peg$literalExpectation("-.-", false);
11646
- var peg$e38 = peg$literalExpectation("...", false);
11647
- var peg$e39 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false);
11648
- var peg$e40 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false);
11649
- var peg$e41 = peg$anyExpectation();
11650
- var peg$e42 = peg$literalExpectation('"', false);
11651
- var peg$e43 = peg$classExpectation(['"'], true, false);
11652
- var peg$e44 = peg$classExpectation(["+", "-"], false, false);
11653
- var peg$e45 = peg$literalExpectation("%%", false);
11654
- var peg$e46 = peg$classExpectation([" ", " "], false, false);
11655
- var peg$e47 = peg$literalExpectation("\r\n", false);
11656
- var peg$e48 = peg$classExpectation(["\n", "\r"], false, false);
11895
+ var peg$e20 = peg$literalExpectation("anim:", false);
11896
+ var peg$e21 = peg$literalExpectation(":", false);
11897
+ var peg$e22 = peg$literalExpectation("march", false);
11898
+ var peg$e23 = peg$literalExpectation("particle", false);
11899
+ var peg$e24 = peg$literalExpectation("draw", false);
11900
+ var peg$e25 = peg$literalExpectation("pulse", false);
11901
+ var peg$e26 = peg$literalExpectation("glow", false);
11902
+ var peg$e27 = peg$literalExpectation("comet", false);
11903
+ var peg$e28 = peg$literalExpectation("stream", false);
11904
+ var peg$e29 = peg$literalExpectation("colorcycle", false);
11905
+ var peg$e30 = peg$literalExpectation("none", false);
11906
+ var peg$e31 = peg$literalExpectation("straight", false);
11907
+ var peg$e32 = peg$literalExpectation("orthogonal", false);
11908
+ var peg$e33 = peg$literalExpectation("bezier", false);
11909
+ var peg$e34 = peg$literalExpectation("polyline", false);
11910
+ var peg$e35 = peg$classExpectation(["E", "N", "S", "W"], false, false);
11911
+ var peg$e36 = peg$literalExpectation("{", false);
11912
+ var peg$e37 = peg$literalExpectation(",", false);
11913
+ var peg$e38 = peg$literalExpectation("}", false);
11914
+ var peg$e39 = peg$classExpectation([["0", "9"]], false, false);
11915
+ var peg$e40 = peg$literalExpectation(".", false);
11916
+ var peg$e41 = peg$literalExpectation("<-~->", false);
11917
+ var peg$e42 = peg$literalExpectation("<-_->", false);
11918
+ var peg$e43 = peg$literalExpectation("<-.->", false);
11919
+ var peg$e44 = peg$literalExpectation("<==>", false);
11920
+ var peg$e45 = peg$literalExpectation("<-->", false);
11921
+ var peg$e46 = peg$literalExpectation("-~->", false);
11922
+ var peg$e47 = peg$literalExpectation("-_->", false);
11923
+ var peg$e48 = peg$literalExpectation("-..->", false);
11924
+ var peg$e49 = peg$literalExpectation("-.->", false);
11925
+ var peg$e50 = peg$literalExpectation("===>", false);
11926
+ var peg$e51 = peg$literalExpectation("==>", false);
11927
+ var peg$e52 = peg$literalExpectation("--->", false);
11928
+ var peg$e53 = peg$literalExpectation("-->", false);
11929
+ var peg$e54 = peg$literalExpectation("-~-", false);
11930
+ var peg$e55 = peg$literalExpectation("-_-", false);
11931
+ var peg$e56 = peg$literalExpectation("-.-", false);
11932
+ var peg$e57 = peg$literalExpectation("===", false);
11933
+ var peg$e58 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false);
11934
+ var peg$e59 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false);
11935
+ var peg$e60 = peg$anyExpectation();
11936
+ var peg$e61 = peg$literalExpectation('"', false);
11937
+ var peg$e62 = peg$classExpectation(['"'], true, false);
11938
+ var peg$e63 = peg$classExpectation(["+", "-"], false, false);
11939
+ var peg$e64 = peg$literalExpectation("%%", false);
11940
+ var peg$e65 = peg$classExpectation([" ", " "], false, false);
11941
+ var peg$e66 = peg$literalExpectation("\r\n", false);
11942
+ var peg$e67 = peg$classExpectation(["\n", "\r"], false, false);
11657
11943
  var peg$f0 = function(frontmatter, header, directives, body) {
11658
11944
  const columns = (directives.find((d) => d.key === "columns") || {}).value || 2;
11659
11945
  return {
@@ -11712,9 +11998,8 @@ function peg$parse3(input, options) {
11712
11998
  var peg$f14 = function(cols) {
11713
11999
  return { colSpan: cols, rowSpan: 1 };
11714
12000
  };
11715
- var peg$f15 = function(from, arrow, to, label, ann, block2) {
12001
+ var peg$f15 = function(from, arrow, to, label, anns, block2) {
11716
12002
  const result = {};
11717
- if (ann) Object.assign(result, ann[2]);
11718
12003
  if (block2) {
11719
12004
  const b = block2[1];
11720
12005
  if (b.route) {
@@ -11735,37 +12020,49 @@ function peg$parse3(input, options) {
11735
12020
  }
11736
12021
  if (Object.keys(b).length > 0) result.props = b;
11737
12022
  }
12023
+ for (const ann of anns) {
12024
+ Object.assign(result, ann[2]);
12025
+ }
11738
12026
  addLink(from, arrow, to, label ? label[1] : null, Object.keys(result).length > 0 ? result : null);
11739
12027
  return { type: "link" };
11740
12028
  };
11741
- var peg$f16 = function(route, walls) {
12029
+ var peg$f16 = function(value) {
12030
+ return { animation: value };
12031
+ };
12032
+ var peg$f17 = function(route, walls) {
11742
12033
  return { routing: route, ...walls ? walls[1] : {} };
11743
12034
  };
11744
- var peg$f17 = function(walls) {
12035
+ var peg$f18 = function(walls) {
11745
12036
  return walls;
11746
12037
  };
11747
- var peg$f18 = function() {
12038
+ var peg$f19 = function(route, walls) {
12039
+ return { routing: route, ...walls ? walls[1] : {} };
12040
+ };
12041
+ var peg$f20 = function(walls) {
12042
+ return walls;
12043
+ };
12044
+ var peg$f21 = function() {
11748
12045
  return "straight";
11749
12046
  };
11750
- var peg$f19 = function() {
12047
+ var peg$f22 = function() {
11751
12048
  return "orthogonal";
11752
12049
  };
11753
- var peg$f20 = function() {
12050
+ var peg$f23 = function() {
11754
12051
  return "bezier";
11755
12052
  };
11756
- var peg$f21 = function() {
12053
+ var peg$f24 = function() {
11757
12054
  return "polyline";
11758
12055
  };
11759
- var peg$f22 = function(exit, entry) {
12056
+ var peg$f25 = function(exit, entry) {
11760
12057
  return { exitWall: exit, entryWall: entry };
11761
12058
  };
11762
- var peg$f23 = function(exit) {
12059
+ var peg$f26 = function(exit) {
11763
12060
  return { exitWall: exit };
11764
12061
  };
11765
- var peg$f24 = function(w) {
12062
+ var peg$f27 = function(w) {
11766
12063
  return w;
11767
12064
  };
11768
- var peg$f25 = function(first, rest) {
12065
+ var peg$f28 = function(first, rest) {
11769
12066
  const result = {};
11770
12067
  result[first.key] = first.value;
11771
12068
  for (const r of rest) {
@@ -11773,61 +12070,88 @@ function peg$parse3(input, options) {
11773
12070
  }
11774
12071
  return result;
11775
12072
  };
11776
- var peg$f26 = function(key, value) {
12073
+ var peg$f29 = function(key, value) {
11777
12074
  return { key, value };
11778
12075
  };
11779
- var peg$f27 = function(num) {
12076
+ var peg$f30 = function(num) {
11780
12077
  return parseFloat(num);
11781
12078
  };
11782
- var peg$f28 = function() {
11783
- return { direction: "bidirectional", style: "solid" };
12079
+ var peg$f31 = function() {
12080
+ return { direction: "bidirectional", style: "wavy" };
11784
12081
  };
11785
- var peg$f29 = function() {
12082
+ var peg$f32 = function() {
11786
12083
  return { direction: "bidirectional", style: "dashed" };
11787
12084
  };
11788
- var peg$f30 = function() {
12085
+ var peg$f33 = function() {
11789
12086
  return { direction: "bidirectional", style: "dotted" };
11790
12087
  };
11791
- var peg$f31 = function() {
11792
- return { direction: "directed", style: "solid" };
12088
+ var peg$f34 = function() {
12089
+ return { direction: "bidirectional", style: "thick" };
11793
12090
  };
11794
- var peg$f32 = function() {
12091
+ var peg$f35 = function() {
12092
+ return { direction: "bidirectional", style: "solid" };
12093
+ };
12094
+ var peg$f36 = function() {
12095
+ return { direction: "directed", style: "wavy" };
12096
+ };
12097
+ var peg$f37 = function() {
11795
12098
  return { direction: "directed", style: "dashed" };
11796
12099
  };
11797
- var peg$f33 = function() {
12100
+ var peg$f38 = function() {
11798
12101
  return { direction: "directed", style: "dotted" };
11799
12102
  };
11800
- var peg$f34 = function() {
11801
- return { direction: "undirected", style: "solid" };
12103
+ var peg$f39 = function() {
12104
+ return { direction: "directed", style: "dotted" };
11802
12105
  };
11803
- var peg$f35 = function() {
12106
+ var peg$f40 = function() {
12107
+ return { direction: "directed", style: "thick" };
12108
+ };
12109
+ var peg$f41 = function() {
12110
+ return { direction: "directed", style: "thick" };
12111
+ };
12112
+ var peg$f42 = function() {
12113
+ return { direction: "directed", style: "solid" };
12114
+ };
12115
+ var peg$f43 = function() {
12116
+ return { direction: "directed", style: "solid" };
12117
+ };
12118
+ var peg$f44 = function() {
12119
+ return { direction: "undirected", style: "wavy" };
12120
+ };
12121
+ var peg$f45 = function() {
11804
12122
  return { direction: "undirected", style: "dashed" };
11805
12123
  };
11806
- var peg$f36 = function() {
12124
+ var peg$f46 = function() {
11807
12125
  return { direction: "undirected", style: "dotted" };
11808
12126
  };
11809
- var peg$f37 = function(cell, index) {
12127
+ var peg$f47 = function() {
12128
+ return { direction: "undirected", style: "thick" };
12129
+ };
12130
+ var peg$f48 = function() {
12131
+ return { direction: "undirected", style: "solid" };
12132
+ };
12133
+ var peg$f49 = function(cell, index) {
11810
12134
  return { cellPath: [cell], nodeId: "", elementIndex: index };
11811
12135
  };
11812
- var peg$f38 = function(cell, node) {
12136
+ var peg$f50 = function(cell, node) {
11813
12137
  return { cellPath: [cell], nodeId: node };
11814
12138
  };
11815
- var peg$f39 = function(line) {
12139
+ var peg$f51 = function(line) {
11816
12140
  return line;
11817
12141
  };
11818
- var peg$f40 = function(lines2) {
12142
+ var peg$f52 = function(lines2) {
11819
12143
  return lines2.join("\n");
11820
12144
  };
11821
- var peg$f41 = function(text2) {
12145
+ var peg$f53 = function(text2) {
11822
12146
  return text2;
11823
12147
  };
11824
- var peg$f42 = function(digits) {
12148
+ var peg$f54 = function(digits) {
11825
12149
  return parseInt(digits, 10);
11826
12150
  };
11827
- var peg$f43 = function(sign, digits) {
12151
+ var peg$f55 = function(sign, digits) {
11828
12152
  return parseInt((sign || "") + digits, 10);
11829
12153
  };
11830
- var peg$f44 = function() {
12154
+ var peg$f56 = function() {
11831
12155
  return null;
11832
12156
  };
11833
12157
  var peg$currPos = options.peg$currPos | 0;
@@ -12701,7 +13025,7 @@ function peg$parse3(input, options) {
12701
13025
  return s0;
12702
13026
  }
12703
13027
  function peg$parseLinkDecl() {
12704
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
13028
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14;
12705
13029
  s0 = peg$currPos;
12706
13030
  s1 = peg$parse_();
12707
13031
  if (input.substr(peg$currPos, 4) === peg$c17) {
@@ -12739,32 +13063,57 @@ function peg$parse3(input, options) {
12739
13063
  if (s9 === peg$FAILED) {
12740
13064
  s9 = null;
12741
13065
  }
12742
- s10 = peg$currPos;
12743
- s11 = peg$parse_();
13066
+ s10 = [];
13067
+ s11 = peg$currPos;
13068
+ s12 = peg$parse_();
12744
13069
  if (input.charCodeAt(peg$currPos) === 64) {
12745
- s12 = peg$c18;
13070
+ s13 = peg$c18;
12746
13071
  peg$currPos++;
12747
13072
  } else {
12748
- s12 = peg$FAILED;
13073
+ s13 = peg$FAILED;
12749
13074
  if (peg$silentFails === 0) {
12750
13075
  peg$fail(peg$e19);
12751
13076
  }
12752
13077
  }
12753
- if (s12 !== peg$FAILED) {
12754
- s13 = peg$parseRouteAnnotation();
12755
- if (s13 !== peg$FAILED) {
12756
- s11 = [s11, s12, s13];
12757
- s10 = s11;
13078
+ if (s13 !== peg$FAILED) {
13079
+ s14 = peg$parseAnnotation();
13080
+ if (s14 !== peg$FAILED) {
13081
+ s12 = [s12, s13, s14];
13082
+ s11 = s12;
12758
13083
  } else {
12759
- peg$currPos = s10;
12760
- s10 = peg$FAILED;
13084
+ peg$currPos = s11;
13085
+ s11 = peg$FAILED;
12761
13086
  }
12762
13087
  } else {
12763
- peg$currPos = s10;
12764
- s10 = peg$FAILED;
13088
+ peg$currPos = s11;
13089
+ s11 = peg$FAILED;
12765
13090
  }
12766
- if (s10 === peg$FAILED) {
12767
- s10 = null;
13091
+ while (s11 !== peg$FAILED) {
13092
+ s10.push(s11);
13093
+ s11 = peg$currPos;
13094
+ s12 = peg$parse_();
13095
+ if (input.charCodeAt(peg$currPos) === 64) {
13096
+ s13 = peg$c18;
13097
+ peg$currPos++;
13098
+ } else {
13099
+ s13 = peg$FAILED;
13100
+ if (peg$silentFails === 0) {
13101
+ peg$fail(peg$e19);
13102
+ }
13103
+ }
13104
+ if (s13 !== peg$FAILED) {
13105
+ s14 = peg$parseAnnotation();
13106
+ if (s14 !== peg$FAILED) {
13107
+ s12 = [s12, s13, s14];
13108
+ s11 = s12;
13109
+ } else {
13110
+ peg$currPos = s11;
13111
+ s11 = peg$FAILED;
13112
+ }
13113
+ } else {
13114
+ peg$currPos = s11;
13115
+ s11 = peg$FAILED;
13116
+ }
12768
13117
  }
12769
13118
  s11 = peg$currPos;
12770
13119
  s12 = peg$parse_();
@@ -12818,6 +13167,191 @@ function peg$parse3(input, options) {
12818
13167
  }
12819
13168
  return s0;
12820
13169
  }
13170
+ function peg$parseAnnotation() {
13171
+ var s0, s1, s2, s3, s4;
13172
+ s0 = peg$currPos;
13173
+ if (input.substr(peg$currPos, 5) === peg$c19) {
13174
+ s1 = peg$c19;
13175
+ peg$currPos += 5;
13176
+ } else {
13177
+ s1 = peg$FAILED;
13178
+ if (peg$silentFails === 0) {
13179
+ peg$fail(peg$e20);
13180
+ }
13181
+ }
13182
+ if (s1 !== peg$FAILED) {
13183
+ s2 = peg$parseAnimValue();
13184
+ if (s2 !== peg$FAILED) {
13185
+ peg$savedPos = s0;
13186
+ s0 = peg$f16(s2);
13187
+ } else {
13188
+ peg$currPos = s0;
13189
+ s0 = peg$FAILED;
13190
+ }
13191
+ } else {
13192
+ peg$currPos = s0;
13193
+ s0 = peg$FAILED;
13194
+ }
13195
+ if (s0 === peg$FAILED) {
13196
+ s0 = peg$currPos;
13197
+ s1 = peg$parseRouteWord();
13198
+ if (s1 !== peg$FAILED) {
13199
+ s2 = peg$currPos;
13200
+ if (input.charCodeAt(peg$currPos) === 58) {
13201
+ s3 = peg$c20;
13202
+ peg$currPos++;
13203
+ } else {
13204
+ s3 = peg$FAILED;
13205
+ if (peg$silentFails === 0) {
13206
+ peg$fail(peg$e21);
13207
+ }
13208
+ }
13209
+ if (s3 !== peg$FAILED) {
13210
+ s4 = peg$parseWallPair();
13211
+ if (s4 !== peg$FAILED) {
13212
+ s3 = [s3, s4];
13213
+ s2 = s3;
13214
+ } else {
13215
+ peg$currPos = s2;
13216
+ s2 = peg$FAILED;
13217
+ }
13218
+ } else {
13219
+ peg$currPos = s2;
13220
+ s2 = peg$FAILED;
13221
+ }
13222
+ if (s2 === peg$FAILED) {
13223
+ s2 = null;
13224
+ }
13225
+ peg$savedPos = s0;
13226
+ s0 = peg$f17(s1, s2);
13227
+ } else {
13228
+ peg$currPos = s0;
13229
+ s0 = peg$FAILED;
13230
+ }
13231
+ if (s0 === peg$FAILED) {
13232
+ s0 = peg$currPos;
13233
+ s1 = peg$parseWallPair();
13234
+ if (s1 !== peg$FAILED) {
13235
+ peg$savedPos = s0;
13236
+ s1 = peg$f18(s1);
13237
+ }
13238
+ s0 = s1;
13239
+ }
13240
+ }
13241
+ return s0;
13242
+ }
13243
+ function peg$parseAnimValue() {
13244
+ var s0;
13245
+ if (input.substr(peg$currPos, 5) === peg$c21) {
13246
+ s0 = peg$c21;
13247
+ peg$currPos += 5;
13248
+ } else {
13249
+ s0 = peg$FAILED;
13250
+ if (peg$silentFails === 0) {
13251
+ peg$fail(peg$e22);
13252
+ }
13253
+ }
13254
+ if (s0 === peg$FAILED) {
13255
+ if (input.substr(peg$currPos, 8) === peg$c22) {
13256
+ s0 = peg$c22;
13257
+ peg$currPos += 8;
13258
+ } else {
13259
+ s0 = peg$FAILED;
13260
+ if (peg$silentFails === 0) {
13261
+ peg$fail(peg$e23);
13262
+ }
13263
+ }
13264
+ if (s0 === peg$FAILED) {
13265
+ if (input.substr(peg$currPos, 4) === peg$c23) {
13266
+ s0 = peg$c23;
13267
+ peg$currPos += 4;
13268
+ } else {
13269
+ s0 = peg$FAILED;
13270
+ if (peg$silentFails === 0) {
13271
+ peg$fail(peg$e24);
13272
+ }
13273
+ }
13274
+ if (s0 === peg$FAILED) {
13275
+ if (input.substr(peg$currPos, 5) === peg$c24) {
13276
+ s0 = peg$c24;
13277
+ peg$currPos += 5;
13278
+ } else {
13279
+ s0 = peg$FAILED;
13280
+ if (peg$silentFails === 0) {
13281
+ peg$fail(peg$e25);
13282
+ }
13283
+ }
13284
+ if (s0 === peg$FAILED) {
13285
+ if (input.substr(peg$currPos, 4) === peg$c25) {
13286
+ s0 = peg$c25;
13287
+ peg$currPos += 4;
13288
+ } else {
13289
+ s0 = peg$FAILED;
13290
+ if (peg$silentFails === 0) {
13291
+ peg$fail(peg$e26);
13292
+ }
13293
+ }
13294
+ if (s0 === peg$FAILED) {
13295
+ if (input.substr(peg$currPos, 5) === peg$c26) {
13296
+ s0 = peg$c26;
13297
+ peg$currPos += 5;
13298
+ } else {
13299
+ s0 = peg$FAILED;
13300
+ if (peg$silentFails === 0) {
13301
+ peg$fail(peg$e27);
13302
+ }
13303
+ }
13304
+ if (s0 === peg$FAILED) {
13305
+ if (input.substr(peg$currPos, 6) === peg$c27) {
13306
+ s0 = peg$c27;
13307
+ peg$currPos += 6;
13308
+ } else {
13309
+ s0 = peg$FAILED;
13310
+ if (peg$silentFails === 0) {
13311
+ peg$fail(peg$e28);
13312
+ }
13313
+ }
13314
+ if (s0 === peg$FAILED) {
13315
+ if (input.substr(peg$currPos, 4) === peg$c13) {
13316
+ s0 = peg$c13;
13317
+ peg$currPos += 4;
13318
+ } else {
13319
+ s0 = peg$FAILED;
13320
+ if (peg$silentFails === 0) {
13321
+ peg$fail(peg$e14);
13322
+ }
13323
+ }
13324
+ if (s0 === peg$FAILED) {
13325
+ if (input.substr(peg$currPos, 10) === peg$c28) {
13326
+ s0 = peg$c28;
13327
+ peg$currPos += 10;
13328
+ } else {
13329
+ s0 = peg$FAILED;
13330
+ if (peg$silentFails === 0) {
13331
+ peg$fail(peg$e29);
13332
+ }
13333
+ }
13334
+ if (s0 === peg$FAILED) {
13335
+ if (input.substr(peg$currPos, 4) === peg$c29) {
13336
+ s0 = peg$c29;
13337
+ peg$currPos += 4;
13338
+ } else {
13339
+ s0 = peg$FAILED;
13340
+ if (peg$silentFails === 0) {
13341
+ peg$fail(peg$e30);
13342
+ }
13343
+ }
13344
+ }
13345
+ }
13346
+ }
13347
+ }
13348
+ }
13349
+ }
13350
+ }
13351
+ }
13352
+ }
13353
+ return s0;
13354
+ }
12821
13355
  function peg$parseRouteAnnotation() {
12822
13356
  var s0, s1, s2, s3, s4;
12823
13357
  s0 = peg$currPos;
@@ -12825,12 +13359,12 @@ function peg$parse3(input, options) {
12825
13359
  if (s1 !== peg$FAILED) {
12826
13360
  s2 = peg$currPos;
12827
13361
  if (input.charCodeAt(peg$currPos) === 58) {
12828
- s3 = peg$c19;
13362
+ s3 = peg$c20;
12829
13363
  peg$currPos++;
12830
13364
  } else {
12831
13365
  s3 = peg$FAILED;
12832
13366
  if (peg$silentFails === 0) {
12833
- peg$fail(peg$e20);
13367
+ peg$fail(peg$e21);
12834
13368
  }
12835
13369
  }
12836
13370
  if (s3 !== peg$FAILED) {
@@ -12850,7 +13384,7 @@ function peg$parse3(input, options) {
12850
13384
  s2 = null;
12851
13385
  }
12852
13386
  peg$savedPos = s0;
12853
- s0 = peg$f16(s1, s2);
13387
+ s0 = peg$f19(s1, s2);
12854
13388
  } else {
12855
13389
  peg$currPos = s0;
12856
13390
  s0 = peg$FAILED;
@@ -12860,7 +13394,7 @@ function peg$parse3(input, options) {
12860
13394
  s1 = peg$parseWallPair();
12861
13395
  if (s1 !== peg$FAILED) {
12862
13396
  peg$savedPos = s0;
12863
- s1 = peg$f17(s1);
13397
+ s1 = peg$f20(s1);
12864
13398
  }
12865
13399
  s0 = s1;
12866
13400
  }
@@ -12869,66 +13403,66 @@ function peg$parse3(input, options) {
12869
13403
  function peg$parseRouteWord() {
12870
13404
  var s0, s1;
12871
13405
  s0 = peg$currPos;
12872
- if (input.substr(peg$currPos, 8) === peg$c20) {
12873
- s1 = peg$c20;
13406
+ if (input.substr(peg$currPos, 8) === peg$c30) {
13407
+ s1 = peg$c30;
12874
13408
  peg$currPos += 8;
12875
13409
  } else {
12876
13410
  s1 = peg$FAILED;
12877
13411
  if (peg$silentFails === 0) {
12878
- peg$fail(peg$e21);
13412
+ peg$fail(peg$e31);
12879
13413
  }
12880
13414
  }
12881
13415
  if (s1 !== peg$FAILED) {
12882
13416
  peg$savedPos = s0;
12883
- s1 = peg$f18();
13417
+ s1 = peg$f21();
12884
13418
  }
12885
13419
  s0 = s1;
12886
13420
  if (s0 === peg$FAILED) {
12887
13421
  s0 = peg$currPos;
12888
- if (input.substr(peg$currPos, 10) === peg$c21) {
12889
- s1 = peg$c21;
13422
+ if (input.substr(peg$currPos, 10) === peg$c31) {
13423
+ s1 = peg$c31;
12890
13424
  peg$currPos += 10;
12891
13425
  } else {
12892
13426
  s1 = peg$FAILED;
12893
13427
  if (peg$silentFails === 0) {
12894
- peg$fail(peg$e22);
13428
+ peg$fail(peg$e32);
12895
13429
  }
12896
13430
  }
12897
13431
  if (s1 !== peg$FAILED) {
12898
13432
  peg$savedPos = s0;
12899
- s1 = peg$f19();
13433
+ s1 = peg$f22();
12900
13434
  }
12901
13435
  s0 = s1;
12902
13436
  if (s0 === peg$FAILED) {
12903
13437
  s0 = peg$currPos;
12904
- if (input.substr(peg$currPos, 6) === peg$c22) {
12905
- s1 = peg$c22;
13438
+ if (input.substr(peg$currPos, 6) === peg$c32) {
13439
+ s1 = peg$c32;
12906
13440
  peg$currPos += 6;
12907
13441
  } else {
12908
13442
  s1 = peg$FAILED;
12909
13443
  if (peg$silentFails === 0) {
12910
- peg$fail(peg$e23);
13444
+ peg$fail(peg$e33);
12911
13445
  }
12912
13446
  }
12913
13447
  if (s1 !== peg$FAILED) {
12914
13448
  peg$savedPos = s0;
12915
- s1 = peg$f20();
13449
+ s1 = peg$f23();
12916
13450
  }
12917
13451
  s0 = s1;
12918
13452
  if (s0 === peg$FAILED) {
12919
13453
  s0 = peg$currPos;
12920
- if (input.substr(peg$currPos, 8) === peg$c23) {
12921
- s1 = peg$c23;
13454
+ if (input.substr(peg$currPos, 8) === peg$c33) {
13455
+ s1 = peg$c33;
12922
13456
  peg$currPos += 8;
12923
13457
  } else {
12924
13458
  s1 = peg$FAILED;
12925
13459
  if (peg$silentFails === 0) {
12926
- peg$fail(peg$e24);
13460
+ peg$fail(peg$e34);
12927
13461
  }
12928
13462
  }
12929
13463
  if (s1 !== peg$FAILED) {
12930
13464
  peg$savedPos = s0;
12931
- s1 = peg$f21();
13465
+ s1 = peg$f24();
12932
13466
  }
12933
13467
  s0 = s1;
12934
13468
  }
@@ -12944,7 +13478,7 @@ function peg$parse3(input, options) {
12944
13478
  s2 = peg$parseWall();
12945
13479
  if (s2 !== peg$FAILED) {
12946
13480
  peg$savedPos = s0;
12947
- s0 = peg$f22(s1, s2);
13481
+ s0 = peg$f25(s1, s2);
12948
13482
  } else {
12949
13483
  peg$currPos = s0;
12950
13484
  s0 = peg$FAILED;
@@ -12958,7 +13492,7 @@ function peg$parse3(input, options) {
12958
13492
  s1 = peg$parseWall();
12959
13493
  if (s1 !== peg$FAILED) {
12960
13494
  peg$savedPos = s0;
12961
- s1 = peg$f23(s1);
13495
+ s1 = peg$f26(s1);
12962
13496
  }
12963
13497
  s0 = s1;
12964
13498
  }
@@ -12973,12 +13507,12 @@ function peg$parse3(input, options) {
12973
13507
  } else {
12974
13508
  s1 = peg$FAILED;
12975
13509
  if (peg$silentFails === 0) {
12976
- peg$fail(peg$e25);
13510
+ peg$fail(peg$e35);
12977
13511
  }
12978
13512
  }
12979
13513
  if (s1 !== peg$FAILED) {
12980
13514
  peg$savedPos = s0;
12981
- s1 = peg$f24(s1);
13515
+ s1 = peg$f27(s1);
12982
13516
  }
12983
13517
  s0 = s1;
12984
13518
  return s0;
@@ -12987,12 +13521,12 @@ function peg$parse3(input, options) {
12987
13521
  var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
12988
13522
  s0 = peg$currPos;
12989
13523
  if (input.charCodeAt(peg$currPos) === 123) {
12990
- s1 = peg$c24;
13524
+ s1 = peg$c34;
12991
13525
  peg$currPos++;
12992
13526
  } else {
12993
13527
  s1 = peg$FAILED;
12994
13528
  if (peg$silentFails === 0) {
12995
- peg$fail(peg$e26);
13529
+ peg$fail(peg$e36);
12996
13530
  }
12997
13531
  }
12998
13532
  if (s1 !== peg$FAILED) {
@@ -13003,12 +13537,12 @@ function peg$parse3(input, options) {
13003
13537
  s5 = peg$currPos;
13004
13538
  s6 = peg$parse_();
13005
13539
  if (input.charCodeAt(peg$currPos) === 44) {
13006
- s7 = peg$c25;
13540
+ s7 = peg$c35;
13007
13541
  peg$currPos++;
13008
13542
  } else {
13009
13543
  s7 = peg$FAILED;
13010
13544
  if (peg$silentFails === 0) {
13011
- peg$fail(peg$e27);
13545
+ peg$fail(peg$e37);
13012
13546
  }
13013
13547
  }
13014
13548
  if (s7 !== peg$FAILED) {
@@ -13030,12 +13564,12 @@ function peg$parse3(input, options) {
13030
13564
  s5 = peg$currPos;
13031
13565
  s6 = peg$parse_();
13032
13566
  if (input.charCodeAt(peg$currPos) === 44) {
13033
- s7 = peg$c25;
13567
+ s7 = peg$c35;
13034
13568
  peg$currPos++;
13035
13569
  } else {
13036
13570
  s7 = peg$FAILED;
13037
13571
  if (peg$silentFails === 0) {
13038
- peg$fail(peg$e27);
13572
+ peg$fail(peg$e37);
13039
13573
  }
13040
13574
  }
13041
13575
  if (s7 !== peg$FAILED) {
@@ -13055,17 +13589,17 @@ function peg$parse3(input, options) {
13055
13589
  }
13056
13590
  s5 = peg$parse_();
13057
13591
  if (input.charCodeAt(peg$currPos) === 125) {
13058
- s6 = peg$c26;
13592
+ s6 = peg$c36;
13059
13593
  peg$currPos++;
13060
13594
  } else {
13061
13595
  s6 = peg$FAILED;
13062
13596
  if (peg$silentFails === 0) {
13063
- peg$fail(peg$e28);
13597
+ peg$fail(peg$e38);
13064
13598
  }
13065
13599
  }
13066
13600
  if (s6 !== peg$FAILED) {
13067
13601
  peg$savedPos = s0;
13068
- s0 = peg$f25(s3, s4);
13602
+ s0 = peg$f28(s3, s4);
13069
13603
  } else {
13070
13604
  peg$currPos = s0;
13071
13605
  s0 = peg$FAILED;
@@ -13087,12 +13621,12 @@ function peg$parse3(input, options) {
13087
13621
  if (s1 !== peg$FAILED) {
13088
13622
  s2 = peg$parse_();
13089
13623
  if (input.charCodeAt(peg$currPos) === 58) {
13090
- s3 = peg$c19;
13624
+ s3 = peg$c20;
13091
13625
  peg$currPos++;
13092
13626
  } else {
13093
13627
  s3 = peg$FAILED;
13094
13628
  if (peg$silentFails === 0) {
13095
- peg$fail(peg$e20);
13629
+ peg$fail(peg$e21);
13096
13630
  }
13097
13631
  }
13098
13632
  if (s3 !== peg$FAILED) {
@@ -13100,7 +13634,7 @@ function peg$parse3(input, options) {
13100
13634
  s5 = peg$parsePropValue();
13101
13635
  if (s5 !== peg$FAILED) {
13102
13636
  peg$savedPos = s0;
13103
- s0 = peg$f26(s1, s5);
13637
+ s0 = peg$f29(s1, s5);
13104
13638
  } else {
13105
13639
  peg$currPos = s0;
13106
13640
  s0 = peg$FAILED;
@@ -13127,7 +13661,7 @@ function peg$parse3(input, options) {
13127
13661
  } else {
13128
13662
  s4 = peg$FAILED;
13129
13663
  if (peg$silentFails === 0) {
13130
- peg$fail(peg$e29);
13664
+ peg$fail(peg$e39);
13131
13665
  }
13132
13666
  }
13133
13667
  if (s4 !== peg$FAILED) {
@@ -13139,7 +13673,7 @@ function peg$parse3(input, options) {
13139
13673
  } else {
13140
13674
  s4 = peg$FAILED;
13141
13675
  if (peg$silentFails === 0) {
13142
- peg$fail(peg$e29);
13676
+ peg$fail(peg$e39);
13143
13677
  }
13144
13678
  }
13145
13679
  }
@@ -13149,12 +13683,12 @@ function peg$parse3(input, options) {
13149
13683
  if (s3 !== peg$FAILED) {
13150
13684
  s4 = peg$currPos;
13151
13685
  if (input.charCodeAt(peg$currPos) === 46) {
13152
- s5 = peg$c27;
13686
+ s5 = peg$c37;
13153
13687
  peg$currPos++;
13154
13688
  } else {
13155
13689
  s5 = peg$FAILED;
13156
13690
  if (peg$silentFails === 0) {
13157
- peg$fail(peg$e30);
13691
+ peg$fail(peg$e40);
13158
13692
  }
13159
13693
  }
13160
13694
  if (s5 !== peg$FAILED) {
@@ -13165,7 +13699,7 @@ function peg$parse3(input, options) {
13165
13699
  } else {
13166
13700
  s7 = peg$FAILED;
13167
13701
  if (peg$silentFails === 0) {
13168
- peg$fail(peg$e29);
13702
+ peg$fail(peg$e39);
13169
13703
  }
13170
13704
  }
13171
13705
  if (s7 !== peg$FAILED) {
@@ -13177,7 +13711,7 @@ function peg$parse3(input, options) {
13177
13711
  } else {
13178
13712
  s7 = peg$FAILED;
13179
13713
  if (peg$silentFails === 0) {
13180
- peg$fail(peg$e29);
13714
+ peg$fail(peg$e39);
13181
13715
  }
13182
13716
  }
13183
13717
  }
@@ -13211,7 +13745,7 @@ function peg$parse3(input, options) {
13211
13745
  }
13212
13746
  if (s1 !== peg$FAILED) {
13213
13747
  peg$savedPos = s0;
13214
- s1 = peg$f27(s1);
13748
+ s1 = peg$f30(s1);
13215
13749
  }
13216
13750
  s0 = s1;
13217
13751
  if (s0 === peg$FAILED) {
@@ -13225,148 +13759,301 @@ function peg$parse3(input, options) {
13225
13759
  function peg$parseArrow() {
13226
13760
  var s0, s1;
13227
13761
  s0 = peg$currPos;
13228
- if (input.substr(peg$currPos, 4) === peg$c28) {
13229
- s1 = peg$c28;
13230
- peg$currPos += 4;
13762
+ if (input.substr(peg$currPos, 5) === peg$c38) {
13763
+ s1 = peg$c38;
13764
+ peg$currPos += 5;
13231
13765
  } else {
13232
13766
  s1 = peg$FAILED;
13233
13767
  if (peg$silentFails === 0) {
13234
- peg$fail(peg$e31);
13768
+ peg$fail(peg$e41);
13235
13769
  }
13236
13770
  }
13237
13771
  if (s1 !== peg$FAILED) {
13238
13772
  peg$savedPos = s0;
13239
- s1 = peg$f28();
13773
+ s1 = peg$f31();
13240
13774
  }
13241
13775
  s0 = s1;
13242
13776
  if (s0 === peg$FAILED) {
13243
13777
  s0 = peg$currPos;
13244
- if (input.substr(peg$currPos, 5) === peg$c29) {
13245
- s1 = peg$c29;
13778
+ if (input.substr(peg$currPos, 5) === peg$c39) {
13779
+ s1 = peg$c39;
13246
13780
  peg$currPos += 5;
13247
13781
  } else {
13248
13782
  s1 = peg$FAILED;
13249
13783
  if (peg$silentFails === 0) {
13250
- peg$fail(peg$e32);
13784
+ peg$fail(peg$e42);
13251
13785
  }
13252
13786
  }
13253
13787
  if (s1 !== peg$FAILED) {
13254
13788
  peg$savedPos = s0;
13255
- s1 = peg$f29();
13789
+ s1 = peg$f32();
13256
13790
  }
13257
13791
  s0 = s1;
13258
13792
  if (s0 === peg$FAILED) {
13259
13793
  s0 = peg$currPos;
13260
- if (input.substr(peg$currPos, 4) === peg$c30) {
13261
- s1 = peg$c30;
13262
- peg$currPos += 4;
13794
+ if (input.substr(peg$currPos, 5) === peg$c40) {
13795
+ s1 = peg$c40;
13796
+ peg$currPos += 5;
13263
13797
  } else {
13264
13798
  s1 = peg$FAILED;
13265
13799
  if (peg$silentFails === 0) {
13266
- peg$fail(peg$e33);
13800
+ peg$fail(peg$e43);
13267
13801
  }
13268
13802
  }
13269
13803
  if (s1 !== peg$FAILED) {
13270
13804
  peg$savedPos = s0;
13271
- s1 = peg$f30();
13805
+ s1 = peg$f33();
13272
13806
  }
13273
13807
  s0 = s1;
13274
13808
  if (s0 === peg$FAILED) {
13275
13809
  s0 = peg$currPos;
13276
- if (input.substr(peg$currPos, 3) === peg$c31) {
13277
- s1 = peg$c31;
13278
- peg$currPos += 3;
13810
+ if (input.substr(peg$currPos, 4) === peg$c41) {
13811
+ s1 = peg$c41;
13812
+ peg$currPos += 4;
13279
13813
  } else {
13280
13814
  s1 = peg$FAILED;
13281
13815
  if (peg$silentFails === 0) {
13282
- peg$fail(peg$e34);
13816
+ peg$fail(peg$e44);
13283
13817
  }
13284
13818
  }
13285
13819
  if (s1 !== peg$FAILED) {
13286
13820
  peg$savedPos = s0;
13287
- s1 = peg$f31();
13821
+ s1 = peg$f34();
13288
13822
  }
13289
13823
  s0 = s1;
13290
13824
  if (s0 === peg$FAILED) {
13291
13825
  s0 = peg$currPos;
13292
- if (input.substr(peg$currPos, 4) === peg$c32) {
13293
- s1 = peg$c32;
13826
+ if (input.substr(peg$currPos, 4) === peg$c42) {
13827
+ s1 = peg$c42;
13294
13828
  peg$currPos += 4;
13295
13829
  } else {
13296
13830
  s1 = peg$FAILED;
13297
13831
  if (peg$silentFails === 0) {
13298
- peg$fail(peg$e35);
13832
+ peg$fail(peg$e45);
13299
13833
  }
13300
13834
  }
13301
13835
  if (s1 !== peg$FAILED) {
13302
13836
  peg$savedPos = s0;
13303
- s1 = peg$f32();
13837
+ s1 = peg$f35();
13304
13838
  }
13305
13839
  s0 = s1;
13306
13840
  if (s0 === peg$FAILED) {
13307
13841
  s0 = peg$currPos;
13308
- if (input.substr(peg$currPos, 3) === peg$c33) {
13309
- s1 = peg$c33;
13310
- peg$currPos += 3;
13842
+ if (input.substr(peg$currPos, 4) === peg$c43) {
13843
+ s1 = peg$c43;
13844
+ peg$currPos += 4;
13311
13845
  } else {
13312
13846
  s1 = peg$FAILED;
13313
13847
  if (peg$silentFails === 0) {
13314
- peg$fail(peg$e36);
13848
+ peg$fail(peg$e46);
13315
13849
  }
13316
13850
  }
13317
13851
  if (s1 !== peg$FAILED) {
13318
13852
  peg$savedPos = s0;
13319
- s1 = peg$f33();
13853
+ s1 = peg$f36();
13320
13854
  }
13321
13855
  s0 = s1;
13322
13856
  if (s0 === peg$FAILED) {
13323
13857
  s0 = peg$currPos;
13324
- if (input.substr(peg$currPos, 3) === peg$c0) {
13325
- s1 = peg$c0;
13326
- peg$currPos += 3;
13858
+ if (input.substr(peg$currPos, 4) === peg$c44) {
13859
+ s1 = peg$c44;
13860
+ peg$currPos += 4;
13327
13861
  } else {
13328
13862
  s1 = peg$FAILED;
13329
13863
  if (peg$silentFails === 0) {
13330
- peg$fail(peg$e0);
13864
+ peg$fail(peg$e47);
13331
13865
  }
13332
13866
  }
13333
13867
  if (s1 !== peg$FAILED) {
13334
13868
  peg$savedPos = s0;
13335
- s1 = peg$f34();
13869
+ s1 = peg$f37();
13336
13870
  }
13337
13871
  s0 = s1;
13338
13872
  if (s0 === peg$FAILED) {
13339
13873
  s0 = peg$currPos;
13340
- if (input.substr(peg$currPos, 3) === peg$c34) {
13341
- s1 = peg$c34;
13342
- peg$currPos += 3;
13874
+ if (input.substr(peg$currPos, 5) === peg$c45) {
13875
+ s1 = peg$c45;
13876
+ peg$currPos += 5;
13343
13877
  } else {
13344
13878
  s1 = peg$FAILED;
13345
13879
  if (peg$silentFails === 0) {
13346
- peg$fail(peg$e37);
13880
+ peg$fail(peg$e48);
13347
13881
  }
13348
13882
  }
13349
13883
  if (s1 !== peg$FAILED) {
13350
13884
  peg$savedPos = s0;
13351
- s1 = peg$f35();
13885
+ s1 = peg$f38();
13352
13886
  }
13353
13887
  s0 = s1;
13354
13888
  if (s0 === peg$FAILED) {
13355
13889
  s0 = peg$currPos;
13356
- if (input.substr(peg$currPos, 3) === peg$c35) {
13357
- s1 = peg$c35;
13358
- peg$currPos += 3;
13890
+ if (input.substr(peg$currPos, 4) === peg$c46) {
13891
+ s1 = peg$c46;
13892
+ peg$currPos += 4;
13359
13893
  } else {
13360
13894
  s1 = peg$FAILED;
13361
13895
  if (peg$silentFails === 0) {
13362
- peg$fail(peg$e38);
13896
+ peg$fail(peg$e49);
13363
13897
  }
13364
13898
  }
13365
13899
  if (s1 !== peg$FAILED) {
13366
13900
  peg$savedPos = s0;
13367
- s1 = peg$f36();
13901
+ s1 = peg$f39();
13368
13902
  }
13369
13903
  s0 = s1;
13904
+ if (s0 === peg$FAILED) {
13905
+ s0 = peg$currPos;
13906
+ if (input.substr(peg$currPos, 4) === peg$c47) {
13907
+ s1 = peg$c47;
13908
+ peg$currPos += 4;
13909
+ } else {
13910
+ s1 = peg$FAILED;
13911
+ if (peg$silentFails === 0) {
13912
+ peg$fail(peg$e50);
13913
+ }
13914
+ }
13915
+ if (s1 !== peg$FAILED) {
13916
+ peg$savedPos = s0;
13917
+ s1 = peg$f40();
13918
+ }
13919
+ s0 = s1;
13920
+ if (s0 === peg$FAILED) {
13921
+ s0 = peg$currPos;
13922
+ if (input.substr(peg$currPos, 3) === peg$c48) {
13923
+ s1 = peg$c48;
13924
+ peg$currPos += 3;
13925
+ } else {
13926
+ s1 = peg$FAILED;
13927
+ if (peg$silentFails === 0) {
13928
+ peg$fail(peg$e51);
13929
+ }
13930
+ }
13931
+ if (s1 !== peg$FAILED) {
13932
+ peg$savedPos = s0;
13933
+ s1 = peg$f41();
13934
+ }
13935
+ s0 = s1;
13936
+ if (s0 === peg$FAILED) {
13937
+ s0 = peg$currPos;
13938
+ if (input.substr(peg$currPos, 4) === peg$c49) {
13939
+ s1 = peg$c49;
13940
+ peg$currPos += 4;
13941
+ } else {
13942
+ s1 = peg$FAILED;
13943
+ if (peg$silentFails === 0) {
13944
+ peg$fail(peg$e52);
13945
+ }
13946
+ }
13947
+ if (s1 !== peg$FAILED) {
13948
+ peg$savedPos = s0;
13949
+ s1 = peg$f42();
13950
+ }
13951
+ s0 = s1;
13952
+ if (s0 === peg$FAILED) {
13953
+ s0 = peg$currPos;
13954
+ if (input.substr(peg$currPos, 3) === peg$c50) {
13955
+ s1 = peg$c50;
13956
+ peg$currPos += 3;
13957
+ } else {
13958
+ s1 = peg$FAILED;
13959
+ if (peg$silentFails === 0) {
13960
+ peg$fail(peg$e53);
13961
+ }
13962
+ }
13963
+ if (s1 !== peg$FAILED) {
13964
+ peg$savedPos = s0;
13965
+ s1 = peg$f43();
13966
+ }
13967
+ s0 = s1;
13968
+ if (s0 === peg$FAILED) {
13969
+ s0 = peg$currPos;
13970
+ if (input.substr(peg$currPos, 3) === peg$c51) {
13971
+ s1 = peg$c51;
13972
+ peg$currPos += 3;
13973
+ } else {
13974
+ s1 = peg$FAILED;
13975
+ if (peg$silentFails === 0) {
13976
+ peg$fail(peg$e54);
13977
+ }
13978
+ }
13979
+ if (s1 !== peg$FAILED) {
13980
+ peg$savedPos = s0;
13981
+ s1 = peg$f44();
13982
+ }
13983
+ s0 = s1;
13984
+ if (s0 === peg$FAILED) {
13985
+ s0 = peg$currPos;
13986
+ if (input.substr(peg$currPos, 3) === peg$c52) {
13987
+ s1 = peg$c52;
13988
+ peg$currPos += 3;
13989
+ } else {
13990
+ s1 = peg$FAILED;
13991
+ if (peg$silentFails === 0) {
13992
+ peg$fail(peg$e55);
13993
+ }
13994
+ }
13995
+ if (s1 !== peg$FAILED) {
13996
+ peg$savedPos = s0;
13997
+ s1 = peg$f45();
13998
+ }
13999
+ s0 = s1;
14000
+ if (s0 === peg$FAILED) {
14001
+ s0 = peg$currPos;
14002
+ if (input.substr(peg$currPos, 3) === peg$c53) {
14003
+ s1 = peg$c53;
14004
+ peg$currPos += 3;
14005
+ } else {
14006
+ s1 = peg$FAILED;
14007
+ if (peg$silentFails === 0) {
14008
+ peg$fail(peg$e56);
14009
+ }
14010
+ }
14011
+ if (s1 !== peg$FAILED) {
14012
+ peg$savedPos = s0;
14013
+ s1 = peg$f46();
14014
+ }
14015
+ s0 = s1;
14016
+ if (s0 === peg$FAILED) {
14017
+ s0 = peg$currPos;
14018
+ if (input.substr(peg$currPos, 3) === peg$c54) {
14019
+ s1 = peg$c54;
14020
+ peg$currPos += 3;
14021
+ } else {
14022
+ s1 = peg$FAILED;
14023
+ if (peg$silentFails === 0) {
14024
+ peg$fail(peg$e57);
14025
+ }
14026
+ }
14027
+ if (s1 !== peg$FAILED) {
14028
+ peg$savedPos = s0;
14029
+ s1 = peg$f47();
14030
+ }
14031
+ s0 = s1;
14032
+ if (s0 === peg$FAILED) {
14033
+ s0 = peg$currPos;
14034
+ if (input.substr(peg$currPos, 3) === peg$c0) {
14035
+ s1 = peg$c0;
14036
+ peg$currPos += 3;
14037
+ } else {
14038
+ s1 = peg$FAILED;
14039
+ if (peg$silentFails === 0) {
14040
+ peg$fail(peg$e0);
14041
+ }
14042
+ }
14043
+ if (s1 !== peg$FAILED) {
14044
+ peg$savedPos = s0;
14045
+ s1 = peg$f48();
14046
+ }
14047
+ s0 = s1;
14048
+ }
14049
+ }
14050
+ }
14051
+ }
14052
+ }
14053
+ }
14054
+ }
14055
+ }
14056
+ }
13370
14057
  }
13371
14058
  }
13372
14059
  }
@@ -13405,7 +14092,7 @@ function peg$parse3(input, options) {
13405
14092
  }
13406
14093
  if (s4 !== peg$FAILED) {
13407
14094
  peg$savedPos = s0;
13408
- s0 = peg$f37(s1, s3);
14095
+ s0 = peg$f49(s1, s3);
13409
14096
  } else {
13410
14097
  peg$currPos = s0;
13411
14098
  s0 = peg$FAILED;
@@ -13427,19 +14114,19 @@ function peg$parse3(input, options) {
13427
14114
  s1 = peg$parseIdentifier();
13428
14115
  if (s1 !== peg$FAILED) {
13429
14116
  if (input.charCodeAt(peg$currPos) === 46) {
13430
- s2 = peg$c27;
14117
+ s2 = peg$c37;
13431
14118
  peg$currPos++;
13432
14119
  } else {
13433
14120
  s2 = peg$FAILED;
13434
14121
  if (peg$silentFails === 0) {
13435
- peg$fail(peg$e30);
14122
+ peg$fail(peg$e40);
13436
14123
  }
13437
14124
  }
13438
14125
  if (s2 !== peg$FAILED) {
13439
14126
  s3 = peg$parseIdentifier();
13440
14127
  if (s3 !== peg$FAILED) {
13441
14128
  peg$savedPos = s0;
13442
- s0 = peg$f38(s1, s3);
14129
+ s0 = peg$f50(s1, s3);
13443
14130
  } else {
13444
14131
  peg$currPos = s0;
13445
14132
  s0 = peg$FAILED;
@@ -13465,7 +14152,7 @@ function peg$parse3(input, options) {
13465
14152
  } else {
13466
14153
  s2 = peg$FAILED;
13467
14154
  if (peg$silentFails === 0) {
13468
- peg$fail(peg$e39);
14155
+ peg$fail(peg$e58);
13469
14156
  }
13470
14157
  }
13471
14158
  if (s2 !== peg$FAILED) {
@@ -13476,7 +14163,7 @@ function peg$parse3(input, options) {
13476
14163
  } else {
13477
14164
  s4 = peg$FAILED;
13478
14165
  if (peg$silentFails === 0) {
13479
- peg$fail(peg$e40);
14166
+ peg$fail(peg$e59);
13480
14167
  }
13481
14168
  }
13482
14169
  while (s4 !== peg$FAILED) {
@@ -13487,7 +14174,7 @@ function peg$parse3(input, options) {
13487
14174
  } else {
13488
14175
  s4 = peg$FAILED;
13489
14176
  if (peg$silentFails === 0) {
13490
- peg$fail(peg$e40);
14177
+ peg$fail(peg$e59);
13491
14178
  }
13492
14179
  }
13493
14180
  }
@@ -13534,7 +14221,7 @@ function peg$parse3(input, options) {
13534
14221
  } else {
13535
14222
  s9 = peg$FAILED;
13536
14223
  if (peg$silentFails === 0) {
13537
- peg$fail(peg$e41);
14224
+ peg$fail(peg$e60);
13538
14225
  }
13539
14226
  }
13540
14227
  peg$silentFails--;
@@ -13591,7 +14278,7 @@ function peg$parse3(input, options) {
13591
14278
  s5 = peg$parseNL();
13592
14279
  if (s5 !== peg$FAILED) {
13593
14280
  peg$savedPos = s2;
13594
- s2 = peg$f39(s4);
14281
+ s2 = peg$f51(s4);
13595
14282
  } else {
13596
14283
  peg$currPos = s2;
13597
14284
  s2 = peg$FAILED;
@@ -13628,7 +14315,7 @@ function peg$parse3(input, options) {
13628
14315
  } else {
13629
14316
  s9 = peg$FAILED;
13630
14317
  if (peg$silentFails === 0) {
13631
- peg$fail(peg$e41);
14318
+ peg$fail(peg$e60);
13632
14319
  }
13633
14320
  }
13634
14321
  peg$silentFails--;
@@ -13685,7 +14372,7 @@ function peg$parse3(input, options) {
13685
14372
  s5 = peg$parseNL();
13686
14373
  if (s5 !== peg$FAILED) {
13687
14374
  peg$savedPos = s2;
13688
- s2 = peg$f39(s4);
14375
+ s2 = peg$f51(s4);
13689
14376
  } else {
13690
14377
  peg$currPos = s2;
13691
14378
  s2 = peg$FAILED;
@@ -13696,7 +14383,7 @@ function peg$parse3(input, options) {
13696
14383
  }
13697
14384
  }
13698
14385
  peg$savedPos = s0;
13699
- s1 = peg$f40(s1);
14386
+ s1 = peg$f52(s1);
13700
14387
  s0 = s1;
13701
14388
  return s0;
13702
14389
  }
@@ -13704,12 +14391,12 @@ function peg$parse3(input, options) {
13704
14391
  var s0, s1, s2, s3, s4;
13705
14392
  s0 = peg$currPos;
13706
14393
  if (input.charCodeAt(peg$currPos) === 34) {
13707
- s1 = peg$c36;
14394
+ s1 = peg$c55;
13708
14395
  peg$currPos++;
13709
14396
  } else {
13710
14397
  s1 = peg$FAILED;
13711
14398
  if (peg$silentFails === 0) {
13712
- peg$fail(peg$e42);
14399
+ peg$fail(peg$e61);
13713
14400
  }
13714
14401
  }
13715
14402
  if (s1 !== peg$FAILED) {
@@ -13721,7 +14408,7 @@ function peg$parse3(input, options) {
13721
14408
  } else {
13722
14409
  s4 = peg$FAILED;
13723
14410
  if (peg$silentFails === 0) {
13724
- peg$fail(peg$e43);
14411
+ peg$fail(peg$e62);
13725
14412
  }
13726
14413
  }
13727
14414
  while (s4 !== peg$FAILED) {
@@ -13732,23 +14419,23 @@ function peg$parse3(input, options) {
13732
14419
  } else {
13733
14420
  s4 = peg$FAILED;
13734
14421
  if (peg$silentFails === 0) {
13735
- peg$fail(peg$e43);
14422
+ peg$fail(peg$e62);
13736
14423
  }
13737
14424
  }
13738
14425
  }
13739
14426
  s2 = input.substring(s2, peg$currPos);
13740
14427
  if (input.charCodeAt(peg$currPos) === 34) {
13741
- s3 = peg$c36;
14428
+ s3 = peg$c55;
13742
14429
  peg$currPos++;
13743
14430
  } else {
13744
14431
  s3 = peg$FAILED;
13745
14432
  if (peg$silentFails === 0) {
13746
- peg$fail(peg$e42);
14433
+ peg$fail(peg$e61);
13747
14434
  }
13748
14435
  }
13749
14436
  if (s3 !== peg$FAILED) {
13750
14437
  peg$savedPos = s0;
13751
- s0 = peg$f41(s2);
14438
+ s0 = peg$f53(s2);
13752
14439
  } else {
13753
14440
  peg$currPos = s0;
13754
14441
  s0 = peg$FAILED;
@@ -13770,7 +14457,7 @@ function peg$parse3(input, options) {
13770
14457
  } else {
13771
14458
  s3 = peg$FAILED;
13772
14459
  if (peg$silentFails === 0) {
13773
- peg$fail(peg$e29);
14460
+ peg$fail(peg$e39);
13774
14461
  }
13775
14462
  }
13776
14463
  if (s3 !== peg$FAILED) {
@@ -13782,7 +14469,7 @@ function peg$parse3(input, options) {
13782
14469
  } else {
13783
14470
  s3 = peg$FAILED;
13784
14471
  if (peg$silentFails === 0) {
13785
- peg$fail(peg$e29);
14472
+ peg$fail(peg$e39);
13786
14473
  }
13787
14474
  }
13788
14475
  }
@@ -13796,7 +14483,7 @@ function peg$parse3(input, options) {
13796
14483
  }
13797
14484
  if (s1 !== peg$FAILED) {
13798
14485
  peg$savedPos = s0;
13799
- s1 = peg$f42(s1);
14486
+ s1 = peg$f54(s1);
13800
14487
  }
13801
14488
  s0 = s1;
13802
14489
  return s0;
@@ -13810,7 +14497,7 @@ function peg$parse3(input, options) {
13810
14497
  } else {
13811
14498
  s1 = peg$FAILED;
13812
14499
  if (peg$silentFails === 0) {
13813
- peg$fail(peg$e44);
14500
+ peg$fail(peg$e63);
13814
14501
  }
13815
14502
  }
13816
14503
  if (s1 === peg$FAILED) {
@@ -13824,7 +14511,7 @@ function peg$parse3(input, options) {
13824
14511
  } else {
13825
14512
  s4 = peg$FAILED;
13826
14513
  if (peg$silentFails === 0) {
13827
- peg$fail(peg$e29);
14514
+ peg$fail(peg$e39);
13828
14515
  }
13829
14516
  }
13830
14517
  if (s4 !== peg$FAILED) {
@@ -13836,7 +14523,7 @@ function peg$parse3(input, options) {
13836
14523
  } else {
13837
14524
  s4 = peg$FAILED;
13838
14525
  if (peg$silentFails === 0) {
13839
- peg$fail(peg$e29);
14526
+ peg$fail(peg$e39);
13840
14527
  }
13841
14528
  }
13842
14529
  }
@@ -13850,7 +14537,7 @@ function peg$parse3(input, options) {
13850
14537
  }
13851
14538
  if (s2 !== peg$FAILED) {
13852
14539
  peg$savedPos = s0;
13853
- s0 = peg$f43(s1, s2);
14540
+ s0 = peg$f55(s1, s2);
13854
14541
  } else {
13855
14542
  peg$currPos = s0;
13856
14543
  s0 = peg$FAILED;
@@ -13868,7 +14555,7 @@ function peg$parse3(input, options) {
13868
14555
  s3 = peg$parseNL();
13869
14556
  if (s3 !== peg$FAILED) {
13870
14557
  peg$savedPos = s0;
13871
- s0 = peg$f44();
14558
+ s0 = peg$f56();
13872
14559
  } else {
13873
14560
  peg$currPos = s0;
13874
14561
  s0 = peg$FAILED;
@@ -13878,13 +14565,13 @@ function peg$parse3(input, options) {
13878
14565
  function peg$parseComment() {
13879
14566
  var s0, s1, s2, s3;
13880
14567
  s0 = peg$currPos;
13881
- if (input.substr(peg$currPos, 2) === peg$c37) {
13882
- s1 = peg$c37;
14568
+ if (input.substr(peg$currPos, 2) === peg$c56) {
14569
+ s1 = peg$c56;
13883
14570
  peg$currPos += 2;
13884
14571
  } else {
13885
14572
  s1 = peg$FAILED;
13886
14573
  if (peg$silentFails === 0) {
13887
- peg$fail(peg$e45);
14574
+ peg$fail(peg$e64);
13888
14575
  }
13889
14576
  }
13890
14577
  if (s1 !== peg$FAILED) {
@@ -13927,7 +14614,7 @@ function peg$parse3(input, options) {
13927
14614
  } else {
13928
14615
  s1 = peg$FAILED;
13929
14616
  if (peg$silentFails === 0) {
13930
- peg$fail(peg$e46);
14617
+ peg$fail(peg$e65);
13931
14618
  }
13932
14619
  }
13933
14620
  while (s1 !== peg$FAILED) {
@@ -13938,7 +14625,7 @@ function peg$parse3(input, options) {
13938
14625
  } else {
13939
14626
  s1 = peg$FAILED;
13940
14627
  if (peg$silentFails === 0) {
13941
- peg$fail(peg$e46);
14628
+ peg$fail(peg$e65);
13942
14629
  }
13943
14630
  }
13944
14631
  }
@@ -13953,7 +14640,7 @@ function peg$parse3(input, options) {
13953
14640
  } else {
13954
14641
  s1 = peg$FAILED;
13955
14642
  if (peg$silentFails === 0) {
13956
- peg$fail(peg$e46);
14643
+ peg$fail(peg$e65);
13957
14644
  }
13958
14645
  }
13959
14646
  if (s1 !== peg$FAILED) {
@@ -13965,7 +14652,7 @@ function peg$parse3(input, options) {
13965
14652
  } else {
13966
14653
  s1 = peg$FAILED;
13967
14654
  if (peg$silentFails === 0) {
13968
- peg$fail(peg$e46);
14655
+ peg$fail(peg$e65);
13969
14656
  }
13970
14657
  }
13971
14658
  }
@@ -13976,13 +14663,13 @@ function peg$parse3(input, options) {
13976
14663
  }
13977
14664
  function peg$parseNL() {
13978
14665
  var s0;
13979
- if (input.substr(peg$currPos, 2) === peg$c38) {
13980
- s0 = peg$c38;
14666
+ if (input.substr(peg$currPos, 2) === peg$c57) {
14667
+ s0 = peg$c57;
13981
14668
  peg$currPos += 2;
13982
14669
  } else {
13983
14670
  s0 = peg$FAILED;
13984
14671
  if (peg$silentFails === 0) {
13985
- peg$fail(peg$e47);
14672
+ peg$fail(peg$e66);
13986
14673
  }
13987
14674
  }
13988
14675
  if (s0 === peg$FAILED) {
@@ -13992,7 +14679,7 @@ function peg$parse3(input, options) {
13992
14679
  } else {
13993
14680
  s0 = peg$FAILED;
13994
14681
  if (peg$silentFails === 0) {
13995
- peg$fail(peg$e48);
14682
+ peg$fail(peg$e67);
13996
14683
  }
13997
14684
  }
13998
14685
  }
@@ -20210,7 +20897,7 @@ function layoutJourney(ir, theme) {
20210
20897
  elements.push(p.text(String(s), plotLeft - 10, y + typography.smallFontSize * 0.35, typography.smallFontSize, palette.textMuted, { anchor: "end" }));
20211
20898
  }
20212
20899
  ir.sections.forEach((sec, si) => {
20213
- const idxs = flat2.map((f, i) => ({ f, i })).filter(({ f }) => f.section === si).map(({ i }) => i);
20900
+ const idxs = flat2.map((f2, i) => ({ f: f2, i })).filter(({ f: f2 }) => f2.section === si).map(({ i }) => i);
20214
20901
  if (idxs.length === 0) return;
20215
20902
  const x0 = taskX(idxs[0]) - step / 2;
20216
20903
  const x1 = taskX(idxs[idxs.length - 1]) + step / 2;
@@ -20218,21 +20905,21 @@ function layoutJourney(ir, theme) {
20218
20905
  elements.push(p.rect({ x: rhu(x0), y: margin + titleH, width: rhu(x1 - x0 - 6), height: sectionBandH }, hue, hue, 0, { rx: 6 }));
20219
20906
  elements.push(p.text(sec.label, rhuInt((x0 + x1) / 2 - 3), margin + titleH + sectionBandH / 2 + typography.baseFontSize * 0.35, typography.baseFontSize, "#FFFFFF", { weight: "bold", anchor: "middle" }));
20220
20907
  });
20221
- const nodePts = flat2.map((f, i) => ({ x: rhu(taskX(i)), y: scoreY(f.score) }));
20908
+ const nodePts = flat2.map((f2, i) => ({ x: rhu(taskX(i)), y: scoreY(f2.score) }));
20222
20909
  if (nodePts.length > 1) {
20223
20910
  elements.push(p.path(`M ${nodePts.map((pt) => `${pt.x} ${pt.y}`).join(" L ")}`, palette.textMuted, 2, { opacity: 0.6 }));
20224
20911
  }
20225
- flat2.forEach((f, i) => {
20226
- const x = rhu(taskX(i)), y = scoreY(f.score);
20227
- const color = scoreColor(f.score);
20912
+ flat2.forEach((f2, i) => {
20913
+ const x = rhu(taskX(i)), y = scoreY(f2.score);
20914
+ const color = scoreColor(f2.score);
20228
20915
  elements.push(p.circle({ x, y }, 16, color, palette.background, 2));
20229
- elements.push(p.text(String(f.score), x, y + typography.baseFontSize * 0.35, typography.baseFontSize, "#FFFFFF", { weight: "bold", anchor: "middle" }));
20230
- elements.push(p.text(f.label, x, plotBottom + typography.smallFontSize + 10, typography.smallFontSize, palette.text, { anchor: "middle", weight: "bold" }));
20231
- f.actors.forEach((a, ai) => {
20916
+ elements.push(p.text(String(f2.score), x, y + typography.baseFontSize * 0.35, typography.baseFontSize, "#FFFFFF", { weight: "bold", anchor: "middle" }));
20917
+ elements.push(p.text(f2.label, x, plotBottom + typography.smallFontSize + 10, typography.smallFontSize, palette.text, { anchor: "middle", weight: "bold" }));
20918
+ f2.actors.forEach((a, ai) => {
20232
20919
  elements.push(p.text(a, x, plotBottom + typography.smallFontSize + 10 + (ai + 1) * (typography.smallFontSize + 4), typography.smallFontSize, palette.textMuted, { anchor: "middle" }));
20233
20920
  });
20234
20921
  });
20235
- const maxActors = Math.max(1, ...flat2.map((f) => f.actors.length));
20922
+ const maxActors = Math.max(1, ...flat2.map((f2) => f2.actors.length));
20236
20923
  const totalW = rhuInt(plotRight + margin);
20237
20924
  const totalH = rhuInt(plotBottom + typography.smallFontSize + 10 + (maxActors + 1) * (typography.smallFontSize + 4) + margin);
20238
20925
  const scene = applyOverlays({
@@ -22024,14 +22711,14 @@ function layoutSequence(ir, theme) {
22024
22711
  fragStack.push({ type: ev.type, label: ev.label, top: y - 24, left: minX, right: maxX, elses: [] });
22025
22712
  y += 14;
22026
22713
  } else if (ev.kind === "frag-else") {
22027
- const f = fragStack[fragStack.length - 1];
22028
- if (f) f.elses.push({ y: y - 18, label: ev.label });
22714
+ const f2 = fragStack[fragStack.length - 1];
22715
+ if (f2) f2.elses.push({ y: y - 18, label: ev.label });
22029
22716
  y += 10;
22030
22717
  } else if (ev.kind === "frag-end") {
22031
- const f = fragStack.pop();
22032
- if (f) {
22033
- f.right = maxX;
22034
- fragBoxes.push({ ...f, top: f.top, left: minX - colW / 2 - 16, right: maxX + colW / 2 + 16 });
22718
+ const f2 = fragStack.pop();
22719
+ if (f2) {
22720
+ f2.right = maxX;
22721
+ fragBoxes.push({ ...f2, top: f2.top, left: minX - colW / 2 - 16, right: maxX + colW / 2 + 16 });
22035
22722
  }
22036
22723
  y += 6;
22037
22724
  }
@@ -22042,14 +22729,14 @@ function layoutSequence(ir, theme) {
22042
22729
  }
22043
22730
  const bodyBottom = y + 6;
22044
22731
  const fragEls = [];
22045
- for (const f of fragBoxes) {
22046
- const top = f.top, left = f.left, right = f.right;
22732
+ for (const f2 of fragBoxes) {
22733
+ const top = f2.top, left = f2.left, right = f2.right;
22047
22734
  fragEls.push(p.rect({ x: rhu(left), y: rhu(top), width: rhu(right - left), height: rhu(bodyBottom - top) }, "none", palette.border, 1.2, { rx: 4 }));
22048
- const tabW = measureText(f.type.toUpperCase(), typography.smallFontSize).width + 16;
22735
+ const tabW = measureText(f2.type.toUpperCase(), typography.smallFontSize).width + 16;
22049
22736
  fragEls.push(p.rect({ x: rhu(left), y: rhu(top), width: rhu(tabW), height: 18 }, palette.border, palette.border, 0));
22050
- fragEls.push(p.text(f.type.toUpperCase(), rhu(left + 8), rhu(top + 13), typography.smallFontSize, palette.background, { weight: "bold" }));
22051
- if (f.label) fragEls.push(p.text(`[${f.label}]`, rhu(left + tabW + 8), rhu(top + 13), typography.smallFontSize, palette.text, { weight: "bold" }));
22052
- for (const e of f.elses) {
22737
+ fragEls.push(p.text(f2.type.toUpperCase(), rhu(left + 8), rhu(top + 13), typography.smallFontSize, palette.background, { weight: "bold" }));
22738
+ if (f2.label) fragEls.push(p.text(`[${f2.label}]`, rhu(left + tabW + 8), rhu(top + 13), typography.smallFontSize, palette.text, { weight: "bold" }));
22739
+ for (const e of f2.elses) {
22053
22740
  fragEls.push(p.path(`M ${rhu(left)} ${rhu(e.y)} L ${rhu(right)} ${rhu(e.y)}`, palette.border, 1, { dash: "4 3" }));
22054
22741
  if (e.label) fragEls.push(p.text(`[${e.label}]`, rhu(left + 8), rhu(e.y + 13), typography.smallFontSize, palette.text));
22055
22742
  }
@@ -27038,9 +27725,9 @@ function collect(stmts, states, transitions, composites) {
27038
27725
  ensure(st.id, st.label || st.id, "normal");
27039
27726
  localIds.add(st.id);
27040
27727
  } else if (st.t === "trans") {
27041
- const f = ref(st.from, "from"), to = ref(st.to, "to");
27042
- transitions.push({ from: f, to, ...st.label ? { label: st.label } : {} });
27043
- if (f !== "__start__" && f !== "__end__") localIds.add(f);
27728
+ const f2 = ref(st.from, "from"), to = ref(st.to, "to");
27729
+ transitions.push({ from: f2, to, ...st.label ? { label: st.label } : {} });
27730
+ if (f2 !== "__start__" && f2 !== "__end__") localIds.add(f2);
27044
27731
  if (to !== "__start__" && to !== "__end__") localIds.add(to);
27045
27732
  } else if (st.t === "block") {
27046
27733
  ensure(st.name, st.name, "normal");
@@ -31058,8 +31745,8 @@ function layoutRequirement(ir, theme) {
31058
31745
  const prepared = /* @__PURE__ */ new Map();
31059
31746
  const sizeOf = (n) => {
31060
31747
  const lines2 = [];
31061
- for (const f of n.fields) {
31062
- const wrapped = wrapText2(`${f.key}: ${f.value}`, fieldFont, BOX_W - 20, 3).lines;
31748
+ for (const f2 of n.fields) {
31749
+ const wrapped = wrapText2(`${f2.key}: ${f2.value}`, fieldFont, BOX_W - 20, 3).lines;
31063
31750
  lines2.push(...wrapped);
31064
31751
  }
31065
31752
  const headH = rhuInt(nameFont * 1.5) + fieldFont + 8;
@@ -38275,7 +38962,7 @@ function layoutPacket(ir, theme) {
38275
38962
  const p = pen(theme);
38276
38963
  const margin = spacing.diagramMargin;
38277
38964
  const fields = [...ir.fields].sort((a, b) => a.start - b.start);
38278
- const maxBit = Math.max(0, ...fields.map((f) => f.end));
38965
+ const maxBit = Math.max(0, ...fields.map((f2) => f2.end));
38279
38966
  const numRows = Math.floor(maxBit / BITS_PER_ROW) + 1;
38280
38967
  const bitW = 26;
38281
38968
  const rowH = 46;
@@ -38296,19 +38983,19 @@ function layoutPacket(ir, theme) {
38296
38983
  if (c < BITS_PER_ROW) elements.push(p.text(String(bit), rhu(x + 2), rhu(rowTop(r) - 6), bitFont, palette.textMuted));
38297
38984
  }
38298
38985
  }
38299
- fields.forEach((f, i) => {
38986
+ fields.forEach((f2, i) => {
38300
38987
  const hue = categoricalHue(i);
38301
- for (let r = Math.floor(f.start / BITS_PER_ROW); r <= Math.floor(f.end / BITS_PER_ROW); r++) {
38988
+ for (let r = Math.floor(f2.start / BITS_PER_ROW); r <= Math.floor(f2.end / BITS_PER_ROW); r++) {
38302
38989
  const rowStartBit = r * BITS_PER_ROW;
38303
- const cStart = Math.max(f.start, rowStartBit) - rowStartBit;
38304
- const cEnd = Math.min(f.end, rowStartBit + BITS_PER_ROW - 1) - rowStartBit;
38990
+ const cStart = Math.max(f2.start, rowStartBit) - rowStartBit;
38991
+ const cEnd = Math.min(f2.end, rowStartBit + BITS_PER_ROW - 1) - rowStartBit;
38305
38992
  const x = gridLeft + cStart * bitW;
38306
38993
  const w = (cEnd - cStart + 1) * bitW;
38307
38994
  const y = rowTop(r);
38308
38995
  elements.push(p.rect({ x: rhu(x), y: rhu(y), width: rhu(w), height: rowH }, hue + "33", hue, 1.4, { rx: 3 }));
38309
- const label = truncateText(f.label, labelFont, w - 6);
38996
+ const label = truncateText(f2.label, labelFont, w - 6);
38310
38997
  elements.push(p.text(label, rhuInt(x + w / 2), rhu(y + rowH / 2 + labelFont * 0.35), labelFont, palette.text, { weight: "bold", anchor: "middle" }));
38311
- elements.push(p.text(String(f.start), rhu(x + 3), rhu(y + bitFont + 1), bitFont, palette.textMuted));
38998
+ elements.push(p.text(String(f2.start), rhu(x + 3), rhu(y + bitFont + 1), bitFont, palette.textMuted));
38312
38999
  }
38313
39000
  });
38314
39001
  const totalW = rhuInt(gridLeft + BITS_PER_ROW * bitW + margin);
@@ -41534,7 +42221,7 @@ function layoutMemory(doc, theme) {
41534
42221
  return { w: Math.max(130, measureText(item.name, font).width + 56), h: 34 };
41535
42222
  }
41536
42223
  const titleW = measureText(item.title, font).width;
41537
- const fieldW = Math.max(0, ...item.fields.map((f) => measureText(`${f.k}: ${f.v}`, small).width));
42224
+ const fieldW = Math.max(0, ...item.fields.map((f2) => measureText(`${f2.k}: ${f2.v}`, small).width));
41538
42225
  return { w: Math.max(120, titleW + 24, fieldW + 24), h: 24 + item.fields.length * 20 + 8 };
41539
42226
  };
41540
42227
  const elements = [];
@@ -41575,8 +42262,8 @@ function layoutMemory(doc, theme) {
41575
42262
  } else {
41576
42263
  elements.push(p.rect(box, palette.surface, palette.primary, 2, { rx: 6, fillOpacity: OBJECT_FILL_OPACITY }));
41577
42264
  elements.push(p.text(item.title, box.x + 12, box.y + 18, font, palette.primary, { weight: "bold" }));
41578
- item.fields.forEach((f, fi) => {
41579
- elements.push(p.text(`${f.k}: ${f.v}`, box.x + 12, box.y + 24 + (fi + 1) * 18, small, palette.text));
42265
+ item.fields.forEach((f2, fi) => {
42266
+ elements.push(p.text(`${f2.k}: ${f2.v}`, box.x + 12, box.y + 24 + (fi + 1) * 18, small, palette.text));
41580
42267
  });
41581
42268
  idBox.set(item.id, box);
41582
42269
  anchors[item.id] = { bounds: box };
@@ -41710,7 +42397,8 @@ function layoutPage(doc, theme) {
41710
42397
  elements,
41711
42398
  defs: [arrowDef(palette.textMuted)]
41712
42399
  };
41713
- return { scene, anchors };
42400
+ const chromeRects = [{ x: px, y: py, width: pageW, height: HEADER }];
42401
+ return { scene, anchors, chromeRects };
41714
42402
  }
41715
42403
  function pxForCenteredContent(innerLeft, innerW, contentW) {
41716
42404
  return innerLeft + Math.max(0, (innerW - contentW) / 2);
@@ -42081,13 +42769,13 @@ function parse6(input) {
42081
42769
  const firstFilled = padded.findIndex((c) => c !== null);
42082
42770
  let lastFilled = -1;
42083
42771
  for (let i = 0; i < padded.length; i++) if (padded[i] !== null) lastFilled = i;
42084
- const f = front ?? (firstFilled >= 0 ? firstFilled : 0);
42772
+ const f2 = front ?? (firstFilled >= 0 ? firstFilled : 0);
42085
42773
  const r = rear ?? (lastFilled >= 0 ? lastFilled : 0);
42086
42774
  return {
42087
42775
  ...title !== void 0 ? { title } : {},
42088
42776
  capacity: cap,
42089
42777
  cells: padded,
42090
- front: f,
42778
+ front: f2,
42091
42779
  rear: r,
42092
42780
  axis
42093
42781
  };