[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> block-serialization-spec-parser.js (source)

   1  (function() {
   2  "use strict";
   3  var wp;
   4  (wp ||= {}).blockSerializationSpecParser = (() => {
   5    var __getOwnPropNames = Object.getOwnPropertyNames;
   6    var __commonJS = (cb, mod) => function __require() {
   7      return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
   8    };
   9  
  10    // packages/block-serialization-spec-parser/parser.js
  11    var require_parser = __commonJS({
  12      "packages/block-serialization-spec-parser/parser.js"(exports, module) {
  13        function peg$subclass(child, parent) {
  14          function ctor() {
  15            this.constructor = child;
  16          }
  17          ctor.prototype = parent.prototype;
  18          child.prototype = new ctor();
  19        }
  20        function peg$SyntaxError(message, expected, found, location) {
  21          this.message = message;
  22          this.expected = expected;
  23          this.found = found;
  24          this.location = location;
  25          this.name = "SyntaxError";
  26          if (typeof Error.captureStackTrace === "function") {
  27            Error.captureStackTrace(this, peg$SyntaxError);
  28          }
  29        }
  30        peg$subclass(peg$SyntaxError, Error);
  31        peg$SyntaxError.buildMessage = function(expected, found) {
  32          var DESCRIBE_EXPECTATION_FNS = {
  33            literal: function(expectation) {
  34              return '"' + literalEscape(expectation.text) + '"';
  35            },
  36            "class": function(expectation) {
  37              var escapedParts = "", i;
  38              for (i = 0; i < expectation.parts.length; i++) {
  39                escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]);
  40              }
  41              return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
  42            },
  43            any: function(expectation) {
  44              return "any character";
  45            },
  46            end: function(expectation) {
  47              return "end of input";
  48            },
  49            other: function(expectation) {
  50              return expectation.description;
  51            }
  52          };
  53          function hex(ch) {
  54            return ch.charCodeAt(0).toString(16).toUpperCase();
  55          }
  56          function literalEscape(s) {
  57            return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
  58              return "\\x0" + hex(ch);
  59            }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) {
  60              return "\\x" + hex(ch);
  61            });
  62          }
  63          function classEscape(s) {
  64            return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
  65              return "\\x0" + hex(ch);
  66            }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) {
  67              return "\\x" + hex(ch);
  68            });
  69          }
  70          function describeExpectation(expectation) {
  71            return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
  72          }
  73          function describeExpected(expected2) {
  74            var descriptions = new Array(expected2.length), i, j;
  75            for (i = 0; i < expected2.length; i++) {
  76              descriptions[i] = describeExpectation(expected2[i]);
  77            }
  78            descriptions.sort();
  79            if (descriptions.length > 0) {
  80              for (i = 1, j = 1; i < descriptions.length; i++) {
  81                if (descriptions[i - 1] !== descriptions[i]) {
  82                  descriptions[j] = descriptions[i];
  83                  j++;
  84                }
  85              }
  86              descriptions.length = j;
  87            }
  88            switch (descriptions.length) {
  89              case 1:
  90                return descriptions[0];
  91              case 2:
  92                return descriptions[0] + " or " + descriptions[1];
  93              default:
  94                return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1];
  95            }
  96          }
  97          function describeFound(found2) {
  98            return found2 ? '"' + literalEscape(found2) + '"' : "end of input";
  99          }
 100          return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
 101        };
 102        function peg$parse(input, options) {
 103          options = options !== void 0 ? options : {};
 104          var peg$FAILED = {}, peg$startRuleFunctions = { Block_List: peg$parseBlock_List }, peg$startRuleFunction = peg$parseBlock_List, peg$c0 = peg$anyExpectation(), peg$c1 = function(pre, b, html) {
 105            return [b, html];
 106          }, peg$c2 = function(pre, bs, post) {
 107            return joinBlocks(pre, bs, post);
 108          }, peg$c3 = "<!--", peg$c4 = peg$literalExpectation("<!--", false), peg$c5 = "wp:", peg$c6 = peg$literalExpectation("wp:", false), peg$c7 = function(blockName, a) {
 109            return a;
 110          }, peg$c8 = "/-->", peg$c9 = peg$literalExpectation("/-->", false), peg$c10 = function(blockName, attrs) {
 111            return {
 112              blockName,
 113              attrs: attrs || {},
 114              innerBlocks: [],
 115              innerHTML: "",
 116              innerContent: []
 117            };
 118          }, peg$c11 = function(s, children, e) {
 119            var innerParts = processInnerContent(children);
 120            var innerHTML = innerParts[0];
 121            var innerBlocks = innerParts[1];
 122            var innerContent = innerParts[2];
 123            return {
 124              blockName: s.blockName,
 125              attrs: s.attrs,
 126              innerBlocks,
 127              innerHTML,
 128              innerContent
 129            };
 130          }, peg$c12 = "-->", peg$c13 = peg$literalExpectation("-->", false), peg$c14 = function(blockName, attrs) {
 131            return {
 132              blockName,
 133              attrs: attrs || {}
 134            };
 135          }, peg$c15 = "/wp:", peg$c16 = peg$literalExpectation("/wp:", false), peg$c17 = function(blockName) {
 136            return {
 137              blockName
 138            };
 139          }, peg$c18 = "/", peg$c19 = peg$literalExpectation("/", false), peg$c20 = function(type) {
 140            return "core/" + type;
 141          }, peg$c21 = /^[a-z]/, peg$c22 = peg$classExpectation([["a", "z"]], false, false), peg$c23 = /^[a-z0-9_\-]/, peg$c24 = peg$classExpectation([["a", "z"], ["0", "9"], "_", "-"], false, false), peg$c25 = peg$otherExpectation("JSON-encoded attributes embedded in a block's opening comment"), peg$c26 = "{", peg$c27 = peg$literalExpectation("{", false), peg$c28 = "}", peg$c29 = peg$literalExpectation("}", false), peg$c30 = "", peg$c31 = function(attrs) {
 142            return maybeJSON(attrs);
 143          }, peg$c32 = /^[ \t\r\n]/, peg$c33 = peg$classExpectation([" ", "    ", "\r", "\n"], false, false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result;
 144          if ("startRule" in options) {
 145            if (!(options.startRule in peg$startRuleFunctions)) {
 146              throw new Error(`Can't start parsing from rule "` + options.startRule + '".');
 147            }
 148            peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
 149          }
 150          function text() {
 151            return input.substring(peg$savedPos, peg$currPos);
 152          }
 153          function location() {
 154            return peg$computeLocation(peg$savedPos, peg$currPos);
 155          }
 156          function expected(description, location2) {
 157            location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos);
 158            throw peg$buildStructuredError(
 159              [peg$otherExpectation(description)],
 160              input.substring(peg$savedPos, peg$currPos),
 161              location2
 162            );
 163          }
 164          function error(message, location2) {
 165            location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos);
 166            throw peg$buildSimpleError(message, location2);
 167          }
 168          function peg$literalExpectation(text2, ignoreCase) {
 169            return { type: "literal", text: text2, ignoreCase };
 170          }
 171          function peg$classExpectation(parts, inverted, ignoreCase) {
 172            return { type: "class", parts, inverted, ignoreCase };
 173          }
 174          function peg$anyExpectation() {
 175            return { type: "any" };
 176          }
 177          function peg$endExpectation() {
 178            return { type: "end" };
 179          }
 180          function peg$otherExpectation(description) {
 181            return { type: "other", description };
 182          }
 183          function peg$computePosDetails(pos) {
 184            var details = peg$posDetailsCache[pos], p;
 185            if (details) {
 186              return details;
 187            } else {
 188              p = pos - 1;
 189              while (!peg$posDetailsCache[p]) {
 190                p--;
 191              }
 192              details = peg$posDetailsCache[p];
 193              details = {
 194                line: details.line,
 195                column: details.column
 196              };
 197              while (p < pos) {
 198                if (input.charCodeAt(p) === 10) {
 199                  details.line++;
 200                  details.column = 1;
 201                } else {
 202                  details.column++;
 203                }
 204                p++;
 205              }
 206              peg$posDetailsCache[pos] = details;
 207              return details;
 208            }
 209          }
 210          function peg$computeLocation(startPos, endPos) {
 211            var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos);
 212            return {
 213              start: {
 214                offset: startPos,
 215                line: startPosDetails.line,
 216                column: startPosDetails.column
 217              },
 218              end: {
 219                offset: endPos,
 220                line: endPosDetails.line,
 221                column: endPosDetails.column
 222              }
 223            };
 224          }
 225          function peg$fail(expected2) {
 226            if (peg$currPos < peg$maxFailPos) {
 227              return;
 228            }
 229            if (peg$currPos > peg$maxFailPos) {
 230              peg$maxFailPos = peg$currPos;
 231              peg$maxFailExpected = [];
 232            }
 233            peg$maxFailExpected.push(expected2);
 234          }
 235          function peg$buildSimpleError(message, location2) {
 236            return new peg$SyntaxError(message, null, null, location2);
 237          }
 238          function peg$buildStructuredError(expected2, found, location2) {
 239            return new peg$SyntaxError(
 240              peg$SyntaxError.buildMessage(expected2, found),
 241              expected2,
 242              found,
 243              location2
 244            );
 245          }
 246          function peg$parseBlock_List() {
 247            var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
 248            s0 = peg$currPos;
 249            s1 = peg$currPos;
 250            s2 = [];
 251            s3 = peg$currPos;
 252            s4 = peg$currPos;
 253            peg$silentFails++;
 254            s5 = peg$parseBlock();
 255            peg$silentFails--;
 256            if (s5 === peg$FAILED) {
 257              s4 = void 0;
 258            } else {
 259              peg$currPos = s4;
 260              s4 = peg$FAILED;
 261            }
 262            if (s4 !== peg$FAILED) {
 263              if (input.length > peg$currPos) {
 264                s5 = input.charAt(peg$currPos);
 265                peg$currPos++;
 266              } else {
 267                s5 = peg$FAILED;
 268                if (peg$silentFails === 0) {
 269                  peg$fail(peg$c0);
 270                }
 271              }
 272              if (s5 !== peg$FAILED) {
 273                s4 = [s4, s5];
 274                s3 = s4;
 275              } else {
 276                peg$currPos = s3;
 277                s3 = peg$FAILED;
 278              }
 279            } else {
 280              peg$currPos = s3;
 281              s3 = peg$FAILED;
 282            }
 283            while (s3 !== peg$FAILED) {
 284              s2.push(s3);
 285              s3 = peg$currPos;
 286              s4 = peg$currPos;
 287              peg$silentFails++;
 288              s5 = peg$parseBlock();
 289              peg$silentFails--;
 290              if (s5 === peg$FAILED) {
 291                s4 = void 0;
 292              } else {
 293                peg$currPos = s4;
 294                s4 = peg$FAILED;
 295              }
 296              if (s4 !== peg$FAILED) {
 297                if (input.length > peg$currPos) {
 298                  s5 = input.charAt(peg$currPos);
 299                  peg$currPos++;
 300                } else {
 301                  s5 = peg$FAILED;
 302                  if (peg$silentFails === 0) {
 303                    peg$fail(peg$c0);
 304                  }
 305                }
 306                if (s5 !== peg$FAILED) {
 307                  s4 = [s4, s5];
 308                  s3 = s4;
 309                } else {
 310                  peg$currPos = s3;
 311                  s3 = peg$FAILED;
 312                }
 313              } else {
 314                peg$currPos = s3;
 315                s3 = peg$FAILED;
 316              }
 317            }
 318            if (s2 !== peg$FAILED) {
 319              s1 = input.substring(s1, peg$currPos);
 320            } else {
 321              s1 = s2;
 322            }
 323            if (s1 !== peg$FAILED) {
 324              s2 = [];
 325              s3 = peg$currPos;
 326              s4 = peg$parseBlock();
 327              if (s4 !== peg$FAILED) {
 328                s5 = peg$currPos;
 329                s6 = [];
 330                s7 = peg$currPos;
 331                s8 = peg$currPos;
 332                peg$silentFails++;
 333                s9 = peg$parseBlock();
 334                peg$silentFails--;
 335                if (s9 === peg$FAILED) {
 336                  s8 = void 0;
 337                } else {
 338                  peg$currPos = s8;
 339                  s8 = peg$FAILED;
 340                }
 341                if (s8 !== peg$FAILED) {
 342                  if (input.length > peg$currPos) {
 343                    s9 = input.charAt(peg$currPos);
 344                    peg$currPos++;
 345                  } else {
 346                    s9 = peg$FAILED;
 347                    if (peg$silentFails === 0) {
 348                      peg$fail(peg$c0);
 349                    }
 350                  }
 351                  if (s9 !== peg$FAILED) {
 352                    s8 = [s8, s9];
 353                    s7 = s8;
 354                  } else {
 355                    peg$currPos = s7;
 356                    s7 = peg$FAILED;
 357                  }
 358                } else {
 359                  peg$currPos = s7;
 360                  s7 = peg$FAILED;
 361                }
 362                while (s7 !== peg$FAILED) {
 363                  s6.push(s7);
 364                  s7 = peg$currPos;
 365                  s8 = peg$currPos;
 366                  peg$silentFails++;
 367                  s9 = peg$parseBlock();
 368                  peg$silentFails--;
 369                  if (s9 === peg$FAILED) {
 370                    s8 = void 0;
 371                  } else {
 372                    peg$currPos = s8;
 373                    s8 = peg$FAILED;
 374                  }
 375                  if (s8 !== peg$FAILED) {
 376                    if (input.length > peg$currPos) {
 377                      s9 = input.charAt(peg$currPos);
 378                      peg$currPos++;
 379                    } else {
 380                      s9 = peg$FAILED;
 381                      if (peg$silentFails === 0) {
 382                        peg$fail(peg$c0);
 383                      }
 384                    }
 385                    if (s9 !== peg$FAILED) {
 386                      s8 = [s8, s9];
 387                      s7 = s8;
 388                    } else {
 389                      peg$currPos = s7;
 390                      s7 = peg$FAILED;
 391                    }
 392                  } else {
 393                    peg$currPos = s7;
 394                    s7 = peg$FAILED;
 395                  }
 396                }
 397                if (s6 !== peg$FAILED) {
 398                  s5 = input.substring(s5, peg$currPos);
 399                } else {
 400                  s5 = s6;
 401                }
 402                if (s5 !== peg$FAILED) {
 403                  peg$savedPos = s3;
 404                  s4 = peg$c1(s1, s4, s5);
 405                  s3 = s4;
 406                } else {
 407                  peg$currPos = s3;
 408                  s3 = peg$FAILED;
 409                }
 410              } else {
 411                peg$currPos = s3;
 412                s3 = peg$FAILED;
 413              }
 414              while (s3 !== peg$FAILED) {
 415                s2.push(s3);
 416                s3 = peg$currPos;
 417                s4 = peg$parseBlock();
 418                if (s4 !== peg$FAILED) {
 419                  s5 = peg$currPos;
 420                  s6 = [];
 421                  s7 = peg$currPos;
 422                  s8 = peg$currPos;
 423                  peg$silentFails++;
 424                  s9 = peg$parseBlock();
 425                  peg$silentFails--;
 426                  if (s9 === peg$FAILED) {
 427                    s8 = void 0;
 428                  } else {
 429                    peg$currPos = s8;
 430                    s8 = peg$FAILED;
 431                  }
 432                  if (s8 !== peg$FAILED) {
 433                    if (input.length > peg$currPos) {
 434                      s9 = input.charAt(peg$currPos);
 435                      peg$currPos++;
 436                    } else {
 437                      s9 = peg$FAILED;
 438                      if (peg$silentFails === 0) {
 439                        peg$fail(peg$c0);
 440                      }
 441                    }
 442                    if (s9 !== peg$FAILED) {
 443                      s8 = [s8, s9];
 444                      s7 = s8;
 445                    } else {
 446                      peg$currPos = s7;
 447                      s7 = peg$FAILED;
 448                    }
 449                  } else {
 450                    peg$currPos = s7;
 451                    s7 = peg$FAILED;
 452                  }
 453                  while (s7 !== peg$FAILED) {
 454                    s6.push(s7);
 455                    s7 = peg$currPos;
 456                    s8 = peg$currPos;
 457                    peg$silentFails++;
 458                    s9 = peg$parseBlock();
 459                    peg$silentFails--;
 460                    if (s9 === peg$FAILED) {
 461                      s8 = void 0;
 462                    } else {
 463                      peg$currPos = s8;
 464                      s8 = peg$FAILED;
 465                    }
 466                    if (s8 !== peg$FAILED) {
 467                      if (input.length > peg$currPos) {
 468                        s9 = input.charAt(peg$currPos);
 469                        peg$currPos++;
 470                      } else {
 471                        s9 = peg$FAILED;
 472                        if (peg$silentFails === 0) {
 473                          peg$fail(peg$c0);
 474                        }
 475                      }
 476                      if (s9 !== peg$FAILED) {
 477                        s8 = [s8, s9];
 478                        s7 = s8;
 479                      } else {
 480                        peg$currPos = s7;
 481                        s7 = peg$FAILED;
 482                      }
 483                    } else {
 484                      peg$currPos = s7;
 485                      s7 = peg$FAILED;
 486                    }
 487                  }
 488                  if (s6 !== peg$FAILED) {
 489                    s5 = input.substring(s5, peg$currPos);
 490                  } else {
 491                    s5 = s6;
 492                  }
 493                  if (s5 !== peg$FAILED) {
 494                    peg$savedPos = s3;
 495                    s4 = peg$c1(s1, s4, s5);
 496                    s3 = s4;
 497                  } else {
 498                    peg$currPos = s3;
 499                    s3 = peg$FAILED;
 500                  }
 501                } else {
 502                  peg$currPos = s3;
 503                  s3 = peg$FAILED;
 504                }
 505              }
 506              if (s2 !== peg$FAILED) {
 507                s3 = peg$currPos;
 508                s4 = [];
 509                if (input.length > peg$currPos) {
 510                  s5 = input.charAt(peg$currPos);
 511                  peg$currPos++;
 512                } else {
 513                  s5 = peg$FAILED;
 514                  if (peg$silentFails === 0) {
 515                    peg$fail(peg$c0);
 516                  }
 517                }
 518                while (s5 !== peg$FAILED) {
 519                  s4.push(s5);
 520                  if (input.length > peg$currPos) {
 521                    s5 = input.charAt(peg$currPos);
 522                    peg$currPos++;
 523                  } else {
 524                    s5 = peg$FAILED;
 525                    if (peg$silentFails === 0) {
 526                      peg$fail(peg$c0);
 527                    }
 528                  }
 529                }
 530                if (s4 !== peg$FAILED) {
 531                  s3 = input.substring(s3, peg$currPos);
 532                } else {
 533                  s3 = s4;
 534                }
 535                if (s3 !== peg$FAILED) {
 536                  peg$savedPos = s0;
 537                  s1 = peg$c2(s1, s2, s3);
 538                  s0 = s1;
 539                } else {
 540                  peg$currPos = s0;
 541                  s0 = peg$FAILED;
 542                }
 543              } else {
 544                peg$currPos = s0;
 545                s0 = peg$FAILED;
 546              }
 547            } else {
 548              peg$currPos = s0;
 549              s0 = peg$FAILED;
 550            }
 551            return s0;
 552          }
 553          function peg$parseBlock() {
 554            var s0;
 555            s0 = peg$parseBlock_Void();
 556            if (s0 === peg$FAILED) {
 557              s0 = peg$parseBlock_Balanced();
 558            }
 559            return s0;
 560          }
 561          function peg$parseBlock_Void() {
 562            var s0, s1, s2, s3, s4, s5, s6, s7, s8;
 563            s0 = peg$currPos;
 564            if (input.substr(peg$currPos, 4) === peg$c3) {
 565              s1 = peg$c3;
 566              peg$currPos += 4;
 567            } else {
 568              s1 = peg$FAILED;
 569              if (peg$silentFails === 0) {
 570                peg$fail(peg$c4);
 571              }
 572            }
 573            if (s1 !== peg$FAILED) {
 574              s2 = peg$parse__();
 575              if (s2 !== peg$FAILED) {
 576                if (input.substr(peg$currPos, 3) === peg$c5) {
 577                  s3 = peg$c5;
 578                  peg$currPos += 3;
 579                } else {
 580                  s3 = peg$FAILED;
 581                  if (peg$silentFails === 0) {
 582                    peg$fail(peg$c6);
 583                  }
 584                }
 585                if (s3 !== peg$FAILED) {
 586                  s4 = peg$parseBlock_Name();
 587                  if (s4 !== peg$FAILED) {
 588                    s5 = peg$parse__();
 589                    if (s5 !== peg$FAILED) {
 590                      s6 = peg$currPos;
 591                      s7 = peg$parseBlock_Attributes();
 592                      if (s7 !== peg$FAILED) {
 593                        s8 = peg$parse__();
 594                        if (s8 !== peg$FAILED) {
 595                          peg$savedPos = s6;
 596                          s7 = peg$c7(s4, s7);
 597                          s6 = s7;
 598                        } else {
 599                          peg$currPos = s6;
 600                          s6 = peg$FAILED;
 601                        }
 602                      } else {
 603                        peg$currPos = s6;
 604                        s6 = peg$FAILED;
 605                      }
 606                      if (s6 === peg$FAILED) {
 607                        s6 = null;
 608                      }
 609                      if (s6 !== peg$FAILED) {
 610                        if (input.substr(peg$currPos, 4) === peg$c8) {
 611                          s7 = peg$c8;
 612                          peg$currPos += 4;
 613                        } else {
 614                          s7 = peg$FAILED;
 615                          if (peg$silentFails === 0) {
 616                            peg$fail(peg$c9);
 617                          }
 618                        }
 619                        if (s7 !== peg$FAILED) {
 620                          peg$savedPos = s0;
 621                          s1 = peg$c10(s4, s6);
 622                          s0 = s1;
 623                        } else {
 624                          peg$currPos = s0;
 625                          s0 = peg$FAILED;
 626                        }
 627                      } else {
 628                        peg$currPos = s0;
 629                        s0 = peg$FAILED;
 630                      }
 631                    } else {
 632                      peg$currPos = s0;
 633                      s0 = peg$FAILED;
 634                    }
 635                  } else {
 636                    peg$currPos = s0;
 637                    s0 = peg$FAILED;
 638                  }
 639                } else {
 640                  peg$currPos = s0;
 641                  s0 = peg$FAILED;
 642                }
 643              } else {
 644                peg$currPos = s0;
 645                s0 = peg$FAILED;
 646              }
 647            } else {
 648              peg$currPos = s0;
 649              s0 = peg$FAILED;
 650            }
 651            return s0;
 652          }
 653          function peg$parseBlock_Balanced() {
 654            var s0, s1, s2, s3, s4, s5, s6, s7, s8;
 655            s0 = peg$currPos;
 656            s1 = peg$parseBlock_Start();
 657            if (s1 !== peg$FAILED) {
 658              s2 = [];
 659              s3 = peg$parseBlock();
 660              if (s3 === peg$FAILED) {
 661                s3 = peg$currPos;
 662                s4 = [];
 663                s5 = peg$currPos;
 664                s6 = peg$currPos;
 665                peg$silentFails++;
 666                s7 = peg$parseBlock();
 667                peg$silentFails--;
 668                if (s7 === peg$FAILED) {
 669                  s6 = void 0;
 670                } else {
 671                  peg$currPos = s6;
 672                  s6 = peg$FAILED;
 673                }
 674                if (s6 !== peg$FAILED) {
 675                  s7 = peg$currPos;
 676                  peg$silentFails++;
 677                  s8 = peg$parseBlock_End();
 678                  peg$silentFails--;
 679                  if (s8 === peg$FAILED) {
 680                    s7 = void 0;
 681                  } else {
 682                    peg$currPos = s7;
 683                    s7 = peg$FAILED;
 684                  }
 685                  if (s7 !== peg$FAILED) {
 686                    if (input.length > peg$currPos) {
 687                      s8 = input.charAt(peg$currPos);
 688                      peg$currPos++;
 689                    } else {
 690                      s8 = peg$FAILED;
 691                      if (peg$silentFails === 0) {
 692                        peg$fail(peg$c0);
 693                      }
 694                    }
 695                    if (s8 !== peg$FAILED) {
 696                      s6 = [s6, s7, s8];
 697                      s5 = s6;
 698                    } else {
 699                      peg$currPos = s5;
 700                      s5 = peg$FAILED;
 701                    }
 702                  } else {
 703                    peg$currPos = s5;
 704                    s5 = peg$FAILED;
 705                  }
 706                } else {
 707                  peg$currPos = s5;
 708                  s5 = peg$FAILED;
 709                }
 710                if (s5 !== peg$FAILED) {
 711                  while (s5 !== peg$FAILED) {
 712                    s4.push(s5);
 713                    s5 = peg$currPos;
 714                    s6 = peg$currPos;
 715                    peg$silentFails++;
 716                    s7 = peg$parseBlock();
 717                    peg$silentFails--;
 718                    if (s7 === peg$FAILED) {
 719                      s6 = void 0;
 720                    } else {
 721                      peg$currPos = s6;
 722                      s6 = peg$FAILED;
 723                    }
 724                    if (s6 !== peg$FAILED) {
 725                      s7 = peg$currPos;
 726                      peg$silentFails++;
 727                      s8 = peg$parseBlock_End();
 728                      peg$silentFails--;
 729                      if (s8 === peg$FAILED) {
 730                        s7 = void 0;
 731                      } else {
 732                        peg$currPos = s7;
 733                        s7 = peg$FAILED;
 734                      }
 735                      if (s7 !== peg$FAILED) {
 736                        if (input.length > peg$currPos) {
 737                          s8 = input.charAt(peg$currPos);
 738                          peg$currPos++;
 739                        } else {
 740                          s8 = peg$FAILED;
 741                          if (peg$silentFails === 0) {
 742                            peg$fail(peg$c0);
 743                          }
 744                        }
 745                        if (s8 !== peg$FAILED) {
 746                          s6 = [s6, s7, s8];
 747                          s5 = s6;
 748                        } else {
 749                          peg$currPos = s5;
 750                          s5 = peg$FAILED;
 751                        }
 752                      } else {
 753                        peg$currPos = s5;
 754                        s5 = peg$FAILED;
 755                      }
 756                    } else {
 757                      peg$currPos = s5;
 758                      s5 = peg$FAILED;
 759                    }
 760                  }
 761                } else {
 762                  s4 = peg$FAILED;
 763                }
 764                if (s4 !== peg$FAILED) {
 765                  s3 = input.substring(s3, peg$currPos);
 766                } else {
 767                  s3 = s4;
 768                }
 769              }
 770              while (s3 !== peg$FAILED) {
 771                s2.push(s3);
 772                s3 = peg$parseBlock();
 773                if (s3 === peg$FAILED) {
 774                  s3 = peg$currPos;
 775                  s4 = [];
 776                  s5 = peg$currPos;
 777                  s6 = peg$currPos;
 778                  peg$silentFails++;
 779                  s7 = peg$parseBlock();
 780                  peg$silentFails--;
 781                  if (s7 === peg$FAILED) {
 782                    s6 = void 0;
 783                  } else {
 784                    peg$currPos = s6;
 785                    s6 = peg$FAILED;
 786                  }
 787                  if (s6 !== peg$FAILED) {
 788                    s7 = peg$currPos;
 789                    peg$silentFails++;
 790                    s8 = peg$parseBlock_End();
 791                    peg$silentFails--;
 792                    if (s8 === peg$FAILED) {
 793                      s7 = void 0;
 794                    } else {
 795                      peg$currPos = s7;
 796                      s7 = peg$FAILED;
 797                    }
 798                    if (s7 !== peg$FAILED) {
 799                      if (input.length > peg$currPos) {
 800                        s8 = input.charAt(peg$currPos);
 801                        peg$currPos++;
 802                      } else {
 803                        s8 = peg$FAILED;
 804                        if (peg$silentFails === 0) {
 805                          peg$fail(peg$c0);
 806                        }
 807                      }
 808                      if (s8 !== peg$FAILED) {
 809                        s6 = [s6, s7, s8];
 810                        s5 = s6;
 811                      } else {
 812                        peg$currPos = s5;
 813                        s5 = peg$FAILED;
 814                      }
 815                    } else {
 816                      peg$currPos = s5;
 817                      s5 = peg$FAILED;
 818                    }
 819                  } else {
 820                    peg$currPos = s5;
 821                    s5 = peg$FAILED;
 822                  }
 823                  if (s5 !== peg$FAILED) {
 824                    while (s5 !== peg$FAILED) {
 825                      s4.push(s5);
 826                      s5 = peg$currPos;
 827                      s6 = peg$currPos;
 828                      peg$silentFails++;
 829                      s7 = peg$parseBlock();
 830                      peg$silentFails--;
 831                      if (s7 === peg$FAILED) {
 832                        s6 = void 0;
 833                      } else {
 834                        peg$currPos = s6;
 835                        s6 = peg$FAILED;
 836                      }
 837                      if (s6 !== peg$FAILED) {
 838                        s7 = peg$currPos;
 839                        peg$silentFails++;
 840                        s8 = peg$parseBlock_End();
 841                        peg$silentFails--;
 842                        if (s8 === peg$FAILED) {
 843                          s7 = void 0;
 844                        } else {
 845                          peg$currPos = s7;
 846                          s7 = peg$FAILED;
 847                        }
 848                        if (s7 !== peg$FAILED) {
 849                          if (input.length > peg$currPos) {
 850                            s8 = input.charAt(peg$currPos);
 851                            peg$currPos++;
 852                          } else {
 853                            s8 = peg$FAILED;
 854                            if (peg$silentFails === 0) {
 855                              peg$fail(peg$c0);
 856                            }
 857                          }
 858                          if (s8 !== peg$FAILED) {
 859                            s6 = [s6, s7, s8];
 860                            s5 = s6;
 861                          } else {
 862                            peg$currPos = s5;
 863                            s5 = peg$FAILED;
 864                          }
 865                        } else {
 866                          peg$currPos = s5;
 867                          s5 = peg$FAILED;
 868                        }
 869                      } else {
 870                        peg$currPos = s5;
 871                        s5 = peg$FAILED;
 872                      }
 873                    }
 874                  } else {
 875                    s4 = peg$FAILED;
 876                  }
 877                  if (s4 !== peg$FAILED) {
 878                    s3 = input.substring(s3, peg$currPos);
 879                  } else {
 880                    s3 = s4;
 881                  }
 882                }
 883              }
 884              if (s2 !== peg$FAILED) {
 885                s3 = peg$parseBlock_End();
 886                if (s3 !== peg$FAILED) {
 887                  peg$savedPos = s0;
 888                  s1 = peg$c11(s1, s2, s3);
 889                  s0 = s1;
 890                } else {
 891                  peg$currPos = s0;
 892                  s0 = peg$FAILED;
 893                }
 894              } else {
 895                peg$currPos = s0;
 896                s0 = peg$FAILED;
 897              }
 898            } else {
 899              peg$currPos = s0;
 900              s0 = peg$FAILED;
 901            }
 902            return s0;
 903          }
 904          function peg$parseBlock_Start() {
 905            var s0, s1, s2, s3, s4, s5, s6, s7, s8;
 906            s0 = peg$currPos;
 907            if (input.substr(peg$currPos, 4) === peg$c3) {
 908              s1 = peg$c3;
 909              peg$currPos += 4;
 910            } else {
 911              s1 = peg$FAILED;
 912              if (peg$silentFails === 0) {
 913                peg$fail(peg$c4);
 914              }
 915            }
 916            if (s1 !== peg$FAILED) {
 917              s2 = peg$parse__();
 918              if (s2 !== peg$FAILED) {
 919                if (input.substr(peg$currPos, 3) === peg$c5) {
 920                  s3 = peg$c5;
 921                  peg$currPos += 3;
 922                } else {
 923                  s3 = peg$FAILED;
 924                  if (peg$silentFails === 0) {
 925                    peg$fail(peg$c6);
 926                  }
 927                }
 928                if (s3 !== peg$FAILED) {
 929                  s4 = peg$parseBlock_Name();
 930                  if (s4 !== peg$FAILED) {
 931                    s5 = peg$parse__();
 932                    if (s5 !== peg$FAILED) {
 933                      s6 = peg$currPos;
 934                      s7 = peg$parseBlock_Attributes();
 935                      if (s7 !== peg$FAILED) {
 936                        s8 = peg$parse__();
 937                        if (s8 !== peg$FAILED) {
 938                          peg$savedPos = s6;
 939                          s7 = peg$c7(s4, s7);
 940                          s6 = s7;
 941                        } else {
 942                          peg$currPos = s6;
 943                          s6 = peg$FAILED;
 944                        }
 945                      } else {
 946                        peg$currPos = s6;
 947                        s6 = peg$FAILED;
 948                      }
 949                      if (s6 === peg$FAILED) {
 950                        s6 = null;
 951                      }
 952                      if (s6 !== peg$FAILED) {
 953                        if (input.substr(peg$currPos, 3) === peg$c12) {
 954                          s7 = peg$c12;
 955                          peg$currPos += 3;
 956                        } else {
 957                          s7 = peg$FAILED;
 958                          if (peg$silentFails === 0) {
 959                            peg$fail(peg$c13);
 960                          }
 961                        }
 962                        if (s7 !== peg$FAILED) {
 963                          peg$savedPos = s0;
 964                          s1 = peg$c14(s4, s6);
 965                          s0 = s1;
 966                        } else {
 967                          peg$currPos = s0;
 968                          s0 = peg$FAILED;
 969                        }
 970                      } else {
 971                        peg$currPos = s0;
 972                        s0 = peg$FAILED;
 973                      }
 974                    } else {
 975                      peg$currPos = s0;
 976                      s0 = peg$FAILED;
 977                    }
 978                  } else {
 979                    peg$currPos = s0;
 980                    s0 = peg$FAILED;
 981                  }
 982                } else {
 983                  peg$currPos = s0;
 984                  s0 = peg$FAILED;
 985                }
 986              } else {
 987                peg$currPos = s0;
 988                s0 = peg$FAILED;
 989              }
 990            } else {
 991              peg$currPos = s0;
 992              s0 = peg$FAILED;
 993            }
 994            return s0;
 995          }
 996          function peg$parseBlock_End() {
 997            var s0, s1, s2, s3, s4, s5, s6;
 998            s0 = peg$currPos;
 999            if (input.substr(peg$currPos, 4) === peg$c3) {
1000              s1 = peg$c3;
1001              peg$currPos += 4;
1002            } else {
1003              s1 = peg$FAILED;
1004              if (peg$silentFails === 0) {
1005                peg$fail(peg$c4);
1006              }
1007            }
1008            if (s1 !== peg$FAILED) {
1009              s2 = peg$parse__();
1010              if (s2 !== peg$FAILED) {
1011                if (input.substr(peg$currPos, 4) === peg$c15) {
1012                  s3 = peg$c15;
1013                  peg$currPos += 4;
1014                } else {
1015                  s3 = peg$FAILED;
1016                  if (peg$silentFails === 0) {
1017                    peg$fail(peg$c16);
1018                  }
1019                }
1020                if (s3 !== peg$FAILED) {
1021                  s4 = peg$parseBlock_Name();
1022                  if (s4 !== peg$FAILED) {
1023                    s5 = peg$parse__();
1024                    if (s5 !== peg$FAILED) {
1025                      if (input.substr(peg$currPos, 3) === peg$c12) {
1026                        s6 = peg$c12;
1027                        peg$currPos += 3;
1028                      } else {
1029                        s6 = peg$FAILED;
1030                        if (peg$silentFails === 0) {
1031                          peg$fail(peg$c13);
1032                        }
1033                      }
1034                      if (s6 !== peg$FAILED) {
1035                        peg$savedPos = s0;
1036                        s1 = peg$c17(s4);
1037                        s0 = s1;
1038                      } else {
1039                        peg$currPos = s0;
1040                        s0 = peg$FAILED;
1041                      }
1042                    } else {
1043                      peg$currPos = s0;
1044                      s0 = peg$FAILED;
1045                    }
1046                  } else {
1047                    peg$currPos = s0;
1048                    s0 = peg$FAILED;
1049                  }
1050                } else {
1051                  peg$currPos = s0;
1052                  s0 = peg$FAILED;
1053                }
1054              } else {
1055                peg$currPos = s0;
1056                s0 = peg$FAILED;
1057              }
1058            } else {
1059              peg$currPos = s0;
1060              s0 = peg$FAILED;
1061            }
1062            return s0;
1063          }
1064          function peg$parseBlock_Name() {
1065            var s0;
1066            s0 = peg$parseNamespaced_Block_Name();
1067            if (s0 === peg$FAILED) {
1068              s0 = peg$parseCore_Block_Name();
1069            }
1070            return s0;
1071          }
1072          function peg$parseNamespaced_Block_Name() {
1073            var s0, s1, s2, s3, s4;
1074            s0 = peg$currPos;
1075            s1 = peg$currPos;
1076            s2 = peg$parseBlock_Name_Part();
1077            if (s2 !== peg$FAILED) {
1078              if (input.charCodeAt(peg$currPos) === 47) {
1079                s3 = peg$c18;
1080                peg$currPos++;
1081              } else {
1082                s3 = peg$FAILED;
1083                if (peg$silentFails === 0) {
1084                  peg$fail(peg$c19);
1085                }
1086              }
1087              if (s3 !== peg$FAILED) {
1088                s4 = peg$parseBlock_Name_Part();
1089                if (s4 !== peg$FAILED) {
1090                  s2 = [s2, s3, s4];
1091                  s1 = s2;
1092                } else {
1093                  peg$currPos = s1;
1094                  s1 = peg$FAILED;
1095                }
1096              } else {
1097                peg$currPos = s1;
1098                s1 = peg$FAILED;
1099              }
1100            } else {
1101              peg$currPos = s1;
1102              s1 = peg$FAILED;
1103            }
1104            if (s1 !== peg$FAILED) {
1105              s0 = input.substring(s0, peg$currPos);
1106            } else {
1107              s0 = s1;
1108            }
1109            return s0;
1110          }
1111          function peg$parseCore_Block_Name() {
1112            var s0, s1, s2;
1113            s0 = peg$currPos;
1114            s1 = peg$currPos;
1115            s2 = peg$parseBlock_Name_Part();
1116            if (s2 !== peg$FAILED) {
1117              s1 = input.substring(s1, peg$currPos);
1118            } else {
1119              s1 = s2;
1120            }
1121            if (s1 !== peg$FAILED) {
1122              peg$savedPos = s0;
1123              s1 = peg$c20(s1);
1124            }
1125            s0 = s1;
1126            return s0;
1127          }
1128          function peg$parseBlock_Name_Part() {
1129            var s0, s1, s2, s3, s4;
1130            s0 = peg$currPos;
1131            s1 = peg$currPos;
1132            if (peg$c21.test(input.charAt(peg$currPos))) {
1133              s2 = input.charAt(peg$currPos);
1134              peg$currPos++;
1135            } else {
1136              s2 = peg$FAILED;
1137              if (peg$silentFails === 0) {
1138                peg$fail(peg$c22);
1139              }
1140            }
1141            if (s2 !== peg$FAILED) {
1142              s3 = [];
1143              if (peg$c23.test(input.charAt(peg$currPos))) {
1144                s4 = input.charAt(peg$currPos);
1145                peg$currPos++;
1146              } else {
1147                s4 = peg$FAILED;
1148                if (peg$silentFails === 0) {
1149                  peg$fail(peg$c24);
1150                }
1151              }
1152              while (s4 !== peg$FAILED) {
1153                s3.push(s4);
1154                if (peg$c23.test(input.charAt(peg$currPos))) {
1155                  s4 = input.charAt(peg$currPos);
1156                  peg$currPos++;
1157                } else {
1158                  s4 = peg$FAILED;
1159                  if (peg$silentFails === 0) {
1160                    peg$fail(peg$c24);
1161                  }
1162                }
1163              }
1164              if (s3 !== peg$FAILED) {
1165                s2 = [s2, s3];
1166                s1 = s2;
1167              } else {
1168                peg$currPos = s1;
1169                s1 = peg$FAILED;
1170              }
1171            } else {
1172              peg$currPos = s1;
1173              s1 = peg$FAILED;
1174            }
1175            if (s1 !== peg$FAILED) {
1176              s0 = input.substring(s0, peg$currPos);
1177            } else {
1178              s0 = s1;
1179            }
1180            return s0;
1181          }
1182          function peg$parseBlock_Attributes() {
1183            var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;
1184            peg$silentFails++;
1185            s0 = peg$currPos;
1186            s1 = peg$currPos;
1187            s2 = peg$currPos;
1188            if (input.charCodeAt(peg$currPos) === 123) {
1189              s3 = peg$c26;
1190              peg$currPos++;
1191            } else {
1192              s3 = peg$FAILED;
1193              if (peg$silentFails === 0) {
1194                peg$fail(peg$c27);
1195              }
1196            }
1197            if (s3 !== peg$FAILED) {
1198              s4 = [];
1199              s5 = peg$currPos;
1200              s6 = peg$currPos;
1201              peg$silentFails++;
1202              s7 = peg$currPos;
1203              if (input.charCodeAt(peg$currPos) === 125) {
1204                s8 = peg$c28;
1205                peg$currPos++;
1206              } else {
1207                s8 = peg$FAILED;
1208                if (peg$silentFails === 0) {
1209                  peg$fail(peg$c29);
1210                }
1211              }
1212              if (s8 !== peg$FAILED) {
1213                s9 = peg$parse__();
1214                if (s9 !== peg$FAILED) {
1215                  s10 = peg$c30;
1216                  if (s10 !== peg$FAILED) {
1217                    if (input.charCodeAt(peg$currPos) === 47) {
1218                      s11 = peg$c18;
1219                      peg$currPos++;
1220                    } else {
1221                      s11 = peg$FAILED;
1222                      if (peg$silentFails === 0) {
1223                        peg$fail(peg$c19);
1224                      }
1225                    }
1226                    if (s11 === peg$FAILED) {
1227                      s11 = null;
1228                    }
1229                    if (s11 !== peg$FAILED) {
1230                      if (input.substr(peg$currPos, 3) === peg$c12) {
1231                        s12 = peg$c12;
1232                        peg$currPos += 3;
1233                      } else {
1234                        s12 = peg$FAILED;
1235                        if (peg$silentFails === 0) {
1236                          peg$fail(peg$c13);
1237                        }
1238                      }
1239                      if (s12 !== peg$FAILED) {
1240                        s8 = [s8, s9, s10, s11, s12];
1241                        s7 = s8;
1242                      } else {
1243                        peg$currPos = s7;
1244                        s7 = peg$FAILED;
1245                      }
1246                    } else {
1247                      peg$currPos = s7;
1248                      s7 = peg$FAILED;
1249                    }
1250                  } else {
1251                    peg$currPos = s7;
1252                    s7 = peg$FAILED;
1253                  }
1254                } else {
1255                  peg$currPos = s7;
1256                  s7 = peg$FAILED;
1257                }
1258              } else {
1259                peg$currPos = s7;
1260                s7 = peg$FAILED;
1261              }
1262              peg$silentFails--;
1263              if (s7 === peg$FAILED) {
1264                s6 = void 0;
1265              } else {
1266                peg$currPos = s6;
1267                s6 = peg$FAILED;
1268              }
1269              if (s6 !== peg$FAILED) {
1270                if (input.length > peg$currPos) {
1271                  s7 = input.charAt(peg$currPos);
1272                  peg$currPos++;
1273                } else {
1274                  s7 = peg$FAILED;
1275                  if (peg$silentFails === 0) {
1276                    peg$fail(peg$c0);
1277                  }
1278                }
1279                if (s7 !== peg$FAILED) {
1280                  s6 = [s6, s7];
1281                  s5 = s6;
1282                } else {
1283                  peg$currPos = s5;
1284                  s5 = peg$FAILED;
1285                }
1286              } else {
1287                peg$currPos = s5;
1288                s5 = peg$FAILED;
1289              }
1290              while (s5 !== peg$FAILED) {
1291                s4.push(s5);
1292                s5 = peg$currPos;
1293                s6 = peg$currPos;
1294                peg$silentFails++;
1295                s7 = peg$currPos;
1296                if (input.charCodeAt(peg$currPos) === 125) {
1297                  s8 = peg$c28;
1298                  peg$currPos++;
1299                } else {
1300                  s8 = peg$FAILED;
1301                  if (peg$silentFails === 0) {
1302                    peg$fail(peg$c29);
1303                  }
1304                }
1305                if (s8 !== peg$FAILED) {
1306                  s9 = peg$parse__();
1307                  if (s9 !== peg$FAILED) {
1308                    s10 = peg$c30;
1309                    if (s10 !== peg$FAILED) {
1310                      if (input.charCodeAt(peg$currPos) === 47) {
1311                        s11 = peg$c18;
1312                        peg$currPos++;
1313                      } else {
1314                        s11 = peg$FAILED;
1315                        if (peg$silentFails === 0) {
1316                          peg$fail(peg$c19);
1317                        }
1318                      }
1319                      if (s11 === peg$FAILED) {
1320                        s11 = null;
1321                      }
1322                      if (s11 !== peg$FAILED) {
1323                        if (input.substr(peg$currPos, 3) === peg$c12) {
1324                          s12 = peg$c12;
1325                          peg$currPos += 3;
1326                        } else {
1327                          s12 = peg$FAILED;
1328                          if (peg$silentFails === 0) {
1329                            peg$fail(peg$c13);
1330                          }
1331                        }
1332                        if (s12 !== peg$FAILED) {
1333                          s8 = [s8, s9, s10, s11, s12];
1334                          s7 = s8;
1335                        } else {
1336                          peg$currPos = s7;
1337                          s7 = peg$FAILED;
1338                        }
1339                      } else {
1340                        peg$currPos = s7;
1341                        s7 = peg$FAILED;
1342                      }
1343                    } else {
1344                      peg$currPos = s7;
1345                      s7 = peg$FAILED;
1346                    }
1347                  } else {
1348                    peg$currPos = s7;
1349                    s7 = peg$FAILED;
1350                  }
1351                } else {
1352                  peg$currPos = s7;
1353                  s7 = peg$FAILED;
1354                }
1355                peg$silentFails--;
1356                if (s7 === peg$FAILED) {
1357                  s6 = void 0;
1358                } else {
1359                  peg$currPos = s6;
1360                  s6 = peg$FAILED;
1361                }
1362                if (s6 !== peg$FAILED) {
1363                  if (input.length > peg$currPos) {
1364                    s7 = input.charAt(peg$currPos);
1365                    peg$currPos++;
1366                  } else {
1367                    s7 = peg$FAILED;
1368                    if (peg$silentFails === 0) {
1369                      peg$fail(peg$c0);
1370                    }
1371                  }
1372                  if (s7 !== peg$FAILED) {
1373                    s6 = [s6, s7];
1374                    s5 = s6;
1375                  } else {
1376                    peg$currPos = s5;
1377                    s5 = peg$FAILED;
1378                  }
1379                } else {
1380                  peg$currPos = s5;
1381                  s5 = peg$FAILED;
1382                }
1383              }
1384              if (s4 !== peg$FAILED) {
1385                if (input.charCodeAt(peg$currPos) === 125) {
1386                  s5 = peg$c28;
1387                  peg$currPos++;
1388                } else {
1389                  s5 = peg$FAILED;
1390                  if (peg$silentFails === 0) {
1391                    peg$fail(peg$c29);
1392                  }
1393                }
1394                if (s5 !== peg$FAILED) {
1395                  s3 = [s3, s4, s5];
1396                  s2 = s3;
1397                } else {
1398                  peg$currPos = s2;
1399                  s2 = peg$FAILED;
1400                }
1401              } else {
1402                peg$currPos = s2;
1403                s2 = peg$FAILED;
1404              }
1405            } else {
1406              peg$currPos = s2;
1407              s2 = peg$FAILED;
1408            }
1409            if (s2 !== peg$FAILED) {
1410              s1 = input.substring(s1, peg$currPos);
1411            } else {
1412              s1 = s2;
1413            }
1414            if (s1 !== peg$FAILED) {
1415              peg$savedPos = s0;
1416              s1 = peg$c31(s1);
1417            }
1418            s0 = s1;
1419            peg$silentFails--;
1420            if (s0 === peg$FAILED) {
1421              s1 = peg$FAILED;
1422              if (peg$silentFails === 0) {
1423                peg$fail(peg$c25);
1424              }
1425            }
1426            return s0;
1427          }
1428          function peg$parse__() {
1429            var s0, s1;
1430            s0 = [];
1431            if (peg$c32.test(input.charAt(peg$currPos))) {
1432              s1 = input.charAt(peg$currPos);
1433              peg$currPos++;
1434            } else {
1435              s1 = peg$FAILED;
1436              if (peg$silentFails === 0) {
1437                peg$fail(peg$c33);
1438              }
1439            }
1440            if (s1 !== peg$FAILED) {
1441              while (s1 !== peg$FAILED) {
1442                s0.push(s1);
1443                if (peg$c32.test(input.charAt(peg$currPos))) {
1444                  s1 = input.charAt(peg$currPos);
1445                  peg$currPos++;
1446                } else {
1447                  s1 = peg$FAILED;
1448                  if (peg$silentFails === 0) {
1449                    peg$fail(peg$c33);
1450                  }
1451                }
1452              }
1453            } else {
1454              s0 = peg$FAILED;
1455            }
1456            return s0;
1457          }
1458          function freeform(s) {
1459            return s.length && {
1460              blockName: null,
1461              attrs: {},
1462              innerBlocks: [],
1463              innerHTML: s,
1464              innerContent: [s]
1465            };
1466          }
1467          function joinBlocks(pre, tokens, post) {
1468            var blocks = [], i, l, html, item, token;
1469            if (pre.length) {
1470              blocks.push(freeform(pre));
1471            }
1472            for (i = 0, l = tokens.length; i < l; i++) {
1473              item = tokens[i];
1474              token = item[0];
1475              html = item[1];
1476              blocks.push(token);
1477              if (html.length) {
1478                blocks.push(freeform(html));
1479              }
1480            }
1481            if (post.length) {
1482              blocks.push(freeform(post));
1483            }
1484            return blocks;
1485          }
1486          function maybeJSON(s) {
1487            try {
1488              return JSON.parse(s);
1489            } catch (e) {
1490              return null;
1491            }
1492          }
1493          function processInnerContent(list) {
1494            var i, l, item;
1495            var html = "";
1496            var blocks = [];
1497            var content = [];
1498            for (i = 0, l = list.length; i < l; i++) {
1499              item = list[i];
1500              if ("string" === typeof item) {
1501                html += item;
1502                content.push(item);
1503              } else {
1504                blocks.push(item);
1505                content.push(null);
1506              }
1507            }
1508            ;
1509            return [html, blocks, content];
1510          }
1511          peg$result = peg$startRuleFunction();
1512          if (peg$result !== peg$FAILED && peg$currPos === input.length) {
1513            return peg$result;
1514          } else {
1515            if (peg$result !== peg$FAILED && peg$currPos < input.length) {
1516              peg$fail(peg$endExpectation());
1517            }
1518            throw peg$buildStructuredError(
1519              peg$maxFailExpected,
1520              peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,
1521              peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
1522            );
1523          }
1524        }
1525        module.exports = {
1526          SyntaxError: peg$SyntaxError,
1527          parse: peg$parse
1528        };
1529      }
1530    });
1531    return require_parser();
1532  })();
1533  (window.wp ||= {}).blockSerializationSpecParser = wp.blockSerializationSpecParser;
1534  })();


Generated : Sun Aug 16 08:20:24 2026 Cross-referenced by PHPXref